[ABD] Custom Title MOD

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
User avatar
muggins
Registered User
Posts: 1183
Joined: Fri Feb 22, 2008 5:12 pm
Location: Texas
Name: Donovan
Contact:

Re: [BETA] Custom Title MOD

Post by muggins »

I have been looking at this. I am no programmer, but from the w3schools reference on htmlspecialchars_decode(), it takes two arguments, a string, and a mode, like this:

Code: Select all

htmlspecialchars_decode($str, ENT_QUOTES)
With the three modes being:
  • ENT_COMPAT - Default. Decodes only double quotes
  • ENT_QUOTES - Decodes double and single quotes
  • ENT_NOQUOTES - Does not decode any quotes
Could that be the source of the error?

Also, I see no reason why this would work in these circumstances... :cry:
Muggins
User avatar
Gremlinn
Registered User
Posts: 2133
Joined: Mon Aug 04, 2003 12:13 am
Location: Rochester, NY
Name: Nathan

Re: [BETA] Custom Title MOD

Post by Gremlinn »

I would suggest decoding the variable before putting it into the array.

i.e.
$decode_custom_title = htmlspecialchars_decode($data['custom_title']);

Then use $decode_custom_title. I haven't tried this, but, that might solve your problem. And, I don't know if it would require a second argument.
Bound50
Registered User
Posts: 18
Joined: Tue Aug 26, 2008 10:53 am

Re: [BETA] Custom Title MOD

Post by Bound50 »

Hi there

I installed the mod and it gives me this error when I try to set a custom title.

SQL ERROR [ mysqli ]

Unknown column 'CUSTOM_TITLE' in 'field list' [1054]

SQL

UPDATE phpbb_users SET user_icq = '', user_aim = '', user_msnm = '', user_yim = '', user_jabber = '', user_website = '', user_from = '', user_occ = '', user_interests = '', CUSTOM_TITLE = 'Bugger', user_birthday = ' 0- 0- 0' WHERE user_id = 53

BACKTRACE


FILE: includes/db/mysqli.php
LINE: 143
CALL: dbal->sql_error()

FILE: includes/acp/acp_users.php
LINE: 1126
CALL: dbal_mysqli->sql_query()

FILE: includes/functions_module.php
LINE: 471
CALL: acp_users->main()

FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()
User avatar
Ricky_Racer
Registered User
Posts: 609
Joined: Wed Feb 12, 2003 10:02 pm

Re: [BETA] Custom Title MOD

Post by Ricky_Racer »

Did you remember to execute the SQL commands ?

Code: Select all

#
#------[ SQL ]------------------------------------------------
#
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_title_edit', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_title_ignore_reqs', 1);

INSERT INTO phpbb_config (config_name, config_value) VALUES ('custom_title_days', 30);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('custom_title_maxlength', 35);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('custom_title_mode', 0);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('custom_title_posts', 10);

ALTER TABLE phpbb_users ADD COLUMN user_custom_title VARCHAR(255) NOT NULL DEFAULT '' AFTER user_rank;
Fairly certain the, ALTER TABLE phpbb_users ADD COLUMN user_custom_title VARCHAR(255) NOT NULL DEFAULT '' AFTER user_rank; , one is what the error message is barking at. ;)
Bound50
Registered User
Posts: 18
Joined: Tue Aug 26, 2008 10:53 am

Re: [BETA] Custom Title MOD

Post by Bound50 »

Thank you for the answer, I did execute the sql query. But the error remains.
SQL ERROR [ mysqli ]

Unknown column 'CUSTOM_TITLE' in 'field list' [1054]

SQL

UPDATE phpbb_users SET user_icq = '', user_aim = '', user_msnm = '', user_yim = '', user_jabber = '', user_website = '', user_from = '', user_occ = '', user_interests = '', CUSTOM_TITLE = 'Hallo', user_birthday = ' 0- 0- 0' WHERE user_id = 53

BACKTRACE


FILE: includes/db/mysqli.php
LINE: 143
CALL: dbal->sql_error()

FILE: includes/acp/acp_users.php
LINE: 1126
CALL: dbal_mysqli->sql_query()

