Ex:
Post Number: #1
Post Number: #2
Post Number: #3
Last edited by Mati™ on January 2nd 2015, 11:22 am; edited 1 time in total
var CopyrightNotice = 'Copyright Code By Sam Hameed & my-as7ab.com';$(function(){$(".hr").each(function(index){$(this).after(" <strong> مساهمة[</strong><font color='red'>"+index+"</font><strong>] </strong>")})});
Michael_vx wrote:i think this could work
in javascript
- Code:
var CopyrightNotice = 'Copyright Code By Sam Hameed & my-as7ab.com';$(function(){$(".hr").each(function(index){$(this).after(" <strong> مساهمة[</strong><font color='red'>"+index+"</font><strong>] </strong>")})});
<span class="postNumber">{postrow.displayed.COUNT_POSTS_NUMBER}</span><script type="text/javascript">(function(){var tag = '#'; for (var i=0,n=document.getElementsByTagName('SPAN'); i<n.length; i++) if (/postNumber/.test(n[i].className)) n[i].innerHTML = n[i].innerHTML.replace(/^.*?n°(\d+)/,tag+'$1')})();</script>
$(function(){
torb = "top"
lorr = "right"
$('#main-content .post').each(function(index){
var count1 = $('.pagination:last>strong:first').text();
count2 = index;
if(count1>1){ count2 = $('#main-content .post').length+index*count1}
turl = $(this).attr('id')
turl = location.href + "#" + turl
if (torb=="top"){
if (lorr=="left"){ $(this).prepend(' <div id="ppostc"><a href="'+turl+'">#'+count2+'</a></div> '); }else{$(this).prepend(' <div id="ppostc"><a href="'+turl+'">#'+count2+'</a></div> '); }
}else{
if (lorr=="left"){$(this).append(' <div id="ppostc"><a href="'+turl+'">#'+count2+'</a></div> '); }else{$(this).append(' <div id="ppostc"><a href="'+turl+'">#'+count2+'</a></div> '); }
}
})
});
$(function(){
torb = "top";
lorr = "right";
$('#main-content .post').each(function(index){
var count1 = $('.pagination:last>strong:first').text();
count2 = index;
if(count1>1){ count2 = $('#main-content .post').length+index*count1;}
turl = $(this).attr('id');
turl = location.href + "#" + turl;
if (torb=="top"){
if (lorr=="left"){
$(this).prepend(' <div id="ppostc"><a href="'+turl+'">#'+count2+'</a></div> ');
}else{
$(this).prepend(' <div id="ppostc"><a href="'+turl+'">#'+count2+'</a></div> ');
}
}else{
if (lorr=="left"){
$(this).append(' <div id="ppostc"><a href="'+turl+'">#'+count2+'</a></div> ');
}else{
$(this).append(' <div id="ppostc"><a href="'+turl+'">#'+count2+'</a></div> ');
}
}
})
});
torb = "top";
lorr = "right";
#ppostc {
font-weight: bold;
font-size: 1em;
border: 1px solid white;
width: 50px;
text-align: center;
border-radius: 5px;
background-color: gray;
color: black !important;
}
_Twisted_Mods_ wrote:my fault try this
- Code:
$(function(){
torb = "top";
lorr = "right";
$('#main-content .post').each(function(index){
var count1 = $('.pagination:last>strong:first').text();
count2 = index;
if(count1>1){ count2 = $('#main-content .post').length+index*count1;}
turl = $(this).attr('id');
turl = location.href + "#" + turl;
if (torb=="top"){
if (lorr=="left"){
$(this).prepend(' <div id="ppostc"><a href="'+turl+'">#'+count2+'</a></div> ');
}else{
$(this).prepend(' <div id="ppostc"><a href="'+turl+'">#'+count2+'</a></div> ');
}
}else{
if (lorr=="left"){
$(this).append(' <div id="ppostc"><a href="'+turl+'">#'+count2+'</a></div> ');
}else{
$(this).append(' <div id="ppostc"><a href="'+turl+'">#'+count2+'</a></div> ');
}
}
})
});
#ppostc {
background-color: #d3d3d3;
border: 1px solid #fff;
border-radius: 5px;
color: #000 !important;
font-size: 1em;
font-weight: 700;
text-align: center;
width: 50px;
float: right;
}
_Twisted_Mods_ wrote:ok give me min i prob did my mah wrong in the code... matti i added ur popup just give me sec to check the post on second page
$(function(){
torb = "top";
lorr = "right";
$('#main-content .post').each(function(index){
var count1 = $('.pagination:last>strong:first').text();
count2 = index;
if(count1>1){ count2 = ($('#main-content .post').length-1*count1)+index;}
turl = $(this).attr('id');
turl = location.href + "#" + turl;
if (torb=="top"){
if (lorr=="left"){
$(this).prepend(' <div id="ppostc"><a href="'+turl+'">#'+count2+'</a></div> ');
}else{
$(this).prepend(' <div id="ppostc" style="float:right;"><a href="'+turl+'">#'+count2+'</a></div> ');
}
}else{
if (lorr=="left"){
$(this).append(' <div id="ppostc"><a href="'+turl+'">#'+count2+'</a></div> ');
}else{
$(this).append(' <div id="ppostc" style="float:right;"><a href="'+turl+'">#'+count2+'</a></div> ');
}
}
})
$('#ppostc a').click(function() {
alert($(this).attr("href"));
});
});
$(function(){
torb = "top";
lorr = "right";
$('#main-content .post').each(function(index){
var count1 = $('.pagination:last>strong:first').text();
count2 = index+1;
if(count1>1){ count2 = ($('#main-content .post').length-1*count1)+index+1;}
turl = $(this).attr('id');
turl = location.href + "#" + turl;
if (torb=="top"){
if (lorr=="left"){
$(this).prepend(' <div id="ppostc"><a href="'+turl+'">#'+count2+'</a></div> ');
}else{
$(this).prepend(' <div id="ppostc" style="float:right;"><a href="'+turl+'">#'+count2+'</a></div> ');
};
}else{
if (lorr=="left"){
$(this).append(' <div id="ppostc"><a href="'+turl+'">#'+count2+'</a></div> ');
}else{
$(this).append(' <div id="ppostc" style="float:right;"><a href="'+turl+'">#'+count2+'</a></div> ');
};
};
});
$('#ppostc a').click(function() {
alert($(this).attr("href"));
});
});
Mati™ wrote:Yes is not counting correct I have 15 post per page after 15 is not counting 16 17 18 and so on...
after test working with phpbb3 and punbb good_Twisted_Mods_ wrote:lol im messing up alot today
- Code:
$(function(){
torb = "top";
lorr = "right";
$('#main-content .post').each(function(index){
var count1 = $('.pagination:last>strong:first').text();
count2 = index+1;
if(count1>1){ count2 = ($('#main-content .post').length-1*count1)+index+1;}
turl = $(this).attr('id');
turl = location.href + "#" + turl;
if (torb=="top"){
if (lorr=="left"){
$(this).prepend(' <div id="ppostc"><a href="'+turl+'">#'+count2+'</a></div> ');
}else{
$(this).prepend(' <div id="ppostc" style="float:right;"><a href="'+turl+'">#'+count2+'</a></div> ');
};
}else{
if (lorr=="left"){
$(this).append(' <div id="ppostc"><a href="'+turl+'">#'+count2+'</a></div> ');
}else{
$(this).append(' <div id="ppostc" style="float:right;"><a href="'+turl+'">#'+count2+'</a></div> ');
};
};
});
$('#ppostc a').click(function() {
alert($(this).attr("href"));
});
});
<div style="position: relative; top: -30px; width: 1px;" id="{postrow.displayed.U_POST_ID}"></div>
<div style="position: relative; top: -30px; width: 1px;" id="{postrow.displayed.U_POST_ID}"></div>
<div class="postNumberContainer"><a href="{postrow.displayed.POST_URL}" class="postNumber">#{postrow.displayed.COUNT_POSTS}</a></div>
.postNumberContainer { text-align:right }