Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » [archived] sdr_guestbook

#1 2004-08-19 20:42:36

sderuiter
Plugin Author
From: Laren NH
Registered: 2004-02-24
Posts: 38
Website

[archived] sdr_guestbook

Notice: This thread is archived, there is a newer version of this plugin here.

**********************************************************

Hi,

I’ve created a plugin that transforms an article into a guestbook. Main features are reverse ordering of comments and paginated comments.

From the help-file:
  • Create a specific section for your guestbook. Next, create an article that you want to nominate as guestbook. Fill the article body with the text to be shown at the top of your guestbook.
  • Drop the following text on the page used by your section: < txp:sdr_guestbook section=“guestbook” pagelimit=“10” articletitle=“Guestbook” / >

Further parameters:

  • articletitle: The exact name of the article nominated to be guestbook
  • pagelimit: Number of comments to be shown per page, default=10
  • form: See any txp_tag
  • commentform: default=comments, create a form (type:comment), to style the output of your comments
  • pageul: id for page navigation, which is outputted as an unordered list
  • commentsul: id for comments, which are outputted as an unordered list

Download at: sdr_guestbook.txt

Last edited by sderuiter (2004-08-19 20:44:36)

Offline

#2 2004-08-20 20:54:00

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [archived] sdr_guestbook

Hi,
I get this warning on my ‘guestbook’ page:

Warning: Division by zero in /home/httpd/vhosts/doggiez.nl/httpdocs/txptmp/pluginsqNjGA1 on line 634

I looked in /txptmp/ but there is no file at all…??? Any idea?

Offline

#3 2004-08-20 21:41:04

sderuiter
Plugin Author
From: Laren NH
Registered: 2004-02-24
Posts: 38
Website

Re: [archived] sdr_guestbook

Hi doggiez,
thanks for trying out my plugin! I received the warning only once, when I didn’t set a pagelimit in the tag. However, this should default to 10. I will look into to this.

Offline

#4 2004-08-20 22:39:14

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [archived] sdr_guestbook

I have pagelimit=“10” in the tag. And now I notice that the part after ‘plugins’ in /txptmp/plugins***** changes with every page reload.

Offline

#5 2004-08-20 23:02:31

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [archived] sdr_guestbook

More questions:

1. Is it possible not to have the comments output in a list?

2. In the comment form, the font-size of ‘name’, ‘email’ etc. suddenly becomes huge, as well as the search_input label elsewhere on the page. I don’t know how to change that. (When I use the default comment submission form, without your plugin, the font-size is fine.)

In case you want to have a look at it: http://www.doggiez.nl/test1

Last edited by doggiez (2004-08-20 23:05:24)

Offline

#6 2004-08-21 07:30:43

sderuiter
Plugin Author
From: Laren NH
Registered: 2004-02-24
Posts: 38
Website

Re: [archived] sdr_guestbook

Doggiez,

2 options for division by zero:
  • Download an updated version (same location)
  • Go to the plugin code, appr. line 12-15. Change $pagelimit = (!empty($pagelimit)) ? pagelimit : “10”; to $pagelimit = (!empty($pagelimit)) ? $pagelimit : “10”;
  1. Yes, it’s possible not to output the comments as an unordered list. The original txp method is an ordered list. Is that what you want, or no list at all?
  2. Will look into this.

Last edited by sderuiter (2004-08-21 08:26:56)

Offline

#7 2004-08-21 13:48:01

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [archived] sdr_guestbook

sderuiter,

That made the warning dissappear, AND it solved problem #2 as well!

As to the list: I would prefer no list at all, but if that’s not possible I’d rather keep the unordered list and try to style it somehow.

Thanks for your help so far!

Last edited by doggiez (2004-08-21 13:48:29)

Offline

#8 2004-08-21 15:21:42

sderuiter
Plugin Author
From: Laren NH
Registered: 2004-02-24
Posts: 38
Website

Re: [archived] sdr_guestbook

How would you differentiate between comments? Using a break-tag? Can you specify what you want?

Offline

#9 2004-08-21 16:10:15

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [archived] sdr_guestbook

I was thinking about a hr, that I can style in my CSS. But if that’s too much trouble, I’ll settle for the unordered list.

And yet another question: can you have a look at my test1 page again and tell me where the

<strong>• 1</strong> [Edit: I’m trying out some style, so it may also look like <strong>1</strong>.]

comes from? It’s there since I updated your plugin.

Last edited by doggiez (2004-08-21 17:29:23)

Offline

#10 2004-08-21 18:23:07

sderuiter
Plugin Author
From: Laren NH
Registered: 2004-02-24
Posts: 38
Website

Re: [archived] sdr_guestbook

Hi els,

the bold one is a pagelink. If you enter more than ‘pagelimit’ comments, the tag will only output the first ‘pagelimit’ comments and pagelinks.

Offline

#11 2004-08-21 18:48:59

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [archived] sdr_guestbook

Of course, I should have understood that right away ;-(

Sorry, can’t stop asking questions: how exactly do I use the pageul and commentsul? Can you give me an example?

Thank you again!

Offline

#12 2004-08-21 20:03:01

sderuiter
Plugin Author
From: Laren NH
Registered: 2004-02-24
Posts: 38
Website

Re: [archived] sdr_guestbook

pageul is an id for the pagelinks, which are an unordered list, so < ul id=‘pageul’ >. The same holds true for commentsul.

Offline

  1. Index
  2. » Archives
  3. » [archived] sdr_guestbook

Board footer

Powered by FluxBB