FILE: includes/functions_module.php
LINE: 471
CALL: acp_users->main()

FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()
User avatar
DragonMaster1
Registered User
Posts: 994
Joined: Tue Aug 17, 2004 11:04 am
Name: Terry
Contact:

Re: [BETA] Custom Title MOD

Post by DragonMaster1 »

wolfman24 wrote:Strange, I cannot see any problem. My line just looks like this

Code: Select all

'CUSTOM_TITLE'				=> $data['custom_title'],
so you may try to remove the htmlspecialchars_decode() and try again. Where did this come from? Do you need it?

I’m not sure what mod added that

I’ll try to locate it and also try removing it and see what happens with this addition
User avatar
Ricky_Racer
Registered User
Posts: 609
Joined: Wed Feb 12, 2003 10:02 pm

Re: [BETA] Custom Title MOD

Post by Ricky_Racer »

I guess a couple more quick questions are in order,
1). Is phpbb_ your database's prefix_ ?
2). Do you have more than one database, if yes, are you sure you executed the commands on the correct database ?
3). Did you remember this edit ?

Code: Select all

#
#------[ OPEN ]-----------------------------------------------
#
includes/constants.php
#
#------[ FIND ]-----------------------------------------------
#
# Tip: This may be a partial find and not the whole line.
#
// Additional constants
#
#------[ AFTER, ADD ]-----------------------------------------
#
# Tip: Add these lines on a new blank line after the preceding line(s) to find.
#
//-- add mod : custom title v.2.0.b2 [Aexoden - http://www.aexoden.com] --------
// Custom Title MOD
define('CUSTOM_TITLE_MODE_INDEPENDENT', 0);
define('CUSTOM_TITLE_MODE_REPLACE_RANK', 1);
define('CUSTOM_TITLE_MODE_REPLACE_BOTH', 2);
//-- end add : custom title v.2.0.b2 [Aexoden - http://www.aexoden.com] --------
User avatar
DragonMaster1
Registered User
Posts: 994
Joined: Tue Aug 17, 2004 11:04 am
Name: Terry
Contact:

Re: [BETA] Custom Title MOD

Post by DragonMaster1 »

1-phpbb is my prefix
2-I have several databases as I use several test boards
3-the closest thing I have to that code is:
// Custom Title MOD
define('CUSTOM_TITLE_MODE_INDEPENDENT', 0);
define('CUSTOM_TITLE_MODE_REPLACE_RANK', 1);
define('CUSTOM_TITLE_MODE_REPLACE_BOTH', 2);
Waffle Slayer
Registered User
Posts: 24
Joined: Wed Jun 04, 2008 5:06 am

Re: [BETA] Custom Title MOD

Post by Waffle Slayer »

I'm having the same problems as a couple people on the board.

I've installed the mod and checked it very carefully three times. I've purged and purged the cache and refreshed the template several times.

I've set the permissions and can set a custom title in the ACP. However, it doesn't show up on the forums and people can't see it in the UCP.

I'm using prosilver and phpbb 3.0.2.

I'm hoping someone had a similar problem was able to figure it out.
User avatar
Ricky_Racer
Registered User
Posts: 609
Joined: Wed Feb 12, 2003 10:02 pm

Re: [BETA] Custom Title MOD

Post by Ricky_Racer »

For DragonMaster1, my questions were more directed towards Bound50, however if you have that defined in your includes/constants.php file, that isn't what is causing your problem.
Now for Waffle Slayer, depending on the values you have set for custom_title_days, custom_title_posts, u_title_edit, and u_title_ignore_reqs, will determine if and/or when the option shows in the UCP, as for it not showing in the forums, memberlist, etc. re-check your file edits.

Back a page or two, I remember seeing some attempts at adding colors, which didn't work, most likely due to the fact that <span class="postdetails"><strong> is overriding any <font color></font> code that those users are trying to use, there may be a way to add some bbcode color options, but I haven't looked into it.

This is one of only a handful of mods for phpBB3 that has went well, (installed & performed as expected), for me.
Waffle Slayer
Registered User
Posts: 24
Joined: Wed Jun 04, 2008 5:06 am

Re: [BETA] Custom Title MOD

