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


PHP CKunenaLink::GetProfileLink方法代码示例

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


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

示例1: getUsersOnlineList

 public function getUsersOnlineList($sfunc)
 {
     $users = $this->_getOnlineUsers($sfunc);
     $onlineUsersList = array();
     $totalguests = $totalhidden = 0;
     foreach ($users as $user) {
         if ($user->userid) {
             if ($user->showOnline) {
                 $onlineUsersList[] = CKunenaLink::GetProfileLink($user->userid, $user->username);
             } else {
                 $totalhidden++;
             }
         } else {
             $totalguests++;
         }
     }
     // Show hidden users as quests:
     $totalguests += $totalhidden;
     if ($totalguests > 0) {
         if ($totalguests == 1) {
             $onlineUsersList[] = '(' . $totalguests . ') ' . JText::_('COM_KUNENA_WHO_ONLINE_GUEST');
         } else {
             $onlineUsersList[] = '(' . $totalguests . ') ' . JText::_('COM_KUNENA_WHO_ONLINE_GUESTS');
         }
     }
     return implode(', ', $onlineUsersList);
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:27,代码来源:kunena.pathway.class.php

示例2: kunenaAvatar

 function kunenaAvatar($userid)
 {
     $kunena_user = KunenaFactory::getUser((int) $userid);
     $username = $kunena_user->getName();
     // Takes care of realname vs username setting
     $avatarlink = $kunena_user->getAvatarLink('', $this->params->get('avatar_w'), $this->params->get('avatar_h'));
     return CKunenaLink::GetProfileLink($userid, $avatarlink, $username);
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:8,代码来源:class.php

示例3: getUserLink

 /**
  * adds the link for the connect param
  * @since 1.7.3
  * @param  $user pass-by-reference
  * @return void
  */
 private function getUserLink(&$user)
 {
     $username = KunenaFactory::getUser($user['userid'])->getName();
     if ($user['leapcorrection'] == $this->timeo->format('z', true) + 1) {
         $subject = getSubject($username);
         $db = JFactory::getDBO();
         $query = "SELECT id,catid,subject,time as year FROM #__kunena_messages WHERE subject='{$subject}'";
         $db->setQuery($query, 0, 1);
         $post = $db->loadAssoc();
         if ($db->getErrorMsg()) {
             KunenaError::checkDatabaseError();
         }
         $catid = $this->params->get('bcatid');
         $postyear = new JDate($post['year'], $this->soffset);
         if (empty($post) && !empty($catid) || !empty($post) && !empty($catid) && $postyear->format('Y', true) < $this->timeo->format('Y', true)) {
             $botname = $this->params->get('swkbbotname', JText::_('SW_KBIRTHDAY_FORUMPOST_BOTNAME_DEF'));
             $botid = $this->params->get('swkbotid');
             $time = CKunenaTimeformat::internalTime();
             //Insert the birthday thread into DB
             $query = "INSERT INTO #__kunena_messages (catid,name,userid,email,subject,time, ip)\n\t\t    \t\tVALUES({$catid},'{$botname}',{$botid}, '','{$subject}', {$time}, '')";
             $db->setQuery($query);
             $db->query();
             if ($db->getErrorMsg()) {
                 KunenaError::checkDatabaseError();
             }
             //What ID get our thread?
             $messid = (int) $db->insertID();
             //Insert the thread message into DB
             $message = getMessage($username);
             $query = "INSERT INTO #__kunena_messages_text (mesid,message)\n                    VALUES({$messid},'{$message}')";
             $db->setQuery($query);
             $db->query();
             if ($db->getErrorMsg()) {
                 KunenaError::checkDatabaseError();
             }
             //We know the thread ID so we can update the parent thread id with it's own ID because we know it's
             //the first post
             $query = "UPDATE #__kunena_messages SET thread={$messid} WHERE id={$messid}";
             $db->setQuery($query);
             $db->query();
             if ($db->getErrorMsg()) {
                 KunenaError::checkDatabaseError();
             }
             // now increase the #s in categories
             CKunenaTools::modifyCategoryStats($messid, 0, $time, $catid);
             $user['link'] = CKunenaLink::GetViewLink('view', $messid, $catid, '', $username);
             $uri = JFactory::getURI();
             if ($uri->getVar('option') == 'com_kunena') {
                 $app =& JFactory::getApplication();
                 $app->redirect($uri->toString());
             }
         } elseif (!empty($post)) {
             $user['link'] = CKunenaLink::GetViewLink('view', $post['id'], $post['catid'], '', $username);
         }
     } else {
         $user['link'] = CKunenaLink::GetProfileLink($user['userid']);
     }
 }
开发者ID:rich20,项目名称:mod_sw_kbirthday_J16,代码行数:64,代码来源:forum.php

示例4: displayDefault

	function displayDefault($tpl = null) {
		$this->config = KunenaFactory::getConfig ();
		$document = JFactory::getDocument();
		$document->setTitle(JText::_('COM_KUNENA_STAT_FORUMSTATS') . ' - ' .      $this->config->board_title);

		require_once(KPATH_SITE.'/lib/kunena.link.class.php');
		$kunena_stats = KunenaForumStatistics::getInstance ( );
		$kunena_stats->loadAll();

		$this->assign($kunena_stats);
		$this->latestMemberLink = CKunenaLink::GetProfileLink($this->lastUserId);
		$this->userlist = CKunenaLink::GetUserlistLink('', intval($this->get('memberCount')));
		$this->statisticsURL = KunenaRoute::_('index.php?option=com_kunena&view=statistics');

		parent::display ();
	}
开发者ID:rich20,项目名称:Kunena,代码行数:16,代码来源:view.html.php

示例5: check_dberror

                        <?php 
    //get the Moderator list for display
    $fb_queryName = $fbConfig->username ? "username" : "name";
    $kunena_db->setQuery("select m.userid, u.{$fb_queryName} AS username FROM #__fb_moderation AS m LEFT JOIN #__users AS u ON u.id=m.userid WHERE m.catid='{$catid}'");
    $modslist = $kunena_db->loadObjectList();
    check_dberror("Unable to load moderators.");
    ?>

                        <?php 
    if (count($modslist) > 0) {
        ?>
                         <div class = "jr-bottomarea-modlist fbs">
                        <?php 
        echo '' . _GEN_MODERATORS . ": ";
        foreach ($modslist as $mod) {
            echo '&nbsp;' . CKunenaLink::GetProfileLink($fbConfig, $mod->userid, $mod->username) . '&nbsp; ';
        }
        ?>
                             </div>
                            <?php 
    }
    ?>

                <!-- /Mod List -->
                </th>

                <th  class = "th-right fbs" align="right">
                    <?php 
    //(JJ) FINISH: CAT LIST BOTTOM
    if ($fbConfig->enableforumjump) {
        require_once KUNENA_PATH_LIB . DS . 'kunena.forumjump.php';
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:showcat.php

示例6:

					<span class="ktopic-posted-time" title="<?php 
        echo CKunenaTimeformat::showDate($message->time, 'config_post_dateformat_hover');
        ?>
">
						<?php 
        echo JText::_('COM_KUNENA_POSTED_AT') . ' ' . CKunenaTimeformat::showDate($message->time, 'config_post_dateformat');
        ?>
&nbsp;
					</span>

					<?php 
        if ($message->name) {
            ?>
					<br />
					<span class="ktopic-by"><?php 
            echo JText::_('COM_KUNENA_GEN_BY') . ' ' . CKunenaLink::GetProfileLink(intval($message->userid), $this->escape($message->name));
            ?>
</span>
					<?php 
        }
        ?>
					<!-- /By -->
				</div>
			</td>
		</tr>

		<?php 
    }
}
?>
		<?php 
开发者ID:redigy,项目名称:Kunena-1.6,代码行数:31,代码来源:posts.php

示例7: stripslashes

  <!-- /Avatar -->

                                                <!-- Latest Post -->
        <span class="topic_latest_post">
        <?php 
        if ($fbConfig->default_sort == 'asc') {
            if ($leaf->moved == 0) {
                echo CKunenaLink::GetThreadPageLink($fbConfig, 'view', $leaf->catid, $leaf->thread, $threadPages, $fbConfig->messages_per_page, _GEN_LAST_POST, $last_reply[$leaf->id]->id);
            } else {
                echo _KUNENA_MOVED . ' ';
            }
        } else {
            echo CKunenaLink::GetThreadPageLink($fbConfig, 'view', $leaf->catid, $leaf->thread, 1, $fbConfig->messages_per_page, _GEN_LAST_POST, $last_reply[$leaf->id]->id);
        }
        if ($leaf->name) {
            echo ' ' . _GEN_BY . ' ' . CKunenaLink::GetProfileLink($fbConfig, $last_reply[$leaf->id]->userid, stripslashes($last_reply[$leaf->id]->name), 'nofollow', 'topic_latest_post_user');
        }
        ?>
        </span>
        <!-- /Latest Post -->
        <br />
                                <!-- Latest Post Date -->
        <span class="topic_date">
        <?php 
        echo time_since($last_reply[$leaf->id]->time, time() + $fbConfig->board_ofset * 3600);
        ?>
 <?php 
        echo _KUNENA_AGO;
        ?>
        </span>
        <!-- /Latest Post Date -->
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:flat.php

示例8: elseif

            }
        }
        ?>
					<!-- /Avatar -->
					<!-- Latest Post -->
					<span class="ktopic-latest-post">
					<?php 
        if ($leaf->moved) {
            echo JText::_('COM_KUNENA_MOVED');
        } elseif ($this->topic_ordering == 'ASC') {
            echo CKunenaLink::GetThreadPageLink('view', intval($leaf->catid), intval($leaf->thread), $threadPages, intval($this->config->messages_per_page), JText::_('COM_KUNENA_GEN_LAST_POST'), intval($this->lastreply[$leaf->thread]->id));
        } else {
            echo CKunenaLink::GetThreadPageLink('view', intval($leaf->catid), intval($leaf->thread), 1, intval($this->config->messages_per_page), JText::_('COM_KUNENA_GEN_LAST_POST'), intval($this->lastreply[$leaf->thread]->id));
        }
        if ($leaf->name) {
            echo ' ' . JText::_('COM_KUNENA_GEN_BY') . ' ' . CKunenaLink::GetProfileLink(intval($this->lastreply[$leaf->thread]->userid), $this->escape($this->lastreply[$leaf->thread]->name), '', 'nofollow');
        }
        ?>
					</span>
					<!-- /Latest Post -->
					<br />
					<!-- Latest Post Date -->
					<span class="ktopic-date" title="<?php 
        echo CKunenaTimeformat::showDate($this->lastreply[$leaf->thread]->time, 'config_post_dateformat_hover');
        ?>
">
						<?php 
        echo CKunenaTimeformat::showDate($this->lastreply[$leaf->thread]->time, 'config_post_dateformat');
        ?>
					</span>
					<!-- /Latest Post Date -->
开发者ID:redigy,项目名称:Kunena-1.6,代码行数:31,代码来源:flat.php

示例9: loadTopThankyous

	public function loadTopThankyous($limit=0) {
		$limit = $limit ? $limit : $this->_config->popthankscount;
		if (count($this->topThanks) < $limit) {
			$query = "SELECT targetuserid AS id, COUNT(targetuserid) AS count FROM `#__kunena_thankyou` GROUP BY targetuserid ORDER BY count DESC";
			$this->_db->setQuery ( $query, 0, $limit );
			$this->topThanks = $this->_db->loadObjectList ();
			KunenaError::checkDatabaseError();
			$top = reset($this->topThanks);
			if (empty($top->count)) {
				$this->topThanks = array();
				return;
			}
			foreach ($this->topThanks as $item) {
				$item->link = CKunenaLink::GetProfileLink($item->id);
				$item->percent = round(100 * $item->count / $top->count);
			}
			$top->title = JText::_('COM_KUNENA_STAT_TOP') .' '. $limit .' '. JText::_('COM_KUNENA_STAT_POPULAR') .' '. JText::_('COM_KUNENA_STAT_POPULAR_USER_THANKS_YOU');
			$top->titleName = JText::_('COM_KUNENA_USRL_USERNAME');
			$top->titleCount =  JText::_('COM_KUNENA_STAT_THANKS_YOU_RECEIVED');
		}
		return array_slice($this->topThanks, 0, $limit);
	}
