vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Profile Enhancements - Userlog on profile - Display namechanges,bans and email changes (https://vborg.vbsupport.ru/showthread.php?t=176655)

zappsan 04-18-2008 10:00 PM

Userlog on profile - Display namechanges,bans and email changes
 
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

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

Quote:

Originally Posted by hornstar1337 (Post 1495000)
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

Quote:

Originally Posted by m-tuning (Post 1494983)
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 :)
Quote:

Originally Posted by hornstar1337 (Post 1495000)
Thanks, just wondering who will have permission to view the ban logs tho? can you set that for only staff?

Quote:

Originally Posted by m-tuning (Post 1495048)
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:


Code:

<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

Code:

<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
Code:

<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

Quote:

Originally Posted by m-tuning (Post 1495594)
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

Quote:

Originally Posted by Noonster (Post 1502621)
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

Quote:

Originally Posted by Boofo (Post 1502688)
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 (Post 1502768)
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 (Post 1502862)
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:

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

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!
Quote:

Originally Posted by J105C (Post 1538631)
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

Quote:

Originally Posted by Boofo (Post 1555393)
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


All times are GMT. The time now is 11:13 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01493 seconds
  • Memory Usage 1,819KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete