(.*?)<\\/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] .= "" . $l2[3] . "";
else
$ls[$i] .= "" . $l1[3] . "
";
}
}
}
print implode("\n", $ls);
}
function RenderDivPart($pagename, $params) {
$pagelist = preg_split('/\s+/', $params, -1, PREG_SPLIT_NO_EMPTY);
$class = array_shift($pagelist);
$id = array_shift($pagelist);
$text = RetrievePageMarkup($pagelist);
if(!isset($text)) return;
print "";
print MarkupToHTML($pagename, $text);
print "
";
}
# Markup extension
# (:noleft:), (:nosidebar:) => remove sidebar
# (:notabs:) => remove tabs above page content
# (:noprint:) => remove print action link
#
Markup('noleft', 'directives', '/\\(:noleft:\\)/ei', "NoLeftBar()");
Markup('nosidebar', 'directives', '/\\(:nosidebar:\\)/ei', "NoLeftBar()");
Markup('notabs', 'directives', '/\\(:no(action|tab)s?:\\)/ei', "NoTabs()");
function NoLeftBar() {
global $SkinPartFmt;
$SkinPartFmt['leftbardisabled'] = true;
SetTmplDisplay('PageLeftFmt', 0);
}
function NoTabs() {
global $SkinPartFmt;
$SkinPartFmt['tabsdisabled'] = true;
SetTmplDisplay('PageTabsFmt', 0);
}
# links decoration
global $EnableSkinLinkDecoration;
if(IsEnabled($EnableSkinLinkDecoration, 1)) {
global $SkinPartFmt, $IMapLinkFmt, $LinkFunctions, $IMap;
global $LinkPageCreateFmt, $LinkUploadCreateFmt, $UrlLinkFmt;
$intermap = $SkinPartFmt['attachalias'];
$IMapLinkFmt['Attach:'] = "\$LinkText";
$IMapLinkFmt[$intermap] = "\$LinkText";
$LinkFunctions[$intermap] = 'LinkUpload';
$IMap[$intermap] = '$1';
$LinkPageCreateFmt = "\$LinkText";
$LinkUploadCreateFmt = "\$LinkText";
# $UrlLinkFmt = "\$LinkText";
}
# $StopWatch handling
function RenderStopWatch($pagename) {
global $EnableStopWatch;
if(function_exists('StopWatchHTML'))
StopWatchHTML($pagename, $EnableStopWatch);
else
if($EnableStopWatch && function_exists('DisplayStopWatch'))
print DisplayStopWatch();
}
# Right bar handling -- WARNING: this is un-maintained code
if($SkinPartFmt['rightbardisabled'])
SetTmplDisplay('PageRightFmt', 0);
else
{
global $Now, $RightBarClass;
SDV($RightbarCookieExpires, $Now + 60*60*24*365); # cookie expire time defaults to 1 year
SDV($DefaultRightBar, 'narrow');
$PageRightBarList = array (
'0' => 'rb-none',
'off' => 'rb-none',
'on' => 'rb-narrow',
'1' => 'rb-narrow',
'narrow' => 'rb-narrow',
'2' => 'rb-normal',
'normal' => 'rb-normal',
'3' => 'rb-wide',
'wide' => 'rb-wide',
);
if(isset($_COOKIE['setrb'])) $rb = $_COOKIE['setrb'];
if(isset($_GET['setrb'])) {
$rb = $_GET['setrb'];
setcookie('setrb', $rb, $RightbarCookieExpires, '/');
}
if(isset($_GET['rb'])) $rb = $_GET['rb'];
$RightBarClass = isset($PageRightBarList[$rb]) ? $PageRightBarList[$rb] : $PageRightBarList[$DefaultRightBar];
global $action;
Markup('noright', 'directives', '/\\(:noright:\\)/e',
"SetTmplDisplay('PageRightFmt', 0)");
Markup('showright', 'directives', '/\\(:showright:\\)/e',
($action != 'browse') ? "" : "SetTmplDisplay('PageRightFmt', 1)");
}