help abt online list

Started on the old forum in July 2012 · view the original in the archive · old links redirect here

10 replies · 695 views · started 14 years ago · 1 min read

5 participants
MyGyChat Newbie · 8 posts #1

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

$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

Ghost Senior · 366 posts #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 ' ![](http://destrukt.dk/ico/phpdeveloper.jpg) alt='coding-talk.com!!' />'; echo 'Sharing Is Caring!'; } else { echo ' ![](http://img98.imageshack.us/img98/6476/av3ro4.jpg) alt='the username GHOST has been comprimised!' />'; echo 'OMG SOMEBODY HELP ME!!'; } ?>
MyGyChat Newbie · 8 posts #3

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

Ghost Senior · 366 posts #4

MyGyChat wrote: 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 ' ![](http://destrukt.dk/ico/phpdeveloper.jpg) alt='coding-talk.com!!' />'; echo 'Sharing Is Caring!'; } else { echo ' ![](http://img98.imageshack.us/img98/6476/av3ro4.jpg) alt='the username GHOST has been comprimised!' />'; echo 'OMG SOMEBODY HELP ME!!'; } ?>
MyGyChat Newbie · 8 posts #5

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

Ghost Senior · 366 posts #6

MyGyChat wrote: 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 ' ![](http://destrukt.dk/ico/phpdeveloper.jpg) alt='coding-talk.com!!' />'; echo 'Sharing Is Caring!'; } else { echo ' ![](http://img98.imageshack.us/img98/6476/av3ro4.jpg) alt='the username GHOST has been comprimised!' />'; echo 'OMG SOMEBODY HELP ME!!'; } ?>
mirror Developer · 108 posts #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

MyGyChat Newbie · 8 posts #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 🙂

subzero Super moderator Fellow · 3,954 posts #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... _______…

Anthony Developer · 82 posts #10

MyGyChat wrote: 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

$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/>";
  }  

FREE International SMS

GYSMS.com Provides FREE International sms Reach over 775 networks in more than 221 countries at no cost to you. and the Good News is we own our SMS Hardware so there is no third party SMS API involved our services are completely Ad supported.....

http://gysms.com

Send FREE International MMS and Share Files worldwide using our MMS Service.

http://gysms.net

GTriddim Live Online Radio Station

http://www.gtriddim.com

MyGyChat Newbie · 8 posts #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

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close