i am sorry for bumping this old thread but.., i still didn't mange to give admins the ability to edit other users status..
if anyone did mange to do that.., Please share it with us!
----------------Edit----------------
i manged to replace the :
Code:
<if condition="$userinfo['userid']==$vbulletin->userinfo['userid']">
with :
Code:
<if condition="($post['userid']==$vbulletin->userinfo['userid']) OR ($bbuserinfo[usergroupid]==6)">
to make admins able to see the "Edit" and "Save" buttons.., However, If they edited anyuser it would be changed to them.
Example (As an admin) .. :
if i changed my status to : "Is good." and saved it.. every thing is fine.
but when i want to change someone's else status.. Like from "has no status." to "Is fine." (or anything else..)
That user's(which i changed his status) Only appears(his status) as i changed it to. (The "Is fine." status) until i reload the page.. then his status changes to "has no status." and my status changes to "Is fine." (As if i edited my own status!)
So.., is there anyfix for this?
i think that it is aproblem in the "vbstatus_class.php" file.. :
Code:
<?php
require_once('JSON.php');
if(!function_exists ( 'iconv' )){
function iconv($string){
return $string;
}
}
class att_object{
function att_object(){
}
}
class vbstatus_class{
function vbstatus_class()
{
global $att;
global $data;
$this->att = $att;
$this->data = $data;
$this->JSON = new JSON;
}
function process_status($status,$change_encoding=True)
{
global $vbulletin;
if($change_encoding){
$status = iconv('utf-8',$vbulletin->options['vbstatus_charset'],$status);
}
$charcount=strlen ($status);
if($vbulletin->options['vbstatus_maxchars'])
{
if($charcount>$vbulletin->options['vbstatus_maxchars'])
{
return '[Too Long]';
}
}
if($vbulletin->options['vbstatus_wordwrap'])
{
$status=wordwrap($status, $vbulletin->options['vbstatus_wordwrap'], "\n", true);
}
return $status;
}
function change_status($userid,$status)
{
$this->att->required($userid);
$return = new att_object();
$return->updated_status = $this->process_status($status,False);
$status = $this->process_status($status);
//$this->att->required($status);
$this->data->set('user');
$this->data->select('*');
$this->data->where('userid',$userid);
$userinfo = $this->data->execute('select1');
$this->att->required($userinfo);
$this->data->set('userfield');
$this->data->update('vbstatus_status',$status);
$this->data->where('userid',$userinfo['userid']);
$this->data->execute('update');
return $this->JSON->serialize($return);
}
}
?>
However.., i am not sure.. :/
Thanks in advanced.