Hello,
I have received great help from the forum before and I've now gotten stuck again with a problem I can't seem to solve myself, hopefully somebody could point me in the right direction.
I would like to add a link to private message the user who's profile you're currently viewing. Instead of only having a private message icon at the "users you're following page", I would also like to have such a private message link directly on a users profile.
In code the statement "myfriend" is used to refer to a friend of the user on the "users you're following page", but I can't figure out what statement is used to refer to the user who's profile you're viewing.
I have copied the following code from user_center.tpl and inserted it at the top of the same file:
Although the above code inserts a link to private message a user when I insert it at the top of user_center.tpl. But when clicking the link you're not taken to private message the user who's profile you're looking at, it instead directs you to send a private message to a friend of the user who's profile you're looking at.Code:{foreach from=$friends item=myfriend} {php} $this->_vars['friend_avatar'] = get_avatar('small', $this->_vars['myfriend']['user_avatar_source'], $this->_vars['myfriend']['user_login'], $this->_vars['myfriend']['user_email']); {/php} <tr> <td><a href="{$my_pligg_base}/module.php?module=simple_messaging&view=compose&to={$myfriend.user_login}&return={$templatelite.server.REQUEST_URI|urlencode}"><img src="{$my_pligg_base}/templates/{$the_template}/images/user_message.png" border="0"></a></td> </tr> {/foreach} </table>
I understand that this is due to the "$friends item=myfriend" statement at the beginning of the code I've posted and the others references to "myfriend" in the code, but I don't know what to replace them with to indicate the user who's profile you're currently looking at. So my question is what line of code instead of "myfriend" could I use to refer to the user who's profile you're looking at?
Thanks very much for taking your time and helping me!
Best regards, Jonas



Reply With Quote





