PDA

View Full Version : Historical Records


vulture
04-11-2005, 11:19 AM
I want to keep a list of Historical records so admins/mods/warned users can see past warning, but I don't want it to be displayed on the warned users status once the warning has matured. Is there anyway of doing this?

Thanks

sv1cec
04-11-2005, 03:15 PM
If you do not want users to be able to see their non-active warnings, edit Warn.php and find:


$get_warns=$DB_site->query("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");


Replace that with:


$get_warns=$DB_site->query("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']}' and w.warned_status='A' order by w.warned_time DESC");


Try this, it should work.

However, please be advised, that the number of warnings a user has received will still be viewable, in the postbit, when the user is viewing his own posts.

Rgds