Avatars in the last topic #2
2 posters
Page 1 of 1
Avatars in the last topic #2
All the story:
When i have this in my templates it works fine:
What i did is to change the template into this:
And i added to the CSS this:
So it would look like this:
And now i want to add the avatar of the last topic in the box next to the info of the last topic.. How can i do this?
Version: PunBB
When i have this in my templates it works fine:
- Index_Box Template:
- Code:
<!-- BEGIN catrow -->
<!-- BEGIN tablehead -->
<div class="main-head">
<div class="page-title">{catrow.tablehead.L_FORUM}</div>
</div>
<div class="main-content">
<table cellspacing="0" class="table">
<thead>
<tr>
<th class="tcl"></th>
<th class="tc2"><div class="sthlh"><b>Στατιστικά</b></div></th>
<th class="tcr"><center><b>Tελευταία Απάντηση</b></center></th>
</tr>
</thead>
<tbody class="statused">
<!-- END tablehead -->
<!-- BEGIN forumrow -->
<tr>
<td class="tcl" width="450px" style="padding-right: {catrow.forumrow.INC_LEVEL_RIGHT}; padding-left: {catrow.forumrow.INC_LEVEL_LEFT};">
<span class="status" style="margin-right: -{catrow.forumrow.INC_WIDTH_ICON}; margin-left: -{catrow.forumrow.INC_WIDTH_ICON};">
<img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" />
</span>
<h{catrow.forumrow.LEVEL} class="hierarchy"><a href="{catrow.forumrow.U_VIEWFORUM}" class="forumtitle">{catrow.forumrow.FORUM_NAME}</a></h{catrow.forumrow.LEVEL}>
<br />
<div class="descript"><span class="genmed">{catrow.forumrow.FORUM_DESC}</span></div>
<div class="subforums"><span class="gensmall">
<!-- BEGIN switch_moderators_links -->
{catrow.forumrow.switch_moderators_links.L_MODERATOR}{catrow.forumrow.switch_moderators_links.MODERATORS}
<!-- END switch_moderators_links -->
{catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
</span></div>
<strong>{forumrow.L_SUBFORUM_STR}</strong> {forumrow.SUBFORUMS}
</td>
<td class="tc2" align="center" valign="middle" height="50" width="200">
<span class="gensmall"><b>Θέματα :</b> {catrow.forumrow.TOPICS}<div class="apantiseisthemata">Απαντήσεις :</div> {catrow.forumrow.POSTS}</span>
</td>
<td class="tcr" align="right" valign="right">
<span><center>
<!-- BEGIN switch_topic_title -->
<a href="{catrow.forumrow.U_LATEST_TOPIC}" title="{catrow.forumrow.LATEST_TOPIC_TITLE}">{catrow.forumrow.LATEST_TOPIC_NAME}</a><br />
<!-- END switch_topic_title -->
{catrow.forumrow.USER_LAST_POST}
</center></span>
</td>
</tr>
<!-- END forumrow -->
<!-- BEGIN tablefoot -->
</tbody>
</table>
</div>
<!-- END tablefoot -->
<!-- END catrow -->
- Javascript:
- Code:
$(document).on('ready', function() {
$('.statused td.tcr').prepend('<div class="avatar-index"><div>');
$('.statused td.tcr .avatar-index').each(function () {
var profileUser = $(this).parent().children('span').children('center').children('strong').children('a').attr('href');
$(this).html('<a href="' + profileUser + '" class="avatar-index-enlace"><img src="http://cdn1.iconfinder.com/data/icons/basicset/user_64.png" alt="No Avatar" /></a>');
$(this).children('a').load(profileUser + '#profile-advanced-right .main-content.clearfix.center img:eq(0)');
});
});
- CSS:
- Code:
.avatar-index {
float: left;
}
.avatar-index img {
width: 42px;
height: 42px;
padding: 1px;
border: 2px solid #e8e8e8;
box-shadow:inset 0 0 7px #001C7A;
margin: 0 5px;
}
What i did is to change the template into this:
- NEW Index_Box Template:
- Code:
<!-- BEGIN catrow -->
<!-- BEGIN tablehead -->
<div class="main-head">
<div class="page-title">{catrow.tablehead.L_FORUM}</div>
</div>
<div class="main-content">
<table cellspacing="0" class="table">
<thead>
<tr>
<th class="tcl"></th>
</tr>
</thead>
<tbody class="statused">
<!-- END tablehead -->
<!-- BEGIN forumrow -->
<tr>
<td class="tcl" width="450px" style="padding-right: {catrow.forumrow.INC_LEVEL_RIGHT}; padding-left: {catrow.forumrow.INC_LEVEL_LEFT};">
<span class="status" style="margin-right: -{catrow.forumrow.INC_WIDTH_ICON}; margin-left: -{catrow.forumrow.INC_WIDTH_ICON};">
<img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" />
</span>
<h{catrow.forumrow.LEVEL} class="hierarchy"><a href="{catrow.forumrow.U_VIEWFORUM}" class="forumtitle">{catrow.forumrow.FORUM_NAME}</a></h{catrow.forumrow.LEVEL}>
<br />
<div class="descript"><span class="genmed">{catrow.forumrow.FORUM_DESC}</span></div>
<div class="subforums"><span class="gensmall">
<!-- BEGIN switch_moderators_links -->
{catrow.forumrow.switch_moderators_links.L_MODERATOR}{catrow.forumrow.switch_moderators_links.MODERATORS}
<!-- END switch_moderators_links -->
{catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
</span></div>
<div class="thematakouti"><center><b>Θέμ. :</b> {catrow.forumrow.TOPICS}</center></div><div class="apantiseiskouti"><center>Απ. : {catrow.forumrow.POSTS}</center></div>
<center>
<!-- BEGIN switch_topic_title -->
<div class="themataforum"><a href="{catrow.forumrow.U_LATEST_TOPIC}" title="{catrow.forumrow.LATEST_TOPIC_TITLE}">{catrow.forumrow.LATEST_TOPIC_NAME}</a><br />
{catrow.forumrow.USER_LAST_POST}</div>
<!-- END switch_topic_title -->
</center>
<strong>{forumrow.L_SUBFORUM_STR}</strong> {forumrow.SUBFORUMS}
</tr>
<!-- END forumrow -->
<!-- BEGIN tablefoot -->
</tbody>
</table>
</div>
<!-- END tablefoot -->
<!-- END catrow -->
And i added to the CSS this:
- CSS:
- Code:
.themataforum {
border: 1px solid #cccacc;
padding: 3px 7px;
background: #FAFAFA;
color: #616161;
box-shadow: inset 0 0 5px #1f537b;
border-radius: 4px;
position:absolute;
margin:-37px 0px 0px 700px;
font-size:12px;
width:230px;
height:50px;
}
So it would look like this:
And now i want to add the avatar of the last topic in the box next to the info of the last topic.. How can i do this?
Version: PunBB
Re: Avatars in the last topic #2
If you make changes to the template in that area you will have to expect it to not work.
Please try this and see if it works:
Please try this and see if it works:
- Code:
$(document).on('ready', function() {
$('.themataforum').prepend('<div class="avatar-index"><div>');
$('.themataforum .avatar-index').each(function () {
var profileUser = $(this).parent().children('strong').children('a').attr('href');
$(this).html('<a href="' + profileUser + '" class="avatar-index-enlace"><img src="http://cdn1.iconfinder.com/data/icons/basicset/user_64.png" alt="No Avatar" /></a>');
$(this).children('a').load(profileUser + '#profile-advanced-right .main-content.clearfix.center img:eq(0)');
});
});
Re: Avatars in the last topic #2
I knew it wouldn't show it but i thought it was the column the problem!!
Anyway!! Seth u r the best!!!
All the thanks of the world i give you!!!
SOOOOLVED!!!
Anyway!! Seth u r the best!!!
All the thanks of the world i give you!!!
SOOOOLVED!!!
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Similar topics
» Replace avatar with topic image to recent topic widget
» (Only Topic) Missing Avatars
» Topic title/icon problem and round avatars
» Difference between read a topic and open a topic in permissions? And question about member attachments
» not access to topic by group member depend on topic icon.
» (Only Topic) Missing Avatars
» Topic title/icon problem and round avatars
» Difference between read a topic and open a topic in permissions? And question about member attachments
» not access to topic by group member depend on topic icon.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum