Page 1 of 2

comments on static pages

Posted: Thu Jul 23, 2009 8:36 am
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!

Re: comments on static pages

Posted: Thu Jul 23, 2009 1:15 pm
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

Re: comments on static pages

Posted: Sat Jul 25, 2009 5:29 am
by zvenson
HEy! Thank you for the answer - but how do i use actual entries as fake pages?
thanks again!
zvenson

Re: comments on static pages

Posted: Sat Jul 25, 2009 7:18 pm
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

Re: comments on static pages

Posted: Sun Jul 26, 2009 6:14 pm
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.

Re: comments on static pages

Posted: Sun Jul 26, 2009 6:43 pm
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

Re: Comments. Just comments.

Posted: Thu Feb 02, 2012 4:26 am
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 )

Re: Comments. Just comments.

Posted: Thu Feb 02, 2012 7:50 pm
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

Re: comments on static pages

Posted: Fri Feb 03, 2012 5:27 am
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

Re: comments on static pages

Posted: Fri Feb 03, 2012 9:24 am
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

Re: comments on static pages

Posted: Mon Feb 13, 2012 5:53 am
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

Re: comments on static pages

Posted: Mon Feb 13, 2012 10:40 am
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??

Re: comments on static pages

Posted: Mon Feb 13, 2012 1:56 pm
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

Re: comments on static pages

Posted: Mon Feb 13, 2012 9:38 pm
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!

Re: comments on static pages

Posted: Tue Feb 14, 2012 5:03 pm
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