comments on static pages

Creating and modifying plugins.
zvenson
Regular
Posts: 5
Joined: Wed Jul 22, 2009 11:50 am

comments on static pages

Post by zvenson »

Hi!
I' m using serendipity mainly as a cms - not really as a blog but want my visitors to allow comments on static pages - has anyone done this and can give me a hint on how to implement this feature?
Help would be very nice!
cheers!
zvenson!
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: comments on static pages

Post by yellowled »

zvenson wrote:I' m using serendipity mainly as a cms - not really as a blog but want my visitors to allow comments on static pages - has anyone done this and can give me a hint on how to implement this feature?
As far as I know, this is impossible.

Only way to solves this would be to use actual entries as "fake" static pages.

YL
zvenson
Regular
Posts: 5
Joined: Wed Jul 22, 2009 11:50 am

Re: comments on static pages

Post by zvenson »

HEy! Thank you for the answer - but how do i use actual entries as fake pages?
thanks again!
zvenson
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: comments on static pages

Post by yellowled »

zvenson wrote:how do i use actual entries as fake pages?
The actual difference between the two types of content is their structure of organization. Blog entries appear in chronological order while static pages usually have some kind of hierachical order.

Apart from that, they usually only differ in looks. While a blog entry usually contains much more "meta" data (like date, time, author etc.), a static page often only consist of a heading plus content. If you tweak your entries.tpl to display blog entries (or only blog entries of specific categories) like static pages, you can use them as "fake" static pages. It definitely needs an advance template, but it can be done.

YL
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Re: comments on static pages

Post by blog.brockha.us »

I think, you don't even have to tweak. Just don't use the blog timeline as main page and link in your menu directly to blog entries. This already should do the trick, I guess.
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: comments on static pages

Post by yellowled »

blog.brockha.us wrote:I think, you don't even have to tweak.
Depends on what you actually want and how many pages you're gonna use. If you only need a few pages, this should work fine with any template. I'd still suggest Bulletproof because of the integrated menu bar and the possibility to tweak entry (footer) display.

But if you need more than, say, 5 or 6 pages or if you want your navigation to reflect the (fake) static pages' hierarchy ... well, maybe Kinetic would be worth a look in that case :)

YL
thatsme
Regular
Posts: 20
Joined: Sat Jun 12, 2010 7:50 pm

Re: Comments. Just comments.

Post by thatsme »

