<?php
$WikiTitle = 'Insteps.net';
//$HTMLPNewline = '<br />';
//$EnableGUIButtons = 1;
$EnablePathInfo = 1;

##  $ScriptUrl is your preferred URL for accessing wiki pages
#$ScriptUrl = 'http://'.$ConfigAll['site']['domain'].'/pr/a/pmwiki';
##  $PubDirUrl is the URL for the pub directory.
#$PubDirUrl = $ConfigAll['pmwiki']['install']['path'].'/pub';
#$PubDirUrl = $ScriptUrl.'/pub';

$UploadPrefixFmt = '/$Group/$Name';
//$UploadUrlFmt = $ConfigAll['username']['install']['url'].'/pmwiki/uploads';
$EnableDirectDownload = 1;
$UploadMaxSize = 2*1024*1024; #2Mb
$UploadDirQuota = 25*1024*1024; # limit uploads to 25MB
$EnableUpload = 1;

$HandleAuth['diff'] = 'edit';
$DiffKeepDays=1;  # keep page history at least 1 day

 $DefaultPasswords['admin'] = '$1$TvpnIpMH$.rejqJ/p6ZXhWOOj0vanE0';
 $DefaultPasswords['upload'] = '$1$TvpnIpMH$.rejqJ/p6ZXhWOOj0vanE0';
 $DefaultPasswords['edit'] = '$1$TvpnIpMH$.rejqJ/p6ZXhWOOj0vanE0';
 $DefaultPasswords['attr'] = '$1$TvpnIpMH$.rejqJ/p6ZXhWOOj0vanE0';

//custom skin libdirs
SDV($SkinLibDirs, array(
    $ConfigAll['current']['application']['install']['path']."/pub/skins/\$Skin" => "$PubDirUrl/skins/\$Skin",
    $ConfigAll['apps']['pmwiki']['path']."/pub/skins/\$Skin" => "$FarmPubDirUrl/skins/\$Skin",
));
//print_r($SkinLibDirs); exit;

## Get wiki group and pagename for use
    $Config['page']['CurrentGroup'] = FmtPageName('$Group', $pagename);
    $Config['page']['CurrentName'] = FmtPageName('$Name', $pagename);
//print_r($Config);

$Skin = 'pmwiki';
//$Skin = 'planner2';

if ($Config['page']['CurrentGroup'] === 'Skins') {

  if(substr($Config['page']['CurrentName'], 0, 11) === 'Notebook-nt') $Skin = 'notebook-nt';
  if(substr($Config['page']['CurrentName'], 0, 9) === 'Pmwiki-dt') $Skin = 'pmwiki-dt';

}

$FmtPV['$CurrentSkin'] = '$GLOBALS["Skin"]';
$FmtPV['$CurrentPhp'] = 'phpversion()';

if (file_exists("$cbInstallDir/txtdb/txtdb.php")) {
  $EnableTxtDb = 1;
  $Txtdb['Install']['location'] = '2';
  $Txtdb['Install']['path'] = 'pub/apps/pmwiki/cookbook';
  $Txtdb['Install']['dir'] = 'txtdb';
  $Txtdb['Install']['icon']['dir'] = 'pub/icons';
  include_once("$cbInstallDir/txtdb/txtdb.php");
}
if (file_exists("cookbook/sortable.php")) {
  include_once('cookbook/sortable.php');
}


if (file_exists("$cbInstallDir/snotes/snotes.php")) {
  $EnableSnotes = 1;
  $SNotes['enableDataUri'] = true;
  $Snotes['Install']['location'] = '2';
  $Snotes['Install']['path'] = 'pub/apps/pmwiki/cookbook';
  $Snotes['Install']['dir'] = 'snotes';
  $Snotes['Install']['icon']['dir'] = 'pub/icons';
  include_once("$cbInstallDir/snotes/snotes.php");
}

if (file_exists("$cbInstallDir/infobox/infobox.php")) {
  $EnableInfobox = 1;
  $Infobox['Install']['location'] = '2';
  $Infobox['Install']['path'] = 'pub/apps/pmwiki/cookbook';
  $Infobox['Install']['dir'] = 'infobox';
  $Infobox['Install']['icon']['dir'] = 'pub/icons';
  include_once("$cbInstallDir/infobox/infobox.php");
}

if (file_exists("$cbInstallDir/jscm/jscookmenu.php")) {
  $EnableJscm = 1;
  $Jscm['Install']['location'] = '2';
  $Jscm['Install']['path'] = 'pub/apps/pmwiki/cookbook';
  $Jscm['Install']['dir'] = 'jscm';
  $Jscm['Install']['icon']['dir'] = 'pub/icons';
  $Jscm['default']['MenuPageName'] = 'JsCm';
  include_once("$cbInstallDir/jscm/jscookmenu.php");
}

if (file_exists("$cbInstallDir/phplm/phplm.php")) {
  $EnablePhplm = 1;
  $Phplm['Install']['location'] = '2'; # 0=field, 1=farm, 2=others
  $Phplm['Install']['path'] = 'pub/apps/pmwiki/cookbook';
  $Phplm['Install']['dir'] = 'phplm';
  $Phplm['Install']['icon']['dir'] = 'pub/icons';
  $Phplm['default']['MenuPageName'] = 'PhpLM';
  include_once("$cbInstallDir/phplm/phplm.php");
}

if (file_exists("$cbInstallDir/qnotes/qnotes.php")) { #absolute path
  $EnableQNotes = 1;
  $QNotes['Install']['location'] = '2';
  $QNotes['Install']['path'] = 'pub/apps/pmwiki/cookbook';
  $QNotes['Install']['dir'] = 'qnotes';
  $QNotes['Install']['icon']['dir'] = 'pub/icons';
  $QNotes['qnotesIsAuthEdit'] = false;
  $QNotes['DefaultPage'] = 'QNotes.Notes1';
  $QNotes['isSectionEditNewPostAtEnd'] = 3; # 1|3
  include_once("$cbInstallDir/qnotes/qnotes.php");
}




