3.1 & 3.2 & 3.3 Extensions Database 3.1 / 3.2Special title

<span class="qte-attr qte_31_32-qte">3.1.x &amp; 3.2.x</span>
User avatar

playgoods
Users
Users
Posts: 40
Joined: 06 Oct 2015, 08:45
    Windows XP Chrome

Re: Special title

Post by playgoods »

Yes I also have the username image extension enabled but I'm not using any images at the moment

User avatar

Topic Author
dmzx
Founder
Founder
Posts: 6485
Joined: 13 Jan 2014, 21:45
    Windows 8 Firefox

Re: Special title

Post by dmzx »

playgoods wrote:Yes I also have the username image extension enabled but I'm not using any images at the moment
See viewtopic.php?p=4298#p4298

User avatar

playgoods
Users
Users
Posts: 40
Joined: 06 Oct 2015, 08:45
    Windows 10 Chrome

Re: Special title

Post by playgoods »

Is it possible that only admins can assign special titles to registered users but registered users cannot assign their own titles?

User avatar

Topic Author
dmzx
Founder
Founder
Posts: 6485
Joined: 13 Jan 2014, 21:45
    Windows 8 Firefox

Re: Special title

Post by dmzx »

playgoods wrote:Is it possible that only admins can assign special titles to registered users but registered users cannot assign their own titles?

Yes in ACP under profile from the username you can fill it as admin.

User avatar

playgoods
Users
Users
Posts: 40
Joined: 06 Oct 2015, 08:45
    Windows XP Chrome

Re: Special title

Post by playgoods »

I did that as admin I could edit their profile. But if I have users permissions set that they cannot use special title then it will not show.

I would like to be able to assign special titles to users but I don't want them to be able to set their own

User avatar

Topic Author
dmzx
Founder
Founder
Posts: 6485
Joined: 13 Jan 2014, 21:45
    Windows 8 Firefox

Re: Special title

Post by dmzx »

playgoods wrote:I did that as admin I could edit their profile. But if I have users permissions set that they cannot use special title then it will not show.

I would like to be able to assign special titles to users but I don't want them to be able to set their own
Does your group registered users have a group colour?
The permission is only for the input / colour field to show in UCP so if you add it in ACP as Admin it must show, it depends of above question.

User avatar

playgoods
Users
Users
Posts: 40
Joined: 06 Oct 2015, 08:45
    Windows XP Chrome

Re: Special title

Post by playgoods »

They do not have custom colours but they have ranks set for different amount of posts

User avatar

Topic Author
dmzx
Founder
Founder
Posts: 6485
Joined: 13 Jan 2014, 21:45
    Windows 8 Firefox

Re: Special title

Post by dmzx »

playgoods wrote:They do not have custom colours but they have ranks set for different amount of posts
Can you give that group a default colour to see if it works

User avatar

playgoods
Users
Users
Posts: 40
Joined: 06 Oct 2015, 08:45
    Windows XP Chrome

Re: Special title

Post by playgoods »

Im sorry that was a typing error. They have default colours

User avatar

Topic Author
dmzx
Founder
Founder
Posts: 6485
Joined: 13 Jan 2014, 21:45
    Windows 8 Firefox

Re: Special title

Post by dmzx »

playgoods wrote:Im sorry that was a typing error. They have default colours

NP, PM me test account for your board.

User avatar

Topic Author
dmzx
Founder
Founder
Posts: 6485
Joined: 13 Jan 2014, 21:45
    Windows 8 Firefox

Re: Special title

Post by dmzx »

playgoods wrote:Thanks. Special title works after setting a colour
:thumbup:

User avatar

HeinrichP
Users
Users
Posts: 12
Joined: 13 Oct 2015, 19:09
    Windows 7 Chrome

Re: Special title

Post by HeinrichP »

Nice extention, thanks :thumbup:

User avatar

Zerondar
Users
Users
Posts: 12
Joined: 05 Dec 2015, 13:22
    Windows 10 Firefox

Re: Special title

Post by Zerondar »

Is there a way to change the maximum number of characters allowed for the title?
because it seems that maximum number of characters is 8,
i'd like to be able to set/change the maximum number of characters.


Thanks in advance :)

User avatar

Topic Author
dmzx
Founder
Founder
Posts: 6485
Joined: 13 Jan 2014, 21:45
    Windows 8 Firefox

Re: Special title

Post by dmzx »

Zerondar wrote:is there a way to change the maximum number of characters allowed for the title?
because it seems that maximum number of characters is 8,
i'd like to be able to set/change the maximum number of characters.


Thanks in advance :)
Yes it can be done but you need to edit some files:
Migration
adm/style
styles/prosilver
Listener

Search for 8 and adjust :wink:
And reinstall

User avatar

Zerondar
Users
Users
Posts: 12
Joined: 05 Dec 2015, 13:22
    Windows 10 Firefox

Re: Special title

Post by Zerondar »

Thank you :)


found:
dmzx/specialtitle/migrations/specialtitle_schema.php
public function update_schema()
{
return array(
'add_columns' => array(
$this->table_prefix . 'users' => array(
'user_special_title' => array('VCHAR:8, ''),
'user_special_title_colour' => array('VCHAR:6', '008000'),
-

dmzx/specialtitle/styles/prosilver/template/event/ucp_profile_profile_info_before.html
<!-- IF USE_SPECIALTITLE -->
<!-- INCLUDEJS @dmzx_specialtitle/jscolor/jscolor.js -->
<dl>
<dt><label for="user_special_title">{L_SPECIAL_TITLE}{L_COLON}</label><br /><span>{L_SPECIAL_TITLE_EXPLAIN}</span></dt>
<dd><input name="user_special_title" type="text" id="user_special_title" value="{SPECIAL_TITLE}" size="8" maxlength="8" class="inputbox autowidth" /></dd>

dmzx/specialtitle/adm/style/event/acp_users_profile_after.html
<dt><label for="user_special_title">{L_SPECIAL_TITLE}{L_COLON}</label><br /><span>{L_SPECIAL_TITLE_EXPLAIN}</span></dt>
<dd><input name="user_special_title" type="text" id="user_special_title" value="{SPECIAL_TITLE}" size="8" maxlength="8" class="inputbox autowidth" /></dd>


but that gave me an error

Code: Select all

SQL ERROR [ mysql4 ]

Data too long for column 'user_special_title' at row 1 [1406]

SQL

UPDATE phpbb_users SET user_jabber = '', user_birthday = '26- 7-1998', user_special_title = 'Guineapig', user_special_title_colour = '008000' WHERE user_id = 48

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysql.php
LINE: 181
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysql->sql_query()

FILE: [ROOT]/includes/acp/acp_users.php
LINE: 1453
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/includes/functions_module.php
LINE: 674
CALL: acp_users->main()

FILE: [ROOT]/adm/index.php
LINE: 81
CALL: p_master->load_active()
will look into it further :)
Last edited by Zerondar on 13 Dec 2015, 19:53, edited 1 time in total.

Post Reply Previous topicNext topic