本文整理汇总了PHP中tpl_getLang函数的典型用法代码示例。如果您正苦于以下问题:PHP tpl_getLang函数的具体用法?PHP tpl_getLang怎么用?PHP tpl_getLang使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tpl_getLang函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tpl_breadcrumbs_bootstrap
/**
* Print the breadcrumbs trace with Bootstrap class
*
* @author Nicolas GERARD
*
* @param string $sep Separator between entries
* @return bool
*/
function tpl_breadcrumbs_bootstrap($sep = '�')
{
global $conf;
global $lang;
//check if enabled
if (!$conf['breadcrumbs']) {
return false;
}
$crumbs = array_reverse(breadcrumbs());
//setup crumb trace
$last = count($crumbs);
$i = 0;
echo '<ol class="breadcrumb">' . PHP_EOL;
foreach ($crumbs as $id => $name) {
$i++;
if ($i == $last) {
print '<li class="active">';
} else {
print '<li>';
}
if ($i == 1) {
// Try to get the template custom breadcrumb
$breadCrumb = tpl_getLang('breadcrumb');
if ($breadCrumb == '') {
// If not present for the language, get the default one
$breadCrumb = $lang['breadcrumb'];
}
echo $breadCrumb . ': ';
}
tpl_link(wl($id), hsc($name), 'title="' . $id . '"');
print '</li>' . PHP_EOL;
}
echo '</ol>' . PHP_EOL;
return true;
}
示例2: _tpl_action
/**
* Wrapper around custom template actions
*
* @author Anika Henke <anika@selfthinker.org>
*/
function _tpl_action($type, $link = 0, $wrapper = 0)
{
switch ($type) {
case 'userpage':
if (tpl_getConf('userPage')) {
_tpl_userpage(tpl_getConf('userPage'), tpl_getLang('userpage'), $link, $wrapper);
}
break;
}
}
示例3: form
/**
* Create the actual editing form
*/
public function form()
{
global $conf;
global $ID;
define('SIMPLE_TEST', 1);
// hack, ideally certain functions should be moved out of css.php
require_once DOKU_INC . 'lib/exe/css.php';
$styleini = css_styleini($conf['template'], true);
$replacements = $styleini['replacements'];
if ($this->ispopup) {
$target = DOKU_BASE . 'lib/plugins/styling/popup.php';
} else {
$target = wl($ID, array('do' => 'admin', 'page' => 'styling'));
}
if (empty($replacements)) {
echo '<p class="error">' . $this->getLang('error') . '</p>';
} else {
echo $this->locale_xhtml('intro');
echo '<form class="styling" method="post" action="' . $target . '">';
echo '<table><tbody>';
foreach ($replacements as $key => $value) {
$name = tpl_getLang($key);
if (empty($name)) {
$name = $this->getLang($key);
}
if (empty($name)) {
$name = $key;
}
echo '<tr>';
echo '<td><label for="tpl__' . hsc($key) . '">' . $name . '</label></td>';
echo '<td><input type="text" name="tpl[' . hsc($key) . ']" id="tpl__' . hsc($key) . '" value="' . hsc($value) . '" ' . $this->colorClass($key) . ' dir="ltr" /></td>';
echo '</tr>';
}
echo '</tbody></table>';
echo '<p>';
echo '<button type="submit" name="run[preview]" class="btn_preview primary">' . $this->getLang('btn_preview') . '</button> ';
echo '<button type="submit" name="run[reset]">' . $this->getLang('btn_reset') . '</button>';
#FIXME only if preview.ini exists
echo '</p>';
echo '<p>';
echo '<button type="submit" name="run[save]" class="primary">' . $this->getLang('btn_save') . '</button>';
echo '</p>';
echo '<p>';
echo '<button type="submit" name="run[revert]">' . $this->getLang('btn_revert') . '</button>';
#FIXME only if local.ini exists
echo '</p>';
echo '</form>';
echo tpl_locale_xhtml('style');
}
}
示例4: _tpl_userpage
/**
* Create link/button to user page
*
* @author Anika Henke <anika@selfthinker.org>
*/
function _tpl_userpage($userNS = 'user', $link = 0, $wrapper = false)
{
if (!$_SERVER['REMOTE_USER']) {
return;
}
global $conf;
$userPage = $userNS . ':' . $_SERVER['REMOTE_USER'] . ':' . $conf['start'];
if ($wrapper) {
echo "<{$wrapper}>";
}
if ($link) {
tpl_pagelink($userPage, tpl_getLang('userpage'));
} else {
echo html_btn('userpage', $userPage, '', array(), 0, 0, tpl_getLang('userpage'));
}
if ($wrapper) {
echo "</{$wrapper}>";
}
}
示例5: tpl_getConf
}
if (!isset($conf['sidebar'])) {
$conf['sidebar'] = tpl_getConf('sidebarID');
}
/* these $lang strings are now in the core */
if (!isset($lang['user_tools'])) {
$lang['user_tools'] = tpl_getLang('user_tools');
}
if (!isset($lang['site_tools'])) {
$lang['site_tools'] = tpl_getLang('site_tools');
}
if (!isset($lang['page_tools'])) {
$lang['page_tools'] = tpl_getLang('page_tools');
}
if (!isset($lang['skip_to_content'])) {
$lang['skip_to_content'] = tpl_getLang('skip_to_content');
}
/**
* copied from core (available since Adora Belle)
*/
if (!function_exists('tpl_getMediaFile')) {
function tpl_getMediaFile($search, $abs = false, &$imginfo = null)
{
$img = '';
$file = '';
$ismedia = false;
// loop through candidates until a match was found:
foreach ($search as $img) {
if (substr($img, 0, 1) == ':') {
$file = mediaFN($img);
$ismedia = true;
示例6: tpl_link
if (strpos(tpl_getConf('elements'), 'header_title') !== false and $conf['title'] != null) {
?>
<div id="dokuwiki__title" class='container col-12 justify-center'>
<?php
tpl_link(wl(), '<span>' . $conf['title'] . '</span>', 'accesskey="h" title="' . tpl_getLang('wikihome') . ' [H]" class="color-white"');
?>
</div>
<?php
}
?>
<?php
if (strpos(tpl_getConf('elements'), 'header_tagline') !== false and $conf['tagline'] != null) {
?>
<div id="dokuwiki__tagline" class='container col-12 justify-center'>
<?php
tpl_link(wl(), '<span>' . $conf['tagline'] . '</span>', 'accesskey="h" title="' . tpl_getLang('wikihome') . ' [H]" class="color-dark"');
?>
</div>
<?php
}
?>
</div><!-- #mixture__brand_text -->
<?php
}
?>
</div><!-- #mixture__brand -->
<!-- NAVIGATION -->
<div id="mixture__menu" class="container<?php
echo _mixture_area_width("main_nav");
?>
col-md-auto">
示例7: dirname
?>
<?php
@(include dirname(__FILE__) . '/pagefooter.html');
?>
</div></div><!-- /content -->
<div class="clearer"></div>
<hr class="a11y" />
<!-- PAGE ACTIONS -->
<?php
if ($showTools) {
?>
<div id="dokuwiki__pagetools">
<h3 class="a11y"><?php
echo tpl_getLang('page_tools');
?>
</h3>
<ul>
<?php
tpl_action('edit', 1, 'li');
if (tpl_getConf('discussionNS')) {
_tpl_discussion(tpl_getConf('discussionNS'), 1, 'li', tpl_getConf('discussNSreverse'));
}
tpl_action('history', 1, 'li');
tpl_action('backlink', 1, 'li');
tpl_action('subscribe', 1, 'li');
tpl_action('revert', 1, 'li');
tpl_action('top', 1, 'li');
?>
</ul>
示例8: plugin_list
* DokuWiki Bootstrap3 Template: Administration Menu
*
* @link http://dokuwiki.org/template:bootstrap3
* @author Giuseppe Di Terlizzi <giuseppe.diterlizzi@gmail.com>
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*/
// must be run from within DokuWiki
if (!defined('DOKU_INC')) {
die;
}
global $ID, $auth;
if (bootstrap3_conf('showAdminMenu')) {
$admin_plugins = plugin_list('admin');
$administrative_tasks = array('usermanager', 'acl', 'extension', 'config', 'styling', 'revert', 'popularity');
$additional_plugins = array_diff($admin_plugins, $administrative_tasks);
$admin = array('administrative_tasks' => array('label' => tpl_getLang('administrative_tasks'), 'plugins' => $administrative_tasks), 'additional_plugins' => array('label' => tpl_getLang('additional_plugins'), 'plugins' => $additional_plugins));
?>
<ul class="nav navbar-nav" id="dw__admin">
<li class="dropdown dropdown-large">
<a href="<?php
wl($ID);
?>
" class="dropdown-toggle" data-target="#" data-toggle="dropdown" title="<?php
echo $lang['btn_admin'];
?>
" role="button" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-fw fa-cogs"></i> <span class="<?php
echo in_array('admin', bootstrap3_conf('navbarLabels')) ? '' : 'hidden-lg hidden-md hidden-sm';
?>
"> <?php
示例9: tpl_getLang
* @link http://dokuwiki.org/template:bootstrap3
* @author Giuseppe Di Terlizzi <giuseppe.diterlizzi@gmail.com>
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*/
// must be run from within DokuWiki
if (!defined('DOKU_INC')) {
die;
}
if (bootstrap3_conf('showThemeSwitcher')) {
?>
<!-- theme-switcher -->
<ul class="nav navbar-nav" id="dw__themes">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-fw fa-tint"></i> <span class="hidden-lg hidden-md hidden-sm"><?php
echo tpl_getLang('themes');
?>
</span> <span class="caret"></span></a>
<ul class="dropdown-menu" aria-labelledby="themes">
<li class="dropdown-header"><i class="fa fa-fw fa-tint"></i> Bootswatch Themes</li>
<?php
foreach (bootstrap3_bootswatch_themes_available() as $theme) {
?>
<li<?php
echo $bootswatchTheme == $theme ? ' class="active"' : '';
?>
>
<a href="?bootswatch-theme=<?php
echo hsc($theme);
?>
示例10: plugin_list
* DokuWiki Bootstrap3 Template: Administration Menu
*
* @link http://dokuwiki.org/template:bootstrap3
* @author Giuseppe Di Terlizzi <giuseppe.diterlizzi@gmail.com>
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*/
// must be run from within DokuWiki
if (!defined('DOKU_INC')) {
die;
}
global $ID, $auth;
if (bootstrap3_conf('showAdminMenu')) {
$admin_plugins = plugin_list('admin');
$administrative_tasks = array('usermanager', 'acl', 'extension', 'config', 'styling', 'revert', 'popularity');
$additional_plugins = array_diff($admin_plugins, $administrative_tasks);
$plugins = array(tpl_getLang('administrative_tasks') => $administrative_tasks, tpl_getLang('additional_plugins') => $additional_plugins);
?>
<ul class="nav navbar-nav">
<li class="dropdown dropdown-large">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" title="<?php
echo $lang['btn_admin'];
?>
">
<i class="fa fa-fw fa-cogs"></i> <span class="hidden-lg hidden-md hidden-sm"><?php
echo $lang['btn_admin'];
?>
</span> <span class="caret"></span>
</a>
<ul class="dropdown-menu dropdown-menu-large" role="menu">
示例11: tpl_action
?>
</span></a>
</li>
<li><br><hr></li>
<?php
}
?>
<?php
tpl_action('edit', 1, 'li', 0, '<span>', '</span>');
tpl_action('revert', 1, 'li', 0, '<span>', '</span>');
tpl_action('top', 1, 'li', 0, '<span>', '</span>');
?>
<li onmouseup="window.print()">
<a href="" class="action print"><span><?php
echo tpl_getLang('btn_print');
?>
</span></a>
</li>
<?php
tpl_action('subscribe', 1, 'li', 0, '<span>', '</span>');
tpl_action('revisions', 1, 'li', 0, '<span>', '</span>');
tpl_action('backlink', 1, 'li', 0, '<span>', '</span>');
?>
<li><br><hr></li>
<?php
tpl_action('admin', 1, 'li', 0, '<span>', '</span>');
tpl_action('profile', 1, 'li', 0, '<span>', '</span>');
tpl_action('recent', 1, 'li', 0, '<span>', '</span>');
tpl_action('media', 1, 'li', 0, '<span>', '</span>');
示例12: _mixture_glyph
if (strpos(tpl_getConf('elements'), 'header_topbar_links') !== false) {
?>
<div id="mixture__topbar_links" class="col-1 sm-display-none container items-center justify-center">
<ul class="container items-center justify-center">
<li class="has-dropdown"><a href="#" class="btn btn-xs radius background-color-info color-auto"><?php
echo _mixture_glyph("link");
echo _mixture_glyph("has-dropdown");
?>
</a>
<?php
echo _mixture_topbar_links($topbar, 'dropdown');
?>
</li>
<li class="has-overlay">
<label class="btn btn-xs radius background-color-info color-auto" for="mixture__links_overlay_check" title="<?php
echo tpl_getLang('relatedLinks');
?>
"><?php
echo _mixture_glyph("link");
?>
</label><input type="checkbox" id="mixture__links_overlay_check" class="js-modal-check" />
<div id="mixture__links_overlay" class="mixture-overlay">
<div class="container full-width">
<div class="modal col-11 col-xs-9 col-sm-7 col-md-5 col-lg-3 container full-width">
<label for="mixture__links_overlay_check" class="btn btn-sm radius background-color-info color-white"><?php
echo _mixture_glyph("close", "close");
?>
</label>
<?php
echo _mixture_topbar_links($topbar, 'modal');
?>
示例13: if
</ul>
</div><!-- /inner-inner -->
</div><!-- /inner-wrapper -->
<div class="corner-bottom"><div class="corner-bottom-right corner"></div><div class="corner-bottom-left corner"></div></div>
</div><!-- /inner -->
</div><!-- /block -->
<?php endif ?>
<?php if ($conf['useacl'] && $showTools): ?>
<div class="block block-user odd first last fusion-bold-links marina-rounded-corners marina-title-green grid16-16" id="block-user-2">
<div class="inner">
<div class="corner-top"><div class="corner-top-right corner"></div><div class="corner-top-left corner"></div></div>
<div class="inner-wrapper">
<div id="dokuwiki__usertools" class="inner-inner" style="border: medium none; position: relative;">
<div class="block-icon pngfix"></div>
<!-- USER TOOLS -->
<h2 class="title block-title a11y"><?php echo tpl_getLang('user_tools') ?></h2>
<ul class="menu">
<?php if ($_SERVER['REMOTE_USER']): ?>
<li class="user">
<?php tpl_userinfo(); ?>
</li>
<?php endif ?>
<?php
tpl_action('admin', 1, 'li');
_tpl_action('userpage', 1, 'li');
tpl_action('profile', 1, 'li');
_tpl_action('register', 1, 'li'); /* DW versions > 2011-02-20 can use the core function tpl_action('register', 1, 'li') */
tpl_action('login', 1, 'li');
?>
</ul>
</div><!-- /inner-inner -->
示例14: bootstrap3_fluid_container_button
?>
<ul class="nav navbar-nav">
<?php
if ($fluidContainerBtn) {
?>
<li class="hidden-xs<?php
echo bootstrap3_fluid_container_button() ? ' active' : '';
?>
">
<a href="#" class="fluid-container" title="<?php
echo tpl_getLang('expand_container');
?>
"><i class="fa fa-fw fa-arrows-alt"></i><span class="hidden-lg hidden-md hidden-sm"> <?php
echo tpl_getLang('expand_container');
?>
</span></a>
</li>
<?php
}
?>
<?php
if (empty($_SERVER['REMOTE_USER'])) {
?>
<li>
<span class="dw__actions">
<?php
echo bootstrap3_action_item('register', 'fa fa-fw fa-user-plus', true);
if ($showLoginLink) {
示例15: tpl_getLang
<li class="dropdown" id="custom">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
Custom Dropdown<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="./wiki:syntax">Templar Dokuwiki Syntax</a></li>
<li><a href="./wiki:sidebar">Sidebar Page</a></li>
</ul>
</li>
<li class="dropdown" id="dokuwiki__sitetools">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php
echo tpl_getLang('site_tools');
?>
<b class="caret"></b></a>
<ul class="dropdown-menu">
<?php
tpl_action('recent', 1, 'li');
tpl_action('media', 1, 'li');
tpl_action('index', 1, 'li');
?>
</ul>
</li>