[pmwiki-devel] Adding a markup rule to a group config file

Petko Yotov 5ko at 5ko.fr
Wed May 20 03:41:33 PDT 2020


On 20/05/2020 12:16, Simon wrote:
> I'm wanting to do something like this
> Markup("QBN", "<inline", "/QBN/",
> '%qgrade%Attach:TararuaFootprints.Introduction/QBN.png"Bushcraft and
> Navigation"%%');
> 
> i.e. replace the text with an image
> but clearly it's not quite right because nothing happens?

It appears to work, when I added this to config.php, a text "QBN" in the 
page gets converted to 
%qgrade%Attach:TararuaFootprints.Introduction/QBN.png"Bushcraft and
> Navigation"%% which is then processed by the markup engine, and on my 
> own wiki it shows a link to upload the a QBN file into the 
> TararuaFootprints.Introduction page.

> The replacement text works directly in the page

You didn't elaborate, I guess you want the markup rule to work in a 
single group (hence "group config file"), then the markup rule doesn't 
work in another group.

This is the expected behavior, local/Group.php in only loaded when a 
visitor browses the group "Group". It doesn't matter if any of the 
"Group" pages include content and markup from other groups.

If you want the markup rule to work in other groups, add it to 
config.php instead.

Petko





More information about the pmwiki-devel mailing list