Data/ora curentă este: Vin Apr 26, 2024 11:59 pm
1 rezultat gasit pentru Changelog
Top Five Mod
Sugesti oferita de @Emanuel. Multumim !
Pentru versiunea phpBB:
- Cod:
<div class="main">
<div class="main-content">
<table class="table" cellspacing="1" id="top_five">
<thead>
<tr>
<th style="width: 50%;">{L_NEWEST_TOPICS}<!-- #BUG --> Newest Posts</th>
<th style="width: 20%;">{L_TOP_FIVE_ACTIVE}<!-- #BUG --> Top Active Users</th>
<th style="width: 30%;">{L_TOP_FIVE_NEWEST}<!-- #BUG --> Newest Users</th>
</tr>
</thead>
<tbody class="statused">
<tr class="bg2 row2">
<td valign="top"><!-- BEGIN top_five_topic --><!-- IF top_five_topic.NO_TOPIC_TITLE-->{top_five_topic.NO_TOPIC_TITLE}<!-- ELSE --><a href="{top_five_topic.U_TOPIC}">{top_five_topic.TOPIC_TITLE}</a><br /> {top_five_topic.USERNAME_FULL} {top_five_topic.LAST_TOPIC_TIME}<br /><!-- ENDIF --><!-- END top_five_topic --></td>
<td valign="top"><!-- BEGIN top_five_active -->{top_five_active.USERNAME_FULL}<br /> {L_POSTS}: <a href="{top_five_active.S_SEARCH_ACTION}">{top_five_active.POSTS}</a><br /><!-- END top_five_active --></td>
<td valign="top"><!-- BEGIN top_five_newest -->{top_five_newest.USERNAME_FULL}<br /> {L_JOINED}: {top_five_newest.REG_DATE}<br /><!-- END top_five_newest --></td>
</tr>
</tbody>
</table>
</div>
</div>
Codul JS:
- Cod:
(function(j){
/*
- @Top Five Mod [phpBB]
- @Automod TopFive Forumotion
*/
window.top_five_Mod = {
init: function() {
jQuery('.module.recent-topic').appendTo('table#top_five tbody tr.bg2.row2 td:eq(0)');
jQuery('.module.recent-topic br:last').remove();
jQuery('.module.recent-topic').replaceWith(jQuery('.module.recent-topic').html());
jQuery('.module.active-posters').appendTo('table#top_five tbody tr.bg2.row2 td:eq(1)');
jQuery('.module.active-posters').replaceWith(jQuery('.module.active-posters').html());
top_five_Mod.edit(); top_five_Mod.newestMem(); top_five_Mod.nEdit();
},
edit: function(a,cd) {
cd = jQuery('table#top_five tbody tr.bg2.row2 td:eq(1) .row_count');
cd.each(function() {
var number = $('table', this).attr('title').match(/\d+/g)[0];
$('table', this).replaceWith(' Posts: '+ number +'<br />');
});
},
newestMem: function() {
jQuery.get('/memberlist?mode=joined&order=DESC&submit=Ok&username', function(data, error) {
if(!data) console.log(error);
xSucces = jQuery('.pun .frm .frm-form table tbody tr:lt(5)', data);
jQuery('table#top_five tbody tr.bg2.row2 td:eq(2)').html(xSucces);
localStorage.setItem('save_query', jQuery('table#top_five tbody tr.bg2.row2 td:eq(2)').html());
window.top_five_Mod.nEdit();
});
if(localStorage.getItem('save_query'))
{
xSucces = localStorage.getItem('save_query');
jQuery('table#top_five tbody tr.bg2.row2 td:eq(2)').html(xSucces);
window.top_five_Mod.nEdit();
}
},
nEdit: function() {
jQuery('table#top_five tbody tr.bg2.row2 td:eq(2) tr').each(function(data) {
var user = jQuery('td.avatar-mini a', this).text();
var uurl = jQuery('td.avatar-mini a', this).attr('href');
var regd = jQuery('td.avatar-mini', this).next().next().text();
jQuery(this).replaceWith('<div class="mem_rows"><b style="font-size: 11px;"><a href="http://'+ window.location.host +''+ uurl +'">'+ user +'</a></b><br /> Joined: '+ regd +'</div>');
});
}
/* cache: function() {
sessionStorage.setItem('link_mod','N/A');
}*/
};
jQuery(function() {
setTimeout(function() {
if(sessionStorage.getItem('link_mod'))
{
window.top_five_Mod.init()
} else {
window.top_five_Mod.init()
}
}, 50);
jQuery('script[src^="/1.7.2/jquery.min.js"]').attr('src','http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js');
});
}());
- la data de Sam Noi 28, 2015 4:52 pm
- Cauta in: Zona de analiza & dezvoltare
- Subiect: Top Five Mod
- Raspunsuri: 9
- Vizualizari: 8156