Version: 1.2, by zappsan
Developer Last Online: Jul 2016
Category: Profile Enhancements -
Version: 3.7.0
Rating:
Released: 04-18-2008
Last Update: 06-20-2008
Installs: 131
Uses Plugins
No support by the author.
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
The hack will add one new template (memberinfo_block_userlog)
For displaying the bans of someone, the hack will assume the usergroup for banned members is usergroup number 8 (default banned group on a fresh vB installation). If your banned group has a different ID, you can change it in the adminCP (Userlog on Profile Settings).
All changes made using vB 3.6 or any lower version won't be displayed, since the userlog feature was first introduced in 3.7
If there are no entries for someone, the tab won't be displayed on their profile.
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
[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
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
good idea for a block ... i was to write my own this week-end, so you make me a gift here.. lol
though, i will suggest that instead of multiple queries you simply use one that read the whole table for that user, and cache the results sorted by fieldname AND dateline, so you just have to use the fieldname you want...
you could even add the same elements listed when you read the editlog in the admincp... i'm going to do that myself, because most of my staff prefer to read these infos in the profile because they can't read the editlog...
Can the email change with date and time be added to this? Currently I use the Save User's Email Address hack that I made, but it would be great to incorporate that into this.
Email changes get lgged too? I'll take a look at it.
Quote:
Originally Posted by ecihanuysal
well, i installed this but how can i remove or delete the logs from the user's profile page??
Well, it's same info which is displayed in the adminCP, I didn't see an option to delete logs there though.
Quote:
Originally Posted by nexialys
good idea for a block ... i was to write my own this week-end, so you make me a gift here.. lol
though, i will suggest that instead of multiple queries you simply use one that read the whole table for that user, and cache the results sorted by fieldname AND dateline, so you just have to use the fieldname you want...
you could even add the same elements listed when you read the editlog in the admincp... i'm going to do that myself, because most of my staff prefer to read these infos in the profile because they can't read the editlog...
I'll try to work out the query thing, I still need to gain more experience at this kind of stuff
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';
}
I'm sorry I've currently got too many problems so I can't work on this for a while. I'll try to add Kentauros suggestions as soon as possible (thanks for the tips).