Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 06-24-2000 Last Update: Never Installs: 0
 
No support by the author.

This is first release of the Rank Hack, which is intended to mimic the Galaga Hack of the UBB. It integrates into the vB much like the Avatar hack, where as you can add, modify, and upload new ranks from the administration.

Unlike the Galaga hack, it only displays 1 image, and not several. This can be changed if the request is high enough, otherwise it'll remain as it is.

Download it here - instructions included:
http://www.ffextreme.com/txt/rankhack.zip

For a demo, view:
http://4.3.235.30/forums/showthread.php?threadid=1

The demo is on my computer, so it might not always be available pending on whether or not my computer is on.

Enjoy.

[Edited by Krucifyx on 06-24-2000 at 09:46 AM]

Show Your Support

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

Comments
  #12  
Old 06-26-2000, 09:23 PM
Guest
 
Posts: n/a
Default

Oops. Didn't take a few things into consideration when I wrote this. Find:

$RankNum = $userpostcount;

Replace with:

$RankNum = $userpostcount / 10;

Now find:

$rank = $rank . "<br>";

And move it to the line above // --- vB Galaga Hack by TommyBoy
Reply With Quote
  #13  
Old 07-04-2000, 09:34 PM
Guest
 
Posts: n/a
Default

Would someone be so kind and post the totally corrected script to use here? I am somewhat confused when it comes to what to change in the code above and I do not wanna included something which does not work.

Thanks

Jan
Reply With Quote
  #14  
Old 07-05-2000, 07:30 PM
Guest
 
Posts: n/a
Default

// --- 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
Reply With Quote
  #15  
Old 07-05-2000, 11:12 PM
Guest
 
Posts: n/a
Default

I'm not sure anyone has tried or understands Mafukie's post.
You should be able to do this without any hacking. Simply go to your control panel, and where you create new titles, create each title with some HTML that refers to the ranking images. Each time your user gains a new rank (or is assigned one, such as administrators & moderators) the HTML will automatically show the image. This has the added bonus that mods and admins can have seperate images regardless of how many posts there are. I see no reason why it won't work. Another way in which this app rocks!
Nothing more depressing than an administrator with only one star
Reply With Quote
  #16  
Old 07-06-2000, 12:15 AM
Guest
 
Posts: n/a
Default

Jonny - that is great but it doesn't work for those admins who want all users, including mods, to have the same stars. As soon as you assign someone to be a mod, they get a defined title and you would then have to watch their posts to give them the correct stars. That is where the hack would come in. I don't find it 'depressing' to only have two stars beside my name on my board,.
Reply With Quote
  #17  
Old 07-06-2000, 01:01 AM
Guest
 
Posts: n/a
Default

Ahhh. I understand. This hack is really just to only provide a graphical version of what is currently displayed by the "Posts: ##" text.
Reply With Quote
  #18  
Old 07-07-2000, 02:06 PM
Guest
 
Posts: n/a
Default

I am going nuts cause this just wont work for me

This is what I tried pasting in as suggested and all it does when I call the $rank in the postbit template is add another <br> which I guess is the one after images should have been shown...

// --- vB Galaga Hack by TommyBoy
$RankNum = $userpostcount/10;
$rank = "";
while ($RankNum > 1) {
if ($RankNum > 5000) {
$rank = $rank . "<img src=\"$images/star.gif\" border=0> <img src=\"$images/star.gif\" border=0> <img src=\"$images/star.gif\" border=0> <img src=\"$images/star.gif\" border=0> <img src=\"$images/star.gif\" border=0> <img src=\"$images/star.gif\" border=0>";
$RankNum -= 5000;
}
elseif ($RankNum > 2500) {
$rank = $rank . "<img src=\"$images/star.gif\" border=0> <img src=\"$images/star.gif\" border=0> <img src=\"$images/star.gif\" border=0> <img src=\"$images/star.gif\" border=0> <img src=\"$images/star.gif\" border=0>";
$RankNum -= 2500;
}
elseif ($RankNum > 2000) {
$rank = $rank . "<img src=\"images/star.gif\" border=0> <img src=\"images/star.gif\" border=0> <img src=\"images/star.gif\" border=0> <img src=\"images/star.gif\" border=0>";
$RankNum -= 2000;
}
elseif ($RankNum > 1500) {
$rank = $rank ."<img src=\"images/star.gif\" border=0> <img src=\"images/star.gif\" border=0> <img src=\"images/star.gif\" border=0>";
$RankNum -= 1500;
}
elseif ($RankNum > 1000) {
$rank = $rank ."<img src=\"images/star.gif\" border=0> <img src=\"images/star.gif\" border=0>";
$RankNum -= 1000;
}
elseif ($RankNum > 500) {
$rank = $rank ."<img src=\"images/star.gif\" border=0> ";
$RankNum -= 500;
}
else {
$rank = $rank ." ";
$RankNum--;
}
}
$rank = $rank . "<br>";
// --- vB Galaga Hack by TommyBoy

Please tell me what I am missing?

Jan

[Edited by Jan on 07-07-2000 at 11:07 AM]
Reply With Quote
  #19  
Old 07-07-2000, 02:16 PM
Guest
 
Posts: n/a
Default

In some places you have '$images/star.gif' and in others you have 'images/star.gif' - remove the '$' from the '$images/star.gif' and did you upload a 'star.gif' to your images directory?

It also appears you are just trying to use it as a stars hack? Look at mine as it more concise than what you have

http://www.vbulletin.com/forum/showt...?threadid=1368

[Edited by rangersfan on 07-07-2000 at 11:18 AM]
Reply With Quote
  #20  
Old 07-07-2000, 02:19 PM
Guest
 
Posts: n/a
Default

I found and corrected the $images problem which also was in the hack as it was posted above. Yes the images is there... If it wasn't would I just get a broken one, no?

Its like it ignores the various options and simply put what the same for all of them namely the <br> tag...
Reply With Quote
  #21  
Old 07-07-2000, 04:13 PM
Guest
 
Posts: n/a
Default

You are getting just a <br> as you probably don't have any users with >5000 posts. Well let's take a look at what the code does:

You won't see any stars until you have over 5000 posts as your lowest count is 500 and you are dividing posts by 10 to get your count. You really need to adjust your totals or just not divide posts by 10 at all as it still appears you are trying to use this as a stars hack and not a rank hack. The two are not the same as the rank hack changes the graphics around to a 'higher' rank while the stars hack just keeps adding stars.

Are you wanting this:

>500 Posts 1 Star
>1000 Posts 2 Stars
>1500 Posts 3 Stars
>2000 Posts 4 Stars
>2500 Posts 5 Stars
>5000 Posts 6 Stars

If you take out the divide by ten part you will still have anamolies by using this code as you are. Say a user has 3500 Posts - They would end up with 7 stars because of that while loop! 3600 Posts and they get 7 stars and 100 spaces after the stars. Do you really want that sort of behaviour?
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 11:23 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.04519 seconds
  • Memory Usage 2,278KB
  • 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)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
  • (1)pagenav_pagelink
  • (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_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
  • 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