Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

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
  #92  
Old 05-24-2002, 09:27 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #93  
Old 05-26-2002, 02:16 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks !
Reply With Quote
  #94  
Old 05-28-2002, 03:11 PM
Mone' Mone' is offline
 
Join Date: May 2002
Location: Australia
Posts: 246
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

working great on vb 2.2.6

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

thank you guys !

Mone'
Reply With Quote
  #95  
Old 06-03-2002, 12:38 PM
ixian's Avatar
ixian ixian is offline
 
Join Date: Oct 2001
Location: Denver, CO
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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 has the easy code for showthread.php that works with 2.2.x on up.

Post 33 has a very nice template change (Postbit) that makes the link to posts appear just like it does on these forums.

Finally, post 47 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.
Reply With Quote
  #96  
Old 06-03-2002, 01:05 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.

Quote:
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 has the easy code for showthread.php that works with 2.2.x on up.

Post 33 has a very nice template change (Postbit) that makes the link to posts appear just like it does on these forums.

Finally, post 47 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.
Reply With Quote
  #97  
Old 06-03-2002, 02:08 PM
ixian's Avatar
ixian ixian is offline
 
Join Date: Oct 2001
Location: Denver, CO
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #98  
Old 06-03-2002, 02:28 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?

Quote:
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
Reply With Quote
  #99  
Old 06-07-2002, 03:18 PM
Knux Knux is offline
 
Join Date: Mar 2002
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

http://www.pbfreak.net/forums/showth...=6967#post6967
Reply With Quote
  #100  
Old 06-07-2002, 03:52 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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. )

Code:
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.
Quote:
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/showth...=6967#post6967
Reply With Quote
  #101  
Old 06-08-2002, 12:56 PM
Knux Knux is offline
 
Join Date: Mar 2002
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am running 2.2.5 and thx for the help 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);
Reply With Quote
Reply


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:35 AM.


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.05834 seconds
  • Memory Usage 2,339KB
  • Queries Executed 25 (?)
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
  • (1)bbcode_code
  • (4)bbcode_php
  • (5)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_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