vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Username Management - Control who can change Usernames plus history (https://vborg.vbsupport.ru/showthread.php?t=101326)

Marco van Herwaarden 11-21-2005 10:00 PM

Username Management - Control who can change Usernames plus history
 
<font size="4">Username Management - Version 1.04</font>

Hack: Username Management
Version: v1.04
Author: MarcoH64

Description
With this modification installed you can let your members change their own username, or let Staff members change the usernames of other members.

Also a history of previously used names for a member is kept.

Features
- Users can change their own username controlled by Usergroup Permissions. If needed a time limit between changes can be set.
- Staff can change the Username of other members. This is again controlled by Usergroup Permissions.
- Previously used Usernames of a member can be viewed in posts, by hoovering over their Username. This is also controlled by Usergroup settings
- Full searchable history of Username changes in AdminCP
- Fully Phrased
- Optimized for server performance
- Documented API for addon developers

Changelog
23-12-2005 v1.04
- Changed master="true" to false in cpnav file.
- Fixed bug where history was generated when running Update User Names from Update Counters

v1.03
- Changed the size of the 'mh_unm_changelimit' & 'mh_unm_changelimit' columns in the usergroup table
from TINYINT to SMALLINT to support values > 255

23-11-2005 v1.02 (maintenance release)
- Improved internal caching routines
- Added internal routine for retrieving the latest changed usernames
- Coders: Parameter value change for parameter '$overridelimit' in 'mh_unm_fetch_username_history'
This release is needed if you want to use some fo the new Addon's!!
Known issues: Coder documentation not complete, no examples are given, although the 2 released addon's can be used as examples.

22-11-2005 v1.01
- Fixed bug messing up Private Messages (thanks mini2)
- Fixed bug in install routine that would create a wrong tablename if using table prefixes
- Changed the internal caching routines
- Added more parameters to mh_unm_fetch_username_history for more flexibility for Addon coders
- Added extended information mode
- Created first version of the Coders documentation
Known issues: No example code for an Addon Plugin yet.

22-11-2005 v1.00
Initial release

Upgrades
Upload all files from 'upload' folder.
Install the new product file, choosing an overwrite install.

Notes
Copyright ©2005 MarcoH64
This Modification may not be redistributed in whole or significant part or changed without prior agreement of author.
Please don't forget to click Install.
If you like this work and would like to support the author, donations are always welcome at Paypal: Marcoh64 AT gmail.com

Marco van Herwaarden 11-22-2005 09:25 AM

If you are running version 1.00 and have problems viewing your Private Message, please apply the following fix (thanks to mini2 for pointing it out and providing the fix):
Goto AdminCP->Plugin System->Plugin Manager.
Click on Edit behind plugin 'Add Username history to postbit(legacy)'
In the Hook Location dropdown, change 'postbit_display_complete' to 'postbit_factory' (2 lines higher) and Save. All should be fixed now.

Better is to upgrade to 1.01, all known problems have been fixed.

Oblivion Knight 11-22-2005 09:34 AM

Awesome.. This will certainly be useful for my future plans (premium users). :D

plubius 11-22-2005 09:34 AM

this hack rawks. And I got the second post. Yay!

Edit. Dangit I was too slow! :nervous:

Marco van Herwaarden 11-22-2005 10:10 AM

Quote:

Originally Posted by Oblivion Knight
Awesome.. This will certainly be useful for my future plans (premium users). :D

Then please click Install ;)

Snake 11-22-2005 10:49 AM

Awesome. I am definitely going to install this hack for all my premium users too! :) Thanks.

One thing, do you think you can make a mini addon for Previous usernames too? That would be useful so users may notice the user's previous names anytime, just like this forum. http://forums.adventchildren.net/member.php?u=1

Flow Fusion 11-22-2005 11:04 AM

Help...My postbit_legacy

This seems to work even if you don't edit the postbit legacy. But...
And I get this error also...

PHP Code:

