本文整理汇总了PHP中CUrlHelper::groupLink方法的典型用法代码示例。如果您正苦于以下问题:PHP CUrlHelper::groupLink方法的具体用法?PHP CUrlHelper::groupLink怎么用?PHP CUrlHelper::groupLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUrlHelper
的用法示例。
在下文中一共展示了CUrlHelper::groupLink方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
▶ <a href="<?php
echo CUrlHelper::eventLink($event->id);
?>
"><?php
echo $event->title;
?>
</a>
</span>
<?php
} else {
if ($activity->get('groupid')) {
$group = $this->group;
?>
<span class="joms-stream__reference">
▶ <a href="<?php
echo CUrlHelper::groupLink($group->id);
?>
"><?php
echo $group->name;
?>
</a>
</span>
<!-- Target is user profile -->
<?php
} else {
if ($activity->get('app') == 'profile' && $activity->get('target') != 0 && $activity->get('target') != $user->id) {
?>
<span class="joms-stream__reference">
▶ <a href="<?php
echo CUrlHelper::userLink($activity->target);
?>
示例2:
').remove(); jax.call('community','notification,ajaxGroupRejectRequest', '<?php
echo $row->id;
?>
' , '<?php
echo $row->groupId;
?>
');">
<?php
echo JText::_('COM_COMMUNITY_FRIENDS_PENDING_ACTION_REJECT');
?>
</a>
<a class="jsIcon1 icon-go" style="text-indent: 0;" href="<?php
echo CUrlHelper::groupLink($row->groupId);
?>
" >
<?php
echo JText::_('COM_COMMUNITY_EVENTS_GO');
?>
</a>
</span>
</span>
<span id="error-request-<?php
echo $row->id;
?>
">
示例3:
<!--NEWS FEED CONTENT-->
<div class="newsfeed-content">
<div class="newsfeed-content-top">
<?php
// Put user header link if necessary
if ($act->eventid) {
echo '<div class="newsfeed-content-actor">';
echo '<strong><a class="actor-link" href="' . CUrlHelper::userLink($act->actor) . '">' . $actor->getDisplayName() . '</a></strong> <span class="com_icons com_icons12 com_icons-inline com_icons-rarr">»</span> <a href="' . CUrlHelper::eventLink($act->eventid) . '">' . $act->appTitle . '</a>';
if ($act->event_access == 1) {
echo ' <span title="' . JText::_('COM_COMMUNITY_GROUPS_PRIVATE') . '" class="com_icons com_icons12 com_icons-inline com_icons-private jomNameTips">' . JText::_('COM_COMMUNITY_GROUPS_PRIVATE') . '</span>';
}
echo '</div>';
} else {
if ($act->groupid) {
echo '<div class="newsfeed-content-actor">';
echo '<strong><a class="actor-link" href="' . CUrlHelper::userLink($act->actor) . '">' . $actor->getDisplayName() . '</a></strong> <span class="com_icons com_icons12 com_icons-inline com_icons-rarr">»</span> <a href="' . CUrlHelper::groupLink($act->groupid) . '">' . $act->appTitle . '</a>';
if ($act->group_access == 1) {
echo ' <span title="' . JText::_('COM_COMMUNITY_GROUPS_PRIVATE') . '" class="com_icons com_icons12 com_icons-inline com_icons-private jomNameTips">' . JText::_('COM_COMMUNITY_GROUPS_PRIVATE') . '</span>';
}
echo '</div>';
} else {
if (!empty($act->target) && $act->target != $act->actor && $act->app == 'profile' && $act->target != $actorId) {
// Actor doing something to target
echo '<div class="newsfeed-content-actor">';
echo '<strong><a class="actor-link" href="' . CUrlHelper::userLink($act->actor) . '">' . $actor->getDisplayName() . '</a></strong> ';
echo '<span class="com_icons com_icons12 com_icons-inline com_icons-rarr">»</span> ';
echo '<a class="actor-link" href="' . CUrlHelper::userLink($act->target) . '">' . $target->getDisplayName() . '</a>';
echo '</div>';
} else {
// Everythings else should have the actor's title
$actorNeedle = '<a class="actor-link" href="' . CUrlHelper::userLink($act->actor) . '">' . $actor->getDisplayName() . '</a>';
示例4: elseif
}
?>
<small>
<a href="<?php
echo CRoute::_('index.php?option=com_community&view=profile&userid=' . $video->creator);
?>
"><?php
echo $video->getCreatorName();
?>
</a>
<?php
if ($video->groupid) {
$group = JTable::getInstance('Group', 'CTable');
$group->load($video->groupid);
echo JText::sprintf('COM_COMMUNITY_VIDEOS_FROM_GROUP', '<a href="' . CUrlHelper::groupLink($group->id) . '">' . $group->name . '</a>');
} elseif ($video->eventid) {
$event = JTable::getInstance('Event', 'CTable');
$event->load($video->eventid);
echo JText::sprintf('COM_COMMUNITY_VIDEOS_FROM_EVENT', '<a href="' . CUrlHelper::eventLink($event->id) . '">' . $event->title . '</a>');
} elseif ($params->get('activity_id')) {
$targetUser = CFactory::getUser($params->get('target_id'));
?>
▶ <?php
echo CLinkGeneratorHelper::getUserURL($targetUser->id, $targetUser->getDisplayName());
?>
<a href="<?php
echo CUrlHelper::streamURI($params->get('activity_id'), $targetUser->id);
?>
"><?php
echo JText::_('COM_COMMUNITY_SINGULAR_STREAM');
示例5: cGroupLink
/**
* Deprecated since 1.8
* Use CUrlHelper::groupLink instead.
*/
function cGroupLink($id, $route = true)
{
return CUrlHelper::groupLink($id, $route);
}
示例6: ajaxGetNotification
public function ajaxGetNotification()
{
if (!COwnerHelper::isRegisteredUser()) {
return $this->ajaxBlockUnregister();
}
$json = array();
$my = CFactory::getUser();
//$inboxModel = CFactory::getModel( 'inbox' );
$friendModel = CFactory::getModel('friends');
$eventModel = CFactory::getModel('events');
$groupModel = CFactory::getModel('groups');
$notiTotal = 0;
//getting pending event request
$pendingEvent = $eventModel->getPending($my->id);
$eventHtml = '';
$event = JTable::getInstance('Event', 'CTable');
if (!empty($pendingEvent)) {
$notiTotal += count($pendingEvent);
for ($i = 0; $i < count($pendingEvent); $i++) {
$row = $pendingEvent[$i];
$row->invitor = CFactory::getUser($row->invited_by);
$event->load($row->eventid);
// remove the notification if there is no longer seats available
if (!CEventHelper::seatsAvailable($event)) {
unset($pendingEvent[$i]);
continue;
}
$row->eventAvatar = $event->getThumbAvatar();
$row->url = CRoute::_('index.php?option=com_community&view=events&task=viewevent&eventid=' . $row->eventid . false);
$row->isGroupEvent = $event->contentid ? true : false;
if ($row->isGroupEvent) {
$group = JTable::getInstance('Group', 'CTable');
$group->load($event->contentid);
$row->groupname = $group->name;
$row->grouplink = CUrlHelper::groupLink($group->id);
}
}
$tmpl = new CTemplate();
$tmpl->set('rows', $pendingEvent);
$tmpl->setRef('my', $my);
$eventHtml = $tmpl->fetch('notification.event.invitations');
}
//getting pending group request
$pendingGroup = $groupModel->getGroupInvites($my->id);
$groupHtml = '';
$group = JTable::getInstance('Group', 'CTable');
$groupNotiTotal = 0;
if (!empty($pendingGroup)) {
$groupNotiTotal += count($pendingGroup);
for ($i = 0; $i < count($pendingGroup); $i++) {
$gRow = $pendingGroup[$i];
$gRow->invitor = CFactory::getUser($gRow->creator);
$group->load($gRow->groupid);
$gRow->name = $group->name;
$gRow->groupAvatar = $group->getThumbAvatar();
$gRow->url = CRoute::_('index.php?option=com_community&view=groups&task=viewgroup&groupid=' . $gRow->groupid . false);
}
$tmpl = new CTemplate();
$tmpl->set('gRows', $pendingGroup);
$tmpl->setRef('my', $my);
$groupHtml = $tmpl->fetch('notification.group.invitations');
}
//geting pending private group join request
//Find Users Groups Admin
$allGroups = $groupModel->getAdminGroups($my->id, COMMUNITY_PRIVATE_GROUP);
$groupMemberApproveHTML = '';
//Get unApproved member
if (!empty($allGroups)) {
foreach ($allGroups as $groups) {
$member = $groupModel->getMembers($groups->id, 0, false);
if (!empty($member)) {
for ($i = 0; $i < count($member); $i++) {
$oRow = $member[$i];
$group->load($groups->id);
$oRow->groupId = $groups->id;
$oRow->groupName = $groups->name;
$oRow->groupAvatar = $group->getThumbAvatar();
$oRow->url = CRoute::_('index.php?option=com_community&view=groups&task=viewgroup&groupid=' . $group->id . false);
$members[] = $member[$i];
}
}
}
}
if (!empty($members)) {
$tmpl = new CTemplate();
$tmpl->set('oRows', $members);
$tmpl->set('my', $my);
$groupMemberApproveHTML = $tmpl->fetch('notification.group.request');
}
//non require action notification
$itemHtml = '';
$notifCount = 10;
$notificationModel = CFactory::getModel('notification');
$myParams = $my->getParams();
$notifications = $notificationModel->getNotification($my->id, '0', $notifCount, $myParams->get('lastnotificationlist', ''));
if (!empty($notifications)) {
for ($i = 0; $i < count($notifications); $i++) {
$iRow = $notifications[$i];
$iRow->actorUser = CFactory::getUser($iRow->actor);
$iRow->actorAvatar = $iRow->actorUser->getThumbAvatar();
//.........这里部分代码省略.........