[MOD DB][2.0.6-2.0.4] Profile Control Panel v 2.0.0

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
User avatar
zenpig
Registered User
Posts: 642
Joined: Wed Aug 07, 2002 10:58 pm

Post by zenpig » Sun Oct 19, 2003 3:37 am

beautiful :)
Beer's proof that God loves us and wants us to be happy.

User avatar
Dio2
Registered User
Posts: 94
Joined: Sun Jun 15, 2003 5:02 pm

Post by Dio2 » Sun Oct 19, 2003 5:00 am

Ptirhiik - RPGnet-fr wrote: PM button missing :


thanks :D

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Sun Oct 19, 2003 3:49 pm

Cleaning empty definition in user_maps preventing standard field definition to work :

Code: Select all

#
#-----[ OPEN ]------------------------------------------------
#
# 2003-10-19-03 : Cleaning empty definition in user_maps preventing standard field definition to work
#
includes/functions_admin_pcp.php
#
#-----[ FIND ]------------------------------------------------
#
 *	version				: v 1.0.0 - 18/10/2003
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
 *	version				: v 1.0.1 - 19/10/2003
#
#-----[ FIND ]------------------------------------------------
#
					if ( ($def_key != 'field_name') && ($field_data[$def_key] != $user_fields[$field_name][$def_key]) )
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
					if ( ($def_key != 'field_name') && ($field_data[$def_key] != $user_fields[$field_name][$def_key]) && ( !empty($field_data[$def_key]) || ( empty($field_data[$def_key]) && !is_string($field_data[$def_key]) && ($field_data[$def_key] == "0") ) ) )
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM

After the installation of this fix, go to Admin Config Panel, choose "Maps definition", choose any map, hit edit then submit.

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Sun Oct 19, 2003 6:18 pm

Fix \" char in styles values :

Code: Select all

#
#-----[ OPEN ]------------------------------------------------
#
# 2003-10-19-04 : Fix \" char in values
#
includes/functions_admin_pcp.php
#
#-----[ FIND ]------------------------------------------------
#
 *	version				: v 1.0.1 - 19/10/2003
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
 *	version				: v 1.0.2 - 19/10/2003
#
#-----[ FIND ]------------------------------------------------
#
					'VALUE'	=> sprintf($pres, str_replace( "''", "\'", $data)),
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
					'VALUE'	=> sprintf($pres, str_replace( "''", "\'", str_replace('\"', '"', $data))),
#
#-----[ FIND ]------------------------------------------------
#
							$value = sprintf( "'%s'", str_replace("''", "\'", $value) );
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
							$value = sprintf( "'%s'", str_replace("''", "\'", str_replace('\"', '"', $value)) );
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Sun Oct 19, 2003 6:28 pm

Fix a pagination field name issue :

Code: Select all

#
#-----[ OPEN ]------------------------------------------------
#
# 2003-10-19-05 : fix a pagination field name issue
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------------
#
			$page_string = ' <a href="' . append_sid($base_url . "&_amp;start=" . ( ( $on_page - 2 ) * $per_page ) ) . '">' . $lang['Previous'] . '</a>&_nbsp;&_nbsp;' . $page_string;
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
			$page_string = ' <a href="' . append_sid($base_url . "&_amp;$start_field=" . ( ( $on_page - 2 ) * $per_page ) ) . '">' . $lang['Previous'] . '</a>&_nbsp;&_nbsp;' . $page_string;
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM

Caution : this board is not uptodate and has the & nbsp; replacement bug still present. So please consider removing all _ in &_nbsp; and &_amp;.

g-funk
Registered User
Posts: 34
Joined: Tue Sep 09, 2003 5:58 pm

Post by g-funk » Sun Oct 19, 2003 6:45 pm

Hi.
in def_userfuncs_std.php the case 2 of user_gender output function
is wrong.
it says
$res = '<img... (line 501)

it shoud say
$img = '<img ...

Cya
G-Funk

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Sun Oct 19, 2003 6:51 pm

Well seen :). So here is the fix :

Code: Select all

#
#-----[ OPEN ]------------------------------------------------
#
# 2003-10-19-06 : female icon when present doesn't display
#
profilcp/def/def_userfuncs_std.php
#
#-----[ FIND ]------------------------------------------------
#
 *	version				: 1.0.0 - 07/10/2003
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
 *	version				: 1.0.1 - 19/10/2003
#
#-----[ FIND ]------------------------------------------------
#
				$res = '<img src="' . $images['Female'] . '" border="0" alt="' . $lang['Female'] . '" title="' . $lang['Female'] . '" />';
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
				$img = '<img src="' . $images['Female'] . '" border="0" alt="' . $lang['Female'] . '" title="' . $lang['Female'] . '" />';
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Sun Oct 19, 2003 9:02 pm

I have started to write some documentation and tutos here.

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Mon Oct 20, 2003 12:47 am

ORDER BY statement not called back from tables linked def :

Code: Select all

#
#-----[ OPEN ]------------------------------------------------
#
# 2003-10-19-07 : order by statement not called back from tables linked def
#
admin/admin_pcp_tableslinked.php
#
#-----[ FIND ]------------------------------------------------
#
 *	version				: v 0.0.1 - 11/10/2003
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
 *	version				: v 1.0.0 - 20/10/2003
#
#-----[ FIND ]------------------------------------------------
#
	$sql_order	= isset($tables[$table]['sql_join']) ? str_replace("\n", ' ', str_replace("\r", '', str_replace("\t", '', $tables[$table]['sql_where']))) : '';
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
	$sql_order	= isset($tables[$table]['sql_order']) ? str_replace("\n", ' ', str_replace("\r", '', str_replace("\t", '', $tables[$table]['sql_order']))) : '';
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM

User avatar
Dio2
Registered User
Posts: 94
Joined: Sun Jun 15, 2003 5:02 pm

Post by Dio2 » Mon Oct 20, 2003 2:57 am

Ptirhiik, I know you have alot on your plate but could you look at this

http://www.phpbb.com/phpBB/viewtopic.php?t=111276

I did have one like this working, but I think something in the PCP code changed the was data is read for the PM system.

Is there away this could be added into PCP - I really am not worried about the message part, I would just like to know who the PM is from.

Thanks :D

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Mon Oct 20, 2003 3:18 am

Well, of course it is possible, but I can see a major error in the logical of this mod, but I may be wrong : what if you receive pms from many users ? I don't see neither what the message part brings there, as replacing the reply button with the quote button will do the job in a more convenient way.

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Mon Oct 20, 2003 4:36 am

Not really a fix, but a better algorythm in the SQL tables parsing process, making it more understable, so cleaner :

Code: Select all

#
#-----[ OPEN ]------------------------------------------------
#
# 2003-10-20-01 : improvement of the SQL tables parsing process
#
profilcp/profilcp_buddy.php
#
#-----[ FIND ]------------------------------------------------
#
 *	version			: 1.2.0 - 17/10/2003
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
 *	version			: 1.2.1 - 20/10/2003
#
#-----[ FIND ]------------------------------------------------
#
	$done = false;
#
#-----[ BEFORE, ADD ]-----------------------------------------
#

	// prepare the table processed
	$tables_processed = array();
	$tables_processed[] = 'USERS';
#
#-----[ FIND ]------------------------------------------------
#
			if ( ($table_name != 'USERS') && $used )
			{
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
			if ( !in_array($table_name, $tables_processed) )
			{
				$tables_processed[] = $table_name;
#
#-----[ FIND ]------------------------------------------------
#
		$new_tables_used = array();
		$sql_tables = pcp_parse_def( $sql_tables, $view_userdata, $new_tables_used );

		// if no new tables
		$done = ( count($new_tables_used) == count($tables_used) );
		if ( !$done )
		{
			$tables_used = array();
			$tables_used = $new_tables_used;
		}
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
		$sql_tables = pcp_parse_def( $sql_tables, $view_userdata, $tables_used );

		// check if any unprocessed table remains
		$done = true;
		@reset($tables_used);
		while ( list($table_name, $used) = @each($tables_used) )
		{
			$done = in_array($table_name, $tables_processed);
			if ( !$done )
			{
				break;
			}
		}
#
#-----[ OPEN ]------------------------------------------------
#
profilcp/def/def_userfuncs.php
#
#-----[ FIND ]------------------------------------------------
#
 *	version				: 1.0.2 - 18/10/2003
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
 *	version				: 1.0.3 - 20/10/2003
#
#-----[ FIND ]------------------------------------------------
#
		$all_done = false;
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
		$tables_processed = array();
		$tables_processed[] = $w['main'];
#
#-----[ FIND ]------------------------------------------------
#
				if ( ($table_name != $w['main']) && $used )
				{
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
				if ( !in_array($table_name, $tables_processed) )
				{
					$tables_processed[] = $table_name;
#
#-----[ FIND ]------------------------------------------------
#
			// Are we introduced new tables ?
			$new_tables_used = array();

			// parse the tables and the where statement
			$sql_tables = pcp_parse_def( $sql_tables, $userdata, $new_tables_used );
			$sql_where = pcp_parse_def( $sql_where, $userdata, $new_tables_used );

			// if no new tables
			$all_done = ( count($new_tables_used) == count($tables_used) );
			$tables_used = $new_tables_used;
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
			// parse the tables and the where statement
			$sql_tables = pcp_parse_def( $sql_tables, $userdata, $new_tables_used );
			$sql_where = pcp_parse_def( $sql_where, $userdata, $new_tables_used );

			// check if any unprocessed table remains
			$all_done = true;
			@reset($tables_used);
			while ( list($table_name, $used) = @each($tables_used) )
			{
				$all_done = in_array($table_name, $tables_processed);
				if ( !$all_done )
				{
					break;
				}
			}
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Mon Oct 20, 2003 7:21 am

Another enhancement : add a suggest button in the maps management for the option address :

Code: Select all

#
#-----[ OPEN ]------------------------------------------------
#
# 2003-10-20-02 : add a suggest button for the option adress field
#
admin/admin_pcp_usermaps.php
#
#-----[ FIND ]------------------------------------------------
#
 *	version				: v 1.0.0 - 18/10/2003
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
 *	version				: v 1.0.1 - 20/10/2003
#
#-----[ FIND ]------------------------------------------------
#
			$field_det['type'] = 'VARCHAR';
		}
#
#-----[ AFTER, ADD ]------------------------------------------
#

		// suggest an Option address
		if ( isset($HTTP_POST_VARS['suggest']) && empty($field_det['ind']) )
		{
			$last_ind = 0;
			for ( $i = 0; $i < count($fields['ind']); $i++ )
			{
				if ( $fields['ind'][$i] > $last_ind )
				{
					$last_ind = $fields['ind'][$i];
				}
			}
			$field_det['ind'] = $last_ind + 1;
		}
#
#-----[ FIND ]------------------------------------------------
#
				if ($field_def[$def_key]['cat'] == $cur_cat)
				{
#
#-----[ AFTER, ADD ]------------------------------------------
#
					$suggest_button = '';
					if ( $def_key == 'ind' )
					{
						$suggest_button = '  <input type="submit" name="suggest" value="' . $lang['Suggest'] . '" class="liteoption" />';
					}
#
#-----[ FIND ]------------------------------------------------
#
						'FIELD'				=> stripslashes(pcp_format_input($def_type, $def_name, $def_value)),
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
						'FIELD'				=> stripslashes(pcp_format_input($def_type, $def_name, $def_value)) . $suggest_button,
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Mon Oct 20, 2003 7:33 am

Fix missing screen title in tables linked edit :

Code: Select all

#
#-----[ OPEN ]------------------------------------------------
#
# 2003-10-20-03 : fix missing screen title in tables linked edit
#
admin/admin_pcp_tableslinked.php
#
#-----[ FIND ]------------------------------------------------
#
 *	version				: v 1.0.0 - 20/10/2003
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
 *	version				: v 1.0.1 - 20/10/2003
#
#-----[ FIND ]------------------------------------------------
#
			'L_TITLE'				=> $lang['PCP_tableslinked_edit'],
			'L_TITLE_EXPLAIN'		=> $lang['PCP_tableslinked_edit_explain'],
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
			'L_TITLE'				=> $lang['PCP_tableslinked_linked_edit'],
			'L_TITLE_EXPLAIN'		=> $lang['PCP_tableslinked_linked_edit_explain'],
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM

sparforum
Registered User
Posts: 62
Joined: Fri Oct 17, 2003 6:01 am

PM button in viewtopic.php

Post by sparforum » Mon Oct 20, 2003 1:11 pm

Great mod. One problem I noticed. When logged in as moderator/admin PM buttin shows up fine under viewtopic.php, but when logged in as rgular user PM button does not show up.

Any idea why this is?

Thanks

SF

Locked

Return to “[2.0.x] MODs in Development”