KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/astrosfm/pmwiki/pub/skins/recurve/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/astrosfm/pmwiki/pub/skins/recurve/recurve.php
<?php /*>*/ if (!defined('PmWiki')) exit();
#
# recurve/recurve.php
#
# PmWiki Recurve skin code
# Copyright 2004-2006 Dominique Faure ([email protected])
# With some ideas borrowed from some other PmWiki skins...
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# See http://www.pmwiki.org/wiki/Cookbook/RecurveSkin for info.
#
$RecipeInfo['RecurveSkin']['Version'] = '20061205';

# Skin Parts handling
global $SkinPartFmt, $WikiTitle;
SDVA($SkinPartFmt, array(
'wikititle' => "$WikiTitle > {\$Group} / {\$Title}",
'suptitle' => "[[{\$DefaultGroup}|$WikiTitle]] > [[{\$Group}/|{\$Groupspaced}]] /",
'title' => '{$Titlespaced}',
'footer' => '
* %item rel=nofollow% %navbox% [[&#9650; $[Top] &#9650; -> {$FullName}#recurve_topofpage]]
* %item rel=nofollow% [[$[Search] -> $[{$SiteGroup}/Search]]]
* %item rel=nofollow% [[$[Recent Changes] -> $[{$Group}/RecentChanges]]]
* %item rel=nofollow% [[$[All Recent Changes] -> $[{$SiteGroup}/AllRecentChanges]]]
',
'leftbardisabled' => false,
'tabsdisabled' => false,
));
global $SkinPartStylesFmt;
SDVA($SkinPartStylesFmt, array(
'leftbardisabled' => 'body { margin-left: 0; }',
'tabsdisabled' => '#tabpage { border-top: 1px #98AAB1 solid; }',
));

# Ensure local CSS customization files are included *after* skin style
global $HTMLHeaderFmt;
$HTMLHeaderFmt[] = "<link rel='stylesheet' type='text/css' href='\$SkinDirUrl/recurve.css' />\n";

function RenderPart($pagename, $part, $strip = '') {
  global $SkinPartFmt, $PCache;
  $n = "skin_$part";
  if(!isset($PCache[$pagename][$n])) {
    $t = htmlspecialchars($SkinPartFmt[$part], ENT_NOQUOTES);
    $t = MarkupToHTML($pagename, "<:block>$t", array('escape' => 0));
    $PCache[$pagename][$n] = $strip ? preg_replace($strip, '', $t) : $t;
  }
  print $PCache[$pagename][$n];
}

function RenderTitle($pagename) {
  RenderPart($pagename, 'wikititle', "/(<[^>]+>|\r\n?|\n\r?)/");
}

function RetrievePageMarkup($pagelist) {
  foreach($pagelist as $p) {
    if (PageExists($p)) {
      $page = RetrieveAuthPage($p, 'read', false, READPAGE_CURRENT);
      $text = $page['text'];
      break;
    }
  }
  return $text;
}

function RenderActions($pagename, $actionslist) {
  global $action, $SkinPartFmt;
  $pagelist = preg_split('/\s+/', $actionslist, -1, PREG_SPLIT_NO_EMPTY);
  $text = RetrievePageMarkup($pagelist);
  SDV($text, preg_replace("/(\r\n|\n?\r)/", "\n", $SkinPartFmt['pageactions']));
  preg_match('/(<([uo])l>(?:.*)<\\/\\2l>)/si', MarkupToHTML($pagename, $text), $m);
  $ls = explode("</li>", str_replace("\n", "", $m[1]));
  $lRe = "/(.*?)<a.*?href='(.*?)'.*?>(.*?)<\\/a>(.*)/i";
  foreach($ls as $i => $l) {
    if(preg_match($lRe, $l, $l1)) {
      $laction = preg_match("/action=(.*)/i", $l1[2], $a) ? $a[1] : 'browse';
      if($action == $laction) {
          $ls[$i] = $l1[1];
        if($l1[4] && preg_match($lRe, $l1[4], $l2))
          $ls[$i] .= "<a id='active' href='" . $l2[2] . "'>" . $l2[3] . "</a>";
        else
          $ls[$i] .= "<p id='active'>" . $l1[3] . "</p>";
      }
    }
  }
  print implode("\n</li>", $ls);
}

function RenderStyle($pagename, $params) {
  global $SkinPartFmt, $SkinPartStylesFmt;
  preg_match('/^\s*(!?)\s*(\S+)$/s', $params, $m);
  $bool = $SkinPartFmt[$m[2]];
  $style = $SkinPartStylesFmt[$m[2]];
  print ($m[1] ? ! $bool : $bool) ? "<style type='text/css'>$style</style>" : '';
}

# Action-specific behaviors
global $action;
if ($action != 'browse')
	SetTmplDisplay('PagePrintFmt', 0);

if ($action == 'print') {
	# Skin-specific print action.
	# Enabled from config.php with: $ActionSkin['print'] = <skin_name>;
	global $LinkPageExistsFmt, $UrlLinkTextFmt, 
		$GroupPrintHeaderFmt, $GroupPrintFooterFmt,
		$GroupHeaderFmt, $GroupFooterFmt;

	$LinkPageExistsFmt = "<a class='wikilink' href='\$PageUrl?action=print\$Fragment'>\$LinkText</a>";
	$UrlLinkTextFmt = "<cite class='urllink'>\$LinkText</cite> [<a class='urllink' href='\$Url'>\$Url</a>]";
	SDV($GroupPrintHeaderFmt,'(:include $Group.GroupPrintHeader:)(:nl:)');
	SDV($GroupPrintFooterFmt,'(:nl:)(:include $Group.GroupPrintFooter:)');
	$GroupHeaderFmt = $GroupPrintHeaderFmt;
	$GroupFooterFmt = $GroupPrintFooterFmt;

	LoadPageTemplate($pagename,"$SkinDir/print.tmpl");
	return;
}

# $StopWatch handling
global $EnableStopWatch, $FmtP;
if(!$EnableStopWatch) $FmtP['/\\$StopWatch/'] = '';

# Markup extension
# (:noleft:), (:nosidebar:) => remove sidebar
# (:notabs:) => remove tabs above page content
# (:notrailer:) => remove last modification information below page content
#
Markup('noleft', 'directives', '/\\(:noleft:\\)/ei', "NoLeftBar()");
Markup('nosidebar', 'directives', '/\\(:nosidebar:\\)/ei', "NoLeftBar()");
Markup('notabs', 'directives', '/\\(:notabs:\\)/ei', "NoTabs()");
Markup('notrailer', 'directives', '/\\(:notrailer:\\)/ei',
	"SetTmplDisplay('PageTabsTrailerFmt', 0)");

global $NoLeftBarStartComment, $NoLeftBarEndComment, $NoTabsStartComment, $NoTabsEndComment;
$NoLeftBarStartComment = $NoTabsStartComment = '/*';
$NoLeftBarEndComment = $NoTabsEndComment = '*/';

function NoLeftBar() {
  global $SkinPartFmt;
  $SkinPartFmt['leftbardisabled'] = true;
  SetTmplDisplay('PageLeftFmt', 0);
}

function NoTabs() {
  global $SkinPartFmt;
  $SkinPartFmt['tabsdisabled'] = true;
  SetTmplDisplay('PageTabsHeaderFmt', 0);
}

Anon7 - 2021