Bloge-UrlApprove
Description
This is a wrapper for PmWiki's default UrlApprovals that adds the possibility to approve links one at a time rather than all at once for a full page.
Bloge-UrlApprove is a part of Cookbook.Bloge, but may also be used as a standalone recipe.
To install this recipe:
- download bloge-urlapprove.phpΔ to your cookbook directory
- add the following line to your configuration file:
include_once("$FarmD/cookbook/bloge-urlapprove.php");
Usage
Follow the instructions as on PmWiki.UrlApprovals, except for including this recipe instead of urlapprove.php
as shown above. With Bloge-UrlApprove, the default value of $UnapprovedLinkFmt
is also different:
SDV($UnapprovedLinkFmt, empty($AuthId) ? '$LinkText' : "<u>\$LinkText</u> <a class='apprlink' rel='nofollow' href='\$LinkUrl' title='$[Unapproved link]'>($[test])</a> <a class='apprlink' rel='nofollow' href='{\$PageUrl}?action=approvelink&link=\$LinkUrl' title='$[Approve link]'>($[url ok])</a> <a class='apprlink' rel='nofollow' href='{\$PageUrl}?action=approvelinksite&link=\$LinkUrl' title='$[Approve site]'>($[site ok])</a>");
In other words, links are shown as text only if the user isn't logged in using AuthUser and if logged in, links are provided to test and approve the link. Set this as required in your configuration file before including the recipe.
Notes
A new page variable {$LinksToApprove}
is also provided, containing the number of unapproved links on the current page. This includes links in sidebars and other page elements.
The default dependency on AuthUser is known, and may be fixed in a later release.
Release notes
- 2009-08-10Δ — first public release
See also
- Bloge — A bundle of blogging
- UrlApprovals — Require approval of Url links
Contributors
Comments
See discussion at Bloge-UrlApprove-Talk
User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.