WarningInvalid argument supplied for foreach() in /includes/class_bitfield_builder.php on line 200

Warning
Invalid argument supplied for foreach() in /includes/class_bitfield_builder.php on line 200

Warning
Invalid argument supplied for foreach() in /includes/class_bitfield_builder.php on line 200 


Marco van Herwaarden 11-22-2005 11:47 AM

Quote:

Originally Posted by Aftermath
One thing, do you think you can make a mini addon for Previous usernames too? That would be useful so users may notice the user's previous names anytime, just like this forum

You kinda alrady can do this (only the list of old names), but i forgot to add that to the documentation. Will see if i can add this to the documentation today.

PS That would basically just require you to create a new plugin with (almost) the same code as the Postbit plugin, and the same edits to the template.

Marco van Herwaarden 11-22-2005 11:50 AM

Quote:

Originally Posted by Flow Fusion
And I get this error also...

When do you get this error, and what vB version are you using? Did you rebuild the bitfields as instructed? Are all files uploaded (in ASCII) correct?


Quote:

Originally Posted by Flow Fusion
Help...My postbit_legacy

This seems to work even if you don't edit the postbit legacy. But...

Please be clear, does it work or not for you?

MThornback 11-22-2005 12:36 PM

Quote:

Originally Posted by MThornback
Your product script isn't installing the tables...nearly gave me a heart attack :p

it didn't do any of the database edits because you forgot to add $ to the db variable ;)

For some reason, (and I had posted something else before (sorry...but I am still fairly sure that the $ was missing from the db variable ;))

It created the history table without the table prefix as well...thought you'd care to know....


But I installed it anyway and it seems to work fine now :)

Thanks

Marco van Herwaarden 11-22-2005 12:45 PM

Quote:

Originally Posted by MThornback
It created the history table without the table prefix as well...thought you'd care to know....

Thanks for this, I somehow missed the table_prefix on that create statement. Fixed in my copy now, will update zip later today.

Quote:

Originally Posted by MThornback
For some reason, (and I had posted something else before (sorry...but I am still fairly sure that the $ was missing from the db variable )

Could you please be more specific, i couldn't find a missing $ in the install code (or was it somewhere else?)

Quote:

Originally Posted by MThornback
But I installed it anyway and it seems to work fine now

Then please click Install. :D

MThornback 11-22-2005 12:54 PM

Quote:

Originally Posted by MarcoH64
Thanks for this, I somehow missed the table_prefix on that create statement. Fixed in my copy now, will update zip later today.


Could you please be more specific, i couldn't find a missing $ in the install code (or was it somewhere else?)

Then please click Install. :D

I did forget to clickinstall didn't I...whoops :p

all your db variables that you need to write changes to the database were missing their "$" in front of it

ie I changed:

Code:

$vbulletin->db->query_write
                (        "ALTER TABLE " . TABLE_PREFIX . "usergroup ADD column (mh_unm_permissions INT( 10 ) UNSIGNED DEFAULT 0 NOT NULL
                ,        mh_unm_changelimit TINYINT UNSIGNED DEFAULT 30 NOT NULL
                ,        mh_unm_viewhistorylimit TINYINT UNSIGNED DEFAULT 1 NOT NULL
        )"
        );

to

Code:

$vbulletin->$db->query_write
                (        "ALTER TABLE " . TABLE_PREFIX . "usergroup ADD column (mh_unm_permissions INT( 10 ) UNSIGNED DEFAULT 0 NOT NULL
                ,        mh_unm_changelimit TINYINT UNSIGNED DEFAULT 30 NOT NULL
                ,        mh_unm_viewhistorylimit TINYINT UNSIGNED DEFAULT 1 NOT NULL
        )"
        );

and thats the only way it wrote to my tables...

jugo 11-22-2005 12:55 PM

Thank you sir.

Marco van Herwaarden 11-22-2005 01:01 PM

Quote:

