Name: hook_username_string
Rationale: This hook will allow someone to overwrite the get_username_string function
Placement: includes/functions_display.php
Input arguments: $mode, $user_id, $username, $username_colour, $guest_username, $custom_profile_url (get_username_string clone)
Output format: string
Output semantics: Returns what get_username_string returns.
Infrastructure: This would allow people to generate things such as username prefixes, pretty viewprofile urls, different viewprofile urls, and other custom effects on the username as it is displayed.
[RFC|Implemented] get_username_string hook
- 3Di
- Registered User
- Posts: 951
- Joined: Tue Nov 01, 2005 9:50 pm
- Location: Milano 🇮🇹 Frankfurt 🇩🇪
- Contact:
Re: [RFC] get_username_string hook
I would add also the user_ip thinghy here. 
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
Re: [RFC] get_username_string hook
The hook would essentially act as a full replacement for the get_username_string() function. The User IP is not used for it.
- 3Di
- Registered User
- Posts: 951
- Joined: Tue Nov 01, 2005 9:50 pm
- Location: Milano 🇮🇹 Frankfurt 🇩🇪
- Contact:
Re: [RFC] get_username_string hook
It does not harm to have it, I can use it.SyntaxError90 wrote:The hook would essentially act as a full replacement for the get_username_string() function. The User IP is not used for it.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
- 3Di
- Registered User
- Posts: 951
- Joined: Tue Nov 01, 2005 9:50 pm
- Location: Milano 🇮🇹 Frankfurt 🇩🇪
- Contact:
Re: [RFC] get_username_string hook
At the end of all, anyway I mean, I could use that proposed hook ( that's a good idea IMHO ) just forking it or whatever and blah blah, adding whatever I like (hopefully). I do not see where the problem is .. so, adding the IP?
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
- imkingdavid
- Registered User
- Posts: 1050
- Joined: Thu Jul 30, 2009 12:06 pm
Re: [RFC] get_username_string hook
I added the event: core.alter_username_string
This will let you take the output generated by get_username_string and modify as needed, or even completely overwrite that.
This has not yet been added to the core. To see the changes made, you can view the following: https://github.com/imkingdavid/phpbb3/c ... 576570acaa
This will let you take the output generated by get_username_string and modify as needed, or even completely overwrite that.
This has not yet been added to the core. To see the changes made, you can view the following: https://github.com/imkingdavid/phpbb3/c ... 576570acaa
User IP is not provided to the get_username_string function, so it is not available to the event.3Di wrote:I would add also the user_ip thinghy here.
- nickvergessen
- Former Team Member
- Posts: 733
- Joined: Sun Oct 07, 2007 11:54 am
- Location: Stuttgart, Germany
- Contact:
Re: [RFC] get_username_string hook
should be "modify" instead of "alter" as we used that several times
Member of the Development-Team — No Support via PM
- imkingdavid
- Registered User
- Posts: 1050
- Joined: Thu Jul 30, 2009 12:06 pm
Re: [RFC] get_username_string hook
This has been merged.