• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP tpl_link函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中tpl_link函数的典型用法代码示例。如果您正苦于以下问题:PHP tpl_link函数的具体用法?PHP tpl_link怎么用?PHP tpl_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了tpl_link函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: white_breadcrumbs

function white_breadcrumbs()
{
    global $lang;
    global $conf;
    //check if enabled
    if (!$conf['breadcrumbs']) {
        return false;
    }
    $crumbs = breadcrumbs();
    //setup crumb trace
    $crumbs_sep = ' <span class="bcsep">' . $sep . '</span> ';
    //render crumbs, highlight the last one
    print '<h3>' . $lang['breadcrumb'] . '</h3>';
    $last = count($crumbs);
    $i = 0;
    print '<ul>';
    foreach ($crumbs as $id => $name) {
        $i++;
        print '<li>';
        if ($i == $last) {
            print '<span class="curid">';
        }
        tpl_link(wl($id), hsc($name), 'class="breadcrumbs" title="' . $id . '"');
        if ($i == $last) {
            print '</span>';
        }
        print '</li>';
    }
    print '</ul>';
    return true;
}
开发者ID:ipari,项目名称:dokuwiki-template-white,代码行数:31,代码来源:tpl_functions.php


示例2: siteexport_add_page_export

 function siteexport_add_page_export(&$event)
 {
     global $ID;
     if ($this->getConf('allowallusers') || auth_isadmin() || auth_ismanager()) {
         $event->data['items'][] = '<li>' . tpl_link(wl($ID, array('do' => 'siteexport_addpage')), '<span>Export Page</span>', 'class="action siteexport_addpage" title="Add page"', 1) . '</li>';
     }
 }
开发者ID:omusico,项目名称:isle-web-framework,代码行数:7,代码来源:startup.php


示例3: _tpl_register

/**
 * Create link/button to register page
 * DW versions > 2011-02-20 can use the core function tpl_action('register')
 *
 * @author Anika Henke <[email protected]>
 */
function _tpl_register($link=0,$wrapper=0) {
    global $conf;
    global $lang;
    global $ID;
    $lang_register = !empty($lang['btn_register']) ? $lang['btn_register'] : $lang['register'];

    if ($_SERVER['REMOTE_USER'] || !$conf['useacl'] || !actionOK('register')) return;

    if ($wrapper) echo "<$wrapper>";

    if ($link)
        tpl_link(wl($ID,'do=register'),$lang_register,'class="action register" rel="nofollow"');
    else
        echo html_btn('register',$ID,'',array('do'=>'register'),'get',0,$lang_register);

    if ($wrapper) echo "</$wrapper>";
}
开发者ID:neverpanic,项目名称:dokuwiki-template-acquia-marina,代码行数:23,代码来源:tpl_functions.php


示例4: tpl_actionlink

tpl_actionlink('admin', '', '', '<img src="' . $DOKU_TPL . 'images/16/admin.png" title="Admin" alt="Admin"></img>');
tpl_actionlink('profile', '', '', '<img src="' . $DOKU_TPL . 'images/16/user.png" title="Profile" alt="Profile"></img>');
tpl_actionlink('login', '', '', '<img src="' . $DOKU_TPL . 'images/16/logged_in.png" title="Log In" alt="Log In"></img>');
?>
		</div>
      </div>
	    
      <div class="pagename">
        :: <?php 
tpl_link(wl($ID, 'do=backlink'), tpl_pagename($ID));
?>
 ~ 
		<div class="logoicons">
			<?php 
tpl_link(wl('disclaimer'), '<img src="' . $DOKU_TPL . 'images/20/info.png" title="Disclaimer" alt="Disclaimer"></img>', 'class="img16"');
tpl_link('feed.php?ns=blog&amp;num=10&amp;linkto=current&amp;content=html', '<img src="' . $DOKU_TPL . 'images/rss.png" title="TLW RSS" alt="TLW RSS"></img>');
tpl_actionlink('edit', '', '', '<img src="' . $DOKU_TPL . 'images/20/edit.png" class="img16" title="Edit" alt="Edit"></img>');
tpl_actionlink('history', '', '', '<img src="' . $DOKU_TPL . 'images/20/history.png" class="img16" title="Previous versions" alt="Previous versions"></img>');
?>
		</div>
      </div>


      <div class="clearer"></div>
    </div>
    <!-- header stop -->

    <?php 
