MyBB Community Forums

Full Version: Make post ID same as forum post number
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I need to make it so that PID is the same as the total post count of the entire thread. For example, somebody posts in a thread, that post is now the 2800th post of the entire thread, the number at the top right of the post is "#2800". This number is also linked to site.com/this-is-the-thread?pid=2800#pid2800.
so for each thread, the starting post is 1#1 ; it's first response is 2#2 ... and so on
in this method, post IDs are not unique !! it appears to be a complex task to achieve
Damn, both my proposals are "complex", http://community.mybb.com/thread-106490.html

I thought that this one would be easier because in this case the PID just goes in order, one after the other. First it's 2800, then then next post is 2801, then 2802, and so on.
No, PID's are unique. It can't be done.
(2011-11-15, 08:57 PM)Paul H. Wrote: [ -> ]No, PID's are unique. It can't be done.

I was thinking about it and, in theory, based on my limited knowledge of MyBB I think this is possible. Can't you just make it so whatever is the number on the top right hand corner of every post is exactly the same as the total post count of the forum? Can't you just take whatever code is in the stats.php for the total post count and copy it so that same number (count of total posts in the forum) is displayed in the top right hand corner? It doesn't need to be linked.
The actual PID of the post needs to be unique and must be an auto-increment.

If you mean the Post Number then anything is possible. You can make the Post Number be the anchor of the postbit instead of the PID, but you can run into pagination issues if things are deleted.

No matter what you want to do, the PID will always need to be unique.

You'd have to call it something other than pid then and make quite a lot of effort for it to work. As it is the pid is a unique number that allows identifying a post even without specifying the thread it belongs to. You can't get rid of that easily, not completely, not without a plugin, and most likely code changes in MyBB core as well.

Too much effort just to change a rather irrelevant number.
I'm not talking about the PID system here, all I need is the total post count of the forum to be displayed where the PID is usually shows in a post. If you go to my forum right now you'll see that currently random (on reload) four digit numbers are placed where the PID is usually placed in the post.
Isn't there like a code, something like {$post['total']} that can be added the the top right hand corner.
In theory this is simple.
so you want the "Post: #X" to work like it does for a thread, but for the forum the thread is in instead?

since you have only one forum, you should just set the X part to be the PID instead of postnum and leave it at that.

If you had more than one forum, it would not really be feasible since you can't easily track where within the forum the post is, without a ton of work.
Edit : not seen Pavemen's above response Smile
_____________________________________

in general, the latest post {which appeared just now} id number is the total number of posts

that is, when above post appeared, it was the latest post AND its pid number is 785909 ; this
number can be shown instead of the counter starting with #1 ; BUT a thread will not consist
of serial post id numbers {7th post on this thread has pid785644 & 8th post has pid785909}
Pages: 1 2