PDA

View Full Version : Post Counter & Direct Link


bira
06 Jul 2001, 09:04
This is a small hack I have on my BB that I posted some 2 months ago in reply to a thread in the hacks request forum. Since then, a couple of people contacting me asking me this hack, so I'm posting it here in the release forum.

It numbers your posts in a thread - the first one has the number 1 written on it, the second 2 etc. This will accurately count the post number irrespective of the page you are on, and tt helps orientation on long threads (and our threads are long).

The post number on my BB is also a hyperlink, so people can copy the direct URL to that specific post.

Installation is simple:

INSTALLATION INSTRUCTIONS FOR VERSIONS BEFORE 2.0.3
scroll down for installation in version 2.0.3 and later

Open showthread.php

Find


while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) {


and ABOVE it put:


$countposts = ($pagenumber-1)*$perpage;



Find


eval("\$postbits .= \"".gettemplate("postbit")."\";");


and ABOVE it put:


$countposts = $countposts+1;


save and upload.

Edit template postbit and place the variable $countposts where you want the post # to show.

For example, place <smallfont>Post #$countposts</smallfont> somewhere at the bottom or <a href="showthread.php?postid=$post[postid]#post$post[postid]"><smallfont>$countposts</smallfont></a> if you want the numebr to also be a hyperlink directly to that post.

-------------------------------------------------------------------------

INSTALLATION INSTRUCTION FOR VERSIONS 2.0.3 AND UP

ok, how 'postbit' is parsed has changed since 2.0.3 so here's what you need to do to install this:

Originally posted by freddie
If you want a one file hack for this than do this:

find in showthread.php:

while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) {

Put this before it:

$postcount = ($pagenumber - 1 ) * $perpage;

Find in showthread.php:

$postbits .= getpostbit($post);

Put this before it:

$post[postcount] = ++$postcount;

Then put $post[postcount] in your postbit template.

save and upload.

Edit template postbit AND postbit_ignore and place the variable $countposts where you want the post # to show.

For example, place <smallfont>Post #$post[postcount]</smallfont> somewhere at the bottom or <a href="showthread.php?postid=$post[postid]#post$post[postid]"><smallfont>$post[postcount]</smallfont></a> if you want the numebr to also be a hyperlink directly to that post.

---------------------------------------

You can see it on my BB, on any of the threads (near the date/time of the post, to the right of the small folder icon). Example: http://www.atlasf1.com/bb/showthread.php?s=&threadid=24656

Cheers,

Bira

TheDude
06 Jul 2001, 10:48
thanks
easy hack but the idea is quite interresting especially for very long threads
thanks again bira !!

ztsky
06 Jul 2001, 11:56
A useful hack,THANKS.:p

JJR512
06 Jul 2001, 21:48
Thank you, bira. A relatively simple, but incredibly useful hack. Sometimes it's the simple things in life that mean the most, ya know? ;)

Anyway, when I install hacks, I prefer to work from a text file saved locally. I think they're easier to work with, especially when copying things to put in the vB file. Also, if I have the hack instructions saved locally, I know I'll have it handy when I have to upgrade the board and reinstall all the hacks. That way, I don't have to go searching through this board to find everything that I can remember. :)

So I hope you don't mind, but I've taken the liberty of copying your instructions into a text file and attaching it to this message. This way people can download it and have it to work with permanently.

BluSmurf
06 Jul 2001, 22:54
great easy hack :D

JJR512
08 Jul 2001, 04:23
That's funny, I could have sworn I had attached that file as mentioned earlier...but here it is now.

dwh
08 Jul 2001, 04:42
Originally posted by JJR512
That's funny, I could have sworn I had attached that file as mentioned earlier...but here it is now.

you did attach it but it didn't work and had an activex error and it happened again. Is this activex safe code? Anyone know what's going on?

JJR512
08 Jul 2001, 05:04
I don't understand how it could have an activex error. It's a plain text file, and all it includes is the text of bira's first post in this thread, plus I added a line to the effect that bira wrote it, and I also put in the URL to this thread. There's nothing in the file itself that needs to work, unless you mean the hack itself, which doesn't include any activex stuff that I see. :confused:

Oh...and if I did indeed attach it the first time, as I remember and as you admit, but it's not there now, then someone must have removed it. Does anyone think it may have been a good or nice idea to let me know about something like that? (My board was founded mainly on the principle that if somebody screws up or does something wrong, whether intentional or not, he/she will be informed of the problem and the solution, publically if possible, so hopefully the mistake will not occur again in the future, by either the original person, or by anybody else. My board was founded on this principle to provide an alternative for disgruntled members of another high-volume message board where threads and posts mysteriously disappeared and nobody knew why, or members were banned without knowing why, etc.)

dwh
08 Jul 2001, 22:53
It turns out the activex is on all posts for me. Maybe I remember it wrong and you didn't post the attachment? Anyways, by clicking save as i don't get the activex problem.

MarkB
09 Jul 2001, 06:43
Originally posted by bira
...or <a href="showthread.php?postid=$post[postid]#post$post[postid]"><smallfont>$countposts</smallfont></a> if you want the numebr to also be a hyperlink directly to that post.


Shouldn't that be

<a href="showthread.php?threadid=$post[threadid]#post$post[postid]"><smallfont>$countposts</smallfont></a>


Otherwise it will try to link to a different post...? Forgive me if I'm wrong, I'm new at this :)

JJR512
01 Aug 2001, 02:08
I think this needs to be updated for 2.0.3...I couldn't find this code at all:
eval("\$postbits .= \"".gettemplate("postbit")."\";");
I looked in my older showthread.php and found where this code is, and searched for some of the lines in its vicinity in the new showthread.php, but couldn't find any of them, either.

Please update this!

dwh
01 Aug 2001, 06:38
It's more complicated now, I'll try to be brief.

In showthread.php
after

$counter=0;

but before

while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) {

add

$countposts = ($pagenumber-1)*$perpage;

about 8 lines down

BEFORE
$postbits .= getpostbit($post);

add

$countposts = $countposts+1;

Close showthread.php.

Open admin/functions.php

Find

function getpostbit($post) {
// sorts through all the stuff to return the postbit template

// user
global $bbuserinfo,$ignore;
// showthread //added $countposts
global $counter,$firstnew,$sigcache,$highlight,$postid,$forum;

Now add countposts variable to the end like so

function getpostbit($post) {
// sorts through all the stuff to return the postbit template

// user
global $bbuserinfo,$ignore;
// showthread //added $countposts
global $counter,$firstnew,$sigcache,$highlight,$postid,$forum,$countposts;

Done.

FWC
01 Aug 2001, 07:59
It's more complicated now, I'll try to be brief.

It is more complicated now. But, your suggestion worked. Thanks, dwh!

dxb
01 Aug 2001, 23:05
thanks dwh you just made it so simple :) and it worked great

Sarge
04 Aug 2001, 11:17
Thanks
IT works great!
Sarge

Chen
05 Aug 2001, 13:32
For some reason, the first post in the thread is labeled 0.
I'm using v2.0.3, so I did what dwh said, and the code for the template is from bira.
Help?

dwh
06 Aug 2001, 01:37
not sure. do you have a url to look at?

Chen
06 Aug 2001, 04:53
Ok I fixed it, just put
$countposts = (($pagenumber-1)*$perpage)+1;
instead of
$countposts = ($pagenumber-1)*$perpage;

Good hack! :D

SirSteve
05 Nov 2001, 21:39
This working for vb 2.2.0 ?

FWC
05 Nov 2001, 21:56
Originally posted by SirSteve
This working for vb 2.2.0 ? Yep, it works fine in 2.2.0. I love this hack. I wish it was built in to vB. It's nice to know where you are in a thread.

bira
25 Nov 2001, 12:38
ok, how postbit is parsed has changed since 2.0.3 so here's what you need to do to install this:

Originally posted by freddie
If you want a one file hack for this than do this:

find in showthread.php:

while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) {

Put this before it:

$postcount = ($pagenumber - 1 ) * $perpage;

Find in showthread.php:

$postbits .= getpostbit($post);

Put this before it:

$post[postcount] = ++$postcount;

Then put $post[postcount] in your postbit template.

Chen
28 Nov 2001, 18:35
Installed here. :)

(as requested by FWC :D)

bira
28 Nov 2001, 18:39
yay!!! Thank you!

FWC
28 Nov 2001, 21:08
Originally posted by FireFly
Installed here. :)

