[pmwiki-users] get rid of group Main from url

JB jbit at bitlink.com
Wed Nov 8 10:24:52 CST 2006


* Patrick R. Michaud wrote, On 11/8/2006 8:18 AM:
> Here's what I have now -- you can see it working at


Here are my config.php and farmconfig.php files.
Perhaps you can tell me why it does not work for me.
It makes the index.php and ".Main" display.


-----------------------------------------------------------------------
config.php
-----------------------------------------------------------------------
<?php if (!defined('PmWiki')) exit();
$EnablePathInfo = 0;
$ScriptUrl = 'http://gnuzoo.org/guitarstuff/';
$PubDirUrl = 'http://gnuzoo.org/guitarstuff/pub/';
$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")';
#  $WikiTitle is the name that appears in the browser's title bar.
$WikiTitle =  'Guitar Stuff';

# set admin password
$DefaultPasswords['admin']='$1$p8QRWuhy$eAM3F9ZANto4J2.XEO/cv.';

include_once("cookbook/chordpro.php");

$Skin = 'twopanenoedit';

   $SkinLibDirs = array(
   "./pub/skins/\$Skin" => "$PubDirUrl/skins/\$Skin",
   "$FarmD/pub/skins/$Skin" => "$FarmPubDirUrl/skins/$Skin");
-----------------------------------------------------------------------
farmconfig.php
-----------------------------------------------------------------------
<?php if (!defined('PmWiki')) exit();
$JBEmail = "jbit at bitlink.com";

$FarmPubDirUrl = 'http://gnuzoo.org/farm/pub';
$LockFile = "$FarmD/shared.d/.flock";
$WikiLibDirs = array(
       &$WikiDir,
       new PageStore('$FarmD/shared.d/$FullName', 1),
       new PageStore('$FarmD/wikilib.d/$FullName'));

# allow alerts in php code
include_once("$FarmD/cookbook/phpalert.php");

# download blocklist automatically
$EnableBlocklist = 10;
$EnableWhyBlocked = 1;
$BlocklistDownloadRefresh = 86400 * 7;
# download from pmwiki Site.Blocklist too
$BlocklistDownload['Site.Blocklist-PmWiki'] = array('format' => 'pmwiki');

#enable rss feeds
if ($action == 'rss'  ||
     $action == 'atom' ||
     $action == 'rdf'  ||
     $action == 'dc') include_once("$FarmD/scripts/feeds.php");

# wrap preformatted text at max 75 characters:
     Markup('^ ', 'block',
          '/^(\\s+)(.*)$/e',
          "'<:pre,1>$1'.wordwrap(PSS('$2'), 75, '\n$1')");

# remove question mark links to pages that do not exist
$LinkPageCreateFmt =
    "<a class='createlinktext' href='\$PageUrl?action=edit'>\$LinkText</a>";

# do not use a redirect message
$PageRedirectFmt = '';

$Skin = 'twopane';
   $SkinLibDirs = array(
   "./pub/skins/\$Skin" => "$PubDirUrl/skins/\$Skin",
   "$FarmD/pub/skins/$Skin" => "$FarmPubDirUrl/skins/$Skin");

#set fake unusable default admin password so it must be set locally
$DefaultPasswords['type']='$1$soEHwbam$YDuCMoE4CiyKv4QwddfcZK.h.';

# having junk passwords here requires use of admin password
$DefaultPasswords['rename'] = '$1$zY8kqN7v$pOVPcg.jfrGE/VIbwQB1o0';
$DefaultPasswords['edit'  ] = '$1$.Z5LvR/n$7dDIBabOPXZPnvoc9Pza8.';

# Require admin password to edit RecentChanges (etc.) pages.
if ($action=='edit' && preg_match('/\\.(All)?RecentChanges$/', 
$pagename)) { $DefaultPasswords['edit'] = '*'; }

# require user to enter an author name
$EnablePostAuthorRequired = 1;

##  to enable these buttons, set $EnableGUIButtons to 1.
$EnableGUIButtons = 1;

# set table defaults
$TableRowIndexMax = 2;
$TableRowAttrFmt  = "class='row\$TableRowIndex'" ;
$TableCellAttrFmt = "class='col\$TableCellCount'";

#  add farm.css file to the css hiearchy
$PageCSSListFmt = array(
   '$FarmD/../public_html/farm/pub/css/farm.css' => 
'$FarmPubDirUrl/css/farm.css',
   'pub/css/local.css' => '$PubDirUrl/css/local.css',
   'pub/css/$Group.css' => '$PubDirUrl/css/$Group.css',
   'pub/css/$FullName.css' => '$PubDirUrl/css/$FullName.css');

# enable css properties
$WikiStyleCSS[] = 'line-height';
$WikiStyleCSS[] = 'font-weight';

include_once("$FarmD/cookbook/SCHLines.php");
include_once("$FarmD/cookbook/AdvancedTableDirectives.php");
include_once("$FarmD/cookbook/SimplifiedAdvancedTableDirectives.php");

# set time between currentusers to be 2 minutes
$MaximumNumberOfSecondsToConsiderAVisitorAsCurrent = 120;
include_once("$FarmD/cookbook/CurrentVisitors.php");

include_once("$FarmD/cookbook/includefieldpage.php");

# remove triangle (delta) from upload link information [[attach afile.ext]]
# (this is not the atttachlist triangle)
$LinkUploadCreateFmt = "<a class='createlinktext' 
href='\$LinkUpload'>\$LinkText</a>";

# local wiki must enable uploads for attachlist to work

$EnableDirectDownload=0;

# make uploads site wide
$UploadPrefixFmt = '';

# make default upload form
$PageUploadFmt = array("
   <div id='wikiupload'>
   <h3>\$UploadResult</h3>
   <form enctype='multipart/form-data' action='{\$PageUrl}' method='post'>
   <input type='hidden' name='n' value='{\$FullName}' />
   <input type='hidden' name='action' value='postupload' />
   <table border='0'>
     <tr><td align='right'>$[Upload File:]</td><td><input
       name='uploadfile' type='file' /><input type='submit' 
value='Upload' /></td></tr></table></form></div>",
   'wiki:$[{$SiteGroup}/UploadQuickReference]');

$MaxIncludes = 100;

# allow action bookmarklet links
$LinkFunctions['action:'] = 'LinkIMap';
$IMap['action:'] = '$1';
$IMapLinkFmt['action:'] = "<a 
href='javascript:location.href+=\"?action=\$LinkUrl\"'>\$LinkText</a>";

# allow "editmenu" action in the url inside the browser
if ($action == 'editmenu') Redirect('Site.SideBar', '$PageUrl?action=edit');

# 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);

include_once("$FarmD/cookbook/spellchecker.php");

# set to user farm directory instead of local wiki directory
$DomTTPubDir = "$FarmPubDirUrl/domTT";
$DomTTParams['+'] = array('trail');
$DomTTParams['fade'] = 'both';
$DomTTParams['fadeMax'] = '100';
include_once("$FarmD/cookbook/domtt.php");

include_once("$FarmD/cookbook/AttachListSort.php");
-----------------------------------------------------------------------





More information about the pmwiki-users mailing list