Wed 1 Sep 2004
Most of us bloggers using D.I.Y. blogging software have implemented some form of a “Recent Comments” hack or plugin. If you are using WP, Nick Momrick of MtDewVirus is the man to go to for that plugin, and you can see it on almost every WP blog out there. Scriptygoddess also has her own version of Nick’s plugin.
However, sometimes we post comments on other blogs that we might think are interesting, but there’s no real way to get those comments on to our blog. It’s too much of a pain to repost the topic, and although you could make a links list of sorts, or a miniblog, or (ack!) hard code some HTML in your index.php file, neither are a real WPer’s solution. WPers don’t want to code HTML, right? We want to enjoy the flexibility of php! So, I thought, wouldn’t it be great to have a plugin that created a list of comments that I posted on other people’s blogs, in the same way that Recent Comments works. I came across unraveled blog by Joshua Kaufman, and saw that he had done exactly what I was thinking, only in MT, and using a novel solution. His plugin is called “Posted Elsewhere”.
What he does is ping himself with a trackback using a standalone trackback tool installed on his server, and then lists those trackbacks in a static page on his blog. But, in WP it would need a little more massaging for my tastes. I wanted a list that appeared on my sidebar and essentially looked like “Recent Comments” but culled only the trackbacks from one post, that would be hidden entirely from the site (I wanted to keep mods to the index.php file to a minimum).
Here’s an overview on how this works:
- You’ve made a comment on somebody’s blog that you want to put in your “Posted Elsewhere” list on your site.
- You pull up a form generated by the Standalone Trackback Tool.
- Fill out a form with the blog name, title of post, excerpt of the comment you’ve made, and the permalink of the post. Hit send.
- This pings a hidden post you’ve created on your blog.
- The “Posted Elsewhere” plugin then takes the trackbacks from that hidden post you’ve pinged, and gives your readers a list of the blogs you’ve commented on, the name of the post and a permalink to the actual post.
So, with absolutely indispensible help from Nick who modified his “Recent Comments” plugin to help this project out, I present for your use the “Posted Elsewhere Implementation”. It is the synthesis of Nick’s plugin, and the Standalone Trackback tool, with a little tutorial by me to explain how the whole things works. Here are the minimum requirements:
A webserver capable of running CGI scripts. You’ll also need Perl, and the following Perl modules:
- File::Spec
- Storable
- CGI
- CGI::Cookie
- LWP
Check your webhost cpanel/vdeck to see if those items are installed on your server.
This tutorial is a little long, but I want to be as detailed for the Super Noobs as possible. Here goes:
FIRST THINGS FIRST:
- Download and install Kitten’s Show Categories plugin. I’ve explained how to do that here.
CREATE AN INVISBLE POST IN WP:
Create a link category and a post within that link category exactly the same way as you would do it for an “About Me” page. It’s too lengthy to repeat here, but the tutorial on how to do that is very easy to follow.
Instead of “About Me”, call the category “Posted Elsewhere Cat”. Take note of the category ID number. You are going to hide this category from showing up in your categories list, as well as prevent any posts in this category from showing up on your main blog page. To learn how to do this, follow the directions in the tutorial above.
Create a blank post called “Posted Elsewhere” and assign it to the category “Posted Elsewhere Cat”. Make it a private post. This prevents it from showing up in “Recent Comments” if you already have that plugin installed as well.
Go to your “Edit” window of your WP control panel, and look for your new “Posted Elsewhere” post. Take note of the post ID number. You will need this for the “Posted Elsewhere” plugin to know which post to draw the hidden trackback info from.
Click on the title of the post, and it will take you to the post itself. Copy the trackback info which will be found right under the line “The URI to TrackBack this entry is:” You will need this later for the Standalone Trackback Tool to know the hidden post you want to ping.
INSTALLATION OF FILES:
Download the Standalone Trackback Tool from the MT website or from my server.
UnZip the trackback tool, and create a folder called “tb” in your main blog folder (like “public_html” or “www” or whatever your webhost uses) and give it “755″ permissions:
Configure the following items found at the beginning of the tb.cgi script to match your server information (also, a very thorough ReadMe is included with the necessary program files):
my $DataDir = "http://www.yourblog.com/tb/tb_data"; my $RSSDir = "http://www.yourblog.com/tb/tb_rss"; my $Password = "PASSWORD"; //you must assign a passwordUpload the following files to the cgi-bin folder on your webserver:
- tb.cgi
- header.txt
- footer.txt
Download Nick’s Comments Posted Elsewhere plugin, upload it to your wp-content/plugins folder, and activate the plugin from your WP control panel.
Add this code to your index.php file:
<li id="postedelsewhere"> < ?php _e('Posted Elsewhere:'); ?> <ul> < ?php get_posted_elsewhere(xxx); ?> < /ul> < /li>Where “xxx” is the post ID of you blank “Posted Elsewhere” post.
Modify your CSS to address the “li id” and you’re done with the installation.
IMPLEMENTATION
The tb.cgi trackback form you need access to ping yourself will look like the link below. Best to make a toolbar bookmark to bring this up easily.
http://www.yourblog.com/cgi-bin/tb.cgi?__mode=send_formThe “Trackback URL” will be in the following format. You’ll need this to ping your hidden post.
http://www.yourblog.com/wp-trackback.php/xxxWhere “xxx” is the post ID of you blank “Posted Elsewhere” post,
So, here’s how you fill out the form:
“Title” = title of the post you commented on,
“Blog name” = name of the blog you made your comment on,
“excerpt” = the excerpt of your comment, and
“Permalink URL” = the permalink of the post you commented on. Sometimes the comments themselves have permalinks, so try that.Hit “Send”, and you will ping your hidden post with the above information. These trackbacks are then culled by the Comments Posted Elsewhere plugin and put in list format on your blog.
If you want to change some of the parameters in the plugin, look for this line:
function get_posted_elsewhere($comment_post_no = -1, $no_comments = 5, $comment_lenth = 15, $before = '<li>', $after = '</li>')If you want more comments to be listed, change the variable
$no_comments(defaut = 5). If you want more words in your comment excerpt, change the variable$comment_lenthThat’s it! Please report any errors you may find.
September 1st, 2004 at 5:55 pm
Comments Posted Elsewhere
It’s been awhile since I’ve released any WordPress plugins or even worked on any for that matter. But today, I’m releasing a new one called Comments Posted Elsewhere. You can find it with all of my other plugins and hacks. The entire idea for this o…
September 1st, 2004 at 8:17 pm
The part about the category isn’t really needed. Since you are making the post private it doesn’t matter what category the post is in, because it will never show up on the blog. You can eliminate the extra plugin and a couple of the steps for creating the invisible post.
September 1st, 2004 at 9:47 pm
But I believe the category will still show up in the “categories” list, yes? I’m trying to avoid that.
September 2nd, 2004 at 7:04 am
So just give it another category, like General for example…doesn’t really matter what category you assign to it since the post will never be displayed anywhere on the blog (private post).
October 13th, 2004 at 11:10 pm
[…] igitus, Finger & Co.) ha elaborado un ⁄til y Gratis » Plugin de WordPress para mostrar los comentarios que haces en otros blogs Says:
October 13th, 2004 at 11:23 pm
[…] pack de plugins, descargable desde aquÌ. Neil (Digitus, Finger & Co.) ha elaborado un tutorial sobre el uso e instalaciÛn del plugin (en inglÈs), que adem·s puedes ver funcionando en su pr […]
December 3rd, 2004 at 11:42 am
Excellent plugin and magnificient tutorial. I have an addition though.
Edit the tb.cgi file, somewhere near the middle is a line, thusly:
within the input tag, then you won’t have to type that in every time you add your elswhere comment to your blog…
December 3rd, 2004 at 12:37 pm
The only reason I didn’t do that is because WP 1.2 Mingus sometimes has problems with trackback, and I was using the standalone tb tool for manual trackback to other sites. But, for those who don’t have that problem, yes, that’s the way to prevent having to re-input that information all the time.
January 21st, 2005 at 3:39 pm
Neil,
I’ve moved the plugin file over the the WP Plugin Repository. Can you update the tutorial?
http://dev.wp-plugins.org/browser/comments-posted-elsewhere/
February 1st, 2005 at 12:56 am
Done.
August 16th, 2005 at 1:14 pm
i’m trying to get the dots template to work with 1.5., but I doesn’t. Can you help. I am missing a bunch of files
August 17th, 2005 at 1:14 am
I’ve been preparing to move to 1.5 soon, but I haven’t had the time to assess how much tweaking I’m going to need to get Dots to work. I may just opt for a true 3-column layout instead. Sorry I can’t be of more help.
September 11th, 2005 at 10:58 pm
In WP1.5 you can set up a page instead of doing the whole post to a hidden category thing - the Kitty plugin to hide the category doesn’t work in 1.5, but the Category Visibility plugin would do the same thing (and other tricks) for anyone who has it set up in WP1.2 and is upgrading.
Now having installed it all, when I ping the trackback uri for my hidden page, I get the response:
Error: I really need an ID for this to work.
Note that the trackback URI syntax is …/wp-trackback.php?p=xxx rather than …/wp-trackback.php/xxx as taken from the displayed trackback URI when viewing the hidden page.
Evidently the tb_id isn’t being passed properly… ideas?
TIA.
September 13th, 2005 at 8:19 am
[…] Es gibt für Wordpress ein eigentlich sehr nettes Plugin "Comments Posted Elsewhere". Es basiert darauf dass man nach dem Absenden des Kommentars an das eigene Blog per Standalone-Trackback einen Ping mit der URL und dem Kommentar sendet. Diese Trackbacks lassen sich dann im eigenen Blog anzeigen (- hier gibt es eine ausführliche Beschreibung). […]
June 14th, 2006 at 6:49 am
Hello ,
I’m Irene Brown and I’m from Template Monster. Not long ago we have launched www.learnPHP.org - free educational resource for web development tutorials.
I came across your Neiluchitel.com site with great WordPress tutorials surfing the Net and googlesearching. We would be grateful if you would give your permission to list them on our site.
As we are going to use Template Monster resources to promote LearnPHP as well as create an educational network of our five educational sites - webdesign.org, tutorialkit.com and flashperfection.com,
markuptutorials.com - this will definitely provide you with additional exposure to a well-targeted audience, which means one thing: MORE TRAFFIC.
As usually we’ll use frame based links to your tuts with removable frame without republishing or copying the content of your tutorials.
Moreover, we provide a direct link to your site from the page where all your tutorials are listed.
In case you are too busy to submit tutorials yourself we’d be glad to do it for you.
In addition, you are welcome to submit your tutorials to other our free educational sites.
Please, let me know what you think about this.
–
Best regards,
Irene Brown
http://www.TemplateMonster.com
Marketing Department
June 20th, 2006 at 1:06 pm
[…] Retrieves a list of comments posted on other sites (with the help of a hidden post and trackbacks). Tutorial […]
August 14th, 2007 at 4:48 am
[…] Retrieves a list of comments posted on other sites (with the help of a hidden post and trackbacks). Tutorial […]