Esempio n. 1
0
                    <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 
}
?>
Esempio n. 2
0
            ?>
    			</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 
Esempio n. 3
0
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>
Esempio n. 4
0
 /**
  * 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');
 }
Esempio n. 5
0
								<?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 
Esempio n. 6
0
				<?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>