Типа такого выходит
prosilver
overall_header.html
</head>
<!-- IF S_VIEWTOPIC -->
<style>
dd.pa-zwezda {
position: relative;
white-space: pre-wrap;
width: 200px !important;
}
dd.pa-zwezda img{
width: 18px;
height: 18px;
}
</style>
<!-- ENDIF -->
viewtopic_body.html
<!-- IF postrow.POSTER_POSTS != '' --><dd><strong>{L_POSTS}:</strong> {postrow.POSTER_POSTS}</dd><!-- ENDIF -->
<dd>
<dd class="pa-posts">
overall_footer.html
</body>
<!-- IF S_VIEWTOPIC -->
<script type="text/javascript">
var MyZwzd=[
"{T_THEME_PATH}/images/stars/3.png",3,
"{T_THEME_PATH}/images/stars/10.png",10,
"{T_THEME_PATH}/images/stars/20.png",20,
"{T_THEME_PATH}/images/stars/50.png",50,
"{T_THEME_PATH}/images/stars/100.png",100,
"{T_THEME_PATH}/images/stars/300.png",300,
"{T_THEME_PATH}/images/stars/500.png",500,
"{T_THEME_PATH}/images/stars/1000.png",1000,
"{T_THEME_PATH}/images/stars/2000.png",2000,
"{T_THEME_PATH}/images/stars/3000.png",3000,
"{T_THEME_PATH}/images/stars/5000.png",5000,
"End"];
$(".postprofile .pa-posts").each(function () {
var zw = 0;
zw = $(this).html().replace('<strong>{L_POSTS}:</strong> ','');
zw = Math.floor(zw),
ZWleng = MyZwzd.length-2;
if(zw>=MyZwzd[1]){
var L1=[],
L2=[],
a=false;
for(i = 0; i < ZWleng; i += 2){
j = ZWleng - i;
L1[i/2] = Math.floor(zw/MyZwzd[j]);
if(L1[i/2] > 0){
a=true
};
L2[i/2] = MyZwzd[j-1];
zw = zw - MyZwzd[j] * L1[i/2];
}
if(a){
$(this).parent("dl").children("dd:nth-child(2)").after('<dd class="pa-zwezda"></dd>');
for (var i = 0; i < L1.length; i++){
if(L1[i] >0){
var zwzdaImg='<img src="'+L2[i]+'" title="{L_POSTS}: '+MyZwzd[ZWleng-i*2]+'"/>';
for (var x = 0; x < L1[i]; x++){
$(this).parent("dl").children(".pa-zwezda").append(zwzdaImg);
}
}
}
}
};
});
</script>
<!-- ENDIF -->
Вернуться в 450 модов движка форумов phpBB (до версии 3.0.14)