/*old includehook*/
@(include dirname(__FILE__) . '/header.html');
?>
开发者ID:pietersartain,项目名称:dokuwiki-template-thelastword,代码行数:31,代码来源:main.php


示例5: tpl_includeFile

echo $showSidebar ? 'hasSidebar' : '';
?>
">
        <div class="navbar navbar-default navbar-fixed-top"><div class="container">
            <?php 
tpl_includeFile('header.html');
?>
            <div class="navbar-header">
                <button class="navbar-toggle" data-toggle="collapse" data-target="#topnav" type="button">
                    <span class="sr-only">Toggle Navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <?php 
tpl_link(wl(), $conf['title'], 'accesskey="h" title="[H]" class="navbar-brand"');
?>
            </div>
            <div class="navbar-collapse collapse" id="topnav">
                <ul class="nav navbar-nav navbar-right">
                    <?php 
if ($showTools) {
    ?>
                        <?php 
    tpl_action('edit', 1, 'li');
    ?>
                    <?php 
}
?>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php 
开发者ID:n1trux,项目名称:cw-bootstrap,代码行数:31,代码来源:main.php


示例6: bootstrap3_conf

    die;
}
if (bootstrap3_conf('showCookieLawBanner') && !(get_doku_pref('cookieNoticeAccepted', null) || get_doku_pref('cookieNoticeAccepted', ''))) {
    $cookie_policy_page_id = bootstrap3_conf('cookieLawPolicyPage');
    $cookie_banner_page_id = bootstrap3_conf('cookieLawBannerPage');
    resolve_pageid('', $cookie_policy_page_id, $cookie_policy_page_exists);
    ?>
<div id="cookieNotice" class="navbar <?php 
    echo bootstrap3_conf('inverseNavbar') ? 'navbar-inverse' : 'navbar-default';
    ?>
 navbar-fixed-bottom">
  <div class="container">
    <div class="navbar-text navbar-left">
    <?php 
    $cookie_banner_page = tpl_include_page($cookie_banner_page_id, 0);
    $cookie_banner_page = preg_replace('/<p>\\n(.*?)\\n<\\/p>/', '<i class="fa fa-info-circle text-primary"></i> $1', $cookie_banner_page);
    echo $cookie_banner_page;
    ?>
    </div>
    <div class="navbar-right">
      <button class="btn btn-primary btn-xs navbar-btn" id="cookieDismiss">OK</button>
      <?php 
    if ($cookie_policy_page_exists) {
        tpl_link(wl($cookie_policy_page_id), 'Policy', 'class="btn btn-default btn-xs navbar-btn" id="cookiePolicy"');
    }
    ?>
    </div>
  </div>
</div>
<?php 
}
开发者ID:qswks,项目名称:dokuwiki-template-bootstrap3,代码行数:31,代码来源:tpl_cookielaw.php


示例7: tpl_actionlink

?>
 </li>
            <li ><?php 
tpl_actionlink('admin');
?>
 </li>
            <li ><?php 
tpl_actionlink('profile');
?>
 </li>
         </ul>
      </div>
      
      <div id="oaTmplHeaderLogo">
         <div id="oaTmplHeaderLogoLogo"> <?php 
tpl_link(wl(), $myLogo, 'name="dokuwiki__top" id="dokuwiki__top" accesskey="h" title="[ALT+H]"');
?>
 </div>
      </div>

      <div class="clearer"> </div>
</div>
<div class="clearer"></div>


<div id="oaTmplPageHeaderColorBox">
      <div class="oaTmplPageLeft2">
          <div class="colorBox" > </div>
      </div>
      
      <div class="oaTmplPageContent2">
开发者ID:BackupTheBerlios,项目名称:openaqua-svn,代码行数:31,代码来源:main.php


示例8: html_msgarea

    <div id="dokuwiki__site"><div class="dokuwiki site mode_<?php 
echo $ACT;
?>
">
        <?php 
html_msgarea();
?>
        <?php 
@(include dirname(__FILE__) . '/header.html');
?>

        <!-- ********** HEADER ********** -->
        <div id="dokuwiki__header"><div class="pad">

            <h1><?php 
