DeadMan384AD
08-31-2002, 08:11 AM
After looking thru just about every hack the only hack that I found that was close to what I wanted was the Galaga hack by TommyBoy.... and its obvious even to me that the code is pretty old...
What I want it to do, is display a picture according to how many posts the person has... But I dont think I'm calling the right data or something...
I have this after the global things in "buildpostbit"
// --- vB Galaga Hack by TommyBoy Modified by DeadMan384AD
$RankNum = $bbuserinfo[posts];
$rank = "";
while ($RankNum > 1) {
if ($RankNum > 5) {
$rank = "<img src=\"images/ranks/2.jpg\" border=0>";
$RankNum -= 5;
}
elseif ($RankNum > 10) {
$rank = "<img src=\"images/ranks/3.jpg\" border=0>";
$RankNum -= 10;
}
elseif ($RankNum > 50) {
$rank = "<img src=\"images/ranks/4.jpg\" border=0>";
$RankNum -= 50;
}
elseif ($RankNum > 100) {
$rank = "<img src=\"images/ranks/5.jpg\" border=0>";
$RankNum -= 100;
}
elseif ($RankNum > 500) {
$rank = "<img src=\"images/ranks/6.jpg\" border=0>";
$RankNum -= 500;
}
elseif ($RankNum > 1000) {
$rank = "<img src=\"images/ranks/7.jpg\" border=0>";
$RankNum -= 1000;
}
else {
$rank = $RankNum;
$RankNum--;
}
}
$rank = $rank;
// --- vB Galaga Hack by TommyBoy Modified by DeadMan384AD
Right now in the else statement I have it showing $RankNum for debug... cause it just shows the image for else, when I should be seeing image 6 in my posts... but for the debug, all I get is "2" for any user....
I've tried it taking $RankNum from $post[posts] as well, same output...
And in the final version, I want this to be using 34 different ranking levels...
What I want it to do, is display a picture according to how many posts the person has... But I dont think I'm calling the right data or something...
I have this after the global things in "buildpostbit"
// --- vB Galaga Hack by TommyBoy Modified by DeadMan384AD
$RankNum = $bbuserinfo[posts];
$rank = "";
while ($RankNum > 1) {
if ($RankNum > 5) {
$rank = "<img src=\"images/ranks/2.jpg\" border=0>";
$RankNum -= 5;
}
elseif ($RankNum > 10) {
$rank = "<img src=\"images/ranks/3.jpg\" border=0>";
$RankNum -= 10;
}
elseif ($RankNum > 50) {
$rank = "<img src=\"images/ranks/4.jpg\" border=0>";
$RankNum -= 50;
}
elseif ($RankNum > 100) {
$rank = "<img src=\"images/ranks/5.jpg\" border=0>";
$RankNum -= 100;
}
elseif ($RankNum > 500) {
$rank = "<img src=\"images/ranks/6.jpg\" border=0>";
$RankNum -= 500;
}
elseif ($RankNum > 1000) {
$rank = "<img src=\"images/ranks/7.jpg\" border=0>";
$RankNum -= 1000;
}
else {
$rank = $RankNum;
$RankNum--;
}
}
$rank = $rank;
// --- vB Galaga Hack by TommyBoy Modified by DeadMan384AD
Right now in the else statement I have it showing $RankNum for debug... cause it just shows the image for else, when I should be seeing image 6 in my posts... but for the debug, all I get is "2" for any user....
I've tried it taking $RankNum from $post[posts] as well, same output...
And in the final version, I want this to be using 34 different ranking levels...