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.

Here's the code I wrote:

<?php if (!defined('PmWiki')) exit();

#
--------------------------------------------------------------------------------------------------
# Page Action markup
#
--------------------------------------------------------------------------------------------------
#
# When a page is opened, apply the action specified by the (:pageaction
myaction:) markup

$RecipeInfo['PageAction']['Version'] = '2010-09-01';

# Catch all text between (:pageaction and :) and call PageAction

Markup ('PageAction', 'directives', '/\\(:pageaction\\s+(.+?)\\s*:\\)/ei',
"PageAction ('$1')");

# Change the page action when the page is opened

function PageAction ($text) {
  global $action;
  if ($action == 'browse') $action = $text;
}

?>
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to