tpl_link(wl(), $conf['title'], 'id="dokuwiki__top" accesskey="h" title="[ALT+H]"');
?>
</h1>
            <h2>[[<?php 
echo $ID;
?>
]]</h2>

            <!-- BREADCRUMBS -->
            <?php 
if ($conf['breadcrumbs']) {
    ?>
                <div class="breadcrumbs"><?php 
    tpl_breadcrumbs();
    ?>
</div>
开发者ID:narsis59,项目名称:dokuwiki_template_ach,代码行数:31,代码来源:main.php


示例9: dirname

 * mmClean DokuWiki Template
 *
 * @author Marcin Mierzejewski <[email protected]>
 */
require_once dirname(__FILE__) . '/tpl_functions.php';
@(include dirname(__FILE__) . '/header.php');
?>
<body>
<?php 
@(include dirname(__FILE__) . '/topheader.html');
?>
<div id="wrapper">
   <div id="header">
      <div class='inner_container'>
         <h1 id="site-title"><span><?php 
tpl_link(wl(), $conf['title'], 'name="top" accesskey="h" title="[ALT+H]"');
?>
</span></h1>
         <div id="site-description">
            <h2>The conference for open source citizens</h2>
            <p id='conference-date-location'>June 17&ndash;19, 2009 <span class='separator'>|</span> Portland, Oregon</p>
         </div>
      </div>
    </div>

   <div id="access">
    <div class="skip-link">
      <a href="#content" title="Skip to content">Skip to content</a>
    </div>

    <div id="menu">
开发者ID:reidab,项目名称:osbp_dokuwiki_theme,代码行数:31,代码来源:main.php


示例10: html_msgarea

echo $showSidebar ? 'hasSidebar' : '';
?>
">
        <?php 
html_msgarea();
?>
        <?php 
tpl_includeFile('header.html');
?>

        <!-- ********** HEADER ********** -->
        <div id="dokuwiki__header"><div class="pad">

            <div class="headings">
                <h1><?php 
tpl_link(wl(), $conf['title'], 'accesskey="h" title="[H]"');
?>
</h1>
                <?php 
/* how to insert logo instead (if no CSS image replacement technique is used):
   upload your logo into the data/media folder (root of the media manager) and replace 'logo.png' accordingly:
   tpl_link(wl(),'<img src="'.ml('logo.png').'" alt="'.$conf['title'].'" />','id="dokuwiki__top" accesskey="h" title="[H]"') */
?>
                <?php 
if ($conf['tagline']) {
    ?>
                    <p class="claim"><?php 
    echo $conf['tagline'];
    ?>
</p>
                <?php 
开发者ID:atomparticle,项目名称:dokuwiki_template_starter,代码行数:31,代码来源:main.php


示例11: bootstrap3_youarehere

/**
 * Hierarchical breadcrumbs with Bootstrap style
 *
 * This code was suggested as replacement for the usual breadcrumbs.
 * It only makes sense with a deep site structure.
 *
 * @author Andreas Gohr <[email protected]>
 * @author Nigel McNie <[email protected]>
 * @author Sean Coates <[email protected]>
 * @author <[email protected]>
 * @author Giuseppe Di Terlizzi <[email protected]>
 * @todo   May behave strangely in RTL languages
 *
 * @return bool
 */
function bootstrap3_youarehere()
{
    global $conf;
    global $ID;
    global $lang;
    // check if enabled
    if (!$conf['youarehere']) {
        return false;
    }
    $parts = explode(':', $ID);
    $count = count($parts);
    $semantic = bootstrap3_conf('semantic');
    echo '<ol class="breadcrumb"' . ($semantic ? ' itemscope itemtype="http://schema.org/BreadcrumbList"' : '') . '>';
    echo '<li>' . rtrim($lang['youarehere'], ':') . '</li>';
    // always print the startpage
    echo '<li' . ($semantic ? ' itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"' : '') . '>';
    tpl_link(wl($conf['start']), ($semantic ? '<span itemprop="name">' : '') . '<i class="fa fa-fw fa-home"></i>' . ($semantic ? '</span>' : ''), ($semantic ? ' itemprop="item" ' : '') . 'title="' . $conf['start'] . '"');
    echo '</li>';
    // print intermediate namespace links
    $part = '';
    for ($i = 0; $i < $count - 1; $i++) {
        $part .= $parts[$i] . ':';
        $page = $part;
        if ($page == $conf['start']) {
            continue;
        }
        // Skip startpage
        // output
        echo '<li' . ($semantic ? ' itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"' : '') . '>';
        $link = html_wikilink($page);
        $link = str_replace(' class="curid"', '', html_wikilink($page));
        if ($semantic) {
            $link = str_replace(array('<a', '<span'), array('<a itemprop="item" ', '<span itemprop="name" '), $link);
        }
        echo $link;
        echo '</li>';
    }
    // print current page, skipping start page, skipping for namespace index
    resolve_pageid('', $page, $exists);
    if (isset($page) && $page == $part . $parts[$i]) {
        echo '</ol>';
        return true;
    }
    $page = $part . $parts[$i];
    if ($page == $conf['start']) {
        echo '</ol>';
        return true;
    }
    echo '<li class="active"' . ($semantic ? ' itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"' : '') . '>';
    $link = html_wikilink($page);
    $link = str_replace(' class="curid"', '', html_wikilink($page));
    if ($semantic) {
        $link = str_replace(array('<a', '<span'), array('<a itemprop="item" ', '<span itemprop="name" '), $link);
    }
    echo $link;
    echo '</li>';
    echo '</ol>';
    return true;
}
开发者ID:huksley,项目名称:dokuwiki-template-bootstrap3,代码行数:74,代码来源:tpl_functions.php


示例12: tpl_arctic_mbo_pagename

function tpl_arctic_mbo_pagename($sep = ' &raquo; ')
{
    global $conf;
    global $ID;
    global $lang;
    $parts = explode(':', $ID);
    $count = count($parts);
    if ($GLOBALS['ACT'] == 'search') {
        $parts = array($conf['start']);
        $count = 1;
    }
    // always print the site title
    tpl_link(wl(), $conf['title'], 'name="dokuwiki__top" id="dokuwiki__top" title="' . $conf['start'] . '"');
    // print intermediate namespace links
    $part = '';
    for ($i = 0; $i < $count - 1; $i++) {
        $part .= $parts[$i] . ':';
        $page = $part;
        resolve_pageid('', $page, $exists);
        if ($page == $conf['start']) {
            continue;
        }
        // Skip startpage
        // output
        echo $sep;
        if ($exists && auth_quickaclcheck($page) >= AUTH_READ) {
            $title = useHeading('navigation') ? p_get_first_heading($page) : $parts[$i];
            tpl_link(wl($page), hsc($title), 'title="' . $page . '"');
        } else {
            tpl_link(wl($page), $parts[$i], 'title="' . $page . '" class="wikilink2" rel="nofollow"');
        }
    }
    // print current page, skipping start page, skipping for namespace index
    if (isset($page) && $page == $part . $parts[$i]) {
        return;
    }
    $page = $part . $parts[$i];
    if ($page == $conf['start']) {
        return;
    }
    echo $sep;
    if (page_exists($page) && auth_quickaclcheck($page) >= AUTH_READ) {
        $title = useHeading('navigation') ? p_get_first_heading($page) : $parts[$i];
        tpl_link(wl($page), hsc($title), 'title="' . $page . '"');
    } else {
        tpl_link(wl($page), $parts[$i], 'title="' . $page . '" class="wikilink2" rel="nofollow"');
    }
    return true;
}
开发者ID:xudianyang,项目名称:wiki.phpboy.net,代码行数:49,代码来源:tpl_functions.php


示例13: array

            
            <div class='codowiki_west_header'>
            <div class="headings group">
        <ul class="a11y skip">
            <li><a href="#dokuwiki__content"><?php 
echo $lang['skip_to_content'];
?>
</a></li>
        </ul>

        <h1><?php 
// get logo either out of the template images folder or data/media folder
$logoSize = array();
$logo = tpl_getMediaFile(array(':wiki:logo.png', ':logo.png', 'images/wiki.png'), false, $logoSize);
// display logo and wiki title in a link to the home page
tpl_link(wl(), '<img style="width:135px;margin:0 auto 10px" src="' . $logo . '" ' . $logoSize[3] . ' alt="" /> <p style="text-align:center">' . $conf['title'] . '</p>', 'accesskey="h" title="[H]"');
?>
</h1>
        <?php 
if ($conf['tagline']) {
    ?>
            <p class="claim"><?php 
    echo $conf['tagline'];
    ?>
</p>
        <?php 
}
?>
    </div>
            
            
开发者ID:HonorLee-cn,项目名称:DwarfFortressWiki,代码行数:28,代码来源:main.php


示例14: tpl_actionlink

	        <?php 
tpl_actionlink('top');
?>
		</span>
      </div>
    </div>

   <?php 
/*old includehook*/
@(include dirname(__FILE__) . '/pagefooter.html');
?>

    <div class="bar" id="bar__bottom">
       &copy; 2010 TuS R&uuml;ppurr, Abteilung Volleyball -
       <?php 
tpl_link(wl(':impressum', ''), 'Impressum');
?>
       <?php 
/*old includehook*/
@(include dirname(__FILE__) . '/footer.html');
?>
       <div class="clearer"></div>
    </div>
    
  </div>

</div>

<div class="no"><?php 
/* provide DokuWiki housekeeping, required in all templates */
tpl_indexerWebBug();
开发者ID:philipp02,项目名称:volleyball-rueppurr-dokuwiki,代码行数:31,代码来源:main.php


示例15: array

                <li class="dropdown navbar-right"
                ">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                   aria-haspopup="true" aria-expanded="false">
                    <?php 
echo $lang['page_tools'];
?>
<span class="caret"></span></a>
                <ul class="dropdown-menu">
                    <?php 
$data = array('view' => 'main', 'items' => array('edit' => tpl_action('edit', 1, 'li', 1, '<span>', '</span>'), 'revert' => tpl_action('revert', 1, 'li', 1, '<span>', '</span>'), 'revisions' => tpl_action('revisions', 1, 'li', 1, '<span>', '</span>'), 'backlink' => tpl_action('backlink', 1, 'li', 1, '<span>', '</span>'), 'subscribe' => tpl_action('subscribe', 1, 'li', 1, '<span>', '</span>'), 'top' => tpl_action('top', 1, 'li', 1, '<span>', '</span>')));
// TODO: Possible to add action ?
if ($INFO['ismanager']) {
    $data['items']['purge'] = '<li>' . tpl_link(wl($ID, ['purge' => true]), '<span>Purge this page</span>', 'class="action purge"', $return = true) . '</li>';
    $data['items']['purge_css'] = '<li>' . tpl_link("/lib/exe/css.php?purge=true", '<span>Purge Css</span>', 'class="action purge"', $return = true) . '</li>';
    $data['items']['purge_js'] = '<li>' . tpl_link("/lib/exe/js.php?purge=true", '<span>Purge Js</span>', 'class="action purge"', $return = true) . '</li>';
}
// the page tools can be amended through a custom plugin hook
$evt = new Doku_Event('TEMPLATE_PAGETOOLS_DISPLAY', $data);
if ($evt->advise_before()) {
    foreach ($evt->data['items'] as $k => $html) {
        echo $html;
    }
}
$evt->advise_after();
unset($data);
unset($evt);
?>
                </ul>
                </li>
开发者ID:alanthonyc,项目名称:dokuwiki-template-bootie,代码行数:30,代码来源:tpl_header.php


示例16: tpl_link

    } else {
        tpl_link(wl($ID, 'do=login'), 'Log in');
    }
}
?>
        <?php 
