View Full Version : Profile Enhancements - Userlog on profile - Display namechanges,bans and email changes
zappsan
04-18-2008, 10:00 PM
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 (https://vborg.vbsupport.ru/showpost.php?p=1537461&postcount=26)
[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
Jasem
04-20-2008, 03:28 AM
Thank you very much
bxbigt
04-20-2008, 03:49 AM
sweet thanks!!
Magnumutz
04-20-2008, 06:36 AM
Sweet, i was actually looking for a mod like this :)
M-Tuning
04-20-2008, 07:49 AM
Very Nice!
I made a dutch version, hope you don't mint:
Hornstar
04-20-2008, 08:25 AM
Thanks, just wondering who will have permission to view the ban logs tho? can you set that for only staff?
DubaiHost
04-20-2008, 09:11 AM
Just what we need ..
thanks ,, Installed ..
M-Tuning
04-20-2008, 09:54 AM
Thanks, just wondering who will have permission to view the ban logs tho? can you set that for only staff?
Yes, i need that too.
Have been editing the plugin but I don't get it to work properly.
zappsan
04-20-2008, 10:52 PM
Very Nice!
I made a dutch version, hope you don't mint:
It's ok, I'm planning to phrase this hack and I'll make use of your Dutch version then :)
Thanks, just wondering who will have permission to view the ban logs tho? can you set that for only staff?
Yes, i need that too.
Have been editing the plugin but I don't get it to work properly.
There is no control to do this, but I'm probably going to add one.
Currently, you need to edit the templates.
You need to edit the memberinfo_block_userlog template.
Find this:
<if condition="$block_data[baninfo]!=''">
<fieldset class="statistics_group">
<legend>Bans</legend>
<ul class="list_no_decoration">
$block_data[baninfo]
</ul>
</fieldset>
</if>
and change it to
<if condition="is_member_of($bbuserinfo, X, Y, Z)"><if condition="$block_data[baninfo]!=''">
<fieldset class="statistics_group">
<legend>Bans</legend>
<ul class="list_no_decoration">
$block_data[baninfo]
</ul>
</fieldset>
</if>
<else />
Ban Logs are only visible for staff members.
</if>
This will display the message "Ban Logs are only visible for staff members." to all usergroups which can't see the logs, you can change it to whatever you want.
Be sure to replace the X.Y,Z in<if condition="is_member_of($bbuserinfo, X, Y, Z)">with the usergroup numbers which are allowed to see the logs.
M-Tuning
04-21-2008, 06:07 AM
I Already did that, but I want to totally hide the tab if the usergroup is wrong and not the content of the tab.
Hornstar
04-21-2008, 06:32 AM
I Already did that, but I want to totally hide the tab if the usergroup is wrong and not the content of the tab.
I'd prefer it to just show the username changes and not the ban log if the user is not a staff member.
M-Tuning
04-21-2008, 08:54 AM
That's what Zappsan did.
bilgicc
04-22-2008, 04:06 AM
Thanks a lot.
zappsan
04-22-2008, 01:20 PM
I just updated the hack to version 1.1
The template edits I posted before aren't necessary anymore.
You can now change the settings in the adminCP (see screenshot).
Version 1.1:
Added AdminCP settings:
-Option to turn the namechange log or banlog on/off
-Option to only allow certain usergroups to see the banlogs/namechange logs
-Option to set the ID of the banned group
M-Tuning
04-22-2008, 02:00 PM
Nice!
Hornstar
04-23-2008, 07:41 AM
yeah great update! Thanks alot.
Noonster
04-29-2008, 06:57 PM
Does not seem to be showing on 3.7.0 Gold??
zappsan
04-29-2008, 07:47 PM
Really? I didn't try it out on gold yet. I'm gonna do tomorrow.
Be aware that the tab won't be displayed, if the user hasn't been banned or didn't have any name changes before. Also make sure you allowed the right usergroups to view it.
Boofo
04-29-2008, 08:31 PM
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.
ecihanuysal
04-29-2008, 10:16 PM
well, i installed this but how can i remove or delete the logs from the user's profile page??
Bounce
04-29-2008, 10:54 PM
Very nice , thanks :up:
Bounce
04-29-2008, 10:55 PM
Does not seem to be showing on 3.7.0 Gold??
I found it at the end of someone's profile you will see >> and a drop down appears on mine with the info in there :up:
It only show's if a username has been altered so will not show on all profiles
nexialys
04-30-2008, 12:11 AM
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...
zappsan
05-18-2008, 10:11 PM
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.
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.
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 :)
Majest
05-21-2008, 09:04 AM
Makes life much easier, thank you very much.
Kentaurus
06-01-2008, 01:17 AM
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:
if (THIS_SCRIPT == 'member')
{
$globaltemplates[] = 'memberinfo_block_userlog';
}
Boofo
06-01-2008, 02:21 AM
Is this hack even still being supported?
zappsan
06-02-2008, 08:01 AM
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).
Boofo
06-02-2008, 08:19 AM
Just an update on the progress once in a while is all that is needed. ;)
J105C
06-02-2008, 11:01 AM
This does not work or appear just recently. It wont' show up on my froums anymore.
I am running vb 3.7.1 here and added all my usergroups to view namechanges/bans :O
edit: Nevermind it is working now. It just didn't show all the previous information from my db before I imported it.
Is there any way to restore the ban/name change info from a pervious db of vB w/ the same users?
zappsan
06-21-2008, 12:11 PM
I just uploaded version 1.2 and hope everything is working fine.
[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 (https://vborg.vbsupport.ru/showpost.php?p=1537461&postcount=26)
Kentaurus, I didn't add all of your suggestions, since some of them seemed to cause problems for me and I didn't have time to troubleshoot them. The templates are now being cached, thanks for the tip!
This does not work or appear just recently. It wont' show up on my froums anymore.
I am running vb 3.7.1 here and added all my usergroups to view namechanges/bans :O
edit: Nevermind it is working now. It just didn't show all the previous information from my db before I imported it.
Is there any way to restore the ban/name change info from a pervious db of vB w/ the same users?
If it's a DB from a 3.6 version, there is no way, since there was no log like this in this version. If it's from a 3.7 version it should be working fine.
Boofo
06-21-2008, 01:39 PM
Does this add the date and time of the email changes also? And can it be set to be viewed by admins only?
zappsan
06-21-2008, 03:33 PM
Does this add the date and time of the email changes also? And can it be set to be viewed by admins only?
It shows the date. And yes you can only allow admins to see it in the hack options (vBulletin Options -> Usergroup on Profile Settings)
Boofo
06-21-2008, 04:07 PM
OK, thanks. I'll add the code on my end for the time then.
neto614
06-22-2008, 05:37 AM
Nice Thank You:d
rolfw1
06-22-2008, 03:50 PM
Nice mod, thank you, clicked installed. :)
hubix
07-21-2008, 08:15 AM
Hello!
This Hack is what we need! *thumbup*
Hm, is it possible to make the userlog searchable?
Mrdby
07-21-2008, 09:51 AM
that block didn't show up for me.
Mrdby
07-21-2008, 09:55 AM
uninstalled
BucWiLd
07-21-2008, 09:58 AM
nice feature. thank you
zappsan
07-21-2008, 01:39 PM
Hello!
This Hack is what we need! *thumbup*
Hm, is it possible to make the userlog searchable?
What would you want to search it for?
that block didn't show up for me.
The block won't show up if there is nothing to display (the user never changed their email, their username or never got banned before). If you've got too many tabs you might also find it when clicking the >>, also shown in the screenshot posted here: https://vborg.vbsupport.ru/showpost.php?p=1502799&postcount=22
Charlie98902
07-21-2008, 02:08 PM
So now this is updated to allow only staff to see email changes/banned info etc.....?
zappsan
07-21-2008, 02:22 PM
Yeah as you can see in this screenshot, there are options for it now.
https://vborg.vbsupport.ru/attachment.php?attachmentid=82731&d=1214053204
Charlie98902
07-21-2008, 02:33 PM
Yeah as you can see in this screenshot, there are options for it now.
https://vborg.vbsupport.ru/attachment.php?attachmentid=82731&d=1214053204
Thank you and marked as installed. :D
Mrdby
07-21-2008, 07:08 PM
What would you want to search it for?
The block won't show up if there is nothing to display (the user never changed their email, their username or never got banned before). If you've got too many tabs you might also find it when clicking the >>, also shown in the screenshot posted here: https://vborg.vbsupport.ru/showpost.php?p=1502799&postcount=22
they had a name change. Let me try it again
Mrdby
07-21-2008, 07:11 PM
ok ok..GREAT! thanks!
WishLine
08-17-2008, 09:03 AM
You don't know whether there is a product that does something similar for 3.6, is there?
ssslippy
08-24-2008, 02:18 AM
Can you also show usergroup changes on this, shouldn't be to hard to expand on this as its already being tracked the same as all the other date u are pulling.
Also this fails to display on the profile.
kirkmkiv
09-22-2008, 04:20 PM
I am getting a blank page on profiles when I installed this on 3.7.2 when I have "iTrader Stats in Profile Tabs" plugin also installed.
Hannan
01-09-2009, 05:39 AM
Hi there,
It's showing this error on top up of the users profile, when the config file configured in "mysqli" mode:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in [path]\member.php(462) : eval()'d code on line 40
any suggestion for fixing?
thanks
zappsan
01-12-2009, 01:44 PM
From what I know, using vB's functions should help.
Look for this:
while ($userlogs=mysql_fetch_array($userlogentries))
and replace it with
while ($userlogs=$this->registry->db->fetch_array($userlogentries))
Unfortuneately I couldn't test it.
Sorry for the lack of updates, I actually started working on a newer version a long time ago but ran into a problem which I couldn't solve. I'm gonna ask for help on this so there will hopefully be an update soon.
Megatr0n
01-12-2009, 07:32 PM
From what I know, using vB's functions should help.
Look for this:
while ($userlogs=mysql_fetch_array($userlogentries))
and replace it with
while ($userlogs=$this->registry->db->fetch_array($userlogentries))
Unfortuneately I couldn't test it.
Sorry for the lack of updates, I actually started working on a newer version a long time ago but ran into a problem which I couldn't solve. I'm gonna ask for help on this so there will hopefully be an update soon.
Will the original version work with 3.8?
Hannan
01-12-2009, 07:45 PM
From what I know, using vB's functions should help.
Look for this:
while ($userlogs=mysql_fetch_array($userlogentries))
and replace it with
while ($userlogs=$this->registry->db->fetch_array($userlogentries))
Unfortuneately I couldn't test it.
Sorry for the lack of updates, I actually started working on a newer version a long time ago but ran into a problem which I couldn't solve. I'm gonna ask for help on this so there will hopefully be an update soon.
Thanks, I've waiting for the new version!
HaS?R
01-12-2009, 09:29 PM
Thanks.
gtcompscientist
02-04-2009, 04:27 PM
That last bit fixed it for me!
INSTALLED!
gtcompscientist
02-04-2009, 04:43 PM
I did make one quick change. On our site, banning is kind of an honor... unless it's permanent. As such, the pages get BIG, but all people want to know is how many times somebody has been banned.
This code does that.
Find:
$match=count(array_intersect($membergroup, $banlogpermissions));
Add below:
$banCount=0;
Find:
$banlog.='<li><span class="shade">'.$changetime.':</span> Banned</li>';
Add below:
$banCount=$banCount+1;
Find:
$this->block_data['baninfo'] ="$banlog";
Replace with:
$this->block_data['baninfo']="Banned a total of: $banCount Times<br/><br/>$banlog";
Works great on mine... first user I tested had been banned 41 times! :up::up:
Sadie Frost
02-16-2009, 10:55 PM
You don't know whether there is a product that does something similar for 3.6, is there?
Hi :) This hack might work for you https://vborg.vbsupport.ru/showthread.php?t=101326&highlight=username+change
It's 3.5 but I *think* I was running it on 3.6. There's an addon that displays results on the profile.
In a corollary to that...does anyone know of a way to show the previous usernames in a tooltip on the postbit (when you hovered on the username) like the above linked hack did?
:) Thanks!
MonkYZ
12-28-2009, 09:56 PM
Excelent mod ! 10 out of 10 !
By the way, is there a chance for the old username to be showed in user postbit ? Or somewhere more visible than User Public Profile - User Log ? It would be great if that would be possible.
Thank you in advance and keep up the good work !
MonkYZ
06-15-2011, 02:58 PM
Can this be updated for vB 4.x? :)
TAIFUN_T
07-26-2011, 12:43 PM
Why two identical phrases?
<phrase name="setting_ulog_namechanelogpermissions_title" date="1208816052" username="Virtual Headache" version="1.1"><![CDATA[Namechangelog Usergroup Permissions]]></phrase>
phrase name="setting_ulog_namechangelogpermissions_title" date="1208871522" username="Virtual Headache" version="1.1"><![CDATA[Namechangelog Usergroup Permissions]]></phrase>
Konstantinos
09-02-2011, 02:00 PM
ban reason needed too
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.