예제 #1
0
 /**
  * Generates a link to a specific page of a user's post history.
  * @param  string $label  The label of the page link
  * @param  int    $page   The number of the page to be linked to
  * @param  int    $userId The UID of the user whose post history is to be displayed.
  * @return string         A link to the specified page.
  */
 function listpost_pagelink($label, $page, $userId)
 {
     $linkParams[$this->prefixId] = array('action' => 'post_history', 'user_id' => $userId, 'page' => $page);
     if ($this->useRealUrl()) {
         $linkParams[$this->prefixId] = array('action' => 'post_history', 'fid' => tx_mmforum_tools::get_username($userId), 'tid' => $this->pi_getLL('realurl.page') . '_' . $page);
     }
     return '| ' . $this->pi_linkToPage($label, $GLOBALS['TSFE']->id, '', $linkParams) . ' |';
 }
예제 #2
0
 /**
  * Returns a link to a user's profile page.
  * @param  int    $userid The user UID, to whose profile the link is to
  *                        be created
  * @return string         The link to the user's profile page
  */
 function link_profil($userid)
 {
     $username = tx_mmforum_tools::get_username($userid);
     $params['tx_mmforum_pi1'] = array('action' => 'forum_view_profil', 'user_id' => $userid);
     if ($this->getIsRealURL()) {
         unset($params['tx_mmforum_pi1']['user_id']);
         $params['tx_mmforum_pi1']['fid'] = tx_mmforum_tools::get_username($userid);
     }
     return $this->pi_linkToPage($username, $this->conf['pid_forum'], '', $params);
 }