Post by Waffle Slayer »

So I have this working...sort of.

As an administrator I can go to my UCP and set my custom title. I've created a test account and set it as a regular admin and it is able to set rank in the UCP. However, as a registered user the test account can't.

I went over my permissions again.

User Roles (Full: https://camo.phpbb.com/0a17eceadefba2513947e63cd0b1c840c702f9dd/687474703a2f2f7777772e6a756767616c6f67616d6572732e636f6d2f7774662f70726f626c656d312e6a7067)
Image

Group Permission Roles (Full: https://camo.phpbb.com/ba9af03af6151e7c0efa843a62cddce5fa34156d/687474703a2f2f7777772e6a756767616c6f67616d6572732e636f6d2f7774662f70726f626c656d322e6a7067)
Image

Viewing Registered User's Roles (Full: https://camo.phpbb.com/44680eedc0f867f83985cca54cd3637f93152902/687474703a2f2f7777772e6a756767616c6f67616d6572732e636f6d2f7774662f70726f626c656d332e6a7067)
Image

Picking a random user (Full: https://camo.phpbb.com/3aeb6abb413d45bf82a5a68d19b8782ec5434c88/687474703a2f2f7777772e6a756767616c6f67616d6572732e636f6d2f7774662f70726f626c656d342e6a7067)
Image

It seems the permissions are right to me. I purge/refresh the caches and the Custom Settings are: Replace Rank Only, 0,0,45.

Well, I found the solution, for me at least. I don't know if the other people with the same error have the Arcade mod installed but that is the problem for me. Since I admins are able to set their rank I went into the registered users group and into the admin permissions and turn everything on. Then I would go back and put NO for an entire section till I found the section responsible. Then I went and tried each one..one by one.

I went to ACP --> Users & Groups --> Groups' Permissions --> Registered Members --> Select Type [Admin permissions] --> Advanced Settings --> phpBB Arcade Tab --> Can alter arcade permission class - YES

Enabling this for me let people see it in the UCP. I was afraid of what they could do in the admin panel since users can see the link to log into it. I logged in with my test account and all it shows you two tabs. 'General' and 'Arcade'. Under General they can only see the basic board statistics and under Arcade they can only see the User Guide. So nothing can be changed.

I can give my files to the anyone who requests if a solution cannot be found out. For now I am just going to edit the overall_footer file and get rid of the link to the admin panel so users don't make a stink about the ability to do nothing in there on the forums.
User avatar
Ricky_Racer
Registered User
Posts: 609
Joined: Wed Feb 12, 2003 10:02 pm

Re: [BETA] Custom Title MOD

Post by Ricky_Racer »

Hi Waffle Slayer, I did notice that my permissions for edit custom title and ignore requirements are under the "Profile" tab and not the "Post" tab.
Waffle Slayer
Registered User
Posts: 24
Joined: Wed Jun 04, 2008 5:06 am

Re: [BETA] Custom Title MOD

Post by Waffle Slayer »

Ricky_Racer wrote:Hi Waffle Slayer, I did notice that my permissions for edit custom title and ignore requirements are under the "Profile" tab and not the "Post" tab.
Aren't they supposed to be under the Profile tab?
User avatar
Ricky_Racer
Registered User
Posts: 609
Joined: Wed Feb 12, 2003 10:02 pm

Re: [BETA] Custom Title MOD

Post by Ricky_Racer »

They are, I must have looked at your screenshot wrong, saw the green dot there on the post tab, and thought that was what I was looking at, not what was under the profile tab. :oops:
ham1299
Registered User
Posts: 613
Joined: Mon Sep 11, 2006 2:12 am
Location: USA
Contact:

Re: [BETA] Custom Title MOD

Post by ham1299 »

I just updated my phpBB to 3.0.4, and now I'm getting an error related to this MOD. When I view a PM that comes from someone without a custom title, I get this:
[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_pm_viewmessage.php on line 179: Undefined index: custom_title
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3827: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3203)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3829: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3203)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3830: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3203)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3831: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3203)
It only happens when it's a PM from someone without a custom title. I haven't run into this error at any other point.
Heather
Locked

Return to “[3.0.x] Abandoned MODs”