开发者ID:rich20,项目名称:Kunena,代码行数:22,代码来源:statistics.php

示例10: if

	<td class="kcol-mid kcol-ktopicviews">
		<span class="ktopic-views-number"><?php echo $this->formatLargeNumber ( $this->topic->hits );?></span>
		<span class="ktopic-views"> <?php echo JText::_('COM_KUNENA_GEN_HITS');?> </span>
	</td>

	<td class="kcol-mid kcol-ktopiclastpost">
		<div class="klatest-post-info">
			<?php if ($this->topic->ordering) echo $this->getIcon ( 'ktopicsticky', JText::_('COM_KUNENA_GEN_ISSTICKY') ); ?>
			<?php if (!empty($this->topic->avatar)) : ?>
			<span class="ktopic-latest-post-avatar"> <?php echo CKunenaLink::GetProfileLink ( $this->topic->last_post_userid, $this->topic->avatar ) ?></span>
			<?php endif; ?>

			<span class="ktopic-latest-post">
			<?php
				echo $this->getTopicLink ( $this->topic, 'last', JText::_('COM_KUNENA_GEN_LAST_POST') );
				echo ' ' . JText::_('COM_KUNENA_GEN_BY') . ' ' . CKunenaLink::GetProfileLink ( $this->topic->last_post_userid, $this->escape($this->topic->last_post_guest_name), '', 'nofollow' );
			?>
			</span>

			<br />
			<span class="ktopic-date" title="<?php echo KunenaDate::getInstance($this->topic->last_post_time)->toKunena('config_post_dateformat_hover'); ?>">
				<?php echo KunenaDate::getInstance($this->topic->last_post_time)->toKunena('config_post_dateformat'); ?>
			</span>
		</div>
	</td>

