mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-21 09:03:38 +02:00
Feature Issue ID 0000496: Integrate MOD add_index on PWG with plugin.lang.php
Add some plugin triggers: o for help o for language o for site manager o for advanced features Allow to launch directly plugin page (without section key) Add add_index plugin, available on site manager and advanced features Configuration page and best help must be coming soon. git-svn-id: http://piwigo.org/svn/trunk@1699 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -149,6 +149,7 @@ if (defined('IN_ADMIN') and IN_ADMIN)
|
||||
{
|
||||
include_once(get_language_filepath('admin.lang.php'));
|
||||
}
|
||||
trigger_action('loading_lang');
|
||||
@include_once(get_language_filepath('local.lang.php'));
|
||||
|
||||
// only now we can set the localized username of the guest user (and not in
|
||||
|
||||
@@ -640,6 +640,7 @@ function redirect_html( $url , $msg = '', $refresh_time = 0)
|
||||
{
|
||||
$user = build_user( $conf['guest_id'], true);
|
||||
include_once(get_language_filepath('common.lang.php'));
|
||||
trigger_action('loading_lang');
|
||||
@include_once(get_language_filepath('local.lang.php'));
|
||||
list($tmpl, $thm) = explode('/', $conf['default_template']);
|
||||
$template = new Template(PHPWG_ROOT_PATH.'template/'.$tmpl, $thm);
|
||||
|
||||
@@ -33,7 +33,7 @@ register their functions to handle these events. An event is identified by a
|
||||
string.
|
||||
*/
|
||||
|
||||
define('PHPWG_PLUGINS_PATH',PHPWG_ROOT_PATH.'plugins/');
|
||||
define('PHPWG_PLUGINS_PATH', PHPWG_ROOT_PATH.'plugins/');
|
||||
|
||||
define('EVENT_HANDLER_PRIORITY_NEUTRAL', 50);
|
||||
|
||||
|
||||
@@ -821,19 +821,26 @@ SELECT name
|
||||
* PhpWebGallery default language.
|
||||
*
|
||||
* @param string filename
|
||||
* @param string dirname
|
||||
* @return string filepath
|
||||
*/
|
||||
function get_language_filepath($filename)
|
||||
function get_language_filepath($filename, $dirname = '')
|
||||
{
|
||||
global $user, $conf;
|
||||
|
||||
if (empty($dirname))
|
||||
{
|
||||
$dirname = PHPWG_ROOT_PATH;
|
||||
}
|
||||
$dirname .= 'language'.'/';
|
||||
|
||||
$directories = array();
|
||||
if ( isset($user['language']) )
|
||||
{
|
||||
$directories[] = PHPWG_ROOT_PATH.'language/'.$user['language'];
|
||||
$directories[] = $dirname.$user['language'];
|
||||
}
|
||||
$directories[] = PHPWG_ROOT_PATH.'language/'.$conf['default_language'];
|
||||
$directories[] = PHPWG_ROOT_PATH.'language/'.PHPWG_DEFAULT_LANGUAGE;
|
||||
$directories[] = $dirname.$conf['default_language'];
|
||||
$directories[] = $dirname.PHPWG_DEFAULT_LANGUAGE;
|
||||
|
||||
foreach ($directories as $directory)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user