[pmwiki-users] PageTextVariables and Spaces

Hans design5 at softflow.co.uk
Tue Oct 30 07:30:58 CDT 2007


I tried Markup Expressions:
defined
$MarkupExpr['nospaces'] = 'preg_replace("/\\s/", "", $args[0])';

and use in the template
{Members.{(nospaces "{$$author}")}$:info}

This works, but fails in conditional markup. I am using conditional
markup to check if the PTV exists. Like:
(:if !equal {Members.{$$author}$:email} "":) .....

Well, I can abandon the conditional test and insert the PTV anyway.
If it is not there, nothing will show. I just have to do the link
formatting on the Profiles page, like
(:email:[[mailto:name at example.com|email]]:)
(:www:[[http://www.example.com|www]]:)

This is actually not so bad, as the email address can get scrambled by
the e-protect recipe, so it becomes in the page:
(:email:[[hidden-email:tbeqba at rknzcyr.pbz|email]]:)

So, another FoxForum update on the way later today.....

  ~Hans




More information about the pmwiki-users mailing list