|
Cookbook /
Bloge-UrlApproveSummary:Approve links one at a time
Version:2009-08-10
Prerequisites: PmWiki 2.2.x
Status: beta
Maintainer: Eemeli Aro
Download: bloge-urlapprove.phpΔ
DescriptionThis 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:
UsageFollow the instructions as on PmWiki.UrlApprovals, except for including this recipe instead of 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. NotesA new page variable The default dependency on AuthUser is known, and may be fixed in a later release. Release notes
See also
ContributorsCommentsCurrently, I have a situation where the blog owner is the only one who has 'edit' permissions; comments from others are enabled, however. I am not using AuthUser, so getting links to work properly requires a bit more. I found part of the way around the problem was changing the way unapproved links are shown in bloge-urlapprove.php, so that 'edit' permissions were sufficent to approve URLs. I set: SDV($UnapprovedLinkFmt, !CondAuth($pagename, 'edit')
? '$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>");
This is not a perfect solution: the blog owner still must approve each page she makes that has links in it, but it works for now. Just wanted to share that here. --Peter Kay
User notes? : If you use, used or reviewed this recipe, you can add your name. The following format is recognized:
* (+) Optional positive comment. Name, date * (-) Optional negative comment. Name, date These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |