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


PHP FRoute::badges方法代码示例

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


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

示例1: defined

defined('_JEXEC') or die('Unauthorized Access');
?>
<div class="es-badges">
	<h3><?php 
echo JText::_('COM_EASYBLOG_ACHIEVEMENTS');
?>
</h3>
	<?php 
if ($badges) {
    ?>
	<ul class="reset-ul">
		<?php 
    foreach ($badges as $badge) {
        ?>
		<li>
			<a href="<?php 
        echo FRoute::badges(array('id' => $badge->id, 'layout' => 'item'));
        ?>
"><img src="<?php 
        echo $badge->getAvatar();
        ?>
" width="32" /></a>
		</li>
		<?php 
    }
    ?>
	</ul>
	<?php 
}
?>
</div>
开发者ID:Tommar,项目名称:vino2,代码行数:31,代码来源:easysocial.achievements.php

示例2:

    ?>
 <?php 
    echo JText::_(FD::string()->computeNoun('COM_EASYSOCIAL_FOLLOWERS', $user->getTotalFollowers()));
    ?>
                    </a>
                </span>
                <?php 
}
?>

                <?php 
if ($this->config->get('badges.enabled') && $user->badgesViewable(FD::user()->id)) {
    ?>
                <span>
                    <a href="<?php 
    echo FRoute::badges(array('layout' => 'achievements', 'userid' => $user->getAlias()));
    ?>
">
                        <i class="ies-crown"></i>&nbsp;
                        <?php 
    echo $user->getTotalBadges();
    ?>
 <?php 
    echo JText::_(FD::string()->computeNoun('COM_EASYSOCIAL_ACHIEVEMENTS', $user->getTotalBadges()));
    ?>
                    </a>
                </span>
                <?php 
}
?>
开发者ID:ppantilla,项目名称:bbninja,代码行数:30,代码来源:default.header.php

