You can subscribe to this list here.
2012 |
Jan
|
Feb
(214) |
Mar
(139) |
Apr
(198) |
May
(187) |
Jun
(151) |
Jul
(210) |
Aug
(169) |
Sep
(58) |
Oct
(53) |
Nov
(54) |
Dec
(301) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2013 |
Jan
(348) |
Feb
(178) |
Mar
(219) |
Apr
(154) |
May
(117) |
Jun
(194) |
Jul
(61) |
Aug
(132) |
Sep
(121) |
Oct
(110) |
Nov
(11) |
Dec
(18) |
2014 |
Jan
(34) |
Feb
(50) |
Mar
(82) |
Apr
(98) |
May
(39) |
Jun
(111) |
Jul
(67) |
Aug
(36) |
Sep
(33) |
Oct
(26) |
Nov
(53) |
Dec
(44) |
2015 |
Jan
(29) |
Feb
(47) |
Mar
(25) |
Apr
(19) |
May
(23) |
Jun
(20) |
Jul
(49) |
Aug
(7) |
Sep
(10) |
Oct
(10) |
Nov
(4) |
Dec
(25) |
2016 |
Jan
(8) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(3) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(7) |
Dec
(5) |
2017 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(15) |
Jun
|
Jul
(18) |
Aug
(24) |
Sep
|
Oct
(14) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
(22) |
Mar
|
Apr
(11) |
May
(1) |
Jun
(17) |
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(6) |
Nov
(5) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <be...@us...> - 2012-12-17 04:58:40
|
Revision: 10422 http://sourceforge.net/p/xoops/svn/10422 Author: beckmi Date: 2012-12-17 04:58:36 +0000 (Mon, 17 Dec 2012) Log Message: ----------- Updating to 1.09 Final Modified Paths: -------------- XoopsModules/wflink/trunk/htdocs/modules/wflinks/admin/admin_header.php XoopsModules/wflink/trunk/htdocs/modules/wflinks/class/class_thumbnail.php XoopsModules/wflink/trunk/htdocs/modules/wflinks/docs/changelog.txt XoopsModules/wflink/trunk/htdocs/modules/wflinks/docs/readme.txt XoopsModules/wflink/trunk/htdocs/modules/wflinks/include/config.php XoopsModules/wflink/trunk/htdocs/modules/wflinks/include/functions.php XoopsModules/wflink/trunk/htdocs/modules/wflinks/language/english/admin.php XoopsModules/wflink/trunk/htdocs/modules/wflinks/xoops_version.php Modified: XoopsModules/wflink/trunk/htdocs/modules/wflinks/admin/admin_header.php =================================================================== --- XoopsModules/wflink/trunk/htdocs/modules/wflinks/admin/admin_header.php 2012-12-16 23:34:17 UTC (rev 10421) +++ XoopsModules/wflink/trunk/htdocs/modules/wflinks/admin/admin_header.php 2012-12-17 04:58:36 UTC (rev 10422) @@ -44,7 +44,7 @@ if (file_exists($GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php'))) { include_once $GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php'); } else { - redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, FALSE); + redirect_header("../../../admin.php", 5, _AM_WFL_MODULEADMIN_MISSING, FALSE); } include XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/include/config.php'; Modified: XoopsModules/wflink/trunk/htdocs/modules/wflinks/class/class_thumbnail.php =================================================================== --- XoopsModules/wflink/trunk/htdocs/modules/wflinks/class/class_thumbnail.php 2012-12-16 23:34:17 UTC (rev 10421) +++ XoopsModules/wflink/trunk/htdocs/modules/wflinks/class/class_thumbnail.php 2012-12-17 04:58:36 UTC (rev 10422) @@ -4,12 +4,12 @@ */ if ( !defined( '_PATH' ) ) { - define("_PATH", XOOPS_ROOT_PATH ); + define( "_PATH", XOOPS_ROOT_PATH ); } if ( !defined( 'DEFAULT_PATH' ) ) { - define("DEFAULT_PATH", XOOPS_UPLOAD_URL . "/blank.gif" ); + define( "DEFAULT_PATH", XOOPS_UPLOAD_URL . "/blank.gif" ); } /** Modified: XoopsModules/wflink/trunk/htdocs/modules/wflinks/docs/changelog.txt =================================================================== --- XoopsModules/wflink/trunk/htdocs/modules/wflinks/docs/changelog.txt 2012-12-16 23:34:17 UTC (rev 10421) +++ XoopsModules/wflink/trunk/htdocs/modules/wflinks/docs/changelog.txt 2012-12-17 04:58:36 UTC (rev 10422) @@ -1,13 +1,19 @@ ========================================================= -25-06-2012 1.09 Beta 2 +2012-12-16 1.09 Final ========================================================= +- finalizing version (mamba) + +========================================================= +2012-06-25 1.09 Beta 2 +========================================================= + - changed editor list selection to dynamic (mamba) - replace http://mozshot.nemui.org with http://open.thumbshots.org for screenshots (Shine) - fixed bug related to $wfmyts constructor overriding (mamba) ========================================================= -24-06-2012 1.09 Beta 1 +2012-06-24 1.09 Beta 1 ========================================================= Shine and Mamba: Fixed: Admin section: Modified: XoopsModules/wflink/trunk/htdocs/modules/wflinks/docs/readme.txt =================================================================== --- XoopsModules/wflink/trunk/htdocs/modules/wflinks/docs/readme.txt 2012-12-16 23:34:17 UTC (rev 10421) +++ XoopsModules/wflink/trunk/htdocs/modules/wflinks/docs/readme.txt 2012-12-17 04:58:36 UTC (rev 10422) @@ -1,5 +1,5 @@ ================== - WF-LNIKS 1.08 + WF-LINKS 1.09 ================== 1. INSTALLING WF-LINKS @@ -8,7 +8,7 @@ ---------------------- Upload the folder 'wflinks' to the folder 'modules' on your server. Upload the folder 'images' to the folder 'uploads' on your server and check that the folder including sub-folders are CHMOD 777. -Go to the admin panel, choose Modules -> Administration and install WF-Links 1.3c as any other Xoops module. +Go to the admin panel, choose Modules -> Administration and install WF-Links 1.09 as any other Xoops module. **Upgrade from WF-Links prior to version 1.05 RC5** Modified: XoopsModules/wflink/trunk/htdocs/modules/wflinks/include/config.php =================================================================== --- XoopsModules/wflink/trunk/htdocs/modules/wflinks/include/config.php 2012-12-16 23:34:17 UTC (rev 10421) +++ XoopsModules/wflink/trunk/htdocs/modules/wflinks/include/config.php 2012-12-17 04:58:36 UTC (rev 10422) @@ -13,12 +13,12 @@ * WARNING: ONCE SET DO NOT CHANGE! Improper use will render this module useless and unworkable. * Only Change if you know what you are doing. */ -if ( !defined( "WFLINKS_BROKEN" ) ) define("WFLINKS_BROKEN", "wflinks_broken" ); -if ( !defined( "WFLINKS_CAT" ) ) define("WFLINKS_CAT", "wflinks_cat" ); -if ( !defined( "WFLINKS_LINKS" ) ) define("WFLINKS_LINKS", "wflinks_links" ); -if ( !defined( "WFLINKS_MOD" ) ) define("WFLINKS_MOD", "wflinks_mod" ); -if ( !defined( "WFLINKS_VOTEDATA" ) ) define("WFLINKS_VOTEDATA", "wflinks_votedata" ); -if ( !defined( "WFLINKS_INDEXPAGE" ) ) define("WFLINKS_INDEXPAGE", "wflinks_indexpage" ); -if ( !defined( "WFLINKS_ALTCAT" ) ) define("WFLINKS_ALTCAT", "wflinks_altcat" ); +if ( !defined( "WFLINKS_BROKEN" ) ) define("WFLINKS_BROKEN", "wflinks_broken"); +if ( !defined( "WFLINKS_CAT" ) ) define("WFLINKS_CAT", "wflinks_cat"); +if ( !defined( "WFLINKS_LINKS" ) ) define("WFLINKS_LINKS", "wflinks_links"); +if ( !defined( "WFLINKS_MOD" ) ) define("WFLINKS_MOD", "wflinks_mod"); +if ( !defined( "WFLINKS_VOTEDATA" ) ) define("WFLINKS_VOTEDATA", "wflinks_votedata"); +if ( !defined( "WFLINKS_INDEXPAGE" ) ) define("WFLINKS_INDEXPAGE", "wflinks_indexpage"); +if ( !defined( "WFLINKS_ALTCAT" ) ) define("WFLINKS_ALTCAT", "wflinks_altcat"); ?> \ No newline at end of file Modified: XoopsModules/wflink/trunk/htdocs/modules/wflinks/include/functions.php =================================================================== --- XoopsModules/wflink/trunk/htdocs/modules/wflinks/include/functions.php 2012-12-16 23:34:17 UTC (rev 10421) +++ XoopsModules/wflink/trunk/htdocs/modules/wflinks/include/functions.php 2012-12-17 04:58:36 UTC (rev 10422) @@ -700,13 +700,13 @@ echo "</select>"; } -function wfl_uploading( $_FILES, $uploaddir = "uploads", $allowed_mimetypes = '', $redirecturl = "index.php", $num = 0, $redirect = 0, $usertype = 1 ) { - global $_FILES, $xoopsConfig, $xoopsModuleConfig, $xoopsModule; +function wfl_uploading( $FILES, $uploaddir = "uploads", $allowed_mimetypes = '', $redirecturl = "index.php", $num = 0, $redirect = 0, $usertype = 1 ) { + global $FILES, $xoopsConfig, $xoopsModuleConfig, $xoopsModule; $down = array(); include_once XOOPS_ROOT_PATH . "/modules/" . $xoopsModule -> getVar( 'dirname' ) . "/class/uploader.php"; if ( empty( $allowed_mimetypes ) ) { - $allowed_mimetypes = wfl_retmime( $_FILES['userfile']['name'], $usertype ); + $allowed_mimetypes = wfl_retmime( $FILES['userfile']['name'], $usertype ); } $upload_dir = XOOPS_ROOT_PATH . "/" . $uploaddir . "/"; @@ -1449,7 +1449,7 @@ function wfl_getbanner_from_id_banner($banner_id) { ###### Hack by www.stefanosilvestrini.com ###### global $xoopsConfig; -$db =& Database::getInstance(); +$db =& XoopsDatabaseFactory::getDatabaseConnection(); $bresult = $db -> query("SELECT COUNT(*) FROM " . $db -> prefix('banner') . " WHERE bid=" . $banner_id); list ($numrows) = $db -> fetchRow($bresult); if ( $numrows > 1 ) { @@ -1498,7 +1498,7 @@ function wfl_getbanner_from_id_client($client_id) { ###### Hack by www.stefanosilvestrini.com ###### global $xoopsConfig; -$db =& Database::getInstance(); +$db =& XoopsDatabaseFactory::getDatabaseConnection(); $bresult = $db -> query("SELECT COUNT(*) FROM " . $db -> prefix('banner') . " WHERE cid=" . $client_id); list ($numrows) = $db -> fetchRow($bresult); if ( $numrows > 1 ) { Modified: XoopsModules/wflink/trunk/htdocs/modules/wflinks/language/english/admin.php =================================================================== --- XoopsModules/wflink/trunk/htdocs/modules/wflinks/language/english/admin.php 2012-12-16 23:34:17 UTC (rev 10421) +++ XoopsModules/wflink/trunk/htdocs/modules/wflinks/language/english/admin.php 2012-12-17 04:58:36 UTC (rev 10422) @@ -485,4 +485,5 @@ define("_AM_WFL_SHOWNOIMAGE","Show no image"); define("_AM_WFL_NOSELECTION","No selection"); define("_AM_WFL_NOFILESELECT","No selected file"); -?> \ No newline at end of file +?> +define( "_AM_WFL_MODULEADMIN_MISSING", 'Error: The ModuleAdmin class is missing. Please install the ModuleAdmin Class into /Frameworks (see /docs/readme.txt)'); \ No newline at end of file Modified: XoopsModules/wflink/trunk/htdocs/modules/wflinks/xoops_version.php =================================================================== --- XoopsModules/wflink/trunk/htdocs/modules/wflinks/xoops_version.php 2012-12-16 23:34:17 UTC (rev 10421) +++ XoopsModules/wflink/trunk/htdocs/modules/wflinks/xoops_version.php 2012-12-17 04:58:36 UTC (rev 10422) @@ -13,7 +13,7 @@ $modversion['name'] = _MI_WFL_NAME; $modversion['version'] = "1.09"; -$modversion['status'] = "RC"; +//$modversion['status'] = "RC"; $modversion['description'] = _MI_WFL_DESC; $modversion['help'] = 'page=help'; $modversion['license'] = 'GNU GPL 2.0'; @@ -30,8 +30,8 @@ $modversion['teammembers'] = "amayer, bender, david, dqflyer, draven, frankblack, gladiac, hervet, jackj, mercibe, John N, phppp, predator, reliableSol, tom, xpider, xtheme, mcdonald (version 1.03B and higher)"; $modversion['author_realname'] = "WF-Project Team"; $modversion['author_email'] = ""; -$modversion['demo_site_url'] = ""; -$modversion['demo_site_name'] = "WF-Projects"; +//$modversion['demo_site_url'] = ""; +//$modversion['demo_site_name'] = "WF-Projects"; $modversion['support_site_url'] = "www.xoops.org"; $modversion['support_site_name'] = "XOOPS Project"; $modversion['submit_bug'] = "www.xoops.org/modules/newbb"; @@ -50,12 +50,12 @@ $modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32'; //about -$modversion['release_date'] = '2012/06/26'; +$modversion['release_date'] = '2012/12/16'; $modversion["module_website_url"] = "www.xoops.org/"; $modversion["module_website_name"] = "XOOPS"; -$modversion["module_status"] = "RC"; +$modversion["module_status"] = "Final"; $modversion['min_php'] = '5.2'; -$modversion['min_xoops'] = "2.5"; +$modversion['min_xoops'] = "2.5.5"; $modversion['min_admin'] = '1.1'; $modversion['min_db'] = array( 'mysql' => '5.0.7', |
From: <tr...@us...> - 2012-12-16 23:34:21
|
Revision: 10421 http://sourceforge.net/p/xoops/svn/10421 Author: trabis Date: 2012-12-16 23:34:17 +0000 (Sun, 16 Dec 2012) Log Message: ----------- Boosting performance by adding configs cache for modules/system and carefulll assigment of smarty variables in theme.php. YEAHHH!! Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/logger/plugins/pqp/logger.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/logger/plugins/pqp/templates/pqp.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2012-12-16 20:10:15 UTC (rev 10420) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2012-12-16 23:34:17 UTC (rev 10421) @@ -125,13 +125,9 @@ $inst->path = XOOPS_ADMINTHEME_PATH . '/' . $inst->folderName; $inst->url = XOOPS_ADMINTHEME_URL . '/' . $inst->folderName; $inst->template->assign(array( - 'theme_path' => $inst->path, - 'theme_tpl' => $inst->path . '/xotpl', - 'theme_url' => $inst->url, - 'theme_img' => $inst->url . '/img', - 'theme_icons' => $inst->url . '/icons', - 'theme_css' => $inst->url . '/css', - 'theme_js' => $inst->url . '/js', + 'theme_path' => $inst->path, 'theme_tpl' => $inst->path . '/xotpl', 'theme_url' => $inst->url, + 'theme_img' => $inst->url . '/img', 'theme_icons' => $inst->url . '/icons', + 'theme_css' => $inst->url . '/css', 'theme_js' => $inst->url . '/js', 'theme_lang' => $inst->url . '/language', )); @@ -238,9 +234,7 @@ * @var array */ public $metas = array( - 'meta' => array(), - 'link' => array(), - 'script' => array() + 'meta' => array(), 'link' => array(), 'script' => array() ); /** @@ -300,60 +294,54 @@ $this->template->currentTheme = $this; $this->template->assign_by_ref('xoTheme', $this); $this->template->assign(array( - 'xoops_theme' => $xoops->getConfig('theme_set'), - 'xoops_imageurl' => XOOPS_THEME_URL . '/' . $xoops->getConfig('theme_set') . '/', - 'xoops_themecss' => $xoops->getCss($xoops->getConfig('theme_set')), + 'xoops_theme' => $xoops->getConfig('theme_set'), + 'xoops_imageurl' => XOOPS_THEME_URL . '/' . $xoops->getConfig('theme_set') . '/', + 'xoops_themecss' => $xoops->getCss($xoops->getConfig('theme_set')), 'xoops_requesturi' => htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES), - 'xoops_sitename' => htmlspecialchars($xoops->getConfig('sitename'), ENT_QUOTES), - 'xoops_slogan' => htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES), - 'xoops_dirname' => $xoops->moduleDirname, - 'xoops_banner' => $this->renderBanner ? $xoops->getBanner() : ' ', - 'xoops_pagetitle' => $xoops->isModule() ? $xoops->module->getVar('name') : htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES) + 'xoops_sitename' => htmlspecialchars($xoops->getConfig('sitename'), ENT_QUOTES), + 'xoops_slogan' => htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES), + 'xoops_dirname' => $xoops->moduleDirname, + 'xoops_banner' => $this->renderBanner ? $xoops->getBanner() : ' ', + 'xoops_pagetitle' => $xoops->isModule() ? $xoops->module->getVar('name') : htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES) )); $this->template->assign(array( - 'theme_path' => $this->path, - 'theme_tpl' => $this->path . '/xotpl', - 'theme_url' => $this->url, - 'theme_img' => $this->url . '/img', - 'theme_icons' => $this->url . '/icons', - 'theme_css' => $this->url . '/css', - 'theme_js' => $this->url . '/js', + 'theme_path' => $this->path, 'theme_tpl' => $this->path . '/xotpl', 'theme_url' => $this->url, + 'theme_img' => $this->url . '/img', 'theme_icons' => $this->url . '/icons', + 'theme_css' => $this->url . '/css', 'theme_js' => $this->url . '/js', 'theme_lang' => $this->url . '/language', )); if ($xoops->isUser()) { $this->template->assign(array( - 'xoops_isuser' => true, - 'xoops_avatar' => XOOPS_UPLOAD_URL . "/" . $xoops->user->getVar('user_avatar'), - 'xoops_userid' => $xoops->user->getVar('uid'), - 'xoops_uname' => $xoops->user->getVar('uname'), - 'xoops_name' => $xoops->user->getVar('name'), - 'xoops_isadmin' => $xoops->isAdmin(), + 'xoops_isuser' => true, + 'xoops_avatar' => XOOPS_UPLOAD_URL . "/" . $xoops->user->getVar('user_avatar'), + 'xoops_userid' => $xoops->user->getVar('uid'), 'xoops_uname' => $xoops->user->getVar('uname'), + 'xoops_name' => $xoops->user->getVar('name'), 'xoops_isadmin' => $xoops->isAdmin(), 'xoops_usergroups' => $xoops->user->getGroups() )); } else { $this->template->assign(array( - 'xoops_isuser' => false, - 'xoops_isadmin' => false, - 'xoops_usergroups' => array(XOOPS_GROUP_ANONYMOUS) + 'xoops_isuser' => false, 'xoops_isadmin' => false, 'xoops_usergroups' => array(XOOPS_GROUP_ANONYMOUS) )); } // Meta tags - // todo, check if we can use $xoops->getConfigs() instead - $config_handler = $xoops->getHandlerConfig(); - $criteria = new CriteriaCompo(new Criteria('conf_modid', 1)); - $config = $config_handler->getConfigs($criteria, true); - foreach (array_keys($config) as $i) { - $name = $config[$i]->getVar('conf_name', 'n'); - $value = $config[$i]->getVar('conf_value', 'n'); - if (substr($name, 0, 5) == 'meta_') { - $this->addMeta('meta', substr($name, 5), $value); - } else { - // prefix each tag with 'xoops_' - $this->template->assign("xoops_$name", $value); - } + $metas = array( + 'meta_description', 'meta_robots', 'meta_rating', 'meta_author', 'meta_copyright' + ); + foreach ($metas as $name) { + $this->addMeta('meta', $name, $xoops->getConfig($name)); } + + |
From: <ma...@us...> - 2012-12-16 20:10:17
|
Revision: 10420 http://sourceforge.net/p/xoops/svn/10420 Author: mageg Date: 2012-12-16 20:10:15 +0000 (Sun, 16 Dec 2012) Log Message: ----------- change search to use search module. Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/xoops_version.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/class/plugin/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/class/plugin/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/class/plugin/search.php Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/include/search.php Copied: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/class/plugin/index.html (from rev 10417, XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/class/index.html) =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/class/plugin/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/class/plugin/index.html 2012-12-16 20:10:15 UTC (rev 10420) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/class/plugin/search.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/class/plugin/search.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/class/plugin/search.php 2012-12-16 20:10:15 UTC (rev 10420) @@ -0,0 +1,62 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * XXX + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @since 2.6.0 + * @author Mage Grégory (AKA Mage) + * @version $Id: $ + */ + +defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined"); + +class PageSearchPlugin extends Xoops_Plugin_Abstract implements SearchPluginInterface +{ + public function search($queries, $andor, $limit, $start, $uid) + { + $xoops = Xoops::getInstance(); + $sql = "SELECT content_id, content_title, content_shorttext, content_text, content_author, content_create FROM " . $xoops->db()->prefix("page_content") . " WHERE content_status != 0"; + + if ( $uid != 0 ) { + $sql .= " AND content_author=" . intval($uid); + } + + if ( is_array($queries) && $count = count($queries) ) + { + $sql .= " AND ((content_title LIKE '%$queries[0]%' OR content_text LIKE '%$queries[0]%' OR content_shorttext LIKE '%$queries[0]%')"; + + for ($i=1; $i < $count; $i++) { + $sql .= " $andor "; + $sql .= "(content_title LIKE '%$queries[$i]%' OR content_text LIKE '%$queries[$i]%' OR content_shorttext LIKE '%$queries[$i]%')"; + } + $sql .= ")"; + } + $sql .= " ORDER BY content_create DESC"; + $result = $xoops->db()->queryF($sql, $limit, $start); + + $ret = array(); + $i = 0; + while($myrow = $xoops->db()->fetchArray($result)) { + $ret[$i]["image"] = "images/logo_small.png"; + $ret[$i]["link"] = "viewpage.php?id=" . $myrow["content_id"]; + $ret[$i]["title"] = $myrow["content_title"]; + $ret[$i]["time"] = $myrow["content_create"]; + $ret[$i]["content"] = $myrow["content_text"] . $myrow["content_shorttext"]; + $ret[$i]["uid"] = $myrow["content_author"]; + $i++; + } + return $ret; + return $res; + } +} \ No newline at end of file Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/include/search.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/include/search.php 2012-12-16 19:57:47 UTC (rev 10419) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/include/search.php 2012-12-16 20:10:15 UTC (rev 10420) @@ -1,57 +0,0 @@ -<?php -/* - You may not change or alter any portion of this comment or credits - of supporting developers from this source code or any supporting source code - which is considered copyrighted (c) material of the original comment or credit authors. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -*/ - -/** - * page module - * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package page - * @since 2.6.0 - * @author Mage Gr\xE9gory (AKA Mage) - * @version $Id$ - */ - -function page_search($queryarray, $andor, $limit, $offset, $userid) -{ - $xoops = Xoops::getInstance(); - $sql = "SELECT content_id, content_title, content_shorttext, content_text, content_author, content_create FROM " . $xoops->db()->prefix("page_content") . " WHERE content_status != 0"; - - if ( $userid != 0 ) { - $sql .= " AND content_author=" . intval($userid); - } - - if ( is_array($queryarray) && $count = count($queryarray) ) - { - $sql .= " AND ((content_title LIKE '%$queryarray[0]%' OR content_text LIKE '%$queryarray[0]%' OR content_shorttext LIKE '%$queryarray[0]%')"; - - for ($i=1; $i < $count; $i++) { - $sql .= " $andor "; - $sql .= "(content_title LIKE '%$queryarray[$i]%' OR content_text LIKE '%$queryarray[$i]%' OR content_shorttext LIKE '%$queryarray[$i]%')"; - } - $sql .= ")"; - } - $sql .= " ORDER BY content_create DESC"; - $result = $xoops->db()->queryF($sql, $limit, $offset); - - $ret = array(); - $i = 0; - while($myrow = $xoops->db()->fetchArray($result)) { - $ret[$i]["image"] = "images/logo_small.png"; - $ret[$i]["link"] = "viewpage.php?id=" . $myrow["content_id"]; - $ret[$i]["title"] = $myrow["content_title"]; - $ret[$i]["time"] = $myrow["content_create"]; - $ret[$i]["content"] = $myrow["content_text"] . $myrow["content_shorttext"]; - $ret[$i]["uid"] = $myrow["content_author"]; - $i++; - } - return $ret; -} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/xoops_version.php 2012-12-16 19:57:47 UTC (rev 10419) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/xoops_version.php 2012-12-16 20:10:15 UTC (rev 10420) @@ -16,7 +16,7 @@ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package page * @since 2.6.0 - * @author Mage Gr\xE9gory (AKA Mage) + * @author Mage Gr�gory (AKA Mage) * @version $Id$ */ $modversion = array(); @@ -57,21 +57,16 @@ $modversion['hasAdmin'] = 1; $modversion['adminindex'] = 'admin/index.php'; $modversion['adminmenu'] = 'admin/menu.php'; - + // Scripts to run upon installation or update $modversion['onInstall'] = 'include/install.php'; // JQuery $modversion['jquery'] = 1; - -// Menu + +// Menu $modversion['hasMain'] = 1; -// Search -$modversion['hasSearch'] = 1; -$modversion['search']['file'] = 'include/search.php'; -$modversion['search']['func'] = 'page_search'; - // Mysql file $modversion['sqlfile']['mysql'] = "sql/mysql.sql"; @@ -84,6 +79,7 @@ $modversion['templates'][] = array( 'file' => 'page_index.html', 'description' => '' ); $modversion['templates'][] = array( 'file' => 'page_viewpage.html', 'description' => '' ); $modversion['templates'][] = array( 'file' => 'page_print.html', 'description' => '' ); +$modversion['templates'][] = array( 'file' => 'page_pdf.html', 'description' => '' ); // blocks $i = 0; @@ -93,7 +89,7 @@ $modversion['blocks'][$i]['show_func'] = 'page_blocks_show'; $modversion['blocks'][$i]['edit_func'] = 'page_blocks_edit'; $modversion['blocks'][$i]['options'] = 'random|5|19|0'; -$modversion['blocks'][$i]['template'] = 'page_blocks_random.html'; +$modversion['blocks'][$i]['template'] = 'page_blocks_random.html'; $i++; /*$modversion['blocks'][$i]['file'] = 'page_blocks.php'; $modversion['blocks'][$i]['name'] = _MI_PAGE_BLOCKS_ID; @@ -137,7 +133,6 @@ $modversion['config'][$i]['valuetype'] = 'text'; $modversion['config'][$i]['default'] = 'dhtmltextarea'; $modversion['config'][$i]['options'] = $editors; -$modversion['config'][$i]['category'] = 'global'; $i++; $modversion['config'][$i]['name'] = 'page_adminpager'; $modversion['config'][$i]['title'] = '_MI_PAGE_PREFERENCE_ADMINPAGER'; |
From: <tr...@us...> - 2012-12-16 19:57:49
|
Revision: 10419 http://sourceforge.net/p/xoops/svn/10419 Author: trabis Date: 2012-12-16 19:57:47 +0000 (Sun, 16 Dec 2012) Log Message: ----------- Updating caches after module uninstall Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/system.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions/main.php 2012-12-16 19:28:32 UTC (rev 10418) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions/main.php 2012-12-16 19:57:47 UTC (rev 10419) @@ -138,6 +138,8 @@ } $folder = array(1, 3); $system->CleanCache($folder); + //Set active modules in cache folder + $xoops->setActiveModules(); // Call Footer $xoops->footer(); break; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php 2012-12-16 19:28:32 UTC (rev 10418) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php 2012-12-16 19:57:47 UTC (rev 10419) @@ -228,6 +228,8 @@ } $folder = array(1, 3); $system->CleanCache($folder); + //Set active modules in cache folder + $xoops->setActiveModules(); // Call Footer $xoops->footer(); break; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/system.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/system.php 2012-12-16 19:28:32 UTC (rev 10418) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/system.php 2012-12-16 19:57:47 UTC (rev 10419) @@ -150,6 +150,7 @@ $xoops = Xoops::getInstance(); $path = $xoops->path('modules/system/admin/' . $version . '/xoops_version.php'); if (file_exists($path)) { + $modversion = array(); include $path; $retvalue = $modversion[$value]; $tblVersion[$version . '.' . $value] = $retvalue; |
From: <tr...@us...> - 2012-12-16 19:28:34
|
Revision: 10418 http://sourceforge.net/p/xoops/svn/10418 Author: trabis Date: 2012-12-16 19:28:32 +0000 (Sun, 16 Dec 2012) Log Message: ----------- Lowering memory usage by moving cache layer to Xoops class Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/config.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/config.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/config.php 2012-12-16 19:25:33 UTC (rev 10417) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/config.php 2012-12-16 19:28:32 UTC (rev 10418) @@ -198,21 +198,16 @@ */ public function getConfigsByModule($module = 0) { - static $_cachedConfigs; - if (!empty($_cachedConfigs[$module])) { - return $_cachedConfigs[$module]; - } else { - $ret = array(); - $criteria = new Criteria('conf_modid', intval($module)); - $configs = $this->getConfigs($criteria, true); - if (is_array($configs)) { - foreach (array_keys($configs) as $i) { - $ret[$configs[$i]->getVar('conf_name')] = $configs[$i]->getConfValueForOutput(); - } + $ret = array(); + $criteria = new Criteria('conf_modid', intval($module)); + $configs = $this->getConfigs($criteria, true); + if (is_array($configs)) { + foreach (array_keys($configs) as $i) { + $ret[$configs[$i]->getVar('conf_name')] = $configs[$i]->getConfValueForOutput(); } - $_cachedConfigs[$module] = $ret; - return $_cachedConfigs[$module]; } + $_cachedConfigs[$module] = $ret; + return $_cachedConfigs[$module]; } /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php 2012-12-16 19:25:33 UTC (rev 10417) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php 2012-12-16 19:28:32 UTC (rev 10418) @@ -1530,10 +1530,13 @@ */ public function getConfigs() { - $configs = $this->getHandlerConfig() - ->getConfigsByModule(1); - $this->_systemConfigs = array_merge($this->_systemConfigs, $configs); - $this->config =& $this->_systemConfigs; //for compatibilty + static $configsFetched = false; + if (!$configsFetched) { + $configs = $this->getHandlerConfig()->getConfigsByModule(1); + $this->_systemConfigs = array_merge($this->_systemConfigs, $configs); + $this->config =& $this->_systemConfigs; //for compatibilty + $configsFetched = true; + } return $this->_systemConfigs; } |
From: <be...@us...> - 2012-12-16 19:25:36
|
Revision: 10417 http://sourceforge.net/p/xoops/svn/10417 Author: beckmi Date: 2012-12-16 19:25:33 +0000 (Sun, 16 Dec 2012) Log Message: ----------- fixing missing $xoops Modified Paths: -------------- XoopsModules26/news/trunk/news/admin/index.php Modified: XoopsModules26/news/trunk/news/admin/index.php =================================================================== --- XoopsModules26/news/trunk/news/admin/index.php 2012-12-16 19:24:37 UTC (rev 10416) +++ XoopsModules26/news/trunk/news/admin/index.php 2012-12-16 19:25:33 UTC (rev 10417) @@ -276,7 +276,7 @@ { include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; // xoops_cp_header(); - //$xoops->header($xoops->getOption('template_main')); + $xoops = Xoops::getInstance(); $xoops->header('template_main'); $pruneAdmin = new XoopsModuleAdmin(); echo $pruneAdmin->renderNavigation('index.php?op=prune'); @@ -310,9 +310,8 @@ // A confirmation is asked before to prune stories function ConfirmBeforeToPrune() { - global $dateformat; + global $dateformat, $xoops; $story = new NewsStory(); - //$xoops->header($xoops->getOption('template_main')); $xoops->header('template_main'); $topiclist=''; if(isset($_POST['pruned_topics'])) { @@ -339,7 +338,7 @@ // Effectively delete stories (published before a date), no more confirmation function PruneNews() { - $story = new NewsStory(); + $story = new NewsStory(); $timestamp=intval($_POST['prune_date']); $expired= intval($_POST['expired']); $topiclist=''; @@ -349,7 +348,7 @@ if(intval($_POST['ok'])==1) { $story = new NewsStory(); - //$xoops->header($xoops->getOption('template_main')); + $xoops = Xoops::getInstance(); $xoops->header('template_main'); $count=$story->GetCountStoriesPublishedBefore($timestamp,$expired,$topiclist); $msg=sprintf(_AM_NEWS_PRUNE_DELETED,$count); @@ -374,6 +373,7 @@ { include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; //$xoops->header($xoops->getOption('template_main')); + $xoops = Xoops::getInstance(); $xoops->header('template_main'); $newsletterAdmin = new XoopsModuleAdmin(); echo $newsletterAdmin->renderNavigation('index.php?op=configurenewsletter'); @@ -417,7 +417,7 @@ */ function LaunchNewsletter() { - global $xoopsConfig, $dateformat; + global $xoopsConfig, $dateformat, $xoops; $xoops->header('template_main'); $newsletterAdmin = new XoopsModuleAdmin(); echo $newsletterAdmin->renderNavigation('index.php?op=configurenewsletter'); @@ -491,6 +491,7 @@ function NewsExport() { include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; + $xoops = Xoops::getInstance(); $xoops->header('template_main'); $exportAdmin = new XoopsModuleAdmin(); echo $exportAdmin->renderNavigation('index.php?op=export'); @@ -534,6 +535,7 @@ // Launch stories export (to the xml's format) function LaunchExport() { + $xoops = Xoops::getInstance(); $xoops->header('template_main'); $exportAdmin = new XoopsModuleAdmin(); echo $exportAdmin->renderNavigation('index.php?op=export'); @@ -965,7 +967,7 @@ // Delete a topic and its subtopics and its stories and the related stories function delTopic() { - global $xoopsDB, $xoopsModule; + global $xoopsDB, $xoopsModule, $xoops; if (!isset($_POST['ok'])) { $xoops->header('template_main'); echo '<h4>' . _AM_CONFIG . '</h4>'; @@ -1113,7 +1115,7 @@ */ function Stats() { - global $xoopsModule, $xoopsConfig; + global $xoopsModule, $xoopsConfig, $xoops; $xoops->header('template_main'); $myts = MyTextSanitizer::getInstance(); if (file_exists(XOOPS_ROOT_PATH.'/modules/news/language/'.$xoopsConfig['language'].'/main.php')) { @@ -1258,7 +1260,7 @@ function Metagen() { include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; - global $xoopsModule, $xoopsConfig, $xoopsModuleConfig, $cfg; + global $xoopsModule, $xoopsConfig, $xoopsModuleConfig, $cfg, $xoops; $xoops->header('template_main'); $myts = MyTextSanitizer::getInstance(); if (file_exists(XOOPS_ROOT_PATH.'/modules/news/language/'.$xoopsConfig['language'].'/main.php')) { |
From: <be...@us...> - 2012-12-16 19:24:39
|
Revision: 10416 http://sourceforge.net/p/xoops/svn/10416 Author: beckmi Date: 2012-12-16 19:24:37 +0000 (Sun, 16 Dec 2012) Log Message: ----------- fixing missing $xoops Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/index.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/index.php 2012-12-16 19:11:53 UTC (rev 10415) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/index.php 2012-12-16 19:24:37 UTC (rev 10416) @@ -276,7 +276,7 @@ { include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; // xoops_cp_header(); - //$xoops->header($xoops->getOption('template_main')); + $xoops = Xoops::getInstance(); $xoops->header('template_main'); $pruneAdmin = new XoopsModuleAdmin(); echo $pruneAdmin->renderNavigation('index.php?op=prune'); @@ -310,9 +310,8 @@ // A confirmation is asked before to prune stories function ConfirmBeforeToPrune() { - global $dateformat; + global $dateformat, $xoops; $story = new NewsStory(); - //$xoops->header($xoops->getOption('template_main')); $xoops->header('template_main'); $topiclist=''; if(isset($_POST['pruned_topics'])) { @@ -339,7 +338,7 @@ // Effectively delete stories (published before a date), no more confirmation function PruneNews() { - $story = new NewsStory(); + $story = new NewsStory(); $timestamp=intval($_POST['prune_date']); $expired= intval($_POST['expired']); $topiclist=''; @@ -349,7 +348,7 @@ if(intval($_POST['ok'])==1) { $story = new NewsStory(); - //$xoops->header($xoops->getOption('template_main')); + $xoops = Xoops::getInstance(); $xoops->header('template_main'); $count=$story->GetCountStoriesPublishedBefore($timestamp,$expired,$topiclist); $msg=sprintf(_AM_NEWS_PRUNE_DELETED,$count); @@ -374,6 +373,7 @@ { include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; //$xoops->header($xoops->getOption('template_main')); + $xoops = Xoops::getInstance(); $xoops->header('template_main'); $newsletterAdmin = new XoopsModuleAdmin(); echo $newsletterAdmin->renderNavigation('index.php?op=configurenewsletter'); @@ -417,7 +417,7 @@ */ function LaunchNewsletter() { - global $xoopsConfig, $dateformat; + global $xoopsConfig, $dateformat, $xoops; $xoops->header('template_main'); $newsletterAdmin = new XoopsModuleAdmin(); echo $newsletterAdmin->renderNavigation('index.php?op=configurenewsletter'); @@ -491,6 +491,7 @@ function NewsExport() { include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; + $xoops = Xoops::getInstance(); $xoops->header('template_main'); $exportAdmin = new XoopsModuleAdmin(); echo $exportAdmin->renderNavigation('index.php?op=export'); @@ -534,6 +535,7 @@ // Launch stories export (to the xml's format) function LaunchExport() { + $xoops = Xoops::getInstance(); $xoops->header('template_main'); $exportAdmin = new XoopsModuleAdmin(); echo $exportAdmin->renderNavigation('index.php?op=export'); @@ -965,7 +967,7 @@ // Delete a topic and its subtopics and its stories and the related stories function delTopic() { - global $xoopsDB, $xoopsModule; + global $xoopsDB, $xoopsModule, $xoops; if (!isset($_POST['ok'])) { $xoops->header('template_main'); echo '<h4>' . _AM_CONFIG . '</h4>'; @@ -1113,7 +1115,7 @@ */ function Stats() { - global $xoopsModule, $xoopsConfig; + global $xoopsModule, $xoopsConfig, $xoops; $xoops->header('template_main'); $myts = MyTextSanitizer::getInstance(); if (file_exists(XOOPS_ROOT_PATH.'/modules/news/language/'.$xoopsConfig['language'].'/main.php')) { @@ -1258,7 +1260,7 @@ function Metagen() { include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; - global $xoopsModule, $xoopsConfig, $xoopsModuleConfig, $cfg; + global $xoopsModule, $xoopsConfig, $xoopsModuleConfig, $cfg, $xoops; $xoops->header('template_main'); $myts = MyTextSanitizer::getInstance(); if (file_exists(XOOPS_ROOT_PATH.'/modules/news/language/'.$xoopsConfig['language'].'/main.php')) { |
From: <be...@us...> - 2012-12-16 19:12:00
|
Revision: 10415 http://sourceforge.net/p/xoops/svn/10415 Author: beckmi Date: 2012-12-16 19:11:53 +0000 (Sun, 16 Dec 2012) Log Message: ----------- Adding News module Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/admin_footer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/admin_header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/amsimport.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/groupperms.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/upgrade.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/archive.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/article.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/backendt.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/blocks/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/blocks/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/blocks/news_archives.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/blocks/news_bigstory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/blocks/news_block_tag.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/blocks/news_moderate.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/blocks/news_randomnews.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/blocks/news_top.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/blocks/news_topics.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/blocks/news_topicsnav.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/blacklist.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/class.mimetype.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/class.newsstory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/class.newstopic.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/class.sfiles.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/keyhighlighter.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/news_stories.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/news_topics.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/registryfile.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/tree.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/Canvas.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/Dimension.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/Exception.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/FileMapperFactory.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/Image.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/OpFactory.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/PaletteImage.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/TrueColorImage.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/WideImage.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/fonts/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/fonts/Font_GDF.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/fonts/Font_TTF.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/mappers/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/mappers/ImageFileMapper_GD.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/mappers/ImageFileMapper_GD2.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/mappers/ImageFileMapper_GIF.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/mappers/ImageFileMapper_JPEG.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/mappers/ImageFileMapper_PNG.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/operations/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/operations/ApplyConvolution.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/operations/ApplyFilter.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/operations/ApplyMask.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/operations/AsGrayscale.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/operations/CopyChannelsPalette.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/operations/CopyChannelsTrueColor.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/operations/CorrectGamma.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/operations/Crop.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/operations/Flip.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/operations/GetMask.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/operations/Merge.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/operations/Mirror.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/operations/Resize.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/operations/Rotate.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/wideimage/operations/Unsharp.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/xoopsstory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/xoopstopic.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/class/xoopstree.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/comment_delete.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/comment_edit.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/comment_new.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/comment_post.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/comment_reply.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/config.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/css/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/css/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/css/print.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/css/style.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/docs/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/docs/changelog.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/docs/credits.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/docs/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/docs/install.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/docs/lang.diff XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/docs/lang_diff.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/docs/licence.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/docs/readme.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/docs/upgrade.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/extra/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/extra/modules/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/extra/modules/tag/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/extra/modules/tag/plugin/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/extra/modules/tag/plugin/news.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/chinese.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/ex.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/courier.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/helvetica.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/helveticab.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/helveticabi.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/helveticai.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/cp1250.map XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/cp1251.map XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/cp1252.map XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/cp1253.map XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/cp1254.map XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/cp1255.map XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/cp1257.map XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/cp1258.map XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/cp874.map XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/iso-8859-1.map XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/iso-8859-11.map XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/iso-8859-15.map XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/iso-8859-16.map XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/iso-8859-2.map XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/iso-8859-4.map XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/iso-8859-5.map XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/iso-8859-7.map XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/iso-8859-9.map XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/koi8-r.map XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/koi8-u.map XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/makefont/makefont.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/symbol.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/times.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/timesb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/timesbi.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/timesi.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/font/zapfdingbats.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/fpdf.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/fpdf.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/gif.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/japanese.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/korean.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/language/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/language/english.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/language/french.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/language/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/language/japanese.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/language/korean.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/language/schinese.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/language/tchinese.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/makepdf_class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/fpdf/makepdf_config.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/active.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/bg.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/dojo/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/dojo/articles.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/dojo/export.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/dojo/help.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/dojo/home.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/dojo/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/dojo/maintain.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/dojo/metagen.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/dojo/newsletter.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/dojo/options.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/dojo/permissions.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/dojo/purge.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/dojo/statistics.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/dojo/topics.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/dojo/update.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/hover.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/left_both.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/news.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/news_slogo.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/right_both.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/selected.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/selectedEnd.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/selectedStart.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/selected_left_F90.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/selected_right_F90.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/topics/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/topics/blank.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/topics/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/topics/xoops.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/unselected.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/unselectedEnd.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/unselected_left.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/images/unselected_right.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/include/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/include/comment_functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/include/functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/include/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/include/install_function.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/include/notification.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/include/pagenav.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/include/search.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/include/storyform.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/include/storyform.original.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/include/update_function.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/dojo.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/a11y.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/html/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/html/__package__.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/html/color.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/html/common.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/html/display.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/html/iframe.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/html/images/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/html/layout.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/html/metrics.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/html/selection.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/html/shadow.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/html/style.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/html/util.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lang/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lang/__package__.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lang/array.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lang/assert.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lang/common.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lang/declare.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lang/extras.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lang/func.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lang/repr.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lang/timing/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lang/timing/Streamer.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lang/timing/Timer.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lang/timing/__package__.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lang/type.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lfx/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lfx/Animation.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lfx/__package__.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lfx/extras.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lfx/html.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lfx/rounded.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lfx/shadow.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/lfx/toggle.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/ns.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/uri/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/uri/Uri.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/uri/__package__.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/widget/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/widget/DomWidget.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/widget/FisheyeList.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/widget/HtmlWidget.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/widget/Manager.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/widget/Parse.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/widget/Widget.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/widget/__package__.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/widget/templates/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/widget/templates/FisheyeList.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/widget/templates/images/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/widget/templates/images/tab_close.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/xml/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/xml/Parse.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/xml/XslTransform.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/js/src/xml/__package__.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/english/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/english/blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/english/help/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/english/help/help.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/english/help/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/english/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/english/mail_template/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/english/mail_template/category_newstory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/english/mail_template/global_newcategory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/english/mail_template/global_newstory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/english/mail_template/global_storysubmit_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/english/mail_template/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/english/mail_template/story_approve_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/english/mail_template/topic_newstory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/english/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/english/newsletter.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/englishUTF8/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/englishUTF8/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/englishUTF8/blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/englishUTF8/help/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/englishUTF8/help/help.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/englishUTF8/help/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/englishUTF8/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/englishUTF8/mail_template/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/englishUTF8/mail_template/category_newstory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/englishUTF8/mail_template/global_newcategory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/englishUTF8/mail_template/global_newstory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/englishUTF8/mail_template/global_storysubmit_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/englishUTF8/mail_template/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/englishUTF8/mail_template/story_approve_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/englishUTF8/mail_template/topic_newstory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/englishUTF8/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/englishUTF8/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/englishUTF8/newsletter.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/french/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/french/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/french/blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/french/help/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/french/help/help.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/french/help/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/french/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/french/mail_template/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/french/mail_template/category_newstory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/french/mail_template/global_newcategory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/french/mail_template/global_newstory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/french/mail_template/global_storysubmit_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/french/mail_template/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/french/mail_template/story_approve_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/french/mail_template/topic_newstory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/french/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/french/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/french/newsletter.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/frenchUTF8/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/frenchUTF8/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/frenchUTF8/blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/frenchUTF8/help/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/frenchUTF8/help/help.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/frenchUTF8/help/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/frenchUTF8/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/frenchUTF8/mail_template/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/frenchUTF8/mail_template/category_newstory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/frenchUTF8/mail_template/global_newcategory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/frenchUTF8/mail_template/global_newstory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/frenchUTF8/mail_template/global_storysubmit_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/frenchUTF8/mail_template/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/frenchUTF8/mail_template/story_approve_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/frenchUTF8/mail_template/topic_newstory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/frenchUTF8/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/frenchUTF8/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/frenchUTF8/newsletter.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/german/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/german/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/german/blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/german/help/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/german/help/help.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/german/help/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/german/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/german/mail_template/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/german/mail_template/category_newstory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/german/mail_template/global_newcategory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/german/mail_template/global_newstory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/german/mail_template/global_storysubmit_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/german/mail_template/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/german/mail_template/story_approve_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/german/mail_template/topic_newstory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/german/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/german/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/german/newsletter.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/italian/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/italian/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/italian/aggiornamento.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/italian/blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/italian/help/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/italian/help/help.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/italian/help/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/italian/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/italian/mail_template/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/italian/mail_template/global_newcategory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/italian/mail_template/global_newstory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/italian/mail_template/global_storysubmit_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/italian/mail_template/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/italian/mail_template/story_approve_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/italian/mail_template/topic_newstory_notify.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/italian/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/italian/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/language/italian/newsletter.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/list.tag.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/makepdf.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/micro_summary.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/newsbythisauthor.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/notification_update.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/print.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/ratenews.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/seo/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/seo/.htaccess XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/seo/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/sql/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/sql/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/sql/mysql.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/submit.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/blocks/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/blocks/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/blocks/news_block_archives.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/blocks/news_block_bigstory.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/blocks/news_block_moderate.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/blocks/news_block_randomnews.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/blocks/news_block_top.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/blocks/news_block_topicnav.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/blocks/news_block_topics.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/blocks/news_tag_block_cloud.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/blocks/news_tag_block_top.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/news_archive.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/news_article.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/news_by_this_author.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/news_by_topic.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/news_index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/news_item.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/news_ratenews.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/news_rss.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/news_topics_directory.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/templates/news_whos_who.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/topics_directory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/view.tag.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/visit.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/whoswho.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/xoops_version.php Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/about.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/about.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/about.php 2012-12-16 19:11:53 UTC (rev 10415) @@ -0,0 +1,30 @@ +<?php +/** + * News module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project (http://www.xoops.org) + * @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License} + * @package News + * @since 2.5.0 + * @author XOOPS Development Team + * @version $Id $ + **/ +include_once dirname(__FILE__) . '/admin_header.php'; + +//xoops_cp_header(); +//$xoops->header($xoops->getOption('template_main')); +$xoops->header('template_main'); + +$aboutAdmin = new XoopsModuleAdmin(); + +echo $aboutAdmin->renderNavigation('about.php'); +echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); + +include 'admin_footer.php'; \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/about.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/admin_footer.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/admin_footer.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/admin_footer.php 2012-12-16 19:11:53 UTC (rev 10415) @@ -0,0 +1,25 @@ +<?php +/** + * News module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License + * @package News + * @since 1.6.7 + * @author Mamba (www.xoops.org) + * @version $Id $ +**/ + +echo"<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n" + . " <a href='http://www.xoops.org' rel='external'><img src=" . XOOPS_URL . "/media/xoops/images/xoopsmicrobutton.gif alt='XOOPS' title='XOOPS'></a>\n" + . " </div>\n" . " " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . "</div>"; + +//$xoops->footer($xoops->getOption('template_main')); +$xoops->footer('template_main'); \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/admin_footer.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/admin_header.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/admin_header.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/admin_header.php 2012-12-16 19:11:53 UTC (rev 10415) @@ -0,0 +1,71 @@ +<?php +/** + * News module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License + * @package news + * @since 1.6.7 + * @author XOOPS Development Team + * @version $Id $ +**/ +$path = dirname(dirname(dirname(dirname(__FILE__)))); +include_once $path . '/mainfile.php'; +include_once $path . '/include/cp_functions.php'; +require_once $path . '/include/cp_header.php'; + +global $xoopsModule; + +$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname'); +$thisModulePath = dirname(dirname(__FILE__)); + +//if functions.php file exist +require_once dirname(dirname(__FILE__)) . '/include/functions.php'; +//require_once $thisModulePath . '/include/functions.php'; + +// Load language files +$xoops = Xoops::getInstance(); +$xoops->loadLanguage('admin', $thisModuleDir); +$xoops->loadLanguage('modinfo', $thisModuleDir); +$xoops->loadLanguage('main', $thisModuleDir); + +$pathIcon16 = '../' . $xoopsModule->getInfo('icons16'); +$pathIcon32 = '../' . $xoopsModule->getInfo('icons32'); +$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); + +if (file_exists($GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php'))) { + include_once $GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php'); +} else { + redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, FALSE); +} + + +$topicsHandler= $xoops->getModuleHandler('news_topics','news'); +$storiesHandler= $xoops->getModuleHandler('news_stories','news'); + +$myts = MyTextSanitizer::getInstance(); + +if ($xoopsUser) { + $moduleperm_handler = $xoops->getHandlerGroupperm(); + if (!$moduleperm_handler->checkRight('module_admin', $xoopsModule->getVar( 'mid' ), $xoopsUser->getGroups())) { + redirect_header(XOOPS_URL, 1, _NOPERM); + exit(); + } +} else { + redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); + exit(); +} + +if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { + include_once(XOOPS_ROOT_PATH."/class/template.php"); + $xoopsTpl = new XoopsTpl(); +} + +$xoopsTpl->assign('pathIcon16', $pathIcon16); \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/admin_header.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/amsimport.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/amsimport.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/amsimport.php 2012-12-16 19:11:53 UTC (rev 10415) @@ -0,0 +1,257 @@ +<?php +// $Id$ +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +/** + * AMS Import + * + * This script will import topics, articles, files, links, ratings, comments and notifications from AMS 2.41 + * + * @package News + * @author Herv\xE9 Thouzard (http://www.herve-thouzard.com) + * @copyright 2005, 2006 - Herv\xE9 Thouzard + * @version 1.0 + */ + +include_once '../../../include/cp_header.php'; +//xoops_cp_header(); +//$xoops->header($xoops->getOption('template_main')); +$xoops->header('template_main'); +include_once XOOPS_ROOT_PATH.'/modules/news/include/functions.php'; +include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php'; +include_once XOOPS_ROOT_PATH.'/modules/news/class/class.sfiles.php'; +include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newstopic.php'; +include_once XOOPS_ROOT_PATH.'/class/xoopstree.php'; + +if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) { + if(!isset($_POST['go']) ) { + echo '<h1>Welcome to the AMS 2.41 import script</h1>'; + echo '<br /><br />Select the import options you wan to use :'; + echo "<form method='post' action='amsimport.php'>"; + echo "<br /><input type='checkbox' name='useforum' value='1' /> Import forums links inside news (at the bottom of the news)"; + echo "<br /><input type='checkbox' name='useextlinks' value='1' /> Import external links inside news (at the bottom of the news)"; + echo "<br /><br /><input type='submit' name='go' value='Import' />"; + echo '</form>'; + echo "<br /><br />If you check the two last options then the forum's link and all the external links will be added at the end of the body text."; + } else { + // Launch the import + if (file_exists(XOOPS_ROOT_PATH.'/modules/AMS/language/'.$xoopsConfig['language'].'/main.php')) { + include_once XOOPS_ROOT_PATH.'/modules/AMS/language/'.$xoopsConfig['language'].'/main.php'; + } else { + include_once XOOPS_ROOT_PATH.'/modules/AMS/language/english/main.php'; + } + if (file_exists(XOOPS_ROOT_PATH.'/modules/AMS/language/'.$xoopsConfig['language'].'/admin.php')) { + include_once XOOPS_ROOT_PATH.'/modules/AMS/language/'.$xoopsConfig['language'].'/admin.php'; + } else { + include_once XOOPS_ROOT_PATH.'/modules/AMS/language/english/admin.php'; + } + $db =& XoopsDatabaseFactory::getDatabaseConnection(); + // User's choices + $use_forum = (isset($_POST['useforum']) && $_POST['useforum']==1) ? 1 : 0; + $use_extlinks = (isset($_POST['useextlinks']) && $_POST['useextlinks']==1) ? 1 : 0; + // Retreive News module's ID + $module_handler = $xoops->getHandlerGroupperm(); + + $newsModule = $module_handler->getByDirname('news'); + $news_mid = $newsModule->getVar('mid'); + // Retreive AMS module's ID + $AmsModule = $module_handler->getByDirname('AMS'); + $ams_mid = $AmsModule->getVar('mid'); + + // Retreive AMS tables names + $ams_topics = $xoopsDB->prefix('ams_topics'); + $ams_articles = $xoopsDB->prefix('ams_article'); + $ams_text = $xoopsDB->prefix('ams_text'); + $ams_files = $xoopsDB->prefix('ams_files'); + $ams_links = $xoopsDB->prefix('ams_link'); + $ams_rating = $xoopsDB->prefix('ams_rating'); + // Retreive News tables names + $news_stories_votedata = $xoopsDB->prefix('stories_votedata'); + // Misc + $comment_handler =& xoops_gethandler('comment'); + $notification_handler =& xoops_gethandler('notification'); + $ams_news_topics=array(); // Key => AMS Id, Value => News ID + + // The import by itself + // Read topics by their order + $mytree = new XoopsTree($ams_topics,'topic_id','topic_pid'); + $ams_topics = $mytree->getChildTreeArray(0,'weight'); + foreach($ams_topics as $one_amstopic) { + // First we create the topic + $topicpid=0; + if($one_amstopic['topic_pid']!=0) { // Search for its the parent + if(array_key_exists($one_amstopic['topic_pid'],$ams_news_topics)) { + $topicpid=$ams_news_topics[$one_amstopic['topic_pid']]; + } + } + $news_topic = new NewsTopic(); + $news_topic->setTopicPid($topicpid); + $news_topic->setTopicTitle($one_amstopic['topic_title']); + $news_topic->setTopicImgurl($one_amstopic['topic_imgurl']); + $news_topic->setMenu(0); + $news_topic->setTopicFrontpage(1); + $news_topic->Settopic_rssurl(''); + $news_topic->setTopicDescription(''); + $news_topic->setTopic_color('000000'); + $news_topic->store(); + echo '<br>- The following topic was imported : '.$news_topic->topic_title(); + $ams_topicid = $one_amstopic['topic_id']; + $news_topicid = $news_topic->topic_id(); + $ams_news_topics[$ams_topicid] = $news_topicid; + + // Then we insert all its articles + $result = $db->query('SELECT * FROM '.$ams_articles.' WHERE topicid='.$ams_topicid.' ORDER BY created'); + while ( $article = $db->fetchArray($result) ) { + $ams_newsid = $article['storyid']; + + // We search for the last version + $result2 = $db->query('SELECT * FROM '.$ams_text.' WHERE storyid='.$ams_newsid.' AND current=1'); + $text_lastversion = $db->fetchArray($result2); + + // We search for the number of votes + $result3 = $db->query('SELECT count(*) as cpt FROM '.$ams_rating.' WHERE storyid='.$ams_newsid); + $votes = $db->fetchArray($result3); + + // The links + $links=''; + if($use_extlinks) { + $result7 = $db->query('SELECT * FROM '.$ams_links.' WHERE storyid='.$ams_newsid.' ORDER BY linkid'); + while ( $link = $db->fetchArray($result7) ) { + if(trim($links)=='') { + $links="\n\n"._AMS_NW_RELATEDARTICLES."\n\n"; + } + $links .= _AMS_NW_EXTERNALLINK.' [url='.$link['link_link'].']'.$link['link_title'].'[/url]'."\n"; + } + } + + // The forum + $forum=''; + if($use_forum && $one_amstopic['forum_id']!=0) { + $forum = "\n\n".'[url='.XOOPS_URL.'/modules/newbb/viewforum.php?forum='.$one_amstopic['forum_id'].']'._AMS_AM_LINKEDFORUM.'[/url]'."\n"; + } + + // We create the story + $news = new NewsStory(); + $news->setUid($text_lastversion['uid']); + $news->setTitle($article['title']); + $news->created=$article['created']; + $news->setPublished($article['published']); + $news->setExpired($article['expired']); + $news->setHostname($article['hostname']); + $news->setNohtml($article['nohtml']); + $news->setNosmiley($article['nosmiley']); + $news->setHometext($text_lastversion['hometext']); + $news->setBodytext($text_lastversion['bodytext'].$links.$forum); + $news->setKeywords(''); + $news->setDescription(''); + $news->counter=$article['counter']; + $news->setTopicId($news_topicid); + $news->setIhome($article['ihome']); + $news->setNotifyPub($article['notifypub']); + $news->story_type=$article['story_type']; + $news->setTopicdisplay($article['topicdisplay']); + $news->setTopicalign($article['topicalign']); + $news->setComments($article['comments']); + $news->rating=$article['rating']; + $news->votes=$votes['cpt']; + $approved = $article['published']>0 ? true : false; + $news->approved=$approved; + $news->store($approved); + echo '<br> This story was imported : '.$news->title(); + $news_newsid=$news->storyid(); // ******************** + + // The files + $result4 = $db->query('SELECT * FROM '.$ams_files.' WHERE storyid='.$ams_newsid); + while ( $file = $db->fetchArray($result4) ) { + $sfile = new sFiles(); + $sfile->setFileRealName($file['filerealname']); + $sfile->setStoryid($news_newsid); + $sfile->date=$file['date']; + $sfile->setMimetype($file['mimetype']); + $sfile->setDownloadname($file['downloadname']); + $sfile->counter=$file['counter']; + $sfile->store(); + echo '<br> This file was imported : '.$sfile->getDownloadname(); + $news_fileid=$sfile->fileid; + } + + // The ratings + $result5 = $db->query('SELECT * FROM '.$ams_rating.' WHERE storyid='.$ams_newsid); + while ( $ratings = $db->fetchArray($result5) ) { + $result6 = $db->queryF('INSERT INTO '.$news_stories_votedata." (storyid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES (".$news_newsid.','.$ratings['ratinguser'].','.$ratings['rating'].','.$ratings['ratinghostname'].','.$ratings['ratingtimestamp'].')'); + } + + // The comments + $comments =& $comment_handler->getByItemId($ams_mid, $ams_newsid, 'ASC'); + if(is_array($comments) && count($comments)>0) { + foreach($comments as $onecomment) { + $onecomment->setNew(); + $onecomment->setVar('com_modid',$news_mid); + $onecomment->setVar('com_itemid',$news_newsid); + $comment_handler->insert($onecomment); + } + } + unset($comments); + + // The notifications of this news + //$notifications =& $notification_handler->getByItemId($ams_mid, $ams_newsid, 'ASC'); + $criteria = new CriteriaCompo(new Criteria('not_modid', $ams_mid)); + $criteria->add(new Criteria('not_itemid', $ams_newsid)); + $criteria->setOrder('ASC'); + $notifications = $notification_handler->getObjects($criteria); + if(is_array($notifications) && count($notifications)>0) { + foreach($notifications as $onenotification) { + $onenotification->setNew(); + $onenotification->setVar('not_modid',$news_mid); + $onenotification->setVar('not_itemid',$news_newsid); + $notification_handler->insert($onenotification); + } + } + unset($notifications); + } + } + // Finally, import all the globals notifications + $criteria = new CriteriaCompo(new Criteria('not_modid', $ams_mid)); + $criteria->add(new Criteria('not_category', 'global')); + $criteria->setOrder('ASC'); + $notifications = $notification_handler->getObjects($criteria); + if(is_array($notifications) && count($notifications)>0) { + foreach($notifications as $onenotification) { + $onenotification->setNew(); + $onenotification->setVar('not_modid',$news_mid); + $onenotification->setVar('not_itemid',$news_newsid); + $notification_handler->insert($onenotification); + } + } + unset($notifications); + echo "<p><a href='".XOOPS_URL."/modules/news/admin/groupperms.php'>The import is finished, don't forget to verify and set the topics permissions !</a></p>"; + } +} else { + redirect_header(XOOPS_URL.'/modules/news/index.php', 3, _NOPERM); + exit(); +} +//$xoops->footer($xoops->getOption('template_main')); +$xoops->footer('template_main'); +?> Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/amsimport.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/functions.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/functions.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/functions.php 2012-12-16 19:11:53 UTC (rev 10415) @@ -0,0 +1,86 @@ +<?php +// $Id$ +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +/** + * Function used to display a menu similar to the launcher on OS X + * + * Enable webmasters to navigate thru the module's features. + * Each time you select an option in the admin panel of the news module, this option is highlighted in this menu + * + * NOTE : Please give credits if you copy this code ! + * + * @package News + * @author Herv\xE9 Thouzard (http://www.herve-thouzard.com) & Dojo Javscript Toolkit + * @copyright (c) Herv\xE9 Thouzard (http://www.herve-thouzard.com) + */ + +function news_collapsableBar($tablename = '', $iconname = '') +{ + + ?> + <script type="text/javascript"><!-- + function goto_URL(object) + { + window.location.href = object.options[object.selectedIndex].value; + } + + function toggle(id) + { + if (document.getElementById) { obj = document.getElementById(id); } + if (document.all) { obj = document.all[id]; } + if (document.layers) { obj = document.layers[id]; } + if (obj) { + if (obj.style.display == "none") { + obj.style.display = ""; + } else { + obj.style.display = "none"; + } + } + return false; + } + + var iconClose = new Image(); + iconClose.src = '../images/icons/close12.gif'; + var iconOpen = new Image(); + iconOpen.src = '../images/icons/open12.gif'; + + function toggleIcon ( iconName ) + { + if ( document.images[iconName].src == window.iconOpen.src ) { + document.images[iconName].src = window.iconClose.src; + } else if ( document.images[iconName].src == window.iconClose.src ) { + document.images[iconName].src = window.iconOpen.src; + } + return; + } + + //--> + </script> + <?php +echo "<h4 style=\"color: #2F5376; margin: 6px 0 0 0; \"><a href='#' onClick=\"toggle('" . $tablename . "'); toggleIcon('" . $iconname . "');\">"; +} + +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/functions.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/groupperms.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/groupperms.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/news/admin/groupperms.php 2012-12-16 19:11:53 UTC (rev 10415) @@ -0,0 +1,74 @@ +<?php +// $Id$ +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any suppo... [truncated message content] |
From: <be...@us...> - 2012-12-16 19:10:59
|
Revision: 10414 http://sourceforge.net/p/xoops/svn/10414 Author: beckmi Date: 2012-12-16 19:10:55 +0000 (Sun, 16 Dec 2012) Log Message: ----------- Updating to $xoops->header('template_main'); Modified Paths: -------------- XoopsModules26/news/trunk/news/admin/about.php XoopsModules26/news/trunk/news/admin/admin_footer.php XoopsModules26/news/trunk/news/admin/amsimport.php XoopsModules26/news/trunk/news/admin/groupperms.php XoopsModules26/news/trunk/news/admin/index.php XoopsModules26/news/trunk/news/admin/upgrade.php XoopsModules26/news/trunk/news/archive.php XoopsModules26/news/trunk/news/article.php XoopsModules26/news/trunk/news/index.php XoopsModules26/news/trunk/news/newsbythisauthor.php XoopsModules26/news/trunk/news/ratenews.php XoopsModules26/news/trunk/news/topics_directory.php XoopsModules26/news/trunk/news/whoswho.php Modified: XoopsModules26/news/trunk/news/admin/about.php =================================================================== --- XoopsModules26/news/trunk/news/admin/about.php 2012-12-16 19:09:38 UTC (rev 10413) +++ XoopsModules26/news/trunk/news/admin/about.php 2012-12-16 19:10:55 UTC (rev 10414) @@ -19,7 +19,8 @@ include_once dirname(__FILE__) . '/admin_header.php'; //xoops_cp_header(); -$xoops->header($xoops->getOption('template_main')); +//$xoops->header($xoops->getOption('template_main')); +$xoops->header('template_main'); $aboutAdmin = new XoopsModuleAdmin(); Modified: XoopsModules26/news/trunk/news/admin/admin_footer.php =================================================================== --- XoopsModules26/news/trunk/news/admin/admin_footer.php 2012-12-16 19:09:38 UTC (rev 10413) +++ XoopsModules26/news/trunk/news/admin/admin_footer.php 2012-12-16 19:10:55 UTC (rev 10414) @@ -21,4 +21,5 @@ . " <a href='http://www.xoops.org' rel='external'><img src=" . XOOPS_URL . "/media/xoops/images/xoopsmicrobutton.gif alt='XOOPS' title='XOOPS'></a>\n" . " </div>\n" . " " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . "</div>"; -$xoops->footer($xoops->getOption('template_main')); \ No newline at end of file +//$xoops->footer($xoops->getOption('template_main')); +$xoops->footer('template_main'); \ No newline at end of file Modified: XoopsModules26/news/trunk/news/admin/amsimport.php =================================================================== --- XoopsModules26/news/trunk/news/admin/amsimport.php 2012-12-16 19:09:38 UTC (rev 10413) +++ XoopsModules26/news/trunk/news/admin/amsimport.php 2012-12-16 19:10:55 UTC (rev 10414) @@ -37,7 +37,8 @@ include_once '../../../include/cp_header.php'; //xoops_cp_header(); -$xoops->header($xoops->getOption('template_main')); +//$xoops->header($xoops->getOption('template_main')); +$xoops->header('template_main'); include_once XOOPS_ROOT_PATH.'/modules/news/include/functions.php'; include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php'; include_once XOOPS_ROOT_PATH.'/modules/news/class/class.sfiles.php'; @@ -251,5 +252,6 @@ redirect_header(XOOPS_URL.'/modules/news/index.php', 3, _NOPERM); exit(); } -$xoops->footer($xoops->getOption('template_main')); +//$xoops->footer($xoops->getOption('template_main')); +$xoops->footer('template_main'); ?> Modified: XoopsModules26/news/trunk/news/admin/groupperms.php =================================================================== --- XoopsModules26/news/trunk/news/admin/groupperms.php 2012-12-16 19:09:38 UTC (rev 10413) +++ XoopsModules26/news/trunk/news/admin/groupperms.php 2012-12-16 19:10:55 UTC (rev 10414) @@ -31,7 +31,8 @@ include_once XOOPS_ROOT_PATH . '/modules/news/admin/functions.php'; include_once 'admin_header.php'; //xoops_cp_header(); -$xoops->header($xoops->getOption('template_main')); +//$xoops->header($xoops->getOption('template_main')); +$xoops->header('template_main'); $permAdmin = new XoopsModuleAdmin(); echo $permAdmin->renderNavigation('groupperms.php'); Modified: XoopsModules26/news/trunk/news/admin/index.php =================================================================== --- XoopsModules26/news/trunk/news/admin/index.php 2012-12-16 19:09:38 UTC (rev 10413) +++ XoopsModules26/news/trunk/news/admin/index.php 2012-12-16 19:10:55 UTC (rev 10414) @@ -276,7 +276,8 @@ { include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; // xoops_cp_header(); - $xoops->header($xoops->getOption('template_main')); + //$xoops->header($xoops->getOption('template_main')); + $xoops->header('template_main'); $pruneAdmin = new XoopsModuleAdmin(); echo $pruneAdmin->renderNavigation('index.php?op=prune'); echo '<br /><br /><br />'; @@ -311,7 +312,8 @@ { global $dateformat; $story = new NewsStory(); - $xoops->header($xoops->getOption('template_main')); + //$xoops->header($xoops->getOption('template_main')); + $xoops->header('template_main'); $topiclist=''; if(isset($_POST['pruned_topics'])) { $topiclist=implode(',',$_POST['pruned_topics']); @@ -347,7 +349,8 @@ if(intval($_POST['ok'])==1) { $story = new NewsStory(); - $xoops->header($xoops->getOption('template_main')); + //$xoops->header($xoops->getOption('template_main')); + $xoops->header('template_main'); $count=$story->GetCountStoriesPublishedBefore($timestamp,$expired,$topiclist); $msg=sprintf(_AM_NEWS_PRUNE_DELETED,$count); $story->DeleteBeforeDate($timestamp,$expired,$topiclist); @@ -370,7 +373,8 @@ function Newsletter() { include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; - $xoops->header($xoops->getOption('template_main')); + //$xoops->header($xoops->getOption('template_main')); + $xoops->header('template_main'); $newsletterAdmin = new XoopsModuleAdmin(); echo $newsletterAdmin->renderNavigation('index.php?op=configurenewsletter'); echo '<br /><br /><br />'; @@ -414,7 +418,7 @@ function LaunchNewsletter() { global $xoopsConfig, $dateformat; - $xoops->header($xoops->getOption('template_main')); + $xoops->header('template_main'); $newsletterAdmin = new XoopsModuleAdmin(); echo $newsletterAdmin->renderNavigation('index.php?op=configurenewsletter'); $newslettertemplate = ''; @@ -487,7 +491,7 @@ function NewsExport() { include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; - $xoops->header($xoops->getOption('template_main')); + $xoops->header('template_main'); $exportAdmin = new XoopsModuleAdmin(); echo $exportAdmin->renderNavigation('index.php?op=export'); echo '<br /><br /><br />'; @@ -530,7 +534,7 @@ // Launch stories export (to the xml's format) function LaunchExport() { - $xoops->header($xoops->getOption('template_main')); + $xoops->header('template_main'); $exportAdmin = new XoopsModuleAdmin(); echo $exportAdmin->renderNavigation('index.php?op=export'); echo '<br />'; @@ -637,7 +641,7 @@ { global $xoopsDB, $xoopsConfig, $xoopsModule, $myts, $xoops; include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; - $xoops->header($xoops->getOption('template_main')); + $xoops->header('template_main'); $topicAdmin = new XoopsModuleAdmin(); echo $topicAdmin->renderNavigation('index.php?op=topicsmanager'); @@ -963,12 +967,12 @@ { global $xoopsDB, $xoopsModule; if (!isset($_POST['ok'])) { - $xoops->header($xoops->getOption('template_main')); + $xoops->header('template_main'); echo '<h4>' . _AM_CONFIG . '</h4>'; $xt = new XoopsTopic( $xoopsDB->prefix('topics'), intval($_GET['topic_id'])); xoops_confirm(array( 'op' => 'delTopic', 'topic_id' => intval($_GET['topic_id']), 'ok' => 1), 'index.php', _AM_WAYSYWTDTTAL . '<br />' . $xt->topic_title('S')); } else { - $xoops->header($xoops->getOption('template_main')); + $xoops->header('template_main'); $xt = new XoopsTopic($xoopsDB->prefix('topics'), intval($_POST['topic_id'])); if(isset($_SESSION['items_count'])) { $_SESSION['items_count'] = -1; @@ -1110,7 +1114,7 @@ function Stats() { global $xoopsModule, $xoopsConfig; - $xoops->header($xoops->getOption('template_main')); + $xoops->header('template_main'); $myts = MyTextSanitizer::getInstance(); if (file_exists(XOOPS_ROOT_PATH.'/modules/news/language/'.$xoopsConfig['language'].'/main.php')) { include_once XOOPS_ROOT_PATH.'/modules/news/language/'.$xoopsConfig['language'].'/main.php'; @@ -1255,7 +1259,7 @@ { include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; global $xoopsModule, $xoopsConfig, $xoopsModuleConfig, $cfg; - $xoops->header($xoops->getOption('template_main')); + $xoops->header('template_main'); $myts = MyTextSanitizer::getInstance(); if (file_exists(XOOPS_ROOT_PATH.'/modules/news/language/'.$xoopsConfig['language'].'/main.php')) { include_once XOOPS_ROOT_PATH.'/modules/news/language/'.$xoopsConfig['language'].'/main.php'; @@ -1380,7 +1384,7 @@ $indexAdmin = new XoopsModuleAdmin(); switch ($op) { case 'deletefile': - $xoops->header($xoops->getOption('template_main')); + $xoops->header('template_main'); if($_GET['type']=='newsletter') { $newsfile=XOOPS_ROOT_PATH.'/uploads/news/newsletter.txt'; if(unlink($newsfile)) { @@ -1401,8 +1405,8 @@ break; case 'newarticle': - $xoops->header($xoops->getOption('template_main')); - echo $indexAdmin->renderNavigation('index.php?op=newarticle'); + $xoops->header('template_main'); + $indexAdmin->displayNavigation('index.php?op=newarticle'); echo '<h4>' . _AM_CONFIG . '</h4>'; include_once XOOPS_ROOT_PATH . '/class/module.textsanitizer.php'; newSubmissions(); @@ -1472,7 +1476,7 @@ exit(); } else { $story = new NewsStory($storyid); - $xoops->header($xoops->getOption('template_main')); + $xoops->header('template_main'); echo '<h4>' . _AM_CONFIG . '</h4>'; xoops_confirm(array('op' => 'delete', 'storyid' => $storyid, 'ok' => 1), 'index.php', _AM_RUSUREDEL .'<br />' . $story->title()); } @@ -1554,7 +1558,7 @@ break; case 'verifydb': - $xoops->header($xoops->getOption('template_main')); + $xoops->header('template_main'); //news_adminmenu(); $tbllist = $xoopsDB->prefix('stories').','.$xoopsDB->prefix('topics').','.$xoopsDB->prefix('stories_files').','.$xoopsDB->prefix('stories_votedata'); $xoopsDB->queryF("OPTIMIZE TABLE ".$tbllist); @@ -1566,7 +1570,7 @@ case 'default': default: - $xoops->header($xoops->getOption('template_main')); + $xoops->header('template_main'); $folder = array( XOOPS_ROOT_PATH . '/uploads/news/', Modified: XoopsModules26/news/trunk/news/admin/upgrade.php =================================================================== --- XoopsModules26/news/trunk/news/admin/upgrade.php 2012-12-16 19:09:38 UTC (rev 10413) +++ XoopsModules26/news/trunk/news/admin/upgrade.php 2012-12-16 19:10:55 UTC (rev 10414) @@ -26,7 +26,7 @@ // ------------------------------------------------------------------------ // include_once '../../../include/cp_header.php'; -$xoops->header($xoops->getOption('template_main')); +$xoops->header('template_main'); include_once XOOPS_ROOT_PATH.'/modules/news/include/functions.php'; @@ -135,5 +135,6 @@ } else { printf("<h2>%s</h2>\n",_AM_NEWS_UPGR_ACCESS_ERROR); } -$xoops->footer($xoops->getOption('template_main')); +//$xoops->footer($xoops->getOption('template_main')); +$xoops->footer('template_main'); ?> Modified: XoopsModules26/news/trunk/news/archive.php =================================================================== --- XoopsModules26/news/trunk/news/archive.php 2012-12-16 19:09:38 UTC (rev 10413) +++ XoopsModules26/news/trunk/news/archive.php 2012-12-16 19:10:55 UTC (rev 10414) @@ -76,7 +76,8 @@ ###################################################################### include_once '../../mainfile.php'; -$xoopsOption['template_main'] = 'news_archive.html'; +//$xoopsOption['template_main'] = 'news_archive.html'; +$xoops->header('news_archive.html'); //include_once XOOPS_ROOT_PATH.'/header.php'; Xoops::getInstance()->header(); include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php'; Modified: XoopsModules26/news/trunk/news/article.php =================================================================== --- XoopsModules26/news/trunk/news/article.php 2012-12-16 19:09:38 UTC (rev 10413) +++ XoopsModules26/news/trunk/news/article.php 2012-12-16 19:10:55 UTC (rev 10414) @@ -177,7 +177,8 @@ $article->updateCounter(); } } -$xoopsOption['template_main'] = 'news_article.html'; +//$xoopsOption['template_main'] = 'news_article.html'; +$xoops->header('news_article.html'); //include_once XOOPS_ROOT_PATH.'/header.php'; Xoops::getInstance()->header(); Modified: XoopsModules26/news/trunk/news/index.php =================================================================== --- XoopsModules26/news/trunk/news/index.php 2012-12-16 19:09:38 UTC (rev 10413) +++ XoopsModules26/news/trunk/news/index.php 2012-12-16 19:10:55 UTC (rev 10414) @@ -133,7 +133,8 @@ $column_count = $xoopsModuleConfig['columnmode']; if ($showclassic) { - $xoopsOption['template_main'] = 'news_index.html'; +// $xoopsOption['template_main'] = 'news_index.html'; + $xoops->header('news_index.html'); //include_once XOOPS_ROOT_PATH.'/header.php'; Xoops::getInstance()->header(); $xt = new NewsTopic(); @@ -228,7 +229,8 @@ $xoopsTpl->assign('pagenav', ''); } } else { // Affichage par sujets - $xoopsOption['template_main'] = 'news_by_topic.html'; + //$xoopsOption['template_main'] = 'news_by_topic.html'; + $xoops->header('news_by_topic.html'); //include_once XOOPS_ROOT_PATH.'/header.php'; Xoops::getInstance()->header(); $xoopsTpl->assign('columnwidth', intval(1/$column_count*100)); Modified: XoopsModules26/news/trunk/news/newsbythisauthor.php =================================================================== --- XoopsModules26/news/trunk/news/newsbythisauthor.php 2012-12-16 19:09:38 UTC (rev 10413) +++ XoopsModules26/news/trunk/news/newsbythisauthor.php 2012-12-16 19:10:55 UTC (rev 10414) @@ -98,7 +98,8 @@ $myts = MyTextSanitizer::getInstance(); $articles = new NewsStory(); -$xoopsOption['template_main'] = 'news_by_this_author.html'; +//$xoopsOption['template_main'] = 'news_by_this_author.html'; +$xoops->header('news_by_this_author.html'); //include_once XOOPS_ROOT_PATH.'/header.php'; Xoops::getInstance()->header(); Modified: XoopsModules26/news/trunk/news/ratenews.php =================================================================== --- XoopsModules26/news/trunk/news/ratenews.php 2012-12-16 19:09:38 UTC (rev 10413) +++ XoopsModules26/news/trunk/news/ratenews.php 2012-12-16 19:10:55 UTC (rev 10414) @@ -191,7 +191,8 @@ redirect_header(XOOPS_URL.'/modules/news/article.php?storyid='.$storyid, 4, $ratemessage); exit(); } else { // Display the form to vote - $xoopsOption['template_main'] = 'news_ratenews.html'; + //$xoopsOption['template_main'] = 'news_ratenews.html'; + $xoops->header('news_ratenews.html'); //include_once XOOPS_ROOT_PATH.'/header.php'; Xoops::getInstance()->header(); $news = null; Modified: XoopsModules26/news/trunk/news/topics_directory.php =================================================================== --- XoopsModules26/news/trunk/news/topics_directory.php 2012-12-16 19:09:38 UTC (rev 10413) +++ XoopsModules26/news/trunk/news/topics_directory.php 2012-12-16 19:10:55 UTC (rev 10414) @@ -38,7 +38,8 @@ include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newstopic.php'; include_once XOOPS_ROOT_PATH.'/modules/news/include/functions.php'; -$xoopsOption['template_main'] = 'news_topics_directory.html'; +//$xoopsOption['template_main'] = 'news_topics_directory.html'; +$xoops->header('news_topics_directory.html'); //include_once XOOPS_ROOT_PATH.'/header.php'; Xoops::getInstance()->header(); Modified: XoopsModules26/news/trunk/news/whoswho.php =================================================================== --- XoopsModules26/news/trunk/news/whoswho.php 2012-12-16 19:09:38 UTC (rev 10413) +++ XoopsModules26/news/trunk/news/whoswho.php 2012-12-16 19:10:55 UTC (rev 10414) @@ -44,7 +44,8 @@ exit(); } -$xoopsOption['template_main'] = 'news_whos_who.html'; +//$xoopsOption['template_main'] = 'news_whos_who.html'; +$xoops->header('news_whos_who.html'); //include_once XOOPS_ROOT_PATH.'/header.php'; Xoops::getInstance()->header(); |
From: <tr...@us...> - 2012-12-16 19:09:41
|
Revision: 10413 http://sourceforge.net/p/xoops/svn/10413 Author: trabis Date: 2012-12-16 19:09:38 +0000 (Sun, 16 Dec 2012) Log Message: ----------- Updating preferences Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/preferences.php Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/modulepreference.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php 2012-12-16 19:06:26 UTC (rev 10412) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php 2012-12-16 19:09:38 UTC (rev 10413) @@ -58,26 +58,6 @@ switch ($op) { case 'show': - if (empty($confcat_id)) { - $confcat_id = 1; - } - $confcat_handler = $xoops->getHandlerConfigcategory(); - $confcat = $confcat_handler->get($confcat_id); - if (!is_object($confcat)) { - $xoops->redirect('admin.php?fct=preferences', 1); - } - // Define Breadcrumb and tips - $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadcrumbLink(_AM_SYSTEM_PREFERENCES_NAV_MAIN, $system->adminVersion('preferences', 'adminpath')); - $admin_page->addBreadcrumbLink(constant($confcat->getVar('confcat_name'))); - $admin_page->renderBreadcrumb(); - /* @var $form SystemPreferenceForm */ - $form = $xoops->getModuleForm(null, 'preference'); - $form->getForm($confcat); - $xoops->tpl()->assign('form', $form->render()); - break; - case 'showmod': $mod = $system->cleanVars($_GET, 'mod', 1, 'int'); if (!$mod) { @@ -102,8 +82,8 @@ $admin_page->addBreadcrumbLink($module->getVar('name')); $admin_page->renderBreadcrumb(); - /* @var $form SystemModulepreferenceForm */ - $form = $xoops->getModuleForm(null, 'modulepreference'); + /* @var $form SystemPreferencesForm */ + $form = $xoops->getModuleForm(null, 'preferences'); $form->getForm($config, $module); $xoops->tpl()->assign('form', $form->render()); break; Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/modulepreference.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/modulepreference.php 2012-12-16 19:06:26 UTC (rev 10412) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/modulepreference.php 2012-12-16 19:09:38 UTC (rev 10413) @@ -1,286 +0,0 @@ -<?php -/* - You may not change or alter any portion of this comment or credits - of supporting developers from this source code or any supporting source code - which is considered copyrighted (c) material of the original comment or credit authors. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -*/ - -/** - * Preference Form Class - * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @author Andricq Nicolas (AKA MusS) - * @author trabis <lus...@gm...> - * @package system - * @subpackage preferences - * @version $Id$ - */ - -defined('XOOPS_ROOT_PATH') or die('Restricted access'); - -class SystemModulepreferenceForm extends XoopsSimpleForm -{ - /** - * @param null $obj - */ - public function __construct($obj = null) - { - } - - /** - * @param $obj - * @param XoopsModule|XoopsObject $mod - * - * @return void - */ - public function getForm(&$obj, XoopsModule &$mod) - { - $xoops = Xoops::getInstance(); - $config_handler = $xoops->getHandlerConfig(); - - parent::__construct('', 'pref_form', 'admin.php?fct=preferences', 'post', true); - if ($mod->getVar('dirname') != 'system') { - $xoops->loadLanguage('modinfo', $mod->getVar('dirname')); - } - $configs = $mod->getInfo('config'); - $configNames = array(); - foreach (array_keys($configs) as $i) { - $configNames[$configs[$i]['name']] =& $configs[$i]; - } - $configCats = $mod->getInfo('configcat'); - if (!$configCats) { - $configCats = array( - 'default' => array( - 'name' => _MD_AM_MODCONFIG, 'description' => '' - ) - ); - } - - if (!in_array('default', array_keys($configCats))) { - $configCats['default'] = array( - 'name' => _MD_AM_MODCONFIG, 'description' => '' - ); - } - - foreach (array_keys($configNames) as $name) { - if (!isset($configNames[$name]['category'])) { - $configNames[$name]['category'] = 'default'; - } - } - - $tabtray = new XoopsFormTabTray('', 'pref_tabtay', $xoops->getModuleConfig('jquery_theme', 'system')); - $tabs = array(); - foreach ($configCats as $name => $info) { - $tabs[$name] = new XoopsFormTab($info['name'], 'pref_tab_' . $name); - if (isset($info['description']) && $info['description'] != '') { - $tabs[$name]->addElement(new XoopsFormLabel('', $info['description'])); - } - } - - // if has comments feature, need comment lang file - if ($mod->getVar('hascomments') == 1) { - $xoops->loadLanguage('comment'); - } - // RMV-NOTIFY - // if has notification feature, need notification lang file - if ($mod->getVar('hasnotification') == 1) { - $xoops->loadLanguage('notification'); - } - - //$modname = $module->getVar('name'); - if (!empty($_REQUEST["redirect"])) { - $myts = MyTextSanitizer::getInstance(); - $this->addElement(new XoopsFormHidden('redirect', $myts->htmlspecialchars($_REQUEST["redirect"]))); - } elseif ($mod->getInfo('adminindex')) { - $this->addElement(new XoopsFormHidden('redirect', XOOPS_URL . '/modules/' . $mod->getVar('dirname') . '/' . $mod->getInfo('adminindex'))); - } - $count = count($obj); - for ($i = 0; $i < $count; $i++) { - $title = constant($obj[$i]->getVar('conf_title')); - $desc = ($obj[$i]->getVar('conf_desc') != '') ? constant($obj[$i]->getVar('conf_desc')) : ''; - switch ($obj[$i]->getVar('conf_formtype')) { - - case 'textarea': - $myts = MyTextSanitizer::getInstance(); - if ($obj[$i]->getVar('conf_valuetype') == 'array') { - // this is exceptional.. only when value type is arrayneed a smarter way for this - $ele = ($obj[$i]->getVar('conf_value') != '') ? new XoopsFormTextArea($title, $obj[$i]->getVar('conf_name'), $myts->htmlspecialchars(implode('|', $obj[$i]->getConfValueForOutput())), 5, 5) : new XoopsFormTextArea($title, $obj[$i]->getVar('conf_name'), '', 5, 5); - } else { - $ele = new XoopsFormTextArea($title, $obj[$i]->getVar('conf_name'), $myts->htmlspecialchars($obj[$i]->getConfValueForOutput()), 5, 5); - } - break; - - case 'select': - $ele = new XoopsFormSelect($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); - $options = $config_handler->getConfigOptions(new Criteria('conf_id', $obj[$i]->getVar('conf_id'))); - $opcount = count($options); - for ($j = 0; $j < $opcount; $j++) { - $optval = defined($options[$j]->getVar('confop_value')) ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value'); - $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name'); - $ele->addOption($optval, $optkey); - } - break; - - case 'select_multi': - $ele = new XoopsFormSelect($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput(), 5, true); - $options = $config_handler->getConfigOptions(new Criteria('conf_id', $obj[$i]->getVar('conf_id'))); - $opcount = count($options); - for ($j = 0; $j < $opcount; $j++) { - $optval = defined($options[$j]->getVar('confop_value')) ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value'); - $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name'); - $ele->addOption($optval, $optkey); - } - break; - - case 'yesno': - $ele = new XoopsFormRadioYN($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput(), _YES, _NO); - break; - - case 'theme': - case 'theme_multi': - $ele = ($obj[$i]->getVar('conf_formtype') != 'theme_multi') ? new XoopsFormSelect($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()) : new XoopsFormSelect($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput(), 5, true); - $dirlist = XoopsLists::getThemesList(); - if (!empty($dirlist)) { - asort($dirlist); - $ele->addOptionArray($dirlist); - } - break; - case 'tplset': - $ele = new XoopsFormSelect($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); - $tplset_handler = $xoops->getHandlerTplset(); - $tplsetlist = $tplset_handler->getNameList(); - asort($tplsetlist); - foreach ($tplsetlist as $key => $name) { - $ele->addOption($key, $name); - } - break; - - case 'cpanel': - $ele = new XoopsFormHidden($obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); - /* - $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); - XoopsLoad::load("cpanel", "system"); - $list = XoopsSystemCpanel::getGuis(); - $ele->addOptionArray($list); */ - break; - - case 'timezone': - $ele = new XoopsFormSelectTimezone($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); - break; - - case 'language': - $ele = new XoopsFormSelectLang($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); - break; - - case 'startpage': - $ele = new XoopsFormSelect($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); - - $module_handler = $xoops->getHandlerModule(); - $criteria = new CriteriaCompo(new Criteria('hasmain', 1)); - $criteria->add(new Criteria('isactive', 1)); - $moduleslist = $module_handler->getNameList($criteria, true); - $moduleslist['--'] = _MD_AM_NONE; - $ele->addOptionArray($moduleslist); - break; - - case 'group': - $ele = new XoopsFormSelectGroup($title, $obj[$i]->getVar('conf_name'), false, $obj[$i]->getConfValueForOutput(), 1, false); - break; - - case 'group_multi': - $ele = new XoopsFormSelectGroup($title, $obj[$i]->getVar('conf_name'), false, $obj[$i]->getConfValueForOutput(), 5, true); - break; - - // RMV-NOTIFY: added 'user' and 'user_multi' - case 'user': - $ele = new XoopsFormSelectUser($title, $obj[$i]->getVar('conf_name'), false, $obj[$i]->getConfValueForOutput(), 1, false); - break; - - case 'user_multi': - $ele = new XoopsFormSelectUser($title, $obj[$i]->getVar('conf_name'), false, $obj[$i]->getConfValueForOutput(), 5, true); - break; - case 'module_cache': - $module_handler = $xoops->getHandlerModule(); - $modules = $module_handler->getObjectsArray(new Criteria('hasmain', 1), true); - $currrent_val = $obj[$i]->getConfValueForOutput(); - $cache_options = array( - '0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, - '300' => sprintf(_MINUTES, 5), '1800' => sprintf(_MINUTES, 30), '3600' => _HOUR, - '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK - ); - if (count($modules) > 0) { - $ele = new XoopsFormElementTray($title, '<br />'); - foreach (array_keys($modules) as $mid) { - $c_val = isset($currrent_val[$mid]) ? intval($currrent_val[$mid]) : null; - $selform = new XoopsFormSelect($modules[$mid]->getVar('name'), $obj[$i]->getVar('conf_name') . "[$mid]", $c_val); - $selform->addOptionArray($cache_options); - $ele->addElement($selform); - unset($selform); - } - } else { - $ele = new XoopsFormLabel($title, _MD_AM_NOMODULE); - } - break; - - case 'site_cache': - $ele = new XoopsFormSelect($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); - $ele->addOptionArray(array( - '0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, - '300' => sprintf(_MINUTES, 5), '1800' => sprintf(_MINUTES, 30), '3600' => _HOUR, - '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK - )); - break; - - case 'password': - $myts = MyTextSanitizer::getInstance(); - $ele = new XoopsFormPassword($title, $obj[$i]->getVar('conf_name'), 5, 255, $myts->htmlspecialchars($obj[$i]->getConfValueForOutput())); - break; - - case 'color': - $myts = MyTextSanitizer::getInstance(); - $ele = new XoopsFormColorPicker($title, $obj[$i]->getVar('conf_name'), $myts->htmlspecialchars($obj[$i]->getConfValueForOutput())); - break; - - case 'hidden': - $myts = MyTextSanitizer::getInstance(); - $ele = new XoopsFormHidden($obj[$i]->getVar('conf_name'), $myts->htmlspecialchars($obj[$i]->getConfValueForOutput())); - break; - - case 'textbox': - default: - $myts = MyTextSanitizer::getInstance(); - $ele = new XoopsFormText($title, $obj[$i]->getVar('conf_name'), 5, 255, $myts->htmlspecialchars($obj[$i]->getConfValueForOutput())); - break; - } - $hidden = new XoopsFormHidden('conf_ids[]', $obj[$i]->getVar('conf_id')); - if (isset($ele)) { - $ele->setDescription($desc); - if ($obj[$i]->getVar('conf_formtype') != 'hidden') { - $name = 'default'; - if (isset($configNames[$obj[$i]->getVar('conf_name')]['category'])) { - $name = $configNames[$obj[$i]->getVar('conf_name')]['category']; - } - $tabs[$name]->addElement($ele); - } else { - $this->addElement($ele); - } - $this->addElement($hidden); - unset($ele); - unset($hidden); - } - } - foreach (array_keys($tabs) as $name) { - if ($tabs[$name]->getElements()) { - $tabtray->addElement($tabs[$name]); - } - } - $this->addElement($tabtray); - $this->addElement(new XoopsFormHidden('op', 'save')); - $this->addElement(new XoopsFormButton('', 'button', _SUBMIT, 'submit')); - } -} Copied: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/preferences.php (from rev 10410, XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/modulepreference.php) =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/preferences.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/preferences.php 2012-12-16 19:09:38 UTC (rev 10413) @@ -0,0 +1,286 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * Preference Form Class + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @author Andricq Nicolas (AKA MusS) + * @author trabis <lus...@gm...> + * @package system + * @subpackage preferences + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +class SystemPreferencesForm extends XoopsSimpleForm +{ + /** + * @param null $obj + */ + public function __construct($obj = null) + { + } + + /** + * @param $obj + * @param XoopsModule|XoopsObject $mod + * + * @return void + */ + public function getForm(&$obj, XoopsModule &$mod) + { + $xoops = Xoops::getInstance(); + $config_handler = $xoops->getHandlerConfig(); + + parent::__construct('', 'pref_form', 'admin.php?fct=preferences', 'post', true); + if ($mod->getVar('dirname') != 'system') { + $xoops->loadLanguage('modinfo', $mod->getVar('dirname')); + } + $configs = $mod->getInfo('config'); + $configNames = array(); + foreach (array_keys($configs) as $i) { + $configNames[$configs[$i]['name']] =& $configs[$i]; + } + $configCats = $mod->getInfo('configcat'); + if (!$configCats) { + $configCats = array( + 'default' => array( + 'name' => _MD_AM_MODCONFIG, 'description' => '' + ) + ); + } + + if (!in_array('default', array_keys($configCats))) { + $configCats['default'] = array( + 'name' => _MD_AM_MODCONFIG, 'description' => '' + ); + } + + foreach (array_keys($configNames) as $name) { + if (!isset($configNames[$name]['category'])) { + $configNames[$name]['category'] = 'default'; + } + } + + $tabtray = new XoopsFormTabTray('', 'pref_tabtay', $xoops->getModuleConfig('jquery_theme', 'system')); + $tabs = array(); + foreach ($configCats as $name => $info) { + $tabs[$name] = new XoopsFormTab($info['name'], 'pref_tab_' . $name); + if (isset($info['description']) && $info['description'] != '') { + $tabs[$name]->addElement(new XoopsFormLabel('', $info['description'])); + } + } + + // if has comments feature, need comment lang file + if ($mod->getVar('hascomments') == 1) { + $xoops->loadLanguage('comment'); + } + // RMV-NOTIFY + // if has notification feature, need notification lang file + if ($mod->getVar('hasnotification') == 1) { + $xoops->loadLanguage('notification'); + } + + //$modname = $module->getVar('name'); + if (!empty($_REQUEST["redirect"])) { + $myts = MyTextSanitizer::getInstance(); + $this->addElement(new XoopsFormHidden('redirect', $myts->htmlspecialchars($_REQUEST["redirect"]))); + } elseif ($mod->getInfo('adminindex')) { + $this->addElement(new XoopsFormHidden('redirect', XOOPS_URL . '/modules/' . $mod->getVar('dirname') . '/' . $mod->getInfo('adminindex'))); + } + $count = count($obj); + for ($i = 0; $i < $count; $i++) { + $title = constant($obj[$i]->getVar('conf_title')); + $desc = ($obj[$i]->getVar('conf_desc') != '') ? constant($obj[$i]->getVar('conf_desc')) : ''; + switch ($obj[$i]->getVar('conf_formtype')) { + + case 'textarea': + $myts = MyTextSanitizer::getInstance(); + if ($obj[$i]->getVar('conf_valuetype') == 'array') { + // this is exceptional.. only when value type is arrayneed a smarter way for this + $ele = ($obj[$i]->getVar('conf_value') != '') ? new XoopsFormTextArea($title, $obj[$i]->getVar('conf_name'), $myts->htmlspecialchars(implode('|', $obj[$i]->getConfValueForOutput())), 5, 5) : new XoopsFormTextArea($title, $obj[$i]->getVar('conf_name'), '', 5, 5); + } else { + $ele = new XoopsFormTextArea($title, $obj[$i]->getVar('conf_name'), $myts->htmlspecialchars($obj[$i]->getConfValueForOutput()), 5, 5); + } + break; + + case 'select': + $ele = new XoopsFormSelect($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); + $options = $config_handler->getConfigOptions(new Criteria('conf_id', $obj[$i]->getVar('conf_id'))); + $opcount = count($options); + for ($j = 0; $j < $opcount; $j++) { + $optval = defined($options[$j]->getVar('confop_value')) ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value'); + $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name'); + $ele->addOption($optval, $optkey); + } + break; + + case 'select_multi': + $ele = new XoopsFormSelect($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput(), 5, true); + $options = $config_handler->getConfigOptions(new Criteria('conf_id', $obj[$i]->getVar('conf_id'))); + $opcount = count($options); + for ($j = 0; $j < $opcount; $j++) { + $optval = defined($options[$j]->getVar('confop_value')) ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value'); + $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name'); + $ele->addOption($optval, $optkey); + } + break; + + case 'yesno': + $ele = new XoopsFormRadioYN($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput(), _YES, _NO); + break; + + case 'theme': + case 'theme_multi': + $ele = ($obj[$i]->getVar('conf_formtype') != 'theme_multi') ? new XoopsFormSelect($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()) : new XoopsFormSelect($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput(), 5, true); + $dirlist = XoopsLists::getThemesList(); + if (!empty($dirlist)) { + asort($dirlist); + $ele->addOptionArray($dirlist); + } + break; + case 'tplset': + $ele = new XoopsFormSelect($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); + $tplset_handler = $xoops->getHandlerTplset(); + $tplsetlist = $tplset_handler->getNameList(); + asort($tplsetlist); + foreach ($tplsetlist as $key => $name) { + $ele->addOption($key, $name); + } + break; + + case 'cpanel': + $ele = new XoopsFormHidden($obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); + /* + $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); + XoopsLoad::load("cpanel", "system"); + $list = XoopsSystemCpanel::getGuis(); + $ele->addOptionArray($list); */ + break; + + case 'timezone': + $ele = new XoopsFormSelectTimezone($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); + break; + + case 'language': + $ele = new XoopsFormSelectLang($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); + break; + + case 'startpage': + $ele = new XoopsFormSelect($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); + + $module_handler = $xoops->getHandlerModule(); + $criteria = new CriteriaCompo(new Criteria('hasmain', 1)); + $criteria->add(new Criteria('isactive', 1)); + $moduleslist = $module_handler->getNameList($criteria, true); + $moduleslist['--'] = _MD_AM_NONE; + $ele->addOptionArray($moduleslist); + break; + + case 'group': + $ele = new XoopsFormSelectGroup($title, $obj[$i]->getVar('conf_name'), false, $obj[$i]->getConfValueForOutput(), 1, false); + break; + + case 'group_multi': + $ele = new XoopsFormSelectGroup($title, $obj[$i]->getVar('conf_name'), false, $obj[$i]->getConfValueForOutput(), 5, true); + break; + + // RMV-NOTIFY: added 'user' and 'user_multi' + case 'user': + $ele = new XoopsFormSelectUser($title, $obj[$i]->getVar('conf_name'), false, $obj[$i]->getConfValueForOutput(), 1, false); + break; + + case 'user_multi': + $ele = new XoopsFormSelectUser($title, $obj[$i]->getVar('conf_name'), false, $obj[$i]->getConfValueForOutput(), 5, true); + break; + case 'module_cache': + $module_handler = $xoops->getHandlerModule(); + $modules = $module_handler->getObjectsArray(new Criteria('hasmain', 1), true); + $currrent_val = $obj[$i]->getConfValueForOutput(); + $cache_options = array( + '0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, + '300' => sprintf(_MINUTES, 5), '1800' => sprintf(_MINUTES, 30), '3600' => _HOUR, + '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK + ); + if (count($modules) > 0) { + $ele = new XoopsFormElementTray($title, '<br />'); + foreach (array_keys($modules) as $mid) { + $c_val = isset($currrent_val[$mid]) ? intval($currrent_val[$mid]) : null; + $selform = new XoopsFormSelect($modules[$mid]->getVar('name'), $obj[$i]->getVar('conf_name') . "[$mid]", $c_val); + $selform->addOptionArray($cache_options); + $ele->addElement($selform); + unset($selform); + } + } else { + $ele = new XoopsFormLabel($title, _MD_AM_NOMODULE); + } + break; + + case 'site_cache': + $ele = new XoopsFormSelect($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); + $ele->addOptionArray(array( + '0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, + '300' => sprintf(_MINUTES, 5), '1800' => sprintf(_MINUTES, 30), '3600' => _HOUR, + '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK + )); + break; + + case 'password': + $myts = MyTextSanitizer::getInstance(); + $ele = new XoopsFormPassword($title, $obj[$i]->getVar('conf_name'), 5, 255, $myts->htmlspecialchars($obj[$i]->getConfValueForOutput())); + break; + + case 'color': + $myts = MyTextSanitizer::getInstance(); + $ele = new XoopsFormColorPicker($title, $obj[$i]->getVar('conf_name'), $myts->htmlspecialchars($obj[$i]->getConfValueForOutput())); + break; + + case 'hidden': + $myts = MyTextSanitizer::getInstance(); + $ele = new XoopsFormHidden($obj[$i]->getVar('conf_name'), $myts->htmlspecialchars($obj[$i]->getConfValueForOutput())); + break; + + case 'textbox': + default: + $myts = MyTextSanitizer::getInstance(); + $ele = new XoopsFormText($title, $obj[$i]->getVar('conf_name'), 5, 255, $myts->htmlspecialchars($obj[$i]->getConfValueForOutput())); + break; + } + $hidden = new XoopsFormHidden('conf_ids[]', $obj[$i]->getVar('conf_id')); + if (isset($ele)) { + $ele->setDescription($desc); + if ($obj[$i]->getVar('conf_formtype') != 'hidden') { + $name = 'default'; + if (isset($configNames[$obj[$i]->getVar('conf_name')]['category'])) { + $name = $configNames[$obj[$i]->getVar('conf_name')]['category']; + } + $tabs[$name]->addElement($ele); + } else { + $this->addElement($ele); + } + $this->addElement($hidden); + unset($ele); + unset($hidden); + } + } + foreach (array_keys($tabs) as $name) { + if ($tabs[$name]->getElements()) { + $tabtray->addElement($tabs[$name]); + } + } + $this->addElement($tabtray); + $this->addElement(new XoopsFormHidden('op', 'save')); + $this->addElement(new XoopsFormButton('', 'button', _SUBMIT, 'submit')); + } +} |
From: <tr...@us...> - 2012-12-16 19:06:29
|
Revision: 10412 http://sourceforge.net/p/xoops/svn/10412 Author: trabis Date: 2012-12-16 19:06:26 +0000 (Sun, 16 Dec 2012) Log Message: ----------- deleting preference form Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/preference.php Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/preference.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/preference.php 2012-12-16 19:03:59 UTC (rev 10411) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/preference.php 2012-12-16 19:06:26 UTC (rev 10412) @@ -1,231 +0,0 @@ -<?php -/* - You may not change or alter any portion of this comment or credits - of supporting developers from this source code or any supporting source code - which is considered copyrighted (c) material of the original comment or credit authors. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -*/ - -/** - * Preference Form Class - * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @author Andricq Nicolas (AKA MusS) - * @package system - * @subpackage preferences - * @version $Id$ - */ - -defined('XOOPS_ROOT_PATH') or die('Restricted access'); - -class SystemPreferenceForm extends XoopsThemeForm -{ - /** - * @param null $obj - */ - public function __construct($obj = null) - { - } - - /** - * @param XoopsConfigCategory|XoopsObject $obj - * @return void - */ - public function getForm(XoopsConfigCategory &$obj) - { - $xoops = Xoops::getInstance(); - $config_handler = $xoops->getHandlerConfig(); - - parent::__construct(constant($obj->getVar('confcat_name')), 'pref_form', 'admin.php?fct=preferences', 'post', true); - - $criteria = new CriteriaCompo(); - $criteria->add(new Criteria('conf_modid', 1)); - $criteria->add(new Criteria('conf_catid', $obj->getVar('confcat_id'))); - $config = $config_handler->getConfigs($criteria); - $count = count($config); - for ($i = 0; $i < $count; $i++) { - - $title = constant($config[$i]->getVar('conf_title')); - $desc = ($config[$i]->getVar('conf_desc') != '') ? constant($config[$i]->getVar('conf_desc')) : ''; - - switch ($config[$i]->getVar('conf_formtype')) { - - case 'textarea': - $myts = MyTextSanitizer::getInstance(); - if ($config[$i]->getVar('conf_valuetype') == 'array') { - // this is exceptional.. only when value type is arrayneed a smarter way for this - $ele = ($config[$i]->getVar('conf_value') != '') - ? new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), $myts->htmlspecialchars(implode('|', $config[$i]->getConfValueForOutput())), 5, 5) - : new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), '', 5, 5); - } else { - $ele = new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), $myts->htmlspecialchars($config[$i]->getConfValueForOutput()), 5, 5); - } - break; - - case 'select': - $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); - $options = $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id'))); - $opcount = count($options); - for ($j = 0; $j < $opcount; $j++) { - $optval = defined($options[$j]->getVar('confop_value')) - ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value'); - $optkey = defined($options[$j]->getVar('confop_name')) - ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name'); - $ele->addOption($optval, $optkey); - } - break; - - case 'select_multi': - $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), 5, true); - $options = $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id'))); - $opcount = count($options); - for ($j = 0; $j < $opcount; $j++) { - $optval = defined($options[$j]->getVar('confop_value')) - ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value'); - $optkey = defined($options[$j]->getVar('confop_name')) - ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name'); - $ele->addOption($optval, $optkey); - } - break; - - case 'yesno': - $ele = new XoopsFormRadioYN($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), _YES, _NO); - break; - - case 'theme': - case 'theme_multi': - $ele = ($config[$i]->getVar('conf_formtype') != 'theme_multi') - ? new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()) - : new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), 5, true); - $dirlist = XoopsLists::getThemesList(); - if (!empty($dirlist)) { - asort($dirlist); - $ele->addOptionArray($dirlist); - } - break; - - case 'tplset': - $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); - $tplset_handler = $xoops->getHandlerTplset(); - $tplsetlist = $tplset_handler->getNameList(); - asort($tplsetlist); - foreach ($tplsetlist as $key => $name) { - $ele->addOption($key, $name); - } - break; - - case 'cpanel': - $ele = new XoopsFormHidden($config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); - /* - $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); - XoopsLoad::load("cpanel", "system"); - $list = XoopsSystemCpanel::getGuis(); - $ele->addOptionArray($list); */ - break; - - case 'timezone': - $ele = new XoopsFormSelectTimezone($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); - break; - - case 'language': - $ele = new XoopsFormSelectLang($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); - break; - - case 'startpage': - $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); - - $module_handler = $xoops->getHandlerModule(); - $criteria = new CriteriaCompo(new Criteria('hasmain', 1)); - $criteria->add(new Criteria('isactive', 1)); - $moduleslist = $module_handler->getNameList($criteria, true); - $moduleslist['--'] = _MD_AM_NONE; - $ele->addOptionArray($moduleslist); - break; - - case 'group': - $ele = new XoopsFormSelectGroup($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 1, false); - break; - - case 'group_multi': - $ele = new XoopsFormSelectGroup($title, $config[$i]->getVar('conf_name'), true, $config[$i]->getConfValueForOutput(), 5, true); - break; - - // RMV-NOTIFY - added 'user' and 'user_multi' - case 'user': - $ele = new XoopsFormSelectUser($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 1, false); - break; - - case 'user_multi': - $ele = new XoopsFormSelectUser($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 5, true); - break; - - case 'module_cache': - $module_handler = $xoops->getHandlerModule(); - $modules = $module_handler->getObjectsArray(new Criteria('hasmain', 1), true); - $currrent_val = $config[$i]->getConfValueForOutput(); - $cache_options = array( - '0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, '300' => sprintf(_MINUTES, 5), - '1800' => sprintf(_MINUTES, 30), '3600' => _HOUR, '18000' => sprintf(_HOURS, 5), - '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK - ); - if (count($modules) > 0) { - $ele = new XoopsFormElementTray($title, '<br />'); - foreach (array_keys($modules) as $mid) { - $c_val = isset($currrent_val[$mid]) ? intval($currrent_val[$mid]) : null; - $selform = new XoopsFormSelect($modules[$mid]->getVar('name'), $config[$i]->getVar('conf_name') . "[$mid]", $c_val); - $selform->addOptionArray($cache_options); - $ele->addElement($selform); - unset($selform); - } - } else { - $ele = new XoopsFormLabel($title, _MD_AM_NOMODULE); - } - break; - - case 'site_cache': - $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); - $ele->addOptionArray(array( - '0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, - '300' => sprintf(_MINUTES, 5), '1800' => sprintf(_MINUTES, 30), - '3600' => _HOUR, '18000' => sprintf(_HOURS, 5), '86400' => _DAY, - '259200' => sprintf(_DAYS, 3), '604800' => _WEEK - )); - break; - - case 'password': - $myts = MyTextSanitizer::getInstance(); - $ele = new XoopsFormPassword($title, $config[$i]->getVar('conf_name'), 5, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput())); - break; - - case 'color': - $myts = MyTextSanitizer::getInstance(); - $ele = new XoopsFormColorPicker($title, $config[$i]->getVar('conf_name'), $myts->htmlspecialchars($config[$i]->getConfValueForOutput())); - break; - - case 'hidden': - $myts = MyTextSanitizer::getInstance(); - $ele = new XoopsFormHidden($config[$i]->getVar('conf_name'), $myts->htmlspecialchars($config[$i]->getConfValueForOutput())); - break; - - case 'textbox': - default: - $myts = MyTextSanitizer::getInstance(); - $ele = new XoopsFormText($title, $config[$i]->getVar('conf_name'), 5, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput())); - break; - - } - $hidden = new XoopsFormHidden('conf_ids[]', $config[$i]->getVar('conf_id')); - $ele->setDescription($desc); - $this->addElement($ele); - $this->addElement($hidden); - unset($ele); - unset($hidden); - } - $this->addElement(new XoopsFormHidden('op', 'save')); - $this->addElement(new XoopsFormButton('', 'button', _SUBMIT, 'submit')); - } -} |
From: <tr...@us...> - 2012-12-16 19:04:02
|
Revision: 10411 http://sourceforge.net/p/xoops/svn/10411 Author: trabis Date: 2012-12-16 19:03:59 +0000 (Sun, 16 Dec 2012) Log Message: ----------- Removing breaks, dont forget to update system module! Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php 2012-12-16 18:58:55 UTC (rev 10410) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php 2012-12-16 19:03:59 UTC (rev 10411) @@ -830,13 +830,6 @@ $modversion['config'][$i]['default'] = 0; $i++; -// Préférences -$modversion['config'][$i]['name'] = 'break1'; -$modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_BREAK_GENERAL'; -$modversion['config'][$i]['description'] = ''; -$modversion['config'][$i]['formtype'] = 'line_break'; -$modversion['config'][$i]['valuetype'] = 'textbox'; -$modversion['config'][$i]['default'] = 'head'; $i++; $modversion['config'][$i]['name'] = 'usetips'; $modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_TIPS'; @@ -872,14 +865,8 @@ $modversion['config'][$i]['valuetype'] = 'text'; $modversion['config'][$i]['default'] = 'base'; $modversion['config'][$i]['options'] = $jquery_theme; + $i++; -$modversion['config'][$i]['name'] = 'break2'; -$modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_BREAK_ACTIVE'; -$modversion['config'][$i]['description'] = ''; -$modversion['config'][$i]['formtype'] = 'line_break'; -$modversion['config'][$i]['valuetype'] = 'textbox'; -$modversion['config'][$i]['default'] = 'head'; -$i++; $modversion['config'][$i]['name'] = 'active_avatars'; $modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_ACTIVE_AVATARS'; $modversion['config'][$i]['description'] = ''; @@ -984,14 +971,8 @@ $modversion['config'][$i]['formtype'] = 'yesno'; $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = '1'; + $i++; -$modversion['config'][$i]['name'] = 'break3'; -$modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_BREAK_PAGER'; -$modversion['config'][$i]['description'] = ''; -$modversion['config'][$i]['formtype'] = 'line_break'; -$modversion['config'][$i]['valuetype'] = 'textbox'; -$modversion['config'][$i]['default'] = 'head'; -$i++; $modversion['config'][$i]['name'] = 'avatars_pager'; $modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_AVATARS_PAGER'; $modversion['config'][$i]['description'] = ''; @@ -1047,14 +1028,8 @@ $modversion['config'][$i]['formtype'] = 'textbox'; $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 20; + $i++; -$modversion['config'][$i]['name'] = 'break4'; -$modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_BREAK_EDITOR'; -$modversion['config'][$i]['description'] = ''; -$modversion['config'][$i]['formtype'] = 'line_break'; -$modversion['config'][$i]['valuetype'] = 'textbox'; -$modversion['config'][$i]['default'] = 'head'; -$i++; $editors = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . '/class/xoopseditor'); $modversion['config'][$i]['name'] = 'blocks_editor'; $modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_BLOCKS_EDITOR'; |
From: <tr...@us...> - 2012-12-16 18:58:57
|
Revision: 10410 http://sourceforge.net/p/xoops/svn/10410 Author: trabis Date: 2012-12-16 18:58:55 +0000 (Sun, 16 Dec 2012) Log Message: ----------- Updating modulepreference.php Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/modulepreference.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/modulepreference.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/modulepreference.php 2012-12-16 18:53:38 UTC (rev 10409) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/modulepreference.php 2012-12-16 18:58:55 UTC (rev 10410) @@ -33,8 +33,9 @@ } /** - * @param $obj + * @param $obj * @param XoopsModule|XoopsObject $mod + * * @return void */ public function getForm(&$obj, XoopsModule &$mod) @@ -55,17 +56,15 @@ if (!$configCats) { $configCats = array( 'default' => array( - 'name' => _MD_AM_MODCONFIG, - 'description'=> '' - ) - ); + 'name' => _MD_AM_MODCONFIG, 'description' => '' + ) + ); } if (!in_array('default', array_keys($configCats))) { $configCats['default'] = array( - 'name' => _MD_AM_MODCONFIG, - 'description'=> '' - ); + 'name' => _MD_AM_MODCONFIG, 'description' => '' + ); } foreach (array_keys($configNames) as $name) { @@ -78,7 +77,7 @@ $tabs = array(); foreach ($configCats as $name => $info) { $tabs[$name] = new XoopsFormTab($info['name'], 'pref_tab_' . $name); - if(isset($info['description']) && $info['description'] != '') { + if (isset($info['description']) && $info['description'] != '') { $tabs[$name]->addElement(new XoopsFormLabel('', $info['description'])); } } @@ -110,9 +109,7 @@ $myts = MyTextSanitizer::getInstance(); if ($obj[$i]->getVar('conf_valuetype') == 'array') { // this is exceptional.. only when value type is arrayneed a smarter way for this - $ele = ($obj[$i]->getVar('conf_value') != '') - ? new XoopsFormTextArea($title, $obj[$i]->getVar('conf_name'), $myts->htmlspecialchars(implode('|', $obj[$i]->getConfValueForOutput())), 5, 5) - : new XoopsFormTextArea($title, $obj[$i]->getVar('conf_name'), '', 5, 5); + $ele = ($obj[$i]->getVar('conf_value') != '') ? new XoopsFormTextArea($title, $obj[$i]->getVar('conf_name'), $myts->htmlspecialchars(implode('|', $obj[$i]->getConfValueForOutput())), 5, 5) : new XoopsFormTextArea($title, $obj[$i]->getVar('conf_name'), '', 5, 5); } else { $ele = new XoopsFormTextArea($title, $obj[$i]->getVar('conf_name'), $myts->htmlspecialchars($obj[$i]->getConfValueForOutput()), 5, 5); } @@ -123,10 +120,8 @@ $options = $config_handler->getConfigOptions(new Criteria('conf_id', $obj[$i]->getVar('conf_id'))); $opcount = count($options); for ($j = 0; $j < $opcount; $j++) { - $optval = defined($options[$j]->getVar('confop_value')) - ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value'); - $optkey = defined($options[$j]->getVar('confop_name')) - ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name'); + $optval = defined($options[$j]->getVar('confop_value')) ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value'); + $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name'); $ele->addOption($optval, $optkey); } break; @@ -136,10 +131,8 @@ $options = $config_handler->getConfigOptions(new Criteria('conf_id', $obj[$i]->getVar('conf_id'))); $opcount = count($options); for ($j = 0; $j < $opcount; $j++) { - $optval = defined($options[$j]->getVar('confop_value')) - ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value'); - $optkey = defined($options[$j]->getVar('confop_name')) - ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name'); + $optval = defined($options[$j]->getVar('confop_value')) ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value'); + $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name'); $ele->addOption($optval, $optkey); } break; @@ -148,6 +141,53 @@ $ele = new XoopsFormRadioYN($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput(), _YES, _NO); break; + case 'theme': + case 'theme_multi': + $ele = ($obj[$i]->getVar('conf_formtype') != 'theme_multi') ? new XoopsFormSelect($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()) : new XoopsFormSelect($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput(), 5, true); + $dirlist = XoopsLists::getThemesList(); + if (!empty($dirlist)) { + asort($dirlist); + $ele->addOptionArray($dirlist); + } + break; + case 'tplset': + $ele = new XoopsFormSelect($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); + $tplset_handler = $xoops->getHandlerTplset(); + $tplsetlist = $tplset_handler->getNameList(); + asort($tplsetlist); + foreach ($tplsetlist as $key => $name) { + $ele->addOption($key, $name); + } + break; + + case 'cpanel': + $ele = new XoopsFormHidden($obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); + /* + $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); + XoopsLoad::load("cpanel", "system"); + $list = XoopsSystemCpanel::getGuis(); + $ele->addOptionArray($list); */ + break; + + case 'timezone': + $ele = new XoopsFormSelectTimezone($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); + break; + + case 'language': + $ele = new XoopsFormSelectLang($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); + break; + + case 'startpage': + $ele = new XoopsFormSelect($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); + + $module_handler = $xoops->getHandlerModule(); + $criteria = new CriteriaCompo(new Criteria('hasmain', 1)); + $criteria->add(new Criteria('isactive', 1)); + $moduleslist = $module_handler->getNameList($criteria, true); + $moduleslist['--'] = _MD_AM_NONE; + $ele->addOptionArray($moduleslist); + break; + case 'group': $ele = new XoopsFormSelectGroup($title, $obj[$i]->getVar('conf_name'), false, $obj[$i]->getConfValueForOutput(), 1, false); break; @@ -164,7 +204,38 @@ case 'user_multi': $ele = new XoopsFormSelectUser($title, $obj[$i]->getVar('conf_name'), false, $obj[$i]->getConfValueForOutput(), 5, true); break; + case 'module_cache': + $module_handler = $xoops->getHandlerModule(); + $modules = $module_handler->getObjectsArray(new Criteria('hasmain', 1), true); + $currrent_val = $obj[$i]->getConfValueForOutput(); + $cache_options = array( + '0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, + '300' => sprintf(_MINUTES, 5), '1800' => sprintf(_MINUTES, 30), '3600' => _HOUR, + '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK + ); + if (count($modules) > 0) { + $ele = new XoopsFormElementTray($title, '<br />'); + foreach (array_keys($modules) as $mid) { + $c_val = isset($currrent_val[$mid]) ? intval($currrent_val[$mid]) : null; + $selform = new XoopsFormSelect($modules[$mid]->getVar('name'), $obj[$i]->getVar('conf_name') . "[$mid]", $c_val); + $selform->addOptionArray($cache_options); + $ele->addElement($selform); + unset($selform); + } + } else { + $ele = new XoopsFormLabel($title, _MD_AM_NOMODULE); + } + break; + case 'site_cache': + $ele = new XoopsFormSelect($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); + $ele->addOptionArray(array( + '0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, + '300' => sprintf(_MINUTES, 5), '1800' => sprintf(_MINUTES, 30), '3600' => _HOUR, + '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK + )); + break; + case 'password': $myts = MyTextSanitizer::getInstance(); $ele = new XoopsFormPassword($title, $obj[$i]->getVar('conf_name'), 5, 255, $myts->htmlspecialchars($obj[$i]->getConfValueForOutput())); @@ -185,7 +256,6 @@ $myts = MyTextSanitizer::getInstance(); $ele = new XoopsFormText($title, $obj[$i]->getVar('conf_name'), 5, 255, $myts->htmlspecialchars($obj[$i]->getConfValueForOutput())); break; - } $hidden = new XoopsFormHidden('conf_ids[]', $obj[$i]->getVar('conf_id')); if (isset($ele)) { |
From: <ma...@us...> - 2012-12-16 18:53:41
|
Revision: 10409 http://sourceforge.net/p/xoops/svn/10409 Author: mageg Date: 2012-12-16 18:53:38 +0000 (Sun, 16 Dec 2012) Log Message: ----------- remove form link and old link for pref. Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/theme.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/menu.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php 2012-12-16 18:43:15 UTC (rev 10408) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php 2012-12-16 18:53:38 UTC (rev 10409) @@ -118,40 +118,7 @@ $menu = array(); $OPT = array(); - $OPT[] = array( - 'link' => 'admin.php?fct=preferences&op=show&confcat_id=1', 'title' => _DEFAULT_GENERAL, - 'absolute' => 1, 'icon' => XOOPS_ADMINTHEME_URL . '/default/icons/prefs_small.png' - ); - $OPT[] = array( - 'link' => 'admin.php?fct=preferences&op=show&confcat_id=2', 'title' => _DEFAULT_USERSETTINGS, - 'absolute' => 1, 'icon' => XOOPS_ADMINTHEME_URL . '/default/icons/prefs_small.png' - ); - $OPT[] = array( - 'link' => 'admin.php?fct=preferences&op=show&confcat_id=3', 'title' => _DEFAULT_METAFOOTER, - 'absolute' => 1, 'icon' => XOOPS_ADMINTHEME_URL . '/default/icons/prefs_small.png' - ); - $OPT[] = array( - 'link' => 'admin.php?fct=preferences&op=show&confcat_id=4', 'title' => _DEFAULT_CENSOR, - 'absolute' => 1, 'icon' => XOOPS_ADMINTHEME_URL . '/default/icons/prefs_small.png' - ); - $OPT[] = array( - 'link' => 'admin.php?fct=preferences&op=show&confcat_id=5', 'title' => _DEFAULT_SEARCH, - 'absolute' => 1, 'icon' => XOOPS_ADMINTHEME_URL . '/default/icons/prefs_small.png' - ); - $OPT[] = array( - 'link' => 'admin.php?fct=preferences&op=show&confcat_id=6', 'title' => _DEFAULT_MAILER, - 'absolute' => 1, 'icon' => XOOPS_ADMINTHEME_URL . '/default/icons/prefs_small.png' - ); - $OPT[] = array( - 'link' => 'admin.php?fct=preferences&op=show&confcat_id=7', 'title' => _DEFAULT_AUTHENTICATION, - 'absolute' => 1, 'icon' => XOOPS_ADMINTHEME_URL . '/default/icons/prefs_small.png' - ); - $OPT[] = array( - 'link' => 'admin.php?fct=preferences&op=showmod&mod=1', 'title' => _DEFAULT_MODULESETTINGS, - 'absolute' => 1, 'icon' => XOOPS_ADMINTHEME_URL . '/default/icons/prefs_small.png' - ); - $menu[] = array( 'link' => XOOPS_URL . '/modules/system/admin.php?fct=preferences', 'title' => _DEFAULT_SYSOPTIONS, 'absolute' => 1, 'url' => XOOPS_URL . '/modules/system/', 'options' => $OPT Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/theme.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/theme.html 2012-12-16 18:43:15 UTC (rev 10408) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/theme.html 2012-12-16 18:53:38 UTC (rev 10409) @@ -18,9 +18,6 @@ <div class="container-fluid"> <{includeq file="$theme_tpl/dashboard.html"}> </div> -<div class="center"> - <a href="<{$xoops_url}>/modules/system/testform.php">Test new form</a> -</div> <div class="footer"> <p class="pull-right"><a href="#">Back to top</a></p> <p class="txtcenter"> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/menu.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/menu.html 2012-12-16 18:43:15 UTC (rev 10408) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/menu.html 2012-12-16 18:53:38 UTC (rev 10409) @@ -54,15 +54,6 @@ <{if $pref->getInfo(link_pref)}> <li> <a href="<{$pref->getInfo(link_pref)}>" title="<{$pref->getVar(name)}>"><{$pref->getVar(name)}></a> - <ul class="dropdown-menu"> - <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=1}>"><{$smarty.const._DEFAULT_GENERAL}></a></li> - <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=2}>"><{$smarty.const._DEFAULT_USERSETTINGS}></a></li> - <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=3}>"><{$smarty.const._DEFAULT_METAFOOTER}></a></li> - <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=4}>"><{$smarty.const._DEFAULT_CENSOR}></a></li> - <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=5}>"><{$smarty.const._DEFAULT_SEARCH}></a></li> - <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=6}>"><{$smarty.const._DEFAULT_MAILER}></a></li> - <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=7}>"><{$smarty.const._DEFAULT_AUTHENTICATION}></a></li> - </ul> </li> <{/if}> <{/if}> |
From: <tr...@us...> - 2012-12-16 18:43:18
|
Revision: 10408 http://sourceforge.net/p/xoops/svn/10408 Author: trabis Date: 2012-12-16 18:43:15 +0000 (Sun, 16 Dec 2012) Log Message: ----------- Updating getConfig() Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/censor/censor.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/notification_functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/site-closed.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/config.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/notification.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/activate.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changemail.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changepass.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/edituser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/forms.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/register.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/userinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/include/postcheck_functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/search.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/avatar.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/users.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/include/update.php XoopsCore/branches/2.6.x/2.6.0/htdocs/register.php XoopsCore/branches/2.6.x/2.6.0/htdocs/search.php XoopsCore/branches/2.6.x/2.6.0/htdocs/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/userinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Auth/Factory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Auth/Ldap.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Auth/Provisioning.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -119,7 +119,7 @@ public function __construct() { $xoops = Xoops::getInstance(); - $xoopsMailerConfig = $xoops->getConfigs(XOOPS_CONF_MAILER); + $xoopsMailerConfig = $xoops->getConfigs(); $this->From = $xoopsMailerConfig['from']; if ($this->From == '') { $this->From = $xoops->getConfig('adminmail'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/censor/censor.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/censor/censor.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/censor/censor.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -43,7 +43,7 @@ $xoops = Xoops::getInstance(); if (!isset($censorConf)) { - $censorConf = $xoops->getConfigs(XOOPS_CONF_CENSOR); + $censorConf = $xoops->getConfigs(); $config = parent::loadConfig(dirname(__FILE__)); //merge and allow config override $censorConf = array_merge($censorConf, $config); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -340,9 +340,9 @@ } // Meta tags + // todo, check if we can use $xoops->getConfigs() instead $config_handler = $xoops->getHandlerConfig(); - $criteria = new CriteriaCompo(new Criteria('conf_modid', 0)); - $criteria->add(new Criteria('conf_catid', XOOPS_CONF_METAFOOTER)); + $criteria = new CriteriaCompo(new Criteria('conf_modid', 1)); $config = $config_handler->getConfigs($criteria, true); foreach (array_keys($config) as $i) { $name = $config[$i]->getVar('conf_name', 'n'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -33,7 +33,6 @@ static function sendWelcome($user) { $xoops = Xoops::getInstance(); - $xoops->getConfigs(XOOPS_CONF_USER); if (!$xoops->getConfig('welcome_type')) { return true; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/functions.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/functions.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/functions.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -476,7 +476,7 @@ { $xoops = Xoops::getInstance(); $xoops->deprecated(__FUNCTION__ . ' is deprecated since XOOPS 2.6.0. See how to replace it in file ' . __FILE__ . ' line ' . __LINE__); - return $xoops->getConfig($option, $type); + return $xoops->getConfig($option); } /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/notification_functions.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/notification_functions.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/notification_functions.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -41,7 +41,7 @@ } $module = $xoops->getHandlerModule()->getById($module_id); if (!empty($module) && $module->getVar('hasnotification') == 1) { - $config = $xoops->getHandlerConfig()->getConfigsByCat(0, $module_id); + $config = $xoops->getHandlerConfig()->getConfigsByModule($module_id); $status = $config['notification_enabled']; } else { return false; @@ -188,7 +188,7 @@ include_once $xoops->path('include/comment_constants.php'); $config_handler = $xoops->getHandlerConfig(); - $com_config = $config_handler->getConfigsByCat(0, $module_id); + $com_config = $config_handler->getConfigsByModule($module_id); if (!$enabled_only) { $insert_comment = true; $insert_submit = true; @@ -278,7 +278,7 @@ { $xoops = Xoops::getInstance(); $config_handler = $xoops->getHandlerConfig(); - $mod_config = $config_handler->getConfigsByCat(0, $module->getVar('mid')); + $mod_config = $config_handler->getConfigsByModule($module->getVar('mid')); if (is_array($mod_config['notification_events']) && $mod_config['notification_events'] != array()) { $option_name = notificationGenerateConfig($category, $event, 'option_name'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/site-closed.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/site-closed.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/site-closed.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -59,9 +59,10 @@ 'lang_login' => _LOGIN, 'lang_username' => _USERNAME, 'lang_password' => _PASSWORD, 'lang_siteclosemsg' => $xoops->getConfig('closesite_text') )); + //todo check if we can use $xoops->getConfig() instead $config_handler = $xoops->getHandlerConfig(); - $criteria = new CriteriaCompo(new Criteria('conf_modid', 0)); - $criteria->add(new Criteria('conf_catid', XOOPS_CONF_METAFOOTER)); + $criteria = new CriteriaCompo(new Criteria('conf_modid', 1)); + $criteria->add(new Criteria('conf_catid')); $config = $config_handler->getConfigs($criteria, true); foreach (array_keys($config) as $i) { $name = $config[$i]->getVar('conf_name', 'n'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/config.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/config.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/config.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -190,8 +190,36 @@ } /** + * Get configs from a certain module + * + * @param int $module ID of a module + * + * @return array array of {@link XoopsConfig}s + */ + public function getConfigsByModule($module = 0) + { + static $_cachedConfigs; + if (!empty($_cachedConfigs[$module])) { + return $_cachedConfigs[$module]; + } else { + $ret = array(); + $criteria = new Criteria('conf_modid', intval($module)); + $configs = $this->getConfigs($criteria, true); + if (is_array($configs)) { + foreach (array_keys($configs) as $i) { + $ret[$configs[$i]->getVar('conf_name')] = $configs[$i]->getConfValueForOutput(); + } + } + $_cachedConfigs[$module] = $ret; + return $_cachedConfigs[$module]; + } + } + + /** * Get configs from a certain category * + * @deprecated Use getConfigsByModule instead + * * @param int $category ID of a category * @param int $module ID of a module * Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/notification.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/notification.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/notification.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -162,7 +162,7 @@ switch ($method) { case XOOPS_NOTIFICATION_METHOD_PM: $xoopsMailer->usePM(); - $xoopsMailerConfig = $xoops->getConfigs(XOOPS_CONF_MAILER); + $xoopsMailerConfig = $xoops->getConfigs(); $xoopsMailer->setFromUser($member_handler->getUser($xoopsMailerConfig['fromuid'])); foreach ($tags as $k => $v) { $xoopsMailer->assign($k, $v); @@ -503,7 +503,7 @@ } // Check if event is enabled - $mod_config = $xoops->getHandlerConfig()->getConfigsByCat(0, $module->getVar('mid')); + $mod_config = $xoops->getHandlerConfig()->getConfigsByModule($module->getVar('mid')); if (empty($mod_config['notification_enabled'])) { return false; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/activate.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/activate.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/activate.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -45,7 +45,7 @@ $xoops->redirect(XOOPS_URL . '/modules/' . $xoops->module->getVar('dirname', 'n'). '/index.php', 5, _US_ACONTACT, false); } else { if (false != $member_handler->activateUser($thisuser)) { - $xoops->getConfigs(XOOPS_CONF_USER); + $xoops->getConfigs(); if ($xoops->getConfig('activation_type') == 2) { $myts = MyTextSanitizer::getInstance(); $xoopsMailer = $xoops->getMailer(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changemail.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changemail.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changemail.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -24,7 +24,7 @@ $xoops = Xoops::getInstance(); $xoops->loadLanguage('user'); -$xoops->getConfigs(XOOPS_CONF_USER); +$xoops->getConfigs(); if (!$xoops->user || $xoops->getConfig('allow_chgmail') != 1) { $xoops->redirect(XOOPS_URL . "/modules/" . $xoops->module->getVar('dirname', 'n') . "/", 2, _NOPERM); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changepass.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changepass.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changepass.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -41,7 +41,7 @@ $xoops->appendConfig('profile_breadcrumbs', array('title' => _PROFILE_MA_CHANGEPASSWORD)); } else { - $xoops->getConfigs(XOOPS_CONF_USER); + $xoops->getConfigs(); $myts = MyTextSanitizer::getInstance(); $oldpass = @$myts->stripSlashesGPC(trim($_POST['oldpass'])); $password = @$myts->stripSlashesGPC(trim($_POST['newpass'])); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/edituser.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/edituser.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/edituser.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -32,7 +32,7 @@ $myts = MyTextSanitizer::getInstance(); $op = isset($_REQUEST['op']) ? $_REQUEST['op'] : 'editprofile'; -$xoops->getConfigs(XOOPS_CONF_USER); +$xoops->getConfigs(); if ($op == 'save') { if (!$xoops->security()->check()) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/forms.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/forms.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/forms.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -34,7 +34,6 @@ function profile_getRegisterForm(XoopsUser &$user, $profile, $step = null) { $xoops = Xoops::getInstance(); - $xoops->getConfigs(XOOPS_CONF_USER); $action = $_SERVER['REQUEST_URI']; $step_no = $step['step_no']; $use_token = $step['step_no'] > 0 ? true : false; @@ -129,7 +128,6 @@ function profile_getUserForm(XoopsUser &$user, ProfileProfile $profile = null, $action = false) { $xoops = Xoops::getInstance(); - $xoops->getConfigs(XOOPS_CONF_USER); if ($action === false) { $action = $_SERVER['REQUEST_URI']; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/index.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/index.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -97,7 +97,6 @@ } if ($op == 'delete') { - $xoops->getConfigs(XOOPS_CONF_USER); if (!$xoops->isUser() || $xoops->getConfig('self_delete') != 1) { $xoops->redirect(XOOPS_URL . '/', 5, _US_NOPERMISS); } else { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/register.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/register.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/register.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -36,7 +36,7 @@ } $myts = MyTextSanitizer::getInstance(); -$xoops->getConfigs(XOOPS_CONF_USER); +$xoops->getConfigs(); if (!$xoops->getConfig('allow_register')) { $xoops->redirect('index.php', 6, _US_NOREGISTER); } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/user.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/user.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/user.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -100,7 +100,7 @@ } if ($op == 'delete') { - $xoops->getConfigs(XOOPS_CONF_USER); + $xoops->getConfigs(); if (!$xoops->isUser() || $xoops->getConfig('self_delete') != 1) { $xoops->redirect(XOOPS_URL . '/', 5, _US_NOPERMISS); } else { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/userinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/userinfo.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/userinfo.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -42,7 +42,7 @@ //disable cache $xoops->disableModuleCache(); $xoops->header('profile_userinfo.html'); - $xoops->getConfigs(XOOPS_CONF_USER); + $xoops->getConfigs(); $xoops->tpl()->assign('user_ownpage', true); $xoops->tpl()->assign('lang_editprofile', _US_EDITPROFILE); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/include/postcheck_functions.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/include/postcheck_functions.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/include/postcheck_functions.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -56,8 +56,7 @@ // phpmailer vulnerability // http://larholm.com/2007/06/11/phpmailer-0day-remote-execution/ if (in_array(substr(XOOPS_VERSION, 0, 12), array('XOOPS 2.0.16', 'XOOPS 2.0.13', 'XOOPS 2.2.4'))) { - $config_handler = $xoops->getHandlerConfig(); - $xoopsMailerConfig = $config_handler->getConfigsByCat(XOOPS_CONF_MAILER); + $xoopsMailerConfig = $xoops->getConfigs(); if ($xoopsMailerConfig['mailmethod'] == 'sendmail' && md5_file(XOOPS_ROOT_PATH . '/class/mail/phpmailer/class.phpmailer.php') == 'ee1c09a8e579631f0511972f929fe36a') { echo '<strong>phpmailer security hole! Change the preferences of mail from "sendmail" to another, or upgrade the core right now! (message by protector)</strong>'; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/search.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/search.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/search.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -28,8 +28,7 @@ $myts = MyTextSanitizer::getInstance(); //Checking general permissions -$config_handler = $xoops->getHandlerConfig(); -$xoopsConfigSearch = $config_handler->getConfigsByCat(XOOPS_CONF_SEARCH); +$xoopsConfigSearch = $xoops->getConfigs(); if (empty($xoopsConfigSearch["enable_search"])) { $xoops->redirect(PUBLISHER_URL . "/index.php", 2, _NOPERM); } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/avatar.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/avatar.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/avatar.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -37,8 +37,7 @@ } // Get User Config $xoops = Xoops::getInstance(); - $config_handler = $xoops->getHandlerConfig(); - $xoopsConfigUser = $config_handler->getConfigsByCat(XOOPS_CONF_USER); + $xoopsConfigUser = $xoops->getConfigs(); // New and edit form parent::__construct(_AM_SYSTEM_AVATAR_ADD, 'avatar_form', 'admin.php', "post", true); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/users.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/users.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/users.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -38,7 +38,7 @@ } // Get User Config $xoops = Xoops::getInstance(); - $xoopsConfigUser = $xoops->getConfigs(XOOPS_CONF_USER); + $xoopsConfigUser = $xoops->getConfigs(); $form = new XoopsThemeForm(_AM_SYSTEM_AVATAR_ADD, 'avatar_form', 'admin.php', "post", true); $form->setExtra('enctype="multipart/form-data"'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/include/update.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/include/update.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/include/update.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -27,7 +27,6 @@ */ function xoops_module_update_system(XoopsModule &$module) { $xoops = Xoops::getInstance(); - $db =& XoopsDatabaseFactory::getDatabaseConnection(); if ($module->getVar('version') == 100) { $result = $xoops->db()->query("SELECT t1.tpl_id FROM ".$xoops->db()->prefix('tplfile')." t1, ".$xoops->db()->prefix('tplfile')." t2 WHERE t1.tpl_module = t2.tpl_module AND t1.tpl_tplset=t2.tpl_tplset AND t1.tpl_file = t2.tpl_file AND t1.tpl_id > t2.tpl_id"); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/register.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/register.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/register.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -27,7 +27,7 @@ $myts = MyTextSanitizer::getInstance(); -$xoopsConfigUser = $xoops->getConfigs(XOOPS_CONF_USER); +$xoopsConfigUser = $xoops->getConfigs(); if (empty($xoopsConfigUser['allow_register'])) { $xoops->redirect('index.php', 6, _US_NOREGISTER); @@ -213,7 +213,7 @@ $xoops->redirect('user.php', 5, _US_ACONTACT, false); } else { if (false != $member_handler->activateUser($thisuser)) { - $xoopsConfigUser = $xoops->getConfigs(XOOPS_CONF_USER); + $xoopsConfigUser = $xoops->getConfigs(); if ($xoopsConfigUser['activation_type'] == 2) { $myts = MyTextSanitizer::getInstance(); $xoopsMailer = $xoops->getMailer(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/search.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/search.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/search.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -26,7 +26,7 @@ $xoops = Xoops::getInstance(); $xoops->loadLanguage('search'); -$xoopsConfigSearch = $xoops->getConfigs(XOOPS_CONF_SEARCH); +$xoopsConfigSearch = $xoops->getConfigs(); if ($xoopsConfigSearch['enable_search'] != 1) { header('Location: ' . XOOPS_URL . '/index.php'); @@ -187,7 +187,7 @@ } $res[$i]['title'] = $myts->htmlspecialchars($results[$i]['title']); $res[$i]['title_highligh'] = preg_replace( $queries_pattern, "<span class='searchHighlight'>$1</span>", $myts->htmlspecialchars($results[$i]['title'])); - if ( !empty($results[$i]['uid']) ) { + if ( !empty($results[$i]['uid']) ) { $res[$i]['uid'] = intval($results[$i]['uid']); $res[$i]['uname'] = XoopsUser::getUnameFromId($results[$i]['uid'], true); } @@ -250,10 +250,10 @@ $res[$i]['link'] = 'modules/' . $module->getVar('dirname') . '/' . $results[$i]['link']; } $res[$i]['title'] = $myts->htmlspecialchars($results[$i]['title']); - if (isset($queries_pattern)) { - $res[$i]['title_highligh'] = preg_replace( $queries_pattern, "<span class='searchHighlight'>$1</span>", $myts->htmlspecialchars($results[$i]['title'])); - } else { - $res[$i]['title_highligh'] = $myts->htmlspecialchars($results[$i]['title']); + if (isset($queries_pattern)) { + $res[$i]['title_highligh'] = preg_replace( $queries_pattern, "<span class='searchHighlight'>$1</span>", $myts->htmlspecialchars($results[$i]['title'])); + } else { + $res[$i]['title_highligh'] = $myts->htmlspecialchars($results[$i]['title']); } if ( !empty($results[$i]['uid']) ) { $res[$i]['uid'] = @intval($results[$i]['uid']); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/user.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/user.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/user.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -101,7 +101,7 @@ } if ($op == 'delete') { - $xoopsConfigUser = $xoops->getConfigs(XOOPS_CONF_USER); + $xoopsConfigUser = $xoops->getConfigs(); if (!$xoops->isUser() || $xoopsConfigUser['self_delete'] != 1) { $xoops->redirect('index.php', 5, _US_NOPERMISS); } else { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/userinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/userinfo.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/userinfo.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -39,7 +39,7 @@ $isAdmin = $gperm_handler->checkRight('system_admin', XOOPS_SYSTEM_USER, $groups); if ($xoops->isUser()) { if ($uid == $xoops->user->getVar('uid')) { - $xoopsConfigUser = $xoops->getConfigs(XOOPS_CONF_USER); + $xoopsConfigUser = $xoops->getConfigs(); $xoops->header('system_userinfo.html'); $xoops->tpl()->assign('user_ownpage', true); $xoops->tpl()->assign('lang_editprofile', _US_EDITPROFILE); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Auth/Factory.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Auth/Factory.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Auth/Factory.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -48,7 +48,7 @@ static $auth_instance; if (!isset($auth_instance)) { /* @var $config_handler XoopsConfigHandler */ - $authConfig = $xoops->getConfigs(XOOPS_CONF_AUTH); + $authConfig = $xoops->getConfigs(); if (empty($authConfig['auth_method'])) { // If there is a config error, we use xoops $xoops_auth_method = 'xoops'; } else { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Auth/Ldap.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Auth/Ldap.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Auth/Ldap.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -209,7 +209,7 @@ $xoops = Xoops::getInstance(); $this->_dao = $dao; //Configuration options that are stored in the database - $configs = $xoops->getConfigs(XOOPS_CONF_AUTH); + $configs = $xoops->getConfigs(); foreach ($configs as $key => $val) { $this->$key = $val; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Auth/Provisioning.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Auth/Provisioning.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Auth/Provisioning.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -84,15 +84,10 @@ { $xoops = Xoops::getInstance(); $this->_auth_instance = $auth_instance; - $configs = $xoops->getConfigs(XOOPS_CONF_AUTH); + $configs = $xoops->getConfigs(); foreach ($configs as $key => $val) { $this->$key = $val; } - $config_gen = $xoops->getConfigs(XOOPS_CONF); - $this->default_TZ = $config_gen['default_TZ']; - $this->theme_set = $config_gen['theme_set']; - $this->com_mode = $config_gen['com_mode']; - $this->com_order = $config_gen['com_order']; } /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php 2012-12-16 17:32:53 UTC (rev 10407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php 2012-12-16 18:43:15 UTC (rev 10408) @@ -1041,7 +1041,7 @@ */ public function simpleHeader($closehead = true) { - $xoopsConfigMetaFooter = $this->getConfigs(XOOPS_CONF_METAFOOTER); + $xoopsConfigMetaFooter = $this->getConfigs(); if (!headers_sent()) { header('Content-Type:text/html; charset=' . _CHARSET); @@ -1510,17 +1510,15 @@ /** * @param string $key - * @param string $type - * @param int $module * * @return mixed */ - public function getConfig($key, $type = 'XOOPS_CONF', $module = 1) + public function getConfig($key) { if (isset($this->_systemConfigs[$key])) { return $this->_systemConfigs[$key]; } - $this->getConfigs($type, $module); + $this->getConfigs(); if (!isset($this->_systemConfigs[$key])) { $this->_systemConfigs[$key] = ''; } @@ -1528,15 +1526,12 @@ } /** - * @param string $type - * @param int $module - * * @return array */ - public function getConfigs($type = 'XOOPS_CONF', $module = 1) + public function getConfigs() { $configs = $this->getHandlerConfig() - ->getConfigsByCat((is_array($type)) ? $type : (!defined($type) ? $type : constant($type)), $module); + ->getConfigsByModule(1); $this->_systemConfigs = array_merge($this->_systemConfigs, $configs); $this->config =& $this->_systemConfigs; //for compatibilty return $this->_systemConfigs; @@ -1622,7 +1617,7 @@ $module = $this->getHandlerModule()->getByDirname($dirname); if (is_object($module)) { - $this->_moduleConfigs[$dirname] = $this->getHandlerConfig()->getConfigsByCat(0, $module->getVar('mid')); + $this->_moduleConfigs[$dirname] = $this->getHandlerConfig()->getConfigsByModule($module->getVar('mid')); } if ($this->isModule()) { $this->moduleConfig =& $this->_moduleConfigs[$this->module->getVar('dirname')]; |
From: <ma...@us...> - 2012-12-16 17:32:56
|
Revision: 10407 http://sourceforge.net/p/xoops/svn/10407 Author: mageg Date: 2012-12-16 17:32:53 +0000 (Sun, 16 Dec 2012) Log Message: ----------- WARNING!!! UPDATE: "system", "mailuser" and "search"! It's important for the update of new configs Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/include/update.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/include/update.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/include/update.php 2012-12-16 17:31:12 UTC (rev 10406) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/include/update.php 2012-12-16 17:32:53 UTC (rev 10407) @@ -75,11 +75,5 @@ } } - - - - - - return true; } \ No newline at end of file |
From: <ma...@us...> - 2012-12-16 17:31:15
|
Revision: 10406 http://sourceforge.net/p/xoops/svn/10406 Author: mageg Date: 2012-12-16 17:31:12 +0000 (Sun, 16 Dec 2012) Log Message: ----------- add update function for new configs in mailuser extension Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/xoops_version.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/include/update.php Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/include/update.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/include/update.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/include/update.php 2012-12-16 17:31:12 UTC (rev 10406) @@ -0,0 +1,54 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * XXX + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @since 2.6.0 + * @author Mage Grégory (AKA Mage) + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +function xoops_module_update_mailusers(XoopsModule &$module) { + $xoops = Xoops::getInstance(); + // Copy old configs in new configs and delete old configs + $config_handler = $xoops->getHandlerConfig(); + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('conf_modid', 0)); + $criteria->add(new Criteria('conf_catid', 6)); + $configs = $config_handler->getConfigs($criteria); + $confcount = count($configs); + if ($confcount > 0){ + for ($i = 0; $i < $confcount; $i++) { + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('conf_modid', $module->getVar('mid'))); + $criteria->add(new Criteria('conf_name', $configs[$i]->getvar('conf_name'))); + $new_configs = $config_handler->getConfigs($criteria); + $new_confcount = count($new_configs); + |
From: <ma...@us...> - 2012-12-16 17:13:47
|
Revision: 10405 http://sourceforge.net/p/xoops/svn/10405 Author: mageg Date: 2012-12-16 17:13:44 +0000 (Sun, 16 Dec 2012) Log Message: ----------- add update function for new configs in search module Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/xoops_version.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/include/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/include/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/include/update.php Copied: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/include/index.html (from rev 10404, XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/include/index.html) =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/include/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/include/index.html 2012-12-16 17:13:44 UTC (rev 10405) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/include/update.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/include/update.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/include/update.php 2012-12-16 17:13:44 UTC (rev 10405) @@ -0,0 +1,54 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * XXX + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @since 2.6.0 + * @author Mage Grégory (AKA Mage) + * @version $Id: $ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +function xoops_module_update_search(XoopsModule &$module) { + $xoops = Xoops::getInstance(); + // Copy old configs in new configs and delete old configs + $config_handler = $xoops->getHandlerConfig(); + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('conf_modid', 0)); + $criteria->add(new Criteria('conf_catid', 5)); + $configs = $config_handler->getConfigs($criteria); + $confcount = count($configs); + if ($confcount > 0){ + for ($i = 0; $i < $confcount; $i++) { + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('conf_modid', $module->getVar('mid'))); + $criteria->add(new Criteria('conf_name', $configs[$i]->getvar('conf_name'))); + $new_configs = $config_handler->getConfigs($criteria); + $new_confcount = count($new_configs); + if ($new_confcount > 0){ + for ($j = 0; $j < $new_confcount; $j++) { + $obj = $config_handler->getConfig($new_configs[$j]->getvar('conf_id')); + } + $obj->setVar("conf_value", $configs[$i]->getvar('conf_value')); + $config_handler->insertConfig($obj); + $config_handler->deleteConfig($configs[$i]); + } + + } + + } + return true; + +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/xoops_version.php 2012-12-16 16:53:45 UTC (rev 10404) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/xoops_version.php 2012-12-16 17:13:44 UTC (rev 10405) @@ -50,6 +50,7 @@ // Admin menu // Set to 1 if you want to display menu generated by system module $modversion['system_menu'] = 1; +$modversion['onUpdate'] = 'include/update.php'; /* Manage extension |
From: <ma...@us...> - 2012-12-16 16:53:47
|
Revision: 10404 http://sourceforge.net/p/xoops/svn/10404 Author: mageg Date: 2012-12-16 16:53:45 +0000 (Sun, 16 Dec 2012) Log Message: ----------- remove table 'configcategory' not used Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.structure.sql Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.structure.sql =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.structure.sql 2012-12-16 16:52:15 UTC (rev 10403) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.structure.sql 2012-12-16 16:53:45 UTC (rev 10404) @@ -115,18 +115,6 @@ # -------------------------------------------------------- # -# Table structure for table `configcategory` -# - -CREATE TABLE configcategory ( - confcat_id smallint(5) unsigned NOT NULL auto_increment, - confcat_name varchar(255) NOT NULL default '', - confcat_order smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (confcat_id) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# # Table structure for table `configoption` # |
From: <ma...@us...> - 2012-12-16 16:52:18
|
Revision: 10403 http://sourceforge.net/p/xoops/svn/10403 Author: mageg Date: 2012-12-16 16:52:15 +0000 (Sun, 16 Dec 2012) Log Message: ----------- Move all config in xoops_version.php (system module). Use the new system of permissions category Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.data.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/preference.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/include/update.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/preferences.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php 2012-12-16 16:42:32 UTC (rev 10402) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php 2012-12-16 16:52:15 UTC (rev 10403) @@ -157,175 +157,5 @@ $dbm->insert("block_module_link", " VALUES (" . $myrow['bid'] . ", -1)"); } } - // data for table 'config' - $dbm->insert('config', " VALUES (1, 0, 1, 'sitename', '_MD_AM_SITENAME', 'XOOPS Site', '_MD_AM_SITENAMEDSC', 'textbox', 'text', 0)"); - $dbm->insert('config', " VALUES (2, 0, 1, 'slogan', '_MD_AM_SLOGAN', 'Just Use it!', '_MD_AM_SLOGANDSC', 'textbox', 'text', 2)"); - $dbm->insert('config', " VALUES (3, 0, 1, 'language', '_MD_AM_LANGUAGE', '" . addslashes($language) . "', '_MD_AM_LANGUAGEDSC', 'language', 'other', 4)"); - $dbm->insert('config', " VALUES (4, 0, 1, 'startpage', '_MD_AM_STARTPAGE', '--', '_MD_AM_STARTPAGEDSC', 'startpage', 'other', 6)"); - $dbm->insert('config', " VALUES (5, 0, 1, 'server_TZ', '_MD_AM_SERVERTZ', '0', '_MD_AM_SERVERTZDSC', 'timezone', 'float', 8)"); - $dbm->insert('config', " VALUES (6, 0, 1, 'default_TZ', '_MD_AM_DEFAULTTZ', '0', '_MD_AM_DEFAULTTZDSC', 'timezone', 'float', 10)"); - $dbm->insert('config', " VALUES (7, 0, 1, 'theme_set', '_MD_AM_DTHEME', 'default', '_MD_AM_DTHEMEDSC', 'theme', 'other', 12)"); - $dbm->insert('config', " VALUES (8, 0, 1, 'anonymous', '_MD_AM_ANONNAME', '" . addslashes(_INSTALL_ANON) . "', '_MD_AM_ANONNAMEDSC', 'textbox', 'text', 15)"); - $dbm->insert('config', " VALUES (9, 0, 1, 'gzip_compression', '_MD_AM_USEGZIP', '0', '_MD_AM_USEGZIPDSC', 'yesno', 'int', 16)"); - $dbm->insert('config', " VALUES (10, 0, 1, 'usercookie', '_MD_AM_USERCOOKIE', 'xoops_user', '_MD_AM_USERCOOKIEDSC', 'textbox', 'text', 18)"); - $dbm->insert('config', " VALUES (11, 0, 1, 'session_expire', '_MD_AM_SESSEXPIRE', '15', '_MD_AM_SESSEXPIREDSC', 'textbox', 'int', 22)"); - $dbm->insert('config', " VALUES (13, 0, 1, 'debug_mode', '_MD_AM_DEBUGMODE', '0', '_MD_AM_DEBUGMODEDSC', 'select', 'int', 24)"); - $dbm->insert('config', " VALUES (15, 0, 1, 'use_ssl', '_MD_AM_USESSL', '0', '_MD_AM_USESSLDSC', 'yesno', 'int', 30)"); - $dbm->insert('config', " VALUES (16, 0, 1, 'session_name', '_MD_AM_SESSNAME', 'xoops_session', '_MD_AM_SESSNAMEDSC', 'textbox', 'text', 20)"); - $dbm->insert('config', " VALUES (17, 0, 2, 'minpass', '_MD_AM_MINPASS', '5', '_MD_AM_MINPASSDSC', 'textbox', 'int', 1)"); - $dbm->insert('config', " VALUES (18, 0, 2, 'minuname', '_MD_AM_MINUNAME', '3', '_MD_AM_MINUNAMEDSC', 'textbox', 'int', 2)"); - $dbm->insert('config', " VALUES (19, 0, 2, 'new_user_notify', '_MD_AM_NEWUNOTIFY', '1', '_MD_AM_NEWUNOTIFYDSC', 'yesno', 'int', 4)"); - $dbm->insert('config', " VALUES (20, 0, 2, 'new_user_notify_group', '_MD_AM_NOTIFYTO', " . $gruops['XOOPS_GROUP_ADMIN'] . ", '_MD_AM_NOTIFYTODSC', 'group', 'int', 6)"); - $dbm->insert('config', " VALUES (21, 0, 2, 'activation_type', '_MD_AM_ACTVTYPE', '0', '_MD_AM_ACTVTYPEDSC', 'select', 'int', 8)"); - $dbm->insert('config', " VALUES (22, 0, 2, 'activation_group', '_MD_AM_ACTVGROUP', " . $gruops['XOOPS_GROUP_ADMIN'] . ", '_MD_AM_ACTVGROUPDSC', 'group', 'int', 10)"); - $dbm->insert('config', " VALUES (23, 0, 2, 'uname_test_level', '_MD_AM_UNAMELVL', '0', '_MD_AM_UNAMELVLDSC', 'select', 'int', 12)"); - $dbm->insert('config', " VALUES (30, 0, 1, 'adminmail', '_MD_AM_ADMINML', '" . addslashes($adminmail) . "', '_MD_AM_ADMINMLDSC', 'textbox', 'text', 3)"); - $dbm->insert('config', " VALUES (31, 0, 2, 'self_delete', '_MD_AM_SELFDELETE', '0', '_MD_AM_SELFDELETEDSC', 'yesno', 'int', 22)"); - $dbm->insert('config', " VALUES (32, 0, 1, 'com_mode', '_MD_AM_COMMODE', 'flat', '_MD_AM_COMMODEDSC', 'select', 'text', 34)"); - $dbm->insert('config', " VALUES (33, 0, 1, 'com_order', '_MD_AM_COMORDER', '0', '_MD_AM_COMORDERDSC', 'select', 'int', 36)"); - $dbm->insert('config', " VALUES (34, 0, 2, 'bad_unames', '_MD_AM_BADUNAMES', '" . addslashes(serialize(array( - 'webmaster', '^xoops', '^admin' - ))) . "', '_MD_AM_BADUNAMESDSC', 'textarea', 'array', 24)"); - $dbm->insert('config', " VALUES (35, 0, 2, 'bad_emails', '_MD_AM_BADEMAILS', '" . addslashes(serialize(array('xoops.org$'))) . "', '_MD_AM_BADEMAILSDSC', 'textarea', 'array', 26)"); - $dbm->insert('config', " VALUES (36, 0, 2, 'maxuname', '_MD_AM_MAXUNAME', '10', '_MD_AM_MAXUNAMEDSC', 'textbox', 'int', 3)"); - $dbm->insert('config', " VALUES (37, 0, 1, 'bad_ips', '_MD_AM_BADIPS', '" . addslashes(serialize(array('127.0.0.1'))) . "', '_MD_AM_BADIPSDSC', 'textarea', 'array', 42)"); - $dbm->insert('config', " VALUES (38, 0, 3, 'meta_keywords', '_MD_AM_METAKEY', 'xoops, web applications, web 2.0, sns, news, technology, headlines, linux, software, download, downloads, free, community, forum, bulletin board, bbs, php, survey, polls, kernel, comment, comments, portal, odp, open source, opensource, FreeSoftware, gnu, gpl, license, Unix, *nix, mysql, sql, database, databases, web site, blog, wiki, module, modules, theme, themes, cms, content management', '_MD_AM_METAKEYDSC', 'textarea', 'text', 0)"); - $dbm->insert('config', " VALUES (39, 0, 3, 'footer', '_MD_AM_FOOTER', 'Powered by XOOPS © 2001-" . date('Y', time()) . " <a href=\"http://xoops.sourceforge.net\" rel=\"external\" title=\"The XOOPS Project\">The XOOPS Project</a>', '_MD_AM_FOOTERDSC', 'textarea', 'text', 20)"); - $dbm->insert('config', " VALUES (40, 0, 4, 'censor_enable', '_MD_AM_DOCENSOR', '0', '_MD_AM_DOCENSORDSC', 'yesno', 'int', 0)"); - $dbm->insert('config', " VALUES (41, 0, 4, 'censor_words', '_MD_AM_CENSORWRD', '" . addslashes(serialize(array( - 'fuck', 'shit' - ))) . "', '_MD_AM_CENSORWRDDSC', 'textarea', 'array', 1)"); - $dbm->insert('config', " VALUES (42, 0, 4, 'censor_replace', '_MD_AM_CENSORRPLC', '#OOPS#', '_MD_AM_CENSORRPLCDSC', 'textbox', 'text', 2)"); - $dbm->insert('config', " VALUES (43, 0, 3, 'meta_robots', '_MD_AM_METAROBOTS', 'index,follow', '_MD_AM_METAROBOTSDSC', 'select', 'text', 2)"); - $dbm->insert('config', " VALUES (44, 0, 5, 'enable_search', '_MD_AM_DOSEARCH', '1', '_MD_AM_DOSEARCHDSC', 'yesno', 'int', 0)"); - $dbm->insert('config', " VALUES (45, 0, 5, 'keyword_min', '_MD_AM_MINSEARCH', '5', '_MD_AM_MINSEARCHDSC', 'textbox', 'int', 1)"); - $dbm->insert('config', " VALUES (47, 0, 1, 'enable_badips', '_MD_AM_DOBADIPS', '0', '_MD_AM_DOBADIPSDSC', 'yesno', 'int', 40)"); - $dbm->insert('config', " VALUES (48, 0, 3, 'meta_rating', '_MD_AM_METARATING', 'general', '_MD_AM_METARATINGDSC', 'select', 'text', 4)"); - $dbm->insert('config', " VALUES (49, 0, 3, 'meta_author', '_MD_AM_METAAUTHOR', 'XOOPS', '_MD_AM_METAAUTHORDSC', 'textbox', 'text', 6)"); - $dbm->insert('config', " VALUES (50, 0, 3, 'meta_copyright', '_MD_AM_METACOPYR', 'Copyright \xA9 2001-" . date('Y', time()) . "', '_MD_AM_METACOPYRDSC', 'textbox', 'text', 8)"); - $dbm->insert('config', " VALUES (51, 0, 3, 'meta_description', '_MD_AM_METADESC', 'XOOPS is a dynamic Object Oriented based open source portal script written in PHP.', '_MD_AM_METADESCDSC', 'textarea', 'text', 1)"); - $dbm->insert('config', " VALUES (52, 0, 2, 'allow_chgmail', '_MD_AM_ALLWCHGMAIL', '0', '_MD_AM_ALLWCHGMAILDSC', 'yesno', 'int', 3)"); - $dbm->insert('config', " VALUES (53, 0, 1, 'use_mysession', '_MD_AM_USEMYSESS', '0', '_MD_AM_USEMYSESSDSC', 'yesno', 'int', 19)"); - $dbm->insert('config', " VALUES (54, 0, 2, 'reg_dispdsclmr', '_MD_AM_DSPDSCLMR', 1, '_MD_AM_DSPDSCLMRDSC', 'yesno', 'int', 30)"); - $dbm->insert('config', " VALUES (55, 0, 2, 'reg_disclaimer', '_MD_AM_REGDSCLMR', '" . addslashes(_INSTALL_DISCLMR) . "', '_MD_AM_REGDSCLMRDSC', 'textarea', 'text', 32)"); - $dbm->insert('config', " VALUES (56, 0, 2, 'allow_register', '_MD_AM_ALLOWREG', 1, '_MD_AM_ALLOWREGDSC', 'yesno', 'int', 0)"); - $dbm->insert('config', " VALUES (57, 0, 1, 'theme_fromfile', '_MD_AM_THEMEFILE', '0', '_MD_AM_THEMEFILEDSC', 'yesno', 'int', 13)"); - $dbm->insert('config', " VALUES (58, 0, 1, 'closesite', '_MD_AM_CLOSESITE', '0', '_MD_AM_CLOSESITEDSC', 'yesno', 'int', 26)"); - $dbm->insert('config', " VALUES (59, 0, 1, 'closesite_okgrp', '_MD_AM_CLOSESITEOK', '" . addslashes(serialize(array('1'))) . "', '_MD_AM_CLOSESITEOKDSC', 'group_multi', 'array', 27)"); - $dbm->insert('config', " VALUES (60, 0, 1, 'closesite_text', '_MD_AM_CLOSESITETXT', '" . _INSTALL_L165 . "', '_MD_AM_CLOSESITETXTDSC', 'textarea', 'text', 28)"); - $dbm->insert('config', " VALUES (61, 0, 1, 'sslpost_name', '_MD_AM_SSLPOST', 'xoops_ssl', '_MD_AM_SSLPOSTDSC', 'textbox', 'text', 31)"); - $dbm->insert('config', " VALUES (62, 0, 1, 'module_cache', '_MD_AM_MODCACHE', '', '_MD_AM_MODCACHEDSC', 'module_cache', 'array', 50)"); - $dbm->insert('config', " VALUES (63, 0, 1, 'template_set', '_MD_AM_DTPLSET', 'default', '_MD_AM_DTPLSETDSC', 'tplset', 'other', 14)"); - - $dbm->insert('config', " VALUES (64,0,6,'mailmethod','_MD_AM_MAILERMETHOD','mail','_MD_AM_MAILERMETHODDESC','select','text',4)"); - $dbm->insert('config', " VALUES (65,0,6,'smtphost','_MD_AM_SMTPHOST','a:1:{i:0;s:0:\"\";}', '_MD_AM_SMTPHOSTDESC','textarea','array',6)"); - $dbm->insert('config', " VALUES (66,0,6,'smtpuser','_MD_AM_SMTPUSER','','_MD_AM_SMTPUSERDESC','textbox','text',7)"); - $dbm->insert('config', " VALUES (67,0,6,'smtppass','_MD_AM_SMTPPASS','','_MD_AM_SMTPPASSDESC','password','text',8)"); - $dbm->insert('config', " VALUES (68,0,6,'sendmailpath','_MD_AM_SENDMAILPATH','/usr/sbin/sendmail','_MD_AM_SENDMAILPATHDESC','textbox','text',5)"); - $dbm->insert('config', " VALUES (69,0,6,'from','_MD_AM_MAILFROM','','_MD_AM_MAILFROMDESC','textbox','text', 1)"); - $dbm->insert('config', " VALUES (70,0,6,'fromname','_MD_AM_MAILFROMNAME','','_MD_AM_MAILFROMNAMEDESC','textbox','text',2)"); - $dbm->insert('config', " VALUES (71, 0, 1, 'sslloginlink', '_MD_AM_SSLLINK', 'https://', '_MD_AM_SSLLINKDSC', 'textbox', 'text', 33)"); - $dbm->insert('config', " VALUES (72, 0, 1, 'theme_set_allowed', '_MD_AM_THEMEOK', '" . serialize(array('default')) . "', '_MD_AM_THEMEOKDSC', 'theme_multi', 'array', 13)"); - // RMV-NOTIFY... Need to specify which user is sender of notification PM - $dbm->insert('config', " VALUES (73,0,6,'fromuid','_MD_AM_MAILFROMUID','1','_MD_AM_MAILFROMUIDDESC','user','int',3)"); - - $dbm->insert('config', " VALUES (74,0,7,'auth_method','_MD_AM_AUTHMETHOD','xoops','_MD_AM_AUTHMETHODDESC','select','text',1)"); - $dbm->insert('config', " VALUES (75,0,7,'ldap_port','_MD_AM_LDAP_PORT','389','_MD_AM_LDAP_PORT','textbox','int',2)"); - $dbm->insert('config', " VALUES (76,0,7,'ldap_server','_MD_AM_LDAP_SERVER','your directory server','_MD_AM_LDAP_SERVER_DESC','textbox','text',3)"); - $dbm->insert('config', " VALUES (77,0,7,'ldap_base_dn','_MD_AM_LDAP_BASE_DN','dc=xoops,dc=org','_MD_AM_LDAP_BASE_DN_DESC','textbox','text',4)"); - $dbm->insert('config', " VALUES (78,0,7,'ldap_manager_dn','_MD_AM_LDAP_MANAGER_DN','manager_dn','_MD_AM_LDAP_MANAGER_DN_DESC','textbox','text',5)"); - $dbm->insert('config', " VALUES (79,0,7,'ldap_manager_pass','_MD_AM_LDAP_MANAGER_PASS','manager_pass','_MD_AM_LDAP_MANAGER_PASS_DESC','password','text',6)"); - $dbm->insert('config', " VALUES (80,0,7,'ldap_version','_MD_AM_LDAP_VERSION','3','_MD_AM_LDAP_VERSION_DESC','textbox','text', 7)"); - $dbm->insert('config', " VALUES (81,0,7,'ldap_users_bypass','_MD_AM_LDAP_USERS_BYPASS','" . serialize(array('admin')) . "','_MD_AM_LDAP_USERS_BYPASS_DESC','textarea','array',8)"); - $dbm->insert('config', " VALUES (82,0,7,'ldap_loginname_asdn','_MD_AM_LDAP_LOGINNAME_ASDN','uid_asdn','_MD_AM_LDAP_LOGINNAME_ASDN_D','yesno','int',9)"); - $dbm->insert('config', " VALUES (83,0,7,'ldap_loginldap_attr', '_MD_AM_LDAP_LOGINLDAP_ATTR', 'uid', '_MD_AM_LDAP_LOGINLDAP_ATTR_D', 'textbox', 'text', 10)"); - $dbm->insert('config', " VALUES (84,0,7,'ldap_filter_person','_MD_AM_LDAP_FILTER_PERSON','','_MD_AM_LDAP_FILTER_PERSON_DESC','textbox','text',11)"); - $dbm->insert('config', " VALUES (85,0,7,'ldap_domain_name','_MD_AM_LDAP_DOMAIN_NAME','mydomain','_MD_AM_LDAP_DOMAIN_NAME_DESC','textbox','text',12)"); - $dbm->insert('config', " VALUES (86,0,7,'ldap_provisionning','_MD_AM_LDAP_PROVIS','0','_MD_AM_LDAP_PROVIS_DESC','yesno','int',13)"); - $dbm->insert('config', " VALUES (87,0,7,'ldap_provisionning_group','_MD_AM_LDAP_PROVIS_GROUP','a:1:{i:0;s:1:\"2\";}','_MD_AM_LDAP_PROVIS_GROUP_DSC','group_multi','array',14)"); - - $dbm->insert('config', " VALUES (88,0,7,'ldap_mail_attr','_MD_AM_LDAP_MAIL_ATTR','mail','_MD_AM_LDAP_MAIL_ATTR_DESC','textbox','text',15)"); - $dbm->insert('config', " VALUES (89,0,7,'ldap_givenname_attr','_MD_AM_LDAP_GIVENNAME_ATTR','givenname','_MD_AM_LDAP_GIVENNAME_ATTR_DSC','textbox','text',16)"); - $dbm->insert('config', " VALUES (90,0,7,'ldap_surname_attr','_MD_AM_LDAP_SURNAME_ATTR','sn','_MD_AM_LDAP_SURNAME_ATTR_DESC','textbox','text',17)"); - $dbm->insert('config', " VALUES (91,0,7,'ldap_field_mapping','_MD_AM_LDAP_FIELD_MAPPING_ATTR','email=mail|name=displayname','_MD_AM_LDAP_FIELD_MAPPING_DESC','textarea','text',18)"); - $dbm->insert('config', " VALUES (92,0,7,'ldap_provisionning_upd', '_MD_AM_LDAP_PROVIS_UPD', '1', '_MD_AM_LDAP_PROVIS_UPD_DESC', 'yesno', 'int', 19)"); - $dbm->insert('config', " VALUES (93,0,7,'ldap_use_TLS','_MD_AM_LDAP_USETLS','0','_MD_AM_LDAP_USETLS_DESC','yesno','int', 20)"); - - $dbm->insert('config', " VALUES (94, 0, 1, 'cpanel', '_MD_AM_CPANEL', 'default', '_MD_AM_CPANELDSC', 'cpanel', 'other', 11)"); - $dbm->insert('config', " VALUES (95, 0, 2, 'welcome_type', '_MD_AM_WELCOMETYPE', '1', '_MD_AM_WELCOMETYPE_DESC', 'select', 'int', 3)"); - - // Module System - $dbm->insert('config', " VALUES (96, 1, 0, 'break1', '_MI_SYSTEM_PREFERENCE_BREAK_GENERAL', 'head', '', 'line_break', 'textbox', 0)"); - $dbm->insert('config', " VALUES (97, 1, 0, 'usetips', '_MI_SYSTEM_PREFERENCE_TIPS', '1', '_MI_SYSTEM_PREFERENCE_TIPS_DSC', 'yesno', 'int', 10)"); - $dbm->insert('config', " VALUES (98, 1, 0, 'typeicons', '_MI_SYSTEM_PREFERENCE_ICONS', 'default', '', 'select', 'text', 20)"); - $dbm->insert('config', " VALUES (99, 1, 0, 'typebreadcrumb', '_MI_SYSTEM_PREFERENCE_BREADCRUMB', 'default', '', 'select', 'text', 30)"); - $dbm->insert('config', " VALUES (100, 1, 0, 'break2', '_MI_SYSTEM_PREFERENCE_BREAK_ACTIVE', 'head', '', 'line_break', 'textbox', 40)"); - $dbm->insert('config', " VALUES (101, 1, 0, 'active_avatars', '_MI_SYSTEM_PREFERENCE_ACTIVE_AVATARS', '1', '', 'yesno', 'int', 50)"); - $dbm->insert('config', " VALUES (102, 1, 0, 'active_banners', '_MI_SYSTEM_PREFERENCE_ACTIVE_BANNERS', '1', '', 'yesno', 'int', 60)"); - $dbm->insert('config', " VALUES (103, 1, 0, 'active_blocksadmin', '_MI_SYSTEM_PREFERENCE_ACTIVE_BLOCKSADMIN', '1', '', 'hidden', 'int', 70)"); - $dbm->insert('config', " VALUES (104, 1, 0, 'active_comments', '_MI_SYSTEM_PREFERENCE_ACTIVE_COMMENTS', '1', '', 'yesno', 'int', 80)"); - $dbm->insert('config', " VALUES (105, 1, 0, 'active_filemanager', '_MI_SYSTEM_PREFERENCE_ACTIVE_FILEMANAGER', '1', '', 'yesno', 'int', 90)"); - $dbm->insert('config', " VALUES (106, 1, 0, 'active_groups', '_MI_SYSTEM_PREFERENCE_ACTIVE_GROUPS', '1', '', 'hidden', 'int', 100)"); - $dbm->insert('config', " VALUES (107, 1, 0, 'active_images', '_MI_SYSTEM_PREFERENCE_ACTIVE_IMAGES', '1', '', 'yesno', 'int', 110)"); - $dbm->insert('config', " VALUES (108, 1, 0, 'active_mailusers', '_MI_SYSTEM_PREFERENCE_ACTIVE_MAILUSERS', '1', '', 'yesno', 'int', 120)"); - $dbm->insert('config', " VALUES (109, 1, 0, 'active_modulesadmin', '_MI_SYSTEM_PREFERENCE_ACTIVE_MODULESADMIN', '1', '', 'hidden', 'int', 130)"); - $dbm->insert('config', " VALUES (110, 1, 0, 'active_maintenance', '_MI_SYSTEM_PREFERENCE_ACTIVE_MAINTENANCE', '1', '', 'yesno', 'int', 140)"); - $dbm->insert('config', " VALUES (111, 1, 0, 'active_preferences', '_MI_SYSTEM_PREFERENCE_ACTIVE_PREFERENCES', '1', '', 'hidden', 'int', 150)"); - $dbm->insert('config', " VALUES (112, 1, 0, 'active_smilies', '_MI_SYSTEM_PREFERENCE_ACTIVE_SMILIES', '1', '', 'yesno', 'int', 160)"); - $dbm->insert('config', " VALUES (113, 1, 0, 'active_tplsets', '_MI_SYSTEM_PREFERENCE_ACTIVE_TPLSETS', '1', '', 'hidden', 'int', 170)"); - $dbm->insert('config', " VALUES (114, 1, 0, 'active_userrank', '_MI_SYSTEM_PREFERENCE_ACTIVE_USERRANK', '1', '', 'yesno', 'int', 180)"); - $dbm->insert('config', " VALUES (115, 1, 0, 'active_users', '_MI_SYSTEM_PREFERENCE_ACTIVE_USERS', '1', '', 'yesno', 'int', 190)"); - $dbm->insert('config', " VALUES (116, 1, 0, 'break3', '_MI_SYSTEM_PREFERENCE_BREAK_PAGER', 'head', '', 'line_break', 'textbox', 200)"); - $dbm->insert('config', " VALUES (117, 1, 0, 'avatars_pager', '_MI_SYSTEM_PREFERENCE_AVATARS_PAGER', '10', '', 'textbox', 'int', 210)"); - $dbm->insert('config', " VALUES (118, 1, 0, 'banners_pager', '_MI_SYSTEM_PREFERENCE_BANNERS_PAGER', '10', '', 'textbox', 'int', 220)"); - $dbm->insert('config', " VALUES (119, 1, 0, 'comments_pager', '_MI_SYSTEM_PREFERENCE_COMMENTS_PAGER', '20', '', 'textbox', 'int', 230)"); - $dbm->insert('config', " VALUES (120, 1, 0, 'groups_pager', '_MI_SYSTEM_PREFERENCE_GROUPS_PAGER', '15', '', 'textbox', 'int', 240)"); - $dbm->insert('config', " VALUES (121, 1, 0, 'images_pager', '_MI_SYSTEM_PREFERENCE_IMAGES_PAGER', '15', '', 'textbox', 'int', 250)"); - $dbm->insert('config', " VALUES (122, 1, 0, 'smilies_pager', '_MI_SYSTEM_PREFERENCE_SMILIES_PAGER', '20', '', 'textbox', 'int', 260)"); - $dbm->insert('config', " VALUES (123, 1, 0, 'userranks_pager', '_MI_SYSTEM_PREFERENCE_USERRANKS_PAGER', '20', '', 'textbox', 'int', 270)"); - $dbm->insert('config', " VALUES (124, 1, 0, 'users_pager', '_MI_SYSTEM_PREFERENCE_USERS_PAGER', '20', '', 'textbox', 'int', 280)"); - $dbm->insert('config', " VALUES (125, 1, 0, 'break4', '_MI_SYSTEM_PREFERENCE_BREAK_EDITOR', 'head', '', 'line_break', 'textbox', 290)"); - $dbm->insert('config', " VALUES (126, 1, 0, 'blocks_editor', '_MI_SYSTEM_PREFERENCE_BLOCKS_EDITOR', 'dhtmltextarea', '_MI_SYSTEM_PREFERENCE_BLOCKS_EDITOR_DSC', 'select', 'text', 300)"); - $dbm->insert('config', " VALUES (127, 1, 0, 'comments_editor', '_MI_SYSTEM_PREFERENCE_COMMENTS_EDITOR', 'dhtmltextarea', '_MI_SYSTEM_PREFERENCE_COMMENTS_EDITOR_DSC', 'select', 'text', 310)"); - $dbm->insert('config', " VALUES (128, 1, 0, 'general_editor', '_MI_SYSTEM_PREFERENCE_GENERAL_EDITOR', 'dhtmltextarea', '_MI_SYSTEM_PREFERENCE_GENERAL_EDITOR_DSC', 'select', 'text', 320)"); - $dbm->insert('config', " VALUES (129, 1, 0, 'redirect', '_MI_SYSTEM_PREFERENCE_REDIRECT', 'admin.php?fct=preferences', '', 'hidden', 'text', 330)"); - $dbm->insert('config', " VALUES (130, 1, 0, 'com_anonpost', '_MI_SYSTEM_PREFERENCE_ANONPOST', '', '', 'hidden', 'text', 340)"); - $dbm->insert('config', " VALUES (133, 1, 0, 'jquery_theme', '_MI_SYSTEM_PREFERENCE_JQUERY_THEME', 'base', '', 'select', 'text', 35)"); - - $dbm->insert('config', " VALUES (134, 0, 1, 'redirect_message_ajax', '_MD_AM_CUSTOM_REDIRECT', '1', '_MD_AM_CUSTOM_REDIRECT_DESC', 'yesno', 'int', 12)"); - - require_once $root . '/class/xoopslists.php'; - $editors = XoopsLists::getDirListAsArray($root . '/class/xoopseditor'); - $conf = 35; - foreach ($editors as $dir) { - $dbm->insert('configoption', " VALUES (" . $conf . ", '" . $dir . "', '" . $dir . "', 126)"); - $conf++; - } - foreach ($editors as $dir) { - $dbm->insert('configoption', " VALUES (" . $conf . ", '" . $dir . "', '" . $dir . "', 127)"); - $conf++; - } - foreach ($editors as $dir) { - $dbm->insert('configoption', " VALUES (" . $conf . ", '" . $dir . "', '" . $dir . "', 128)"); - $conf++; - } - $icons = XoopsLists::getDirListAsArray($root . '/modules/system/images/icons'); - foreach ($icons as $dir) { - $dbm->insert('configoption', " VALUES (" . $conf . ", '" . $dir . "', '" . $dir . "', 98)"); - $conf++; - } - $breadcrumb = XoopsLists::getDirListAsArray($root . '/modules/system/images/breadcrumb'); - foreach ($breadcrumb as $dir) { - $dbm->insert('configoption', " VALUES (" . $conf . ", '" . $dir . "', '" . $dir . "', 99)"); - $conf++; - } - $jqueryui = XoopsLists::getDirListAsArray($root . '/modules/system/css/ui'); - foreach ($jqueryui as $dir) { - $dbm->insert('configoption', " VALUES (" . $conf . ", '" . $dir . "', '" . $dir . "', 133)"); - $conf++; - } - return $gruops; -} - -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.data.sql =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.data.sql 2012-12-16 16:42:32 UTC (rev 10402) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.data.sql 2012-12-16 16:52:15 UTC (rev 10403) @@ -13,64 +13,10 @@ # Dumping data for table `comments` # - # -# Dumping data for table `configcategory` -# - -INSERT INTO configcategory VALUES (1, '_MD_AM_GENERAL', 0); -INSERT INTO configcategory VALUES (2, '_MD_AM_USERSETTINGS', 0); -INSERT INTO configcategory VALUES (3, '_MD_AM_METAFOOTER', 0); -INSERT INTO configcategory VALUES (4, '_MD_AM_CENSOR', 0); -INSERT INTO configcategory VALUES (5, '_MD_AM_SEARCH', 0); -INSERT INTO configcategory VALUES (6, '_MD_AM_MAILER', 0); -INSERT INTO configcategory VALUES (7, '_MD_AM_AUTHENTICATION', 0); - -# # Dumping data for table `configoption` # -INSERT INTO configoption VALUES (1, '_MD_AM_DEBUGMODE1', '1', 13); -INSERT INTO configoption VALUES (2, '_MD_AM_DEBUGMODE2', '2', 13); -INSERT INTO configoption VALUES (3, '_NESTED', 'nest', 32); -INSERT INTO configoption VALUES (4, '_FLAT', 'flat', 32); -INSERT INTO configoption VALUES (5, '_THREADED', 'thread', 32); -INSERT INTO configoption VALUES (6, '_OLDESTFIRST', '0', 33); -INSERT INTO configoption VALUES (7, '_NEWESTFIRST', '1', 33); -INSERT INTO configoption VALUES (8, '_MD_AM_USERACTV', '0', 21); -INSERT INTO configoption VALUES (9, '_MD_AM_AUTOACTV', '1', 21); -INSERT INTO configoption VALUES (10, '_MD_AM_ADMINACTV', '2', 21); -INSERT INTO configoption VALUES (11, '_MD_AM_STRICT', '0', 23); -INSERT INTO configoption VALUES (12, '_MD_AM_MEDIUM', '1', 23); -INSERT INTO configoption VALUES (13, '_MD_AM_LIGHT', '2', 23); -INSERT INTO configoption VALUES (14, '_MD_AM_DEBUGMODE3', '3', 13); -INSERT INTO configoption VALUES (15, '_MD_AM_INDEXFOLLOW', 'index,follow', 43); -INSERT INTO configoption VALUES (16, '_MD_AM_NOINDEXFOLLOW', 'noindex,follow', 43); -INSERT INTO configoption VALUES (17, '_MD_AM_INDEXNOFOLLOW', 'index,nofollow', 43); -INSERT INTO configoption VALUES (18, '_MD_AM_NOINDEXNOFOLLOW', 'noindex,nofollow', 43); -INSERT INTO configoption VALUES (19, '_MD_AM_METAOGEN', 'general', 48); -INSERT INTO configoption VALUES (20, '_MD_AM_METAO14YRS', '14 years', 48); -INSERT INTO configoption VALUES (21, '_MD_AM_METAOREST', 'restricted', 48); -INSERT INTO configoption VALUES (22, '_MD_AM_METAOMAT', 'mature', 48); -INSERT INTO configoption VALUES (23, '_MD_AM_DEBUGMODE0', '0', 13); - -INSERT INTO configoption VALUES (24,'PHP mail()','mail',64); -INSERT INTO configoption VALUES (25,'sendmail','sendmail',64); -INSERT INTO configoption VALUES (26,'SMTP','smtp',64); -INSERT INTO configoption VALUES (27,'SMTPAuth','smtpauth',64); - -# Xoops Auth -INSERT INTO configoption VALUES (28, '_MD_AM_AUTH_CONFOPTION_XOOPS', 'xoops', 74); -INSERT INTO configoption VALUES (29, '_MD_AM_AUTH_CONFOPTION_LDAP', 'ldap', 74); -INSERT INTO configoption VALUES (30, '_MD_AM_AUTH_CONFOPTION_AD', 'ads', 74); - -# Welcoming message type -INSERT INTO configoption VALUES (31, '_NO', '0', 95); -INSERT INTO configoption VALUES (32, '_MD_AM_WELCOMETYPE_EMAIL', '1', 95); -INSERT INTO configoption VALUES (33, '_MD_AM_WELCOMETYPE_PM', '2', 95); -INSERT INTO configoption VALUES (34, '_MD_AM_WELCOMETYPE_BOTH', '3', 95); - - # # Dumping data for table `image` # Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php 2012-12-16 16:42:32 UTC (rev 10402) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php 2012-12-16 16:52:15 UTC (rev 10403) @@ -42,7 +42,7 @@ } } // Get Action type -$op = $system->cleanVars($_REQUEST, 'op', 'default', 'string'); +$op = $system->cleanVars($_REQUEST, 'op', 'showmod', 'string'); // Setting type $confcat_id = $system->cleanVars($_REQUEST, 'confcat_id', 0, 'int'); // Call Header @@ -79,7 +79,7 @@ break; case 'showmod': - $mod = $system->cleanVars($_GET, 'mod', 0, 'int'); + $mod = $system->cleanVars($_GET, 'mod', 1, 'int'); if (!$mod) { $xoops->redirect('admin.php?fct=preferences', 1); } @@ -175,37 +175,6 @@ $xoops->redirect("admin.php?fct=preferences", 2, _AM_SYSTEM_DBUPDATED); } break; - - default: - // Display setting cats - // Define Breadcrumb and tips - $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadcrumbLink(_AM_SYSTEM_PREFERENCES_NAV_MAIN, $system->adminVersion('extensions', 'adminpath')); - $admin_page->addBreadcrumbLink(_AM_SYSTEM_PREFERENCES_MAIN); - $admin_page->addTips(_AM_SYSTEM_PREFERENCES_NAV_TIPS); - $admin_page->renderBreadcrumb(); - $admin_page->renderTips(); - - $confcat_handler = $xoops->getHandlerConfigcategory(); - $confcats = $confcat_handler->getCategoryObjects(); - $image = system_adminVersion('preferences', 'configcat'); - $count_prefs = 1; - $nbcolonnes_pref = 5; - foreach (array_keys($confcats) as $i) { - $preferences['id'] = $confcats[$i]->getVar('confcat_id'); - $preferences['image'] = system_AdminIcons('xoops/' . $image[$i]); - $preferences['name'] = constant($confcats[$i]->getVar('confcat_name')); - $count_prefs++; - $preferences['newline'] = ($count_prefs % $nbcolonnes_pref == 1) ? true : false; - $xoops->tpl()->assign('newline', $preferences['newline']); - - $xoops->tpl()->append_by_ref('preferences', $preferences); - unset($preferences); - } - $xoops->tpl()->assign('menu', 1); - $xoops->tpl()->assign('breadcrumb', 1); - break; } // Call Footer $xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/preference.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/preference.php 2012-12-16 16:42:32 UTC (rev 10402) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/preference.php 2012-12-16 16:52:15 UTC (rev 10403) @@ -43,7 +43,7 @@ parent::__construct(constant($obj->getVar('confcat_name')), 'pref_form', 'admin.php?fct=preferences', 'post', true); $criteria = new CriteriaCompo(); - $criteria->add(new Criteria('conf_modid', 0)); + $criteria->add(new Criteria('conf_modid', 1)); $criteria->add(new Criteria('conf_catid', $obj->getVar('confcat_id'))); $config = $config_handler->getConfigs($criteria); $count = count($config); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/include/update.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/include/update.php 2012-12-16 16:42:32 UTC (rev 10402) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/include/update.php 2012-12-16 16:52:15 UTC (rev 10403) @@ -25,8 +25,9 @@ * @param XoopsModule $module * @return bool */ -function xoops_module_system_update(XoopsModule &$module) { +function xoops_module_update_system(XoopsModule &$module) { $xoops = Xoops::getInstance(); + $db =& XoopsDatabaseFactory::getDatabaseConnection(); if ($module->getVar('version') == 100) { $result = $xoops->db()->query("SELECT t1.tpl_id FROM ".$xoops->db()->prefix('tplfile')." t1, ".$xoops->db()->prefix('tplfile')." t2 WHERE t1.tpl_module = t2.tpl_module AND t1.tpl_tplset=t2.tpl_tplset AND t1.tpl_file = t2.tpl_file AND t1.tpl_id > t2.tpl_id"); @@ -45,5 +46,40 @@ } } } + // Copy old configs in new configs and delete old configs + // Not for conf_catid =5 (Update in search extension) + // Not for conf_catid =6 (Update in mail user extension) + $config_handler = $xoops->getHandlerConfig(); + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('conf_modid', 0)); + $criteria->add(new Criteria('conf_catid', 5, '!=')); + $criteria->add(new Criteria('conf_catid', 6, '!=')); + $configs = $config_handler->getConfigs($criteria); + $confcount = count($configs); + if ($confcount > 0){ + for ($i = 0; $i < $confcount; $i++) { + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('conf_modid', 1)); + $criteria->add(new Criteria('conf_name', $configs[$i]->getvar('conf_name'))); + $new_configs = $config_handler->getConfigs($criteria); + $new_confcount = count($new_configs); + if ($new_confcount > 0){ + for ($j = 0; $j < $new_confcount; $j++) { + $obj = $config_handler->getConfig($new_configs[$j]->getvar('conf_id')); + } + $obj->setVar("conf_value", $configs[$i]->getvar('conf_value')); + $config_handler->insertConfig($obj); + $config_handler->deleteConfig($configs[$i]); + } + + } + + } + + + + + + return true; } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/preferences.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/preferences.php 2012-12-16 16:42:32 UTC (rev 10402) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/preferences.php 2012-12-16 16:52:15 UTC (rev 10403) @@ -122,8 +122,6 @@ define("_MD_AM_MINUNAMEDSC", ""); define("_MD_AM_MAXUNAME", "Maximum length of username"); define("_MD_AM_MAXUNAMEDSC", ""); -define("_MD_AM_GENERAL", "General Settings"); -define("_MD_AM_USERSETTINGS", "User Info Settings"); define("_MD_AM_ALLWCHGMAIL", "Allow users to change email address?"); define("_MD_AM_ALLWCHGMAILDSC", ""); define("_MD_AM_IPBAN", "IP Banning"); @@ -156,22 +154,14 @@ define("_MD_AM_METACOPYRDSC", "The copyright meta tag defines any copyright statements you wish to disclose about your web page documents."); define("_MD_AM_METADESC", "Meta Description"); define("_MD_AM_METADESCDSC", "The description meta tag is a general description of what is contained in your web page"); -define("_MD_AM_METAFOOTER", "Meta Tags and Footer"); define("_MD_AM_FOOTER", "Footer"); define("_MD_AM_FOOTERDSC", "Be sure to type links in full path starting from http://, otherwise the links will not work correctly in modules pages."); -define("_MD_AM_CENSOR", "Word Censoring Options"); define("_MD_AM_DOCENSOR", "Enable censoring of unwanted words?"); define("_MD_AM_DOCENSORDSC", "Words will be censored if this option is enabled. This option may be turned off for enhanced site speed."); define("_MD_AM_CENSORWRD", "Words to censor"); define("_MD_AM_CENSORWRDDSC", "Enter words that should be censored in user posts.<br />Separate each with a <strong>|</strong>, case insensitive."); define("_MD_AM_CENSORRPLC", "Censored words will be replaced with:"); define("_MD_AM_CENSORRPLCDSC", "Censored words will be replaced with the characters entered in this textbox"); - -define("_MD_AM_SEARCH", "Search Options"); -define("_MD_AM_DOSEARCH", "Enable global searches?"); -define("_MD_AM_DOSEARCHDSC", "Allow searching for posts/items within your site."); -define("_MD_AM_MINSEARCH", "Minimum keyword length"); -define("_MD_AM_MINSEARCHDSC", "Enter the minimum keyword length that users are required to enter to perform search"); define("_MD_AM_MODCONFIG", "Module Config Options"); define("_MD_AM_DSPDSCLMR", "Display disclaimer?"); define("_MD_AM_DSPDSCLMRDSC", "Select yes to display disclaimer in registration page"); @@ -266,7 +256,6 @@ define("_MD_AM_AUTH_CONFOPTION_LDAP", "Standard LDAP Directory"); define("_MD_AM_AUTH_CONFOPTION_AD", "Microsoft Active Directory ©"); define("_MD_AM_AUTH_CONFOPTION_SOAP", "XOOPS SOAP Authentication"); -define("_MD_AM_AUTHENTICATION", "Authentication Options"); define("_MD_AM_AUTHMETHOD", "Authentication Method"); define("_MD_AM_AUTHMETHODDESC", "Which authentication method would you like to use for signing on users."); define("_MD_AM_LDAP_MAIL_ATTR", "LDAP - Email Field Name"); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/modinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/modinfo.php 2012-12-16 16:42:32 UTC (rev 10402) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/modinfo.php 2012-12-16 16:52:15 UTC (rev 10403) @@ -43,6 +43,47 @@ define("_MI_SYSTEM_ADMENU15", "Templates"); define("_MI_SYSTEM_ADMENU16", "Comments"); +//Site preference +define("_MI_SYSTEM_GENERAL", "General Settings"); +define("_MI_SYSTEM_USERSETTINGS", "User Info Settings"); +define("_MI_SYSTEM_METAFOOTER", "Meta Tags and Footer"); +define("_MI_SYSTEM_CENSOR", "Word Censoring Options"); +define("_MI_SYSTEM_AUTHENTICATION", "Authentication Options"); +define("_MI_SYSTEM_SITEPREFERENCE_ANON", "Anonymous"); +define("_MI_SYSTEM_SITEPREFERENCE_CLOSESITETEXT", "The site is currently closed for maintenance. Please come back later."); +define("_MI_SYSTEM_SITEPREFERENCE_DISCLMR", "While the administrators and moderators of this site will attempt to remove +or edit any generally objectionable material as quickly as possible, it is +impossible to review every message. Therefore you acknowledge that all posts +made to this site express the views and opinions of the author and not the +administrators, moderators or webmaster (except for posts by these people) +and hence will not be held liable. + +You agree not to post any abusive, obscene, vulgar, slanderous, hateful, +threatening, sexually-orientated or any other material that may violate any +applicable laws. Doing so may lead to you being immediately and permanently +banned (and your service provider being informed). The IP address of all +posts is recorded to aid in enforcing these conditions. Creating multiple +accounts for a single user is not allowed. You agree that the webmaster, +administrator and moderators of this site have the right to remove, edit, +move or close any topic at any time should they see fit. As a user you agree +to any information you have entered above being stored in a database. While +this information will not be disclosed to any third party without your +consent the webmaster, administrator and moderators cannot be held +responsible for any hacking attempt that may lead to the data being +compromised. + +This site system uses cookies to store information on your local computer. +These cookies do not contain any of the information you have entered above, +they serve only to improve your viewing pleasure. The email address is used +only for confirming your registration details and password (and for sending +new passwords should you forget your current one). + +By clicking Register below you agree to be bound by these conditions."); + +define("_MI_SYSTEM_SITEPREFERENCE_METAKEY", "xoops, web applications, web 2.0, sns, news, technology, headlines, linux, software, download, downloads, free, community, forum, bulletin board, bbs, php, survey, polls, kernel, comment, comments, portal, odp, open source, opensource, FreeSoftware, gnu, gpl, license, Unix, *nix, mysql, sql, database, databases, web site, blog, wiki, module, modules, theme, themes, cms, content management"); +define("_MI_SYSTEM_SITEPREFERENCE_METADSC", "XOOPS is a dynamic Object Oriented based open source portal script written in PHP."); + + //Preference define("_MI_SYSTEM_PREFERENCE_BREAK_GENERAL","General Settings"); define("_MI_SYSTEM_PREFERENCE_TIPS","Help online?"); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php 2012-12-16 16:42:32 UTC (rev 10402) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php 2012-12-16 16:52:15 UTC (rev 10403) @@ -192,73 +192,714 @@ // Config categories $i = 0; -$modversion['configcat']['general']['name'] = _MI_SYSTEM_PREFERENCE_BREAK_GENERAL; +$modversion['configcat']['general']['name'] = _MI_SYSTEM_GENERAL; $modversion['configcat']['general']['description'] = ''; - $i++; -$modversion['configcat']['active']['name'] = _MI_SYSTEM_PREFERENCE_BREAK_ACTIVE; -$modversion['configcat']['active']['description'] = ''; - +$modversion['configcat']['user']['name'] = _MI_SYSTEM_USERSETTINGS; +$modversion['configcat']['user']['description'] = ''; $i++; -$modversion['configcat']['pager']['name'] = _MI_SYSTEM_PREFERENCE_BREAK_PAGER; -$modversion['configcat']['pager']['description'] = ''; - +$modversion['configcat']['meta']['name'] = _MI_SYSTEM_METAFOOTER; +$modversion['configcat']['meta']['description'] = ''; $i++; -$modversion['configcat']['editor']['name'] = _MI_SYSTEM_PREFERENCE_BREAK_EDITOR; -$modversion['configcat']['editor']['description'] = ''; - - -// Préférences +$modversion['configcat']['censor']['name'] = _MI_SYSTEM_CENSOR; +$modversion['configcat']['censor']['description'] = ''; +$i++; +$modversion['configcat']['authentication']['name'] = _MI_SYSTEM_AUTHENTICATION; +$modversion['configcat']['authentication']['description'] = ''; $i = 0; -$modversion['config'][$i]['name'] = 'usetips'; -$modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_TIPS'; -$modversion['config'][$i]['description'] = '_MI_SYSTEM_PREFERENCE_TIPS_DSC'; +// Site préférences +// Category general +$modversion['config'][$i]['name'] = 'sitename'; +$modversion['config'][$i]['title'] = '_MD_AM_SITENAME'; +$modversion['config'][$i]['description'] = '_MD_AM_SITENAMEDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'textbox'; +$modversion['config'][$i]['valuetype'] = 'text'; +$modversion['config'][$i]['default'] = 'XOOPS Site'; +$i++; +$modversion['config'][$i]['name'] = 'slogan'; +$modversion['config'][$i]['title'] = '_MD_AM_SLOGAN'; +$modversion['config'][$i]['description'] = '_MD_AM_SLOGANDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'textbox'; +$modversion['config'][$i]['valuetype'] = 'text'; +$modversion['config'][$i]['default'] = 'Just Use it!'; +$i++; +$modversion['config'][$i]['name'] = 'adminmail'; +$modversion['config'][$i]['title'] = '_MD_AM_ADMINML'; +$modversion['config'][$i]['description'] = '_MD_AM_ADMINMLDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'textbox'; +$modversion['config'][$i]['valuetype'] = 'text'; +$modversion['config'][$i]['default'] = ''; +$i++; +$modversion['config'][$i]['name'] = 'language'; +$modversion['config'][$i]['title'] = '_MD_AM_LANGUAGE'; +$modversion['config'][$i]['description'] = '_MD_AM_LANGUAGEDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'language'; +$modversion['config'][$i]['valuetype'] = 'other'; +$modversion['config'][$i]['default'] = 'english'; +$i++; +$modversion['config'][$i]['name'] = 'startpage'; +$modversion['config'][$i]['title'] = '_MD_AM_STARTPAGE'; +$modversion['config'][$i]['description'] = '_MD_AM_STARTPAGEDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'startpage'; +$modversion['config'][$i]['valuetype'] = 'other'; +$modversion['config'][$i]['default'] = '--'; +$i++; +$modversion['config'][$i]['name'] = 'server_TZ'; +$modversion['config'][$i]['title'] = '_MD_AM_SERVERTZ'; +$modversion['config'][$i]['description'] = '_MD_AM_SERVERTZDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'timezone'; +$modversion['config'][$i]['valuetype'] = 'float'; +$modversion['config'][$i]['default'] = 0; +$i++; +$modversion['config'][$i]['name'] = 'default_TZ'; +$modversion['config'][$i]['title'] = '_MD_AM_DEFAULTTZ'; +$modversion['config'][$i]['description'] = '_MD_AM_DEFAULTTZDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'timezone'; +$modversion['config'][$i]['valuetype'] = 'float'; +$modversion['config'][$i]['default'] = 0; +$i++; +$modversion['config'][$i]['name'] = 'theme_set'; +$modversion['config'][$i]['title'] = '_MD_AM_DTHEME'; +$modversion['config'][$i]['description'] = '_MD_AM_DTHEMEDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'theme'; +$modversion['config'][$i]['valuetype'] = 'other'; +$modversion['config'][$i]['default'] = 'default'; +$i++; +$modversion['config'][$i]['name'] = 'cpanel'; +$modversion['config'][$i]['title'] = '_MD_AM_CPANEL'; +$modversion['config'][$i]['description'] = '_MD_AM_CPANELDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'cpanel'; +$modversion['config'][$i]['valuetype'] = 'other'; +$modversion['config'][$i]['default'] = 'default'; +$i++; +$modversion['config'][$i]['name'] = 'redirect_message_ajax'; +$modversion['config'][$i]['title'] = '_MD_AM_CUSTOM_REDIRECT'; +$modversion['config'][$i]['description'] = '_MD_AM_CUSTOM_REDIRECT_DESC'; +$modversion['config'][$i]['category'] = 'general'; $modversion['config'][$i]['formtype'] = 'yesno'; $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 1; +$i++; +$modversion['config'][$i]['name'] = 'theme_set_allowed'; +$modversion['config'][$i]['title'] = '_MD_AM_THEMEOK'; +$modversion['config'][$i]['description'] = '_MD_AM_THEMEOKDSC'; $modversion['config'][$i]['category'] = 'general'; - +$modversion['config'][$i]['formtype'] = 'theme_multi'; +$modversion['config'][$i]['valuetype'] = 'array'; +$modversion['config'][$i]['default'] = array('default' => 'default'); $i++; -$icons = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . '/modules/system/images/icons'); -$modversion['config'][$i]['name'] = 'typeicons'; -$modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_ICONS'; -$modversion['config'][$i]['description'] = ''; -$modversion['config'][$i]['formtype'] = 'select'; -$modversion['config'][$i]['valuetype'] = 'text'; +$modversion['config'][$i]['name'] = 'theme_fromfile'; +$modversion['config'][$i]['title'] = '_MD_AM_THEMEFILE'; +$modversion['config'][$i]['description'] = '_MD_AM_THEMEFILEDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'yesno'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['default'] = 0; +$i++; +$modversion['config'][$i]['name'] = 'template_set'; +$modversion['config'][$i]['title'] = '_MD_AM_DTPLSET'; +$modversion['config'][$i]['description'] = '_MD_AM_DTPLSETDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'tplset'; +$modversion['config'][$i]['valuetype'] = 'other'; $modversion['config'][$i]['default'] = 'default'; -$modversion['config'][$i]['options'] = $icons; +$i++; +$modversion['config'][$i]['name'] = 'anonymous'; +$modversion['config'][$i]['title'] = '_MD_AM_ANONNAME'; +$modversion['config'][$i]['description'] = '_MD_AM_ANONNAMEDSC'; $modversion['config'][$i]['category'] = 'general'; - +$modversion['config'][$i]['formtype'] = 'textbox'; +$modversion['config'][$i]['valuetype'] = 'text'; +$modversion['config'][$i]['default'] = _MI_SYSTEM_SITEPREFERENCE_ANON; $i++; -$breadcrumb = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . '/modules/system/images/breadcrumb'); -$modversion['config'][$i]['name'] = 'typebreadcrumb'; -$modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_BREADCRUMB'; -$modversion['config'][$i]['description'] = ''; +$modversion['config'][$i]['name'] = 'gzip_compression'; +$modversion['config'][$i]['title'] = '_MD_AM_USEGZIP'; +$modversion['config'][$i]['description'] = '_MD_AM_USEGZIPDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'yesno'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['default'] = 0; +$i++; +$modversion['config'][$i]['name'] = 'usercookie'; +$modversion['config'][$i]['title'] = '_MD_AM_USERCOOKIE'; +$modversion['config'][$i]['description'] = '_MD_AM_USERCOOKIEDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'textbox'; +$modversion['config'][$i]['valuetype'] = 'text'; +$modversion['config'][$i]['default'] = 'xoops_user'; +$i++; +$modversion['config'][$i]['name'] = 'use_mysession'; +$modversion['config'][$i]['title'] = '_MD_AM_USEMYSESS'; +$modversion['config'][$i]['description'] = '_MD_AM_USEMYSESSDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'yesno'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['default'] = 0; +$i++; +$modversion['config'][$i]['name'] = 'session_name'; +$modversion['config'][$i]['title'] = '_MD_AM_SESSNAME'; +$modversion['config'][$i]['description'] = '_MD_AM_SESSNAMEDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'textbox'; +$modversion['config'][$i]['valuetype'] = 'text'; +$modversion['config'][$i]['default'] = 'xoops_session'; +$i++; +$modversion['config'][$i]['name'] = 'session_expire'; +$modversion['config'][$i]['title'] = '_MD_AM_SESSEXPIRE'; +$modversion['config'][$i]['description'] = '_MD_AM_SESSEXPIREDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'textbox'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['default'] = 15; +$i++; +$modversion['config'][$i]['name'] = 'closesite'; +$modversion['config'][$i]['title'] = '_MD_AM_CLOSESITE'; +$modversion['config'][$i]['description'] = '_MD_AM_CLOSESITEDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'yesno'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['default'] = 0; +$i++; +$modversion['config'][$i]['name'] = 'closesite_okgrp'; +$modversion['config'][$i]['title'] = '_MD_AM_CLOSESITEOK'; +$modversion['config'][$i]['description'] = '_MD_AM_CLOSESITEOKDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'group_multi'; +$modversion['config'][$i]['valuetype'] = 'array'; +$modversion['config'][$i]['default'] = array('1'); +$i++; +$modversion['config'][$i]['name'] = 'closesite_text'; +$modversion['config'][$i]['title'] = '_MD_AM_CLOSESITETXT'; +$modversion['config'][$i]['description'] = '_MD_AM_CLOSESITETXTDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'textarea'; +$modversion['config'][$i]['valuetype'] = 'text'; +$modversion['config'][$i]['default'] = _MI_SYSTEM_SITEPREFERENCE_CLOSESITETEXT; +$i++; +$modversion['config'][$i]['name'] = 'use_ssl'; +$modversion['config'][$i]['title'] = '_MD_AM_USESSL'; +$modversion['config'][$i]['description'] = '_MD_AM_USESSLDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'yesno'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['default'] = 0; +$i++; +$modversion['config'][$i]['name'] = 'sslpost_name'; +$modversion['config'][$i]['title'] = '_MD_AM_SSLPOST'; +$modversion['config'][$i]['description'] = '_MD_AM_SSLPOSTDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'textbox'; +$modversion['config'][$i]['valuetype'] = 'text'; +$modversion['config'][$i]['default'] = 'xoops_ssl'; +$i++; +$modversion['config'][$i]['name'] = 'sslloginlink'; +$modversion['config'][$i]['title'] = '_MD_AM_SSLLINK'; +$modversion['config'][$i]['description'] = '_MD_AM_SSLLINKDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'textbox'; +$modversion['config'][$i]['valuetype'] = 'text'; +$modversion['config'][$i]['default'] = 'https://'; +$i++; +$modversion['config'][$i]['name'] = 'com_mode'; +$modversion['config'][$i]['title'] = '_MD_AM_COMMODE'; +$modversion['config'][$i]['description'] = '_MD_AM_COMMODEDSC'; +$modversion['config'][$i]['category'] = 'general'; $modversion['config'][$i]['formtype'] = 'select'; $modversion['config'][$i]['valuetype'] = 'text'; -$modversion['config'][$i]['default'] = 'default'; -$modversion['config'][$i]['options'] = $breadcrumb; +$modversion['config'][$i]['options'] = array('_NESTED' => 'nest', '_FLAT' => 'flat', '_THREADED' => 'thread'); +$modversion['config'][$i]['default'] = 'flat'; +$i++; +$modversion['config'][$i]['name'] = 'com_order'; +$modversion['config'][$i]['title'] = '_MD_AM_COMORDER'; +$modversion['config'][$i]['description'] = '_MD_AM_COMORDERDSC'; $modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'select'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['options'] = array('_OLDESTFIRST' => 0, '_NEWESTFIRST' => 1); +$modversion['config'][$i]['default'] = 0; $i++; -$jquery_theme = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . '/modules/system/css/ui'); -$modversion['config'][$i]['name'] = 'jquery_theme'; -$modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_JQUERY_THEME'; +$modversion['config'][$i]['name'] = 'enable_badips'; +$modversion['config'][$i]['title'] = '_MD_AM_DOBADIPS'; +$modversion['config'][$i]['description'] = '_MD_AM_DOBADIPSDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'yesno'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['default'] = 0; +$i++; +$modversion['config'][$i]['name'] = 'bad_ips'; +$modversion['config'][$i]['title'] = '_MD_AM_BADIPS'; +$modversion['config'][$i]['description'] = '_MD_AM_BADIPSDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'textarea'; +$modversion['config'][$i]['valuetype'] = 'array'; +$modversion['config'][$i]['default'] = array('127.0.0.1'); +$i++; +$modversion['config'][$i]['name'] = 'module_cache'; +$modversion['config'][$i]['title'] = '_MD_AM_MODCACHE'; +$modversion['config'][$i]['description'] = '_MD_AM_MODCACHEDSC'; +$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['formtype'] = 'module_cache'; +$modversion['config'][$i]['valuetype'] = 'array'; +$modversion['config'][$i]['default'] = ''; +$i++; +// Category user +$modversion['config'][$i]['name'] = 'allow_register'; +$modversion['config'][$i]['title'] = '_MD_AM_ALLOWREG'; +$modversion['config'][$i]['description'] = '_MD_AM_ALLOWREGDSC'; +$modversion['config'][$i]['category'] = 'user'; +$modversion['config'][$i]['formtype'] = 'yesno'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['default'] = 1; +$i++; +$modversion['config'][$i]['name'] = 'minpass'; +$modversion['config'][$i]['title'] = '_MD_AM_MINPASS'; +$modversion['config'][$i]['description'] = '_MD_AM_MINPASSDSC'; +$modversion['config'][$i]['category'] = 'user'; +$modversion['config'][$i]['formtype'] = 'textbox'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['default'] = 5; +$i++; +$modversion['config'][$i]['name'] = 'minuname'; +$modversion['config'][$i]['title'] = '_MD_AM_MINUNAME'; +$modversion['config'][$i]['description'] = '_MD_AM_MINUNAMEDSC'; +$modversion['config'][$i]['category'] = 'user'; +$modversion['config'][$i]['formtype'] = 'textbox'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['default'] = 3; +$i++; +$modversion['config'][$i]['name'] = 'maxuname'; +$modversion['config'][$i]['title'] = '_MD_AM_MAXUNAME'; +$modversion['config'][$i]['description'] = '_MD_AM_MAXUNAMEDSC'; +$modversion['config'][$i]['category'] = 'user'; +$modversion['config'][$i]['formtype'] = 'textbox'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['default'] = 10; +$i++; +$modversion['config'][$i]['name'] = 'allow_chgmail'; +$modversion['config'][$i]['title'] = '_MD_AM_ALLWCHGMAIL'; +$modversion['config'][$i]['description'] = '_MD_AM_ALLWCHGMAILDSC'; +$modversion['config'][$i]['category'] = 'user'; +$modversion['config'][$i]['formtype'] = 'yesno'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['default'] = 0; +$i++; +$modversion['config'][$i]['name'] = 'welcome_type'; +$modversion['config'][$i]['title'] = '_MD_AM_WELCOMETYPE'; +$modversion['config'][$i]['description'] = '_MD_AM_WELCOMETYPE_DESC'; +$modversion['config'][$i]['category'] = 'user'; +$modversion['config'][$i]['formtype'] = 'select'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['options'] = array('_NO' => 0, '_MD_AM_WELCOMETYPE_EMAIL' => 1, '_MD_AM_WELCOMETYPE_PM' => 2, '_MD_AM_WELCOMETYPE_BOTH' => 3); +$modversion['config'][$i]['default'] = 1; +$i++; +$modversion['config'][$i]['name'] = 'new_user_notify'; +$modversion['config'][$i]['title'] = '_MD_AM_NEWUNOTIFY'; +$modversion['config'][$i]['description'] = '_MD_AM_NEWUNOTIFYDSC'; +$modversion['config'][$i]['category'] = 'user'; +$modversion['config'][$i]['formtype'] = 'yesno'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['default'] = 1; +$i++; +$modversion['config'][$i]['name'] = 'new_user_notify_group'; +$modversion['config'][$i]['title'] = '_MD_AM_NOTIFYTO'; $modversion['config'][$i]['description'] = ''; +$modversion['config'][$i]['category'] = 'user'; +$modversion['config'][$i]['formtype'] = 'group'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['default'] = 1; +$i++; +$modversion['config'][$i]['name'] = 'activation_type'; +$modversion['config'][$i]['title'] = '_MD_AM_ACTVTYPE'; +$modversion['config'][$i]['description'] = '_MD_AM_ACTVTYPEDSC'; +$modversion['config'][$i]['category'] = 'user'; $modversion['config'][$i]['formtype'] = 'select'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['options'] = array('_MD_AM_USERACTV' => 0, '_MD_AM_AUTOACTV' => 1, '_MD_AM_ADMINACTV' => 2); +$modversion['config'][$i]['default'] = 0; +$i++; +$modversion['config'][$i]['name'] = 'activation_group'; +$modversion['config'][$i]['title'] = '_MD_AM_ACTVGROUP'; +$modversion['config'][$i]['description'] = '_MD_AM_ACTVGROUPDSC'; +$modversion['config'][$i]['category'] = 'user'; +$modversion['config'][$i]['formtype'] = 'group'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['default'] = 1; +$i++; +$modversion['config'][$i]['name'] = 'uname_test_level'; +$modversion['config'][$i]['title'] = '_MD_AM_UNAMELVL'; +$modversion['config'][$i]['description'] = '_MD_AM_UNAMELVLDSC'; +$modversion['config'][$i]['category'] = 'user'; +$modversion['config'][$i]['formtype'] = 'select'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['options'] = array('_MD_AM_STRICT' => 0, '_MD_AM_MEDIUM' => 1, '_MD_AM_LIGHT' => 2); +$modversion['config'][$i]['default'] = 0; +$i++; +$modversion['config'][$i]['name'] = 'self_delete'; +$modversion['config'][$i]['title'] = '_MD_AM_SELFDELETE'; +$modversion['config'][$i]['description'] = '_MD_AM_SELFDELETEDSC'; +$modversion['config'][$i]['category'] = 'user'; +$modversion['config'][$i]['formtype'] = 'yesno'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['default'] = 0; +$i++; +$modversion['config'][$i]['name'] = 'bad_unames'; +$modversion['config'][$i]['title'] = '_MD_AM_BADUNAMES'; +$modversion['config'][$i]['description'] = ''; +$modversion['config'][$i]['category'] = 'user'; +$modversion['config'][$i]['formtype'] = 'textarea'; +$modversion['config'][$i]['valuetype'] = 'array'; +$modversion['config'][$i]['default'] = array('webmaster', '^xoops', '^admin'); +$i++; +$modversion['config'][$i]['name'] = 'bad_emails'; +$modversion['config'][$i]['title'] = '_MD_AM_BADEMAILS'; +$modversion['config'][$i]['description'] = '_MD_AM_BADEMAILSDSC'; +$modversion['config'][$i]['category'] = 'user'; +$modversion['config'][$i]['formtype'] = 'textarea'; +$modversion['config'][$i]['valuetype'] = 'array'; +$modversion['config'][$i]['default'] = array('xoops.org$'); +$i++; +$modversion['config'][$i]['name'] = 'reg_dispdsclmr'; +$modversion['config'][$i]['title'] = '_MD_AM_DSPDSCLMR'; +$modversion['config'][$i]['description'] = '_MD_AM_DSPDSCLMRDSC'; +$modversion['config'][$i]['category'] = 'user'; +$modversion['config'][$i]['formtype'] = 'yesno'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['default'] = 1; +$i++; +$modversion['config'][$i]['name'] = 'reg_disclaimer'; +$modversion['config'][$i]['title'] = '_MD_AM_REGDSCLMR'; +$modversion['config'][$i]['description'] = '_MD_AM_REGDSCLMRDSC'; +$modversion['config'][$i]['category'] = 'user'; +$modversion['config'][$i]['formtype'] = 'textarea'; $modversion['config'][$i]['valuetype'] = 'text'; -$modversion['config'][$i]['default'] = 'base'; -$modversion['config'][$i]['options'] = $jquery_theme; -$modversion['config'][$i]['category'] = 'general'; +$modversion['config'][$i]['default'] = _MI_SYSTEM_SITEPREFERENCE_DISCLMR; +$i++; +// Category meta +$modversion['config'][$i]['name'] = 'meta_keywords'; +$modversion['config'][$i]['title'] = '_MD_AM_METAKEY'; +$modversion['config'][$i]['description'] = '_MD_AM_METAKEYDSC'; +$modversion['config'][$i]['category'] = 'meta'; +$modversion['config'][$i]['formtype'] = 'textarea'; +$modversion['config'][$i]['valuetype'] = 'text'; +$modversion['config'][$i]['default'] = _MI_SYSTEM_SITEPREFERENCE_METAKEY; +$i++; +$modversion['config'][$i]['name'] = 'meta_description'; +$modversion['config'][$i]['title'] = '_MD_AM_METADESC'; +$modversion['config'][$i]['description'] = '_MD_AM_METADESCDSC'; +$modversion['config'][$i]['category'] = 'meta'; +$modversion['config'][$i]['formtype'] = 'textarea'; +$modversion['config'][$i]['valuetype'] = 'text'; +$modversion['config'][$i]['default'] = _MI_SYSTEM_SITEPREFERENCE_METADSC; +$i++; +$modversion['config'][$i]['name'] = 'meta_robots'; +$modversion['config'][$i]['title'] = '_MD_AM_METAROBOTS'; +$modversion['config'][$i]['description'] = '_MD_AM_METAROBOTSDSC'; +$modversion['config'][$i]['category'] = 'meta'; +$modversion['config'][$i]['formtype'] = 'select'; +$modversion['config'][$i]['valuetype'] = 'text'; +$modversion['config'][$i]['options'] = array('_MD_AM_INDEXFOLLOW' => 'index,follow', '_MD_AM_NOINDEXFOLLOW' => 'noindex,follow', '_MD_AM_INDEXNOFOLLOW' => 'index,nofollow', '_MD_AM_NOINDEXNOFOLLOW' => 'noindex,nofollow'); +$modversion['config'][$i]['default'] = 'index,follow'; +$i++; +$modversion['confi... [truncated message content] |
From: <be...@us...> - 2012-12-16 16:42:34
|
Revision: 10402 http://sourceforge.net/p/xoops/svn/10402 Author: beckmi Date: 2012-12-16 16:42:32 +0000 (Sun, 16 Dec 2012) Log Message: ----------- Fixing small typo Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/search-plugin.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/search-plugin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/search-plugin.php 2012-12-16 16:10:10 UTC (rev 10401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/search-plugin.php 2012-12-16 16:42:32 UTC (rev 10402) @@ -28,7 +28,7 @@ The 'Search' module provides a 'Plugin' interface that modules should implement<br /> The new class Xoops_Plugin is the class that makes using plugins simple and effective!<br /> <br /> -See how Codex module hooks into the search module just buy using this codex/class/plugin/search.php +See how Codex module hooks into the search module just by using this codex/class/plugin/search.php "; Xoops_Utils::dumpFile(dirname(__FILE__) . '/class/plugin/search.php'); |
From: <tr...@us...> - 2012-12-16 16:10:13
|
Revision: 10401 http://sourceforge.net/p/xoops/svn/10401 Author: trabis Date: 2012-12-16 16:10:10 +0000 (Sun, 16 Dec 2012) Log Message: ----------- Adding Xoops_Plugin, I forgot it in last update! Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Plugin.php Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Plugin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Plugin.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Plugin.php 2012-12-16 16:10:10 UTC (rev 10401) @@ -0,0 +1,67 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author trabis <lus...@gm...> + * @version $Id$ + */ + +class Xoops_Plugin +{ + /** + * @param string $dirname + * @param string $pluginName + * + * @return bool|Xoops_Plugin_Abstract false if plugin does not exist + */ + static function getPlugin($dirname, $pluginName = 'system') + { + $available = self::getAvailablePlugins($pluginName); + if (!in_array($dirname, array_keys($available))) { + return false; + } + return $available[$dirname]; + } + + /** + * @param string $pluginName + * + * @return mixed + */ + static function getAvailablePlugins($pluginName = 'system') + { + static $plugins = array(); + if (!isset($plugins[$pluginName])) { + $plugins[$pluginName] = array(); + $xoops = Xoops::getInstance(); + + //Load interface for this plugin + if (!XoopsLoad::loadFile($xoops->path("modules/{$pluginName}/class/plugin/interface.php"))) { + return $plugins[$pluginName]; + } + + $dirnames = $xoops->getActiveModules(); + foreach ($dirnames as $dirname) { + if (XoopsLoad::loadFile($xoops->path("modules/{$dirname}/class/plugin/{$pluginName}.php"))) { + $className = ucfirst($dirname) . ucfirst($pluginName) . 'Plugin'; + $interface = ucfirst($pluginName) . 'PluginInterface'; + $class = new $className($dirname); + if ($class instanceof Xoops_Plugin_Abstract && $class instanceof $interface) { + $plugins[$pluginName][$dirname] = $class; + } + } + } + } + return $plugins[$pluginName]; + } +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Plugin.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: svn:eol-style + native |
From: <tr...@us...> - 2012-12-16 16:06:35
|
Revision: 10400 http://sourceforge.net/p/xoops/svn/10400 Author: trabis Date: 2012-12-16 16:06:31 +0000 (Sun, 16 Dec 2012) Log Message: ----------- Adding Plugin system. Implementing Search Plugin system Fixing some publisher bugs. Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/logger/preloads/core.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/class/category.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/class/item.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/class/publisher.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/class/utils.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/file.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/footer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/item.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/preloads/core.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/submit.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/form/search.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Module/Abstract.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/plugin/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/plugin/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/plugin/search.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/images/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/search-plugin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/plugin/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/plugin/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/plugin/interface.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Plugin/ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Plugin/Abstract.php Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/images/index.html Copied: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/index.html (from rev 10388, XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/images/index.html) =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/index.html 2012-12-16 16:06:31 UTC (rev 10400) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/plugin/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/plugin/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/plugin/index.html 2012-12-16 16:06:31 UTC (rev 10400) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/plugin/search.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/plugin/search.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/plugin/search.php 2012-12-16 16:06:31 UTC (rev 10400) @@ -0,0 +1,41 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author trabis <lus...@gm...> + * @version $Id$ + */ + +defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined"); + +class CodexSearchPlugin extends Xoops_Plugin_Abstract implements SearchPluginInterface +{ + public function search($queries, $andor, $limit, $start, $uid) + { + $queries = implode(' ', $queries); + $files = XoopsLists::getFileListAsArray(dirname(dirname(dirname(__FILE__)))); + $res = array(); + $i = 0; + foreach ($files as $file) { + if (!in_array($file, array('xoops_version.php', 'index.php'))) { + $fileName = ucfirst(str_replace('.php', '', $file)); + if (stripos($fileName, $queries) !== false) { + $res[$i]['link'] = $file; + $res[$i]['title'] = $fileName; + $i++; + } + } + } + return $res; + } +} Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/plugin/search.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: svn:eol-style + native Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/images/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/images/index.html 2012-12-16 00:34:51 UTC (rev 10399) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/images/index.html 2012-12-16 16:06:31 UTC (rev 10400) @@ -1 +0,0 @@ - <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/images/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/images/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/images/index.html 2012-12-16 16:06:31 UTC (rev 10400) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Copied: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/search-plugin.php (from rev 10388, XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/cache.php) =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/search-plugin.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/search-plugin.php 2012-12-16 16:06:31 UTC (rev 10400) @@ -0,0 +1,35 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author trabis <lus...@gm...> + * @version $Id$ + */ + +include dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'mainfile.php'; + +$xoops = Xoops::getInstance(); +$xoops->header(); +echo " +Since 2.6.0, the search functionality was removed from core.<br /> +Now you need to install the 'Search' Module to get search functionality<br /> +<br /> +The method for implementing search does no longer uses xoops_version.php<br /> +The 'Search' module provides a 'Plugin' interface that modules should implement<br /> +The new class Xoops_Plugin is the class that makes using plugins simple and effective!<br /> +<br /> +See how Codex module hooks into the search module just buy using this codex/class/plugin/search.php +"; + +Xoops_Utils::dumpFile(dirname(__FILE__) . '/class/plugin/search.php'); +$xoops->footer(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/logger/preloads/core.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/logger/preloads/core.php 2012-12-16 00:34:51 UTC (rev 10399) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/logger/preloads/core.php 2012-12-16 16:06:31 UTC (rev 10400) @@ -214,4 +214,9 @@ $logger->addExtra($log[0], $log[1]); } } + + static function eventCoreModuleAddlog($args) + { + Logger::getInstance()->addExtra($args[0], $args[1]); + } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/class/category.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/class/category.php 2012-12-16 00:34:51 UTC (rev 10399) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/class/category.php 2012-12-16 16:06:31 UTC (rev 10400) @@ -75,7 +75,7 @@ public function checkPermission() { $xoops = Xoops::getInstance(); - if ($this->publisher->userIsModuleAdmin()) { + if ($this->publisher->IsUserAdmin()) { return true; } if ($xoops->isUser() && $xoops->user->getVar('uid') == $this->getVar('moderator')) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/class/item.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/class/item.php 2012-12-16 00:34:51 UTC (rev 10399) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/class/item.php 2012-12-16 16:06:31 UTC (rev 10400) @@ -403,20 +403,20 @@ { $xoops = Xoops::getInstance(); $adminLinks = ''; - if ($xoops->isUser() && (PublisherUtils::userIsAdmin() || PublisherUtils::userIsAuthor($this) || $this->publisher->getPermissionHandler()->isGranted('item_submit', $this->getVar('categoryid')))) { - if (PublisherUtils::userIsAdmin() || PublisherUtils::userIsAuthor($this) || PublisherUtils::userIsModerator($this)) { - if ($this->publisher->getConfig('perm_edit') || PublisherUtils::userIsModerator($this) || PublisherUtils::userIsAdmin()) { + if ($xoops->isUser() && (PublisherUtils::IsUserAdmin() || PublisherUtils::IsUserAuthor($this) || $this->publisher->getPermissionHandler()->isGranted('item_submit', $this->getVar('categoryid')))) { + if (PublisherUtils::IsUserAdmin() || PublisherUtils::IsUserAuthor($this) || PublisherUtils::IsUserModerator($this)) { + if ($this->publisher->getConfig('perm_edit') || PublisherUtils::IsUserModerator($this) || PublisherUtils::IsUserAdmin()) { // Edit button $adminLinks .= "<a href='" . PUBLISHER_URL . "/submit.php?itemid=" . $this->getVar('itemid'). "'><img src='" . PUBLISHER_URL . "/images/links/edit.gif'" . " title='" . _CO_PUBLISHER_EDIT . "' alt='" . _CO_PUBLISHER_EDIT . "'/></a>"; $adminLinks .= " "; } - if ($this->publisher->getConfig('perm_delete') || PublisherUtils::userIsModerator($this) || PublisherUtils::userIsAdmin()) { + if ($this->publisher->getConfig('perm_delete') || PublisherUtils::IsUserModerator($this) || PublisherUtils::IsUserAdmin()) { // Delete button $adminLinks .= "<a href='" . PUBLISHER_URL . "/submit.php?op=del&itemid=" . $this->getVar('itemid'). "'><img src='" . PUBLISHER_URL . "/images/links/delete.png'" . " title='" . _CO_PUBLISHER_DELETE . "' alt='" . _CO_PUBLISHER_DELETE . "' /></a>"; $adminLinks .= " "; } } - if ($this->publisher->getConfig('perm_clone') || PublisherUtils::userIsModerator($this) || PublisherUtils::userIsAdmin()) { + if ($this->publisher->getConfig('perm_clone') || PublisherUtils::IsUserModerator($this) || PublisherUtils::IsUserAdmin()) { // Duplicate button $adminLinks .= "<a href='" . PUBLISHER_URL . "/submit.php?op=clone&itemid=" . $this->getVar('itemid'). "'><img src='" . PUBLISHER_URL . "/images/links/clone.gif'" . " title='" . _CO_PUBLISHER_CLONE . "' alt='" . _CO_PUBLISHER_CLONE . "' /></a>"; $adminLinks .= " "; @@ -818,7 +818,7 @@ */ public function accessGranted() { - if (PublisherUtils::userIsAdmin()) { + if (PublisherUtils::IsUserAdmin()) { return true; } if ($this->getVar('status') != _PUBLISHER_STATUS_PUBLISHED) { @@ -1443,7 +1443,7 @@ unset($criteriaKeyword); } } - if (!PublisherUtils::userIsAdmin() && (count($categories) > 0)) { + if (!PublisherUtils::IsUserAdmin() && (count($categories) > 0)) { $criteriaPermissions = new CriteriaCompo(); // Categories for which user has access $categoriesGranted = $gperm_handler->getItemIds('category_read', $groups, $this->publisher->getModule()->getVar('mid')); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/class/publisher.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/class/publisher.php 2012-12-16 00:34:51 UTC (rev 10399) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/class/publisher.php 2012-12-16 16:06:31 UTC (rev 10400) @@ -36,6 +36,13 @@ } /** + * @return Publisher + */ + static function getInstance() { + return parent::getInstance(); + } + + /** * @return PublisherItemHandler */ public function getItemHandler() Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/class/utils.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/class/utils.php 2012-12-16 00:34:51 UTC (rev 10399) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/class/utils.php 2012-12-16 16:06:31 UTC (rev 10400) @@ -340,7 +340,7 @@ * * @return bool */ - static function userIsAuthor($itemObj) + static function IsUserAuthor($itemObj) { $xoops = Xoops::getInstance(); return ($xoops->isUser() && is_object($itemObj) && ($xoops->user->getVar('uid') == $itemObj->getVar('uid'))); @@ -353,14 +353,14 @@ * * @return bool */ - static function userIsModerator($itemObj) + static function IsUserModerator($itemObj) { $publisher = Publisher::getInstance(); $categoriesGranted = $publisher->getPermissionHandler()->getGrantedItems('category_moderation'); return (is_object($itemObj) && in_array($itemObj->getVar('categoryid'), $categoriesGranted)); } - static function userIsAdmin() + static function IsUserAdmin() { return Publisher::getInstance()->IsUserAdmin(); } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/file.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/file.php 2012-12-16 00:34:51 UTC (rev 10399) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/file.php 2012-12-16 16:06:31 UTC (rev 10400) @@ -42,7 +42,7 @@ $itemObj = $publisher->getItemHandler()->get($fileObj->getVar('itemid')); // if the user does not have permission to modify this file, exit -if (!(PublisherUtils::userIsAdmin() || PublisherUtils::userIsModerator($itemObj) || ($xoops->isUser() && $fileObj->getVar('uid') == $xoops->user->getVar('uid')))) { +if (!(PublisherUtils::IsUserAdmin() || PublisherUtils::IsUserModerator($itemObj) || ($xoops->isUser() && $fileObj->getVar('uid') == $xoops->user->getVar('uid')))) { $xoops->redirect("index.php", 1, _NOPERM); } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/footer.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/footer.php 2012-12-16 00:34:51 UTC (rev 10399) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/footer.php 2012-12-16 16:06:31 UTC (rev 10400) @@ -35,7 +35,7 @@ . @$xoopsTpl->get_template_vars("xoops_module_header")); $xoopsTpl->assign("publisher_adminpage", "<a href='" . $publisher->url("admin/index.php") . "'>" . _MD_PUBLISHER_ADMIN_PAGE . "</a>"); -$xoopsTpl->assign("isAdmin", PublisherUtils::userIsAdmin()); +$xoopsTpl->assign("isAdmin", PublisherUtils::IsUserAdmin()); $xoopsTpl->assign('publisher_url', $publisher->url()); $xoopsTpl->assign('publisher_images_url', $publisher->url('images')); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/item.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/item.php 2012-12-16 00:34:51 UTC (rev 10399) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/item.php 2012-12-16 16:06:31 UTC (rev 10400) @@ -60,7 +60,7 @@ } // Update the read counter of the selected item -if (!$xoops->isUser() || (PublisherUtils::userIsAdmin() && $publisher->getConfig('item_admin_hits') == 1) || ($xoops->isUser() && !PublisherUtils::userIsAdmin())) { +if (!$xoops->isUser() || (PublisherUtils::IsUserAdmin() && $publisher->getConfig('item_admin_hits') == 1) || ($xoops->isUser() && !PublisherUtils::IsUserAdmin())) { $itemObj->updateCounter(); } @@ -146,7 +146,7 @@ // check if user has permission to modify files $hasFilePermissions = true; -if (!(PublisherUtils::userIsAdmin() || PublisherUtils::userIsModerator($itemObj))) { +if (!(PublisherUtils::IsUserAdmin() || PublisherUtils::IsUserModerator($itemObj))) { $hasFilePermissions = false; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/preloads/core.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/preloads/core.php 2012-12-16 00:34:51 UTC (rev 10399) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/preloads/core.php 2012-12-16 16:06:31 UTC (rev 10400) @@ -28,7 +28,7 @@ */ class PublisherCorePreload extends XoopsPreloadItem { - static function eventCoreIncludeCommonStart($args) + static function eventCoreIncludeCommonEnd($args) { $path = dirname(dirname(__FILE__)); XoopsLoad::addMap(array( Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/submit.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/submit.php 2012-12-16 00:34:51 UTC (rev 10399) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/submit.php 2012-12-16 16:06:31 UTC (rev 10400) @@ -41,10 +41,10 @@ // We are editing or deleting an article /* @var $itemObj PublisherItem */ $itemObj = $publisher->getItemHandler()->get($itemid); - if (!(PublisherUtils::userIsAdmin() || PublisherUtils::userIsAuthor($itemObj) || PublisherUtils::userIsModerator($itemObj))) { + if (!(PublisherUtils::IsUserAdmin() || PublisherUtils::IsUserAuthor($itemObj) || PublisherUtils::IsUserModerator($itemObj))) { $xoops->redirect("index.php", 1, _NOPERM); } - if (!PublisherUtils::userIsAdmin() || !PublisherUtils::userIsModerator($itemObj)) { + if (!PublisherUtils::IsUserAdmin() || !PublisherUtils::IsUserModerator($itemObj)) { if (isset($_GET['op']) && $_GET['op'] == 'del' && !$publisher->getConfig('perm_delete')) { $xoops->redirect("index.php", 1, _NOPERM); } else if (!$publisher->getConfig('perm_edit')) { @@ -56,7 +56,7 @@ } else { // we are submitting a new article // if the user is not admin AND we don't allow user submission, exit - if (!(PublisherUtils::userIsAdmin() || ($publisher->getConfig('perm_submit') == 1 && ($xoops->isUser() || ($publisher->getConfig('perm_anon_submit') == 1))))) { + if (!(PublisherUtils::IsUserAdmin() || ($publisher->getConfig('perm_submit') == 1 && ($xoops->isUser() || ($publisher->getConfig('perm_anon_submit') == 1))))) { $xoops->redirect("index.php", 1, _NOPERM); } $itemObj = $publisher->getItemHandler()->create(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/form/search.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/form/search.php 2012-12-16 00:34:51 UTC (rev 10399) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/form/search.php 2012-12-16 16:06:31 UTC (rev 10400) @@ -48,9 +48,13 @@ $mods_checkbox = new XoopsFormCheckBox(_MD_SEARCH_SEARCHIN, 'mids[]', $mid); } if (empty($modules)) { + $gperm_handler = $xoops->getHandlerGroupperm(); + $available_modules = $gperm_handler->getItemIds('module_read', $search->getUserGroups()); + $available_plugins = Xoops_Plugin::getAvailablePlugins('search'); + + //todo, would be nice to have the module ids availabe also $criteria = new CriteriaCompo(); - $criteria->add(new Criteria('hassearch', 1)); - $criteria->add(new Criteria('isactive', 1)); + $criteria->add(new Criteria('dirname', "('" . implode("','", array_keys($available_plugins)) . "')", 'IN')); if (isset($available_modules) && !empty($available_modules)) { $criteria->add(new Criteria('mid', '(' . implode(',', $available_modules) . ')', 'IN')); } Copied: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/plugin/index.html (from rev 10399, XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/index.html) =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/plugin/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/plugin/index.html 2012-12-16 16:06:31 UTC (rev 10400) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/plugin/interface.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/plugin/interface.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/plugin/interface.php 2012-12-16 16:06:31 UTC (rev 10400) @@ -0,0 +1,23 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author trabis <lus...@gm...> + * @version $Id$ + */ + +interface SearchPluginInterface +{ + public function search($queries, $andor, $limit, $start, $uid); +} + Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/plugin/interface.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: svn:eol-style + native Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/index.php 2012-12-16 00:34:51 UTC (rev 10399) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/index.php 2012-12-16 16:06:31 UTC (rev 10400) @@ -19,7 +19,6 @@ * @author Kazumi Ono (AKA onokazu) * @author Taiwen Jiang <ph...@us...> * @version $Id$ - * @todo Modularize; Both search algorithms and interface will be redesigned */ include dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'mainfile.php'; @@ -101,12 +100,14 @@ $gperm_handler = $xoops->getHandlerGroupperm(); $available_modules = $gperm_handler->getItemIds('module_read', $search->getUserGroups()); +$available_plugins = Xoops_Plugin::getAvailablePlugins('search'); + if ($action == 'search') { $xoops->header(); - /* @var $formHandler SearchForm */ + /* @var $formHandler SearchSearchForm */ $formHandler = $search->getForm(null, 'search'); - $form = $formHandler->getSearchFrom($andor, $queries,$mids, $mid); + $form = $formHandler->getSearchFrom($andor, $queries, $mids, $mid); $form->display(); $xoops->footer(); @@ -114,6 +115,7 @@ if ($andor != "OR" && $andor != "exact" && $andor != "AND") { $andor = "AND"; } + $ignored_queries = array(); // holds kewords that are shorter than allowed minmum length $myts = MyTextSanitizer::getInstance(); if ($action != 'showallbyuser') { @@ -144,9 +146,8 @@ switch ($action) { case "results": $module_handler = $xoops->getHandlerModule(); - $criteria = new CriteriaCompo(new Criteria('hassearch', 1)); - $criteria->add(new Criteria('isactive', 1)); - $criteria->add(new Criteria('mid', "(" . implode(',', $available_modules) . ")", 'IN')); + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('dirname', "('" . implode("','", array_keys($available_plugins)) . "')", 'IN')); $modules = $module_handler->getObjectsArray($criteria, true); $mids = isset($_REQUEST['mids']) ? $_REQUEST['mids'] : array(); if (empty($mids) || !is_array($mids)) { @@ -163,56 +164,55 @@ $modules_result = array(); foreach ($mids as $mid) { $mid = intval($mid); - if (in_array($mid, $available_modules)) { - /* @var $module XoopsModule */ - $module = $modules[$mid]; - $results = $module->search($queries, $andor, 5, 0); - $count = count($results); - $mid = $module->getVar('mid'); + /* @var $module XoopsModule */ + $module = $modules[$mid]; + /* @var $plugin SearchPluginInterface */ + $plugin = Xoops_Plugin::getPlugin($module->getVar('dirname'), 'search'); + $results = $plugin->search($queries, $andor, 5, 0, null); + $count = count($results); + $mid = $module->getVar('mid'); + $res = array(); + if (is_array($results) && $count > 0) { + $nomatch = false; + $modules_result[$mid]['name'] = $module->getVar('name'); + if (file_exists($image = $xoops->path('modules/' . $module->getVar('dirname') . '/icons/logo_large.png'))) { + $modules_result[$mid]['image'] = $xoops->url($image); + } else { + $modules_result[$mid]['image'] = $xoops->url('images/icons/posticon2.gif'); + } $res = array(); - if (is_array($results) && $count > 0) { - $nomatch = false; - $modules_result[$mid]['name'] = $module->getVar('name'); - $modules_result[$mid]['image'] = 'modules/' . $module->getVar('dirname') . '/icons/logo_large.png'; - - $res = array(); - for ($i = 0; $i < $count; $i++) { - if (isset($results[$i]['image']) && $results[$i]['image'] != "") { - $res[$i]['image'] = 'modules/' . $module->getVar('dirname') . '/' . $results[$i]['image']; - } else { - $res[$i]['image'] = 'images/icons/posticon2.gif'; - } - if (!preg_match("/^http[s]*:\/\//i", $results[$i]['link'])) { - $res[$i]['link'] = 'modules/' . $module->getVar('dirname') . '/' . $results[$i]['link']; - } - $res[$i]['title'] = $myts->htmlspecialchars($results[$i]['title']); - $res[$i]['title_highligh'] = preg_replace( $queries_pattern, "<span class='searchHighlight'>$1</span>", $myts->htmlspecialchars($results[$i]['title'])); - if ( !empty($results[$i]['uid']) ) { - $res[$i]['uid'] = intval($results[$i]['uid']); - $res[$i]['uname'] = XoopsUser::getUnameFromId($results[$i]['uid'], true); - } - $res[$i]['time'] = !empty($results[$i]['time']) ? XoopsLocal::formatTimestamp(intval($results[$i]['time'])) : ""; - $res[$i]['content'] = empty($results[$i]['content']) ? "" : preg_replace( $queries_pattern, "<span class='searchHighlight'>$1</span>", $results[$i]['content']); + for ($i = 0; $i < $count; $i++) { + if (!preg_match("/^http[s]*:\/\//i", $results[$i]['link'])) { + $res[$i]['link'] = $xoops->url('modules/' . $module->getVar('dirname') . '/' . $results[$i]['link']); } - if ($count >= 5) { - $search_url = $search->url('index.php?query=' . urlencode(stripslashes(implode(' ', $queries)))); - $search_url .= "&mid={$mid}&action=showall&andor={$andor}"; - $modules_result[$mid]['search_url'] = htmlspecialchars($search_url); + $res[$i]['title'] = $myts->htmlspecialchars($results[$i]['title']); + $res[$i]['title_highligh'] = preg_replace($queries_pattern, "<span class='searchHighlight'>$1</span>", $myts->htmlspecialchars($results[$i]['title'])); + if (!empty($results[$i]['uid'])) { + $res[$i]['uid'] = intval($results[$i]['uid']); + $res[$i]['uname'] = XoopsUser::getUnameFromId($results[$i]['uid'], true); } + $res[$i]['time'] = !empty($results[$i]['time']) ? XoopsLocal::formatTimestamp(intval($results[$i]['time'])) : ""; + $res[$i]['content'] = empty($results[$i]['content']) ? "" : preg_replace($queries_pattern, "<span class='searchHighlight'>$1</span>", $results[$i]['content']); } - if ( count($res) > 0 ) { - $modules_result[$mid]['result'] = $res; + if ($count >= 5) { + $search_url = $search->url('index.php?query=' . urlencode(stripslashes(implode(' ', $queries)))); + $search_url .= "&mid={$mid}&action=showall&andor={$andor}"; + $modules_result[$mid]['search_url'] = htmlspecialchars($search_url); } } - unset($results); - unset($module); + if (count($res) > 0) { + $modules_result[$mid]['result'] = $res; + } } + unset($results); + unset($module); + $xoops->tpl()->assign('modules', $modules_result); - /* @var $formHandler SearchForm */ + /* @var $formHandler SearchSearchForm */ $formHandler = $search->getForm(null, 'search'); - $form = $formHandler->getSearchFrom($andor, $queries,$mids, $mid); + $form = $formHandler->getSearchFrom($andor, $queries, $mids, $mid); $form->display(); break; @@ -226,14 +226,16 @@ $module_handler = $xoops->getHandlerModule(); $module = $module_handler->getById($mid); - $results = $module->search($queries, $andor, 20, $start, $uid); + /* @var $plugin SearchPluginInterface */ + $plugin = Xoops_Plugin::getPlugin($module->getVar('dirname'), 'search'); + $results = $plugin->search($queries, $andor, 20, $start, $uid); $modules_result[$mid]['name'] = $module->getVar('name'); $modules_result[$mid]['image'] = 'modules/' . $module->getVar('dirname') . '/icons/logo_large.png'; $count = count($results); if (is_array($results) && $count > 0) { - $next_results = $module->search($queries, $andor, 1, $start + 20, $uid); + $next_results = $plugin->search($queries, $andor, 1, $start + 20, $uid); $next_count = count($next_results); $has_next = false; if (is_array($next_results) && $next_count == 1) { @@ -255,16 +257,16 @@ } $res[$i]['title'] = $myts->htmlspecialchars($results[$i]['title']); if (isset($queries_pattern)) { - $res[$i]['title_highligh'] = preg_replace( $queries_pattern, "<span class='searchHighlight'>$1</span>", $myts->htmlspecialchars($results[$i]['title'])); + $res[$i]['title_highligh'] = preg_replace($queries_pattern, "<span class='searchHighlight'>$1</span>", $myts->htmlspecialchars($results[$i]['title'])); } else { $res[$i]['title_highligh'] = $myts->htmlspecialchars($results[$i]['title']); } - if ( !empty($results[$i]['uid']) ) { + if (!empty($results[$i]['uid'])) { $res[$i]['uid'] = @intval($results[$i]['uid']); $res[$i]['uname'] = XoopsUser::getUnameFromId($results[$i]['uid'], true); } $res[$i]['time'] = !empty($results[$i]['time']) ? " (" . XoopsLocal::formatTimestamp(intval($results[$i]['time'])) . ")" : ""; - $res[$i]['content'] = empty($results[$i]['content']) ? "" : preg_replace( $queries_pattern, "<span class='searchHighlight'>$1</span>", $results[$i]['content']); + $res[$i]['content'] = empty($results[$i]['content']) ? "" : preg_replace($queries_pattern, "<span class='searchHighlight'>$1</span>", $results[$i]['content']); } if (count($res) > 0) { $modules_result[$mid]['result'] = $res; @@ -279,7 +281,6 @@ $prev = $start - 20; $search_url_prev = $search_url . "&start={$prev}"; $modules_result[$mid]['prev'] = htmlspecialchars($search_url_prev); - } if (false != $has_next) { $next = $start + 20; @@ -289,9 +290,9 @@ $xoops->tpl()->assign('modules', $modules_result); } - /* @var $formHandler SearchForm */ + /* @var $formHandler SearchSearchForm */ $formHandler = $search->getForm(null, 'search'); - $form = $formHandler->getSearchFrom($andor, $queries,$mids, $mid); + $form = $formHandler->getSearchFrom($andor, $queries, $mids, $mid); $form->display(); break; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Module/Abstract.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Module/Abstract.php 2012-12-16 00:34:51 UTC (rev 10399) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Module/Abstract.php 2012-12-16 16:06:31 UTC (rev 10400) @@ -169,12 +169,12 @@ } /** - * @param XoopsObject $obj + * @param null|XoopsObject $obj * @param string $name * * @return bool|XoopsForm */ - public function getForm(XoopsObject $obj, $name) + public function getForm($obj, $name) { $name = strtolower($name); $this->_addLog("Loading form '{$name}'"); Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Plugin/Abstract.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Plugin/Abstract.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Plugin/Abstract.php 2012-12-16 16:06:31 UTC (rev 10400) @@ -0,0 +1,29 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author trabis <lus...@gm...> + * @version $Id$ + */ + +class Xoops_Plugin_Abstract +{ + /** + * @param string $dirname + */ + public function __construct($dirname) + { + $xoops = Xoops::getInstance(); + $xoops->loadLanguage('modinfo', $dirname); + } +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Plugin/Abstract.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: svn:eol-style + native |
From: <tr...@us...> - 2012-12-16 00:34:54
|
Revision: 10399 http://sourceforge.net/p/xoops/svn/10399 Author: trabis Date: 2012-12-16 00:34:51 +0000 (Sun, 16 Dec 2012) Log Message: ----------- First implementation of search module. I'll need to implement a plugin mechanism now. Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/form/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/form/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/form/search.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/search.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/icons/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/icons/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/icons/logo_large.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/icons/logo_small.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/images/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/images/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/images/logo.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/language/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/language/english/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/language/english/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/language/english/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/language/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/preloads/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/preloads/core.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/preloads/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/templates/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/templates/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/templates/search.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/xoops_version.php Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/form/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/form/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/form/index.html 2012-12-16 00:34:51 UTC (rev 10399) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/form/search.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/form/search.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/form/search.php 2012-12-16 00:34:51 UTC (rev 10399) @@ -0,0 +1,76 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author trabis <lus...@gm...> + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +class SearchSearchForm extends XoopsThemeForm +{ + /** + * We are not using this for objects but we need to override the constructor + * @param null $obj + */ + public function __construct($obj = null) + { + } + + public function getSearchFrom($andor, $queries,$mids, $mid) + { + $xoops = Xoops::getInstance(); + $search = Search::getInstance(); + // create form + parent::__construct(_MD_SEARCH, 'search', 'index.php', 'get'); + + // create form elements + $this->addElement(new XoopsFormText(_MD_SEARCH_KEYWORDS, 'query', 30, 255, htmlspecialchars(stripslashes(implode(' ', $queries)), ENT_QUOTES)), true); + $type_select = new XoopsFormSelect(_MD_SEARCH_TYPE, 'andor', $andor); + $type_select->addOptionArray(array( + 'AND' => _MD_SEARCH_ALL, 'OR' => _MD_SEARCH_ANY, 'exact' => _MD_SEARCH_EXACT + )); + $this->addElement($type_select); + if (!empty($mids)) { + $mods_checkbox = new XoopsFormCheckBox(_MD_SEARCH_SEARCHIN, 'mids[]', $mids); + } else { + $mods_checkbox = new XoopsFormCheckBox(_MD_SEARCH_SEARCHIN, 'mids[]', $mid); + } + if (empty($modules)) { + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('hassearch', 1)); + $criteria->add(new Criteria('isactive', 1)); + if (isset($available_modules) && !empty($available_modules)) { + $criteria->add(new Criteria('mid', '(' . implode(',', $available_modules) . ')', 'IN')); + } + $module_handler = $xoops->getHandlerModule(); + $mods_checkbox->addOptionArray($module_handler->getNameList($criteria)); + } else { + /* @var $module XoopsModule */ + $module_array = array(); + foreach ($modules as $mid => $module) { + $module_array[$mid] = $module->getVar('name'); + } + $mods_checkbox->addOptionArray($module_array); + } + $this->addElement($mods_checkbox); + if ($search->getConfig('keyword_min') > 0) { + $this->addElement(new XoopsFormLabel(_MD_SEARCH_SEARCHRULE, sprintf(_MD_SEARCH_KEYIGNORE, $search->getConfig('keyword_min')))); + } + $this->addElement(new XoopsFormHidden('action', 'results')); + $this->addElement(new XoopsFormHiddenToken('id')); + $this->addElement(new XoopsFormButton('', 'submit', _MD_SEARCH, 'submit')); + return $this; + } +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/form/search.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: svn:eol-style + native Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/index.html 2012-12-16 00:34:51 UTC (rev 10399) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/search.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/search.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/search.php 2012-12-16 00:34:51 UTC (rev 10399) @@ -0,0 +1,32 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author trabis <lus...@gm...> + * @version $Id$ + */ + +defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined"); + +class Search extends Xoops_Module_Abstract +{ + /** + * Init the module + * + * @return null|void + */ + public function init() + { + $this->setDirname('search'); + } +} Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/class/search.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: svn:eol-style + native Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/icons/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/icons/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/icons/index.html 2012-12-16 00:34:51 UTC (rev 10399) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/icons/logo_large.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/icons/logo_large.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/icons/logo_small.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/icons/logo_small.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/images/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/images/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/images/index.html 2012-12-16 00:34:51 UTC (rev 10399) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/images/logo.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/images/logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/index.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/index.php 2012-12-16 00:34:51 UTC (rev 10399) @@ -0,0 +1,298 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * XOOPS global search + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU General Public License (GPL) + * @package core + * @since 2.0.0 + * @author Kazumi Ono (AKA onokazu) + * @author Taiwen Jiang <ph...@us...> + * @version $Id$ + * @todo Modularize; Both search algorithms and interface will be redesigned + */ + +include dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'mainfile.php'; + +$xoops = Xoops::getInstance(); +$search = Search::getInstance(); + +if (!$search->getConfig('enable_search')) { + header('Location: ' . XOOPS_URL . '/index.php'); + exit(); +} +$action = "search"; +if (!empty($_GET['action'])) { + $action = trim(strip_tags($_GET['action'])); +} else { + if (!empty($_POST['action'])) { + $action = trim(strip_tags($_POST['action'])); + } +} +$query = ""; +if (!empty($_GET['query'])) { + $query = trim(strip_tags($_GET['query'])); +} else { + if (!empty($_POST['query'])) { + $query = trim(strip_tags($_POST['query'])); + } +} +$andor = "AND"; +if (!empty($_GET['andor'])) { + $andor = trim(strip_tags($_GET['andor'])); +} else { + if (!empty($_POST['andor'])) { + $andor = trim(strip_tags($_POST['andor'])); + } +} +$mid = $uid = $start = 0; +if (!empty($_GET['mid'])) { + $mid = intval($_GET['mid']); +} else { + if (!empty($_POST['mid'])) { + $mid = intval($_POST['mid']); + } +} +if (!empty($_GET['uid'])) { + $uid = intval($_GET['uid']); +} else { + if (!empty($_POST['uid'])) { + $uid = intval($_POST['uid']); + } +} +if (!empty($_GET['start'])) { + $start = intval($_GET['start']); +} else { + if (!empty($_POST['start'])) { + $start = intval($_POST['start']); + } +} + +$queries = array(); +$mids = array(); + +if ($action == "results") { + if ($query == "") { + $xoops->redirect("index.php", 1, _MD_SEARCH_PLZENTER); + } +} else { + if ($action == "showall") { + if ($query == "" || empty($mid)) { + $xoops->redirect("index.php", 1, _MD_SEARCH_PLZENTER); + } + } else { + if ($action == "showallbyuser") { + if (empty($mid) || empty($uid)) { + $xoops->redirect("index.php", 1, _MD_SEARCH_PLZENTER); + } + } + } +} + +$gperm_handler = $xoops->getHandlerGroupperm(); +$available_modules = $gperm_handler->getItemIds('module_read', $search->getUserGroups()); +if ($action == 'search') { + $xoops->header(); + + /* @var $formHandler SearchForm */ + $formHandler = $search->getForm(null, 'search'); + $form = $formHandler->getSearchFrom($andor, $queries,$mids, $mid); + $form->display(); + + $xoops->footer(); +} +if ($andor != "OR" && $andor != "exact" && $andor != "AND") { + $andor = "AND"; +} +$ignored_queries = array(); // holds kewords that are shorter than allowed minmum length +$myts = MyTextSanitizer::getInstance(); +if ($action != 'showallbyuser') { + if ($andor != "exact") { + $temp_queries = preg_split('/[\s,]+/', $query); + foreach ($temp_queries as $q) { + $q = trim($q); + if (strlen($q) >= $search->getConfig('keyword_min')) { + $queries[] = $myts->addSlashes($q); + $queries_pattern[] = '~(' . $q . ')~sUi'; + } else { + $ignored_queries[] = $myts->addSlashes($q); + } + } + if (count($queries) == 0) { + $xoops->redirect('index.php', 2, sprintf(_MD_SEARCH_KEYTOOSHORT, $search->getConfig('keyword_min'))); + } + } else { + $query = trim($query); + if (strlen($query) < $search->getConfig('keyword_min')) { + $xoops->redirect('index.php', 2, sprintf(_MD_SEARCH_KEYTOOSHORT, $search->getConfig('keyword_min'))); + } + $queries = array($myts->addSlashes($query)); + $queries_pattern[] = '~(' . $myts->addSlashes($query) . ')~sUi'; + } +} + +switch ($action) { + case "results": + $module_handler = $xoops->getHandlerModule(); + $criteria = new CriteriaCompo(new Criteria('hassearch', 1)); + $criteria->add(new Criteria('isactive', 1)); + $criteria->add(new Criteria('mid', "(" . implode(',', $available_modules) . ")", 'IN')); + $modules = $module_handler->getObjectsArray($criteria, true); + $mids = isset($_REQUEST['mids']) ? $_REQUEST['mids'] : array(); + if (empty($mids) || !is_array($mids)) { + unset($mids); + $mids = array_keys($modules); + } + $xoops->header('module:search|search.html'); + $nomatch = true; + $xoops->tpl()->assign('search', true); + $xoops->tpl()->assign('queries', $queries); + $xoops->tpl()->assign('ignored_words', sprintf(_MD_SEARCH_IGNOREDWORDS, $search->getConfig('keyword_min'))); + $xoops->tpl()->assign('ignored_queries', $ignored_queries); + + $modules_result = array(); + foreach ($mids as $mid) { + $mid = intval($mid); + if (in_array($mid, $available_modules)) { + /* @var $module XoopsModule */ + $module = $modules[$mid]; + $results = $module->search($queries, $andor, 5, 0); + $count = count($results); + $mid = $module->getVar('mid'); + + $res = array(); + if (is_array($results) && $count > 0) { + $nomatch = false; + $modules_result[$mid]['name'] = $module->getVar('name'); + $modules_result[$mid]['image'] = 'modules/' . $module->getVar('dirname') . '/icons/logo_large.png'; + + $res = array(); + for ($i = 0; $i < $count; $i++) { + if (isset($results[$i]['image']) && $results[$i]['image'] != "") { + $res[$i]['image'] = 'modules/' . $module->getVar('dirname') . '/' . $results[$i]['image']; + } else { + $res[$i]['image'] = 'images/icons/posticon2.gif'; + } + if (!preg_match("/^http[s]*:\/\//i", $results[$i]['link'])) { + $res[$i]['link'] = 'modules/' . $module->getVar('dirname') . '/' . $results[$i]['link']; + } + $res[$i]['title'] = $myts->htmlspecialchars($results[$i]['title']); + $res[$i]['title_highligh'] = preg_replace( $queries_pattern, "<span class='searchHighlight'>$1</span>", $myts->htmlspecialchars($results[$i]['title'])); + if ( !empty($results[$i]['uid']) ) { + $res[$i]['uid'] = intval($results[$i]['uid']); + $res[$i]['uname'] = XoopsUser::getUnameFromId($results[$i]['uid'], true); + } + $res[$i]['time'] = !empty($results[$i]['time']) ? XoopsLocal::formatTimestamp(intval($results[$i]['time'])) : ""; + $res[$i]['content'] = empty($results[$i]['content']) ? "" : preg_replace( $queries_pattern, "<span class='searchHighlight'>$1</span>", $results[$i]['content']); + } + if ($count >= 5) { + $search_url = $search->url('index.php?query=' . urlencode(stripslashes(implode(' ', $queries)))); + $search_url .= "&mid={$mid}&action=showall&andor={$andor}"; + $modules_result[$mid]['search_url'] = htmlspecialchars($search_url); + } + } + if ( count($res) > 0 ) { + $modules_result[$mid]['result'] = $res; + } + } + unset($results); + unset($module); + } + $xoops->tpl()->assign('modules', $modules_result); + + /* @var $formHandler SearchForm */ + $formHandler = $search->getForm(null, 'search'); + $form = $formHandler->getSearchFrom($andor, $queries,$mids, $mid); + $form->display(); + break; + + case "showall": + case 'showallbyuser': + $xoops->header('module:search|search.html'); + $xoops->tpl()->assign('search', true); + $xoops->tpl()->assign('queries', $queries); + $xoops->tpl()->assign('ignored_words', sprintf(_MD_SEARCH_IGNOREDWORDS, $search->getConfig('keyword_min'))); + $xoops->tpl()->assign('ignored_queries', $ignored_queries); + + $module_handler = $xoops->getHandlerModule(); + $module = $module_handler->getById($mid); + $results = $module->search($queries, $andor, 20, $start, $uid); + + $modules_result[$mid]['name'] = $module->getVar('name'); + $modules_result[$mid]['image'] = 'modules/' . $module->getVar('dirname') . '/icons/logo_large.png'; + + $count = count($results); + if (is_array($results) && $count > 0) { + $next_results = $module->search($queries, $andor, 1, $start + 20, $uid); + $next_count = count($next_results); + $has_next = false; + if (is_array($next_results) && $next_count == 1) { + $has_next = true; + } + $xoops->tpl()->assign('sr_showing', sprintf(_MD_SEARCH_SHOWING, $start + 1, $start + $count)); + $res = array(); + for ($i = 0; $i < $count; $i++) { + if (isset($results[$i]['image']) && $results[$i]['image'] != "") { + $res[$i]['image'] = 'modules/' . $module->getVar('dirname') . '/' . $results[$i]['image']; + } else { + $res[$i]['image'] = 'images/icons/posticon2.gif'; + } + if (!preg_match("/^http[s]*:\/\//i", $results[$i]['link'])) { + $res[$i]['link'] = 'modules/' . $module->getVar('dirname') . '/' . $results[$i]['link']; + } + if (!preg_match("/^http[s]*:\/\//i", $results[$i]['link'])) { + $res[$i]['link'] = 'modules/' . $module->getVar('dirname') . '/' . $results[$i]['link']; + } + $res[$i]['title'] = $myts->htmlspecialchars($results[$i]['title']); + if (isset($queries_pattern)) { + $res[$i]['title_highligh'] = preg_replace( $queries_pattern, "<span class='searchHighlight'>$1</span>", $myts->htmlspecialchars($results[$i]['title'])); + } else { + $res[$i]['title_highligh'] = $myts->htmlspecialchars($results[$i]['title']); + } + if ( !empty($results[$i]['uid']) ) { + $res[$i]['uid'] = @intval($results[$i]['uid']); + $res[$i]['uname'] = XoopsUser::getUnameFromId($results[$i]['uid'], true); + } + $res[$i]['time'] = !empty($results[$i]['time']) ? " (" . XoopsLocal::formatTimestamp(intval($results[$i]['time'])) . ")" : ""; + $res[$i]['content'] = empty($results[$i]['content']) ? "" : preg_replace( $queries_pattern, "<span class='searchHighlight'>$1</span>", $results[$i]['content']); + } + if (count($res) > 0) { + $modules_result[$mid]['result'] = $res; + } + + $search_url = $search->url('index.php?query=' . urlencode(stripslashes(implode(' ', $queries)))); + $search_url .= "&mid={$mid}&action={$action}&andor={$andor}"; + if ($action == 'showallbyuser') { + $search_url .= "&uid={$uid}"; + } + if ($start > 0) { + $prev = $start - 20; + $search_url_prev = $search_url . "&start={$prev}"; + $modules_result[$mid]['prev'] = htmlspecialchars($search_url_prev); + + } + if (false != $has_next) { + $next = $start + 20; + $search_url_next = $search_url . "&start={$next}"; + $modules_result[$mid]['next'] = htmlspecialchars($search_url_next); + } + $xoops->tpl()->assign('modules', $modules_result); + } + + /* @var $formHandler SearchForm */ + $formHandler = $search->getForm(null, 'search'); + $form = $formHandler->getSearchFrom($andor, $queries,$mids, $mid); + $form->display(); + break; +} +$xoops->footer(); \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/index.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: svn:eol-style + native Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/language/english/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/language/english/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/language/english/index.html 2012-12-16 00:34:51 UTC (rev 10399) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/language/english/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/language/english/main.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/language/english/main.php 2012-12-16 00:34:51 UTC (rev 10399) @@ -0,0 +1,39 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author trabis <lus...@gm...> + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +define('_MD_SEARCH', 'Search'); +define('_MD_SEARCH_PLZENTER', 'Please enter all required data!'); +define('_MD_SEARCH_SEARCHRESULTS', 'Search Results'); +define('_MD_SEARCH_NOMATCH', 'No Match Found for your Query'); +define('_MD_SEARCH_FOUND', 'Found <strong>%s</strong> match(es)'); +define('_MD_SEARCH_SHOWING', '(Showing %d - %d)'); +define('_MD_SEARCH_ANY', 'Any (OR)'); +define('_MD_SEARCH_ALL', 'All (AND)'); +define('_MD_SEARCH_EXACT', 'Exact Match'); +define('_MD_SEARCH_SHOWALLR', 'Show all results'); +define('_MD_SEARCH_NEXT', 'Next >>'); +define('_MD_SEARCH_PREVIOUS', '<< Previous'); +define('_MD_SEARCH_KEYWORDS', 'Keyword(s)'); +define('_MD_SEARCH_TYPE', 'Type'); +define('_MD_SEARCH_SEARCHIN', 'Search in'); +define('_MD_SEARCH_KEYTOOSHORT', 'Keywords must be at least <strong>%s</strong> characters long'); +define('_MD_SEARCH_KEYIGNORE', 'Keywords shorter than <strong>%s</strong> characters will be ignored'); +define('_MD_SEARCH_SEARCHRULE', 'Search Rule'); +define('_MD_SEARCH_IGNOREDWORDS', 'The following words are shorter than allowed minmum length (%u chars) and were not included in your search:'); Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/language/english/main.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: svn:eol-style + native Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/language/english/modinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/language/english/modinfo.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/language/english/modinfo.php 2012-12-16 00:34:51 UTC (rev 10399) @@ -0,0 +1,28 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author trabis <lus...@gm...> + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +define('_MI_SEARCH_NAME', 'Search'); +define('_MI_SEARCH_DSC', 'Provides search ability for modules'); + +define("_MI_SEARCH_DOSEARCH", "Enable global searches?"); +define("_MI_SEARCH_DOSEARCHDSC", "Allow searching for posts/items within your site."); +define("_MI_SEARCH_MINSEARCH", "Minimum keyword length"); +define("_MI_SEARCH_MINSEARCHDSC", "Enter the minimum keyword length that users are required to enter to perform search"); + Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/language/english/modinfo.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: svn:eol-style + native Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/language/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/language/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/language/index.html 2012-12-16 00:34:51 UTC (rev 10399) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/preloads/core.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/preloads/core.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/preloads/core.php 2012-12-16 00:34:51 UTC (rev 10399) @@ -0,0 +1,38 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package publisher + * @author trabis <lus...@gm...> + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +/** + * Search core preloads + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author trabis <lus...@gm...> + */ +class SearchCorePreload extends XoopsPreloadItem +{ + static function eventCoreIncludeCommonEnd($args) + { + $path = dirname(dirname(__FILE__)); + XoopsLoad::addMap(array( + 'search' => $path . '/class/search.php', + )); + } +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/preloads/core.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: svn:eol-style + native Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/preloads/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/preloads/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/preloads/index.html 2012-12-16 00:34:51 UTC (rev 10399) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/templates/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/templates/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/templates/index.html 2012-12-16 00:34:51 UTC (rev 10399) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/templates/search.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/templates/search.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/templates/search.html 2012-12-16 00:34:51 UTC (rev 10399) @@ -0,0 +1,81 @@ +<fieldset> + <{if $search}> + <legend><{$smarty.const._MD_SEARCH_SEARCHRESULTS}></legend> + <div> + <{$smarty.const._MD_SEARCH_KEYWORDS}> : + <span class="bold"> + <{foreachq from=$queries item=query name=foo}> + <{$query}><{if !$smarty.foreach.foo.last}>,<{/if}> + <{/foreach}> + </span> + <{if $sr_showing}> + <br /> + <{$sr_showing}> + <{/if}> + </div> + <{if count($ignored_queries) != 0}> + <div> + <{$ignored_words}> : + <span class="bold"> + <{foreachq from=$ignored_queries item=query name=foo}> + <{$query}><{if !$smarty.foreach.foo.last}>,<{/if}> + <{/foreach}> + </span> + </div> + <{/if}> + <{/if}> + + <{if count($modules) > 0}> + <{foreachq from=$modules item=module name=foo}> + <div class="searchModule"> + <div class="searchIcon floatleft"> + <img src="<{$module.image}>" alt="<{$module.name}>"> + </div> + <div class="searchTitle floatleft"> + <{$module.name}> + </div> + <{if $module.search_url}> + <div class="floatright"> + <a href="<{$module.search_url}>" title="<{$smarty.const._MD_SEARCH_SHOWALLR}>"><{$smarty.const._MD_SEARCH_SHOWALLR}></a> + </div> + <{/if}> + <div class="clear"></div> + + <{foreach from=$module.result item=result}> + <div class="searchItem"> + <div class="bold"><a href="<{$result.link}>" title="<{$result.title}>"><{$result.title_highligh}></a></div> + <div><{$result.content}></div> + <span class='x-small'> + <{if $result.uid}> + <a href="<{$xoops_url}>/userinfo.php?uid=<{$result.uid}>" title="<{$result.uname}>"><{$result.uname}></a> + <{/if}> + <{if $result.time}> + (<{$result.time}>) + <{/if}> + </span> + </div> + <{/foreach}> + </div> + + <!-- prev / next --> + <{if $module.prev || $module.next}> + <div> + <{if $module.prev}> + <div class="floatleft"> + <a href="<{$module.prev}>" title="<{$smarty.const._MD_SEARCH_PREVIOUS}>"><{$smarty.const._MD_SEARCH_PREVIOUS}></a> + </div> + <{/if}> + <{if $module.next}> + <div class="floatright"> + <a href="<{$module.next}>" title="<{$smarty.const._MD_SEARCH_NEXT}>"><{$smarty.const._MD_SEARCH_NEXT}></a> + </div> + <{/if}> + </div> + <{/if}> + <{/foreach}> + <{else}> + <div class="searchModule bold"> + <{$smarty.const._MD_SEARCH_NOMATCH}> + </div> + <{/if}> +</fieldset> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/xoops_version.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/xoops_version.php 2012-12-16 00:34:51 UTC (rev 10399) @@ -0,0 +1,88 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package logger + * @author trabis <lus...@gm...> + * @version $Id$ + */ + +$modversion = array(); +$modversion['name'] = _MI_SEARCH_NAME; +$modversion['description'] = _MI_SEARCH_DSC; +$modversion['version'] = 0.1; +$modversion['author'] = 'Trabis'; +$modversion['nickname'] = 'trabis'; +$modversion['credits'] = 'The XOOPS Project'; +$modversion['license'] = 'GNU GPL 2.0'; +$modversion['license_url'] = 'www.gnu.org/licenses/gpl-2.0.html/'; +$modversion['official'] = 1; +//$modversion['help'] = 'page=help'; +$modversion['image'] = 'images/logo.png'; +$modversion['dirname'] = 'search'; + +//about +$modversion['release_date'] = '2012/11/25'; +$modversion['module_website_url'] = 'http://www.xoops.org/'; +$modversion['module_website_name'] = 'XOOPS'; +$modversion['module_status'] = 'ALPHA 1'; +$modversion['min_php'] = '5.2'; +$modversion['min_xoops'] = '2.6.0'; +$modversion['min_db'] = array('mysql' => '5.0.7', 'mysqli' => '5.0.7'); + +// paypal +$modversion['paypal'] = array(); +$modversion['paypal']['business'] = 'lus...@gm...'; +$modversion['paypal']['item_name'] = ''; +$modversion['paypal']['amount'] = 0; +$modversion['paypal']['currency_code'] = 'EUR'; + +// Admin menu +// Set to 1 if you want to display menu generated by system module +$modversion['system_menu'] = 1; + +/* + Manage extension + */ +$modversion['extension'] = 0; + +// Admin things +$modversion['hasAdmin'] = 0; + +// Menu +$modversion['hasMain'] = 1; + +// Search +$modversion['hasSearch'] = 0; + +/* + Blocks +*/ +$modversion['blocks'] = array(); + +// Preferences +$i = 0; +$modversion['config'][$i]['name'] = 'enable_search'; +$modversion['config'][$i]['title'] = '_MI_SEARCH_DOSEARCH'; +$modversion['config'][$i]['description'] = '_MI_SEARCH_DOSEARCHDSC'; +$modversion['config'][$i]['formtype'] = 'yesno'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['default'] = 1; + +$i++; +$modversion['config'][$i]['name'] = 'keyword_min'; +$modversion['config'][$i]['title'] = '_MI_SEARCH_MINSEARCH'; +$modversion['config'][$i]['description'] = '_MI_SEARCH_MINSEARCHDSC'; +$modversion['config'][$i]['formtype'] = 'textbox'; +$modversion['config'][$i]['valuetype'] = 'int'; +$modversion['config'][$i]['default'] = 5; \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/search/xoops_version.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: svn:eol-style + native |
From: <tr...@us...> - 2012-12-16 00:31:57
|
Revision: 10398 http://sourceforge.net/p/xoops/svn/10398 Author: trabis Date: 2012-12-16 00:31:55 +0000 (Sun, 16 Dec 2012) Log Message: ----------- Legacy XoopsModuleConfig was being overwritten Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php 2012-12-15 22:45:23 UTC (rev 10397) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php 2012-12-16 00:31:55 UTC (rev 10398) @@ -1625,7 +1625,7 @@ $this->_moduleConfigs[$dirname] = $this->getHandlerConfig()->getConfigsByCat(0, $module->getVar('mid')); } if ($this->isModule()) { - $this->moduleConfig =& $this->_moduleConfigs[$module->getVar('dirname')]; + $this->moduleConfig =& $this->_moduleConfigs[$this->module->getVar('dirname')]; } return $this->_moduleConfigs[$dirname]; } |