本文整理匯總了PHP中Markup_e函數的典型用法代碼示例。如果您正苦於以下問題:PHP Markup_e函數的具體用法?PHP Markup_e怎麽用?PHP Markup_e使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了Markup_e函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: TaggerSetup
function TaggerSetup()
{
global $TaggerGroups;
global $FmtPV;
if ($TaggerGroups) {
foreach ($TaggerGroups as $tagname => $catgroup) {
$FmtPV['$' . $tagname . 'Linked'] = "TaggerLinksVar(\$pn, '{$tagname}', '{$catgroup}', 'LinkedTitle')";
$FmtPV['$' . $tagname . 'LinkedName'] = "TaggerLinksVar(\$pn, '{$tagname}', '{$catgroup}', 'LinkedName')";
$FmtPV['$' . $tagname . 'Name'] = "TaggerLinksVar(\$pn, '{$tagname}', '{$catgroup}', 'Name')";
}
// markup to insert the links
$tags = array_keys($TaggerGroups);
$tagpat = implode('|', $tags);
if (function_exists('Markup_e')) {
# added by Petko Yotov
Markup_e("tagger", '<directives', '/^(\\(:)?(' . $tagpat . '):(.*?)(:\\))?$/', "TaggerLinks(\$pagename, \$m[1], \$m[2], \$m[3], \$m[4])");
// deal with the "hidden" PTVs
Markup_e('textvar:', '<split', '/\\(:(\\w[-\\w]*):((?!\\)).*?):\\)/s', "TaggerHiddenVars(\$pagename, \$m[1], \$m[2])");
} else {
Markup("tagger", '<directives', '/^(\\(:)?(' . $tagpat . '):(.*?)(:\\))?$/e', "TaggerLinks(\$pagename, '\$1', '\$2', '\$3', '\$4')");
// deal with the "hidden" PTVs
Markup('textvar:', '<split', '/\\(:(\\w[-\\w]*):((?!\\)).*?):\\)/se', "TaggerHiddenVars(\$pagename, '\$1', '\$2')");
}
// hidden Tagger PTVs get hidden after link-processing
Markup('textvar:ol', ">links", '/^\\(:\\w[-\\w]*:.*?:\\)$/', '');
}
}
示例2: PHSC
PHSC(stripmagic(@$_REQUEST['q']), ENT_NOQUOTES)));
XLSDV('en', array(
'SearchFor' => 'Results of search for <em>$Needle</em>:',
'SearchFound' =>
'$MatchCount pages found out of $MatchSearched pages searched.'));
SDV($PageListArgPattern, '((?:\\$:?)?\\w+)[:=]');
Markup_e('pagelist', 'directives',
'/\\(:pagelist(\\s+.*?)?:\\)/i',
"FmtPageList('\$MatchList', \$pagename, array('o' => \$m[1].' '))");
Markup_e('searchbox', 'directives',
'/\\(:searchbox(\\s.*?)?:\\)/',
"SearchBox(\$pagename, ParseArgs(\$m[1], '$PageListArgPattern'))");
Markup_e('searchresults', 'directives',
'/\\(:searchresults(\\s+.*?)?:\\)/i',
"FmtPageList(\$GLOBALS['SearchResultsFmt'], \$pagename,
array('req' => 1, 'request'=>1, 'o' => \$m[1]))");
SDV($SaveAttrPatterns['/\\(:(searchresults|pagelist)(\\s+.*?)?:\\)/i'], ' ');
SDV($HandleActions['search'], 'HandleSearchA');
SDV($HandleAuth['search'], 'read');
SDV($ActionTitleFmt['search'], '| $[Search Results]');
SDVA($PageListFilters, array(
'PageListCache' => 80,
'PageListProtect' => 90,
'PageListSources' => 100,
'PageListPasswords' => 120,
'PageListIf' => 140,
'PageListTermsTargets' => 160,
示例3: ParseArgs
$opt = ParseArgs($args);
// expect link, class
// TODO: test for options
// TODO: handle alt params
// TODO: handle rel=nofollow per pmwiki settings
// what about other PmWiki shortcut-type things?
// like... [[PmWiki/basic editing|+]]%apply=link class="btn"%
$target = $opt['link'];
$text = $opt['text'] ? $opt['text'] : $target;
// if text not provided, default to the link
$class = $opt['class'];
$l = '<a href="%s" class="%s">%s</a>';
$linkf = sprintf($l, $target, $class, $text);
return $linkf;
}
Markup_e('icon', 'inline', '/\\(:icon(\\s+.*?)?:\\)/i', "BootstrapIcon(\$m[1])");
function BootstrapIcon($args)
{
$icon = sprintf('<i class=%s ></i>', $args);
return Keep($icon);
}
# if (:noleft:) markup is present, mainbody will be span12
# otherwise, default to span9 (ie sidebar is span3)
if (!isset($BodySpan)) {
$BodySpan = "span9";
}
Markup('noleft', 'directives', '/\\(:noleft:\\)/i', "HideLeftBoot()");
# SetTmplDisplay() is a core pmwiki function defined in pmwiki.php
function HideLeftBoot()
{
global $BodySpan;
示例4: Markup
$Conditions['expr'] = 'CondExpr($pagename, $condname, $condparm)';
$Conditions['('] = 'CondExpr($pagename, $condname, $condparm)';
$Conditions['['] = 'CondExpr($pagename, $condname, $condparm)';
$MarkupTable['_begin']['seq'] = 'B';
$MarkupTable['_end']['seq'] = 'E';
Markup('fulltext','>_begin');
Markup('split','>fulltext',"\n",
'$RedoMarkupLine=1; return explode("\n",$x);');
Markup('directives','>split');
Markup('inline','>directives');
Markup('links','>inline');
Markup('block','>links');
Markup('style','>block');
Markup_e('closeall', '_begin',
'/^\\(:closeall:\\)$/',
"'<:block>' . MarkupClose()");
$ImgExtPattern="\\.(?:gif|jpg|jpeg|png|GIF|JPG|JPEG|PNG)";
$ImgTagFmt="<img src='\$LinkUrl' alt='\$LinkAlt' title='\$LinkAlt' />";
$BlockMarkups = array(
'block' => array('','','',0),
'ul' => array('<ul><li>','</li><li>','</li></ul>',1),
'dl' => array('<dl>','</dd>','</dd></dl>',1),
'ol' => array('<ol><li>','</li><li>','</li></ol>',1),
'p' => array('<p>','','</p>',0),
'indent' =>
array("<div class='indent'>","</div><div class='indent'>",'</div>',1),
'outdent' =>
array("<div class='outdent'>","</div><div class='outdent'>",'</div>',1),
示例5: SDV
This file is part of PmWiki; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. See pmwiki.php for full details.
This script provides special handling for WikiWords that are
preceded by a $, treating them as PmWiki variables to be looked up
in the variable documentation pages if such documentation exists.
The $VarPagesFmt variable contains a list of pages to be searched
to build an index of the variable documentation. This index is
generated only once per browse request, and then only when needed.
*/
SDV($VarPagesFmt, array('$[PmWiki.Variables]'));
Markup_e('varlink', '<wikilink', "/\\\$({$WikiWordPattern})\\b/", "Keep(VarLink(\$pagename,\$m[1],'\$'.\$m[1]))");
Markup('vardef', '<links', "/^:\\\$({$WikiWordPattern}):/", ':[[#$1]]$$1:');
Markup_e('varindex', 'directives', '/\\(:varindex:\\)/i', "Keep(VarIndexList(\$pagename))");
$HTMLStylesFmt['vardoc'] = "a.varlink { text-decoration:none; }\n";
function VarLink($pagename, $tgt, $txt)
{
global $VarIndex, $FmtV, $VarLinkMissingFmt, $VarLinkExistsFmt;
SDV($VarLinkMissingFmt, '$LinkText');
SDV($VarLinkExistsFmt, "<a class='varlink' href='\$LinkUrl'><code class='varlink'>\$LinkText</code></a>");
VarIndexLoad($pagename);
$FmtV['$LinkText'] = str_replace('$', '$', $txt);
$FmtV['$LinkUrl'] = @$VarIndex[$tgt]['url'];
if (@(!$VarIndex[$tgt]['url'])) {
return FmtPageName($VarLinkMissingFmt, $pagename);
}
return FmtPageName($VarLinkExistsFmt, $pagename);
}
function VarIndexLoad($pagename)
示例6: any
$FmtPV['$WikiTitle'] = '$GLOBALS["WikiTitle"]';
$FmtPV['$WikiTag'] = '$GLOBALS["WikiTag"]';
# Move any (:noleft:) or SetTmplDisplay('PageLeftFmt', 0); directives to variables for access in jScript.
$FmtPV['$LeftColumn'] = "\$GLOBALS['TmplDisplay']['PageLeftFmt']";
Markup_e('noleft', 'directives', '/\\(:noleft:\\)/i', "SetTmplDisplay('PageLeftFmt',0)");
$FmtPV['$RightColumn'] = "\$GLOBALS['TmplDisplay']['PageRightFmt']";
Markup_e('noright', 'directives', '/\\(:noright:\\)/i', "SetTmplDisplay('PageRightFmt',0)");
$FmtPV['$ActionBar'] = "\$GLOBALS['TmplDisplay']['PageActionFmt']";
Markup_e('noaction', 'directives', '/\\(:noaction:\\)/i', "SetTmplDisplay('PageActionFmt',0)");
$FmtPV['$TabsBar'] = "\$GLOBALS['TmplDisplay']['PageTabsFmt']";
Markup_e('notabs', 'directives', '/\\(:notabs:\\)/i', "SetTmplDisplay('PageTabsFmt',0)");
$FmtPV['$SearchBar'] = "\$GLOBALS['TmplDisplay']['PageSearchFmt']";
Markup_e('nosearch', 'directives', '/\\(:nosearch:\\)/i', "SetTmplDisplay('PageSearchFmt',0)");
$FmtPV['$TitleGroup'] = "\$GLOBALS['TmplDisplay']['PageTitleGroupFmt']";
Markup_e('notitlegroup', 'directives', '/\\(:notitlegroup:\\)/i', "SetTmplDisplay('PageTitleGroupFmt',0)");
Markup_e('notitle', 'directives', '/\\(:notitle:\\)/i', "SetTmplDisplay('PageTitleFmt',0); SetTmplDisplay('PageTitleGroupFmt',0)");
Markup('fieldset', 'inline', '/\\(:fieldset:\\)/i', "<fieldset>");
Markup('fieldsetend', 'inline', '/\\(:fieldsetend:\\)/i', "</fieldset>");
# Override pmwiki styles otherwise they will override styles declared in css
global $HTMLStylesFmt;
$HTMLStylesFmt['pmwiki'] = '';
# Add a custom page storage location
global $WikiLibDirs;
$PageStorePath = dirname(__FILE__) . "/wikilib.d/{\$FullName}";
$where = count($WikiLibDirs);
if ($where > 1) {
$where--;
}
array_splice($WikiLibDirs, $where, 0, array(new PageStore($PageStorePath)));
# ----------------------------------------
# - Standard Skin Functions
示例7: markup
}
/* Copyright 2007-2014 Patrick R. Michaud (pmichaud@pobox.com)
This file is part of PmWiki; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. See pmwiki.php for full details.
This script adds Creole v0.4 markup (http://www.wikicreole.org/)
to PmWiki. To activate this script, simply add the following into
a local customization file:
include_once('scripts/creole.php');
*/
## **strong**
Markup('**', 'inline', '/^\\*\\*(?>(.+?)\\*\\*)(?!\\S)|(?<!^)\\*\\*(.+?)\\*\\*/', '<strong>$1$2</strong>');
## //emphasized//
Markup('//', 'inline', '/(?<!http:|https:|ftp:)\\/\\/(.*?)\\/\\//', '<em>$1</em>');
## == Headings ==
Markup_e('^=', 'block', '/^(={1,6})\\s?(.*?)(\\s*=*\\s*)$/', "'<:block,1><h'.strlen(\$m[1]).'>'.\$m[2].'</h'.strlen(\$m[1]).'>'");
## Line breaks
Markup('\\\\', 'inline', '/\\\\\\\\/', '<br />');
## Preformatted
Markup_e('^{{{', '[=', "/^\\{\\{\\{\n(.*?\n)\\}\\}\\}[^\\S\n]*\n/sm", "Keep('<pre class=\"escaped\">'.\$m[1].'</pre>')");
Markup_e('{{{', '>{{{', '/\\{\\{\\{(.*?)\\}\\}\\}/s', "Keep('<code class=\"escaped\">'.\$m[1].'</code>')");
## Tables
Markup_e('|-table', '>^||', '/^\\|(.*)$/', "FormatTableRow(\$m[0], '\\|')");
## Images
Markup_e('{{', 'inline', '/\\{\\{(?>(\\L))([^|\\]]*)(?:\\|\\s*(.*?)\\s*)?\\}\\}/', "Keep(\$GLOBALS['LinkFunctions'][\$m[1]](\$pagename, \$m[1], \$m[2], \$m[3],\n \$m[1].\$m[2], \$GLOBALS['ImgTagFmt']),'L')");
## GUIButtons
SDVA($GUIButtons, array('em' => array(100, "//", "//", '$[Emphasized]', '$GUIButtonDirUrlFmt/em.gif"$[Emphasized (italic)]"', '$[ak_em]'), 'strong' => array(110, "**", "**", '$[Strong]', '$GUIButtonDirUrlFmt/strong.gif"$[Strong (bold)]"', '$[ak_strong]'), 'h2' => array(400, '\\n== ', ' ==\\n', '$[Heading]', '$GUIButtonDirUrlFmt/h.gif"$[Heading]"')));
示例8: preg_replace
"<caption>{$opt['caption']}</caption>");
$class = preg_replace('/[^-\\s\\w]+/', ' ', @$opt['class']);
if (strpos($class, 'horiz') !== false)
{ $sep = ''; $pretext = $MarkupWordwrapFunction($text, 40); }
else
{ $sep = '</tr><tr>'; $pretext = $MarkupWordwrapFunction($text, 75); }
return Keep(@"<table class='markup $class' align='center'>$caption
<tr><td class='markup1' valign='top'><$MarkupWrapTag>$pretext</$MarkupWrapTag></td>$sep<td
class='markup2' valign='top'>$html</td></tr></table>");
}
Markup_e('markup', '<[=',
"/\\(:markup(\\s+([^\n]*?))?:\\)[^\\S\n]*\\[([=@])(.*?)\\3\\]/si",
"MarkupMarkup(\$pagename, \$m[4], \$m[2])");
Markup_e('markupend', '>markup',
"/\\(:markup(\\s+([^\n]*?))?:\\)[^\\S\n]*\n(.*?)\\(:markupend:\\)/si",
"MarkupMarkup(\$pagename, \$m[3], \$m[1])");
SDV($HTMLStylesFmt['markup'], "
table.markup { border:2px dotted #ccf; width:90%; }
td.markup1, td.markup2 { padding-left:10px; padding-right:10px; }
table.vert td.markup1 { border-bottom:1px solid #ccf; }
table.horiz td.markup1 { width:23em; border-right:1px solid #ccf; }
table.markup caption { text-align:left; }
div.faq p, div.faq pre { margin-left:2em; }
div.faq p.question { margin:1em 0 0.75em 0; font-weight:bold; }
div.faqtoc div.faq * { display:none; }
div.faqtoc div.faq p.question
{ display:block; font-weight:normal; margin:0.5em 0 0.5em 20px; line-height:normal; }
div.faqtoc div.faq p.question * { display:inline; }
");
示例9: list
(:bdropdown title=Groups <other params> :)
where title is the setting for the dropdown group, and <other params> are standard pagelist parameters
NOTE: proper display requires the containing list (ul or ol) to have the class "nav" applied
this must be applied to the first item on the list, if it is not the dropdown
AFAIK, this cannot be done programmatically from within this markup code
NOTE: use of multiple link= targets requires the PageListMultiTargets recipe
http://www.pmwiki.org/wiki/Cookbook/PageListMultiTargets
currently this is included via config.php
Should include it here w/in recipe
Inspired by code from https://github.com/tamouse/pmwiki-bootstrap-skin/blob/dropdowns/bootstrap.php
*/
Markup_e("bdropdown", ">links", "/\\(:bdropdown\\s*(.*?)\\s*:\\)/", "BDropdownMenu(\$m[1])");
/* NOTE: the "B" prefix is temporary, as previous markup uses the same names (without "B" prefix)
Once that code is removed, this should be updated to remove the "B"
*/
function BDropdownMenu($inp)
{
$defaults = array('title' => 'Dropdown');
$args = array_merge($defaults, ParseArgs($inp));
// $inline_code_begin = "<li class='dropdown'><a href='#' class='dropdown-toggle' data-toggle='dropdown'>".$args['title']."<b class='caret'></b></a><ul class='dropdown-menu'>";
$inline_code_begin = "<li class='dropdown'><a href='#' class='dropdown-toggle' data-toggle='dropdown'>" . $args['title'];
$inline_code_begin .= "<b class='caret'></b></a><ul class='dropdown-menu'>";
// if we're using MakePageList, we have to pass ALL the opts along...
// in this case, named $args
$group_list = BGetWikiPages($args);
$formatted_list = BBuildGroupList($group_list);
$inline_code_end = "</ul></li>";
示例10: Markup_e
$FmtPV['$BreadCrumb'] = 'ClusterSlice($pn, "separator=\'' . $ClusterBreadCrumbSeparator . '\' return=links")';
$FmtPV['$BreadCrumbTitle'] = 'ClusterSlice($pn, "separator=\'' . $ClusterBreadCrumbSeparator . '\' return=links title=true space=true ")';
$FmtPV['$BreadCrumbNoTitle'] = 'ClusterSlice($pn, "separator=\'' . $ClusterBreadCrumbSeparator . '\' return=links title=false space=false ")';
# Grouptitle PVs
$FmtPV['$GroupTitle'] = 'ClusterSlice($pn, "start=-1 name=false return=names title=true space=false")';
$FmtPV['$GroupTitlespaced'] = 'ClusterSlice($pn, "start=-1 name=false return=names title=true space=true")';
# Subpage PVs
$FmtPV['$ClusterSideBar'] = 'ClusterPageName($group, "SideBar", $name)';
$FmtPV['$ClusterRightBar'] = 'ClusterPageName($group, "RightBar", $name)';
/* ================================================================
* Markup and directives
*/
# Markup for link shortcuts
if (function_exists('Markup_e')) {
# added by Petko Yotov
Markup_e('[[cluster', '<links', '/\\[\\[(-|[\\*\\^]+)(.*?)\\]\\]/', "ClusterLinks(\$pagename, \$m[1], \$m[2])");
Markup('clusterslice', 'directives', '/\\(:clusterslice\\s*(.*?):\\)/i', "ClusterSlice(\$pagename, \$m[1])");
} else {
Markup('[[cluster', '<links', '/\\[\\[(-|[\\*\\^]+)(.*?)\\]\\]/e', "ClusterLinks(\$pagename, '\$1', PSS('\$2'))");
Markup('clusterslice', 'directives', '/\\(:clusterslice\\s*(.*?):\\)/ei', "ClusterSlice(\$pagename, PSS('\$1'))");
}
/* ================================================================
* Search Patterns
* If using name-based clustering, hide the name-based special pages
*/
if ($ClusterEnableNameClustering) {
$SearchPatterns['normal']['clustername1'] = '!\\' . $ClusterSeparator . 'Group(Print)?(Header|Footer|Attributes)$!';
$SearchPatterns['normal']['clustername2'] = '!\\' . $ClusterSeparator . '(Side|Right|Menu)Bar$!';
}
/* ================================================================
* Set up clustered configurations
示例11: bi_blogitMU_Handler
$FmtPV['$bi_PagePrev'] = $bi_CurrentPage > 0 ? $bi_CurrentPage - 1 : 0;
$FmtPV['$bi_EntryStart'] = ($bi_CurrentPage - 1) * $bi_EntryCount + 1;
$FmtPV['$bi_EntryEnd'] = $FmtPV['$bi_EntryStart'] + $bi_EntryCount - 1;
// ----------------------------------------
// - Markup
function bi_blogitMU_Handler($m)
{
$func = 'blogitMU_' . $m[1];
return $func($m[2], $m[3]);
}
if (function_exists('Markup_e')) {
//PmWiki 2.2.58+ / PHP5
Markup_e('blogit', 'fulltext', '/\\(:blogit (list|cleantext)\\s?(.*?):\\)(.*?)\\(:blogitend:\\)/si', "bi_blogitMU_Handler(\$m)");
//need to use an interim handler
Markup_e('blogit-skin', 'fulltext', '/\\(:blogit-skin ' . '(date|intro|author|tags|edit|newentry|delete|commentcount|date|commentauthor|commentapprove|commentdelete|commentedit|commentreply|commentblock|commenttext|commentid)' . '\\s?(.*?):\\)(.*?)\\(:blogit-skinend:\\)/si', "blogitSkinMU(\$m[1], \$m[2], \$m[3])");
Markup_e('includesection', '>if', '/\\(:includesection\\s+(\\S.*?):\\)/i', "PRR(bi_includeSection(\$GLOBALS['bi_Pagename'], \$m[1].' '.\$GLOBALS['bi_TemplateList']))");
} else {
//PmWiki 2.2.58-, pre PHP5
Markup('blogit', 'fulltext', '/\\(:blogit (list|cleantext)\\s?(.*?):\\)(.*?)\\(:blogitend:\\)/esi', "blogitMU_\$1(PSS('\$2'), PSS('\$3'))");
Markup('blogit-skin', 'fulltext', '/\\(:blogit-skin ' . '(date|intro|author|tags|edit|newentry|delete|commentcount|date|commentauthor|commentapprove|commentdelete|commentedit|commentreply|commentblock|commenttext|commentid)' . '\\s?(.*?):\\)(.*?)\\(:blogit-skinend:\\)/esi', "blogitSkinMU('\$1', PSS('\$2'), PSS('\$3'))");
Markup('includesection', '>if', '/\\(:includesection\\s+(\\S.*?):\\)/ei', "PRR(bi_includeSection(\$GLOBALS['bi_Pagename'], PSS('\$1 '.\$GLOBALS['bi_TemplateList'])))");
}
$SaveAttrPatterns['/\\(:includesection\\s.*?:\\)/i'] = ' ';
//prevents include sections becoming part of page targets list
if (IsEnabled($EnableGUIButtons) && $FmtPV['$bi_Mode'] != 'ajax') {
if ($action == 'bi_be' || $action == 'bi_ne' || $action == 'pmform' && $_REQUEST['target'] == 'blogit-entry') {
include_once $bi_Paths['guiedit'];
}
//PmWiki only includes this automatically if action=edit.
} else {
Markup('e_guibuttons', 'directives', '/\\(:e_guibuttons:\\)/', '');
示例12: Anomen
displays the pmwiki feed in long layout and the top 5 lines
(:RSS http://www.pmichaud.com/wiki/Pm/AllRecentChanges?action=rss long 5 :)
displays the pmwiki feed in short layout and all lines in the feed
(:RSS http://www.pmichaud.com/wiki/Pm/AllRecentChanges?action=rss short -1 :)
Copyright 2006-2011 Anomen (ludek_h@seznam.cz)
Copyright 2005 http://www.brambring.nl
Copyright 2005 http://mypage.iu.edu/~mweiner/index.html
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
*/
$RecipeInfo['RSSDisplay']['Version'] = '2016-01-14';
if (function_exists('Markup_e')) {
Markup_e('rssdisplay', 'fulltext', '/\\(:RSS\\s*(.*?)\\s*:\\)/', "MagpieRSS(\$m[1])");
} else {
Markup('rssdisplay', 'fulltext', '/\\(:RSS\\s*(.*?)\\s*:\\)/e', "MagpieRSS('\$1')");
}
SDV($MagpieDir, "{$FarmD}/cookbook/magpie");
SDV($MagpieDebug, false);
SDV($MagpieEnableCache, false);
SDV($MagpieCacheAge, 2 * 60 * 60);
SDV($MagpieCacheDir, "{$FarmD}/cache");
SDV($MagpieFetchTimeout, 15);
SDV($MagpieGzip, true);
SDV($MagpieProxy, '');
SDV($MagpieDefaultItems, 30);
SDV($MagpieDefaultShowHeader, true);
SDV($MagpieDefaultShowDate, false);
SDV($MagpieDefaultShowContent, true);
示例13: any
if (!defined('PmWiki')) {
exit;
}
/* PmWiki PhotoGallery skin
*
* Examples at: http://pmwiki.com/Cookbook/PhotoGallery and http://solidgone.com/Skins/
* License: Copyright (c)2016 David Gilbert. This work is licensed under a [[http://creativecommons.org/licenses/by-sa/4.0/ | Creative Commons Attribution-Share Alike 4.0 International]] License. Please retain the links in the footer.
*/
global $FmtPV;
$FmtPV['$SkinName'] = '"PhotoGallery"';
$FmtPV['$SkinVersion'] = '"0.4.1"';
$FmtPV['$SkinDate'] = '"20160225"';
## Move any (:noleft:) or SetTmplDisplay('PageLeftFmt', 0); directives to variables for access in jScript.
$FmtPV['$TabsBar'] = "\$GLOBALS['TmplDisplay']['PageTabsFmt']";
Markup_e('notabs', 'directives', '/\\(:notabs:\\)/i', "SetTmplDisplay('PageTabsFmt',0)");
Markup_e('album', 'inline', "/\\(:album\\s*(.*?):\\)/s", "Keep(album(\$m[1]))");
# ----------------------------------------
# - Standard Skin Setup
# ----------------------------------------
$FmtPV['$WikiTitle'] = '$GLOBALS["WikiTitle"]';
# Define a link stye for new page links
global $LinkPageCreateFmt;
SDV($LinkPageCreateFmt, "<a class='createlinktext' href='\$PageUrl?action=edit'>\$LinkText</a>");
# Default color scheme
global $SkinColor, $ValidSkinColors;
if (!is_array($ValidSkinColors)) {
$ValidSkinColors = array();
}
array_push($ValidSkinColors, 'red', 'blue', 'orange', 'yellow', 'green', 'lightblue');
if (isset($_GET['color']) && in_array($_GET['color'], $ValidSkinColors)) {
$SkinColor = $_GET['color'];
示例14: add
/*
This script adds support for gps coordinates conversion and displaying at maps
- add (:geo [args] coords :) tag functionality
Copyright 2006-2016 Anomen (ludek_h@seznam.cz)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
TODO:
* GPX export (see sourceblock for howto)
*/
$RecipeInfo['Geobox']['Version'] = '2016-10-12';
if (function_exists('Markup_e')) {
Markup_e('geo', 'fulltext', '/\\(:geo\\s+((?:[dmsDMS,.]+:\\s+)?(?:[a-z]+=\\S+\\s+)*)?(.*?)\\s*:\\)/', "geobox_maps(strtolower(\$m[1]),\$m[2])");
} else {
Markup('geo', 'fulltext', '/\\(:geo\\s+((?:[dmsDMS,.]+:\\s+)?(?:[a-z]+=\\S+\\s+)*)?(.*?)\\s*:\\)/e', "geobox_maps(strtolower('\$1'),'\$2')");
}
SDV($GeoBoxDefaultFormat, 'dm');
SDVA($GeoBoxLinks, array('maps.google.com' => 'http://maps.google.com/?q=$N%20$E', 'mapy.cz' => 'https://www.mapy.cz/?st=search&fr=$N+$E', 'geocaching.com/maps' => 'http://www.geocaching.com/map/default.aspx?lat=$N&lng=$E', 'geocaching.com/near' => 'http://www.geocaching.com/seek/nearest.aspx?lat=$N&lng=$E&f=1'));
function geobox_asint($m, $index)
{
$res = 0;
if (isset($m[$index])) {
$res = strtr($m[$index], ',', '.');
}
return $res;
}
function geobox_p()
{
示例15: SDV
## The section below handles specialized EditForm pages.
## We don't bother to load it if we're not editing.
if ($action != 'edit') return;
SDV($PageEditForm, '$SiteGroup.EditForm');
SDV($PageEditFmt, '$EditForm');
if (@$_REQUEST['editform']) {
$PageEditForm=$_REQUEST['editform'];
$PageEditFmt='$EditForm';
}
$Conditions['e_preview'] = '(boolean)$_REQUEST["preview"]';
# (:e_preview:) displays the preview of formatted text.
Markup_e('e_preview', 'directives',
'/^\\(:e_preview:\\)/',
"isset(\$GLOBALS['FmtV']['\$PreviewText']) ? Keep(\$GLOBALS['FmtV']['\$PreviewText']): ''");
# If we didn't load guiedit.php, then set (:e_guibuttons:) to
# simply be empty.
Markup('e_guibuttons', 'directives', '/\\(:e_guibuttons:\\)/', '');
# Prevent (:e_preview:) and (:e_guibuttons:) from
# participating in text rendering step.
SDV($SaveAttrPatterns['/\\(:e_(preview|guibuttons):\\)/'], ' ');
SDVA($InputTags['e_form'], array(
':html' => "<form action='{\$PageUrl}?action=edit' method='post'
\$InputFormArgs><input type='hidden' name='action' value='edit'
/><input type='hidden' name='n' value='{\$FullName}'
/><input type='hidden' name='basetime' value='\$EditBaseTime'