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


PHP FRoute::followers方法代码示例

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


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

示例1:

                    <a href="<?php 
echo FRoute::friends(array('userid' => $user->getAlias()));
?>
">
                        <i class="ies-users"></i>&nbsp;
                        <?php 
echo JText::sprintf(FD::string()->computeNoun('COM_EASYSOCIAL_GENERIC_FRIENDS', $user->getTotalFriends()), $user->getTotalFriends());
?>
                    </a>
                </span>
                <?php 
if ($this->config->get('followers.enabled')) {
    ?>
                <span>
                    <a href="<?php 
    echo FRoute::followers(array('userid' => $user->getAlias()));
    ?>
">
                        <i class="ies-tree-view"></i>&nbsp;
                        <?php 
    echo $user->getTotalFollowers();
    ?>
 <?php 
    echo JText::_(FD::string()->computeNoun('COM_EASYSOCIAL_FOLLOWERS', $user->getTotalFollowers()));
    ?>
                    </a>
                </span>
                <?php 
}
?>
开发者ID:ppantilla,项目名称:bbninja,代码行数:30,代码来源:default.header.php

示例2:

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

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

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

示例3:

echo JText::_('COM_EASYSOCIAL_EMAILS_VIEW_PROFILE');
?>
 &rarr;
                                    </a>
                                </td>
                            </tr>

                        </table>
                    </td>
                </tr>
            </table>
        </td>
        </tr>
        </table>

        <p>
            <?php 
echo JText::_('COM_EASYSOCIAL_EMAILS_FOLLOWER_CHECKOUT_ALL_YOUR_FOLLOWERS');
?>
 <a href="<?php 
echo FRoute::followers(array('external' => true));
?>
" style="color:#00aeef; text-decoration:none;"><?php 
echo JText::_('COM_EASYSOCIAL_EMAILS_FOLLOWER_SEE_ALL');
?>
</a>
        </p>

    </td>
</tr>
开发者ID:knigherrant,项目名称:decopatio,代码行数:30,代码来源:new.followers.php

示例4: display

 /**
  * Default method to display a list of friends a user has.
  *
  * @since	1.0
  * @access	public
  * @param	null
  * @return	null
  */
 public function display($tpl = null)
 {
     if (!$this->isEnabled()) {
         return $this->redirect(FRoute::dashboard(array(), false));
     }
     // Check if there's an id.
     $id = JRequest::getInt('userid', null);
     // Get the user.
     $user = FD::user($id);
     $my = FD::user();
     $privacy = FD::privacy($my->id);
     // Let's test if the current viewer is allowed to view this profile.
     if ($my->id != $user->id) {
         if (!$privacy->validate('followers.view', $user->id)) {
             return $this->restricted($user);
         }
     }
     if ($user->isViewer()) {
         // Only registered users allowed to view their own followers
         FD::requireLogin();
     }
     // If user is not found, we need to redirect back to the dashboard page
     if (!$user->id) {
         return $this->redirect(FRoute::dashboard(array(), false));
     }
     // Check for user profile completeness
     FD::checkCompleteProfile();
     // Get current active filter.
     $active = JRequest::getWord('filter', 'followers');
     // Get the list of followers for this current user.
     $model = FD::model('Followers');
     $title = JText::_('COM_EASYSOCIAL_PAGE_TITLE_FOLLOWERS');
     $limit = FD::themes()->getConfig()->get('followersLimit', 20);
     $options['limit'] = $limit;
     if ($active == 'followers') {
         $users = $model->getFollowers($user->id, $options);
     }
     if ($active == 'following') {
         $users = $model->getFollowing($user->id, $options);
         $title = JText::_('COM_EASYSOCIAL_PAGE_TITLE_FOLLOWING');
     }
     if ($active == 'suggest') {
         $users = $model->getSuggestions($user->id, $options);
         $title = JText::_('COM_EASYSOCIAL_PAGE_TITLE_PEOPLE_TO_FOLLOW');
     }
     // Get the pagination
     $pagination = $model->getPagination();
     $filterFollowers = FRoute::followers(array(), false);
     $filterFollowing = FRoute::followers(array('filter' => 'following'), false);
     $filterSuggest = FRoute::followers(array('filter' => 'suggest'), false);
     if (!$user->isViewer()) {
         $title = $user->getName() . ' - ' . $title;
         $filterFollowers = FRoute::followers(array('userid' => $user->getAlias()), false);
         $filterSuggest = FRoute::followers(array('userid' => $user->getAlias(), 'filter' => 'suggest'), false);
     }
     FD::page()->title($title);
     // Set the breadcrumb
     FD::page()->breadcrumb($title);
     // Get total followers and following
     $totalFollowers = $model->getTotalFollowers($user->id);
     $totalFollowing = $model->getTotalFollowing($user->id);
     $totalSuggest = $model->getTotalSuggestions($user->id);
     // var_dump($totalSuggest);
     $this->set('pagination', $pagination);
     $this->set('user', $user);
     $this->set('active', $active);
     $this->set('filterFollowers', $filterFollowers);
     $this->Set('filterFollowing', $filterFollowing);
     $this->Set('filterSuggest', $filterSuggest);
     $this->set('totalFollowers', $totalFollowers);
     $this->set('totalFollowing', $totalFollowing);
     $this->set('totalSuggest', $totalSuggest);
     $this->set('currentUser', $user);
     $this->set('users', $users);
     $this->set('privacy', $privacy);
     // Load theme files.
     return parent::display('site/followers/default');
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:86,代码来源:view.html.php

示例5:

								<?php 
        echo JText::_('APP_FOLLOWERS_WIDGET_SUGGESTON_FOLLOW');
        ?>
							</a>
						</div>
					</div>

				</div>
			</li>
			<?php 
    }
    ?>
		</ul>
		<div class="pull-right pr-10">
			<a href="<?php 
    echo FRoute::followers(array('filter' => 'suggest'));
    ?>
" class="fd-small"><?php 
    echo JText::_('APP_FOLLOWERS_WIDGET_VIEW_ALL');
    ?>
</a>
		</div>
		<?php 
} else {
    ?>
		<div class="fd-small empty">
			<?php 
    echo JText::_('APP_FOLLOWERS_WIDGET_NO_SUGGESTIONS_CURRENTLY');
    ?>
		</div>
		<?php 
开发者ID:knigherrant,项目名称:decopatio,代码行数:31,代码来源:suggestions.php

示例6:

				<?php 
        }
        ?>
			<?php 
    }
    ?>
		</ul>
		<?php 
} else {
    ?>
		<div class="fd-small empty">
			<?php 
    echo JText::_('APP_FOLLOWERS_WIDGET_PROFILE_NOT_FOLLOWING_CURRENTLY');
    ?>
		</div>
		<?php 
}
?>

		<div>
			<a href="<?php 
echo FRoute::followers(array('userid' => $activeUser->getAlias(), 'filter' => 'following'));
?>
" class="fd-small"><?php 
echo JText::_('APP_FOLLOWERS_WIDGET_VIEW_ALL');
?>
</a>
		</div>
	</div>
</div>
开发者ID:knigherrant,项目名称:decopatio,代码行数:30,代码来源:following.php


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