Hi everyone!
I decided not to open one more topic, since this one seems like more or less fits to my question.
Here is the thing.
I use 1&1 host and they (as far I'm aware of) have memory limitation on their servers. Till the last time it didn't bother me anyhow, and the blog worked just as good as I want it to .
But it happens that my quests started to post comments almost as long as my article itself. And now I have 30 comments in that - very interesting ones, I don't want to delete them - and error 500, when I try to open the page.
So here is the question (actually, two of them) -
1. Is it possible to limit the length of comments somehow?
2. Is it possible to make pagination for comments?
I think it would help to prevent appearing of 500 error.
If it does possible, could you be so kind and explain me step by step what, where and how to do this?
My programming knowledge tends to zero, that's why I'm asking you folks for such a help.
Thank you in advance!
Andrian

(s9y 1.5.3 and PHP 4.4.9 )
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Comments. Just comments.

Post by garvinhicking »

Hi!

Well, how long excatly are those comments?

Did you go through your list of event and sidebar plugins and checked if you need all of them? That could reduce some memory usage already. Also, updating s9y to 1.6 would help a bit. And of course upgrading PHP to PHP5.

You can limit the length of comments on the output side, by editing comments.tpl and adding a {$comment.body|substring}-like smarty syntax. But there's no actual limit enforced on the frontend, only basic database field limit size (AFAIK 65kb).

Pagination of comments is currently not implemented, I think...it would be sure nice to have, I agree!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
thatsme
Regular
Posts: 20
Joined: Sat Jun 12, 2010 7:50 pm

Re: comments on static pages

Post by thatsme »

Hi Garvin,
Thank you for answering.
The length some of the comments is like 3000-5000 characters ..
I already updated s9y to ver.1.6, but I'm not sure how to do the same with PHP..it takes some while for me to get into the process. Internet technology is not my field, to be honest.
Some of plugins from my list could go with no consequence, I think..I'll check it out, thank you for this hint.
May be it will help.
BTW, what does it takes to write a plugin? I mean, like if I'd like to order some specific things, how long it takes to be done and what would be the premium for such a job?
I'm asking just out of curiosity, in order to be informed for making right decision..:)
Thank you, have a great day!
Andrian
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: comments on static pages

Post by garvinhicking »

Hi!

Okay...then maybe it's more the sum of all entries that exceeds memory limits. Go ahead with the plugin "cut down" and report back :)
BTW, what does it takes to write a plugin? I mean, like if I'd like to order some specific things, how long it takes to be done and what would be the premium for such a job?
I'm asking just out of curiosity, in order to be informed for making right decision..:)
You'd have to be more specific? :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
thatsme
Regular
Posts: 20
Joined: Sat Jun 12, 2010 7:50 pm

Re: comments on static pages

Post by thatsme »

Hi Garvin!
No, it doesn't help. I removed all that could painlessly go, and nothing changed.
So, to be more specific on my question - pagination and size limitation on comments. How big the project might be and does it make sense to push it?
I really kinda frustrated with the 500 error, and I use to the s9y, I don't want to change it.. I expect to have quite a few people coming to my site, and chance that they could go because of the technical issue..that makes me nervous.
Thank you
elizabethmc
Posts: 4
Joined: Mon Feb 13, 2012 10:31 am

Re: comments on static pages

Post by elizabethmc »

yellowled wrote:
zvenson wrote:I' m using serendipity mainly as a cms - not really as a blog but want my visitors to allow comments on static pages - has anyone done this and can ent s give me a hint on how to implement this feature?
As far as I know, this is impossible.

Only way to solves this would be to use actual entries as "fake" static pages.

YL

My thoughts exactly! Comments and static pages don't go together IMO! ;)
But I am not sure what you mean by "fake" static pages??
Last edited by elizabethmc on Fri Mar 09, 2012 9:50 am, edited 1 time in total.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: comments on static pages

Post by garvinhicking »

Hi!

Can you tell us which event and sidebar plugins you have installed? A HTTP/500 error could also mean that something else is going wrong, you might want to contact 1&1 support for a detailed error, that their technical support should be able to get from the server.

Regards,
GArvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
thatsme
Regular
Posts: 20
Joined: Sat Jun 12, 2010 7:50 pm

Re: comments on static pages

Post by thatsme »

Hi Garvin!

Here are the plugins that I have on the side panel - superuser, categories, Logo, recententries, comments, calender, html_nugget, staticpage.
Event plugins - staticpage, textile, statistic, photoblog, categorytemplates, startcat, spartacus (when I try to check event plugins it gives me err500 also), spam protector, Browser Compatibility, NL2BR, Emoticate, Markup Serendipity.
That's about it.

The issue came not like at once. The more comments were entered the more often I saw the err500, till finally I lost ability to open the page at all. All other pages and categories work just fine, no problem whatsoever..(but they don't have too many comments in them neither)

Thank you!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: comments on static pages

Post by garvinhicking »

Hi!

Those are really not that many plugins. You might want to temporarily disable the statistics plugin, in some cases this can cause a larger load.

Apart from that, we'd really need some feedback of the hoster for the real cause of the 500 HTTP error; it seems something more problematic is going on here.

Also, you will need to ask your provider about the RAM limit. It could be that you are limited to 8MB RAM, that would explain the low threshold of responsiveness. If that is the case, you would need to ask how you can raise the limit to 16MB, or better, 32MB RAM. On instances with 8MB and lower, s9y can really only operate with only 4-5 plugins.

Creating a comment pagination plugin, BTW; is a real good idea, sadly this is quite embedded into the core and not so easy to create. This is definitely something that could be improved for future versions. However, even if we made comments paginated, you would still very easily hit the 8MB RAM problem, so that would not really make it THAT much more usable to you.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply