MT Blogroll 2.12 Manual
Extract the distribution and preserve the directories. The directories that have been extracted correspond to the directories in your Movable Type installation. Upload these directories to your Movable Type installation such that file structure looks like so:
MT_DIR/ |__ plugins/ | \__ Blogroll/ | |__ Blogroll.pl | |__ mt-blogroll.cgi | |__ update-links.cgi | | | \__ lib/ | | \__ Blogroll/ | | | |__ Blogroll.pm | | | |__ Category.pm | | | |__ Links.pm | | | |__ Placement.pm | | | |__ Update.pm | | \__ URI/ | | | |__ Escape.pm | | | |__ Title.pm | | | \__ schemas/ | | |__ Blogroll_schema.mysql | | |__ Blogroll_schema.postgres | | |__ Blogroll_schema.sqlite | | | \__ tmpl/ | | |__ (18 .tmpl files) | |__ php/ | \__ plugins/ | |__ (18 .php files)
Set the permissions of
755and if the plugin was successfully installed, you should see something similar to this on the
Enter the following into your address bar changing it as appropriate for your website and Movable Type installation
On doing so, you will be greeted by the MT Blogroll Installation screen. Simply follow the instructions to install MT Blogroll. If the installing/upgrading screen appears to hang, empty your browser's cache. Recommended browser: Mozilla Firefox
Each blog in Movable Type is given its own individual blogroll. To access a blog's blogroll, go to its Menu and under
Plugin Actions click
Edit My Blogroll
Clicking this link will take you to a screen that looks similar to:
As you can see, the screen closely resembles Movable Type. Actions available in MT Blogroll are listed along the left hand side — Add a link, Import OPML etc.
You can switch between blogrolls using the drop down menu at the top.
At any time, you can click the
Back To Blog link to return to Movable Type.
To configure the gathering of last update times for blogs on your blogroll, go to the
Plugins listing in
System Overview and click
Show Settings for MT Blogroll. You will see a screen similar to
To have MT Blogroll get the last update times:
- Check the
Enablebox which will cause further settings to appear.
- Chose a
Duration. The value of this field will be used to evaluate the
MTBlogrollEntryIfUpdatedtag - the tag compares the time of rebuild to the link's last update time and if the difference is within the duration selected, the tag is evaluated as true.
- Enter your Technorati API Key. One can be obtained here
You will need to periodically run the
update-links.cgiscript found in the MT Blogroll folder. The easiest way to do this is via a cron job. You can use the following command and set it at intervals that correspond to the duration you selected.
cd /full/path/to/MT_DIR; ./plugins/Blogroll/update-links.cgi
MTBlogrollEntryIfUpdated tag compares the time of rebuild to the link's last update time and if the difference is within the duration selected, the tag is evaluated as true. If you statically publish, this tag will only be evaluated at the time of rebuilding. As a result, if you want real-time checking, you'll need to use dynamic publishing.
However, you only need to create one dynamic template with the blogroll code in there and you can include that template into your static template using the following code (this template will need to be a PHP template - i.e. have a
<?php include('<$MTCGIServerPath$>/php/mt.php'); $mt = new MT(<$MTBlogID$>, '<$MTConfigFile$>'); $mt->display("mt:templateid"); ?>
templateid is the ID of the dynamic template. For example, if my dynamic template had an ID of 35, I would use this code
<?php include('<$MTCGIServerPath$>/php/mt.php'); $mt = new MT(<$MTBlogID$>, '<$MTConfigFile$>'); $mt->display("mt:35"); ?>
The following template tags are available and need to be used in your templates to display your blogroll. These template tags can be used in both static and dynamic templates.
<MTBlogrollEntries> ... </MTBlogrollEntries>
A container tag representing all the links in your Blogroll. The default is to display all links sorted ascending by priority. To alter this behavior, you can provide one of the following attributes:
blog_id="X"— Display the blogroll assigned to blog
blog_idof the appropriate blog.
lastn="N"— Display the last
Nlinks (according to
Nis some number greater than
Mlinks from the first (according to
sort_bybelow), then displays the remaining links (or the next
Nlinks if used in combination with lastn). For example, the following tag:
<MTBlogrollEntries lastn="5" offset="5"> ... </MTBlogrollEntries>
category="C"— Display all posts from the category with name
C. Note that this can result in a long list of links, and you may want to use
lastnto only display a certain number of links.
If you wish to pull links from several categories, or to restrict links to those that are assigned to several categories, category name can include boolean
ORlogic. Note that it can only include one or the other, however, so you cannot say
Foo AND Bar OR Baz—that will not work. You can only say
Foo AND Bar AND ...or
Foo OR Bar OR ....
For example, if you wished to list all links assigned to both Foo and Bar you could use:
<MTBlogrollEntries category="Foo AND Bar"> ... </MTBlogrollEntries>
author="A"— Display all links created by by the author with username
A. Note that this result in a long list of links, and you may want to use
lastnto only display a certain number of links.
sort_order="ascend|descend"— Specifies the sort order for this particular
<MTBlogrollEntries>tag. Valid values are
descend. The default value is
sort_by="field name"— Specifies the field by which to sort. Valid values are
Attributes of `MTBlogrollEntries` can be combined in arbitrary ways, for example:
<MTBlogrollEntries lastn="10" offset="10" category="foo" sort_order="ascend" sort_by="name"> ... </MTBlogrollEntries>
Each link in MT Blogroll is given a unique ID. This tag displays the ID of the link.
A link's URI.
A link's name or title.
The name of the person who authors the link
A link's description
MT Blogroll allows you to define an XFN Relationship for each link. This tag can be used to display this relationship. Typically it will be used within an anchor tag like so
<a href="<MTBlogrollEntryURI>" rel="<MTBlogrollEntryRel>">...</a>
Not all your links may have an XFN Relationship hence you may find that some of your
rel attributes are empty and as a result your pages no longer validate. This tag comes to the rescue, a conditional container tag that will display its contents only if the link has an XFN Relationship. Typical usage:
A link's priority
The date the link was created. This tag can take the optional
language attributes as described here
The date the link was last modified within MT Blogroll, not to be confused with
MTBlogrollEntryUpdated which displays the time the link was last updated.
This tag can take the optional
language attributes as described here
The name of a link’s primary category
A container tag representing a list of all of the categories - including the primary category - to which the link belongs. Inside of this container you can use any of the
MTBlogrollCategory tags to display information about each category.
You can supply this tag with the
glue attribute to separate each of the categories, for example, to separate categories with a comma:
<MTBlogrollEntryCategories glue=", "> ... </MTBlogrollEntryCategories>
Note: that the value of the
glue attribute cannot contain a single or double quote.
A link’s target
The time a link was last updated from Technorati. Note: MT Blogroll must be setup to gather last update times for this tag to work.
A conditional container tag: the contents of this container will be displayed if this link has an update time that is within the duration constraint specified in the configuration.
This can be useful for manipulating recently updated links, for example the following code block will display
*NEW* next to links that have been recently updated
A container tag that represent all link categories in your blogroll. You can use any of the
MTBlogrollCategory tags within this container to display information about your Link Categories.
You can also use
MTBlogrollEntry tags to display links within each Link Category:
<MTBlogrollCategories> <MTBlogrollEntries> .. </MTBlogrollEntries> </MTBlogrollCategories>
The name of the category
The description of the category
Here are a few examples of how to use the template tags.
This code block will list all links in your blogroll with its description. The time the blog was last updated can be viewed up hovering over a link:
<MTBlogrollEntries> <p><a href="<MTBlogrollEntryURI>" <MTBlogrollEntryIfRel>rel="<MTBlogrollEntryRel>"</MTBlogrollEntryIfRel> target="<MTBlogrollEntryTarget>" title="Last Updated: <MTBlogrollEntryUpdated>"><MTBlogrollEntryName></a><br /> <MTBlogrollEntryDesc></p> </MTBlogrollEntries>
This code block will go through each Link Category and list the links in the category along with its description. The time the blog was last updated can be viewed up hovering over a link:
<MTBlogrollCategories> <h4><MTBlogrollCategoryLabel></h4> <MTBlogrollEntries> <p><a href="<MTBlogrollEntryURI>" <MTBlogrollEntryIfRel>rel="<MTBlogrollEntryRel>"</MTBlogrollEntryIfRel> target="<MTBlogrollEntryTarget>" title="Last Updated: <MTBlogrollEntryUpdated>"><MTBlogrollEntryName></a><br /> <MTBlogrollEntryDesc></p> </MTBlogrollEntries> </MTBlogrollCategories>
Note: This will only work if you have created Link Categories and assigned links to them