Plugin overview
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.
SkinVars
Parameters: Type, ID, Sort field, Sort order, GroupDesc, NumOfLinks, Redirect
- Type - 'group' | 'link' | 'user'
- Tells plugin whether to display an individual link or a group of links as defined in the admin area, or a single user's links.
- ID
- If Type is 'group', this should be the name of the group(s) 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. If Type is 'user', this should be the short name (login name) of the user whose blogroll should be displayed. If the user specified is not a member of the team for the blog being displayed, the blogroll will not be shown.
- Sort field (optional) - 'order' | 'url' | 'text' | 'desc' | 'created' | 'clicked' | 'counter' | 'random'
- 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', place the Redirect value here.
- 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.
- Redirect (optional)
- Set to "yes" or "no" to override the default as set in Blogroll's plugin options to determine whether to show the redirector URL or the regular URL.
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 recently clicked to the least recently clicked
<%Blogroll(group,blogs|news|mac,text,desc,Blogroll)%>
: displays 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,yes)%>
: displays the link for link #5, displaying the redirector URL even if the plugin option is set to "no".
<%Blogroll(user,johndoe)%>
: displays all groups and links for the member with short name "johndoe".
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:
<%id%>
: the link's id number
<%linkurl%>
: the link's redirector URL as generated by the plugin
<%linktitle%>
: the link's description
<%linktext%>
: the link text
<%linkcounter%>
: number of times the link has been clicked (not available if redirection is off)
<%linkcomment%>
: user comment of a link
<%linkdesc%>
: description of a link
<%linkdesccomm%>
: show link description, show comment instead if description not available
<%sep%>
: seperator (i.e. '-')
<%linkedit%>
: link to edit an item
<%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.
Note: <%linktext%> has been removed.
Tagging Support
Since 0.35, tagging function is added. The blogroll function continues to function as before. On the other hand, there is a tag field when add/edit a link.
To integrate the tagging function with the blog, a tagcloud can be created:
- clone the skin you use on the blog
- rename it to 'blogroll'
- edit the main index in the blogroll skin, replace the <%blog(...)%> to <%Blogroll(tagcloudresult%>, and
replace the sidebar line (i.e. <%parsedinclude(sidebar.inc)%>) to <%Blogroll(tagcloud,group)%> (replace group with your blogroll group name)
- create a blogroll.php (see a sample in package) and place it in your blog's root directory
- link to the blogroll page from your blog's sidebar
- add css changes to decorate the tagcloud (see smaple in package)
There are 2 new skinvar added to be used in a tagcloud Blogroll page:
- <%Blogroll(tagcloud,[group]%> - to display a tagcloud for a particular group
- <%Blogroll(tagcloudresult)%> - display all links for a tag (select from the tagcloud)
del.icoc.us Support
Since v0.36, user can send blogroll links to del.icoc.us. To enable this function:
- Enable del.icoc.us function from plugin option after installing the plugin
- User set their del.icoc.us user and password in member setting
Support and Bug reports
For additional support and/or bug reports please use this forum thread:
http://forum.nucleuscms.org/viewtopic.php?t=9219
Version History
- 0.39 (May 9 2007) admun (Edmond Hui)
- Fixed PluginAdmin inclusion in bookmarklet and links.php
- Fixed " in query Mysql update error
- Seperate CSS decoration with NP_TechnoratiTags
- Add redirection after edit link from blogroll page
- 0.38 (12 April 2007) admun (Edmond Hui)
- Fixed incorrect delete link result handling from managetag
- Added lgroup id fot list header
- 0.37 (18 March 2007) admun (Edmond Hui)
- Added tagcloud decoration
- Fixed admin tag menu functions
- Fixed utf-8 support
- Added rename/delete tag (currently not fully working, delete tag rename it to "deleted".... still finding a way to do that
- Added replace "+" with " " plugin option
- Added show #links without tag at the end of managelinks
- Fixed no delete/rename tag after edit in managetag
- Fixed missing tag/comment when error in bookmarklet
- 0.36 (8 March 2007) admun (Edmond Hui)
- Option for tagcloudresult header
- Fixed tagcloud result list only to group specified
- Fixed getTableList() bug
- Added template options for tagcloud link display
- Added tagcloud link click count
- del.icio.us support
- 0.35 (March 2007) admun (Edmond Hui)
- Initial release with tagging function
- 0.30 (4 March 2006)
- Added option to display a single user's blogroll.
- Admin area for managing links now shows current group.
- 0.27 (27 October 2005)
- Added redirector option for skin variable.
- Fixed bug in groups.php that led to potential HTTP 405 error.
- Fixed bug in bookmarklet URL that screwed up non-English document titles.
- 0.25 (30 April 2005)
- Changed output of skinvar to encode HTML entities for standards compliance.
- Changed skinvar behaviour to let groupdesc parameter override
db-set groupdesc for single-group skinvar calls.
- Fixed an issue where text/titles in edit forms (index.php) and add
forms (bookmarklet.php) were showing backslash-escaped text.
- Fixed an issue where sorting by counter was not working.
- 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
- 0.11 (1 April 2005)
- 0.10 (1 April 2005)
License Information
Copyright © 2005 Joel Pan