From: <ma...@us...> - 2012-11-30 20:27:39
|
Revision: 10291 http://sourceforge.net/p/xoops/svn/10291 Author: mageg Date: 2012-11-30 20:27:36 +0000 (Fri, 30 Nov 2012) Log Message: ----------- add extension or module config in moduleadmin Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2012-11-30 19:51:57 UTC (rev 10290) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2012-11-30 20:27:36 UTC (rev 10291) @@ -129,6 +129,38 @@ } } break; + + case "extension": + $xoops = Xoops::getInstance(); + if (is_array($value)) { + $text = $value[0]; + $type = $value[1]; + } else { + $text = $value; + $type = 'error'; + } + if ($xoops->isActiveModule($value) == false) { + $this->_itemConfigBoxLine[] = array('type' => $type, 'text' => sprintf(_AM_MODULEADMIN_CONFIG_EXTENSIONKO, $text)); + } else { + $this->_itemConfigBoxLine[] = array('type' => 'accept', 'text' => sprintf(_AM_MODULEADMIN_CONFIG_EXTENSIONOK, $text)); + } + break; + + case "module": + $xoops = Xoops::getInstance(); + if (is_array($value)) { + $text = $value[0]; + $type = $value[1]; + } else { + $text = $value; + $type = 'error'; + } + if ($xoops->isActiveModule($value) == false) { + $this->_itemConfigBoxLine[] = array('type' => $type, 'text' => sprintf(_AM_MODULEADMIN_CONFIG_MODULEKO, $text)); + } else { + $this->_itemConfigBoxLine[] = array('type' => 'accept', 'text' => sprintf(_AM_MODULEADMIN_CONFIG_MODULEOK, $text)); + } + break; } return true; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/admin.php 2012-11-30 19:51:57 UTC (rev 10290) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/admin.php 2012-11-30 20:27:36 UTC (rev 10291) @@ -29,6 +29,10 @@ define('_AM_MODULEADMIN_CONFIG_PHP','Minimum PHP required: %s (your version is %s)'); define('_AM_MODULEADMIN_CONFIG_XOOPS','Minimum XOOPS required: %s (your version is %s)'); define('_AM_MODULEADMIN_CONFIG_DB','minimum version required: %s (your version is %s)'); +define('_AM_MODULEADMIN_CONFIG_EXTENSIONKO',"The extension '%s' isn't installed"); +define('_AM_MODULEADMIN_CONFIG_EXTENSIONOK',"The extension '%s' is installed"); +define('_AM_MODULEADMIN_CONFIG_MODULEKO',"The module '%s' isn't installed"); +define('_AM_MODULEADMIN_CONFIG_MODULEOK',"The module '%s' is installed"); // About define('_AM_MODULEADMIN_ABOUT_CHANGELOG','Change log'); define('_AM_MODULEADMIN_ABOUT_DESCRIPTION','Description:'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html 2012-11-30 19:51:57 UTC (rev 10290) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html 2012-11-30 20:27:36 UTC (rev 10291) @@ -28,6 +28,10 @@ <li class="red"> <span class="ico ico-cross"></span> <{$config.text}> </li> + <{elseif $config.type == 'warning'}> + <li class="orange"> + <span class="ico ico-warning"></span> <{$config.text}> + </li> <{else}> <li class="green"> <span class="ico ico-tick"></span> <{$config.text}> |