OK, so I have attempted to create a (:pageaction :) markup element, but I can't make it work. I'm enough of a noob to not understand what the problem is. I know that PageAction is being called because I stuck some debug strings in there and they were being displayed on the page. It just appears that setting the action to text is not working properly.<br>
<br>Here's the code I wrote:<br><br><?php if (!defined('PmWiki')) exit();<br><br># --------------------------------------------------------------------------------------------------<br># Page Action markup<br>
# --------------------------------------------------------------------------------------------------<br>#<br># When a page is opened, apply the action specified by the (:pageaction myaction:) markup<br><br>$RecipeInfo['PageAction']['Version'] = '2010-09-01';<br>
<br># Catch all text between (:pageaction and :) and call PageAction<br><br>Markup ('PageAction', 'directives', '/\\(:pageaction\\s+(.+?)\\s*:\\)/ei', "PageAction ('$1')");<br><br>
# Change the page action when the page is opened<br><br>function PageAction ($text) {<br> global $action;<br> if ($action == 'browse') $action = $text;<br>}<br><br>?><br><br>