[pmwiki-users] $PubDirUrl and $FarmPubDirUrl in recipes

Hans design5 at softflow.co.uk
Sat Nov 10 13:36:30 CST 2007

Saturday, November 10, 2007, 5:15:19 PM, Patrick R. Michaud wrote:

>   SDV($WSPlusUrl,
>     (substr(__FILE__, 0, strlen($FarmD)) == $FarmD)
>     ? '$FarmPubDirUrl/wsplus' : '$PubDirUrl/wsplus');

> Note that both of the above use single quotes when initializing
> the variable.  Then $FarmPubDirUrl/$PubDirUrl are substituted into
> a generated string (via FmtPageName) when the url is actually 
> needed in the output.

so I need to use FmtPageName on any string with $RecipeNameUrl?

how about this, it seems to work:

    (substr(__FILE__, 0, strlen($FarmD)) == $FarmD)
    ? "{$FarmPubDirUrl}/commentboxplus" : "{$PubDirUrl}/commentboxplus");
SDV($HTMLHeaderFmt['cbplus'], "
  <link href='\$CommentBoxPlusUrl/commentboxplus.css' rel='stylesheet' type='text/css' />");

and thank you for the tip!


More information about the pmwiki-users mailing list