tpl_link(wl($ID, 'do=diff'), 'Changes');
?>
        <?php 
tpl_link(wl($ID, 'do=backlink'), 'Backlinks');
?>
        <?php 
tpl_link(wl($ID, 'do=recent'), 'Recent');
?>
        <?php 
tpl_link(wl($ID, 'do=index'), 'Sitemap');
?>
      </div>
    </div>
    <div id="content">
      <div id="foo"><?php 
if ($conf['useacl'] && $_SERVER['REMOTE_USER']) {
    tpl_button('edit');
}
?>
</div>
      <?php 
tpl_content();
?>
      <!-- ?php tpl_pageinfo()? -->
    </div>
开发者ID:BackupTheBerlios,项目名称:grafity-svn,代码行数:31,代码来源:main.php


示例17: tpl_youarehere

/**
 * Hierarchical breadcrumbs
 *
 * This code was suggested as replacement for the usual breadcrumbs.
 * It only makes sense with a deep site structure.
 *
 * @author Andreas Gohr <[email protected]>
 * @author Nigel McNie <[email protected]>
 * @author Sean Coates <[email protected]>
 * @author <[email protected]>
 * @todo   May behave strangely in RTL languages
 */
function tpl_youarehere($sep = ' &raquo; ')
{
    global $conf;
    global $ID;
    global $lang;
    // check if enabled
    if (!$conf['youarehere']) {
        return false;
    }
    $parts = explode(':', $ID);
    $count = count($parts);
    if ($GLOBALS['ACT'] == 'search') {
        $parts = array($conf['start']);
        $count = 1;
    }
    echo '<span class="bchead">' . $lang['youarehere'] . ': </span>';
    // always print the startpage
    $title = useHeading('navigation') ? p_get_first_heading($conf['start']) : $conf['start'];
    if (!$title) {
        $title = $conf['start'];
    }
    tpl_link(wl($conf['start']), hsc($title), 'title="' . $conf['start'] . '"');
    // print intermediate namespace links
    $part = '';
    for ($i = 0; $i < $count - 1; $i++) {
        $part .= $parts[$i] . ':';
        $page = $part;
        resolve_pageid('', $page, $exists);
        if ($page == $conf['start']) {
            continue;
        }
        // Skip startpage
        // output
        echo $sep;
        if ($exists) {
            $title = useHeading('navigation') ? p_get_first_heading($page) : $parts[$i];
            tpl_link(wl($page), hsc($title), 'title="' . $page . '"');
        } else {
            tpl_link(wl($page), $parts[$i], 'title="' . $page . '" class="wikilink2" rel="nofollow"');
        }
    }
    // print current page, skipping start page, skipping for namespace index
    if (isset($page) && $page == $part . $parts[$i]) {
        return;
    }
    $page = $part . $parts[$i];
    if ($page == $conf['start']) {
        return;
    }
    echo $sep;
    if (page_exists($page)) {
        $title = useHeading('navigation') ? p_get_first_heading($page) : $parts[$i];
        tpl_link(wl($page), hsc($title), 'title="' . $page . '"');
    } else {
        tpl_link(wl($page), $parts[$i], 'title="' . $page . '" class="wikilink2" rel="nofollow"');
    }
    return true;
}
开发者ID:highpictv,项目名称:wiki,代码行数:70,代码来源:template.php


