Quote:
Originally Posted by sv1cec
The user can see his warnings from his User Profile. There are links in there to show him his warnings. It's a minor job to add a similar link in User CP, and frankly that's a good idea.
|
Done BUT there is something wrong the warning information is not showing where it should ... look at the pic .I wrote this small plugin for this thing
PHP Code:
$user = & $vbulletin->userinfo;
$warn_page = "";
eval('$warn_page .= "' . fetch_template('usercp_warn_view_top') . '";');
$get_warns=$db->query_read("SELECT w.*,u.username as wusername,u.userid as wuserid,wt.* FROM
".TABLE_PREFIX."warnings w
LEFT JOIN ".TABLE_PREFIX."user u ON(u.userid=w.warned_by)
LEFT JOIN ".TABLE_PREFIX."warning_types wt ON(wt.tid=w.warned_warning_id)
WHERE w.warned_user='{$user['userid']}' ORDER BY w.warned_time DESC");
while($warn=$db->fetch_array($get_warns))
{
$warn['date'] = vbdate($vbulletin->options['dateformat'],$warn['warned_time']);
$warn['time'] = vbdate($vbulletin->options['timeformat'],$warn['warned_time']);
$wmessage=stripslashes($warn['warned_reason']);
eval('$warn_page .= "' . fetch_template('usercp_warn_view_row') . '";');
}
eval('$warn_page .= "' . fetch_template('usercp_warn_view_end') . '";');
used hook location "usercp_start" for some reason the template "usercp_warn_view_row" is not being fetched i don't get it