Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
This recipe is secure because it only allows authors to reference bookmarklets which are predefined in your config.php or farmconfig.php file. There are 2 examples here. This code is customized for PMWiki actions.
# This is config.php code using InterMap links:
# allow PMWiki action bookmarklet links
$LinkFunctions['action:'] = 'LinkIMap';
$IMap['action:'] = '$1';
$IMapLinkFmt['action:'] =
"<a href='javascript:location.href+=\"?action=\$LinkUrl\"'>\$LinkText</a>";
This code is customized for a single bookmarklet link.
# This is config.php code using Markup alone:
# create custom bookmarklet link
Markup('pmwikiedit', 'directives', '/\\(:pmwikiedit:\\)/',
Keep("<a href='javascript:location.href+=\"?action=edit\"'>Edit</a>"));
This program is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation http://www.fsf.org either version 2 of the License, or (at your option) any later version. Copyright 2007 by GNUZoo (guru@gnuzoo.org) Please donate to the author at url: http://gnuzoo.org/GNUZooPayPal |
0: 00.00 00.00 config start 1: 00.00 00.00 config end 2: 00.09 00.06 MarkupToHTML begin 3: 00.10 00.07 MarkupToHTML begin 4: 00.12 00.09 MarkupToHTML end 5: 00.12 00.09 MarkupToHTML begin 6: 00.12 00.09 MarkupToHTML end 7: 00.14 00.11 ReadApprovedUrls SiteAdmin.ApprovedUrls begin 8: 00.15 00.12 ReadApprovedUrls SiteAdmin.ApprovedUrls end 9: 00.18 00.14 MarkupToHTML end 10: 00.19 00.16 MarkupToHTML begin 11: 00.23 00.20 MarkupToHTML end 12: 00.24 00.20 MarkupToHTML begin 13: 00.25 00.21 MarkupToHTML end 14: 00.26 00.22 now