(as requested by FWC :D) Thanks,. Firefly!! :D

Prezident
29 Nov 2001, 02:06
For those of us the REALLY SUCK with html, it was very hard to figure out how and where to get the link to show up where I wanted it, but I finally got it.

Forcing myself to learn something sure can be painful during the process.

Thanks for the hack. Very useful.

Meta
29 Nov 2001, 10:36
Easy installed ... thanks for the hack!

xug
02 Dec 2001, 04:17
What would be the code to place (post #1) in the right corner on the same line as the $post[icon] and $post[title], just like this forum ??

Thank you.

xug
02 Dec 2001, 04:22
Oops I found it ! :)

After the line :

<td bgcolor="$post[backcolor]" width="100%" valign="top">

I inserted this :

<table border="0" width="100%">
<tr>
<td width="79%">
<smallfont>$post[icon] <b>$post[title]
</td>
<td width="21%">
<smallfont>
<p align="right"><a href="showthread.php?postid=$post[postid]#post$post[postid]">Post #$countposts</a></td>
</tr>
</table>

Cool huh for a starter :)

Mohamed
02 Dec 2001, 09:14
nice hack and Easy installed :D


thanks

Crinos
02 Dec 2001, 11:01
A slightly different approach...

In postbit, After this:

<td bgcolor="$post[backcolor]" width="100%" valign="top">

replace this:

<smallfont>$post[icon] <b>$post[title]</b></smallfont>

With this:

<table border="0" width="100%">
<tr>
<td width="85%">
<smallfont>$post[icon] <b>$post[title] </b></smallfont>
</td>
<td width="15%" align="right">
<smallfont>
<a href="showthread.php?postid=$post[postid]#post$post[postid]">Post #$countposts</a></smallfont></td>
</tr>
</table>

Basically the same as Xug's but I used the cell alignment instead of a paragraph alignment :)

Lesane
07 Dec 2001, 12:36
Great Hack, works good here. Thnx Bira

Freddie Bingham
10 Dec 2001, 04:48
If you want a one file hack for this than do this:

find in showthread.php:

while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) {

Put this before it:

$postcount = ($pagenumber - 1 ) * $perpage;

Find in showthread.php:

$postbits .= getpostbit($post);

Put this before it:

$post[postcount] = ++$postcount;

Then put $post[postcount] in your postbit template.

bira
10 Dec 2001, 04:53
Freddie, any chance you'll consider including this in v3? :D

Thanks for the shortcut

FWC
10 Dec 2001, 04:55
Will this be in vB 3, Freddie? I love this hack. :)

Freddie Bingham
10 Dec 2001, 05:47
I did right before I made my post ;) I don't know if it will be in the postbit template by default but the $post[postcount] variable is set.

FWC
10 Dec 2001, 05:49
Originally posted by freddie
I did right before I made my post ;) I don't know if it will be in the postbit template by default but the $post[postcount] variable is set. Cool! Thanks, Freddie. :)

Justice
10 Dec 2001, 05:58
just installed bira's hack and came in to say it works, and I see freddie's quicker method.

oh well, good job nonetheless

bira
10 Dec 2001, 06:14
Thanks Freddie!

Princeton
10 Dec 2001, 21:46
Great hack ... just installed it no problem.

Bedhead
11 Dec 2001, 05:00
Works like a charm.

Thanks for that buddy.

LuBi
18 Dec 2001, 18:17
Ok I run 2.2.1 and I did freddies method then did crinos's postbit edit and I don;t see anything new in my postbit... Any ideas?

Also how can I make it look similar to how it looks on here? Upper right and make it a link like on here? Thanks!

bira
18 Dec 2001, 21:35
LuBi, replace $countposts with $post[postcount]

LuBi
18 Dec 2001, 22:34
I tried.. and it showed but I can't get it in the upper right or as a link. Thanks though bira

bira
18 Dec 2001, 22:39
LuBi, that's a design issue :)

you need to put it in a <td align=right></td> :)

Sadie Frost
26 Dec 2001, 14:28
I have Tommy Boy's current post counter hack installed, and then I installed this one, and I have a sort of weird problem.

The post numbers come up fine...except they are the current post number not the number of that post.

So if this is the second post in a thread, and is my 34th out of 56 posts, it comes up "Post #34" instead of "Post #2".

I haven't been able to find where the conflict is, so I was wondering if anyone else had this same problem and fixed it?

Thanks!:)

bira
26 Dec 2001, 16:03
sadie what is the variable you use in the postbit template for each of these hacks? Can you paste it here?

Tommy Boy
26 Dec 2001, 17:43
Looks like we're using the same variable name (postcount), bira! :D

the_sisko
26 Dec 2001, 17:55
Great thing, installed it with no probs... thx !

FWC
26 Dec 2001, 19:00
Originally posted by Tommy Boy
Looks like we're using the same variable name (postcount), bira! :D I ran into the same situation as Sadie. I took Tommy's hack and made the database field upostcount and changed all the instances of postcount to upostcount in his code. Everything works great. :)

I modified Tommy's use of postcount because Freddie already added the postcount variable to vb 3.0. Since Bira's code is going to be built in to the official release, I chose to leave it alone.

Sadie Frost
26 Dec 2001, 19:02
This is my postbit template :)

Oh yeah - I see the postcount now - duh!

So can I just rename the variables?

bira
26 Dec 2001, 21:30
yeah, FWC has a point.

Tommy, since 'postcount' is going to be part of the vB code, I think you might want to edit your hack and change your variable to 'postnumber' or something as such.

Sadie -- read what FWC just posted and do the same :)

Dalius
04 Jan 2002, 05:30
Er, bira, i don't get what FWC meant

I have that same prob, is their better, easier directions for us people who dont know sql too well? ;)

Tommy Boy
04 Jan 2002, 13:41
Originally posted by FWC
I modified Tommy's use of postcount because Freddie already added the postcount variable to vb 3.0. Since Bira's code is going to be built in to the official release, I chose to leave it alone. I wonder how people know these things. As a hacker, this information is very valuable to me, and I wonder if there's a way for me to know these things as well.

FWC
04 Jan 2002, 18:11
Originally posted by Tommy Boy
I wonder how people know these things. As a hacker, this information is very valuable to me, and I wonder if there's a way for me to know these things as well. I found out the hard way. I've had Bira's hack installed since July. I changed it to the newer variable when I installed the contract post hacks. When I installed your static post counter hack (which I love), I noticed the user static count was matching the post count in the thread. I looked at the code and realized the variable was the same. So, I changed everything in your hack to upostcount and everything works great. :)

Freddie Bingham
07 Jan 2002, 06:00
What's in vB3 is what I wrote in this post : http://www.vbulletin.org/forum/showthread.php?postid=205914#post205914

philphee
18 Jan 2002, 19:30
Is there a way to fix the post numbers reflected if you have you vBulletin set to display threads in reverse order?

As is stands right now, all my post #'s are backwards. :confused:

Thanks for the help...

philphee
21 Jan 2002, 17:33
Maybe, could be, please???

Shenlong
21 Jan 2002, 18:33
great hack! THANX!

