Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Post Counter & Direct Link Details »
Post Counter & Direct Link
Mod Version: 1.00, by bira (Member) bira is offline
Developer Last Online: Jun 2013 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 2.2.x Rating: (4 votes - 5.00 average) Installs: 168
Released: 06 Jul 2001 Last Update: Never Downloads: 11
Not Supported  

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


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and ABOVE it put:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Find


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and ABOVE it put:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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...threadid=24656

Cheers,

Bira

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 06 Jul 2001, 10:48
TheDude
Guest
 
thanks
easy hack but the idea is quite interresting especially for very long threads
thanks again bira !!
Reply With Quote
  #3  
Old 06 Jul 2001, 11:56
ztsky
Guest
 
A useful hack,THANKS.
Reply With Quote
  #4  
Old 06 Jul 2001, 21:48
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Real name: Justin J. Rebbert
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.
__________________
-Justin J. "JJR512" Rebbert
www.JJR512.com: Chat about anything!
Reply With Quote
  #5  
Old 06 Jul 2001, 22:54
BluSmurf BluSmurf is offline
 
Join Date: Nov 2001
great easy hack
Reply With Quote
  #6  
Old 08 Jul 2001, 04:23
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Real name: Justin J. Rebbert
That's funny, I could have sworn I had attached that file as mentioned earlier...but here it is now.
Attached Files
File Type: txt post number.txt (1.4 KB, 734 views)
__________________
-Justin J. "JJR512" Rebbert
www.JJR512.com: Chat about anything!
Reply With Quote
  #7  
Old 08 Jul 2001, 04:42
dwh's Avatar
dwh dwh is offline
 
Join Date: Feb 2002
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?
Reply With Quote
  #8  
Old 08 Jul 2001, 05:04
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Real name: Justin J. Rebbert
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.

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.)
__________________
-Justin J. "JJR512" Rebbert
www.JJR512.com: Chat about anything!
Reply With Quote
  #9  
Old 08 Jul 2001, 22:53
dwh's Avatar
dwh dwh is offline
 
Join Date: Feb 2002
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.
Reply With Quote
  #10  
Old 09 Jul 2001, 06:43
MarkB's Avatar
MarkB MarkB is offline
 
Join Date: Oct 2001
Re: [re-release] Post Counter & Direct Link

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
Reply With Quote
  #11  
Old 01 Aug 2001, 02:08
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Real name: Justin J. Rebbert
I think this needs to be updated for 2.0.3...I couldn't find this code at all:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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!
__________________
-Justin J. "JJR512" Rebbert
www.JJR512.com: Chat about anything!
Reply With Quote
  #12  
Old 01 Aug 2001, 06:38
dwh's Avatar
dwh dwh is offline
 
Join Date: Feb 2002
It's more complicated now, I'll try to be brief.

In showthread.php
after


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

but before


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

add


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

about 8 lines down

BEFORE

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

add


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Close showthread.php.

Open admin/functions.php

Find


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Now add countposts variable to the end like so


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Done.
Reply With Quote
  #13  
Old 01 Aug 2001, 07:59
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
It's more complicated now, I'll try to be brief.
It is more complicated now. But, your suggestion worked. Thanks, dwh!
Reply With Quote
  #14  
Old 01 Aug 2001, 23:05
dxb's Avatar
dxb dxb is offline
 
Join Date: Oct 2001
thanks dwh you just made it so simple and it worked great
Reply With Quote
  #15  
Old 04 Aug 2001, 11:17
Sarge
Guest
 
Thanks
IT works great!
Sarge
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 19:08.

Layout Options | Width: Wide Color: