blogroll

This is an old revision of the document!


Blogroll

This plugin lets you manage a database of links from your admin area and maintains a count of how many times each link has been clicked on by reader. When used as a skin variable, it displays a redirector URL in the form of /nucleus/plugins/blogroll/?n=id, or a group of such URLs.

General Plugin info
Current Version: 0.23
Download: Download this plugin
Forum Thread: Discuss on the forum
Author: Joel Pan (ketsugi) (http://www.ketsugi.com)

SkinVars

Parameters: Type, ID, Sort field, Sort order, GroupDesc, NumOfLinks

Type

‘group’ | ‘link’
Tells plugin whether to display an individual link or a group of links as defined in the admin area.

ID

If Type is ‘group’, this should be the name of the group to display. Use the pipe character (’|’) to separate multiple group names. If Type is ‘link’, this should be the numeric ID of the link to display.

Sort field (optional)

order’ | ‘url’ | ‘text’ | ‘desc’ | ‘created’ | ‘clicked’ | ‘counter’
If Type is ‘group’, tells plugin in what order to display links. Defaults to ‘order’, which displays links according to the order defined in admin area. If Type is ‘link’, this field is ignored.

Sort order (optional)

asc’ | ‘desc’
If Type is group, tells plugin whether to display links in ascending or descending order according to the field defined in Sort field. Defaults to ‘asc’.

GroupDesc (optional)

If ID defines multiple groups to display links from, the GroupDesc value will determine what will replace the <%groupdesc%> variable in the blogroll template. If no GroupDesc is specified, the description of the first group will be used.

NumOfLinks (optional)

If Type is group, tells plugin to display only a specified number of links. Must be a positive integer value; if not, plugin will display all links.

Example Usage

  • <%Blogroll(group,blogs)%>: displays the group of links named ‘blogs’
  • <%Blogroll(group,mac,clicked,desc)%>: display the group of links named ‘mac’, from the most clicked to the least clicked
  • <%Blogroll(group,blogs|news|mac,text,desc,Blogroll)%>: displays all links from ‘blogs’, ‘news’ and ‘mac, sorted by text in descending order, and using ‘Blogroll’ as a collective group description
  • <%Blogroll(group,news|mac,random,,News,10)%>: displays 10 random links from ‘news’ and ‘mac’.
  • <%Blogroll(link,5)%>: displays the link for link #5

Template Options

In the plugin options page, you can specify how links will appear on your page. The variables available for use in all fields except ‘Item’ are:

  • <%groupid%>: the group’s internal id number
  • <%groupname%>: the group name
  • <%groupdesc%>: the group’s description

Variables available for use in the item template are:

  • <%linkid%>: the link’s id number
  • <%linkurl%>: the link’s redirector URL as generated by the plugin
  • <%linktext%>: the link text
  • <%linktitle%>: the link’s description
  • <%linkcounter%>: number of times the link has been clicked (not available if redirection is off)
  • <%linkclicked%>: date and time the link was last clicked (not available if redirection is off)
  • <%linkcreated%>: when the link was created

If the <%Blogroll%> skinvar is used to call a single link, the item template will be used to display the link.

Changelog

  • 0.23 (27 April 2005)
    • Added a bookmarklet for adding links.
    • Fixed an issue where after deleting a link, the group link list is displayed twice.
    • Added option for ‘sortfield’ parameter to sort links randomly.
    • Added parameter to display only a specified number of links.
    • Corrected some references to Redirect.
    • Fixed an issue where deleting a group did not also delete the links in that group.
    • Fixed an issue where plugin was making too many SQL queries to display a group of links.
    • Added <%groupid%>, <%linkcreated%> and <%linkclicked%> to templates.
  • 0.20 (22 April 2005)
    • Changed plugin name to NP_Blogroll since redirection is now merely an option.
    • Fixed a bug that caused template for list footer and footer to not be parsed properly.
    • Added option to turn off redirection feature.
    • Added option to call multiple groups of links with a single skinvar call.
    • Removed <%groupid%> from templates.
  • 0.18 (20 April 2005)
    • Added sorting options (sort by order, name, url and asc/desc).
    • Fixed a minor bug that was causing the plugin to not update the counter.
    • Removed skinvar parameter to display only counter (use template to display counter).
  • 0.17 (14 April 2005)
    • Added ability to move a link from one group to another.
    • Fixed bugs preventing changing group order from functioning as intended.
  • 0.16 (14 April 2005)
    • Added ability for grouping links together and to call a group of links from a skinvar.
    • Plugin now uses a template to display a link or group of links.
    • Plugin now keeps separate links for each user.
  • 0.15 (5 April 2005)
    • Plugin will now check client’s user agent against a list of known bots and will not increment the counter if client is a bot.
  • 0.14 (1 April 2005)
    • Added a second parameter for the skinvar to display link counter instead.
  • 0.13 (1 April 2005)
    • Fixed a minor bug in redirect/index.php that was causing the plugin to not update the counter.
  • 0.12 (1 April 2005)
    • Admin page now truncates long URLs for display purposes.
    • Generated link will now use the link text as title attribute if title is not specified. If neither title nor text is specified, no title attribute will be generated.
  • 0.11 (1 April 2005)
    • Fixed a minor bug.
  • 0.10 (1 April 2005)
    • Initial release.

ToDo

  • Allow user to manage links in groups and call a group of links from a single skinvar
  • Allow different users to maintain their own set of links/groups
  • Allow user to call more than one group of links with a single skinvar
  • Allow user to call a random number of links
 
blogroll.1114534489.txt.gz · Last modified: 2005/08/01 11:41 by ketsugi