Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-17-2001, 01:09 AM
Castel Castel is offline
 
Join Date: Oct 2001
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, I am about to switch from UBB to vB and my users would probably kill me if they don't have their Galaga shields anymore. As stupid as it seems it is by far the hack they like the most. Here is the code for vB (does it need ot be changed, cannot test it since I can't find where to insert it in vB 2). If the code is still good to go, where would I add it to showthread.php?

vB1.x instructions :

Open showthread.php, search for
"$userpostcount=$userinfo[posts];" and underneath it add:

Code:
// --- vB Galaga Hack by TommyBoy 
$RankNum = $userpostcount / 10; 
$rank = ""; 
while ($RankNum > 1) { 
if ($RankNum > 1000) { 
$rank = $rank . "<img src=\"images/ranks/7.gif\" border=0>"; 
$RankNum -= 1000; 
} 
elseif ($RankNum > 500) { 
$rank = $rank . "<img src=\"images/ranks/6.gif\" border=0>"; 
$RankNum -= 500; 
} 
elseif ($RankNum > 100) { 
$rank = $rank . "<img src=\"images/ranks/5.gif\" border=0>"; 
$RankNum -= 100; 
} 
elseif ($RankNum > 50) { 
$rank = $rank ."<img src=\"images/ranks/4.gif\" border=0>"; 
$RankNum -= 50; 
} 
elseif ($RankNum > 10) { 
$rank = $rank ."<img src=\"images/ranks/3.gif\" border=0>"; 
$RankNum -= 10; 
} 
elseif ($RankNum > 5) { 
$rank = $rank ."<img src=\"$images/ranks/2.gif\" border=0>"; 
$RankNum -= 5; 
} 
else { 
$rank = $rank ."<img src=\"images/ranks/1.gif\" border=0>"; 
$RankNum--; 
} 
} 
$rank = $rank . "<br>"; 
// --- vB Galaga Hack by TommyBoy
Thanks in advance
Reply With Quote
  #2  
Old 03-18-2001, 09:59 AM
Guest
 
Posts: n/a
Default

Come on guys, I really need this one. Pretty please , I just don't have the php knowledge to do it myself.
Reply With Quote
  #3  
Old 03-18-2001, 03:21 PM
Guest
 
Posts: n/a
Default

I think this will work, but I would suggest testing it before releasing it to your members.
In showthread.php, find
PHP Code:
$post[joindate]=vbdate($registereddateformat,$post[joindate]); 
Add directly above it
PHP Code:
$userpostcount=$post[posts
Right below this added line and above the original line you searched for, put in the code you originally posted for the hack. Then, edit the postbit template and add $rank where you want it to show up.
Reply With Quote
  #4  
Old 03-18-2001, 06:06 PM
Guest
 
Posts: n/a
Default

You can use i think the "user titles" function no?
Reply With Quote
  #5  
Old 03-18-2001, 06:17 PM
Guest
 
Posts: n/a
Default

tubedogg that gave a parse error. But at the same time you gave me enough of a clue to figger it out

No need to add the line you mentioned. Just change the first line of the hack to

$RankNum = $post[posts] / 10;


For full instructions download the attached zip. It also includes the images.

Demo at my test board :

Galaga Demo

Thanks again tubedogg
Attached Files
File Type: zip galagarankvb2.zip (2.1 KB, 132 views)
Reply With Quote
  #6  
Old 03-18-2001, 06:22 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by jojo85
You can use i think the "user titles" function no?
I don't think so. This ranking is not related to user titles, user groups, etc... It changes the rank icon every ten posts unlike the star hack. For example when reaching 50 posts the previous 4 "10 icons" are converted to 1 "50 icon". When you reach 100 posts the 1 "50 icon" and 4 "10 icons" are replaced by 1 "100 icon", etc etc...
Reply With Quote
  #7  
Old 03-18-2001, 06:47 PM
Guest
 
Posts: n/a
Default

Yeah there should have been a ";" after the line I said to add. I apologize for that. I think it would have worked otherwise tho.
Reply With Quote
  #8  
Old 08-12-2001, 09:21 AM
FreshFroot
Guest
 
Posts: n/a
Default

Can some one tell me why I can't find this line of code in 2.0.3?

$post[joindate]=vbdate($registereddateformat,$post[joindate]);

Thanks.
Reply With Quote
  #9  
Old 08-12-2001, 01:37 PM
Castel Castel is offline
 
Join Date: Oct 2001
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's in functions.php in the admin folder now. Instructions remain the same, just a different file
Reply With Quote
  #10  
Old 08-12-2001, 01:39 PM
FreshFroot
Guest
 
Posts: n/a
Default

Muchas Graicas!
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:04 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04710 seconds
  • Memory Usage 2,254KB
  • Queries Executed 12 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (2)postbit_onlinestatus
  • (10)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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete