disable avatars or enable

Started on the old forum in January 2010 · view the original in the archive · old links redirect here

No replies · 441 views · started 16 years ago · 2 min read

riderz Lead · 975 posts #1

here are a code where u can disable the avatars or enable them

genproc.php else if($action=="ustset")

    $showavatarinbox = $_POST["showavatarinbox"];
    $showavatarforum = $_POST["showavatarforum"];
    $showavatar = $_POST["showavatar"];

  $res = mysql_query("UPDATE wap_users SET showavatar='".$showavatar."' WHERE id='".$uid."'");
  $res = mysql_query("UPDATE wap_users SET showavatarinbox='".$showavatarinbox."' WHERE id='".$uid."'");
  $res = mysql_query("UPDATE wap_users SET showavatarforum='".$showavatarforum."' WHERE id='".$uid."'");

index.php?action=stset

  $showavatar = mysql_fetch_array(mysql_query("SELECT showavatar FROM wap_users WHERE id='".$uid."'"));
 $showavatarinbox = mysql_fetch_array(mysql_query("SELECT showavatarinbox FROM wap_users WHERE id='".$uid."'"));
 $showavatarforum = mysql_fetch_array(mysql_query("SELECT showavatarforum FROM wap_users WHERE id='".$uid."'"));

 echo "<small>Show avatar Online list?:</small> <select name=\"showavatar\" value=\"$showavatar[0]\">";
    if($showavatar[0]=="1"){
    echo "<option value=\"1\" selected=\"1\">Yes</option>";
    }else{
    echo "<option value=\"1\">Yes</option>";
    }
    if($showavatar[0]=="0"){
    echo "<option value=\"0\" selected=\"0\">No</option>";
    }else{
    echo "<option value=\"0\">No</option>";
    }
    echo "</select><br/><br/>";
 echo "<small>Show avatar Inbox?:</small> <select name=\"showavatarinbox\" value=\"$showavatarinbox[0]\">";
    if($showavatarinbox[0]=="1"){
    echo "<option value=\"1\" selected=\"1\">Yes</option>";
    }else{
    echo "<option value=\"1\">Yes</option>";
    }
    if($showavatarinbox[0]=="0"){
    echo "<option value=\"0\" selected=\"0\">No</option>";
    }else{
    echo "<option value=\"0\">No</option>";
    }
    echo "</select><br/><br/>";

echo "<small>Show avatar Forum?:</small> <select name=\"showavatarforum\" value=\"$showavatarforum[0]\">";
    if($showavatarforum[0]=="1"){
    echo "<option value=\"1\" selected=\"1\">Yes</option>";
    }else{
    echo "<option value=\"1\">Yes</option>";
    }
    if($showavatarforum[0]=="0"){
    echo "<option value=\"0\" selected=\"0\">No</option>";
    }else{
    echo "<option value=\"0\">No</option>";
    }
    echo "</select><br/><br/>";

index.php?action=online

 $showavatar = mysql_fetch_array(mysql_query("SELECT showavatar FROM wap_users WHERE id='".$uid."'"));

add this code

 if($showavatar[0]=="1"){

$avlink = getavatar($item[2]);
if ($avlink!=""){
echo "<img src=\"$avlink\" height=\"25\" width=\"25\" alt=\"avatar\"/>";
}else{
echo "<img src=\"images/nopic.jpg\" height=\"25\" width=\"25\" alt=\"avatar\"/>";
}
 }

ontop of

  echo "$icon $lnk - $item[1] <br/>";

else if($action=="viewtpc")

 $showavatar = mysql_fetch_array(mysql_query("SELECT showavatar FROM wap_users WHERE id='".$uid."'"));

add this code

if($showavatarforum[0]=="1")
{
 $uid =$ttext[0];
    $avatar = getavatar($uid);
   if ($avatar=="")
  {
  echo"<img src=\"images/nopic.jpg\" width=\"32\" height=\"32\" alt=\"avatar\"/>";
  }else{
echo"<img src=\"$avatar\" width=\"32\" height=\"32\" alt=\"avatar\"/>";
}
 }

ontop of

if(isonline($ttext[0]))
    {
      $iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
    }else{
        $iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
    }

else if($action=="readpm")

 $showavatarinbox = mysql_fetch_array(mysql_query("SELECT showavatarinbox FROM wap_users WHERE id='".$uid."'"));

add this code

if($showavatarinbox[0]=="1"){
   echo "$ptxt";
    $uid =$pminfo[1];
    $avatar = getavatar($uid);
   if ($avatar=="")
  {
  echo"<img src=\"mages/nopic.jpg\" width=\"32\" height=\"32\" alt=\"avatar\"/>";
  }else{
echo"<img src=\"$avatar\" width=\"32\" height=\"32\" alt=\"avatar\"/>";
}
}

ontop of

echo "$bylnk<br/>";

Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

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