disable avatars or enable

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

    disable avatars or enable

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

    genproc.php
    else if($action=="ustset")
    Code:
        $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
    Code:
      $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
    Code:
     $showavatar = mysql_fetch_array(mysql_query("SELECT showavatar FROM wap_users WHERE id='".$uid."'"));
    add this code
    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
    Code:
      echo "$icon $lnk - $item[1] <br/>";
    else if($action=="viewtpc")
    Code:
     $showavatar = mysql_fetch_array(mysql_query("SELECT showavatar FROM wap_users WHERE id='".$uid."'"));
    add this code
    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
    Code:
    if(isonline($ttext[0]))
        {
          $iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
        }else{
            $iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
        }
    else if($action=="readpm")
    Code:
     $showavatarinbox = mysql_fetch_array(mysql_query("SELECT showavatarinbox FROM wap_users WHERE id='".$uid."'"));
    add this code
    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
    Code:
    echo "$bylnk<br/>";
Working...
X