Userlog on profile - Display namechanges,bans and email changes
This modification is in the archives.
What does this do?
This hack will display changes which have been made to the user's account (currently bans, username changes and email changes) in an additional tab in the user profile. It should make it easier for users to keep track of changes applied to someone's account (especially name changes). Instructions Simply import the userlogs_on_profile product and you should be done. Notes
Updates [21/6/2008] Version 1.2: -The hack now also displays email changes (can be turned off) -The hack now uses only one query instead of 3 -Applied some of the suggestions from Kentauros in this post Spoiler (click to open)
Thanks. Nice hack.
Some comments: Instead of $userid=intval($_GET[u]); You should use: $userid = $this->profile->userinfo['userid']; ======== Instead of mysql_fetch_array( you should use $db->fetch_array( ======== Instead of $vbulletin->db-> you should use $this->registry->db-> anything $vbulletin-> could be accomplished with $this->registry and you eliminate the use of a global variable and instead use the encapsulated class reference ======== The template is not cached. That is an additional query in all profiles. Add a pluging for 'cache_templates' with this code: Code:
if (THIS_SCRIPT == 'member') { $globaltemplates[] = 'memberinfo_block_userlog'; } Close
[22/4/2008] Version 1.1: Added AdminCP settings: -Option to turn the namechangelog or banlog on/off -Option to only allow certain usergroup to see the banlogs/namechangelogs -Option to set the ID of the banned group [20/4/2008] Version 1.0: First release Download
This modification is archived, downloads are still allowed. Screenshots |