Colorful Users Nicknames

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

    Colorful Users Nicknames

    okay heres the thng...

    im done with converting my site into xhtml......

    now i just want 1 more thng....

    i wanna make tht users have colorful nicknames, but i realy dnt knw where 2 start....

    4 e.g. i want tht just my nickname is in red color..........

    i knw its posible but i need help!!!!!


    okay i knw tht 1st i have 2 make a new row in users table and a 1 new db table, but then starts a problem ...whts next.. etc. lol

    cn sum1 tell me where 2 start, how 2 start, how 2 conect db with script etc.. pls????

    i dnt asking tht u put a whole coding here.....im just asking tht if sum1 is good enough 2 explain the whole thng 2 me....

    pls!!!!!


    thanx in advance!!!
    sigpiceeeeerrr....

    #2
    okay heres the thng...

    im done with converting my site into xhtml......

    now i just want 1 more thng....

    i wanna make tht users have colorful nicknames, but i realy dnt knw where 2 start....

    4 e.g. i want tht just my nickname is in red color..........

    i knw its posible but i need help!!!!!
    okay i knw tht 1st i have 2 make a new row in users table and a 1 new db table, but then starts a problem ...whts next.. etc. lol

    cn sum1 tell me where 2 start, how 2 start, how 2 conect db with script etc.. pls????

    i dnt asking tht u put a whole coding here.....im just asking tht if sum1 is good enough 2 explain the whole thng 2 me....

    pls!!!!!
    thanx in advance!!![/b]
    Pozdrav heh
    You want to all nicknames are for example in red color?

    Comment


      #3
      jus write the code. n put it in there c panel to choose the colors of there name.

      Comment


        #4
        Pozdrav heh
        You want to all nicknames are for example in red color?[/b]
        pozZzz i tebi susjed!
        no i dnt wanna all nicknames in just 1 color, thts easy and i knw how 2 do it...
        i want tht wht hypetype said but i got a lil problem with writing the code and with modifing it into the script.....


        jus write the code. n put it in there c panel to choose the colors of there name.[/b]

        lil help pls!!!???
        sigpiceeeeerrr....

        Comment


          #5
          search google for html colours and you will find the colures

          Comment


            #6
            search google for html colours and you will find the colures[/b]

            lol i knw codes 4 colors...........
            sigpiceeeeerrr....

            Comment


              #7
              this may b of help u will need tables to record the colors rgb or what ever u wana use but this will display it
              ths only example to get u going


              $usercolor=mysql_fetch_array(mysql_query("SELECT color FROM ibwf_users WHERE uid='".$uid."'"));
              if($usercolor==""){$usercolor[0]="#000000";}
              $main.="<a href=\"index.php?action=action&amp;sid=$sid\" style=\"color:$usercolor[0]\">$item[1]</a>

              Comment


                #8
                this may b of help u will need tables to record the colors rgb or what ever u wana use but this will display it
                ths only example to get u going
                $usercolor=mysql_fetch_array(mysql_query("SELECT color FROM ibwf_users WHERE uid=&#39;".$uid."&#39;"));
                if($usercolor==""){$usercolor[0]="#000000";}
                $main.="<a href=\"index.php?action=action&amp;sid=$sid\" style=\"color:$usercolor[0]\">$item[1]</a>[/b]

                hmmmm okay now... 1st i need a new row in users table right? and then new table with colors????

                but i dnt understand this part

                $main.="<a href=\"index.php?action=action&amp;sid=$sid\" style=\"color:$usercolor[0]\">$item[1]</a>
                sigpiceeeeerrr....

                Comment


                  #9
                  heres the rite 1 4 u lol that was from my script 4got 2 edit it fully 4u lol

                  echo "<a href=\"index.php?action=viewuser&amp;who=$item[3]&amp;sid=$sid\" style=\"color:$usercolor[0]\">$item[1]</a>
                  ";

                  Comment


                    #10
                    You can try something like this
                    Code:
                    <?php
                    
                    $usercolor=mysql_fetch_array(mysql_query("SELECT color FROM ibwf_users WHERE uid=&#39;".$uid."&#39;"));
                    if($usercolor==""){$usercolor[0]="#000000";}
                    $show.="<a href=\"index.php?action=action&amp;sid=$sid\" style=\"color:$usercolor[0]\">$item[1]</a>";
                    if(!$usercolor==""){
                    $rnubmer=rand(1,10);
                    
                    
                    $show.="<a href=\"index.php?action=action&amp;sid=$sid\" style=\"color:$usercolor[$rnubmer]\">$item[1]</a>";
                    
                    }
                    ?>
                    Give me the link of script, and tell me in whic part of code you have found where it should it be and I will make it, I think that you must mannualy change every part where is nick shown...I don&#39;t know which script is it...

                    Comment


                      #11
                      i converted my site into xhtml from basic wml lava script..... and i modified it sumthng like tht funmobile script....
                      i mean i took idea from it.... cuz i wanted tht users cn change themes by urself etc and tht script got the easiest way 2 do tht.....

                      okay now i understand i have 2 change the whole script where it shows nicknames but i got trouble 2 put tht code into tany part where it shows nicknames......

                      4 e.g.
                      Code:
                              echo webhead($ctema,$imes);
                          echo "<p align=\"center\">";
                          include("pop.php");
                          echo "$f1";
                          echo "[b]$tnm[/b]";
                          $num_pages = getnumpages($tid);
                          if($page==""||$page<1)$page=1;
                          if($go!="")$page=getpage_go($go,$tid);
                          $posts_per_page = 5;
                          if($page>$num_pages)$page=$num_pages;
                          $limit_start = $posts_per_page *($page-1);
                          //echo "<a href=\"index.php?action=post&amp;sid=$sid&amp;tid=$tid\">Post reply</a>";
                          $lastlink = "<a href=\"index.php?action=$action&amp;tid=$tid&amp;sid=$sid&amp;go=last\">Zadnja strana</a>";
                          $firstlink = "<a href=\"index.php?action=$action&amp;tid=$tid&amp;sid=$sid&amp;page=1\">Prva strana</a> ";
                          $golink = "";
                          if($page>1)
                          {
                            $golink = $firstlink;
                          }
                          if($page<$num_pages)
                          {
                            $golink .= $lastlink;
                          }
                          if($golink !="")
                          {
                            echo "
                      $golink";
                          }
                          echo "$f2";
                          echo "</p>";
                          echo "
                      
                      ";
                          echo "$f1";
                          $vws = $tinfo[4]+1;
                          $rpls = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM sw_posts WHERE tid=&#39;".$tid."&#39;"));
                          echo "Odgovora: $rpls[0] - Pregleda: $vws
                      ";
                      
                          
                          if($page==1)
                          {
                            $posts_per_page=4;
                            mysql_query("UPDATE ibwf_topics SET views=&#39;".$vws."&#39; WHERE  id=&#39;".$tid."&#39;");
                            $ttext = mysql_fetch_array(mysql_query("SELECT authorid, text, crdate, pollid FROM sw_topics WHERE id=&#39;".$tid."&#39;"));
                            $unick = getnick_uid($ttext[0]);
                            if(isonline($ttext[0]))
                          {
                            $iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
                          }else{
                              $iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
                          }
                          $usl = "
                      <a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$ttext[0]\">$iml$unick</a>";
                          $topt = "<a href=\"index.php?action=tpcopt&amp;sid=$sid&amp;tid=$tid\">*</a>";
                          if($go==$tid)
                          {
                            $fli = "<img src=\"images/flag.gif\" alt=\"!\"/>";
                          }else{
                            $fli ="";
                          }
                      
                          $pst = parsemsg($ttext[1],$sid);
                          echo "$usl: $fli$pst $topt
                      ";
                          $dtot = date("d-m-y - H:i:s",$ttext[2]);
                          echo $dtot;
                          echo "
                      ";
                      its the part from where u reading the topic.....so how 2 put tht code properly??
                      sigpiceeeeerrr....

                      Comment


                        #12
                        i converted my site into xhtml from basic wml lava script..... and i modified it sumthng like tht funmobile script....
                        i mean i took idea from it.... cuz i wanted tht users cn change themes by urself etc and tht script got the easiest way 2 do tht.....

                        okay now i understand i have 2 change the whole script where it shows nicknames but i got trouble 2 put tht code into tany part where it shows nicknames......

                        4 e.g.
                        Code:
                                echo webhead($ctema,$imes);
                            echo "<p align=\"center\">";
                            include("pop.php");
                            echo "$f1";
                            echo "[b]$tnm[/b]";
                            $num_pages = getnumpages($tid);
                            if($page==""||$page<1)$page=1;
                            if($go!="")$page=getpage_go($go,$tid);
                            $posts_per_page = 5;
                            if($page>$num_pages)$page=$num_pages;
                            $limit_start = $posts_per_page *($page-1);
                            //echo "<a href=\"index.php?action=post&amp;sid=$sid&amp;tid=$tid\">Post reply</a>";
                            $lastlink = "<a href=\"index.php?action=$action&amp;tid=$tid&amp;sid=$sid&amp;go=last\">Zadnja strana</a>";
                            $firstlink = "<a href=\"index.php?action=$action&amp;tid=$tid&amp;sid=$sid&amp;page=1\">Prva strana</a> ";
                            $golink = "";
                            if($page>1)
                            {
                              $golink = $firstlink;
                            }
                            if($page<$num_pages)
                            {
                              $golink .= $lastlink;
                            }
                            if($golink !="")
                            {
                              echo "
                        $golink";
                            }
                            echo "$f2";
                            echo "</p>";
                            echo "
                        
                        ";
                            echo "$f1";
                            $vws = $tinfo[4]+1;
                            $rpls = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM sw_posts WHERE tid=&#39;".$tid."&#39;"));
                            echo "Odgovora: $rpls[0] - Pregleda: $vws
                        ";
                        
                            
                            if($page==1)
                            {
                              $posts_per_page=4;
                              mysql_query("UPDATE ibwf_topics SET views=&#39;".$vws."&#39; WHERE  id=&#39;".$tid."&#39;");
                              $ttext = mysql_fetch_array(mysql_query("SELECT authorid, text, crdate, pollid FROM sw_topics WHERE id=&#39;".$tid."&#39;"));
                              $unick = getnick_uid($ttext[0]);
                              if(isonline($ttext[0]))
                            {
                              $iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
                            }else{
                                $iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
                            }
                            $usl = "
                        <a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$ttext[0]\">$iml$unick</a>";
                            $topt = "<a href=\"index.php?action=tpcopt&amp;sid=$sid&amp;tid=$tid\">*</a>";
                            if($go==$tid)
                            {
                              $fli = "<img src=\"images/flag.gif\" alt=\"!\"/>";
                            }else{
                              $fli ="";
                            }
                        
                            $pst = parsemsg($ttext[1],$sid);
                            echo "$usl: $fli$pst $topt
                        ";
                            $dtot = date("d-m-y - H:i:s",$ttext[2]);
                            echo $dtot;
                            echo "
                        ";
                        its the part from where u reading the topic.....so how 2 put tht code properly??[/b]
                        change this part
                        Code:
                        $usl = "
                        <a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$ttext[0]\">$iml$unick</a>";
                        to

                        Code:
                        <?php
                        
                        
                        $rnubmer=rand(1,7);*/you can change this to $rnumber=rand(1,10) but theen you must have 10 if conditions below:*/
                        if($rnubmer==1){
                        $usercolor="#000000";
                        }
                        if($rnubmer==2){
                        $usercolor="#FFFFFF";
                        }
                        if($rnubmer==3){
                        $usercolor="#FF00FF";
                        }
                        if($rnubmer==4){
                        $usercolor="#0000FF";
                        }
                        if($rnubmer==6){
                        $usercolor="#00FF00";
                        }
                        if($rnubmer==7){
                        $usercolor="#F0FF0F";
                        }
                        
                        $usl = "
                        <font color=\"$usercolor\"><a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$ttext[0]\">$iml$unick</a></font>";
                        
                        }
                        ?>
                        do you understand how to change it?

                        Comment


                          #13
                          oooohhhhhh yes i c the point now......

                          yes i understant it now...

                          but does tht mean tht i dnt need a whole new database table, but only a new row in users table???





                          so corect me pls if im wrong...

                          1st i&#39;ve 2 make a new row in users table... 4 e.g. `color` int(10) NOT NULL default &#39;1&#39;


                          and then i put this in script....

                          Code:
                          $color = mysql_fetch_array(mysql_query("SELECT color FROM sw_users WHERE userid=&#39;".$uid."&#39;"));
                          
                          if($color==1){
                          $usercolor="#000000";
                          }
                          if($color==2){
                          $usercolor="#FFFFFF";
                          }
                          if($color==3){
                          $usercolor="#FF00FF";
                          }
                          if($color==4){
                          $usercolor="#0000FF";
                          }
                          if($color==6){
                          $usercolor="#00FF00";
                          }
                          if($color==7){
                          $usercolor="#F0FF0F";
                          }
                          
                          $usl = "
                          <font color=\"$usercolor\"><a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$ttext[0]\">$iml$unick</a></font>";
                          
                          }

                          am i right??? or did i miss sumthng cuz im lil lost now... lol
                          sigpiceeeeerrr....

                          Comment


                            #14
                            oooohhhhhh yes i c the point now......

                            yes i understant it now...

                            but does tht mean tht i dnt need a whole new database table, but only a new row in users table???
                            so corect me pls if im wrong...

                            1st i&#39;ve 2 make a new row in users table... 4 e.g. `color` int(10) NOT NULL default &#39;1&#39;
                            and then i put this in script....

                            Code:
                            $color = mysql_fetch_array(mysql_query("SELECT color FROM sw_users WHERE userid=&#39;".$uid."&#39;"));
                            
                            if($color==1){
                            $usercolor="#000000";
                            }
                            if($color==2){
                            $usercolor="#FFFFFF";
                            }
                            if($color==3){
                            $usercolor="#FF00FF";
                            }
                            if($color==4){
                            $usercolor="#0000FF";
                            }
                            if($color==6){
                            $usercolor="#00FF00";
                            }
                            if($color==7){
                            $usercolor="#F0FF0F";
                            }
                            
                            $usl = "
                            <font color=\"$usercolor\"><a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$ttext[0]\">$iml$unick</a></font>";
                            
                            }
                            am i right??? or did i miss sumthng cuz im lil lost now... lol[/b]
                            You yust do what I did said in last/that post, you don&#39;t need to creat new row in database Try it and report

                            Comment


                              #15
                              but how then the user cn choose his/her favorite color???
                              sigpiceeeeerrr....

                              Comment

                              Working...
                              X