help abt online list

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

    help abt online list

    Hey guys, I need help with online list I'm trying to get the user avatar to show on online list bt I can't get the code to work, I try searching forum and other scripts bt still no result ..

    This is the coding I was trying to use

    PHP Code:
    $avlink getavatar($item[3]);
      if (
    $avlink=="")
      { 
        
    $sex mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='$item[3]'"));
        if(
    $sex[0]=='M')
        {
          echo 
    "<br/><img src=\"images/nophotoboy.gif\" alt=\"avatar\"/><br/>";
        }else if(
    $sex[0]=='F')
              {
                echo 
    "<br/><img src=\"images/nophotogirl.gif\" alt=\"avatar\"/><br/>";
              }else{
                     echo 
    "<br/><img src=\"images/nopic.jpg\" alt=\"avatar\"/><br/>";
                   }
      }else{
      echo 
    "<br/><img src=\"$avlink\" alt=\"avatar\"/><br/><br/>";
      } 
    This is the code. sorry abt tht
    Last edited by MyGyChat; 16.07.12, 12:54.

    #2
    seriously. this is why you wont get help with this code. its not wrapped in bbcode php tags and has forced smileys to appear in places where code should be.
    <?php
    include ('Ghost');
    if ($Post == true) {
    echo '

    sigpic
    alt='coding-talk.com!!' />';
    echo 'Sharing Is Caring!';
    } else {
    echo '

    alt='the username GHOST has been comprimised!' />';
    echo 'OMG SOMEBODY HELP ME!!';
    }
    ?>

    Comment


      #3
      No I use 3 smiley tht is showing. Tht code is the plain code.

      Comment


        #4
        Originally posted by MyGyChat View Post
        No I use 3 smiley tht is showing. Tht code is the plain code.
        oops my bad you are right. but please still wrap the code into a php tag for easier viewing and cleaner posts.
        <?php
        include ('Ghost');
        if ($Post == true) {
        echo '

        sigpic
        alt='coding-talk.com!!' />';
        echo 'Sharing Is Caring!';
        } else {
        echo '

        alt='the username GHOST has been comprimised!' />';
        echo 'OMG SOMEBODY HELP ME!!';
        }
        ?>

        Comment


          #5
          Ok bbcode is [ php ] whtever [ /php ] right. Cause I jus did tht

          Comment


            #6
            Originally posted by MyGyChat View Post
            Ok bbcode is [ php ] whtever [ /php ] right. Cause I jus did tht
            yes mate thank you. looks much better. there is a button you can press to do it also at top of textarea box marked php ;)
            but that maybe just for pc user mode of site not mobile im not sure. but thanks lol.
            <?php
            include ('Ghost');
            if ($Post == true) {
            echo '

            sigpic
            alt='coding-talk.com!!' />';
            echo 'Sharing Is Caring!';
            } else {
            echo '

            alt='the username GHOST has been comprimised!' />';
            echo 'OMG SOMEBODY HELP ME!!';
            }
            ?>

            Comment


              #7
              do u have this getavatar function in ur core.php check it , secondly are ur avatar images placed in proper folder see tht also , if u r getting any error better report tht fully

              Comment


                #8
                Yea it have getavatar function in core and its working. Cause my profile using tht same code and it working fine. But I don't know it aint working on the online list . Plzz help me

                Yea I'm mobile

                Comment


                  #9
                  You need to get the user id into avatar or it will never work.
                  Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                  Visit: WapMasterz Coming Back Soon!
                  _______
                  SCRIPTS FOR SALE BY SUBZERO
                  Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                  FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                  _______
                  Info & Tips
                  php.net
                  w3schools.com

                  Comment


                    #10
                    Originally posted by MyGyChat View Post
                    Yea it have getavatar function in core and its working. Cause my profile using tht same code and it working fine. But I don't know it aint working on the online list . Plzz help me

                    Yea I'm mobile


                    After looking at your code i did a update so try this code below and tell me if it works for you now

                    PHP Code:
                    $avlink getavatar($item[3]);

                      if (
                    $avlink=="")
                      { 
                        
                    $sex mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='$item[3]'"));

                        if(
                    $sex[0]=='M')
                        {
                          echo 
                    "<br/><img src=\"images/nophotoboy.gif\" alt=\"avatar\"/><br/>";
                        }else if(
                    $sex[0]=='F')
                              {
                                echo 
                    "<br/><img src=\"images/nophotogirl.gif\" alt=\"avatar\"/><br/>";
                              }else if(
                    $sex[0]==''){

                                     echo 
                    "<br/><img src=\"images/nopic.jpg\" alt=\"avatar\"/><br/>";

                                  }else{

                      echo 
                    "<br/><img src=\"$avlink\" alt=\"avatar\"/><br/><br/>";
                      } 

                    Comment


                      #11
                      Hmmm I change $item[3] to $item[2] and its working according to the sex and which pic to show bt pic from gallery aren't showing lik the rest it show in url form

                      Comment

                      Working...
                      X