comments plugin: Display the title of trackbacks

Creating and modifying plugins.
Post Reply
Josh
Regular
Posts: 110
Joined: Mon Jul 18, 2005 3:02 pm
Location: Berlin
Contact:

comments plugin: Display the title of trackbacks

Post 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"
                );
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: comments plugin: Display the title of trackbacks

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Josh
Regular
Posts: 110
Joined: Mon Jul 18, 2005 3:02 pm
Location: Berlin
Contact:

Post 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...
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Josh
Regular
Posts: 110
Joined: Mon Jul 18, 2005 3:02 pm
Location: Berlin
Contact:

Post by Josh »

Yes, that helps!

Thank you, Garvin.
Post Reply