Choose from our various pricing plans. There is a package for everyone!


Display the Avatar in Recent Topics widget

View previous topic View next topic Go down

Tutorial Display the Avatar in Recent Topics widget

Post by Mati™ on Tue Dec 09, 2014 1:52 pm

Display the Avatar in Recent Topics widget


This tutorial will show you how to easily add a avatar in the recent topics widget.

Go to Administration Panel -> Display -> Templates -> Portal then Modify "mod_recent_topics" find this:
Code:

» <a onmouseover="document.getElementById('comments_scroll_container').stop();" onmouseout="document.getElementById('comments_scroll_container').start();" href="{scrolling_row.recent_topic_row.U_TITLE}" title="{scrolling_row.recent_topic_row.L_TITLE}">{scrolling_row.recent_topic_row.L_TOPIC_TITLE}</a><br />
                          <img src="{ICON_TIME}" alt="" />{scrolling_row.recent_topic_row.S_POSTTIME} {BY} 

And replace it with this:
Code:
<div class="module_av">» <a onmouseover="document.getElementById('comments_scroll_container').stop();" onmouseout="document.getElementById('comments_scroll_container').start();" href="{scrolling_row.recent_topic_row.U_TITLE}" title="{scrolling_row.recent_topic_row.L_TITLE}">{scrolling_row.recent_topic_row.L_TOPIC_TITLE}</a><br />
                          <img src="{ICON_TIME}" alt="" />{scrolling_row.recent_topic_row.S_POSTTIME} {BY}&nbsp;</div>

Save and Publish!

Go to Javascript codes management -> Create a new javascript
Title : Your choice
Placement : In all the pages
Paste the code below and submit :
Code:
$(function(){$(function(){$('.module_av').prepend('<span class="rt_avatar">'+_userdata.avatar+'</span>')})});

The go to Display -> Colors -> CSS stylesheet and add the code into your CSS.
Code:
.rt_avatar img {
    border-radius: 3px;
    height: 25px;
    margin-bottom: -6px;
    width: 25px;
}

Demo:


This tutorial was written by Mati™, for FM Focus
avatar
Mati™
Administrator
Administrator

Age : 31
Posts : 2112
Join date : 2011-10-20
Forum Version : PhpBB3
Reputation : 147

View user profile http://fmfocus.forumotion.net/forum

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum