'c-lightblue.css', 'seagreen' => 'c-seagreen.css', 'green' => 'c-green.css', 'white' => 'c-white.css', 'silverblue' => 'c-silverblue.css', 'gold' => 'c-gold.css', 'sand' => 'c-sand.css', // [Feral:052/07@16:52] 'night' => 'c-night.css', // [Feral:052/07@16:52] )); SDVA($PageFontList, array ( 'verdana' => 'font-verdana.css', 'georgia' => 'font-georgia.css', )); SDVA($PageWidthList, array ( 'wide' => 'wide', '800' => '800', 'border' => 'border', )); # =========== end of configuration section of skin.php ================= # # compatibility check with pmwiki version number global $VersionNum, $CompatibilityNotice; if($VersionNum < '2001016') $CompatibilityNotice = "

Compatibility problem: Please upgrade to the latest pmwiki version

"; # check for javascript cookie, set $javascript var for (:if enabled javascript:) switch global $javascript; if (isset($_COOKIE['javascript'])) $javascript = $_COOKIE['javascript']; global $ColorCss, $FontCss, $PageWidth; $sc = $DefaultColor; $sf = $DefaultFont; $sw = $DefaultPageWidth; $ColorCss = $PageColorList[$sc]; $FontCss = $PageFontList[$sf]; $PageWidth = $PageWidthList[$sw]; # add stylechange.php for cookie setting code if set. if ($EnableStyleOptions == 1) include_once("$SkinDir/stylechange.php"); # page width layout global $HTMLStylesFmt; if ($sw=='800') { $HTMLStylesFmt['fixedwidth']=" body{padding:10px 0;} \n #outer-box{width:778px; height:90%;} \n"; }; if ($sw=='border') { $HTMLStylesFmt['border']=" body{padding:10px;} \n ";}; ## automatic loading of skin default config pages global $WikiLibDirs, $SkinDir; $where = count($WikiLibDirs); if ($where>1) $where--; array_splice($WikiLibDirs, $where, 0, array(new PageStore("$SkinDir/wikilib.d/\$FullName"))); # popup editform load switch global $ShowHide, $PageEditForm, $SiteGroup; if($EnablePopupEditForm==1 || $PageEditForm=='$SiteGroup.Popup-EditForm') { if (!$ShowHide) include_once("$SkinDir/showhide.php"); include_once("$SkinDir/popup2edit.php"); SDV($PageEditForm,'Site.Popup-EditForm'); } # set default edit form and configuration page global $XLLangs; SDV($PageEditForm,'Site.Triad-EditForm'); XLPage('triad', 'Site.Triad-Configuration' ); array_splice($XLLangs, -1, 0, array_shift($XLLangs)); # load views script if enabled if($EnableViewSwitcher==1) { $ViewList['big'] = 'big'; # add 'big' to list of view keywords SDV($ViewCookie, $CookiePrefix.$SkinName.'_setview'); include_once("$SkinDir/views.php"); # load views script # set inits for 'big' view global $FontSizeDefault, $FontSizeIncrement, $RTInit, $LTInit; if($View=='big') { $FontSizeDefault = '120'; # base size percentage $FontSizeIncrement = '10'; # size increment in percent $RShow = '0'; # no right bar initially $LShow = '1'; # (0=no) left bar initially }; }; ## adds fontsizer if enabled. # Fontsizer action links are inserted by default in Site.PageHeader # using markup (:fontsizer:). It could be used in other places, like the SideBar. # Remove (:fontsizer:) markup if not wanted. if($EnableFontSizer==1) include_once("$SkinDir/fontsizer.php"); # set base font size for 'big' view if fontsizer disabled global $HTMLStylesFmt; if($EnableFontSizer==0 && $View=='big') { $HTMLStylesFmt[] = " body {font-size:150%} "; } # set TriadSkin as global variable for (:if enable TriadSkin:) markup global $TriadSkin; $TriadSkin = 1; # add {$PageLogoUrl} to page variables to use on default PageHeader page global $FmtPV; $FmtPV['$PageLogoUrl'] = '$GLOBALS["PageLogoUrl"]'; # do not show topmenu bar if PageTopMenu is empty $gtm = FmtPageName('$Group.PageTopMenu',$pagename); $stm = FmtPageName('$SiteGroup.PageTopMenu',$pagename); if (PageExists($gtm)) $page = ReadPage($gtm); if (@$page['text']=='') $nogtm = 1; if (PageExists($stm)) $page = ReadPage($stm); if (@$page['text']=='') $nostm = 1; if ($nogtm==1 && $nostm==1){ # SetTmplDisplay('PageTopMenuFmt',0); }; /* if (PageExists('$Group.PageTopMenu')) $page = ReadPage('$Group.PageTopMenu'); if (PageExists('$SiteGroup.PageTopMenu')) $page .= ReadPage('$SiteGroup.PageTopMenu'); echo $page; if(@$page['text']=='') { SetTmplDisplay('PageTopMenuFmt',0); }; */ ## redefine searchbox format: function SearchBox2($pagename, $opt) { global $SearchBoxFmt, $SearchBoxOpt, $SearchQuery, $EnablePathInfo, $PageSearchForm; SDVA($SearchBoxOpt, array( 'size' => '20', 'label' => FmtPageName('$[Search]', $pagename), 'group' => @$_REQUEST['group'], 'focus' => @$_REQUEST['focus'], 'value' => str_replace("'", "'", $SearchQuery))); $opt = array_merge((array)$SearchBoxOpt, (array)$opt); $group = $opt['group']; $focus = $opt['focus']; $out = FmtPageName(" class='wikisearch' action='\$PageUrl' method='get'>", $pagename); if (!IsEnabled($EnablePathInfo, 0)) $out .= ""; if ($group) $out .= ""; $out .= "links', '/\\(:searchbox(\\s.*?)?:\\)/e', "SearchBox2(\$pagename, ParseArgs(PSS('$1')))"); ## set var $RightBar=1 if RightBar exists if ($EnableRightBar==1 || $EnableMarkupShowRight==1) { $prb = FmtPageName('$FullName-RightBar',$pagename); // [Feral:052/07@17:13] Not needed with Cluster.php // $grb = FmtPageName('$Group.RightBar',$pagename); // $srb = FmtPageName('$SiteGroup.RightBar',$pagename); if (PageExists($prb)) $RightBar = 1; // [Feral:052/07@17:13] Not needed with Cluster.php // if (PageExists($grb)) $RightBar = 1; // if (PageExists($srb)) $RightBar = 1; // [Feral:052/07@16:49] ----------------------------------------------- // Support for Cluster.php's right bar global $clustersrightbarname; // from Cluster.php v'2007-02-21'+ If ( $clustersrightbarname) { if ( PageExists($clustersrightbarname) ) { $RightBar = 1; } } else { // [Feral:052/07@17:13] as cluster will dig down from current group to // SiteGroup, we need only compute these if we do now have cluster.php // active. $grb = FmtPageName('$Group.RightBar',$pagename); $srb = FmtPageName('$SiteGroup.RightBar',$pagename); if (PageExists($grb)) $RightBar = 1; if (PageExists($srb)) $RightBar = 1; } // -------------------------------------------------------------------- } # empty right column logic if ($EnableEmptyRightBar==0 && $RightBar==0) SetTmplDisplay('PageRightFmt',0); if ($EnableEmptyRightBar==1 && $EnableRightBar==1) SetTmplDisplay('PageRightFmt',1); # disable rightbar logic if (!$EnableRightBar==1) SetTmplDisplay('PageRightFmt',0); # add left & right bar toggle switches if enabled if($EnableRightBarToggle==1 || $EnableLeftBarToggle==1) { include_once("$SkinDir/togglebars.php"); } # changes to extended markup recipe for selflink definition: global $LinkPageSelfFmt; $LinkPageSelfFmt = "\$LinkText"; # switch to hide group-link in titlebar global $PageGroup; $PageGroup = FmtPageName('',$pagename); if ($EnableGroupTitle == 1) $PageGroup = FmtPageName('$Groupspaced',$pagename); else { $PageGroup = FmtPageName('',$pagename); } #adding switch for 'Pagename-Titlebar' subpage for fancy font titlebars $ftb = FmtPageName('$FullName-TitleBar',$pagename); if(PageExists($ftb)) $HTMLStylesFmt[] = " .titlelink { display:none } \n "; # Markup (:nopagegroup:) to hide group in titlebar function NoPageGroup2() { global $PageGroup, $HTMLStylesFmt; $PageGroup = FmtPageName('',$pagename); $HTMLStylesFmt[]=" #pagegroup { display:none } \n"; return ''; } Markup('nogroup','directives','/\\(:nogroup:\\)/e', "NoPageGroup2()"); ## markup (:noleft:) function NoLeft2() { global $LeftToggleFmt; $LeftToggleFmt = ""; SetTmplDisplay('PageLeftFmt',0); return ''; } Markup('noleft','directives','/\\(:noleft:\\)/e', "NoLeft2()"); ## markup (:noright:) function NoRight2() { global $RightToggleFmt; $RightToggleFmt = ""; SetTmplDisplay('PageRightFmt',0); return ''; } Markup('noright','directives','/\\(:noright:\\)/e', "NoRight2()"); ## Markup (:showright:) if ($EnableMarkupShowRight==1) { Markup('showright','directives','/\\(:showright:\\)/e', "SetTmplDisplay('PageRightFmt',1)"); }; ## Markup (:notopmenu:) function NoTopMenu2() { global $HTMLStylesFmt; SetTmplDisplay('PageTopMenuFmt',0); $HTMLStylesFmt[] = " #header {border-bottom:1px solid #003466}\n "; return ''; } Markup('notopmenu','directives','/\\(:notopmenu:\\)/e', "NoTopMenu2()"); ## Markup (:nofootmenu:) Markup('nofootmenu','directives','/\\(:nofootmenu:\\)/e', "SetTmplDisplay('PageFootMenuFmt', 0)"); ## Markup (:noaction:) function NoAction2() { global $HTMLStylesFmt; SetTmplDisplay('PageFootMenuFmt', 0); SetTmplDisplay('PageTopMenuFmt',0); $HTMLStylesFmt['noaction'] = " #header {border-bottom:1px solid #003466}\n "; return ''; } Markup('noaction','directives','/\\(:noaction:\\)/e', "NoAction2()"); ## Markup (:noheader:) Markup('noheader','directives','/\\(:noheader:\\)/e', "SetTmplDisplay('PageHeaderFmt', 0)"); ## Markup (:fullpage:) function FullPage() { SetTmplDisplay('PageHeaderFmt', 0); SetTmplDisplay('PageTopMenuFmt',0); SetTmplDisplay('PageFootMenuFmt', 0); SetTmplDisplay('PageFooterFmt', 0); SetTmplDisplay('PageLeftFmt',0); SetTmplDisplay('PageRightFmt',0); return ''; } Markup('fullpage','directives','/\\(:fullpage:\\)/e', "FullPage()"); ## Markup (:theme colorname fontname:) function SetTheme($sc,$sf) { global $ColorCss, $PageColorList, $FontCss, $PageFontList, $HTMLStylesFmt, $EnableThemes; if (@$PageColorList[$sc]) $ColorCss = $PageColorList[$sc]; if($sf) { if (@$PageFontList[$sf]) $FontCss = $PageFontList[$sf];}; }; if($EnableThemes == 1) { Markup('theme', 'fulltext', '/\\(:theme\\s+([-\\w]+)\\s*([-\\w]*)\\s*:\\)/e', "PZZ(SetTheme('$1', '$2'))"); } else { Markup('theme', 'fulltext', '/\\(:theme\\s+([-\\w]+)\\s*([-\\w]*)\\s*:\\)/e', ""); }; ## add double line horiz rule markup ==== Markup('^====','>^->','/^====+/','<:block,1>
'); ## removing header, title for history and uploads windows global $action; if ($action=='diff' || $action=='upload') { SetTmplDisplay('PageHeaderFmt', 0); SetTmplDisplay('PageTitleFmt', 0); }; ## alternative Diff (History) form with link in title global $PageDiffFmt, $PageUploadFmt; $PageDiffFmt = "

\$FullName $[History]

\$DiffMinorFmt - \$DiffSourceFmt - $[Cancel]

"; ## alternative Uploads form with link in title $PageUploadFmt = array("

$[Attachments for] {\$FullName}

\$UploadResult

$[File to upload:]

$[Name attachment as:]


", 'wiki:$[{$SiteGroup}/UploadQuickReference]'); ######