Originally Posted by MThornback
all your db variables that you need to write changes to the database were missing their "$" in front of it

There should be no $ in front of 'db', there is already 1 in front of vbulletin ($vbulletin->db->....)

Marco van Herwaarden 11-22-2005 01:08 PM

Quote:

Originally Posted by mini2
OK, I only use legacy, and I've installed this and it seems to work OK, BUT, private messages are screwed. So I'm guessing it's postbit(legacy) related.

Please disable the product, i will find what is causing this and uplaod an update.

Marco van Herwaarden 11-22-2005 01:48 PM

Fix for the Private Message problem posted in Post #2. Thansk to mini2 for finding the problem and also providing a quick fix.

MThornback 11-22-2005 01:56 PM

Quote:

Originally Posted by mini2
Just to let you know, removing the postbit (legacy) template change didn't fix it, but disabling the product did.

*/ edit /*

In fact, I can (of course) leave the product enabled and just disable the plugin for showing it in postbit(legacy) and everything else works swimmingly.

*/ edit again /*

Fixed it, PM sent.....

Turning off the legacy plugin fixed my problem too...

Found something else...

Fatal error: Call to a member function on a non-object in /public_html/forum/includes/class_dm_user.php(1719) : eval()'d code on line 5

when I tried editing via the profile link (changes it...no record to the database though) & when I made an edit to change it back from the AdminCP...same error

a) the .com part isn't included...i'm no expert...so exuse my ignorance when I say "why?" :p
b) class_dm_user.php wasn't in my install package

Marco van Herwaarden 11-22-2005 04:28 PM

Quote:

Originally Posted by MThornback
Fatal error: Call to a member function on a non-object in /public_html/forum/includes/class_dm_user.php(1719) : eval()'d code on line 5

when I tried editing via the profile link (changes it...no record to the database though) & when I made an edit to change it back from the AdminCP...same error

a) the .com part isn't included...i'm no expert...so exuse my ignorance when I say "why?"
b) class_dm_user.php wasn't in my install package

What vB version are you using?
Are you using table prefix?

Marco van Herwaarden 11-22-2005 04:33 PM

New version 1.01 released:

22-11-2005 v1.01
- Fixed bug messing up Private Messages (thanks mini2)
- Fixed bug in install routine that would create a wrong tablename if using table prefixes
- Changed the internal caching routines
- Added more parameters to mh_unm_fetch_username_history for more flexibility for Addon coders
- Added extended information mode
- Created first version of the Coders documentation
Known issues: No example code for an Addon Plugin yet.

dcpaq2xx 11-22-2005 04:35 PM

Quote:

Originally Posted by Aftermath
Awesome. I am definitely going to install this hack for all my premium users too! :) Thanks.

One thing, do you think you can make a mini addon for Previous usernames too? That would be useful so users may notice the user's previous names anytime, just like this forum. http://forums.adventchildren.net/member.php?u=1

Yes, I have to agree as well that that is somewhat similar to what Ebay.com does and had suggested in my original request for this User Name Historty Plugin. It would be great to have it setup something like or exactly like what Aftermath showed us in that link to that users profile. I wouldnt want this feature in the forums, ONLY IN THEIR PROFILE. please keep the "hover effect" like MarcoH64 already has it.

Doug

Zachariah 11-22-2005 04:40 PM

thank you sir.

Marco van Herwaarden 11-22-2005 04:47 PM

Quote:

Originally Posted by Zachariah
Yes, I have to agree as well that that is somewhat similar to what Ebay.com

I actually never looked at ebay, and also didn't really read the suggestions made.

Quote:

Originally Posted by dcpaq2
I wouldnt want this feature in the forums, ONLY IN THEIR PROFILE.

I will post a profile modification like suggested as an Addon Coding Example tomorrow.

This hack can now easily be used in other places by Addon developers, just a few lines of coding in a plugin needed.

Mastar 11-22-2005 06:10 PM

So Is Everything Fixed in this hack now? Really want to install it.

dcpaq2xx 11-22-2005 06:15 PM

Quote:

I will post a profile modification like suggested as an Addon Coding Example tomorrow.
Alright! Excellent Whoo Hoo! Yipee! :banana:

Thank you MarcoH64

Doug

Marco van Herwaarden 11-22-2005 07:50 PM

Quote:

Originally Posted by Mastar
So Is Everything Fixed in this hack now? Really want to install it.

Yes, all known bugs have been fixed, and some extra's added (mostly prepairing for future addons).

jugo 11-22-2005 07:53 PM

I have an issue. After I installed this:

Whenever i try and add a new group or edit an existing group's properties it runs Rebuild Bitfields in a loop.

Tell me that it has nothing to do with this hack so I can move on and explore other causes.

Marco van Herwaarden 11-22-2005 08:13 PM

What version of vB?

Sounds like the same as what Andreas hack was suffering from first. Do you have Signature Limits installed?

Will do some testing.

Marco van Herwaarden 11-22-2005 08:26 PM

Just tested adding a new usergroup to my testboard, and i have no problems running a clean vB3.5.1 with version 1.01 of this hack.

PS Can you change the usergroups, if you disable the Product and temporary remove the ./includes/xml/bitfield_mh_unm.xml

Swindont 11-22-2005 08:29 PM

i love it ;] *installs*

Blam Forumz 11-22-2005 08:58 PM

Thanks, is there an option to display a page of who changed their names?

Marco van Herwaarden 11-22-2005 09:17 PM

Hmm a recent changes list, sounds like a good idea. Expect an update tomorrow to make that possible. Where would you like to see that?

You can now only search in the AdminCP for names and see the list of changes.

Flow Fusion 11-22-2005 09:27 PM

Quote:

Originally Posted by MarcoH64
When do you get this error, and what vB version are you using? Did you rebuild the bitfields as instructed? Are all files uploaded (in ASCII) correct?


Please be clear, does it work or not for you?

I can't edit my postbit like Instructed but, it does work and the rebuild error I'm getting is caused by another hack. Thanks a million. Works perfect. I'm on version 3.5.

Marco van Herwaarden 11-22-2005 09:59 PM

Without th edited postbit all will still work, you just don't see history in postbit.

PS Try with a fresh style, or revert your postbit (will remove all modifications) so you can start fresh.

uae 11-23-2005 03:31 AM

Thanks Marco...

john1744 11-23-2005 04:14 AM

Wow Marco just what I've been looking for. Thank you a ton.

Blam Forumz 11-23-2005 05:46 AM

Quote:

Originally Posted by MarcoH64
Hmm a recent changes list, sounds like a good idea. Expect an update tomorrow to make that possible. Where would you like to see that?

You can now only search in the AdminCP for names and see the list of changes.


If possible, i'd like this to be a seperate page.

And is it also possible to allow certain people to change only one member (of their choice)'s username?

jugo 11-23-2005 03:30 PM

Marco...

It was the signature limits thingy...lol.

Funny thing is that it never reared it's head until i installed this..so i disabled it for now (The sig limits) until I can get it sorted.

Thanks.

Marco van Herwaarden 11-23-2005 03:43 PM

I think Andreas already posted a fix in his hack thread.

Marco van Herwaarden 11-23-2005 03:44 PM

Version 1.02 released:

23-11-2005 v1.02 (maintenance release)
- Improved internal caching routines
- Added internal routine for retrieving the latest changed usernames
- Coders: Parameter value change for parameter '$overridelimit' in 'mh_unm_fetch_username_history'

2 new Addon's are released:
Username Management Addon - History in Profile
Username Management Addon - Latest Username Changes on Forum

wacodep 11-23-2005 05:45 PM

Clicks install.


All times are GMT. The time now is 06:32 AM.

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.02651 seconds
  • Memory Usage 1,850KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (20)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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