Level Color Nick Chat

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Level Color Nick Chat

    I have problem with this code at chat page:

    Code:
    if(ismod($uid)) { 
      $addClass = " Blued"; 
    } 
    else { 
      if(isowner(getuid_sid($sid))) 
        { 
          $addClass = " Greened"; 
        } 
      else { 
          if(isheadadmin(getuid_sid($sid))) { 
            $addClass = " Yellowed"; 
          } 
          else { 
             if(isadmin(getuid_sid($sid))) { 
               $addClass = " Redded"; 
             } 
             else { 
               $addClass = " Default"; 
             } 
          } 
       } 
    } 
    echo "[$ds]<a href=\"chat.php?action=say2&sid=$sid&who=$chat[0]&rid=$rid&rpw=$rpw\">$optlink</a> - ";
    in css I have add:

    .Blued{
    color: #0000A0;
    background-color: #E0FFFF;
    }
    .Redded{
    color: #C11B17;
    background-color: #F9966B;
    }
    .Yellowed{
    color: #AF7817;
    background-color: #FFF380;
    }
    .Greened{
    color: #254117;
    background-color: #6AFB92;
    }
    .Default{color: deepskyblue;}

    but not work this code...

    any1 can give me help 4 fix???
    tnks..
    if like my post click:

    http://coding-talk.com/images/totall...ost_thanks.gif

    #2
    this should work
    Code:
    <?
    if(ismod($uid)){ 
      $addClass = "Blued"; 
    } elseif(isowner(getuid_sid($sid))){ 
          $addClass = "Greened"; 
        } elseif(isheadadmin(getuid_sid($sid))){ 
            $addClass = "Yellowed"; 
          } elseif(isadmin(getuid_sid($sid))){ 
               $addClass = "Redded"; 
             } else { 
               $addClass = "Default"; 
        }
    echo "[$ds]";
    echo "<a href=\"chat.php?action=say2&sid=$sid&who=$chat[0]&rid=$rid&rpw=$rpw\">$optlink</a> - ";
    ?>

    Comment


      #3
      my code is part of page php..I have open ?php tag...
      if like my post click:

      http://coding-talk.com/images/totall...ost_thanks.gif

      Comment


        #4
        my code is part of page php..I have open ?php tag...[/b]
        well just remove the php tags and replace your code with mine

        Comment


          #5
          all members are nickname blued
          if like my post click:

          http://coding-talk.com/images/totall...ost_thanks.gif

          Comment


            #6
            so it doesnt work? :D post the screenshot if you can, are functions ismod(), isowner(), isheadadmin(), isadmin() there and working? why you use getuid_sid($sid) and not just $uid? you use ismod($uid) and isowner(getuid_sid($sid) the functions have different arguments or? i cant see why is this not working lol :P

            as i can see getuid_sid($sid) gets $uid by $sid right? but by ismod($uid) i can see that $uid is already there :P

            sorry i dont use lavalair :D

            Comment


              #7
              there is my screenshot problem...;)
              if like my post click:

              http://coding-talk.com/images/totall...ost_thanks.gif

              Comment


                #8
                well, the best solution is to zip the script and post it, because i cant help you if i dont know where is the problem

                Comment

                Working...
                X