Little help with the update of the Custom Profile Fields Mod

Allgemeiner Support zum phpBB 2 Board und phpBB 2 Modifikationen
Forumsregeln
Auch wenn hier der Support für phpBB 2 weiterhin aufrecht erhalten bleibt, weisen wir darauf hin, dass das phpBB 2 nicht mehr offiziell unterstützt und weiterentwickelt wird!
Antworten
mariokaz
Beiträge: 222
Registriert: So 12.Jun, 2005 21:46

Little help with the update of the Custom Profile Fields Mod

Beitrag von mariokaz »

Hi oxpus,

I am updating this Mod "Custom Profile Fields" to 1.2.0 in my Plus 1.53a because the version that comes with the Plus (1.1.1) have a little errors, but I didn't find this little parts in my two files, help me please.

Code: Alles auswählen

#
#-----[ OPEN ]-------------------
#
viewtopic.php
#
#-----[ FIND ]---------------------
#
    if($location == AUTHOR)
#
#-----[ BEFORE, ADD ]--------------------
#
    if (($profile_names[$name] != '') || (!$board_config['collapse_fields'])) {
#
#-----[ FIND ]---------------------
#
  	  $belows[] = $name . ': ' . $profile_names[$name];
#
#-----[ AFTER, ADD ]--------------------
#
  	  }
In my viewtopic.php file I only find this part of this Mod, because I know that the Mod was a little modificated in the package of the Plus 1.53a.

Code: Alles auswählen

	//
	// Custom Profile Fields MOD
	//
	if ( $poster_id != ANONYMOUS && $profile_data_sql != '' )
	{
		$cp_data = array();
		$cp_data = get_topic_udata($postrow[$i], $profile_data);		
		
		if ( $cp_data['aboves'] )
			foreach($cp_data['aboves'] as $above_val)
				$template->assign_block_vars('postrow.above_sig',array('ABOVE_VAL' => $above_val));

		if ( $cp_data['belows'] )
			foreach($cp_data['belows'] as $below_val)
				$template->assign_block_vars('postrow.below_sig',array('BELOW_VAL' => $below_val));

		if ( $cp_data['author'] )
			foreach($cp_data['author'] as $author_val)
				$template->assign_block_vars('postrow.author_profile',array('AUTHOR_VAL' => $author_val));
	}
	//
	// END Custom Profile Fields MOD
	//
So I don't know how I have to put that modifications in the code.


And

Code: Alles auswählen

#
#-----[ OPEN ]-------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]---------------------
#
		  <td> <b><span class="gen">' . $profile_names[$name] . '</span></b></td>';
#
#-----[ AFTER, ADD ]--------------------
#
  }
In my includes/usercp_viewprofile.php I only find this part of the Mod, also was a little modificated in the original package of the Plus 1.53a:

Code: Alles auswählen

//
// Custom Profile Fields MOD
//
include_once($phpbb_root_path . 'includes/functions_profile_fields.'.$phpEx);
$profile_data = get_fields('WHERE view_in_profile = ' . VIEW_IN_PROFILE . ' AND users_can_view = ' . ALLOW_VIEW);
$profile_names = array();

$abouts = array();
$contacts = array();
foreach($profile_data as $field)
{
  $name = $field['field_name'];
  $col_name = text_to_column($field['field_name']);
  $id = $profiledata['user_id'];
  $type = $field['field_type'];
  $location = $field['profile_location'];
  
  $profile_names[$name] = displayable_field_data($profiledata[$col_name],$field['field_type']);
  
  if (($profile_names[$name] != '') || (!$board_config['collapse_fields'])) {

  if($location == 1) {
    $contacts[$name]['name'] = $name;
    $contacts[$name]['data'] = $profile_names[$name];
  } else {
    $abouts[$name]['name'] = $name;
    $abouts[$name]['data'] = $profile_names[$name];
  }
}

foreach($abouts as $about_field)
  $template->assign_block_vars('custom_about',array('ABOUT_N' => $about_field['name'],'ABOUT_D' => $about_field['data']));

foreach($contacts as $contact_field)
  $template->assign_block_vars('custom_contact',array('CONTACT_N' => $contact_field['name'],'CONTACT_D' => $contact_field['data']));
//
// END Custom Profile Fields MOD
//
So I didn't know how to put the code in there. ^6

Thank you my friend! :)

Mario
Zuletzt geändert von mariokaz am So 22.Okt, 2006 22:10, insgesamt 2-mal geändert.
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Mario,
Short answer for this request (and there are many questions like this in the last time):
Please ask on http://www.phpbb2.de for updating MODs from the Plus, specially you can't find different code peaces.
I've not the time helping other users permanently to install or update several mods...
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
mariokaz
Beiträge: 222
Registriert: So 12.Jun, 2005 21:46

Beitrag von mariokaz »

Ok no problem Oxpus, I understand very well, but you know that the support in the the "other" sites is very very poor ¦4 , I know that it is not your business, but really you are almost the only person who that gives excellent support here in your forum. :p

Please help me this last time in this ¢¦ and I promisse never ask you problems when I didn't find code in the Mods. :!: :nono

Thank you! ;)
Antworten