Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-09-19 18:42:31

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

[plugin] [ORPHAN] sdr_guestbook v4.0 (as in comp. with 4.0.1)

This is an update to my original sdr_guestbook plugin, with many critical bug fixes.
The plugin still transforms an article into a guestbook. Main features are reverse ordering of comments and paginated comments.

Changelog from version 0.1:
  • Removed all notice errors
  • Changed date format to comply with 4.0.1.
  • Surpress pagestring navigation when there’s only 1 page to show
  • Make plugin valid xhtml
  • Added option for placement of pagestring
  • Removed AnnotateInvite (seemed useless in this context)
  • Changed markup on pagestring to comply with the Listamatic
Todo:
  • Change format for output of comments to adhere to the $comments_are_ol pref
  • Update help file with more information

Quick how-to: * 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: <code> <txp:sdr_guestbook section=“guestbook” pagelimit=“10” articletitle=“Guestbook” divid=“navcontainer” pageul=“navlist” commentsid=“commentsid” pagestring_placement=“both” /> </code>

Parameters explained:
  • 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
  • divid: id for div surrounding the pagestring list. Example: <code><div id=divid></code>
  • pageul: id for page navigation, which is outputted as an unordered list. Example: <code><ul id=pageul></code>
  • commentsid: id for comments, which are outputted as an unordered list. Example: <code><ul id=commentsid></code>
  • The pagestring navigation can now be styled using the easy to use Listamatic styles. The markup is the same as presented in their examples, so cut&paste the css to create different styles. Check guestbook.textdriven.com for an example (css for navigation in source). This is a clean install of revision 903 (release 4.0.1).

Download at: sdr_guestbook.txt

Questions, bugs and flames on the new version in this thread please.

Last edited by sderuiter (2005-09-19 18:47:41)

Offline

#2 2005-09-19 19:08:18

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: [plugin] [ORPHAN] sdr_guestbook v4.0 (as in comp. with 4.0.1)

Thanks for the update, much appreciated.

Offline

#3 2005-09-19 19:20:55

Joey
Member
From: Netherlands
Registered: 2005-01-19
Posts: 257

Re: [plugin] [ORPHAN] sdr_guestbook v4.0 (as in comp. with 4.0.1)

Sorry, just posted this post in the old tread:

Thanks (bedankt) Sander! :D

Edit: Still have some problems. When page-navigation is selected to both, the page doesn’t validates because the navigation id is appearing 2 times on the page. So I think that should be a class.
Another weird thing is that the plugin or TXP inserts an invalid <code><BR></code> tag between the comments and the form :S. I can’t see that <code><BR></code> in any of my forms or something.


Regards,

Joey

Offline

#4 2005-09-19 19:24:13

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

Re: [plugin] [ORPHAN] sdr_guestbook v4.0 (as in comp. with 4.0.1)

You’re right, joey. The site validates only if you select top or bottom for pagestring_placement. That will change. Also the <code><BR></code> has to go…

Joey, I have 2 options.

  1. Only allow the navigation to be displayed once, either top or bottom
  2. Change the nagivation markup to classes, thereby breaking the easy cut-n-paste from listamatic

Any ideas?

Last edited by sderuiter (2005-09-19 19:40:23)

Offline

#5 2005-09-19 19:49:05

Joey
Member
From: Netherlands
Registered: 2005-01-19
Posts: 257

Re: [plugin] [ORPHAN] sdr_guestbook v4.0 (as in comp. with 4.0.1)

My vote will go to change the markup to classes. Editing the style from listamatic won’t be a big problem: just change the id’s into the classes. But if others think different, you may also apply option 1 :). So people, what do you think? :)


Regards,

Joey

Offline

#6 2005-09-21 20:41:43

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: [plugin] [ORPHAN] sdr_guestbook v4.0 (as in comp. with 4.0.1)

Hi Sander. Thanks for the update. Much appreciated. I also had a problem with the errant <code><BR></code> tag which is within the plug-in. I’ve fixed mine but for those that want to do their own edit it can be found in the function sdr_discuss. Look for this block:-

<code>
if ($darr) { $out.= “$pagestring_top<ol$commentsid>”.n; $out.= sdr_formatComments($darr, $atts); $out.= n.”</ol>”.n.”$pagestring_bottom”.n.”<BR>”;</code>
<br />

and change the <code><BR></code> tag to <code><br /></code>.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#7 2005-09-21 23:18:11

joana
Member
Registered: 2005-09-16
Posts: 11

Re: [plugin] [ORPHAN] sdr_guestbook v4.0 (as in comp. with 4.0.1)

2 questions:

1) Is there a way to take the Comments Number off?

2) Could somebody please tell me where I can change which forms are used to display both the comments and the form itself?

Last edited by joana (2005-09-21 23:20:26)

Offline

#8 2005-09-21 23:46:37

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: [plugin] [ORPHAN] sdr_guestbook v4.0 (as in comp. with 4.0.1)

I don’t have a comment number so maybe that’s part of your current comment form?

You can use the attribute <code>commentform=“CommentFormName”</code> to call your own form for the comments. I don’t think there’s an option to call a different comment entry form.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#9 2005-09-22 01:06:42

joana
Member
Registered: 2005-09-16
Posts: 11

Re: [plugin] [ORPHAN] sdr_guestbook v4.0 (as in comp. with 4.0.1)

> thebombsite wrote:

> I don’t have a comment number so maybe that’s part of your current comment form?

The comments are organized like a list, so I had to edit my css (list-style-type: none;). Tks!

Last edited by joana (2005-09-22 01:15:06)

Offline

#10 2005-09-22 16:53:44

zebreus
New Member
From: Sweden
Registered: 2005-09-16
Posts: 9

Re: [plugin] [ORPHAN] sdr_guestbook v4.0 (as in comp. with 4.0.1)

I get a problem with my page links they are

http://seafarer.mine.nu/gastbok/?page=2

should be

http://seafarer.mine.nu/ola/textpattern/gastbok/?page=2

in the settings for txp the site url is: seafarer.mine.nu/ola/textpattern

What is the problem ?

Last edited by zebreus (2005-09-22 16:54:16)

Offline

#11 2005-09-22 18:54:58

joana
Member
Registered: 2005-09-16
Posts: 11

Re: [plugin] [ORPHAN] sdr_guestbook v4.0 (as in comp. with 4.0.1)

Zebreus, I’m having the same problem!

Offline

#12 2005-09-22 19:15:46

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

Re: [plugin] [ORPHAN] sdr_guestbook v4.0 (as in comp. with 4.0.1)

Zebreus and joana, it seems I’m not using the site url pref. to format the url. I’ll try to post an update asap.

edit: I’ve updated the plugin to incorporate the site url. Download here

Last edited by sderuiter (2005-09-22 19:46:18)

Offline

Board footer

Powered by FluxBB