示例18: _mixture_actionlink

function _mixture_actionlink($type, $pre = '', $inner = '', $context = null, $return = true, $button = false)
{
    global $lang, $uhp;
    $data = tpl_get_action($type);
    if (!is_array($data)) {
        if ($type == 'home') {
            $target = explode("=", wl())[1];
            $label = tpl_getLang('wikihome');
        } elseif ($type == 'userpublic' and isset($uhp['public']['id'])) {
            // Without Userhomepage plugin, Public Page namespace is set by 'user' value in 'conf/interwiki.conf'
            $target = $uhp['public']['id'];
            if (isset($uhp['public']['string'])) {
                $label = $uhp['public']['string'];
            } else {
                $label = tpl_getLang('userpublic');
            }
            // Currently, Mixture only manages user's private namespace generated by Userhomepage plugin
        } elseif ($type == 'userprivate' and isset($uhp['private']['id'])) {
            $target = $uhp['private']['id'];
            $label = $uhp['private']['string'];
        } else {
            $target = null;
        }
        if ($target != null) {
            if ($button != false) {
                $classes = 'btn ' . $button;
                $modLabel = null;
            } else {
                $classes = 'action ' . $type . _mixture_menuitem_classes($type);
                $modLabel = _mixture_menuitem_string($label, $context);
            }
            $out = tpl_link(wl($target), _mixture_glyph($type, $context, $button) . $modLabel, 'class="' . $classes . '" title="' . $label . ' (' . $target . ')"', true);
        } else {
            return false;
        }
    } else {
        /**
         * $data array content:
         * @var string $accesskey
         * @var string $id
         * @var string $method
         * @var bool   $nofollow
         * @var array  $params
         * @var string $replacement
         */
        extract($data);
        if (strpos($id, '#') === 0) {
            $linktarget = $id;
        } else {
            $linktarget = wl($id, $params);
        }
        $caption = $lang['btn_' . $type];
        /*
        if(strpos($caption, '%s')){
            $caption = sprintf($caption, $replacement);
        }
        */
        $akey = $addTitle = '';
        if ($accesskey) {
            $akey = 'accesskey="' . $accesskey . '" ';
            $addTitle = ' [' . strtoupper($accesskey) . ']';
        }
        $rel = $nofollow ? 'rel="nofollow" ' : '';
        if ($button != false) {
            $classes = 'btn ' . $button;
            $modLabel = _mixture_glyph($type, $context, $button);
        } else {
            $classes = 'action ' . $type . _mixture_menuitem_classes($type);
            $modLabel = _mixture_menuitem_string($inner ? $inner : $caption, $context);
        }
        $out = tpl_link($linktarget, $pre . $modLabel . $suf, 'class="' . $classes . '" ' . $akey . $rel . 'title="' . hsc($caption) . $addTitle . '"', true);
    }
    if ($return) {
        return $out;
    }
    echo $out;
    return true;
}
开发者ID:geekitude,项目名称:dokuwiki-template-mixture,代码行数:78,代码来源:tpl_functions.php


