From: <du...@us...> - 2012-11-07 15:31:27
|
Revision: 10247 http://sourceforge.net/p/xoops/svn/10247 Author: dugris Date: 2012-11-07 15:31:24 +0000 (Wed, 07 Nov 2012) Log Message: ----------- Add module object for help.php Add loadlanguage for help.php Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php 2012-11-07 12:51:02 UTC (rev 10246) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php 2012-11-07 15:31:24 UTC (rev 10247) @@ -73,6 +73,8 @@ unset($help); } + $xoops->loadLanguage('help', $module->getVar('dirname') ); + $xoops->tpl->assign('module', $module); $xoops->tpl->assign('modname', $module->getVar('name')); $xoops->tpl->assign('moddirname', $module->getVar('dirname', 'e')); |
From: <du...@us...> - 2013-01-29 17:51:52
|
Revision: 10946 http://sourceforge.net/p/xoops/svn/10946 Author: dugris Date: 2013-01-29 17:51:48 +0000 (Tue, 29 Jan 2013) Log Message: ----------- use Xoopslocale Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php 2013-01-29 16:30:22 UTC (rev 10945) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php 2013-01-29 17:51:48 UTC (rev 10946) @@ -80,8 +80,9 @@ if ($page != '') { // Call template - if (XoopsLoad::fileExists(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/' . $page . '.html')) { - + if ($helpfile = XoopsLoad::fileExists(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/locale/' . XoopsLocale::getLocale() . '/help/' . $page . '.html')) { + $helpcontent = $xoops->tpl()->fetch(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/locale/' . XoopsLocale::getLocale() . '/help/' . $page . '.html'); + } elseif (XoopsLoad::fileExists(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/' . $page . '.html')) { $helpcontent = $xoops->tpl()->fetch(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/' . $page . '.html'); } else { if (XoopsLoad::fileExists(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/english/help/' . $page . '.html')) { @@ -94,18 +95,16 @@ $xoops->tpl()->assign('help_module', true); } $xoops->tpl()->assign('helpcontent', $helpcontent); - } else { - if (XoopsLoad::fileExists(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoops->getConfig('language') . '/help/module_index.html')) { + if ($helpfile = XoopsLoad::fileExists(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/locale/' . XoopsLocale::getLocale() . '/help/module_index.html')) { + $helpcontent = $xoops->tpl()->fetch(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/locale/' . XoopsLocale::getLocale() . '/help/module_index.html'); + } elseif (XoopsLoad::fileExists(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoops->getConfig('language') . '/help/module_index.html')) { $helpcontent = $xoops->tpl()->fetch(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoops->getConfig('language') . '/help/module_index.html'); } else { $helpcontent = '<p>' . $module->getInfo('description') . '</p>'; } - $xoops->tpl()->assign('helpcontent', $helpcontent); - } - } else { $system_breadcrumb->render(); $criteria = new CriteriaCompo(); |