Making avatar in last post to be clickable - Avatar in last post
Re: Making avatar in last post to be clickable
-
- Registered User
- Posts: 65
- Joined: Mon Nov 28, 2016 12:25 am
- Contact:
Re: Making avatar in last post to be clickable
it’s better to use onclick, from 1.0.4 version you can apply these changes:
- OPEN:
Code: Select all
./ext/bb3mobi/lastpostavatar/styles/all/template/event/forumlist_body_last_post_title_prepend.html
- FIND:
<span class="lastpostavatar">{forumrow.AVATAR_IMG}</span><!-- ENDIF -->
- REPLACE WITH:
Code: Select all
<span class="lastpostavatar" onclick="window.location = '{forumrow.U_LAST_POSTER}';">{forumrow.AVATAR_IMG}</span><!-- ENDIF -->
- OPEN:
./ext/bb3mobi/lastpostavatar/event/listener.php
- FIND:
Code: Select all
$topic_row['LAST_POST_AUTHOR_FULL'] .= '<span class="lastpostavatar">' . $this->avatar_img_resize($this->userrow[$row['topic_last_poster_id']]) . '</span>';
- REPLACE WITH:
Code: Select all
$topic_row['LAST_POST_AUTHOR_FULL'] .= '<span class="lastpostavatar" onclick="window.location=\'' . $topic_row['U_LAST_POST_AUTHOR'] . '\'">' . $this->avatar_img_resize($this->userrow[$row['topic_last_poster_id']]) . '</span>';
- FIND:
Code: Select all
$tpl_ary['LAST_POST_AUTHOR_FULL'] .= '<span class="lastpostavatar">' . $this->avatar_img_resize($row) . '</span>';
- REPLACE WITH:
Code: Select all
$tpl_ary['LAST_POST_AUTHOR_FULL'] .= '<span class="lastpostavatar" onclick="window.location=\'' . $tpl_ary['U_LAST_POST_AUTHOR'] . '\'">' . $this->avatar_img_resize($row) . '</span>';
- FIND:
Code: Select all
$tpl_ary['LAST_POST_AUTHOR_FULL'] .= '<span class="lastpostavatar">' . $this->avatar_img_resize($row) . '</span>';
- REPLACE WITH:
Code: Select all
$tpl_ary['LAST_POST_AUTHOR_FULL'] .= '<span class="lastpostavatar" onclick="window.location=\'' . $tpl_ary['U_LAST_POST_AUTHOR'] . '\'">' . $this->avatar_img_resize($row) . '</span>';

- Galixte de EzCom
- Registered User
- Posts: 1104
- Joined: Mon Oct 04, 2004 11:14 pm
- Location: France
- Name: Raphaël M.
- Contact: