The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
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
|
Comments |
#12
|
|||
|
|||
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 |
#13
|
|||
|
|||
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 |
#14
|
|||
|
|||
// --- 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 |
#15
|
|||
|
|||
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 |
#16
|
|||
|
|||
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,.
|
#17
|
|||
|
|||
Ahhh. I understand. This hack is really just to only provide a graphical version of what is currently displayed by the "Posts: ##" text.
|
#18
|
|||
|
|||
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] |
#19
|
|||
|
|||
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] |
#20
|
|||
|
|||
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... |
#21
|
|||
|
|||
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? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|