Tae
22 Jan 2002, 23:49
very useful hack but i'm with philphee on the reverse order issue. is there a way to get this to work for boards that are in reverse order?

i'm especially concerned for i was planning on installing the hack that allows my users the choice in the order of posts.

back to the original subject, i was seeking this hack cuz the reverse post order option makes it hard to link to the original post of a thread. anyone have ideas on this?

rishel
03 Feb 2002, 16:46
Ok, great googly moogly. I saw so many posts in here, that I find myself a little bit confused.

How, if I may inquire, do add this hack in version 2.2.2

We know how to move around vB with no problem, I just need the final verdict of what is added where.

Thank you very much, for any responses.

Lucky
05 Feb 2002, 05:48
Works great on 2.2.2 and 3.0pr7

Thanks. :china:

Airwaves
11 Feb 2002, 11:51
can this thread be updated with a whole new post 1 with the correct instructions with no bugs for 2.2.x because no-one really uses 2.0.x any more and there are fixes all over this thread and its really confusing?

Thanks

Tim Wheatley
25 Mar 2002, 07:23
Airwaves, there's a box beneath '2.x.x instructions' which has the instructions in it you're after.

However, I've found this hack to be the one which has been causing my board problems, so I'm uninstalling it.

My readouts in the admin cp went from a steady 0.8-1.2 at 'rush hour' (6pm-8pm) over the last three days pre-install, to 2.5-4.1 last night when I installed this hack. This is very bad for my board and shuts off the mainpage (get timeouts). So it's uninstalled. :(

Gutspiller
28 Mar 2002, 06:13
After I installed this hack, after people post their messages and it is suppose to take them back the post they posted? Well after installing this hack, it doesn't do that any more. Has anybody else had this problem? I am running 2.0.3

Thanks for any help or tips you can help me with.

69-FLy-gUy
28 Mar 2002, 10:40
I can't get this to install. it just says post # and doesn't have a number....

Crazy Mofo
11 Apr 2002, 19:02
What version is this forum here using?

Thomas P
12 Apr 2002, 21:49
Thanks, great hack!
-Tom

