View Full Version : Finished the Multiple Ranks Hack
check it out on my board @
STGN (http://stgn.ugforums.com/vb)
go into the UserCP -> edit profile, and select a rankset from the dropdown menu..
im just finishing off the control panel section to allow you to add rank schemes through there instead of using phpmyadmin like im doing at the moment, should all be done by tomorrow at which time ill attatch the hack.
i made this for ikonboard months ago and we were the only one to have it, i thought "ill not share this i want us to be origional" but after receiving so much help from here i want to give something back for it
basically it allows your users to pick a scheme for the rank pips, i.e. they pick trees and it gives them tree pips, they pick snowmen it gives them snowmen pips :D
Shakron
10-06-2001, 08:13 PM
Yeah! Cool you made it :D ... please, can I get it?
oh cool someones actually interested :D yeah its all finished now including the control panel, ill package it up and post it tomorrow morning when i wake up.
Shakron
10-06-2001, 08:28 PM
thanks thanks thanks .... I've been interested the whole time ... I was just to shy to ask :D
Mike Gaidin
10-06-2001, 09:24 PM
This is cool!
Hmm look's good..
now all I have to do is finish my education so I can get a good job to pay for vbulletin :D
Bitmap
10-08-2001, 05:11 PM
cool ... is this hack already available???? this is exactly what i was looking for :)
cool :)
anything for doctors/physicians?
Rcooper
10-08-2001, 09:14 PM
Man is thisn what i am thinking. Like picking what stars go to what group you select? I run a hunting , fishing and acamping board I would like to have the stars go with the person say they are hunting -> deer fishing ->fish etc etc.
Is that what this hack does?
R.cooper
Shakron
10-08-2001, 09:51 PM
so all are very excited .. but where's THE guy? ... still sleeping ...;) ?
Shakron
10-12-2001, 07:59 AM
Well, it seems you won't give it to us even if you promised to do so :(
... but it would be just fair if you could as at least tell us why ... because if you don't do that we all will come here every day to see if you posted it ... and will get disappointed every day :(
Goldfinger
10-12-2001, 08:03 AM
i'd like to get my hands on this hack :).
oh sorry guys i totally forgot, heres the multi rank control panel (im sure someone could improve on this, it was just... thrown together as quickly as possible) ill post the hack in a few hours, just need to extract the changes from the code. while you wait, youll be able to see how the hack works from the admin script though.
NOTE: you will also need to add the hack for the selection box in the users profile to get this to work, otherwise users will get a box where theyll have to type the rank name in manually (guess) which isn't great, ill bundle that hack in the same zip
Shakron
10-12-2001, 10:21 AM
Thanks :D ... I really thought you wouldn't give it to us anymore :)
... as soon as we have it on our board we will show you our brand new SWG-board :)
Bitmap
10-13-2001, 06:12 AM
yea ... thanks lob ... it looks pretty cool in the admincenter but i'm still waiting for the rest of the hack ;)
hope your not forgetting to attach it like last time :D
Shakron
10-14-2001, 02:34 PM
I don't want to get on your nerves but .. could we please get the other part of the hack?
I mean .. I don't understand you ... you offered that hack and now you are not posting it and you are ignoring me when I try to contact you :( .. what have I done wrong?
... and if you are mad about me (don't know why) ... then please give it at least to the other people or tell us, that you won't give it to us.
Ichabod_Crane
10-14-2001, 04:42 PM
LoB, could you please post the second part of the code, im dying to get that stuff :)
thanks,
Ichabod Crane
Shakron
10-18-2001, 11:27 AM
Originally posted by rcooper
Man is thisn what i am thinking. Like picking what stars go to what group you select? I run a hunting , fishing and acamping board I would like to have the stars go with the person say they are hunting -> deer fishing ->fish etc etc.
Is that what this hack does?
R.cooper
Hmm .. I am not sure if I understood it right, but it's like this:
UserA opens his user-center and there he is able to choose what ranking-path he wants. So if we take as an example a Star Wars board this would mean, that he is able to choose between the following paths:
- Jedi
- Dark-Jedi
- Rebell
- Imperial
- Crime
Now, let's say he chooses the Imperial-path. This means he will get ranks like Leutnant, General, Grand-Admiral ...
Someone else chose Jedi and so his rank-path will be like Jedi-Padwan- Jedi - Jedi-Master ...
.. ok? Well .. that's it and believe me: It's pretty cool :D
.. so I am still hoping that we get the second part ...
here it is sorry for the long wait, i do things then wait so long to document them i forget how they work lol.
BEFORE INSTALLING:
you will need the hack which allows for the use of combo (dropdown) boxes in the user profile fields
when it's done, you'll need a custom user profile field called "Rankset" using the dropdown combobox (otherwise people will have to type in rankset names by hand instead of selecting from a list)
run the install script (attatched to this post)
and modify the code (below)
then use the ranks admincenter to add ranks.
look for this code in admin/functions.php
on a sidenote, you'll see [field8] below, in userfields find out which is your last unused custom user field and use that (change the number in this script) or simply add a new column in phpmyadmin, the custom user field (8) stores the rank info for that user
if ($avatarurl=="" or ($bbuserinfo[userid]>0 and !($bbuserinfo[showavatars]))) {
$post[avatar]="";
} else {
eval("\$post[avatar] = \"".gettemplate("postbit_avatar")."\";");
}
if ($post[customtitle]==2) {
$post[usertitle] = htmlspecialchars($post[usertitle]);
}
right after it put this:
//START MULTI RACE HACK
$res = mysql_query("SELECT * FROM userfield WHERE userid='$post[userid]'");
$userinfo = mysql_fetch_array($res);
mysql_free_result($res);
//go through all of the ranks, seeing which postcount fits which pip
$res = mysql_query("SELECT * FROM rankcategories WHERE cat_name='$userinfo[field8]'");
$rankinfo = mysql_fetch_array($res);
mysql_free_result($res);
if(!isset($rankinfo[cat_id]) || strlen($rankinfo[cat_id])<1)
{
$rankinfo[cat_id]=1;
}
$rankposts = mysql_query ("SELECT * FROM ranks WHERE rank_catid='$rankinfo[cat_id]'");
while($row = mysql_fetch_array($rankposts))
{
if($post[posts]>=$row[rank_posts])
{
$temppostcount = $row[rank_posts];
}
}
$res = mysql_query("SELECT * FROM ranks WHERE rank_catid='$rankinfo[cat_id]' AND rank_posts='$temppostcount'");
$rank = mysql_fetch_array($res);
mysql_free_result($res);
$rankpip = "<img src=$rank[rank_graphic]>";
$post[usertitle]="$post[usertitle]<br>$rankpip";
//END MULTI RANK HACK
heres the attatched multirace rank hack installed..
get rid of the default set if you like, they were just for my board.
don't all thank me at once :D
Bitmap
10-18-2001, 07:34 PM
well ... thank you :)
it's great you postet it ... hope i can get it to work.
Martyjp
10-18-2001, 08:13 PM
You are a star thank you :D
Dunny
10-19-2001, 11:47 AM
anyone got a demo of it in action?
Shakron
10-19-2001, 11:49 AM
Well, I acctually said "thank you" yesterday per ICQ but here .. just for you ... Thank You! :D
... now we just need to get it working .. and that's the problem ... *sigh* ... :(
Originally posted by Dunny
anyone got a demo of it in action?
check my first post or go here: http://stgn.ugforums.com/vb/
Martyjp
10-20-2001, 12:41 PM
Hope you dont mind, I have made a slight change to the code ;)
in the changes to functions.php
change
$rankpip = "<img src=$rank[rank_graphic]>";
$post[usertitle]="$post[usertitle]<br>$rankpip";
//END MULTI RANK HACK
to
$rankpip = "<img src=$rank[rank_graphic]>";
$rankid = "$rank[rank_name]";
$post[usertitle]="$post[usertitle]$rankid<br>$rankpip";
//END MULTI RANK HACK
Now go into the vb control panel and remove all user titles, and then you need to edit any user groups that have their own titles, such as moderators and administrators, what you will need to do here is stick a <BR> on the end. like so
http://www.forums4games.com/example.jpg
The original hack will only display the pips and will keep the user titles that vb uses as standard, the above makes a slight change so that it displays the rank name
It may be a sloppy way of doing it, I am not sure but it does the job, what I would rather have it do is display administrator titles instead of the rank, but I havent worked that bit out yet ;)
Thanks again LoB :D
np, i was eventually going to get around to that, but well... im lazy :D
edit - you might wanna put a <br> after $post[usertitle] because administrator/senior member whatever, ends up on the same line
Martyjp
10-20-2001, 09:17 PM
Reason why I did it the way I did :)
I have removed all user titles from my board, so for the majority of members $post[usertitle] will be blank, if you put a <BR> after it then there will be a blank line under the username, to get round this I have added <BR> after the titles in edit user groups. This would also have to be done on any custom user titles.
Since I dont allow people to change their titles on my board the way I did it worked best, but with boards that do you are correct in saying <BR> needs top be added :)
$rankpip = "<img src=$rank[rank_graphic]>";
$rankid = "$rank[rank_name]";
$post[usertitle]="$post[usertitle]<BR>$rankid<br>$rankpip";
//END MULTI RANK HACK
is anyone else having any problems with this hack? i know of one person, now i know why i stopped releasing hacks in the first place - the assumption that because the hack is yours youve got to spend YOUR time installing it for OTHER people, im sorry Shakron but before deciding to hack your board, you should perhaps learn some PHP or at least know how the VB works before trying to do it yourself, i dont have all day every day to take you through it step by step (and i tried to take you through it time and time again but it seemed like i was getting nowhere :rolleyes: ).
When you were having problems installing it i even offered to do it for you but all i got in return was mistrust.
You thinking that i wanted to do something bad to your board, or delete it or something if you gave me your FTP details - WHY would i do something like that, then you finally give me the details and expect to get it done overnight, im sorry but im not a goddamned machine, i've got other things to do, i have been busy over this past weekend like i usually am, i have very little free time, at the very bottom of my "what i want to do list" was to get that hack installed on your board, get over it.
next time i will sereously be considering whether or not to release ANY of my new hacks here if this is the demanding crap that i get.
other people have managed and dont send me whiny emails about waiting for their board to be launched but it's my fault that it cant be because YOU havent gotten MY hack working yet, launch without it already, i am withdrawing my help.
Shakron
10-21-2001, 12:23 PM
what? you offered that hack in the first place and when I asked for it you promised to give it to us ... we got it 16(!) day later.
than we tried to install it and we had problems and couldnt find the reason and you offered to help us. the only reason why i was not sure if i could give you our ftp-dates was because we are acctally not allowed to give them away.
we would have never had a problem if you tell us that you don't have the time yet and that you'll install it in a few days or that you can't install it because you don't have the time. that would have been sad for us but we would understand it. but you kept us waiting and waiting and waiting without saying a word.
When you were having problems installing it i even offered to do it for you but all i got in return was mistrust.
You thinking that i wanted to do something bad to your board, or delete it or something if you gave me your FTP details - WHY would i do something like that, then you finally give me the details and expect to get it done overnight, im sorry but im not a goddamned machine, i've got other things to do, i have been busy over this past weekend like i usually am, i have very little free time, at the very bottom of my "what i want to do list" was to get that hack installed on your board, get over it.
you got no mistrust .. we just really didnt know what do to. it was very nice that you offered to help us ... but at the same time we feared that you maybe could get something wrong with our ftp-files (because our ftp-account is a littlbit *cough* messy). i was never thinking that you would delete anything because you don't like us or stuff like that (why should i think that?) ...
you offered to help us so at that date ... so i expected that you would do it there ... or at least tell us that you are not able to help us. don't you get it? our problem is not that you don't help us at all .. our problem is that you never said a word and just kept us waitinig without any information!
that's why i am angry now! not because you don't help us ... that's ok for me .. i was not asking you to install it for us ... you offered that to us and we gladly accepted (and after some thinking we decided that we trust you and gave you access to ftp even if we are not allowed to and even if we can get into serious troubles with our host because of that).
so pleeeease, dont say we are the bad girls here. and i think its pretty unfair that you post something like this here ... the other people don't knwo what happened and so it's just absolutely unfair. instead you could have just told us days ago that you are not willing to help us and we would have accepted that.
i did offer my help, and i did try to do it for you, but it seemed that when i was explaining what needed to be done, you had absolutely no idea what i was talking about and couldent do it,
i posted full instructions on here that everyone else managed to follow to the letter, but you kept on icqing me, emailing me and every other conceivable communications method, bugging me trying to get it done, that is why i started ignoring you, your total lack of patience, and lack of ability to get it done for yourself.
jeez, i even sent you some of my pre-hacked VB files but you still couldent get it working, im sorry if i lost patience with you and started ignoring you, but thats what happens when you get bugged days on end to do something i didnt particularly want to be doing in the first place, you only gave me FTP access a few days ago, as i stated i have been very busy this weekend, and this constant nagging over something that really isn't very important in the scheme of things wasn't helping me get any work done.
why do you even need the hack so desperately? why can't you launch without it? what's so special about it? it's just another hack...
Shakron
10-21-2001, 12:38 PM
forget it. you don't understand my point. and i can live with that .. but i still think its pretty unfair to post that here ... and do you want to know why i tried to contact you through several ways ov er and over again? because you said absolutely NOTHING. that's why!
just a single small icq-message or email with "i don't have time so dont expect it to be done till XXX" or "i don't want to install it because i just don't have time". i would definitely have accepted that! and yes; i have no idea how to hack a board ... but my board-admin does and she installed it. there was just that damned dropdown-problem.
why that hack is so important for us? i don't think i have to explain that. we've very good reasons ... and that's it.
thanks for posting that hack and thanks for trying to help us ... but you should try to look at the situation from another point ... because right now you are the person that is whining here. sorry .. .i wont bother you anymore.
is there anyway to make it so that only the admin and mods can change this?
SirSteve
11-03-2001, 05:40 AM
Everything installed correctly except when I get here, it hangs:
creating default set...
Where is this admin rank center located?
Martyjp
11-03-2001, 10:13 AM
Just installed on 2.2.0 and it works fine :)
SirSteve, multiraceadmin.php can be downloaded from the first page, upload it into your admin directory, you will also need to search it for "yourshere" and change the $dbhost, $dbname, $dbuser and $dbpass and you will need to do both twice
SirSteve
11-03-2001, 01:57 PM
Thanks Martyjp. Unfortunately, I am still confused. I made the changes and the admin is working but once you add a set, how do you delete/modify them?
And I am not clear on how to get it working... everything installed ok (I belive). This rank admin really needs to go into the admin CP.
All I want is to be able to offer my visitors (Star Wars site) 2 rank paths. Jedi and Sith
Both have 6 ranks each. They have to select 1 path when they register.
Thanks in advance for any help you can give me.
Bitmap
11-03-2001, 03:41 PM
hmm ... there is another hack like this, but i didn't write it and don't know if i am allowed to publish it.
this hack is integrated in the admin cp and the ranks can easily be modified.
the user can chose the path only when he registers, afterwards only the admin is able to change it.
well ... it's working great on my vbulletin 2.2.0 (a starwarsboard, too :D ), but as i said, i don't know if i am allowed to publish it.
SirSteve
11-03-2001, 03:57 PM
Originally posted by Bitmap
hmm ... there is another hack like this, but i didn't write it and don't know if i am allowed to publish it.
this hack is integrated in the admin cp and the ranks can easily be modified.
the user can chose the path only when he registers, afterwards only the admin is able to change it.
well ... it's working great on my vbulletin 2.2.0 (a starwarsboard, too :D ), but as i said, i don't know if i am allowed to publish it.
Can you e-mail it to me? :)
Martyjp
11-03-2001, 09:16 PM
hmm ... there is another hack like this, but i didn't write it and don't know if i am allowed to publish it.
There was one like that on this board up until about 15 minutes ago, it was strange, I downloaded it, installed it and then went to comment how great it was but the post was gone :confused:
Never mind, installed it and it worked so I am happy :D
Bitmap
11-03-2001, 09:22 PM
well, i don't think it is the hack i am using because i didn't release it :)
Ralgar
11-05-2001, 01:42 PM
https://vborg.vbsupport.ru/showthread.php?s=&threadid=32063
this ;) ?
the user can choose if he register and after (at the user cp) or the admins the rankingsystem he want
proxyMX
07-24-2002, 08:33 PM
I like neo would be interested to know if this can be modified so that only Admins can change the set for a user
proxyMX
07-24-2002, 09:22 PM
By the way, the code you posted had links in it that made it quite difficult,
proxyMX
07-24-2002, 09:47 PM
This hack wrecked my board, poor interface and complex sitatuations made me have to re-install the whole thing :| Not impressed with the hack at all
Ralgar
07-25-2002, 05:18 AM
1. no, the user choose wich set he use
2. if u wreck your board check the version (is written for 2.2.0!)
i cant say that it work at the later versions, can work, but mabe not
USS Phenix
08-04-2002, 09:29 PM
Help, I cant find this combo hack which allows combos in user fields... Where can I get it?
Ryangel
08-05-2002, 04:36 AM
Good and simple to use.
(works with 2.2.6)
Must admit you must have worked a little with mysql db and php but other that its very easy to use.
USS Phenix
08-05-2002, 07:59 AM
Hello? Where can I get the combo box hack from? Please tell me because I have installed this hack and the users cannot select a rank for themselfs because I can not find the combo box hack.... PLEASE TELL ME WHERE TO GET IT!
Ryangel
08-05-2002, 08:03 AM
hmm i tried to look for it just now but couldnt find it... I'll take a look again.
Ryangel
08-05-2002, 08:06 AM
Found it
https://vborg.vbsupport.ru/showthread.php?s=&threadid=21833
here you go. Good luck! :)
TheRaven57
03-23-2003, 01:45 PM
Neato
SirSteve
04-02-2003, 12:53 PM
How do I uninstall this hack?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.