<?php if (!empty($this->topicActions)) : ?>
	<td class="kcol-mid ktopicmoderation"><input class ="kcheck" type="checkbox" name="topics[<?php echo $this->topic->id?>]" value="1" /></td>
<?php endif; ?>
</tr>
<?php if ($this->module) : ?>
开发者ID:rich20,项目名称:Kunena,代码行数:31,代码来源:default_row.php

示例11: intval

			?>
			<span class="ktopic-latest-post-avatar">
			<?php echo CKunenaLink::GetProfileLink ( intval($this->message->userid), $useravatar ) ?>
			</span>
			<?php
				endif;
			endif;
			?>
			<!-- /Avatar -->
			<!-- By -->
			<span class="ktopic-posted-time" title="<?php echo KunenaDate::getInstance($this->message->time)->toKunena('config_post_dateformat_hover'); ?>">
				<?php echo JText::_('COM_KUNENA_POSTED_AT') . ' ' . KunenaDate::getInstance($this->message->time)->toKunena('config_post_dateformat'); ?>&nbsp;
			</span>

			<?php if ($this->message->userid) : ?>
			<br />
			<span class="ktopic-by"><?php echo JText::_('COM_KUNENA_GEN_BY') . ' ' . CKunenaLink::GetProfileLink ( intval($this->message->userid), $this->escape($this->message->name) ); ?></span>
			<?php endif; ?>
			<!-- /By -->
		</div>
	</td>

<?php if (!empty($this->postActions)) : ?>
	<td class="kcol-mid ktopicmoderation"><input class ="kcheck" type="checkbox" name="posts[<?php echo $this->message->id?>]" value="1" /></td>
<?php endif; ?>
</tr>
<?php if ($this->module) : ?>
<tr>
	<td class="ktopicmodule" colspan="<?php echo empty($this->postActions) ? 5 : 6 ?>"><?php echo $this->module; ?></td>
</tr>
<?php endif; ?>
开发者ID:rich20,项目名称:Kunena,代码行数:31,代码来源:posts_row.php

示例12: getFBGroupName

    if ($fmessage->userid > 0) {
        echo CKunenaLink::GetProfileLink($fbConfig, $fmessage->userid, $msg_username);
    } else {
        echo $msg_username;
    }
    ?>
                    </span>
<?php 
    if ($fbConfig->userlist_usertype) {
        echo '<span class = "msgusertype">(' . $msg_usertype . ')</span>';
    }
    ?>
                    <br/>
