Перейти к контенту

Изменение полей профиля(icq, msn, aol yahoo) на выпадающие меню


Рекомендуемые сообщения

1. Я не хочу использовать дополнительные поля.

2. У нас есть

 

yahoo

icq

msn

aol

// в основном используются одно или два поля

 

 

3. Я хотел бы сделать вместо yahoo? выпадающию менбшку

- footbal

- tennis

- hockey

- swimming

- и т.д.

 

 

TO DO LIST:

 

- change the personal portal /index.php?showuser=1

- change usercp /index.php?act=UserCP&CODE=01

- change members search(allow to find all users which like one of items of sport) /index.php?act=Members

 

 

 

 

 

 

 

 

 

 

<<<---|3.1|--->>>

 

. /cache/lang_cache/en/lang_profile.php

/* data that will be in the modified profile item */

 

ADD:

 

 

'info_1'						=> "football",
'info_2'						=> "tennis",
'info_3'						=> "hockey",
'info_4'						=> "swimming",
'info_5'						=> "basketball",

 

 

 

 

<<<---|3.2|--->>>

/* Editing the way of representation on the /index.php?showuser=UsersID */

 

sources/action_public/profile.php

 

//-----------------------------------------
// Contact info
//-----------------------------------------

$member['icq_number']  = $member['icq_number'] > 0 ? $member['icq_number'] : '';		
$member['_aim_name']   = $member['aim_name']   ? $member['aim_name']   : $this->ipsclass->lang['no_info'];
$member['_icq_number'] = $member['icq_number'] ? $member['icq_number'] : $this->ipsclass->lang['no_info'];
$member['_yahoo']	  = $member['yahoo']	  ? $member['yahoo']	  : $this->ipsclass->lang['no_info'];

 

 

We take:

 

$member['_yahoo']	  = $member['yahoo']	  ? $member['yahoo']	  : $this->ipsclass->lang['no_info'];

 

and substitute it with:

 

$member['_yahoo']  = "<option value='0'>--</option>";


for ( $i = 1; $i < 6; $i++ )
{
$member['_yahoo'] .= "<option value='$i'";			
$member['_yahoo'] .= $i == $member['info_sport'] ? "selected='selected'>" . $this->ipsclass->lang['info_'.$i] ."</option>" : ">" . $this->ipsclass->lang['info_'.$i] ."</option>";
	}

 

from 1 to 6 because we have 5 items + "--"

info_sport - the name of array with items

lang['info_'.$i] - items

 

 

 

 

 

<<<---|3.3|--->>>

/*Creating the dropdowm menu in the skin html files*/

 

/cache/skin_cache/cacheid_3/skin_profile.php

 

find: "<div id='pp-entry-contact-wrap-yahoo'>" and then replace the hole part with:

 

			<div class='row1' style='padding:6px; padding-left:10px'>
			<div id='pp-entry-contact-wrap-yahoo'>
				<{PRO_YIM}> <span id='pp-entry-contact-entry-yahoo'>{$member['_yahoo']}</span>
			</div>
		</div>
		" . (($member['id'] == $this->ipsclass->member['id'] AND $this->ipsclass->member['g_edit_profile']==1) ? ("
			<div class='popupmenu-new' id='pp-entry-contact-wrap-yahoo_menu' style='display:none;width:auto'>
				<div class='popupmenu-item-last'>
					<fieldset>

						<legend>{$this->ipsclass->lang['m_enter_yahoo']}</legend>
						<select >{$member['_yahoo']}</select>


						<input class='button' type='button' value='{$this->ipsclass->lang['m_save_button']}' onclick=\"ips_personal_portal.save_settings( 'contact', {'contacttype' : 'yahoo'}, 'pp-contact-value-yahoo'); return false;\" />


					</fieldset>
				</div>
			</div>
		") : ("")) . "

 

 

to be continued... any help?

Ссылка на комментарий
Поделиться на других сайтах

Присоединиться к обсуждению

Вы можете ответить сейчас, а зарегистрироваться позже. Если у вас уже есть аккаунт, войдите, чтобы ответить от своего имени.

Гость
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Ответить в этой теме...

×   Вы вставили отформатированный текст.   Удалить форматирование

  Допустимо не более 75 смайлов.

×   Ваша ссылка была автоматически заменена на медиа-контент.   Отображать как ссылку

×   Ваши публикации восстановлены.   Очистить редактор

×   Вы не можете вставить изображения напрямую. Загрузите или вставьте изображения по ссылке.

Зарузка...
×
×
  • Создать...

Важная информация

Находясь на нашем сайте, вы соглашаетесь на использование файлов cookie, а также с нашим положением о конфиденциальности Политика конфиденциальности и пользовательским соглашением Условия использования.