示例19: tpl_tabnavi

/**
 * prints a horizontal navigation bar (composed of <li> items and some CSS tricks)
 * with the current active item highlited
 */
function tpl_tabnavi()
{
    global $ID;
    global $ACT;
    global $conf;
    // afegit jordi
    global $lang;
    // afegit jordi
    global $auth;
    // afegit jordi
    global $USERINFO;
    // afegit jordi
    $buttons = array();
    parse_str(tpl_getConf('navbar_buttons'), $buttons);
    echo "<ul>\n";
    foreach ($buttons as $title => $pagename) {
        echo '<li';
        // MODIFICAT  JORDI
        // Afegim control, per mostrar/no mostrar opció "Autoria" segons si l'usuari està validat (hi ha nom d'usuari) o no
        if ($USERINFO[name] == "") {
            if ($title != "Autoria") {
                if (strcasecmp($ID, $pagename) == 0 && $ACT == 'show') {
                    echo ' id="current"><div id="current_inner">' . $title . '</div>';
                } else {
                    echo '>';
                    tpl_link(wl($pagename), $title);
                }
            }
        } else {
            if (strcasecmp($ID, $pagename) == 0 && $ACT == 'show') {
                echo ' id="current"><div id="current_inner">' . $title . '</div>';
            } else {
                echo '>';
                tpl_link(wl($pagename), $title);
            }
        }
        echo "</li>\n";
    }
    // MODIFICAT JORDI
    //always add link to recent page, unless $action id already 'recent'
    if (tpl_getConf('navbar_recent')) {
        if ($ACT == 'recent') {
            echo '<li id="current"><div id="current_inner">' . tpl_getConf('navbar_recent') . '</div></li>';
        } else {
            echo '<li>';
            tpl_actionlink('recent', '', '', tpl_getConf('navbar_recent'));
            echo "</li>\n";
        }
    }
    echo "</ul>\n";
}
开发者ID:projectesIF,项目名称:Ateneu,代码行数:55,代码来源:main.php


示例20: html_msgarea

  <?php 
html_msgarea();
?>

  <div class="stylehead">

    <div class="header">
      <div class="pagename">
        [[<?php 
tpl_link(wl($ID, 'do=backlink'), tpl_pagetitle($ID, true), 'title="' . $lang['btn_backlink'] . '"');
?>
]]
      </div>
      <div class="logo">
        <?php 
tpl_link(wl(), $conf['title'], 'name="dokuwiki__top" id="dokuwiki__top" accesskey="h" title="[H]"');
?>
      </div>

      <div class="clearer"></div>
    </div>

    <?php 
/*old includehook*/
@(include dirname(__FILE__) . '/header.html');
?>

    <div class="bar" id="bar__top">
      <div class="bar-left" id="bar__topleft">
        <?php 
tpl_button('edit');
开发者ID:houshuang,项目名称:folders2web,代码行数:31,代码来源:main.php



注:本文中的tpl_link函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP tpl_mediaContent函数代码示例发布时间:2022-05-23
下一篇:
PHP tpl_license函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap