[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
neobubu
Registered User
Posts: 1
Joined: Mon Apr 28, 2008 6:53 pm

Re: [BETA] Custom Title MOD

Post by neobubu »

Hey,
After enabling "@define('DEBUG[...]" in config.php, I started getting "PHP Notice" messages when viewing threads with users that had no custom title set. but when I check the profile of these users, the board did not return any error/notice message. I checked if I didn't forget anything when I installed the mod, but everything was done as indicated in the install.xml.

I fixed my problem after looking at a similar code that's in the memberlist.php. there is a "$custom_title = '';" before "if (!empty($data['user_custom_title']))", but there was nothing for the similar code that is in viewtopic.php. so I add " $user_cache[$poster_id]['custom_title'] = ''; " to it and the PHP notice messages disappeared.

Could anyone check as I'm no php guru and I don't want to screw up anything.


viewtopic.php:

Code: Select all

	if (!empty($data['user_custom_title']))
	{
		switch ($config['custom_title_mode'])
		{
			case CUSTOM_TITLE_MODE_INDEPENDENT:
				$custom_title = $data['user_custom_title'];
				break;
			case CUSTOM_TITLE_MODE_REPLACE_RANK:
				$rank_title = $data['user_custom_title'];
				break;
			case CUSTOM_TITLE_MODE_REPLACE_BOTH:
				$rank_title = $data['user_custom_title'];
				$rank_image = '';
				$rank_image_src = '';
				break;
			default:
				break;
		}
	}
Now it looks like this ->

Code: Select all

         $user_cache[$poster_id]['custom_title'] = '';
			if (!empty($row['user_custom_title']))
			{
				switch ($config['custom_title_mode'])
				{
					case CUSTOM_TITLE_MODE_INDEPENDENT:
						$user_cache[$poster_id]['custom_title'] = $row['user_custom_title'];
						break;
					case CUSTOM_TITLE_MODE_REPLACE_RANK:
						$user_cache[$poster_id]['rank_title'] = $row['user_custom_title'];
						break;
					case CUSTOM_TITLE_MODE_REPLACE_BOTH:
						$user_cache[$poster_id]['rank_title'] = $row['user_custom_title'];
						$user_cache[$poster_id]['rank_image'] = '';
						$user_cache[$poster_id]['rank_image_src'] = '';
						break;
					default: 
						break;
				} 
			}
That's the error I was getting when viewing a thread with a user that had no Custom Title set:
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1418: Undefined index: custom_title
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1418: Undefined index: custom_title
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1418: Undefined index: custom_title
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3526: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2956)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3528: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2956)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3529: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2956)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3530: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2956)
Thanks =)
Last edited by neobubu on Tue Sep 02, 2008 9:43 am, edited 1 time in total.

Aexoden
Registered User
Posts: 364
Joined: Mon Jan 14, 2002 1:18 am
Location: Medical Lake, WA
Name: Jason Lynch
Contact:

Re: [BETA] Custom Title MOD

Post by Aexoden »

stradivuckos wrote:Okay after doing some modifications... This happened.
I can only change custom title via ACP and now it doesn't show in UCP but now it shows on every topic post etc. So what is the source of this problem (which means templates aren't a problem anymore :D)
EDIT: If i fix this can others see custom title in my profile?
Well, if it shows up on posts but not on your profile and not in the UCP, then the only files that can really have an impact are the two template files for the profile and UCP (memberlist_view.html and ucp_profile_profile_info.html), and then the relevant .php files. Since it occurs in two places and works on the viewtopic page, though, I'm inclined to still look at a template issue.

chicken dippa
Registered User
Posts: 108
Joined: Sun Apr 22, 2007 2:14 am

Re: [BETA] Custom Title MOD

Post by chicken dippa »

I installed thsi modification some time back now & everything works great.

I was wondering if you would include or even tell me the edits to enable the custom ranks to have BB coding ?

Thanks

MydnyteSyn
Registered User
Posts: 383
Joined: Sun Oct 07, 2007 10:02 am

Re: [BETA] Custom Title MOD

Post by MydnyteSyn »

I installed this on a 3.0.1 test forum I've been working on. I'm getting an error:
Parse error: syntax error, unexpected T_DOUBLE_ARROW, expecting ')' in /home/xxxxxx/public_html/xxxxxx/includes/acp/info/acp_board.php on line 30
But, when I look at the edit that was to be made in this file, it's done according to the instructions. I was very careful when I installed this and I'm positive I've done the edits as instructed. I've included the file below.

Code: Select all

<?php
/**
*
* @package acp
* @version $Id: acp_board.php 8479 2008-03-29 00:22:48Z naderman $
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @package module_install
*/
class acp_board_info
{
	function module()
	{
		return array(
			'filename'	=> 'acp_board',
			'title'		=> 'ACP_BOARD_MANAGEMENT',
			'version'	=> '1.0.0',
			'modes'		=> array(
				'settings'		=> array('title' => 'ACP_BOARD_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
				'features'		=> array('title' => 'ACP_BOARD_FEATURES', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
				'avatar'		=> array('title' => 'ACP_AVATAR_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
				'message'		=> array('title' => 'ACP_MESSAGE_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION', 'ACP_MESSAGES')),
				'post'			=> array('title' => 'ACP_POST_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
				'signature'		=> array('title' => 'ACP_SIGNATURE_SETTINGS', 'auth' => 

				'custom_title'	        => array('title' => 'ACP_CUSTOM_TITLE_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),


'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
				'registration'	=> array('title' => 'ACP_REGISTER_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),

				'auth'		=> array('title' => 'ACP_AUTH_SETTINGS', 'auth' => 'acl_a_server', 'cat' => array('ACP_CLIENT_COMMUNICATION')),
				'email'		=> array('title' => 'ACP_EMAIL_SETTINGS', 'auth' => 'acl_a_server', 'cat' => array('ACP_CLIENT_COMMUNICATION')),

				'cookie'	=> array('title' => 'ACP_COOKIE_SETTINGS', 'auth' => 'acl_a_server', 'cat' => array('ACP_SERVER_CONFIGURATION')),
				'server'	=> array('title' => 'ACP_SERVER_SETTINGS', 'auth' => 'acl_a_server', 'cat' => array('ACP_SERVER_CONFIGURATION')),
				'security'	=> array('title' => 'ACP_SECURITY_SETTINGS', 'auth' => 'acl_a_server', 'cat' => array('ACP_SERVER_CONFIGURATION')),
				'load'		=> array('title' => 'ACP_LOAD_SETTINGS', 'auth' => 'acl_a_server', 'cat' => array('ACP_SERVER_CONFIGURATION')),
			),
		);
	}

	function install()
	{
	}

	function uninstall()
	{
	}
}

?>
Any help in correcting this so I can see if it works with my 3.0.1 would be much appreciated :)

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 »

It looks like you missed the AFTER ADD location ever so slightly,
the code you posted

Code: Select all

            'signature'      => array('title' => 'ACP_SIGNATURE_SETTINGS', 'auth' => 
            'custom_title'           => array('title' => 'ACP_CUSTOM_TITLE_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
            'registration'   => array('title' => 'ACP_REGISTER_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
what it should look like.

Code: Select all

            'signature'      => array('title' => 'ACP_SIGNATURE_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
            'custom_title'      => array('title' => 'ACP_CUSTOM_TITLE_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
            'registration'      => array('title' => 'ACP_REGISTER_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),

MydnyteSyn
Registered User
Posts: 383
Joined: Sun Oct 07, 2007 10:02 am

Re: [BETA] Custom Title MOD

Post by MydnyteSyn »

:o thank you so much!

User avatar
Jaymie1989
Registered User
Posts: 1991
Joined: Thu Aug 02, 2007 5:21 pm
Name: Jaymie

Re: [BETA] Custom Title MOD

Post by Jaymie1989 »

Hey,

I ran the SQL entry but i get this error when i fill in the fields on the ACP
SQL ERROR [ mysqli ]

Duplicate entry 'custom_title_mode' for key 1 [1062]

SQL

INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('custom_title_mode', 0, 0)

BACKTRACE

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

FILE: includes/functions.php
LINE: 156
CALL: dbal_mysqli->sql_query()

FILE: includes/acp/acp_board.php
LINE: 428
CALL: set_config()

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

FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()
Dear creators of Sesame Street,
Kids are still fat. Can I come back now?
Sincerely, Cookie Monster.

View my MODs - Need phpBB help with MODs and Styles? Take a look at my phpBB3 services

naushadhassam
Registered User
Posts: 506
Joined: Wed Aug 15, 2007 9:57 pm
Contact:

Re: [BETA] Custom Title MOD

Post by naushadhassam »

great stuff :D
Free Hosting - Here
Sports Entertainment Online ( A PS3 Online Gaming Community ) - Here
FREE UNLIMITED HOSTING FOR PHPBB MOD MAKERS - PM ME FOR MORE INFO ( MY WAY ON DONATING TO PHPBB )

Danaldinho
Registered User
Posts: 675
Joined: Sat Aug 11, 2007 8:43 pm

Re: [BETA] Custom Title MOD

Post by Danaldinho »

Anyone got any screenshots of this :?:

Boubear
Registered User
Posts: 43
Joined: Tue Mar 18, 2008 12:26 am

Re: [BETA] Custom Title MOD

Post by Boubear »

I've installed the mod and did all edits, and purges and refresh. But when I go on ACP and click on "custom title setting" I get this error:
General Error
No mode specified.
I don't understand what to do now!!

Please help!!

mreider
Registered User
Posts: 98
Joined: Fri Sep 19, 2003 9:30 pm

Re: [BETA] Custom Title MOD

Post by mreider »

Installed and working fine...How do I go about importing the titles from my phpbb2 database?

net83it
Registered User
Posts: 500
Joined: Sun Jan 15, 2006 2:42 pm
Location: Sicily
Contact:

Re: [BETA] Custom Title MOD

Post by net83it »

mreider wrote:Installed and working fine...How do I go about importing the titles from my phpbb2 database?
i'm also very interest about this question

Aexoden
Registered User
Posts: 364
Joined: Mon Jan 14, 2002 1:18 am
Location: Medical Lake, WA
Name: Jason Lynch
Contact:

Re: [BETA] Custom Title MOD

Post by Aexoden »

Assuming the user ids have remained the same, it's a simple matter of transferring the data from the user_custom_title field to the new user table. However, it'd probably take some sort of script to do it. Basically, for each entry in the old user table, SELECT the user_custom_title, and then for the same user id (or username if you want to match that way instead), UPDATE user_custom_title to that value.

Of course, if you don't know PHP or SQL, writing such a script would be more than trivial. The best way would be for it to have been transferred by the convertor, but I don't believe it transfers unknown fields.

BioLogIn
Registered User
Posts: 172
Joined: Sun Jan 06, 2008 10:51 am

Re: [BETA] Custom Title MOD

Post by BioLogIn »

Aexoden
Any news so far on possible beta 2 release?
Still yearning for patch that will add custom titles to outgoing PMs...

Aexoden
Registered User
Posts: 364
Joined: Mon Jan 14, 2002 1:18 am
Location: Medical Lake, WA
Name: Jason Lynch
Contact:

Re: [BETA] Custom Title MOD

Post by Aexoden »

BioLogIn wrote:Aexoden
Any news so far on possible beta 2 release?
Still yearning for patch that will add custom titles to outgoing PMs...
I was waiting for the new version of MODX to be released before getting anything going on it. It looks like that's happened now, though, so I'll try to work on something in the next week or two, but no promises. As always, anyone else is free to step forward and finish the work.

Locked

Return to “[3.0.x] Abandoned MODs”