PDA

View Full Version : [request] Starhack / different usergroups


Sneakz
07-06-2001, 01:29 PM
Hello,

I just wanna know, if someone could help me out with a small problem i have..
I recently used a starhack "hack" from this board.. and implemented it into a vbb.
But now is my next question: is it spoosible to create a starhack for a individual usergroup.

like:


// --- Begin starhack

$stars = "";


if ($post[usergroupid]==6 or $post[usergroupid]==7 ) // administrator or supermoderator
{
$starsgif_1 = '<img src="images/stars/ani1.gif">';
$starsgif_2 = '<img src="images/stars/ani1.gif">';
$starsgif_3 = '<img src="images/stars/ani2.gif">';
$starsgif_4 = '<img src="images/stars/ani2.gif">';
$starsgif_5 = '<img src="images/stars/ani3.gif">';
$starsgif_6 = '<img src="images/stars/ani3.gif">';
$starsgif_7 = '<img src="images/stars/ani4.gif">';
$starsgif_8 = '<img src="images/stars/ani4.gif">';
$starsgif_9 = '<img src="images/stars/ani5.gif">';
$starsgif_10 = '<img src="images/stars/ani5.gif">';
}
if ($post[usergroupid]==5 // moderators
{
$starsgif_1 = '<img src="images/stars/bluestar.gif">';
$starsgif_2 = '<img src="images/stars/cyanstar.gif">';
$starsgif_3 = '<img src="images/stars/greenstar.gif">';
$starsgif_4 = '<img src="images/stars/redstar.gif">';
$starsgif_5 = '<img src="images/stars/yellowstar.gif">';
$starsgif_6 = '<img src="images/stars/yellowstar.gif">';
$starsgif_7 = '<img src="images/stars/redstar.gif">';
$starsgif_8 = '<img src="images/stars/greenstar.gif">';
$starsgif_9 = '<img src="images/stars/cyanstar.gif">';
$starsgif_10 = '<img src="images/stars/bluestar.gif">';
}
else // normal members
{
$starsgif_1 = '<img src="images/stars/redstar.gif">';
$starsgif_2 = '<img src="images/stars/bluestar.gif">';
$starsgif_3 = '<img src="images/stars/redstar.gif">';
$starsgif_4 = '<img src="images/stars/bluestar.gif">';
$starsgif_5 = '<img src="images/stars/redstar.gif">';

}

if ($post[usergroupid]==6 or $post[usergroupid]==7 )
{ $stars .= $starsgif_1 . $starsgif_2 . $starsgif_3 . $starsgif_4 . $starsgif_5 . $starsgif_6 . $starsgif_7 . $starsgif_8 . $starsgif_9 . $starsgif_10; }

if ($post[usergroupid]==5 )
{ $stars .= $starsgif_1 . $starsgif_2 . $starsgif_3 . $starsgif_4 . $starsgif_5 . $starsgif_6 . $starsgif_7 . $starsgif_8 . $starsgif_9 . $starsgif_10; }


elseif ($post[posts] > 100 )
{ $stars .= $starsgif_1 . $starsgif_2 . $starsgif_3 . $starsgif_4. $starsgif_5; }
elseif ($post[posts] > 75 )
{ $stars .= $starsgif_1 . $starsgif_2 . $starsgif_3 . $starsgif_4; }
elseif ($post[posts] > 50 )
{ $stars .= $starsgif_1 . $starsgif_2 . $starsgif_3; }
elseif ($post[posts] > 25 )
{ $stars .= $starsgif_1 . $starsgif_2; }
else // ($post[posts] > 0)
{ $stars .= $starsgif_1; }


// --- End starhack


----------------------

Just wondering if above is going to work with that what i want , so a starhack per usergroup.
Please let me know what i should do, improve code, or simply change it ? :D

Any answers are welcome,
Thanks in advance

:p ;)

BradC
07-06-2001, 01:35 PM
I would say try it out.. and see if it will..

trial and error..

if you get parse errors figure out what might be wrong.. on what line :)

and go from there.

Sneakz
07-06-2001, 04:23 PM
Doesn't work out this here..
Someone need to help now, coz i really dunno what to do more

I get a parse error, and changed it from which line the error occured, but still it doesn't load how i want it..

Please someone help me with this :D:p

Sneakz
07-07-2001, 01:51 PM
I already used tubedoggs script :D
Thanks