Post Number for phpBB3
+4
Eugeo Igvalt
AlexisMcDevin
Michael_vx
Mati
8 posters
Page 2 of 2
Page 2 of 2 • 1, 2
Re: Post Number for phpBB3
@Michael_vx,
For phpbb2 :
Find :
Replace by :
Save and publish.
For phpbb2 :
Find :
- Code:
<td><span class="postdetails"><img src="{postrow.displayed.MINI_POST_IMG}" alt="{postrow.displayed.L_MINI_POST_ALT}" title="{postrow.displayed.L_MINI_POST_ALT}" border="0" />{L_POST_SUBJECT}: {postrow.displayed.POST_SUBJECT} <img src="{postrow.displayed.MINI_TIME_IMG}" alt="" border="0" />{postrow.displayed.POST_DATE}</span></td>
Replace by :
- Code:
<td><span class="postdetails"><a class="postNumber" href="{postrow.displayed.POST_URL}">#{postrow.displayed.COUNT_POSTS}</a><img src="{postrow.displayed.MINI_POST_IMG}" alt="{postrow.displayed.L_MINI_POST_ALT}" title="{postrow.displayed.L_MINI_POST_ALT}" border="0" />{L_POST_SUBJECT}: {postrow.displayed.POST_SUBJECT} <img src="{postrow.displayed.MINI_TIME_IMG}" alt="" border="0" />{postrow.displayed.POST_DATE}</span></td>
Save and publish.
Re: Post Number for phpBB3
ops 1st
i thought my reply was sent last night i think internet fooled me
any way thanks a lot @Ange Tuteur
so the code you provide before this was for phpbb3 ? or other version
i like to know if you dont mind
i thought my reply was sent last night i think internet fooled me
any way thanks a lot @Ange Tuteur
so the code you provide before this was for phpbb3 ? or other version
i like to know if you dont mind
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: Post Number for phpBB3
Hi,
Enter this In the JavaScript code management (select "In all the topics):
Adjust the "var posts_per_page = 20", with the amount of posts per page on your forum.
Then enter this In the CSS:
Adjust the "float:right" as per your forum's profile position. If It's on the left, enter "float:left".
Enter this In the JavaScript code management (select "In all the topics):
- Code:
$(function() {
var posts_per_page = 20; //number of posts you have displayed per page in topics.
var page = document.title.match(/-\sPage\s(\d+)$/), page = page ? page[1] : 1;
var posts = $('.postprofile', document.getElementById('main-content')), postnum = (page - 1) * posts_per_page;
for(var i = 0; i < posts_per_page; i++) {
if(!posts[i]) break;
var link = posts[i].previousSibling.getElementsByTagName('h2')[0].getElementsByTagName('a')[0].href;
posts[i].innerHTML = '<span class="postnumber"><a href="' + link + '">#' + ++postnum + '</a></span>' + posts[i].innerHTML;
}
});
Adjust the "var posts_per_page = 20", with the amount of posts per page on your forum.
Then enter this In the CSS:
- Code:
.postnumber {
float:right;
font-size: 1.2em;
}
Adjust the "float:right" as per your forum's profile position. If It's on the left, enter "float:left".
inallsorts- Forumember
- Posts : 246
Reputation : 8
Language : English
Re: Post Number for phpBB3
Hi Mati,
This did not work for you ?
This did not work for you ?
Ange Tuteur wrote:Go to Administration Panel > Display > Templates > General > viewtopic_body
Find :
- Code:
<div style="position: relative; top: -30px; width: 1px;" id="{postrow.displayed.U_POST_ID}"></div>
Replace by :
- Code:
<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>
Save and publish
Use CSS to change the alignment :
Display > Colors > CSS stylesheet
- Code:
.postNumberContainer { text-align:right }
Re: Post Number for phpBB3
Mati™ wrote:Hello @inallsorts, code is not working...
Hi Mati,
The aforementioned code I posted, will not work If the "Always show the first post in the topics" Is enabled via "ACP > General > Messages and e-mails > Configuration". The radio button must be set to "No".
Also (In the same ACP directory), the "Number of posts from previous page to display on last page" must be set to "0".
Do you have either or both options enabled?
inallsorts- Forumember
- Posts : 246
Reputation : 8
Language : English
Re: Post Number for phpBB3
Ange Tuteur wrote:Hi Mati,
This did not work for you ?Ange Tuteur wrote:Go to Administration Panel > Display > Templates > General > viewtopic_body
Find :
- Code:
<div style="position: relative; top: -30px; width: 1px;" id="{postrow.displayed.U_POST_ID}"></div>
Replace by :
- Code:
<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>
Save and publish
Use CSS to change the alignment :
Display > Colors > CSS stylesheet
- Code:
.postNumberContainer { text-align:right }
This code works problem is solved and topic can be locked now thanks guys!
Re: Post Number for phpBB3
I remember that we still have two things are not solved.
- Small style for post number below does not work with Ange's code.
- Small style for post number below does not work with Ange's code.
- Code:
#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;
}
Page 2 of 2 • 1, 2
Similar topics
» Remove post number
» Where to find post number???
» Reset Post Number
» Post Number not showing up in some posts
» The number of topics does not match the number of articles
» Where to find post number???
» Reset Post Number
» Post Number not showing up in some posts
» The number of topics does not match the number of articles
Page 2 of 2
Permissions in this forum:
You cannot reply to topics in this forum