Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: , by bira bira is offline
Developer Last Online: Jun 2013 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 07-05-2001 Last Update: Never Installs: 168
 
No support by the author.

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

PHP Code:
while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) { 
and ABOVE it put:

PHP Code:
$countposts = ($pagenumber-1)*$perpage

Find

PHP Code:
eval("\$postbits .= \"".gettemplate("postbit")."\";"); 
and ABOVE it put:

PHP Code:
$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:

Quote:
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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #182  
Old 04-27-2003, 01:39 PM
Rids's Avatar
Rids Rids is offline
 
Join Date: Aug 2002
Location: Wales
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works well with 2.3.0 - very nice
Reply With Quote
  #183  
Old 05-01-2003, 04:28 AM
leagleaze leagleaze is offline
 
Join Date: Mar 2003
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First hack I ever installed, it is great. Thank you
Reply With Quote
  #184  
Old 05-03-2003, 03:45 AM
ZiRu$'s Avatar
ZiRu$ ZiRu$ is offline
 
Join Date: Jan 2002
Location: Manitoba, Canada
Posts: 520
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
01-05-03 at 07:44 PM BfB said this in Post #166
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:

https://vborg.vbsupport.ru/showthrea...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
Reply With Quote
  #185  
Old 05-10-2003, 10:02 PM
M.C. M.C. is offline
 
Join Date: Jan 2002
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

original hack "Post Counter & Direct Link" doesn`t work on my 2.3.0

shows only (post#)

How to repair?

Thanx
Reply With Quote
  #186  
Old 05-18-2003, 01:04 AM
ap0c's Avatar
ap0c ap0c is offline
 
Join Date: Mar 2003
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works fine on 2.30 thanks
Reply With Quote
  #187  
Old 05-24-2003, 10:24 PM
Sam FT's Avatar
Sam FT Sam FT is offline
 
Join Date: Apr 2003
Posts: 119
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]12-22-02 at 12:01 AM agfisdn said this in Post #164
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 )
Reply With Quote
  #188  
Old 05-29-2003, 09:34 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #189  
Old 05-29-2003, 10:24 PM
Sam FT's Avatar
Sam FT Sam FT is offline
 
Join Date: Apr 2003
Posts: 119
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Today at 05:34 PM Christine said this in Post #187
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?
Reply With Quote
  #190  
Old 05-31-2003, 01:53 PM
Intex Intex is offline
 
Join Date: Apr 2002
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?!?!
Reply With Quote
  #191  
Old 05-31-2003, 07:02 PM
cYbercOsmOnauT's Avatar
cYbercOsmOnauT cYbercOsmOnauT is offline
 
Join Date: May 2003
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very easy but nice hack. Thanks for it Bira.

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

Thread Tools

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

Forum Jump


All times are GMT. The time now is 07:53 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09741 seconds
  • Memory Usage 2,315KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete