Jump to content
"Idzie nowe..." - o zmianach i nie tylko ×
Przeniesienie zakupów z IPS Marketplace / Moving bought items from IPS Marketplace ×

(DP23) Choose Language Upon Register 1.1


Recommended Posts

  • Manager
Posted

Nazwa pliku: (DP23) Choose Language Upon Register 1.1

Autor: DawPi

Data wysłania: środa, 11 marzec 2009 - 18:01

Kategoria: Modyfikacje

Wersja modyfikacji: 1.1

Dzięki tej modyfikacji możesz umożliwić wybór języka podczas rejestracji. Ten mod będzie włączony tylko w przypadku posiadania większej ilości języków na forum niż jeden oraz oczywiście przy włączonej modyfikacji w ACP. :P

Opcje:

  • * Włączenie/wyłączenie modyfikacji.

Kliknij tutaj by pobrać plik

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

  • 2 weeks later...
Guest philhxc
Posted

i did all edits and installed but the dropdown is not showing up :P

Choose Language and Choose Skin are not working on my system, why could this be?

  • Manager
Posted

Hi philhxc, next time please post new topic in english section, here: http://forum.invisionize.pl/index.php?showforum=81,thanks.

Back to the topic - i think you have only one lang or if two or more they're hidden. Am i right? :P

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Guest philhxc
Posted (edited)

i have 2 langs and they are not hidden, please note that the Choose Skin isn't working either.. both are just not showing up.

Edited by philhxc
Guest philhxc
Posted (edited)

yes and yes :)

here are my edits just in case i messed something up, or maybe didnt copy a simi colon or something

sources/action_public/register.php

		//-----------------------------------------
	// Replace elements
	//-----------------------------------------

	if ($this->ipsclass->vars['bot_antispam'] )
	{
		$this->output = str_replace( "<!--{REG.ANTISPAM}-->", $captchaHTML, $this->output );
	}

	if ($required_output != "")
	{
		$this->output = str_replace( "<!--{REQUIRED.FIELDS}-->", "\n".$required_output, $this->output );
	}

	if ($optional_output != "")
	{
		$this->output = str_replace( "<!--{OPTIONAL.FIELDS}-->", $this->ipsclass->compiled_templates['skin_register']->optional_title()."\n".$optional_output, $this->output );
	}
			//-----------------------------------------
	// (DP23) Choose Skin Upon Register
	//-----------------------------------------	
	require_once( ROOT_PATH.'sources/lib/func_dp23_csr.php' );
	$dp23csr		   =  new func_dp23_csr;
	$dp23csr->ipsclass =& $this->ipsclass;

	$this->output = str_replace( " <!--{DP23.CHOOSE.SKINS}-->", $dp23csr->CreateForm(), $this->output );
	//-----------------------------------------
	// (DP23) Choose Language Upon Register
	//-----------------------------------------	
	require_once( ROOT_PATH.'sources/lib/func_dp23_clr.php' );
	$dp23clr		   =  new func_dp23_clr;
	$dp23clr->ipsclass =& $this->ipsclass;

	$this->output = str_replace( " <!--{DP23.CHOOSE.LANGS}-->", $dp23clr->CreateForm(), $this->output );
	//-----------------------------------------
	// Time zone...
	//-----------------------------------------

	$this->ipsclass->load_language('lang_ucp');

	$offset = ( $this->ipsclass->input['time_offset'] != "" ) ? $this->ipsclass->input['time_offset'] : $this->ipsclass->vars['time_offset'];

		$time_select = "<select name='time_offset' class='forminput'>";

		//-----------------------------------------
	// Are we asking the member or admin to preview?
	//-----------------------------------------

	if ( $this->ipsclass->vars['reg_auth_type'] )
	{
		$mem_group = $this->ipsclass->vars['auth_group'];
	}
	else if ($coppa == 1)
	{
		$mem_group = $this->ipsclass->vars['auth_group'];
	}
	else if ( $this->ipsclass->vars['subsm_enforce'] )
	{
		$mem_group = $this->ipsclass->vars['subsm_nopkg_group'];
	}
	//-----------------------------------------
	// Check user's date of birth
	//-----------------------------------------

	$c_cnt = 0;
	foreach( array('day','month','year') as $v )
	{
		if( ! $this->ipsclass->input[$v] )
		{
			$c_cnt++;
		}
	}

	if( $c_cnt > 0 )
	{
		$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'calendar_not_all' ) );
	}
	//-----------------------------------------
	// (DP23) Choose Skin Upon Register
	//-----------------------------------------	
	if ( $this->ipsclass->vars['dp23_csr_enable'] )
	{
	require_once( ROOT_PATH.'sources/lib/func_dp23_csr.php' );
	$dp23csr		   =  new func_dp23_csr;
	$dp23csr->ipsclass =& $this->ipsclass;		

	$mem_skin = $dp23csr->SetSkin();
	}
	else
	{
	$mem_skin = 0;
	}
	//-----------------------------------------
	// (DP23) Choose Language Upon Register
	//-----------------------------------------	

	if ( $this->ipsclass->vars['dp23_clr_enable'] )
	{
	require_once( ROOT_PATH.'sources/lib/func_dp23_clr.php' );
	$dp23clr		   =  new func_dp23_clr;
	$dp23clr->ipsclass =& $this->ipsclass;		

	$mem_lang = $dp23clr->SetLang();
	}
	else
	{
	$mem_lang = 0;
	}
	$_mke_time   = ( $this->ipsclass->vars['login_key_expire'] ) ? ( time() + ( intval($this->ipsclass->vars['login_key_expire']) * 86400 ) ) : 0;

	$member = array(
					 'name'				   => $in_username,
					 'members_l_username'	 => strtolower( $in_username ),
					 'members_display_name'   => $this->ipsclass->vars['auth_allow_dnames'] ? $members_display_name : $in_username,
					 'members_l_display_name' => strtolower( $this->ipsclass->vars['auth_allow_dnames'] ? $members_display_name : $in_username ),
					 'member_login_key'	   => $this->ipsclass->converge->generate_auto_log_in_key(),
					 'member_login_key_expire' => $_mke_time,
					 'email'				  => $in_email,
					 'mgroup'				 => $mem_group,
					 'posts'				  => 0,
					 'joined'				 => time(),
					 'ip_address'			 => $this->ipsclass->ip_address,
					 'time_offset'			=> $this->ipsclass->input['time_offset'],
					 'view_sigs'			  => 1,
					 'email_pm'			   => 1,
					 'view_img'			   => 1,
					 'view_avs'			   => 1,
					 'restrict_post'		  => 0,
					 'view_pop'			   => 1,
					 'msg_total'			  => 0,
					 'new_msg'				=> 0,
					 'coppa_user'			 => $coppa,
					 'bday_day'			   => intval($this->ipsclass->input['day']),
					 'bday_month'			 => intval($this->ipsclass->input['month']),
					 'bday_year'			  => intval($this->ipsclass->input['year']),						 
					 				 		 //-----------------------------------------
					 // (DP23) Language Skin Upon Register
					 //-----------------------------------------	
		 'language'			   => ( $mem_lang ) ? $mem_lang : $this->ipsclass->vars['default_language'],	
					 'skin'				   => $mem_skin,
					 'members_auto_dst'	   => 1,
					 'members_editor_choice'  => $this->ipsclass->vars['ips_default_editor'],
					 'allow_admin_mails'	  => intval( $this->ipsclass->input['allow_admin_mail'] ),
					 'hide_email'			 => $this->ipsclass->input['allow_member_mail'] ? 0 : 1,
					 'subs_pkg_chosen'		=> intval( $this->ipsclass->input['subspackage'] )
				   );

	//-----------------------------------------
	// Insert: CONVERGE
	//-----------------------------------------

	$salt	 = $this->ipsclass->converge->generate_password_salt(5);
	$passhash = $this->ipsclass->converge->generate_compiled_passhash( $salt, md5($in_password) );

ShowForm (skin register)

									<fieldset>
								<legend>{$this->ipsclass->lang['op_tz_title']}</legend>
									<div class="desc">{$this->ipsclass->lang['op_tz_text']}</div><br />
									<!--{TIME_ZONE}--><br /><br />
									<!--<input type="checkbox" name="dst" value="1" class="checkbox" <!--[dst.checked]--> /> {$this->ipsclass->lang['op_tz_dst']}<br />-->
								</fieldset><br />
								<!--{DP23.CHOOSE.LANGS}--><br />
								<!--{DP23.CHOOSE.SKINS}--><br />
								<!--{BIRTH_DATE}-->
								<!--{OPTIONAL.FIELDS}-->
								<!--{Referral.FIELD}-->
							</td>
						</tr>
					</table>
				</div>
			</td>
		</tr>

i did the template edit and activated them, however...

16010483.th.jpg

Edited by philhxc
  • Manager
Posted

I think your board didn't add template bit. Check chmod to whole cache/ directory. Set to 777 and install again this mod.

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Guest philhxc
Posted

ok chmod'd to 777 reinstalled and i checked the cache folder

return $IPBHTML;
}

//===========================================================================
// <ips:dp23_choose_lang:desc::trigger:>
//===========================================================================
function dp23_choose_lang($data="") {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= "<fieldset>

<legend>{$this->ipsclass->lang['dp23_clr_lang1']}</legend>

	   <div class='desc'>{$this->ipsclass->lang['dp23_clr_lang2']}</div><br />

	   <select class='forminput' name='dp23clr'> {$data['langs']} </select>

</fieldset><br />";
//--endhtml--//
return $IPBHTML;
}