Crazy Mofo
17 Apr 2002, 01:32
how come i have the max posts per page 15 and when i goes too a another page the (post #) goes back too 1 :( helllp

Crazy Mofo
17 Apr 2002, 03:20
:(

Crazy Mofo
20 Apr 2002, 00:43
any ideas any1?

freeshares1
22 Apr 2002, 01:57
Originally posted by 69-FLy-gUy
I can't get this to install. it just says post # and doesn't have a number....

I had this problem until i changed it to

<a href="showthread.php?postid=$post[postid]#post$post[postid]"><smallfont>Post No</smallfont><smallfont>$post[postcount]</smallfont></a>

i have installed mine where the profiles and pm buttons are.

www.gamblingforums.net

Hope that helps a little

Phil

Orlandu
27 Apr 2002, 18:51
I can't get this to work with 2.2.5 Got any ideas? I see it's running here...

EDIT:
I got it working, nevermind.

Ordovicium
29 Apr 2002, 11:53
I have some Problems with the position of the hack, in the postbit templat. I would like make it the same as here on vbulletin.org, but the problem is, when I add it after $post[title], it disapear only in the right corner, when there is no title. If there is a title, it is in next line. -> not parallel.
I hope you have some ideas.

<td bgcolor="$post[backcolor]" width="100%" valign="top">
<smallfont>$post[icon] <b>$post[title]</b></smallfont>

<!-- POSTCOUNTER-->
<a href="showthread.php?postid=$post[postid]#post$post[postid]">
<div align="right"><smallfont>(post#: $post[postcount])</smallfont></div><a>
<!-- /POSTCOUNTER-->

:confused: :confused: :confused:


Thanks Ordo

Crazy Mofo
30 Apr 2002, 05:26
look what mine has done u can see it on page like 8 and number 1 shows up at the top of every page and starts again !! some1 plz help me :confused:

Boofo
01 May 2002, 00:40
Can you let us in on the code to position it in the spot you have it (like it is here on this site)?

Ordovicium
01 May 2002, 01:26
Can somebody help me? :(
I posted my problem 2 postings before.

RDX1
02 May 2002, 02:59
Originally posted by Ordovicium
Can somebody help me? :(
I posted my problem 2 postings before.

on page 1 or 2 they said do this


<table border="0" width="100%">
<tr>
<td width="79%">
<smallfont>$post[icon] <b>$post[title]
</td>
<td width="21%">
<div align="right"><smallfont>[<a href="showthread.php?postid=$post[postid]#post$post[postid]">post

#$post[postcount]</a>]</smallfont></div></td>
</tr>
</table>

Boofo
02 May 2002, 07:34
Ok, that works great except now when you click on the Post #1, it contracts all of the messages back into a list (I'm using Expand All, Contract All also) instead of going to the beginning of the message like it does here.

Also, where in postbit_ignore do I place it and what is postnit_ignore actually for?

Ordovicium
02 May 2002, 18:25
@NerdNations: Thanks a lot. I didn't saw. I was searching after a Code/Php-Box in this thread.

Boofo
06 May 2002, 06:23
I just re-installed vb and the post counter works great except that I am still having problems that if the messages are contracted (I am also using the great Expand and Contract Hack), when I click on the post counter link, it does not open up the message like it does here. Does anyone here have any idea what might be causing this? I have been through the code at least 10 times and everything is where it should be and LIKE it should be. Please fellas (and females, too), can someone lend a hand on this one? This one really has me stumped.

N9ne
13 May 2002, 21:10
Can someone please please please please! post step by step instructions for this hack to make it appear JUST like THIS board ON 2.2.5!

I'm a complete newbie so don't expect me to know anything, I tried a lot of fixes in this topic but I still don't get a number come up, but just Post # as a link to some phoney number like 32 and 28...

So I am asking this please please do this for me and many others who don't know much about hacking.

N9ne
14 May 2002, 19:12
bump, Please

Boofo
17 May 2002, 18:09
What is postbit_ignore and what does it do? I asked this question a while ago and I just got postbit_ignored on it. Is that what it is for? :)

N9ne
21 May 2002, 21:40
bump for all the unanwered questions here :(

Knux
22 May 2002, 23:30
Yeah I have the same prob I only get Post # and no number... my site is http://www.pbfreak.net/forums

S0uL
23 May 2002, 12:17
Originally posted by Crazy Mofo
how come i have the max posts per page 15 and when i goes too a another page the (post #) goes back too 1 :( helllp

im having the same probs

Knux
23 May 2002, 20:12
ugh someone PLZ PLZ PLZ help!

Boofo
23 May 2002, 20:15
Forget it, Knux, apparently there are too few of us having problems with this hack for them to bother supporting it anymore. We're not in the right "click" it seems. :)

Knux
23 May 2002, 21:23
that sucks cause now I have (post #) at the top of every post and I really wanted this hack too :(

N9ne
24 May 2002, 17:51
I'll request an updated version of the hack in the request forum...shall I :confused:

Boofo
24 May 2002, 23:27
Good luck! They won't support it any better there, I'm afraid. Don't worry, though, I have someone checking it over to see if we can fix it ourselves. As soon as we find something, we'll post it in here. :)

N9ne
26 May 2002, 16:16
Thanks :)!

Mone'
28 May 2002, 17:11
working great on vb 2.2.6

with freddy's code and bira's template =)

thank you guys !

Mone'

ixian
03 Jun 2002, 14:38
Originally posted by Boofo
Forget it, Knux, apparently there are too few of us having problems with this hack for them to bother supporting it anymore. We're not in the right "click" it seems. :)

First, it's Clique, not "click".

Second, if all of you complaining had actually read through this thread, instead of complaining, you would have figured it out. I'll even use this very hack to help you on your way.

Post 21 (http://www.vbulletin.org/forum/showthread.php?postid=202681#post202681) has the easy code for showthread.php that works with 2.2.x on up.

Post 33 (http://www.vbulletin.org/forum/showthread.php?postid=204287#post204287) has a very nice template change (Postbit) that makes the link to posts appear just like it does on these forums.

Finally, post 47 (http://www.vbulletin.org/forum/showthread.php?postid=243286#post243286) has a minor update to the link, in case you get "Post #" but no actual number to show up.

I installed this on 2.2.6. A heavily hacked 2.2.6 at that. It works fine. Posts count across threads like they should and I have noticed zero change in server load. There's no need to "update" this to 2.2.6 because if you read this thread it already is. They've even put Freddies easy update for 2.03 and above (and yes, that means all the way to 2.2.6) in the first post.

It took me 5 minutes of skimming through this thread to discover the above and maybe another 2 minutes to install the working hack. Please keep this in mind next time before you complain about lack of support.

Boofo
03 Jun 2002, 15:05
Thanks for the spelling lesson. However it is spelled, I got my point across. As far as complaining goes, the only complaint I have is that getting help for some hacks is dependent on who you are, it seems. I have an Admin CP hack I am working on myself, but I also remember what it was like in the beginning with installing some of these hacks. It was overwhelming, to say the least. As you do more of them and tinker with things, you start to pick up a few things here and there along the way.

All I was trying to say was that we ALL need to remember that we were once in the same spot as alot of the newbies here. We didn't know as much about it then as we know now. I still have alot to learn, but I'm learning more and more with every hack install. Everyone needs to be a little more patient and understanding. Nobody knows it all and anyone who says he or she does, is a liar. If you don't want to help the new people with the "stupid" questions (as I have heard them called), then don't release your hack to the public. I thought we were all here to learn and have some fun along the way, and I STILL believe that is the case here. People like Firefly and Lesane (and some others, too) make installing hacks alot easier to understand and learn something from. We need more people like them here, that is all I was trying to say. :)

Originally posted by ixian


First, it's Clique, not "click".

Second, if all of you complaining had actually read through this thread, instead of complaining, you would have figured it out. I'll even use this very hack to help you on your way.

Post 21 (http://www.vbulletin.org/forum/showthread.php?postid=202681#post202681) has the easy code for showthread.php that works with 2.2.x on up.

Post 33 (http://www.vbulletin.org/forum/showthread.php?postid=204287#post204287) has a very nice template change (Postbit) that makes the link to posts appear just like it does on these forums.

Finally, post 47 (http://www.vbulletin.org/forum/showthread.php?postid=243286#post243286) has a minor update to the link, in case you get "Post #" but no actual number to show up.

I installed this on 2.2.6. A heavily hacked 2.2.6 at that. It works fine. Posts count across threads like they should and I have noticed zero change in server load. There's no need to "update" this to 2.2.6 because if you read this thread it already is. They've even put Freddies easy update for 2.03 and above (and yes, that means all the way to 2.2.6) in the first post.

It took me 5 minutes of skimming through this thread to discover the above and maybe another 2 minutes to install the working hack. Please keep this in mind next time before you complain about lack of support.

ixian
03 Jun 2002, 16:08
Didn't say they were "stupid" questions. And as for helping newbies, I agree - and I think that's exactly what I did, by providing links to the relevent posts. I mean, I could have just said "read the thread!" and left it at that, right?

There are tons of hacks here. Sometimes authors may not be able to keep up with them after months - I mean, this hack was released what, 8 months ago? Newbies need to learn just like we did that a lot of the time the answer may be right in front of them:)

Boofo
03 Jun 2002, 16:28
I wasn't referring to you saying anything. I was referring to what I have heard here before. And, yes, you did help by supplying the links, and I'm sure the new people thank you for that. But making users who are new at this feel bad by "scolding them", doesn't make them feel any better about not knowing. :)

As far as authors not supporting their hacks, I don't agree with you on that. There are a few authors here who STILL support their hacks no matter how long it's been. There are very few authors here who have done that many hacks that they can't find the time to support them. Some people just get the attitude that "if it works for me, then that's all I care about".

I do agree with you, however, that the new people DO need to learn to read the threads a little more carefully. I find myself at times not wanting to go through 20 pages of messages looking for an answer, too, so I have been bad at that myself. :) I'm trying to do better on that and read more.

If we know an answer, or like you did here, can point it out, then maybe the new people will catch on faster and have the opportuninty that alot of users didn't and get the help they need so they can go on to help others along the way. Like a chain reaction sort of thing. For every one person you help, they can help 10. And so on and so on.

I'll help anyone I can. And I have tried to, but there are alot of things I don't know enough about yet to be of too much help to alot of people. All I can do is try and hope I help someone somewhere along the way. :) We should all do more of that, don't you agree? :)

Originally posted by ixian
Didn't say they were "stupid" questions. And as for helping newbies, I agree - and I think that's exactly what I did, by providing links to the relevent posts. I mean, I could have just said "read the thread!" and left it at that, right?

There are tons of hacks here. Sometimes authors may not be able to keep up with them after months - I mean, this hack was released what, 8 months ago? Newbies need to learn just like we did that a lot of the time the answer may be right in front of them:)

Knux
07 Jun 2002, 17:18
Ironic??? I read the whole post and I still get Post # here is a link to prove it....

http://www.pbfreak.net/forums/showthread.php?postid=6967#post6967

Boofo
07 Jun 2002, 17:52
Somewhere in this thread there are some posts about the postcount variable clashing with a variable from another hack. Since I never had the same problem you are having, I didn't pay much attention to it, sorry. :)

Let's start here...what version of vbulletin are you running? If you are running version 2.03 and up here is what you need to do. (If you've already done this, try it again and if it still doesn't work, let me know and we WILL get it working for you somehow. :))

INSTALLATION INSTRUCTION FOR VERSIONS 2.0.3 AND UP

ok, how 'postbit' is parsed has changed since 2.0.3 so here's what you need to do to install this:

Originally posted by freddie
If you want a one file hack for this then do this:

find in showthread.php:

while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) {

Put this before it:

$postcount = ($pagenumber - 1 ) * $perpage;

Find in showthread.php:

$postbits .= getpostbit($post);

Put this before it:

$post[postcount] = ++$postcount;

Then put $post[postcount] in your postbit template.

save and upload.

Edit template postbit AND postbit_ignore and place the variable $post[postcount] where you want the post # to show.


Originally posted by Knux
Ironic??? I read the whole post and I still get Post # here is a link to prove it....

http://www.pbfreak.net/forums/showthread.php?postid=6967#post6967

Knux
08 Jun 2002, 14:56
I am running 2.2.5 and thx for the help :D and I have had that stuff there that is what I origonally put it... Oh and another thing I can't find:

$postbits .= getpostbit($post);

But I can find:

$postbits = getpostbit($post);

Boofo
08 Jun 2002, 16:31
It's in there. Do this...look for $postbits and it should be about the third time you find that one.

Originally posted by Knux
I am running 2.2.5 and thx for the help :D and I have had that stuff there that is what I origonally put it... Oh and another thing I can't find:

$postbits .= getpostbit($post);

But I can find:

$postbits = getpostbit($post);

firewars
08 Jun 2002, 17:23
Can someone tell me what the postbit_ignore-template actually is?
I was able to place the variable next to the "edit"-button in the postbit-template but where to put it in the postbit_ignore-template?

Thanks in advance.

Boofo
08 Jun 2002, 17:36
The postbit_ignore template is what is used when you have users on the ignore list. As far as where to put it in the postbit_ignore template, I asked that same question in here quite a while ago and have never received an answer. :)

Originally posted by firewars
Can someone tell me what the postbit_ignore-template actually is?
I was able to place the variable next to the "edit"-button in the postbit-template but where to put it in the postbit_ignore-template?

Thanks in advance.

firewars
08 Jun 2002, 17:46
I now put it in there like this (I hope you don't mind the translation):

<normalfont>Dieser Benutzer ist auf Deiner <b>Ignorier-Liste</b>. Um diesen Beitrag (<a href="showthread.php?postid=$post[postid]#post$post[postid]"><smallfont>Posting Nr. $post[postcount]</smallfont></a>) zu sehen,...

Boofo
08 Jun 2002, 18:01
Sounds like it is right, but I don't know for sure. Does it work?

Originally posted by firewars
I now put it in there like this (I hope you don't mind the translation):

<normalfont>Dieser Benutzer ist auf Deiner <b>Ignorier-Liste</b>. Um diesen Beitrag (<a href="showthread.php?postid=$post[postid]#post$post[postid]"><smallfont>Posting Nr. $post[postcount]</smallfont></a>) zu sehen,...

firewars
08 Jun 2002, 18:14
Looks like it does :)

Boofo
08 Jun 2002, 18:48
Looks like you have it mastered! I'll be coming to you for help from now on. :)

firewars
08 Jun 2002, 18:54
No problem :)

HappyPike
08 Jun 2002, 22:02
I put the post number thing in front of the Report Post to Moderator link to save space. Putting it at the top of the post creates a gap.

Just put this code in the postbit before that report post link. :)

<a href="showthread.php?postid=$post[postid]#post$post[postid]">Post #$post[postcount</a>

Knux
09 Jun 2002, 15:26
Thx alot I fixed it the thrid one down was actually:

$postbits .= iif(empty($postbits), '', '<br>').getpostbit($post);

I think I changed it bcuz of a hack but thx alot anyways!

inetd
15 Jun 2002, 17:01
At me on each new page of number of posts begin with 1

Paul
17 Jun 2002, 10:41
A slight problem I'm noticing with freddie's code (http://www.vbulletin.org/forum/showthread.php?postid=205914#post205914) which doesn't appear on this site:

When viewing an ignored user's message, a small window pops up with "View single message" at the top. This window *seems* to be using the postbit template and not have a template of it's own, however, $post[postcount] returns nothing in this window.

On vb.org, it shows "post #1". Preferably it would be more accurate to show the actual link number in this window (i.e. if this is the 20th post in the thread, to show "post #20" in the view single message window.

Any ideas on how to account for this situation?

Paul

Edit: Steps to reproduce problem:

1. Place a user on your ignore list.
2. View a thread where they've posted.
3. Click on the <click here to view this post> link.
4. Stare mindlessly at weird post # value ;D

X-Fan
17 Jun 2002, 11:25
G'day gang,

I've taken the liberty of compiling a new text file of instructions for this hack for recent versions of vBulletin, taking into account the change of variable name from postcount to postnumber, as well as the placing of the post number as it is here at vBulletin.org (top right of posts).

This works perfectly on my forums (on which I use the postbit_first hack for a couple of forums). All posts are numbered from #1 down, and continue on across multiple pages (it doesn't reset to #1 at the top of another page in a thread).

Thanks to bira for a great and useful hack! Here's hoping this comes standard with vB3.

Paul
17 Jun 2002, 11:42
X-fan: I'm not understanding why you changed $post[postcount] to $post[postnumber], other than you just prefered that naming convention.

This does not fix the problem I described above however. showpost, the template that displays ignored posts when they are viewed, uses the postbits template to create the message. This breaks things when it comes to post numbering.

I've tried simply copying in the contents of postbits into showpost, however it appears that all $post[...] variables don't work when you do that. I haven't really looked into why, but it probably involves editing showthread.php. Any pointers here would be appreciated. There are a number of things I'd like to change in the single view post and this would help a lot.

Paul

freakyshiat
05 Jul 2002, 17:10
how is it possible to put the latest 'postid' and 'threadid' on the index page?

FleaBag
08 Jul 2002, 15:45
Using X-Fan's instructions and Knux' info on the changed line [which I also have] I got this working on 2.2.6 on my first attempt [I read the whole thread before starting]. Thanks everyone who contributed, especially Bira!

hanhgiac
10 Jul 2002, 07:42
Hi all !

There is a bug here.

Try this :

+ Ignore one member in this page.

+ Come back this page, and look at her/his post

+ You will see one report about "ignore list". Try click at "here" word on his/her post.

+ You will see one new pop-up window with alone his/her post.

However, look at the corner right and top, you'll see "(post #1)", although it must be #106 - #117.

Who can fix this bug ... for vbulletin.org ? :))

J/k man !

Heineken77
20 Jul 2002, 19:07
For some reason I can't get this to work properly in 2.2.6

Guess I have to miss out on this great hack :(

CeleronXL
21 Jul 2002, 16:16
Oh, so it doesn't work in 2.2.6? Well.... It has to, FireFly's using it here.... Or it is a different code? FireFly?

The Ghost
21 Jul 2002, 17:34
Originally posted by CeleronXL
Oh, so it doesn't work in 2.2.6? Well.... It has to, FireFly's using it here.... Or it is a different code? FireFly?

Hi,

I use this Hack on my Version 2.2.6, work's great!

CeleronXL
21 Jul 2002, 18:13
Cool, and it's the same code that was posted in the first post?

The Ghost
21 Jul 2002, 18:21
Originally posted by CeleronXL
Cool, and it's the same code that was posted in the first post?

hi,

I uses only the Code from this Thread.

I don't have made changes because I'm not a coder.......

CeleronXL
22 Jul 2002, 23:47
Cool, just installed. I changed the replacement though.

Boofo
23 Jul 2002, 00:02
How did you change that and what did you change it to?

Originally posted by CeleronXL
Cool, just installed. I changed the replacement though.

Raptor
31 Jul 2002, 15:42
this worked for me on vb 2.2.6

Open showthread.php

Find

$postdone = array();

and ABOVE it put:

// Hack post count and link

$postcount = ($pagenumber - 1 ) * $perpage;

// Hack post count and link end


Find

$postbits .= getpostbit($post);

and ABOVE it put:

// Hack post count and link

$post[postcount] = ++$postcount;

// Hack post count and link end

Save and upload.

Edit template postbit and place the following text where you want the post # to show.

(<a href="showthread.php?postid=$post[postid]#post$post[postid]">Post #$post[postcount]</a>)

its probably been posted before but it may help someone

Boofo
31 Jul 2002, 15:45
What does this do? :)

Originally posted by Raptor
this worked for me on vb 2.2.6

Open showthread.php

Find

$postdone = array();

and ABOVE it put:

// Hack post count and link

$postcount = ($pagenumber - 1 ) * $perpage;

// Hack post count and link end


Find

$postbits .= getpostbit($post);

and ABOVE it put:

// Hack post count and link

$post[postcount] = ++$postcount;

// Hack post count and link end

Save and upload.

Edit template postbit and place the following text where you want the post # to show.

(<a href="showthread.php?postid=$post[postid]#post$post[postid]">Post #$post[postcount]</a>)

its probably been posted before but it may help someone

Reflex
31 Jul 2002, 16:07
Cool little hack - thanks a lot :)

2 X Viverridae
14 Aug 2002, 15:27
Great hack, thanks!

Ryangel
26 Aug 2002, 11:05
How do i reverse the count? :)
Like from Max_num_on_thread to 1 .

FleaBag
03 Sep 2002, 16:27
I can't for the life of me get this working with 2.2.7. Can anyone please help?

FleaBag
04 Sep 2002, 13:06
*Bump*

Gohan
11 Sep 2002, 02:06
Originally posted by GamerForums
I can't for the life of me get this working with 2.2.7. Can anyone please help?

Does working on 2.2.7

Just fellow below code:

Originally posted by Raptor
this worked for me on vb 2.2.6

Open showthread.php

Find

$postdone = array();

and ABOVE it put:

// Hack post count and link

$postcount = ($pagenumber - 1 ) * $perpage;

// Hack post count and link end


Find

$postbits .= getpostbit($post);

and ABOVE it put:

// Hack post count and link

$post[postcount] = ++$postcount;

// Hack post count and link end

Save and upload.

Edit template postbit and place the following text where you want the post # to show.

(<a href="showthread.php?postid=$post[postid]#post$post[postid]">Post #$post[postcount]</a>)

its probably been posted before but it may help someone

FleaBag
11 Sep 2002, 11:51
The hyperlinks work, but it doesn't show the post number.

Gohan
11 Sep 2002, 12:04
weird.. i have no problem of post number

FleaBag
11 Sep 2002, 12:41
Woohoo got it working... Used X-Fan's instructions and Knux's little pointer on already hacked showthread files. Working on 2.2.7. :)

Gohan
11 Sep 2002, 12:55
Congrats :)

Learner29
12 Sep 2002, 07:43
THIS IS ONE OF THE VERY VERY BEST HACKS EVER !!!!!

I give 5/5 to this hack.... it is amasing !!!!!

it is a solution to so many problems we had before....

I really thank you thank you thank you

PHiXTiT
12 Sep 2002, 19:41
I have installed this hack on a 2.2.7 board.

It all works as stated!

5 Stars :)

poolking
13 Sep 2002, 16:40
So how do I get the post count in the top right hand corner? Like in this thread.

I manage to get it next to the title but thats it.

ZiRu$
13 Sep 2002, 22:09
I'm using 2.2.6 and i cant get this hack to work perfectly...it counts and displays the posts but the link dosent work right...it always goes to the TOP of the page

NTLDR
13 Sep 2002, 22:34
Posibly a template issue. If you hav ethe #postXX (where XX is the id) in the URL then the hack is working fine, you would have removed code in the default templates this points to.

Gohan
14 Sep 2002, 01:03
Originally posted by ZiRu$
I'm using 2.2.6 and i cant get this hack to work perfectly...it counts and displays the posts but the link dosent work right...it always goes to the TOP of the page

my forum is 2.2.7 and fine working.
tell what about your problem.. maybe i can helped.

ZiRu$
14 Sep 2002, 01:21
Originally posted by Gohan


my forum is 2.2.7 and fine working.
tell what about your problem.. maybe i can helped.

well when i press copy link location i get

http://www.xx.com/showthread.php?postid=98027#post98027

and in my template postbit my coding is:


[<a href="showthread.php?postid=$post[postid]#post$post[postid]">Post #$countposts</a>]


when someone goes to the link it goes to the TOP of the page and not the targeted post

Gohan
14 Sep 2002, 01:36
Did you follow code?

http://www.vbulletin.org/forum/showthread.php?postid=297721#post297721

ZiRu$
14 Sep 2002, 01:58
yah i did and it STILL DONT WORK....in fact using those instructions TAKES away the #

Gohan
14 Sep 2002, 02:24
Originally posted by ZiRu$
yah i did and it STILL DONT WORK....in fact using those instructions TAKES away the #
Hmm.. send your showthread.php to me via PM (if possible) than i'll try fixed it for you, ok? (i could test on my test server)

NTLDR
14 Sep 2002, 19:33
I'm pretty sure this is a template problem and nothing to do with this hack, you should allways go to the correct post using the URL you posted even if you haven't installed this hack.

Do you get returned to the correct post after you reply to a thread?

ZiRu$
14 Sep 2002, 19:40
yes i do

Buddha
19 Sep 2002, 16:01
worked like a charm on this end.
good work.

Reverend
20 Sep 2002, 20:58
Originally posted by Raptor
Open showthread.php
Find
$postdone = array();

and ABOVE it put:

// Hack post count and link

$postcount = ($pagenumber - 1 ) * $perpage;

// Hack post count and link end

Find

$postbits .= getpostbit($post);

and ABOVE it put:

// Hack post count and link

$post[postcount] = ++$postcount;

// Hack post count and link end

Save and upload.

Edit template postbit and place the following text where you want the post # to show.
(<a href="showthread.php?postid=$post[postid]#post$post[postid]">Post #$post[postcount]</a>)


Works for me on 2.2.7 .Thanks :)

cessna140
01 Oct 2002, 00:24
How can I get it to do this?

Post# xx of xxx

Thanks!

PHiXTiT
01 Oct 2002, 07:27
Originally posted by cessna140
How can I get it to do this?

Post# xx of xxx

Thanks!

Good idea!

Bison
05 Oct 2002, 07:34
Everything works fine (The link) , but the post number doesn't show up!
:(

GoTTi
09 Oct 2002, 23:34
when i installed this thing, i got Post # and thats it, no number after it.

Link works for it, but no number is showing.

BTW i am using vB226

Bison
10 Oct 2002, 00:33
If you installed the stars hack, don't look for this:

$postbits .= getpostbit($post);

Find the other one inside the stars hack code and place the code over that one instead. The numbers will show up this time!

bejita
10 Oct 2002, 09:50
work well on 2.2.8

GoTTi
11 Oct 2002, 06:42
Rolodex what do u mean? Sorry I am tired and I am not registering what u r saying i guess.

Littlebit
27 Oct 2002, 19:52
I just installed this, thanks bira and everyone else who added the helpful changes throughout this thread! :glasses:
I'm also interested in having these things mentioned:[list=1]
posts #s accurate with Order of posts within a thread set to newest first as well
show post #xx of xxx posts
[/list=1]
Are they in the works?

Da_Gotti,
Did you double check your link? mine shows fine in 2.2.8 using this for the link:
<a href="showthread.php?postid=$post[postid]#post$post[postid]">Post #$post[postcount]</a>

FleaBag
29 Oct 2002, 00:40
Working great with vBulletin 2.2.8. :)

Littlebit
30 Oct 2002, 19:59
Is it an impossible thing to make it so if you have your forums threads post order set to 'newest first' in your adminCP, the post count for the newest post will be post# 99 (for example) or whatever it is instead of 1? post# 1 still being the original first post...
What would be the best way to go about trying this?

Dynamic One
23 Nov 2002, 17:12
Thanks for this hack m8.

Austone
28 Nov 2002, 02:22
Originally posted by Littlebit
Is it an impossible thing to make it so if you have your forums threads post order set to 'newest first' in your adminCP, the post count for the newest post will be post# 99 (for example) or whatever it is instead of 1? post# 1 still being the original first post...
What would be the best way to go about trying this?

I did this... because I have it where each user can select the post order... (that is where $bbuserinfo[postorder]==0 comes from.. I don't know what the variable would be for the whole BBS.. but the structure would be similar)

if($bbuserinfo[postorder]==0) {
$post[postcount] = ++$postcount;
} else {
$postrev = $totalposts - $postcount;
++$postcount;
$post[postcount] = $postrev;

}

$post[totalposts] = $totalposts;


..also I added the $post[totalposts] = $totalposts; line so that I can show Post # x of y

..just change the postbit template to have...
<smallfont>Post #$post[postcount] of $post[totalposts]</smallfont>
..wherever you want it.

Hope that helps,
Kyle

Littlebit
28 Nov 2002, 15:44
Kyle, thank you :bunny:

agfisdn
22 Dec 2002, 05:01
Rating: 5/5 !

Great Hack :pirate:

Installed nice and easy on 2.2.9

Used (Posts in this Thread):
1) Instructions Post (2.0.3 and UP :)) (http://www.vbulletin.org/forum/showthread.php?postid=135598#post135598)
2) Crinos' postbit Edit (http://www.vbulletin.org/forum/showthread.php?postid=204287#post204287)
3) postbit_ignore Edit Attached... (Same way as Crino's Edit)

Thanx bira !

Ps: What I cannot find is why the Post # does not show when you click on the ingored Post (java script popup window that shows on demand an ignored user's Post). I get the Post# Link but there is no $post[postcount]... no biggy :))

Dan_UPC
05 Jan 2003, 07:54
great hack.

*installs*

BfB
05 Jan 2003, 18:44
NO SUPPORT GIVEN/OFFERED
(you won't need it anyway, as it's super easy, heh)

Alright everyone, I took the liberty of putting this altogether again, using bira's original idea, xug and crinos' link code, freddie's simple code, and Austone's "post of total posts" code/link code. Everything works great on v2.2.9 so I assume this will work perfectly for previous versions of 2.0.3 and up.

This version of the hack will display "Post #x of x" (post of total posts), as well as the link to that post.

Working example can be found at http://www.lightningforums.com running vBulletin v2.2.9

Taken from:

http://www.vbulletin.org/forum/showthread.php?s=&threadid=22083

Credit to bira, xug, crinos, freddie, and Austone, from which the following hack was prepared.

Sincerely,

James

sabret00the
22 Jan 2003, 15:40
Originally posted by freddie

$postbits .= getpostbit($post);

Put this before it:

$post[postcount] = ++$postcount;

Then put $post[postcount] in your postbit template. i know it says no support given but i'm baffled, i can't find that in my showthread.php i can find it without the dot but even then the hack don't work

running 2.2.9

i installed it on a 2.2.6 and it worked tho :-S

BfB
22 Jan 2003, 16:18
Use my text file above your post and that should help you install it correctly.

Littlebit
23 Jan 2003, 05:23
BfB,
hey, thanks for doing that for us! :)

subu1
25 Jan 2003, 09:05
Originally posted by dwh
It's more complicated now, I'll try to be brief.


BEFORE
$postbits .= getpostbit($post);




moin, sorry but i don't find this, what can i do. *snief*

greetz subu1

BfB
25 Jan 2003, 10:56
Originally posted by subu1
moin, sorry but i don't find this, what can i do. *snief*

I just opened a fresh "unaltered" showthread.php from v2.2.9 and found what you're looking for on Line 440.

Are you sure you're searching for:

$postbits .= getpostbit($post);
(it's normally best to copy/paste to minimize typing error on your part)

If you just do a search on just $postbits you'll fine it in 3 places. Look for which one has the "." in it, which will be the 3rd $postbits from the top of the .php file.

Use the text file I put together to help you do this hack with ease, found within this post (just several up):

http://www.vbulletin.org/forum/showthread.php?postid=338883#post338883

I hope this helps!

Sincerely,

James

Littlebit
25 Jan 2003, 15:05
yeh, you probably have the arcade hack or something installed ...which slightly changes that line...

subu1
25 Jan 2003, 19:15
ok thanks friends it`s running now, but now i have the same Problem of post# (no Number) ;) , but i can livinh with this.

ups my english

greetz subu1

monstergamer
07 Apr 2003, 04:18
works fine on 2.3.0

clicks install

subu1
07 Apr 2003, 08:08
01-25-03 at 11:56 AM BfB said this in Post #171 (http://www.vbulletin.org/forum/showthread.php?postid=346080#post346080)
I just opened a fresh "unaltered" showthread.php from v2.2.9 and found what you're looking for on Line 440.

Are you sure you're searching for:

$postbits .= getpostbit($post);
(it's normally best to copy/paste to minimize typing error on your part)

If you just do a search on just $postbits you'll fine it in 3 places. Look for which one has the "." in it, which will be the 3rd $postbits from the top of the .php file.

Use the text file I put together to help you do this hack with ease, found within this post (just several up):

http://www.vbulletin.org/forum/showthread.php?postid=338883#post338883

I hope this helps!

Sincerely,

James


thx for your help, but in my Showthread i have a lot of Hacks :dead:
in moment i find this

$countposts = $countposts+1;
$postbits = getpostbit($post,$vpa_champs_a);

thxx subu1

Mr. X
10 Apr 2003, 08:45
Just installed it (2.3.0) and it works great. I customized the postbit function though a bit, since I already have space where the default code goes, so I just replaced the Report|IP Logged links with the Post number one, and put the report/ip elsewhere.

Oh and thanks BfB!

Entourage
10 Apr 2003, 10:23
whoei, nice, installed in 5sec's. It works great with vb 2.3.0. Tnx for the hack!

212rikanmofo
21 Apr 2003, 22:12
how can i get this hack to work in my quote box template just like on here, when you quote someone it says originally quoted by username and shows the postid#... help plz...

Xyphen
23 Apr 2003, 23:12
Works great on vb2.3.0, thnx!!

WEForums
23 Apr 2003, 23:35
BfB's worked perfectly with 2.3.0. Nice work. Small but neat.

Rids
27 Apr 2003, 15:39
Works well with 2.3.0 - very nice :)

leagleaze
01 May 2003, 06:28
First hack I ever installed, it is great. Thank you :)

ZiRu$
03 May 2003, 05:45
01-05-03 at 07:44 PM BfB said this in Post #166 (http://www.vbulletin.org/forum/showthread.php?postid=338883#post338883)
NO SUPPORT GIVEN/OFFERED
(you won't need it anyway, as it's super easy, heh)

Alright everyone, I took the liberty of putting this altogether again, using bira's original idea, xug and crinos' link code, freddie's simple code, and Austone's "post of total posts" code/link code. Everything works great on v2.2.9 so I assume this will work perfectly for previous versions of 2.0.3 and up.

This version of the hack will display "Post #x of x" (post of total posts), as well as the link to that post.

Working example can be found at http://www.lightningforums.com running vBulletin v2.2.9

Taken from:

http://www.vbulletin.org/forum/showthread.php?s=&threadid=22083

Credit to bira, xug, crinos, freddie, and Austone, from which the following hack was prepared.

Sincerely,

James


Good lookin man.....I updated mine

M.C.
11 May 2003, 00:02
original hack "Post Counter & Direct Link" doesn`t work on my 2.3.0 :(

shows only (post#) :(

How to repair?

Thanx

ap0c
18 May 2003, 03:04
works fine on 2.30 thanks

Sam FT
25 May 2003, 00:24
12-22-02 at 12:01 AM agfisdn said this in Post #164 (http://www.vbulletin.org/forum/showthread.php?postid=333653#post333653)
Ps: What I cannot find is why the Post # does not show when you click on the ingored Post (java script popup window that shows on demand an ignored user's Post). I get the Post# Link but there is no $post[postcount]... no biggy :))

Yeah, I too wish someone knew how to get the the Post Count to show up correctly when using a ignored post and not as Post#

Christine
29 May 2003, 23:34
Wow -- how did I miss this one?

This is working on 2.3.0 for me. The ignored posts aren't showing the numbers, but when viewed, the links work, so I am happy.

**installs**

Does anyone know how to get this link incorporated into the quote function like is done here on vB.org?

Sam FT
30 May 2003, 00:24
Today at 05:34 PM Christine said this in Post #187 (http://www.vbulletin.org/forum/showthread.php?postid=401739#post401739)
Wow -- how did I miss this one?

This is working on 2.3.0 for me. The ignored posts aren't showing the numbers, but when viewed, the links work, so I am happy.

**installs**

Does anyone know how to get this link incorporated into the quote function like is done here on vB.org?

That would be nice to have too....

Intex
31 May 2003, 15:53
Has anybody noticed that on the 2nd page it renumbers the posts one onwards again. The actual links are preserved but as soon as you go to another page the display number starts from one again?!?!

cYbercOsmOnauT
31 May 2003, 21:02
Very easy but nice hack. Thanks for it Bira.

btw, did you know that your handle means beer in turkish? :classic:

Nomb
04 Jun 2003, 04:12
Great Hack. I've loved this one ever since the first time I visited vB.org!

/me clicks install :)

Nomb
04 Jun 2003, 04:13
Great Hack. I've loved this one ever since the first time I visited vB.org!

/me clicks install :)

reismarktq2
17 Jun 2003, 18:53
Help me, not working on my 2.3.0... the number won't show...

Christine
22 Jun 2003, 05:44
Hi reismarktq2,

Try installing it from the compiled instructions by BfB in this post:

http://www.vbulletin.org/forum/showthread.php?postid=338883#post338883

I am running it on 2.3.0 as written by BfB with no problems, so unless you have other hacks installed that are conflicting with it, it should work.

:)

DiscussAnything
25 Jun 2003, 05:31
01-25-03 at 10:05 AM subu1 said this in Post #170 (http://www.vbulletin.org/forum/showthread.php?postid=346049#post346049)
moin, sorry but i don't find this, what can i do. *snief*

greetz subu1


I couldn't find it either, turns out my php shows:

$postbits .= iif(empty($postbits), '', '<hr size=1>').getpostbit($post);

This displays the posts broken up with a small line in between them. If you just go for the 3rd $postbits, like he said, it should work out alright on 2.3.0.

its right before

$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage".iif(isset($highlight), "&highlight=$highlight", ""));

DiscussAnything
25 Jun 2003, 05:32
01-25-03 at 10:05 AM subu1 said this in Post #170 (http://www.vbulletin.org/forum/showthread.php?postid=346049#post346049)
moin, sorry but i don't find this, what can i do. *snief*

greetz subu1


I couldn't find it either, turns out my php shows:

$postbits .= iif(empty($postbits), '', '<hr size=1>').getpostbit($post);

This displays the posts broken up with a small line in between them. If you just go for the 3rd $postbits, like he said, it should work out alright on 2.3.0.

its right before

$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage".iif(isset($highlight), "&highlight=$highlight", ""));

Psidefect
27 Jun 2003, 09:07
Excellent hack!

Well done. Running 2.3.0 and it's working perfectly.

*Psi clicks install*

Sam FT
02 Jul 2003, 01:41
I stated this earlier, but I wish someone knew how to get the the Post Count to show up correctly when in a ignored post. The basic Post Link works fine for me, but it just when you have someone on ignored. So you decided that you want to view their post, so you click "To view this post click [here]" to view the message. And then the popup window appears with message and the post link as "Post #" where is should be "Post #1". I have tried and tried to figure it out. But I will pay anybody $40 if they can help me out by telling me how to fix this.

PurpleCow
04 Aug 2003, 06:30
This is a very nice hack and i have installed it now after doing a bit of modifications, like having the actual display and link in a different position.

However, I'd be interested to know, say, if i ahve installed fastforward's hack which converts dynamic URL's to static URL's, do i need to make any changes to actually link to the static URL, instead of dynamic one ??

Thanks for the hack !

TheLab
07 Aug 2003, 17:58
I know its an old post but just installed it... Great hack.
But i have a problem. Why does that happen in the aligning?
Check attachment..
thanx in advance :cool:

Edit: If i remove the quick quote hack the align is perfect at the right side. So i can imagine something is wrong with the tables... any ideas?

Bison
08 Aug 2003, 22:03
Create a Borderless table and place this (The Post Counter Hack) in that table, above the Quick Quote hack button...

sweet22
18 Aug 2003, 07:19
i cant find any of those lines in showthread.php=( does this hack work for 2.3.2?

The Wise One
26 Aug 2003, 02:30
08-18-03 at 07:19 AM sweet22 said this in Post #202 (http://www.vbulletin.org/forum/showthread.php?postid=426760#post426760)
i cant find any of those lines in showthread.php=( does this hack work for 2.3.2?


i just installed this hack on 2.3.2

worked great after spending a half hour tearing this thread apart...lol

sweet22

in freddies post here (http://www.vbulletin.org/forum/showthread.php?postid=205914#post205914)

the line while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) { is in the showthread.php file. do a search for it.

then, refer to the post below to find the second line.

http://www.vbulletin.org/forum/showthread.php?postid=259217#post259217

than, refer to this post for the rest.

http://www.vbulletin.org/forum/showthread.php?postid=257182#post257182

great hack.

*clicks install

The Wise One
26 Aug 2003, 03:59
i am having a bit of trouble with this. when i click on the post# link...sometimes it lines that post up at the top...other times it doesnt...any way to fix this? vb 2.3.2

also...is there a way to set it up like it is in vb3 where you click the post# link and it opens in a new window with only that post in the window?

thanks in advance :)

BfB
26 Aug 2003, 04:04
Today at 03:59 AM The Wise One said this in Post #204 (http://www.vbulletin.org/forum/showthread.php?postid=428659#post428659)
i am having a bit of trouble with this.


Because you should have followed my directions located here w/in this very same thread:

http://www.vbulletin.org/forum/showthread.php?postid=338883#post338883

The Wise One
26 Aug 2003, 04:37
Today at 04:04 AM BfB said this in Post #205 (http://www.vbulletin.org/forum/showthread.php?postid=428661#post428661)
Because you should have followed my directions located here w/in this very same thread:

http://www.vbulletin.org/forum/showthread.php?postid=338883#post338883


i just did (very little difference between what i followed before and yours). still the same problem. everything displays fine...post number of number, the post link appears in the address bar etc...

the problem is when i click on the post# link, it doesnt align that post at the top like it is supposed to...

any other ideas?

Keyser Söze
12 Sep 2003, 08:33
i just installed this hack on 2.3.2

worked great after spending a half hour tearing this thread apart...lol

sweet22

in freddies post here (http://www.vbulletin.org/forum/showthread.php?postid=205914#post205914)

the line while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) { is in the showthread.php file. do a search for it.

then, refer to the post below to find the second line.

http://www.vbulletin.org/forum/showthread.php?postid=259217#post259217

than, refer to this post for the rest.

http://www.vbulletin.org/forum/showthread.php?postid=257182#post257182

great hack.

*clicks install


if theres that many changes why not write up a new instructions for vb 2.3.2 ppl :)

sweet22
12 Oct 2003, 21:13
nothing shows up=(i installed, no errors anymore but nothing shows up=(

vBFreak
30 Oct 2003, 20:24
I installed the hack, but I've seen a problem in the showpost function... how can I display there the number of the post in the Thread? There's only Post #1

BfB
30 Oct 2003, 20:49
Use my instructions a few pages back. Do a search for BfB. They work like a charm on v2.3.2 as well.

vBFreak
30 Oct 2003, 21:19
No, that's not that what I wanted to do... what I wanted to do is on this screenshot:

I've made it for vB-germany.com, please ignore the left arrow with the referrals and look only at the arrow with "(Beitrag #1)", my forums are german, so I translated it, and its made and to gif transformed by paint :D

http://www.gerritsforum.de/showpost.gif

[edit: uhmm... I can't attach this file, I don't know why... I selct it, click on Add this File and then to All done, but nothing happens :/, that's now a big screenshot]

DannyBoy8406
04 Jan 2004, 00:15
How do make it so that it displays the number it is in the thread out of the total number of posts in the thread.... Such as like "Post #3 of 22"

BfB
04 Jan 2004, 07:09
How do make it so that it displays the number it is in the thread out of the total number of posts in the thread.... Such as like "Post #3 of 22"


http://www.vbulletin.org/forum/showthread.php?postid=338883#post338883

ZiRu$
01 Aug 2004, 07:13
Wow, someone needs to create a new installation file for 2.3.5 as its pretty confusing but this post clears it up

http://www.vbulletin.org/forum/showpost.php?p=259217&postcount=101

Installed and workin on 2.3.5