allow mod authors to plug in info_ language files for population within the menu.

git-svn-id: file:///svn/phpbb/trunk@7819 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2007-07-01 18:46:14 +00:00
parent 6ca11b2d2b
commit 85b99b642f
7 changed files with 17 additions and 5 deletions

View file

@ -209,6 +209,7 @@ p a {
<li>[Fix] Search boxes not loosing session id (changing method from get to post) (Bug #12643)</li>
<li>[Fix] Make sure the automatic update is also working for those having fsockopen disabled</li>
<li>[Fix] Simulate recache of theme data on automatic update finished page - recaching it if css data changed</li>
<li>[Feature] Allow dropping in custom &quot;info_[module class]_*.php&quot; files to language/*/mods directory for inclusion into the menu structure without the need to modify phpBB language files for menu placements</li>
</ul>

View file

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

View file

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

View file

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

View file

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

View file

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

View file

@ -123,6 +123,22 @@ class p_master
// Re-index (this is needed, else we are not able to array_slice later)
$this->module_cache['modules'] = array_merge($this->module_cache['modules']);
// Include MOD _info files for populating language entries within the menus
if (file_exists($user->lang_path . 'mods'))
{
$add_files = array();
foreach (glob($user->lang_path . 'mods/info_' . strtolower($this->p_class) . '_*.' . $phpEx, GLOB_NOSORT) as $file)
{
$add_files[] = 'mods/' . substr(basename($file), 0, -(strlen($phpEx) + 1));
}
if (sizeof($add_files))
{
$user->add_lang($add_files);
}
}
// Now build the module array, but exclude completely empty categories...
$right_id = false;
$names = array();