<?php 
    if ($fmessage->userid > 0) {
        echo CKunenaLink::GetProfileLink($fbConfig, $fmessage->userid, $msg_avatar);
    } else {
        echo $msg_avatar;
    }
    ?>

				<?php 
    $gr_title = getFBGroupName($lists["userid"]);
    if ($gr_title->id > 1) {
        ?>

                    <span class = "view-group_<?php 
        echo $gr_title->id;
        ?>
"> <?php 
        echo $gr_title->title;
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:message.php

示例13: elseif

		<?php 
            }
            ?>

	<?php 
        } elseif ($this->type == 'thanks') {
            ?>
		<?php 
            foreach ($this->stats as $stat) {
                ?>
		<tr class="krow<?php 
                echo ($i ^= 1) + 1;
                ?>
">
			<td class="kcol-first"><?php 
                echo CKunenaLink::GetProfileLink($stat->id, JString::substr(htmlspecialchars($stat->username), '0', $this->params->get('titlelength')));
                ?>
</td>
			<td class="kcol-last"><span class="kstats-hits-bg"><span class="kstats-hits" style="width:<?php 
                echo $this->getBarWidth($stat->receivedthanks);
                ?>
%;"><?php 
                echo CKunenaTools::formatLargeNumber($stat->receivedthanks, 3);
                ?>
</span></span></td>
		</tr>
		<?php 
            }
            ?>
	<?php 
        }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:31,代码来源:default.php

示例14: foreach

					<?php 
        foreach ($this->topuserthanks as $topthanks) {
            $k = 1 - $k;
            if ($topthanks->receivedthanks == $this->topthanks) {
                $barwidth = 100;
            } else {
                $barwidth = round($topthanks->receivedthanks * 100 / $this->topthanks);
            }
            ?>
					<tr class = "k<?php 
            echo $this->escape($tabclass[$k]);
            ?>
">
						<td class="kcol-first">
							<?php 
            echo CKunenaLink::GetProfileLink(intval($topthanks->id));
            ?>
						</td>
						<td class="kcol-mid">
							<img class = "kstats-bar" src = "<?php 
            echo KUNENA_TMPLTMAINIMGURL . 'images/bar.png';
            ?>
" alt = "" height = "10" width = "<?php 
            echo intval($barwidth);
            ?>
%"/>
						</td>
						<td class="kcol-last">
							<?php 
            echo intval($topthanks->receivedthanks);
            ?>
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:31,代码来源:stats.php

示例15: profileIcon

	public function profileIcon($name) {
		switch ($name) {
			case 'gender' :
				switch ($this->gender) {
					case 1 :
						$gender = 'male';
						break;
					case 2 :
						$gender = 'female';
						break;
					default :
						$gender = 'unknown';
				}
				$title = JText::_ ( 'COM_KUNENA_MYPROFILE_GENDER' ) . ': ' . JText::_ ( 'COM_KUNENA_MYPROFILE_GENDER_' . $gender );
				return '<span class="kicon-profile kicon-profile-gender-' . $gender . '" title="' . $title . '"></span>';
				break;
			case 'birthdate' :
				if ($this->birthdate) {
					$date = new JDate ( $this->birthdate, 0 );
					if ($date->toFormat('%Y')<1902) break;
					return '<span class="kicon-profile kicon-profile-birthdate" title="' . JText::_ ( 'COM_KUNENA_MYPROFILE_BIRTHDATE' ) . ': ' . KunenaDate::getInstance($this->birthdate)->toKunena( 'date', 0 ) . '"></span>';
				}
				break;
			case 'location' :
				if ($this->location)
					return '<span class="kicon-profile kicon-profile-location" title="' . JText::_ ( 'COM_KUNENA_MYPROFILE_LOCATION' ) . ': ' . $this->escape ( $this->location ) . '"></span>';
				break;
			case 'website' :
				$url = 'http://' . $this->websiteurl;
				if (! $this->websitename)
					$websitename = $this->websiteurl;
				else
					$websitename = $this->websitename;
				if ($this->websiteurl)
					return '<a href="' . $this->escape ( $url ) . '" target="_blank"><span class="kicon-profile kicon-profile-website" title="' . JText::_ ( 'COM_KUNENA_MYPROFILE_WEBSITE' ) . ': ' . $this->escape ( $websitename ) . '"></span></a>';
				break;
			case 'private' :
				$pms = KunenaFactory::getPrivateMessaging ();
				return $pms->showIcon ( $this->userid );
				break;
			case 'email' :
				// TODO: show email
				return; // '<span class="email" title="'. JText::_('COM_KUNENA_MYPROFILE_EMAIL').'"></span>';
				break;
			case 'profile' :
				if (! $this->userid)
					return;
				return CKunenaLink::GetProfileLink ( $this->userid, '<span class="profile" title="' . JText::_ ( 'COM_KUNENA_VIEW_PROFILE' ) . '"></span>' );
				break;
		}
	}
开发者ID:rich20,项目名称:Kunena,代码行数:51,代码来源:user.php


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