$FarmPubDirUrl is empty by default

If we take the latest pmwiki-2.2.117 and create /local/config.php like this:

 <?php if (!defined('PmWiki')) exit();
 // exit($PubDirUrl); # returns the correct path
 // exit($FarmPubDirUrl);  # returns nothing

Is it a bug or I missed something?

Finar August 01, 2019, at 03:54 PM

It is defined in skins.php, that is loaded after config.php. If you need it in config.php, just set it to the correct value, or leave it to be expanded later, that is, use '$FarmPubDirUrl/thing' in single outer quotes or "\$FarmPubDirUrl/thing" in double outer quotes, backslash before the dollar sign. For example:

  $HTMLFooterFmt['ape'] = '<script type="text/javascript" 

(from an old version of Cookbook:Ape.) --Petko August 01, 2019, at 04:16 PM

This is a talk page for improving PmWiki.PathVariables.