Custom User Title

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Suggested Hosts
User avatar
ssl
Registered User
Posts: 1805
Joined: Sat Feb 08, 2020 2:15 pm
Location: Le Lude, Pays de la Loire - France
Name: Fred Rimbert

Re: Custom User Title

Post by ssl »

What do you mean by "substitute the default level"?
Sorry for my English ... I do my best!

phpBB: 3.3.12 | PHP: 8.3.7
[Kill spam on phpBB] - [Some French translation of extensions]
"Mistress, Mistress someone is bothering me in pm"
Lord Phobos
Registered User
Posts: 923
Joined: Tue May 18, 2004 11:41 pm

Re: Custom User Title

Post by Lord Phobos »

In this extension, you would be able to select to show the custom user title over the default usertitle, below the default usertitle, or INSTEAD of the default usertitle.
User avatar
ssl
Registered User
Posts: 1805
Joined: Sat Feb 08, 2020 2:15 pm
Location: Le Lude, Pays de la Loire - France
Name: Fred Rimbert

Re: Custom User Title

Post by ssl »

If you are looking to replace the rank of users with more than 500 messages you must use the Auto Groups extension which warmweer talks about here: viewtopic.php?p=15903721#p15903721

You must create a group, create a rank and dedicate this rank to the new group.
Sorry for my English ... I do my best!

phpBB: 3.3.12 | PHP: 8.3.7
[Kill spam on phpBB] - [Some French translation of extensions]
"Mistress, Mistress someone is bothering me in pm"
Lord Phobos
Registered User
Posts: 923
Joined: Tue May 18, 2004 11:41 pm

Re: Custom User Title

Post by Lord Phobos »

But it has a delay.
Lord Phobos
Registered User
Posts: 923
Joined: Tue May 18, 2004 11:41 pm

Re: Custom User Title

Post by Lord Phobos »

I solved changing in ext/imkingdavid/customusertitle/migrations/v10x/m2_initial_data.php:

From

Code: Select all

	public function update_data()
	{
		return [
			['permission.add', ['u_user_custom_title']],

			// 0 = before rank, 1 = replaces rank, 2 = after rank
			['config.add', ['customusertitle_location', 0]],
		];
	}
To

Code: Select all

	public function update_data()
	{
		return [
			['permission.add', ['u_user_custom_title']],

			// 0 = before rank, 1 = replaces rank, 2 = after rank
			['config.add', ['customusertitle_location', 1]],
		];
	}
Then installing the extension.
Now the default value is "replace existing title", as I wished to be.
There is no configuration in ACP, but now it works as I intended.
Lord Phobos
Registered User
Posts: 923
Joined: Tue May 18, 2004 11:41 pm

Re: Custom User Title

Post by Lord Phobos »

Now, testing it, I noticed there's no limit to the lenght of the title, so I can have something like that:

Image

How can I put a limit to this custom user title?

If I change this:

Code: Select all

 * Initial schema changes needed for Extension installation
 */
class m1_initial_schema extends \phpbb\db\migration\migration
{
	/**
	 * @inheritdoc
	 */
	public function update_schema()
	{
		return [
			'add_columns'        => [
				$this->table_prefix . 'users'        => [
					'user_custom_title'    => ['VCHAR:255', ''],
				],
			],
		];
	}
Modifying the value VCHAR, I can set the number of maximum characters?

Thanks.
Lord Phobos
Registered User
Posts: 923
Joined: Tue May 18, 2004 11:41 pm

Re: Custom User Title

Post by Lord Phobos »

(yes, I did and it worked)
Lord Phobos
Registered User
Posts: 923
Joined: Tue May 18, 2004 11:41 pm

Re: Custom User Title

Post by Lord Phobos »

Sorry to bump again, but I've got an (I hope) easy to fix problem.

In italian, we have all those funny accented characters like è, ù, à, etc.

The field for the custom user title refuses such characters.
How can I correct this behaviour?

Thanks.
User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3567
Joined: Wed Oct 27, 2004 11:35 pm
Name: William

Re: Custom User Title

Post by bonelifer »

Not sure if this extension is complete, but it might be able to give you some ideas: https://github.com/Tatiana5/nonlatinlettersinmemberlist
William Jacoby - Community Team
Knowledge Base | phpBB Board Rules | Search Customisation Database
Please don't contact me via PM or email for phpBB support .

phpBB Modders is looking for developers! If you have phpBB experience and want to join us, click here!
Lord Phobos
Registered User
Posts: 923
Joined: Tue May 18, 2004 11:41 pm

Re: Custom User Title

Post by Lord Phobos »

What is strange is that username is a field, location is a field.
They both accept accented characters like "è".
Custom user title does not accept them.

In the db is like that:

Code: Select all

	varchar(35)	utf8_bin
I don't see the problem.

Return to “Extension Requests”