Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

#121 2008-02-25 22:18:09

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

Re: [archived] sdr_guestbook

How would I create a guestbook using <txp:comments sort=“posted desc” />?? Can you provide me some steps? Also can there be another attribute for number of comments per page?


<txp:Ruhh />

Offline

#122 2008-02-25 22:30:10

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

Re: [archived] sdr_guestbook

Well, the most important difference between regular comments and a guestbook is that in a guestbook the latest comment is on top instead of at the bottom :) So to achieve that you’d only need to adapt the comments tag for one particular article (you can create a separate article form), that can be your guestbook.
But you are right, this plugin was able to paginate comments, and that is not possible using the txp tag. You could have a look at this plugin for paginated comments.

Offline

#123 2008-02-25 23:05:12

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

Re: [archived] sdr_guestbook

So I create a section for the guestbook, create an article with text to be shown above the guestbook, then create a page and put the tag <txp:comments sort=“posted desc” /> in?? I am guessing the article tag and comment form tag is missing or something?


<txp:Ruhh />

Offline

#124 2008-02-26 15:57:05

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

Re: [archived] sdr_guestbook

Well, for example, the default comments_display form looks like this:

<h2 id="<txp:text item="comment" />"><txp:comments_invite textonly="1" showalways="1" showcount="0" /></h2>

<txp:comments />

<txp:if_comments_preview>
<div id="cpreview">
<txp:comments_preview />
</div>
</txp:if_comments_preview>

<txp:if_comments_allowed>
<txp:comments_form isize="25" msgcols="45" msgrows="15" />
<txp:else />
<p><txp:text item="comments_closed" /></p>
</txp:if_comments_allowed>

You could change <txp:comments /> to:

<txp:if_article_id id="123">
<txp:comments sort="posted desc" />
<txp:else />
<txp:comments />
</txp:if_article_id>

Offline

#125 2008-02-26 20:11:26

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

Re: [archived] sdr_guestbook

Uhm, I am confused. :/ Could you provide me all the steps starting from the beginning in order to make a guestbook along with the rah_comments plugin??

Last edited by Ruhh (2008-02-26 20:42:13)


<txp:Ruhh />

Offline

#126 2008-02-26 20:44:38

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

Re: [archived] sdr_guestbook

I only tested the plugin briefly, so if this doesn’t help you, you’d better ask in the support thread for rah_comments.
At the end of your individual article form (so after title, body etc.) put something like this:

<txp:if_comments>
   <txp:if_article_id id="123"><!-- 123 is your guestbook article -->
      <txp:rah_comments wraptag="ol" break="li" limit="10" />
   <txp:else />
      <txp:comments />
   </txp:if_article_id>
</txp:if_comments>

<txp:if_comments_allowed>
   <txp:comments_form />
</txp:if_comments_allowed>

Offline

#127 2008-02-26 20:52:47

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

Re: [archived] sdr_guestbook

What would the modified look like if I was to include the form for a different comment form and the styled comments?

Edit: I think I got this…

<txp:if_comments>
   <txp:if_article_id id="29"><!-- 29 is your guestbook article -->
      <txp:rah_comments wraptag="ol" break="li" limit="10" />
   <txp:else />
      <txp:comments form="questions" />
   </txp:if_article_id>
</txp:if_comments>
<txp:if_comments_allowed>
   <txp:comments_form form="ask_form" />
</txp:if_comments_allowed>

Ok, I tested it out and I get this error:

Tag error: <txp:rah_comments wraptag=“ol” break=“li” limit=“10” /> -> Notice: Undefined variable: pagination on line 71

Last edited by Ruhh (2008-02-26 21:06:53)


<txp:Ruhh />

Offline

#128 2008-02-26 21:39:54

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

Re: [archived] sdr_guestbook

It’s just a notice. If you change production status (in Preferences) to ‘live’ it will go away :)

Offline

#129 2008-02-26 23:19:48

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

Re: [archived] sdr_guestbook

Oh ok. Alright well I just changed the status to Testing.

Will this tag: <txp:comments form=“questions” /> show the form I chose for the styled comments?? I do not think that tag attribute will show the different form for the comments.

Nevermind. I put the attribute in the wrong tag.

But I have a question. I use the sed comment pack plugin. How would I put a Q: before the visitor’s comment and the A: before the author’s comment??

Last edited by Ruhh (2008-02-26 23:42:33)


<txp:Ruhh />

Offline

#130 2008-02-27 00:29:52

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [archived] sdr_guestbook

Yeah, <txp:rah_comments /> can output that error, but only in article list :) I haven’t yet fixed it, as the tag doesn’t even work currently in article list – only on individual article. But that is only because it uses pg as url’s get value, I could change that but then you can’t use clean urls for that by common clean url plugins. Stupid thing if you think it more :P

So, yes it notification and as I told you earlier Ruhh, it’s caused because that tag is printed in article list. It would go off if you add <txp:if_individual_article><txp:rah_comments wraptag="ol" break="li" limit="10" /></txp:if_individual_article> there ;)

Why I originally restricted the plugin to individual article? Because they are comments, but I will fix this in some point. Maybe option to use ?pg= / ?page= would be needed.

Offline

#131 2008-02-27 20:05:45

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

Re: [archived] sdr_guestbook

Ruhh wrote:

How would I put a Q: before the visitor’s comment and the A: before the author’s comment??

The comment is wrapped in a div class="comment commentator-<commentator-name>". Use CSS. You could give .comment a background image (Q) and .author-name (use the real author name!) another background image (A).

For future questions please use the appropriate plugin thread (sed_comment_pack, rah_comments) :)

Last edited by els (2008-02-27 20:06:25)

Offline

#132 2008-03-21 18:57:46

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: [archived] sdr_guestbook

Hello,

I have installed everything and it works allright but i use a form so i can display this the way i want.
in the page section i have this rule :
<txp:sdr_guestbook section=“gastenboek” articletitle=“guestbook” form=“guestbook_comments_form” pagestring_placement=“both” />

the guestbook-comments-form looks like this :

<fieldset> <legend>Geschreven op <txp:sed_comment_time class=‘comment-time’/> door :<comment_name /><txp:sed_if_author_comment_string string=’ (Author Comment)’ /></</legend>
<txp:message />
</fieldset>

But the guestbook is not displayed this way.
Who knows why ?

Regards.

Roelof

Offline

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

Board footer

Powered by FluxBB