Page 1 of 1

comments plugin: Display the title of trackbacks

Posted: Sat Jan 21, 2006 8:00 am
by Josh
The comments plugin displays the first sentences of each trackback on the frontpage of my second blog: http://germany-usa.atlanticreview.org/ (Still under construction)

How can I get the comments-plugin to also show the title of the trackbacks in the list of recent comments (here called "latest submissions") on my front page?

I guess, I have to change this code in serendipity_plugin_comments.php, but I don't know how.

Code: Select all

   printf(
                  PLUGIN_COMMENTS_ABOUT,

                  $user,
                  ' <a class="highlight" href="' . serendipity_archiveURL($row['entry_id'], $row['subject'], 'baseURL', true, array('timestamp' => $row['entrystamp'])) .'#c' . $row['comment_id'] . '" title="' . htmlspecialchars($row['subject']) . '">'
                      . htmlspecialchars($row['subject'])
                      . '</a><br />' . "\n"
                      . htmlspecialchars(serendipity_strftime($dateformat, $row['stamp'])) . '<br />' . "\n"
                      . strip_tags($entry['comment'], '<br><img>')
                      . '<br /><br /><br />' . "\n\n"
                );

Re: comments plugin: Display the title of trackbacks

Posted: Sat Jan 21, 2006 1:35 pm
by garvinhicking
Hm, but the title ("subject") that the blog submits is already shown there? I'm not really sure how you would want it to look like?

Best regards,
Garvin

Posted: Sat Jan 21, 2006 8:19 pm
by Josh
So far the title of my blog post is shown. I would like to have the title of the other blog post shown.

Let me try to explain: Let's say my blog is called ABC and I wrote a post with the title DEF.

Your blog is called 123 and you write a post with the title 456. In this post you quote my post. I now receive a trackback.

So far the trackback is shown like this: "123 about DEF."

I would like to have the trackback shown this way: "123 submits 456."

It sounds weird, but I believe it makes sense for displaying the recent submissions of a blog carnival...

Posted: Sun Jan 22, 2006 1:16 am
by garvinhicking
Ah, okay. You can replace $row['subject'] with $row['comment_title'] and then you see the subject of the foreign blog in the output. Does that help?

Best regards,
Garvin

Posted: Sun Jan 22, 2006 8:40 am
by Josh
Yes, that helps!

Thank you, Garvin.