18v.biz Forum Index


Please help us to develop!
The grownups hangout
Log in

Language
Language:    

Navigation
Portal
Forum
Search Forums
Faq
Downloads
Album
Quiz
Free games

Searching

Advanced Search
Google

Affiliates



New Games
This is a member only game, you need to register to playRoulette
Jewel Quest 2
Crumbs
power arrow
snow throw
tijuana drink
This is a member only game, you need to register to playdeathrow
This is a member only game, you need to register to playgems
Yeti Bubbles Classic
zombiegolfv32Th

TWEAK "Select Default Language mod" on all pages

 
Post new topic   Reply to topic    18v.biz Forum Index -> Web Design -> Phpbb
uffe
Site Admin
Site Admin



 PostPosted: Thu Jan 24, 2008 12:18 pm    Post subject: TWEAK "Select Default Language mod" on all pages Reply with quote Back to top

Ho to make "Select Default Language by Niels Chr. Denmark" show the language select box on all pages

Do the edits to common.php and language/lang_english/lang_main.php then instead of doing the edits to index.php do this

Code:
#
#-----[ OPEN ]------------------------------------------------
#
includes/page_header.php

#
#-----[ FIND ]------------------------------------------------
#
define('HEADER_INC', TRUE);

#
#-----[ AFTER, ADD ]------------------------------------------
#
 
// Start add - Select default language MOD
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
// End add - Select default language MOD

#
#-----[ FIND ]------------------------------------------------
#
$template->assign_vars(array(
   'SITENAME' => $board_config['sitename'],

#
#-----[ BEFORE, ADD ]-----------------------------------------
#

// Start add - Select default language MOD
if ( $board_config['real_default_lang'] == 'english' )
{
   $Word_language = 'Language';
} else
{
   include($phpbb_root_path . 'language/lang_' . $board_config['real_default_lang']. '/lang_main.'.$phpEx);
   $Word_language = 'Language' . ' / ' . $lang['Word_language'] . ' ';
   include($phpbb_root_path . 'language/lang_' . $board_config['default_lang']. '/lang_main.'.$phpEx);
}
// End add - Select default language MOD

#
#-----[ FIND ]------------------------------------------------
#
   'PRIVMSG_IMG' => $icon_pm,

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Select default language MOD
'LANGUAGE_SELECT' => language_select($board_config['default_lang'], 'language'),
'L_SELECT_LANG' => $Word_language,
'L_CHANGE_NOW' => 'OK',
// End add - Select default language MOD


then open the tpl file for the page where you want the language box to apear and add the code you would have added in index_body.tpl

Code:
<!-- Start add - Select default language MOD -->
<!-- BEGIN switch_user_logged_out -->
   <form method="post" action="{U_INDEX}"><span class="forumlink" style="margin-left: 2px; font-size: 11px">{L_SELECT_LANG}: </span>{LANGUAGE_SELECT}&nbsp;&nbsp;&nbsp;
      <input type="submit" class="mainoption" name="cangenow" value="{L_CHANGE_NOW}" />
   </form>
<!-- END switch_user_logged_out -->
<!-- End add - Select default language MOD -->

Simplest option is as i did - I added this box in my overall_header.tpl so it shows on all pages
 
Google
Sponsor



 PostPosted: Thu Jan 24, 2008 12:18 pm    Post subject: Advertisement Back to top

 
Display posts from previous:   
Post new topic   Reply to topic    18v.biz Forum Index -> Web Design -> Phpbb All times are GMT + 2 Hours
Page 1 of 1

 
Jump to: