Add language block to simple portal

Download and support for PhpBB3 Simple Portal
Locked
User avatar
Terr0r
BBCoder V
BBCoder V
Posts: 339
Joined: 04 May 2011, 00:47
BBCodes: 100
Location: The Netherlands
Contact:

Add language block to simple portal

Post by Terr0r »

I have try to set a language block to simple portal but it will not work

I get the code uit the UCP file for the register file but it will not work

I have now this code

I Have this in the portal.php

Code: Select all

			// Checking amount of available languages
			$sql = 'SELECT lang_id
				FROM ' . LANG_TABLE;
			$result = $db->sql_query($sql);

			$lang_row = array();
			while ($row = $db->sql_fetchrow($result))
			{
				$lang_row[] = $row;
			}
			$db->sql_freeresult($result);

			if ($coppa === false && $config['coppa_enable'])
			{
				$now = getdate();
				$coppa_birthday = $user->format_date(mktime($now['hours'] + $user->data['user_dst'], $now['minutes'], $now['seconds'], $now['mon'], $now['mday'] - 1, $now['year'] - 13), $user->lang['DATE_FORMAT']);
				unset($now);

				$template->assign_vars(array(
					'S_LANG_OPTIONS'	=> (sizeof($lang_row) > 1) ? language_select($user_lang) : '',
				));
			}
			else
			{
				$template->assign_vars(array(
					'S_LANG_OPTIONS'	=> (sizeof($lang_row) > 1) ? language_select($user_lang) : '',
					)
				);
			}
			unset($lang_row);

			$this->tpl_name = 'ucp_agreement';
			return;
		
		
		$add_lang = ($change_lang) ? '&change_lang=' . urlencode($change_lang) : '';
		$change_lang	= request_var('change_lang', '');
		if ($change_lang || $user_lang != $config['default_lang'])
		{
			$use_lang = ($change_lang) ? basename($change_lang) : basename($user_lang);

			if (!validate_language_iso_name($use_lang))
			{
				if ($change_lang)
				{
					$submit = false;

					// Setting back agreed to let the user view the agreement in his/her language
					$agreed = (empty($_GET['change_lang'])) ? 0 : $agreed;
				}

				$user->lang_name = $user_lang = $use_lang;
				$user->lang = array();
				$user->data['user_lang'] = $user->lang_name;
				$user->add_lang(array('common', 'ucp'));
			}
			else
			{
				$change_lang = '';
				$user_lang = $user->lang_name;
			}
		}
I Have this in the simple_portal.php language file

Code: Select all

	'LANGUAGE'					=> 'Change language',
I Have this in the this in the simple_portal.html

Code: Select all

	<!-- Start Board Language -->
	<div class="forabg">
		<div class="inner"><span class="corners-top"><span></span></span>
		<ul class="topiclist">
			<li class="header">
				<dl class="icon">
					<dt>{LANGUAGE}</dt>
				</dl>
			</li>
		</ul>
		<ul class="topiclist forums">
			<li>			
			<div class="content" style="width:auto; height:auto; padding:10px; padding-bottom:0px; text-align:center;">
<select name="lang" id="lang" onchange="change_language(this.value); return false;" tabindex="6" title="{LANGUAGE}">{S_LANG_OPTIONS}</select>
<br />		
			</div>
			</li>
		</ul>
		<span class="corners-bottom"><span></span></span></div>
	</div>
	<!-- End Board Language -->
I have now this
taal.png
I think the code that state in the portal.php is not good

I hope there is some that can help me out this

already thanks for the help

Greets Terr0r
If you can't fix it with ducktape you ain't using enough
For my MODS and BBCodes or other things that I have made take a look here
User avatar
Theriddler
BBCoder II
BBCoder II
Posts: 18
Joined: 27 Oct 2011, 01:24
BBCodes: 4
Location: The Netherlands

Add language block to simple portal

Post by Theriddler »

why so difficult? try this and place the generated code in your block.

I can't test it because i use board3 portal 2.x

good luck :thumb:

http://www.gmodules.com/ig/creator?synd ... ml&lang=en
User avatar
Terr0r
BBCoder V
BBCoder V
Posts: 339
Joined: 04 May 2011, 00:47
BBCodes: 100
Location: The Netherlands
Contact:

Add language block to simple portal

Post by Terr0r »

no that is not what I want

maybe someone else have a solution for me how I can get this block working good
If you can't fix it with ducktape you ain't using enough
For my MODS and BBCodes or other things that I have made take a look here
User avatar
Terr0r
BBCoder V
BBCoder V
Posts: 339
Joined: 04 May 2011, 00:47
BBCodes: 100
Location: The Netherlands
Contact:

Add language block to simple portal

Post by Terr0r »

Bump :music:
If you can't fix it with ducktape you ain't using enough
For my MODS and BBCodes or other things that I have made take a look here
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Add language block to simple portal

Post by Stoker »

Board rules! No PM support
User avatar
Terr0r
BBCoder V
BBCoder V
Posts: 339
Joined: 04 May 2011, 00:47
BBCodes: 100
Location: The Netherlands
Contact:

Add language block to simple portal

Post by Terr0r »

thanks stoker I have it installed on my test forum board and it is working :thumb:
If you can't fix it with ducktape you ain't using enough
For my MODS and BBCodes or other things that I have made take a look here
Locked