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

0 views
Skip to first unread message

Simon

unread,
May 20, 2020, 6:17:55 AM5/20/20
to PmWiki Devel Mailing List
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?
I've also tried "<split" and "fulltext".

The replacement text works directly in the page

Any suggestions?

tia

Simon

Petko Yotov

unread,
May 20, 2020, 6:42:20 AM5/20/20
to Simon, PmWiki Devel Mailing List
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



_______________________________________________
pmwiki-devel mailing list
pmwiki...@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel

Simon

unread,
May 20, 2020, 5:00:38 PM5/20/20
to Petko Yotov, PmWiki Devel Mailing List
Oh gosh, thankyou so much.
It helps a lot if you have the correct capitalisation in the group config file, duh

I do like the way you can replace markup with more markup, very handy.

Simon
Reply all
Reply to author
Forward
0 new messages