Example #1
0
 /**
  * Rewrite URLs in Top 5 Extension
  *
  * @param	object	$event	The event object
  * @return	null
  * @access	public
  */
 public function topfive_modify_tpl_ary($event)
 {
     $tpl_ary = $event['tpl_ary'];
     $replies = $this->base->get_count('topic_posts', $event['row'], $event['row']['forum_id']) - 1;
     $u_view_topic = $this->base->generate_topic_link($event['row']['forum_id'], $event['row']['forum_name'], $event['row']['topic_id'], $event['row']['topic_title']);
     $tpl_ary['U_TOPIC'] = append_sid($this->base->generate_lastpost_link($replies, $u_view_topic) . '#p' . $event['row']['topic_last_post_id']);
     $event['tpl_ary'] = $tpl_ary;
 }
Example #2
0
 /**
  * Rewrite links to topics in forum view
  *
  * @param	object	$event	The event object
  * @return	null
  * @access	public
  */
 public function viewforum_modify_topicrow($event)
 {
     $topic_row = $event['topic_row'];
     $this->forum_title = $topic_row['FORUM_NAME'];
     $this->forum_id = $topic_row['FORUM_ID'];
     $this->topic_title = $topic_row['TOPIC_TITLE'];
     $this->topic_id = $topic_row['TOPIC_ID'];
     $u_view_topic = $this->base->generate_topic_link($this->forum_id, $this->forum_title, $this->topic_id, $this->topic_title);
     $topic_row['U_VIEW_TOPIC'] = append_sid($u_view_topic);
     $topic_row['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($this->forum_id, $this->forum_title));
     $topic_row['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($event['topic_row']['REPLIES'], $u_view_topic) . '#p' . $event['row']['topic_last_post_id']);
     $event['topic_row'] = $topic_row;
 }