//===========================================================================
// <ips:dp23_choose_skin:desc::trigger:>
//===========================================================================
function dp23_choose_skin($data="") {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= "<fieldset>

<legend>{$this->ipsclass->lang['dp23_csr_lang1']}</legend>

	   <div class='desc'>{$this->ipsclass->lang['dp23_csr_lang2']}</div><br />

	   <select class='forminput' name='dp23csr'> {$data['skins']} </select>

</fieldset><br />";
//--endhtml--//
return $IPBHTML;
}

templatebits added but its not showing up

Guest philhxc
Posted (edited)

mmm my page source

GMT + 10:00 hours) Melbourne, Papua New Guinea, Sydney</option><option value="10.5">(GMT + 10:30 hours) Lord Howe Island</option><option value="11">(GMT + 11:00 hours) Magadan, New Caledonia, Solomon Is.</option><option value="11.5">(GMT + 11:30 hours) Burnt Pine, Kingston</option><option value="12">(GMT + 12:00 hours) Auckland, Fiji, Marshall Island</option><option value="12.75">(GMT + 12:45 hours) Chatham Islands</option><option value="13">(GMT + 13:00 hours) Kamchatka, Anadyr</option><option value="14">(GMT + 14:00 hours) Kiritimati</option></select><br><br>

									<!--<input type="checkbox" name="dst" value="1" class="checkbox"  /> Observing Daylight Saving Time?<br />-->
								</fieldset><br>
								<!--{DP23.CHOOSE.LANGS}--><br>
								<!--{DP23.CHOOSE.SKINS}--><br>
								<br><fieldset><legend>Your Date of Birth</legend><br><select name="day" style="width: 66px;"><option value="0">--</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option><option value="18">18</option><option value="19">19</option><option value="20">20</option><option value="21">21</option><option value="1927">1927</option><option value="1926">1926</option><option value="1925">1925</option><option value="1924">1924</option><option value="1923">1923</option><option value="1922">1922</option><option value="1921">1921</option><option value="1920">1920</option><option value="1919">1919</option><option value="1918">1918</option><option value="1917">1917</option><option value="1916">1916</option><option value="1915">1915</option><option value="1914">1914</option><option value="1913">1913</option><option value="1912">1912</option><option value="1911">1911</option><option value="1910">1910</option></select><br><br></fieldset>

								<!--{OPTIONAL.FIELDS}-->
								<script type="text/javascript">

just the commented lines...weird

Edited by philhxc
Posted
Could you give me ACP and FTP access?
Mam ten sam problem, więc możesz zerknąć u mnie (dane znasz:)).

EN: I have this same problem, so u can check in my ACP(u know pass:)).

Btw:

Wszystko wydaje się w porządku. CHMOD'y ustawione jak trzeba. <!--{DP23.CHOOSE.SKINS}--><br /> w skinie dodane. dp23_choose_lang w template Register też się utworzyło, a jednak podczas rejestracji nic się nie wyświetla tak jak u kolegi zza granicy.

C# developer

Guest philhxc
Posted
Could you give me ACP and FTP access?

yes just hold on a day or so because im changing server

  • 3 weeks later...
Posted
Parse error: syntax error, unexpected '!', expecting T_VARIABLE or '$' in /home/basiek21/www/cache/skin_cache/cacheid_4/skin_register.php on line 372

taki blad mi sie pojawia :) parte linijek pliku

</fieldset>

") : ("")) . "

" . (($! $reg['partial_email_ok']) ? ("

<fieldset class=\"row3\">

<div class='input-warn-content' id='box-emailaddress'><div id='msg-emailaddress'>{$errors['email']}</div></div>

<legend><b>{$this->ipsclass->lang['email_address_title']}</b></legend>

oraz plik http://rapidshare.com/files/223316953/skin_register.php.html

pozdrawiam !

Posted

o.O , o dziwo tez nie dziala hmhm

to Ty mnie zle pokierowales do tego dzialu :)

dobrze jednak topic tam zalozylem ;]

jakies sugestie co jest nie tak ?

plik sam w sobie wgralem ponownie i jest i tak zle ;/

  • 1 year later...
Posted

Doszedłeś może dlaczego dla niektórych osób ta modyfikacja nie działa? Wszystko jest tak jak trzeba, edycja plików, skórek, CHMOD'y. Jednak w ogóle nie pojawia się formularz z wyborem języka podczas rejestracji.

C# developer

  • Manager
Posted

Uh, wersja DP23 - jak ktoś chce to niech spojrzy.. Mi pewnie parę tygodni zejdzie nim się wezmę za poprawki do modów DP23 - najpierw trzeba 3x zrobić. ^_^

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.