示例3:

            ?>
    			</a>
    		</li>
    		<?php 
        }
        ?>

    		<?php 
        if ($this->config->get('badges.enabled')) {
            ?>
    		<li class="<?php 
            echo $view == 'badges' ? 'active' : '';
            ?>
">
    			<a href="<?php 
            echo FRoute::badges(array('layout' => 'achievements'));
            ?>
">
    				<?php 
            echo JText::_('COM_EASYSOCIAL_TOOLBAR_PROFILE_ACHIEVEMENTS');
            ?>
    			</a>
    		</li>
    		<?php 
        }
        ?>

    		<?php 
        if ($this->config->get('points.enabled')) {
            ?>
    		<li class="<?php 
开发者ID:ppantilla,项目名称:bbninja,代码行数:31,代码来源:default.php

示例4: getPermalink

 /**
  * Retrieve the badge permalink
  *
  * @since	1.0
  * @access	public
  * @return	int		The total number of users who achieved this badge.
  */
 public function getPermalink($xhtml = false, $external = false)
 {
     $url = FRoute::badges(array('id' => $this->getAlias(), 'external' => $external, 'layout' => 'item'), $xhtml);
     return $url;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:12,代码来源:badge.php

示例5: achievements

 /**
  * Displays a list of badges the user has achieved
  *
  * @since	1.0
  * @access	public
  * @param	string
  * @return
  */
 public function achievements()
 {
     // Check for user profile completeness
     FD::checkCompleteProfile();
     $config = FD::config();
     if (!$config->get('badges.enabled')) {
         return $this->redirect(FRoute::dashboard(array(), false));
     }
     // Get the current user id that should be displayed
     $userId = JRequest::getInt('userid', null);
     $user = FD::user($userId);
     // If user is not found, we need to redirect back to the dashboard page
     if (!$user->id) {
         return $this->redirect(FRoute::dashboard(array(), false));
     }
     $title = JText::_('COM_EASYSOCIAL_PAGE_TITLE_ACHIEVEMENTS');
     if (!$user->isViewer()) {
         $title = JText::sprintf('COM_EASYSOCIAL_PAGE_TITLE_ACHIEVEMENTS_USER', $user->getName());
         // Let's test if the current viewer is allowed to view this user's achievements.
         $my = FD::user();
         $privacy = $my->getPrivacy();
         $allowed = $privacy->validate('achievements.view', $user->id, SOCIAL_TYPE_USER);
         if (!$allowed) {
             $this->set('user', $user);
             parent::display('site/badges/restricted');
             return;
         }
     }
     // Set the page title
     FD::page()->title($title);
     // Set the page breadcrumb
     FD::page()->breadcrumb(JText::_('COM_EASYSOCIAL_PAGE_TITLE_ACHIEVEMENTS'), FRoute::badges(array('userid' => $userId, 'layout' => 'achievements')));
     // Load admin translations
     FD::language()->loadAdmin();
     // @TODO: Check for privacy
     $model = FD::model('badges');
     $badges = $model->getBadges($user->id);
     $totalBadges = count($badges);
     $this->set('totalBadges', $totalBadges);
     $this->set('badges', $badges);
     $this->set('user', $user);
     parent::display('site/badges/achievements');
 }
开发者ID:ppantilla,项目名称:bbninja,代码行数:51,代码来源:view.html.php

示例6: sendNotification

 /**
  * Responsible to send notification to the user when they achieved a badge
  *
  * @since	1.0
  * @access	public
  * @param	string
  * @return
  */
 public function sendNotification(SocialTableBadge $badge, $userId)
 {
     // Load the language file from the front end too since badge titles are loaded from the back end language
     FD::language()->loadAdmin();
     // We need the language file from the front end
     FD::language()->loadSite();
     // We want to send a notification to the user who earned the badge
     $recipient = array($userId);
     // Add notification to the requester that the user accepted his friend request.
     $systemOptions = array('uid' => $badge->id, 'type' => SOCIAL_TYPE_BADGES, 'url' => FRoute::badges(array('id' => $badge->getAlias(), 'layout' => 'item', 'sef' => false)), 'image' => $badge->getAvatar());
     $params = array('badgeTitle' => $badge->get('title'), 'badgePermalink' => $badge->getPermalink(false, true), 'badgeAvatar' => $badge->getAvatar(), 'badgeDescription' => $badge->get('description'));
     // Email template
     $emailOptions = array('title' => 'COM_EASYSOCIAL_EMAILS_UNLOCKED_NEW_BADGE_SUBJECT', 'badge' => $badge->get('title'), 'template' => 'site/badges/unlocked', 'params' => $params);
     // Send notifications to the receivers when they unlock the badge
     FD::notify('badges.unlocked', $recipient, $emailOptions, $systemOptions);
 }
开发者ID:ppantilla,项目名称:bbninja,代码行数:24,代码来源:badges.php

示例7: rgba

				background-image: linear-gradient(to bottom, #91C2EA, #6D9CCA);
				background-repeat: repeat-x;
				border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
				text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
				border-style: solid;
				border-width: 1px;
				box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
				border-radius:2px; -moz-border-radius:2px; -webkit-border-radius:2px;
				" href="<?php 
echo $badgePermalink;
?>
"><?php 
echo JText::_('COM_EASYSOCIAL_EMAILS_VIEW_BADGE');
?>
</a>
		<p style="margin-top: 15px;">
			<?php 
echo JText::_('COM_EASYSOCIAL_EMAILS_BADGES_CHECKOUT_YOUR_ACHIEVEMENTS');
?>
 <a href="<?php 
echo FRoute::badges(array('external' => true, 'layout' => 'achievements'));
?>
" style="color:#00aeef; text-decoration:none;"><?php 
echo JText::_('COM_EASYSOCIAL_EMAILS_BADGES_SEE_ALL');
?>
</a>
		</p>

	</td>
</tr>
开发者ID:ppantilla,项目名称:bbninja,代码行数:30,代码来源:unlocked.php


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