Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

#157 2008-04-11 12:38:47

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 805
Website

Re: [archived] sdr_guestbook

I wrapped a <div id="comments"> around the comments part of the code in my single article form.

Els, can you be more specific about this … I don’t understand it … :-(

tag > <txp:sdr_guestbook section="gastenboek" pagelimit="10" articletitle="Schrijf het op!" form="single"/>

form > <div class="article"><h3><txp:title /></h3><txp:body /></div>

HTML > <div class="article"><h3></h3><p></p></div><div class="there-isn't-but-I-want-one!"><p class="small"></p></div>

The last <div> comes from <txp:comment_message /> … I think!

Last edited by RedFox (2008-04-11 12:39:42)

Offline

#158 2008-04-11 14:29:17

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

Re: [archived] sdr_guestbook

Sorry for being unclear, I don’t use this plugin anymore, so I was referring to regular comments (which is not going to help in this case…).

The <div> is in function comments. This plugin uses that function to display the comments using form ‘comments’ (if you did not specify another form with the attribute commentform). So the only thing you have to do is add a <div class="whatever"> in your form ‘comments’.

Default ‘comments’ form:

<txp:comment_message />

<p class="small">— <txp:comment_name /> · <txp:comment_time /> · <txp:comment_permlink>#</txp:comment_permlink></p>

Change that into:

<div class="whatever">
<txp:comment_message />

<p class="small">— <txp:comment_name /> · <txp:comment_time /> · <txp:comment_permlink>#</txp:comment_permlink></p>
</div>

Alternatively, you can wrap the complete <txp:sdr_guestbook /> tag in a <div id="whatever">.

Last edited by els (2008-04-11 14:33:36)

Offline

#159 2008-04-11 15:39:09

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 805
Website

Re: [archived] sdr_guestbook

Hi, Els … thanks for your support.

So the only thing you have to do is add a <div class="whatever"> in your form ‘comments’.

But the result isn’t so nice:

HTML <div class="article"><h3></h3><p></p></div><div class="there-isn't-but-I-want-one!"><div class="there-is-one-but-I-don't-want-it-here!><p class="small"></p></div></div>

Offline

#160 2008-04-11 16:22:01

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

Re: [archived] sdr_guestbook

I’m not sure I’m getting it. I just downloaded this version (that’s the one you’ve got right?) and activated it in a test install, and I only get the <div> around the total comments (so opening <div> before the first one, and closing </div> after the last one). When I look at your page’s source, it’s the same. So there is not a set of <div></div>s inside each single comment.

The easiest way to style the comments in my opinion would be wrapping a <div id="whatever"> around the <txp:sdr_guestbook /> tag.
If you just want to get rid of the <div> (without class), you’ll probably have to hack function comments in taghandlers.php.

Last edited by els (2008-04-11 16:24:57)

Offline

#161 2008-04-11 17:19:58

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 805
Website

Re: [archived] sdr_guestbook

Sorry I’m confusing you … but the thing is that the <div>(without class) is after a <div> with a class (article) … and so I can’t style the included <p> in the <div>(without class) different than the <p> in the <div>(class=“article”) one!

Oh boy … it IS confusing!

Last edited by RedFox (2008-04-11 18:17:40)

Offline

#162 2008-04-11 17:41:14

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

Re: [archived] sdr_guestbook

As far as I can see your <div class="article"> is closed before the first comment…
So if you wrap a <div id="comments"> around the plugin tag, you could style first

#comments p

and after that

#comments .article p

Or, another possibility, wrap the <txp:comment_message /> in the ‘comments’ form in a div, so you would get

<div class="message"><p>message</p></div>

Offline

#163 2008-04-11 18:49:26

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 805
Website

Re: [archived] sdr_guestbook

Yes, you’re right about the <div class=“article”) is before the comments <div>. But should I put a <div class=“comments”> around the comment form then there still will be a(n extra) <div> with no meaning at all.

With your help I suddenly saw a possibility to style the comment <div> and included <p>‘s, just by using the power of css cascading … so the <div> (without class) does get a (little) meaning. It’s so obvious … I was glossing over it all the time!

Surely I first have to style the comment <div> and <p>‘s and then secondly I have to (re)style the <div class=“article”> and included <p> … it’s so simple … it’s almost embarrassing!

Thanks Els!

Last edited by RedFox (2008-04-11 18:49:47)

Offline

#164 2008-04-17 17:11:09

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 805
Website

Re: [archived] sdr_guestbook

After upgrading to TXP 4.0.6 the plug-in (4.0 sed) doesn’t work correctly any more … !? Is this true?

What is the alternative? Using rah_comments … or is there another (working) method?

Offline

#165 2008-04-17 22:59:00

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

Re: [archived] sdr_guestbook

It seems to be working in my local test install. And I think Roelof has it working on a 4.0.6 install.
But sdr_guestbook was developed for a very early version of TXP, and I think it’s only a matter of time before it will stop working altogether. It’s not supported anymore, and it doesn’t look like someone is interested to adopt it.
So before I dumped my guestbook altogether I switched to using regular comments, because one of the two features of this plugin, being able to sort comments descending, has now been added to the core. The other one, pagination, not yet, but at the time I did not have so many entries in my guestbook that I really needed pagination ;) And if you do need it, there is now rah_comments that can do it. I think it would be a good alternative.

Offline

#166 2008-04-18 04:38:39

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 805
Website

Re: [archived] sdr_guestbook

Thanks Els! When I put TXP in ‘Live’ mode everything is working fine. But yes, it seems I must spend some time, now or in the nearby future, to use the regular comments with rah_comments

Offline

#167 2008-09-18 10:03:36

xzamen
Member
Registered: 2007-02-12
Posts: 18

Re: [archived] sdr_guestbook

Hello! The original version of plugin was not displaying comments for me. It just displayed ordered list items and whatever else was in the comment form, but not the content of <txp:comment_message /> (which was weired). I installed the mod version and comments show up fine, but now I don’t like the structure. Actually there is no structure. Comments just go wrapped in <p>. I like the idea of ordered list, how do I get it back? I guess something should be changed in the plugin code, right?
Thank you in advance for any help.

Offline

#168 2008-09-18 10:49:39

xzamen
Member
Registered: 2007-02-12
Posts: 18

Re: [archived] sdr_guestbook

I just discovered that the mod version generates completely weired pagination links. The original version doesn’t have such problem. So can someone tell me how to make <txp:comment_message /> work with the original version of the plugin?

Offline

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

Board footer

Powered by FluxBB