common.php
or use an hook file so that you don't have to edit any phpBB core files.Code: Select all
$user->setup('mods/jqdropdown');
Code: Select all
$user->add_lang('mods/jqdropdown');
common.php
wont work. I'd suggest to use an hook for this. Upload this file to includes/hooks/
and purge the cache. That will be loaded on every page.Code: Select all
<?php
/**
*
* example [English]
*
* @package language
* @version $Id$
* @copyright (c) 2007 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* DO NOT CHANGE
*/
if (empty($lang) || !is_array($lang))
{
$lang = array();
}
// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
$lang = array_merge($lang, array(
//Here are the ones for when a user is not logged in
'JQ_NL_WELCOME' => '<h1>Welcome to {SITENAME}</h1>
<h2>Hello Guests</h2>
<p class="grey">Dear Guests, If you have enjoyed your time here on {SITENAME}, please feel free to <a href="ucp.php?mode=register">Register</a>, and further your enjoyment here.<br />
Thanks,<br />
Steve C - Site Admin</p>',
'JQ_NL_WHY_REG' => '<p class="grey">Dear Guest if you would like to join our community, please feel free to head over to our <a href="ucp.php?mode=register">Registration Page</a> and create an account. The process will take no longer then 3 min, and you will be ready to continue your enjoyment here at {SITENAME}<br />
Thanks,<br />
Steve C - Site Admin</p>',
'JQ_NL_HELLO' => 'Hello Guest!',
'JQ_NL_LOGIN_LINK' => 'Log In | Register',
//Here are the ones for when the user is logged in
'JQ_L_WELCOME' => '<h1>Welcome to {SITENAME}</h1>
<h2>Your {LAST_VISIT_DATE}</h2>
<p class="grey">Welcome {S_USERNAME} to {SITENAME}. Hope you enjoy your time here.<br />
Thanks,<br />
Steve C - Site Admin</p>',
'JQ_L_MEM_INFO' => 'Member Info',
'JQ_L_QUICKLLINKS' => 'Quick Links',
'JQ_L_PM' => 'You have<!-- IF S_DISPLAY_PM --> <a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a><!-- ENDIF --><br />',
'JQ_L_SEARCHLINKS' => 'Search Links',
'JQ_L_HELLO' => 'Hello {S_USERNAME}!',
//Here are the ones that are common and dont change
'JQ_MEMLOGIN' => 'Member Login',
'JQ_LOSTPASS' => 'Lost your password?',
'JQ_NOTMEM' => 'Not a Member?',
'JQ_CREATEACC' => 'Create an Account',
'JQ_CLOSE_PANEL' => 'Close Panel',
));
?>
$user->setup('common');
and then you can just use {SITENAME} in the template files, it should workCode: Select all
'SITENAME' => 'Welcome to %1$s',
Code: Select all
$template->assign_var('L_SITENAME', sprintf($user->lang('SITENAME'), 'My Website'));
%1$s
multiple times. To add another placeholder to be replaced, do %2$s
and add another argument to the sprintf() after 'My Website'.