当前位置: 首页>>代码示例>>PHP>>正文


PHP Gdn_Theme::Logo方法代码示例

本文整理汇总了PHP中Gdn_Theme::Logo方法的典型用法代码示例。如果您正苦于以下问题:PHP Gdn_Theme::Logo方法的具体用法?PHP Gdn_Theme::Logo怎么用?PHP Gdn_Theme::Logo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gdn_Theme的用法示例。


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

示例1: smarty_function_logo

/**
 * Writes the site logo to the page.
 *
 * @param array The parameters passed into the function.
 * @param Smarty The smarty object rendering the template.
 * @return The HTML img tag or site title if no logo is set.
 */
function smarty_function_logo($Params, &$Smarty)
{
    $Options = array();
    // Whitelist params to be passed on.
    if (isset($Params['alt'])) {
        $Options['alt'] = $Params['alt'];
    }
    if (isset($Params['class'])) {
        $Options['class'] = $Params['class'];
    }
    if (isset($Params['title'])) {
        $Options['title'] = $Params['title'];
    }
    if (isset($Params['height'])) {
        $Options['height'] = $Params['height'];
    }
    if (isset($Params['width'])) {
        $Options['width'] = $Params['width'];
    }
    $Result = Gdn_Theme::Logo($Options);
    return $Result;
}
开发者ID:karanjitsingh,项目名称:iecse-forum,代码行数:29,代码来源:function.logo.php

示例2: Url

</head>
<body id="<?php 
echo $BodyIdentifier;
?>
" class="<?php 
echo $this->CssClass;
?>
">
   <div id="Frame">
      <div id="Head">
         <div class="Menu">
            <!--<h1><a class="Title" href="<?php 
echo Url('/');
?>
"><span><?php 
echo Gdn_Theme::Logo();
?>
</span></a></h1>-->
            <?php 
$Session = Gdn::Session();
if ($this->Menu) {
    $this->Menu->AddLink('Dashboard', T('Dashboard'), '/dashboard/settings', array('Garden.Settings.Manage'));
    // $this->Menu->AddLink('Dashboard', T('Users'), '/user/browse', array('Garden.Users.Add', 'Garden.Users.Edit', 'Garden.Users.Delete'));
    //$this->Menu->AddLink('Activity', T('Activity'), '/activity');
    $Authenticator = Gdn::Authenticator();
    if ($Session->IsValid()) {
        $Name = $Session->User->Name;
        $CountNotifications = $Session->User->CountNotifications;
        if (is_numeric($CountNotifications) && $CountNotifications > 0) {
            $Name .= ' <span>' . $CountNotifications . '</span>';
        }
开发者ID:tautomers,项目名称:knoopvszombies,代码行数:31,代码来源:default.master.php

示例3: Url

<?php echo '<?xml version="1.0" encoding="utf-8"?>'; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-ca">
<head>
   <?php $this->RenderAsset('Head'); ?>
</head>
<body id="<?php echo $BodyIdentifier; ?>" class="<?php echo $this->CssClass; ?>">
   <div id="Frame">
      <div id="Head">
         <div class="Menu">
            <h1><a class="Title" href="<?php echo Url('/'); ?>"><span><?php echo Gdn_Theme::Logo(); ?></span></a></h1>
            <?php
			      $Session = Gdn::Session();
					if ($this->Menu) {
						$this->Menu->AddLink('Dashboard', T('Dashboard'), '/dashboard/settings', array('Garden.Settings.Manage'));
						// $this->Menu->AddLink('Dashboard', T('Users'), '/user/browse', array('Garden.Users.Add', 'Garden.Users.Edit', 'Garden.Users.Delete'));
						$this->Menu->AddLink('Activity', T('Activity'), '/activity');
						if ($Session->IsValid()) {
							$Name = $Session->User->Name;
							$CountNotifications = $Session->User->CountNotifications;
							if (is_numeric($CountNotifications) && $CountNotifications > 0)
								$Name .= ' <span class="Alert">'.$CountNotifications.'</span>';

                     if (urlencode($Session->User->Name) == $Session->User->Name)
                        $ProfileSlug = $Session->User->Name;
                     else
                        $ProfileSlug = $Session->UserID.'/'.urlencode($Session->User->Name);
							$this->Menu->AddLink('User', $Name, '/profile/'.$ProfileSlug, array('Garden.SignIn.Allow'), array('class' => 'UserNotifications'));
							$this->Menu->AddLink('SignOut', T('Sign Out'), SignOutUrl(), FALSE, array('class' => 'NonTab SignOut'));
						} else {
							$Attribs = array();
开发者ID:nerdgirl,项目名称:Forums-ILoveBadTV,代码行数:31,代码来源:default.master.php

示例4: smarty_function_logo

/**
 * Writes the site logo to the page.
 *
 * @param array The parameters passed into the function. This currently takes no parameters.
 * @param Smarty The smarty object rendering the template.
 * @return The url.
 */
function smarty_function_logo($Params, &$Smarty)
{
    $Result = Gdn_Theme::Logo('Title');
    return $Result;
}
开发者ID:edward-tsai,项目名称:vanilla4china,代码行数:12,代码来源:function.logo.php


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