The Serendipity Handbook

You can now read the (german) handbook here: PDF - https://github.com/s9y/Book (LaTeX source).

Forum-Information

Before posting about errors, make sure that the answer cannot already be found in our FAQ or by searching this forum!
Posting is restricted to registered users (registering is free and simple!) due to recent spam attacks. When having trouble with this board, contact garvin(-at)s9y(-dot)org.

Board index Themes Reference comments to their origin

Skinning and designing Serendipity (CSS, HTML, Smarty)
User avatar
yellowled
Regular
 
Posts: 4884
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany

Postby yellowled » Tue May 29, 2012 8:27 pm

When using threaded comments in a blog, it can get messy. Especially if a lot of comments are posted within a short period of time, the comment thread gets really cluttered. It becomes difficult to follow which comment refers to which comment.

In s9y blogs, we do have a point of reference: our comment form usually includes a select box – {$commentform_replyTo} –, which basically provides the ability to reply to another comment.

Is this value ("comment, to which this comment is a reply") still accessible for comments already posted? I.e., is there a smarty variable which I could use to reference comments to their origin? Or is this just a temporary construct to get the proper nesting level for threaded comments?

YL

User avatar
onli
Regular
 
Posts: 1044
Joined: Tue Sep 09, 2008 10:04 pm

Postby onli » Wed May 30, 2012 8:59 pm

It's definitely part of the database and of the comment-structure. So there should be a variable, the code suggests it is comment.parent_id (we need a doku of such stuff! Is that part of the book?). I guess the fastest way to confirm that info is to print the content of the variable.

User avatar
yellowled
Regular
 
Posts: 4884
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany

Postby yellowled » Thu May 31, 2012 10:46 am

onli wrote:comment.parent_id (we need a doku of such stuff! Is that part of the book?)

Yay, that … well, I wouldn't say it works, but it holds the info I need to build something that works. :wink: Thanks.

According to the book, it should be $comment.X.parent_id. I'm sure it's also somewhere on s9y.org, but, frankly, asking here is just more convenient than searching the book. We should get that thing online asap.

YL



Return to Themes

Who is online

Users browsing this forum: No registered users and 1 guest