colored nick online and in chat.php

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

    colored nick online and in chat.php

    Hello everyone I would like to make colored nick in my lavalair, for all users I would like to appear on the list is the colorful nickname online chat.php (for example pink nick for female and blu nick for male)i have already seen that in other posts around the forum but I've tried various codes that make me error can anyone help? thanks in advance

    #2
    i ve tryed thi but don t work
    PHP Code:
    //////////////////////GET USER NICK FROM USERID


    {
      
    $unick mysql_fetch_array(mysql_query("SELECT name,plusses,perm FROM ibwf_users WHERE id='".$uid."'"));
      
      if(
    $unick[2]=='3')
      {
        return 
    "<font color=\"red\">$unick[0]</font>";
      }
        else if(
    $unick[2]=='2')
      {
        return 
    "<font color=\"#999900\">$unick[0]</font>";
      }
       else if(
    $unick[2]=='1')
      {
        return 
    "<font color=\"#336600\">$unick[0]</font>";
      }
      
      else if(
    $unick[3]>0)
      {
        return 
    "<font color=\"#006666\">$unick[0]</font>";
      }
      
      return 
    $unick[0];

      
    $unick mysql_fetch_array(mysql_query("SELECT name,plusses, perm FROM ibwf_users WHERE id='".$uid."'"));
      return 
    $unick[0];

    anyone can help me?

    Comment


      #3
      PHP Code:
      function getnick_uid($uid)
      {
        
      $uid = (int) $uid;
         
      $query mysql_query("SELECT sex, name, perm FROM ibwf_users WHERE id='$uid'");
         
      $info mysql_fetch_assoc($query);
         if (
      $info['sex'] == 'F')
         {
            if (
      $info['perm'] == 1)
            {
               
      $color 'pink';
            } 
      //else else
             
         
      }
         else
        {
           if (
      $info['perm'] == 1)
           {
              
      $color 'blue';
           }
          
      // else else ... 
        
      }

         return 
      '<div style="color:'.$color.'">'.$info['name'].'</div>';


      something like that????
      Last edited by i0nutzxp; 02.06.11, 03:57.
      <?php unlink('World/Europe/Romania.country'); ?>

      Comment


        #4
        @i0nutzxp after </div> ' (quotation mark) is missing ;)
        It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
        ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
        ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
        キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

        Comment


          #5
          Originally posted by i0nutzxp View Post
          PHP Code:
          function getnick_uid($uid)
          {
            
          $uid = (int) $uid;
             
          $query mysql_query("SELECT sex, name, perm FROM ibwf_users WHERE id='$uid'");
             
          $info mysql_fetch_assoc($query);
             if (
          $info['sex'] == 'F')
             {
                if (
          $info['perm'] == 1)
                {
                   
          $color 'pink';
                } 
          //else else
                 
             
          }
             else
            {
               if (
          $info['perm'] == 1)
               {
                  
          $color 'blue';
               }
              
          // else else ... 
            
          }

             return 
          '<div style="color:'.$color.'">'.$info['name'].'</div>';


          something like that????
          i0nutzxp yes but give me error:Fatal error: Cannot redeclare getnick_uid() (previously declared in /membri/ladyenigma/dream/web/core.php:3875) in /membri/ladyenigma/dream/web/core.php on line 3904

          Comment


            #6
            And "Fatal error: Cannot redeclare getnick_uid()" dont means that a function with that name "getnick_uid" already exists???
            Just delete the old function....
            <?php unlink('World/Europe/Romania.country'); ?>

            Comment

            Working...
            X