TagPages
Questions answered by this recipe
Description
Simple opaque web form for adding categories to a page. Varying levels of security available, but use should be limited to privileged users only.
Notes
Download tagpages.phpΔ and place in pmwiki/cookbook/ folder of your website.
Add to config.php:
include_once("$FarmD/cookbook/tagpages.php");
Optionally add before include line:
$XESTagAuth = 'read';
Default is that edit permission is required to add tags to a page. It's easier than editing the page and adding several [[!Category]] markups to each page. However, if you have read-protected pages you want authorized readers to tag, you may use this line to allow people with read permissions the ability to tag pages. Alternatively you may change it to 'admin' for admin-only tagging abilities, etc.
In-wiki usage example: add to Group/GroupFooter in wiki (change the "if auth" to match the privilege level so only people who can use the form will see it):
(:messages:) (:if auth edit:)(:input form action={*$PageUrl}:) (:input hidden action xestagpages:) Tags: (:input text "Tags" size="40":) (:input submit value="Go":) (:input end:) (:ifend:)
div.category { border: 1px solid #666; padding: 0.5em; background-color: #EEE; }
Release Notes
- 2014-01-29
- No functional changes: added version number, tweaked instructions in script. This recipe has been working alone and with XESBlog since its creation on multiple websites for users with edit privileges.
Future possibilities:
- captcha
- form protections & parsing to allow use by non-privileged users
- could have made category divider configurable, meant to before packing this up....
See Also
- Bundle4Blog
- XESBlog
- live use at http://crisses.org/Poems/All3AprilFool but you're not a privileged user, so you won't see the form. Here's a screenshot:
Contributors
Comments
See discussion at TagPages-Talk
User notes +1: 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.