type in your query to search makeyougohmm
Things that ... make you go hmmtechnology music video art news reviews and muse on the web

July 31, 2003

Adding standalone trackback to your (Pivot) weblog

How To — by TDavid @ 11:40 am PST
New! F = please no more posts like thisD = not among your best stuffC = average postB = good post, I liked itA = great post, please create more like this (Hmm, no ratings yet)
Loading ... Loading ...

Wonder what all this trackback stuff is about on some blogs (those in movable type mostly)? I did. Fortunately there are nice folks like Kim that offer a good group of links here and also a nice example by Tom Coates with visuals. If you aren’t using movable type (like me) then you might consider checking out the standalone trackback.

So here is how, in detail, I added trackback to Pivot

Important: make sure to check with your host that you have the required Perl modules included. The instructions from MT say that the script author thought that the Storable module was included in the default perl 5.05 but it wasn’t in the debian package on my dedicated box so my perl install needed Storable as well as LWP in order for the trackback program to work properly. Here are the perl modules to ask your host about:

You’ll need a webserver capable of running CGI scripts (this means, for example, that this won’t work with BlogSpot-hosted blogs). You’ll also need perl, and the following Perl modules (remember, without these modules the program will not work):

File: Spec
* Storable
CGI
CGI Cookie
* LWP

* I needed to install these 

Step 1. download the trackback gzip tar file. For those who don’t know how to uncompress and untar a file, I’ll get into that shortly.
Step 2. FTP the downloaded file into your CGI-BIN.
Step 3. telnet or ssh to your server and change the directory to the location of the file you just FTP’d in step 2: tb-standalone.tar.gz. The command to change directory is cd, so if your absolute directory path was /home/sites/www/mydomain/cgi-bin you’d type:

cd /home/sites/www/mydomain/cgi-bin

Step 4. gunzip the tb-standalone file by typing:

gunzip tb-standalone.tar.gz

Step 5. untar the file. This will create a directory structure inside the cgi-bin with all the untarred files. To do this, type:

tar -xvf tb-standalone.tar

Step 6. Now that you have the directory created and the files unzipped and untarred, you can edit the tb.cgi file according to the instructions in the included README (open with any text editor) or by following the instructions here
Step 7. After editing the tb.cgi file it’s time to edit Pivot according to the instructions that say: First, you’ll need to add a link to each of your weblog entries with a link to the list of TrackBack pings for that entry.

Pivot v0.12: in the admin area edit the template file named shortentry.html, make the following changes. After comments add the trackback code listed in the README replacing [TRACKBACK ID] with %code% and yourserver with your domain.

Pivot v1.0 (Jazz beta): in the admin area edit the template file named log_entry_standard.html

Step 8. Next in the same shortentry.html template you need to add the RDF code per the README instructions: TrackBack uses RDF embedded within your web page to auto-discover. TrackBack-enabled entries on your pages. It also uses this information when building a threaded list of a cross-weblog “discussion”. For these purposes, it is useful to embed the RDF into your page.  Make the following substitutions:

* Pivot v0.12

TrackBack ID = “http://YOURDOMAIN/*link*”
Entry Title = “%title%”
Entry Permalink = “http://YOURDOMAIN/*link*”

*Pivot v1.0 Jazz Beta

Instead of % use [[ and ]] like this [[ code ]], the name is the same inside the brackets (code, link, etc)

Note: replace * with % in link (not shown here because Pivot would convert it into the actual link)

Step 9. Next, you will need to regenerate your templates using the option: Generate Files. Once you do, go view the source of your blog to see that trackback is showing up after your comments and that the proper blog ID is being displayed when you click the TrackBack link. If you get a server 500 error, then check to make sure the permissions of tb.cgi are set to 755.
Step 10. Now it’s time to test pinging another trackback. To do this you need to go to the following url: yourdomain.com/cgi-bin/tb.cgi?__mode=send_form and fill out the form. If you get a server 500 error then it is possible that the Perl LWP module is not installed on your server, so contact your host and ask them to add that for you.

Update: those looking to start their own PHP implementation of trackback might find Jannis Hermanns efforts a good place to start. Also, I added some information on making this compatible with Pivot Beta 1.0 jazz as well as making sure that the right Perl modules are installed on the server where the trackback script will be installed.

Happy coding to you!

Related Posts

RSS Feed comments for this post No Comments »

Did this make you go hmm?
TrackBack URI: http://www.makeyougohmm.com/20030731/138/trackback/

Leave a comment


By leaving a comment you consent to the Official Hmm Comment Policy

Return Home


Copyright 2003-2008 KMR Enterprises All Rights Reserved