[pmwiki-users] Is there any way to have more than one shared directory?

JB jbit at bitlink.com
Thu Nov 30 13:19:07 CST 2006


> This failed:
> 
> farmconfig.php
>      $LockFile = "$FarmD/shared.d/.flock";
>      $WikiLibDirs = array(
>            &$WikiDir,
>            new PageStore('$FarmD/shared.d/$FullName', 1),
>            new PageStore('$FarmD/wikilib.d/$FullName'));
> 
> local/config.php
>      $UkuleleDir = "/var/www/home/gnuzoo/public_html/ukuleleshared.d/";
>      $WikiLibDirs[] = new PageStore($UkuleleDir.'$FullName', 1);


I got this working now.  The problem was that the order of the stuff in
my farmconfig.php code.  I had to include the local config.php before
the following code and it works great.  WHEW!




<code for farmconfig.php>
<code for farmconfig.php>
...
<code for farmconfig.php>
<code for farmconfig.php>


######## MUST INCLUDE HERE SO CODE BELOW EXECUTES AFTER IT!
include_once("local/config.php");

### CODE BELOW MUST EXECUTE AFTER CONFIG.PHP
# shorten urls
$EnablePathInfo = 0;
$ScriptUrl = dirname($ScriptUrl)."/";
$PagePathFmt = array(
            '{$Group}.$1',           # page in current group
            '{$DefaultGroup}.$1',    # page in default group (Main)
            '$1.$1',                 # group home page
            '$1.{$DefaultName}',     # group home page
     );
     $pagename = MakePageName('Main.HomePage', $pagename);
     $FmtPV['$PageUrl'] = 'PUE(($group==$GLOBALS["DefaultGroup"])
         ? "$ScriptUrl?n=$name": "$ScriptUrl?n=$group.$name")';

#### CODE BELOW MUST EXECUTE AFTER ROUTINES TO SHORTEN URLS
# return to home after editing the menu
#$pagename = ResolvePageName($pagename);
if ($pagename == 'Site.SideBar' && $action=='browse') 
Redirect($DefaultPage);
if ($pagename == 'Main.SideBar' && $action=='browse') 
Redirect($DefaultPage);





More information about the pmwiki-users mailing list