Staff page, change header colour for different rank

Results 1 to 6 of 6
  1. #1
    Eye Eye Capt'n Spheral is offline
    Grand MasterRank
    May 2010 Join Date
    TumptonshireLocation
    2,488Posts

    Staff page, change header colour for different rank

    Uber CMS 2.0

    Basically, i wanna change the blue header for a different rank, i dont know how to do that:



  2. #2
    Developer PremiumEye is offline
    Grand MasterRank
    Nov 2011 Join Date
    NetherlandsLocation
    550Posts

    Re: Staff page, change header colour for different rank

    You can do that with php. Do you have any experience with php? Than you can do this:

    First do this:
    [PHP]
    $rank1 = 'class name/#colorcode';
    $rank2 = '';
    $rank3 = ''; ...

    Put these before the while function!
    Until all your ranks. As value you need to give the class name or style to change the header.

    Check what the rank id is. That rank id will ben compatible with the variables you made. Like this:

    [PHP]
    $rank1 = 'red';
    $rank2 = 'blue';
    $rank3 = 'green';

    // with class
    while($staff = mysql_fetch_array($query)){
    <div class='header <?php echo $rank.''.$staff['id']; ?> '></div>
    }

    // with style
    while($staff = mysql_fetch_array($query)){
    <div class='header' style='background-color: <?php echo $rank.''.$staff['id']; ?> ;'></div>
    }
    [PHP]

    I hope you get what I mean :$. It's hard to make a script on a mobile phone.

    Verstuurd van mijn GT-I9000 met Tapatalk

  3. #3
    Eye Eye Capt'n Spheral is offline
    Grand MasterRank
    May 2010 Join Date
    TumptonshireLocation
    2,488Posts

    Re: Staff page, change header colour for different rank

    Quote Originally Posted by PremiumEye View Post
    You can do that with php. Do you have any experience with php? Than you can do this:

    First do this:
    [PHP]
    $rank1 = 'class name/#colorcode';
    $rank2 = '';
    $rank3 = ''; ...

    Put these before the while function!
    Until all your ranks. As value you need to give the class name or style to change the header.

    Check what the rank id is. That rank id will ben compatible with the variables you made. Like this:

    [PHP]
    $rank1 = 'red';
    $rank2 = 'blue';
    $rank3 = 'green';

    // with class
    while($staff = mysql_fetch_array($query)){
    <div class='header <?php echo $rank.''.$staff['id']; ?> '></div>
    }

    // with style
    while($staff = mysql_fetch_array($query)){
    <div class='header' style='background-color: <?php echo $rank.''.$staff['id']; ?> ;'></div>
    }
    [PHP]

    I hope you get what I mean :$. It's hard to make a script on a mobile phone.

    Verstuurd van mijn GT-I9000 met Tapatalk
    I have not much about PHP, but i'll look into what you said :P

  4. #4
    Developer PremiumEye is offline
    Grand MasterRank
    Nov 2011 Join Date
    NetherlandsLocation
    550Posts

    Re: Staff page, change header colour for different rank

    Quote Originally Posted by JohnHearfield View Post
    I have not much about PHP, but i'll look into what you said :P
    Haha. I can help you with teamviewer?

    From my mobile on Tapatalk

  5. #5
    Eye Eye Capt'n Spheral is offline
    Grand MasterRank
    May 2010 Join Date
    TumptonshireLocation
    2,488Posts

    Re: Staff page, change header colour for different rank

    Sure thing, i dstill dont get it

  6. #6
    Developer PremiumEye is offline
    Grand MasterRank
    Nov 2011 Join Date
    NetherlandsLocation
    550Posts

    Re: Staff page, change header colour for different rank

    Quote Originally Posted by JohnHearfield View Post
    Sure thing, i dstill dont get it
    Haha, should I help you? :)



Advertisement