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: <du...@us...> - 2012-11-07 16:18:38
|
Revision: 10249 http://sourceforge.net/p/xoops/svn/10249 Author: dugris Date: 2012-11-07 16:18:31 +0000 (Wed, 07 Nov 2012) Log Message: ----------- Add help Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/css/help.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/help/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/help/help.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/help/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/help.php Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/css/help.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/css/help.css (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/css/help.css 2012-11-07 16:18:31 UTC (rev 10249) @@ -0,0 +1,45 @@ +code { + display: block; + width: 90%; + max-height: 400px; + overflow: auto; + padding: 2em; + font-weight: bold; + font-size: 1em; +} +.system-help { + min-height: 650px; +} +.help { + height: 100px; + display: block; +} +.help-item { + margin-bottom: 20px; + display: blockj; +} +.help-title { + width: 80%; + margin-bottom: 10px; + font-size: 1.2em; + font-weight: bold; +} +.help-paypal { + vertical-align: top; + margin: 0; + padding: 0; +} + +.help-submenu { + margin: 10px; + padding: 10px; + background-color: #F7F7F9; + width: 250px; + position: absolute; + right: 50px; +} + +.help-description { + width: 100%; + +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/help ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/help/help.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/help/help.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/help/help.html 2012-11-07 16:18:31 UTC (rev 10249) @@ -0,0 +1,93 @@ +<link rel="stylesheet" type="text/css" media="screen" href="<{xoAppUrl modules/xlanguage/css/help.css}>" /> + +<div class="help txtcenter"> + <div class="help-submenu floatright txtleft"> + <ul> + <li><a href="#description" title=""><{$smarty.const._HELP_DESCRIPTION_TITLE}></a></li> + <li><a href="#developer" title=""><{$smarty.const._HELP_DEVELOPER_TITLE}></a></li> + <li><a href="#install" title=""><{$smarty.const._HELP_INSTALL_TITLE}></a></li> +<!-- + <li><a href="#uninstall" title=""><{$smarty.const._HELP_UNINSTALL_TITLE}></a></li> +--> + <li><a href="#tutorial" title=""><{$smarty.const._HELP_TUTORIAL_TITLE}></a></li> + </ul> + </div> + + <div class="floatleft"> + <img src="<{$xoops_url}>/modules/<{$module->getVar('dirname')}>/<{$module->getInfo('image')}>" alt="<{$module->getVar('name')}>" title="<{$module->getVar('name')}>" /> + </div> + + <div class="help-title floaleft"> + <h2><{$module->getVar('name')}></h2> + <{if $module->getInfo('paypal')}> + <form class="help-paypal" id="paypal-form" name="_xclick" action="https://www.paypal.com/fr/cgi-bin/webscr" method="post"> + <input type="hidden" name="cmd" value="_xclick"> + <{foreachq from=$module->getInfo('paypal') item=value key=key}> + <{if is_numeric($value)}> + <input type="hidden" name="<{$key}>" value=<{$value}>> + <{else}> + <input type="hidden" name="<{$key}>" value="<{$value}>"> + <{/if}> + <{/foreach}> + <img src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" onclick="$('#paypal-form').submit()" alt="PayPal - The safer, easier way to pay online!" /> + </form> + <{/if}> + </div> +</div> +<div class="clear"></div> + +<a name="description"></a> +<div class="help-item"> + <div class="help-title"> + <{$smarty.const._HELP_DESCRIPTION_TITLE}> + </div> + <div> + <{$module->getInfo('description')}> + <br /> + Version : <{$module->getInfo('version')}> <{$module->getInfo('module_status')}> (<{$module->getInfo('release_date')}>)</div> + </div> +</div> + +<a name="Developer"></a> +<div class="help-item"> + <div class="help-title"> + <{$smarty.const._HELP_DEVELOPER_TITLE}> + </div> + <{if $module->getInfo('module_website_url')}> + <div class="spacer marg5"> + <a href="http://<{$module->getInfo('module_website_url')}>" rel="external"><{$module->getInfo('module_website_name')}></a> + </div> + <{/if}> +</div> + +<a name="install"></a> +<div class="help-item"> + <div class="help-title"> + <{$smarty.const._HELP_INSTALL_TITLE}> + </div> + <div> + <{$smarty.const._HELP_INSTALL_CONTENT}> + </div> +</div> + +<!-- +<a name="uninstall"></a> +<div class="help-item"> + <div class="help-title"> + <{$smarty.const._HELP_UNINSTALL_TITLE}> + </div> + <div> + <{$smarty.const._HELP_UNINSTALL_CONTENT}> + </div> +</div> +--> + +<a name="tutorial"></a> +<div class="help-item"> + <div class="help-title"> + <{$smarty.const._HELP_TUTORIAL_TITLE}> + </div> + <div> + <{$smarty.const._HELP_TUTORIAL_CONTENT}> + </div> +</div> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/help/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/help/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/help/index.html 2012-11-07 16:18:31 UTC (rev 10249) @@ -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/xlanguage/language/english/help.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/help.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/help.php 2012-11-07 16:18:31 UTC (rev 10249) @@ -0,0 +1,39 @@ +<?php +/** + * Xoocontact 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 GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xoocontact + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +define("_HELP_DESCRIPTION_TITLE", "Description"); +define("_HELP_DEVELOPER_TITLE", "Developer"); + +define("_HELP_INSTALL_TITLE", "Install"); +define("_HELP_INSTALL_CONTENT", " +Extra, or non-core, modules are usually downloadable as compressed files (zip, tar). Always check if a text file with upload instructions is included in the downloaded package. + <ol> + <li> Unzip files in local computer.</li> + <li>FTP/upload all files to appropriate folders in your website directory. This is usually the /modules folder under the Xoops root directory, where all the other modules are found. However, some modules have extra files that need to be uploaded to other folders such as the /include and the /class folders.</li> + <li>After upload, go to your Modules Administration Page and check if the new module is included in the uninstalled modules table.</li> + <li>Follow the steps described above for installing core modules from the Modules Administration page.</li> + </ol> +"); + +define("_HELP_UNINSTALL_TITLE", "Uninstall"); +define("_HELP_UNINSTALL_CONTENT", ""); + +define("_HELP_TUTORIAL_TITLE", "Tutorial"); +define("_HELP_TUTORIAL_CONTENT", "Coming soon"); +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/help.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL |
From: <du...@us...> - 2012-11-07 16:17:58
|
Revision: 10248 http://sourceforge.net/p/xoops/svn/10248 Author: dugris Date: 2012-11-07 16:17:53 +0000 (Wed, 07 Nov 2012) Log Message: ----------- Fix : help Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/help/help.html Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/css/help.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/help.php Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/css/help.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/css/help.css (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/css/help.css 2012-11-07 16:17:53 UTC (rev 10248) @@ -0,0 +1,45 @@ +code { + display: block; + width: 90%; + max-height: 400px; + overflow: auto; + padding: 2em; + font-weight: bold; + font-size: 1em; +} +.system-help { + min-height: 650px; +} +.help { + height: 100px; + display: block; +} +.help-item { + margin-bottom: 20px; + display: blockj; +} +.help-title { + width: 80%; + margin-bottom: 10px; + font-size: 1.2em; + font-weight: bold; +} +.help-paypal { + vertical-align: top; + margin: 0; + padding: 0; +} + +.help-submenu { + margin: 10px; + padding: 10px; + background-color: #F7F7F9; + width: 250px; + position: absolute; + right: 50px; +} + +.help-description { + width: 100%; + +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/help/help.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/help/help.html 2012-11-07 15:31:24 UTC (rev 10247) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/help/help.html 2012-11-07 16:17:53 UTC (rev 10248) @@ -0,0 +1,93 @@ +<link rel="stylesheet" type="text/css" media="screen" href="<{xoAppUrl modules/xcaptcha/css/help.css}>" /> + +<div class="help txtcenter"> + <div class="help-submenu floatright txtleft"> + <ul> + <li><a href="#description" title=""><{$smarty.const._HELP_DESCRIPTION_TITLE}></a></li> + <li><a href="#developer" title=""><{$smarty.const._HELP_DEVELOPER_TITLE}></a></li> + <li><a href="#install" title=""><{$smarty.const._HELP_INSTALL_TITLE}></a></li> +<!-- + <li><a href="#uninstall" title=""><{$smarty.const._HELP_UNINSTALL_TITLE}></a></li> +--> + <li><a href="#tutorial" title=""><{$smarty.const._HELP_TUTORIAL_TITLE}></a></li> + </ul> + </div> + + <div class="floatleft"> + <img src="<{$xoops_url}>/modules/<{$module->getVar('dirname')}>/<{$module->getInfo('image')}>" alt="<{$module->getVar('name')}>" title="<{$module->getVar('name')}>" /> + </div> + + <div class="help-title floaleft"> + <h2><{$module->getVar('name')}></h2> + <{if $module->getInfo('paypal')}> + <form class="help-paypal" id="paypal-form" name="_xclick" action="https://www.paypal.com/fr/cgi-bin/webscr" method="post"> + <input type="hidden" name="cmd" value="_xclick"> + <{foreachq from=$module->getInfo('paypal') item=value key=key}> + <{if is_numeric($value)}> + <input type="hidden" name="<{$key}>" value=<{$value}>> + <{else}> + <input type="hidden" name="<{$key}>" value="<{$value}>"> + <{/if}> + <{/foreach}> + <img src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" onclick="$('#paypal-form').submit()" alt="PayPal - The safer, easier way to pay online!" /> + </form> + <{/if}> + </div> +</div> +<div class="clear"></div> + +<a name="description"></a> +<div class="help-item"> + <div class="help-title"> + <{$smarty.const._HELP_DESCRIPTION_TITLE}> + </div> + <div> + <{$module->getInfo('description')}> + <br /> + Version : <{$module->getInfo('version')}> <{$module->getInfo('module_status')}> (<{$module->getInfo('release_date')}>)</div> + </div> +</div> + +<a name="Developer"></a> +<div class="help-item"> + <div class="help-title"> + <{$smarty.const._HELP_DEVELOPER_TITLE}> + </div> + <{if $module->getInfo('module_website_url')}> + <div class="spacer marg5"> + <a href="http://<{$module->getInfo('module_website_url')}>" rel="external"><{$module->getInfo('module_website_name')}></a> + </div> + <{/if}> +</div> + +<a name="install"></a> +<div class="help-item"> + <div class="help-title"> + <{$smarty.const._HELP_INSTALL_TITLE}> + </div> + <div> + <{$smarty.const._HELP_INSTALL_CONTENT}> + </div> +</div> + +<!-- +<a name="uninstall"></a> +<div class="help-item"> + <div class="help-title"> + <{$smarty.const._HELP_UNINSTALL_TITLE}> + </div> + <div> + <{$smarty.const._HELP_UNINSTALL_CONTENT}> + </div> +</div> +--> + +<a name="tutorial"></a> +<div class="help-item"> + <div class="help-title"> + <{$smarty.const._HELP_TUTORIAL_TITLE}> + </div> + <div> + <{$smarty.const._HELP_TUTORIAL_CONTENT}> + </div> +</div> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/help.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/help.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/help.php 2012-11-07 16:17:53 UTC (rev 10248) @@ -0,0 +1,39 @@ +<?php +/** + * Xoocontact 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 GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xoocontact + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +define("_HELP_DESCRIPTION_TITLE", "Description"); +define("_HELP_DEVELOPER_TITLE", "Developer"); + +define("_HELP_INSTALL_TITLE", "Install"); +define("_HELP_INSTALL_CONTENT", " +Extra, or non-core, modules are usually downloadable as compressed files (zip, tar). Always check if a text file with upload instructions is included in the downloaded package. + <ol> + <li> Unzip files in local computer.</li> + <li>FTP/upload all files to appropriate folders in your website directory. This is usually the /modules folder under the Xoops root directory, where all the other modules are found. However, some modules have extra files that need to be uploaded to other folders such as the /include and the /class folders.</li> + <li>After upload, go to your Modules Administration Page and check if the new module is included in the uninstalled modules table.</li> + <li>Follow the steps described above for installing core modules from the Modules Administration page.</li> + </ol> +"); + +define("_HELP_UNINSTALL_TITLE", "Uninstall"); +define("_HELP_UNINSTALL_CONTENT", ""); + +define("_HELP_TUTORIAL_TITLE", "Tutorial"); +define("_HELP_TUTORIAL_CONTENT", "Coming soon"); +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/help.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL |
From: <du...@us...> - 2012-11-07 15:31:27
|
Revision: 10247 http://sourceforge.net/p/xoops/svn/10247 Author: dugris Date: 2012-11-07 15:31:24 +0000 (Wed, 07 Nov 2012) Log Message: ----------- Add module object for help.php Add loadlanguage for help.php Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php 2012-11-07 12:51:02 UTC (rev 10246) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php 2012-11-07 15:31:24 UTC (rev 10247) @@ -73,6 +73,8 @@ unset($help); } + $xoops->loadLanguage('help', $module->getVar('dirname') ); + $xoops->tpl->assign('module', $module); $xoops->tpl->assign('modname', $module->getVar('name')); $xoops->tpl->assign('moddirname', $module->getVar('dirname', 'e')); |
From: <ir...@us...> - 2012-11-07 12:51:05
|
Revision: 10246 http://sourceforge.net/p/xoops/svn/10246 Author: irmtfan Date: 2012-11-07 12:51:02 +0000 (Wed, 07 Nov 2012) Log Message: ----------- bug fix: in XOOPSCORE/search.php $xoopsModuleConfig and $xoopsModule is not set Modified Paths: -------------- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt XoopsModules/newbb/branches/irmtfan/newbb/include/search.inc.php Modified: XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt 2012-11-07 00:33:42 UTC (rev 10245) +++ XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt 2012-11-07 12:51:02 UTC (rev 10246) @@ -1,3 +1,8 @@ +date 2012-11-07 +=================================== +1- bug fix: in XOOPSCORE/search.php $xoopsModuleConfig and $xoopsModule is not set +in newbb/include/search.inc.php + date 2012-11-06 =================================== 1- bug fix: in view all topic page: a typo "all" instead of all when the status is not set Modified: XoopsModules/newbb/branches/irmtfan/newbb/include/search.inc.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/include/search.inc.php 2012-11-07 00:33:42 UTC (rev 10245) +++ XoopsModules/newbb/branches/irmtfan/newbb/include/search.inc.php 2012-11-07 12:51:02 UTC (rev 10246) @@ -13,11 +13,19 @@ if (!defined('XOOPS_ROOT_PATH')) { exit(); } +include_once XOOPS_ROOT_PATH . "/modules/newbb/include/functions.ini.php"; function newbb_search($queryarray, $andor, $limit, $offset, $userid, $forums = 0, $sortby = 0, $searchin = "both", $criteriaExtra = "") { global $myts; - + // irmtfan - in XOOPSCORE/search.php $xoopsModuleConfig is not set + if ( !isset($GLOBALS["xoopsModuleConfig"]) ) { + $GLOBALS["xoopsModuleConfig"] = newbb_load_config(); + } + // irmtfan - in XOOPSCORE/search.php $xoopsModule is not set + if ( !is_object($GLOBALS["xoopsModule"]) && is_object($GLOBALS["module"]) && $GLOBALS["module"]->getVar("dirname") == "newbb" ) { + $GLOBALS["xoopsModule"] = $GLOBALS["module"]; + } $forum_handler = xoops_getmodulehandler('forum', 'newbb'); $valid_forums = $forum_handler->getIdsByValues($forums); // can we use view permission? $forum_handler->getIdsByValues($forums, "view") |
From: <du...@us...> - 2012-11-07 00:33:46
|
Revision: 10245 http://sourceforge.net/p/xoops/svn/10245 Author: dugris Date: 2012-11-07 00:33:42 +0000 (Wed, 07 Nov 2012) Log Message: ----------- fix : preload for xlanguage and common modules Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/xlanguage.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/preloads/core.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/xoops_version.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/templates/blocks/index.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-11-06 07:25:31 UTC (rev 10244) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-11-07 00:33:42 UTC (rev 10245) @@ -411,8 +411,8 @@ $this->preload->triggerEvent('core.header.addmeta'); - // load xlanguage block - $this->preload->triggerEvent('core.language.block'); + // common preload : xlanguage block, ... + $this->preload->triggerEvent('core.header.common'); // Temporary solution for start page redirection if (defined("XOOPS_STARTPAGE_REDIRECTED")) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/xlanguage.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/xlanguage.php 2012-11-06 07:25:31 UTC (rev 10244) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/xlanguage.php 2012-11-07 00:33:42 UTC (rev 10245) @@ -210,7 +210,7 @@ global $xoops; $xoops->tpl->assign('theme', $xoops->getModuleConfig('theme', 'xlanguage') ); $xoops->tpl->assign('languages', $this->getAllLanguage(false) ); - return $xoops->tpl->fetch('db:xlanguage_admin_list.html'); + return $xoops->tpl->fetch('admin:xlanguage|xlanguage_admin_list.html'); } } ?> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/preloads/core.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/preloads/core.php 2012-11-06 07:25:31 UTC (rev 10244) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/preloads/core.php 2012-11-07 00:33:42 UTC (rev 10245) @@ -36,7 +36,7 @@ } } - static public function eventCoreLanguageBlock($args) + static public function eventCoreHeaderCommon($args) { include_once dirname(dirname(__FILE__)) . '/include/vars.php'; include_once dirname(dirname(__FILE__)) . '/include/functions.php'; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/templates/blocks/index.html =================================================================== Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/xoops_version.php 2012-11-06 07:25:31 UTC (rev 10244) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/xoops_version.php 2012-11-07 00:33:42 UTC (rev 10245) @@ -98,12 +98,6 @@ $modversion['templates'][$cpt]['file'] = 'blocks/xlanguage_block_bootstrap.html'; $modversion['templates'][$cpt]['description'] = ''; -// Admin templates -$cpt++; -$modversion['templates'][$cpt]['file'] = 'xlanguage_admin_list.html'; -$modversion['templates'][$cpt]['description'] = ''; -$modversion['templates'][$cpt]['type'] = 'admin'; - // Config XoopsLoad::load('xoopslists'); |
From: <txm...@us...> - 2012-11-06 09:29:20
|
Revision: 10198 http://xoops.svn.sourceforge.net/xoops/?rev=10198&view=rev Author: txmodxoops Date: 2012-11-06 09:29:06 +0000 (Tue, 06 Nov 2012) Log Message: ----------- Added in media jquery.mobile.js Framework Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/plugins/jquery.mobile.js Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/plugins/jquery.mobile.js =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/plugins/jquery.mobile.js (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/plugins/jquery.mobile.js 2012-11-06 09:29:06 UTC (rev 10198) @@ -0,0 +1,284 @@ +/* + * jQuery Mobile Framework Plugin by TXMod Xoops (http://www.txmodxoops.org) + * version: 1.00 (06-Nov-2012) + * @requires jQuery v1.7.1 or later + * + * Examples and documentation at: http://jquerymobile.com/ + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + */ + +(function($) { + $.widget('mobile.tabbar', $.mobile.navbar, { + _create: function() { + // Set the theme before we call the prototype, which will + // ensure buttonMarkup() correctly grabs the inheritied theme. + // We default to the "a" swatch if none is found + var theme = this.element.jqmData('theme') || "a"; + this.element.addClass('ui-footer ui-footer-fixed ui-bar-' + theme); + + // Make sure the page has padding added to it to account for the fixed bar + this.element.closest('[data-role="page"]').addClass('ui-page-footer-fixed'); + + + // Call the NavBar _create prototype + $.mobile.navbar.prototype._create.call(this); + }, + + // Set the active URL for the Tab Bar, and highlight that button on the bar + setActive: function(url) { + // Sometimes the active state isn't properly cleared, so we reset it ourselves + this.element.find('a').removeClass('ui-btn-active ui-state-persist'); + this.element.find('a[href="' + url + '"]').addClass('ui-btn-active ui-state-persist'); + } + }); + + $(document).bind('pagecreate create', function(e) { + return $(e.target).find(":jqmData(role='tabbar')").tabbar(); + }); + + $(":jqmData(role='page')").live('pageshow', function(e) { + // Grab the id of the page that's showing, and select it on the Tab Bar on the page + var tabBar, id = $(e.target).attr('id'); + + tabBar = $.mobile.activePage.find(':jqmData(role="tabbar")'); + if(tabBar.length) { + tabBar.tabbar('setActive', '#' + id); + } + }); + +var attachEvents = function() { + var hoverDelay = $.mobile.buttonMarkup.hoverDelay, hov, foc; + + $( document ).bind( { + "vmousedown vmousecancel vmouseup vmouseover vmouseout focus blur scrollstart": function( event ) { + var theme, + $btn = $( closestEnabledButton( event.target ) ), + evt = event.type; + + if ( $btn.length ) { + theme = $btn.attr( "data-" + $.mobile.ns + "theme" ); + + if ( evt === "vmousedown" ) { + if ( $.support.touch ) { + hov = setTimeout(function() { + $btn.removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-down-" + theme ); + }, hoverDelay ); + } else { + $btn.removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-down-" + theme ); + } + } else if ( evt === "vmousecancel" || evt === "vmouseup" ) { + $btn.removeClass( "ui-btn-down-" + theme ).addClass( "ui-btn-up-" + theme ); + } else if ( evt === "vmouseover" || evt === "focus" ) { + if ( $.support.touch ) { + foc = setTimeout(function() { + $btn.removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-hover-" + theme ); + }, hoverDelay ); + } else { + $btn.removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-hover-" + theme ); + } + } else if ( evt === "vmouseout" || evt === "blur" || evt === "scrollstart" ) { + $btn.removeClass( "ui-btn-hover-" + theme + " ui-btn-down-" + theme ).addClass( "ui-btn-up-" + theme ); + if ( hov ) { + clearTimeout( hov ); + } + if ( foc ) { + clearTimeout( foc ); + } + } + } + }, + "focusin focus": function( event ){ + $( closestEnabledButton( event.target ) ).addClass( $.mobile.focusClass ); + }, + "focusout blur": function( event ){ + $( closestEnabledButton( event.target ) ).removeClass( $.mobile.focusClass ); + } + }); + + attachEvents = null; +}; + +$.fn.buttonMarkup = function( options ) { + var $workingSet = this; + + // Enforce options to be of type string + options = ( options && ( $.type( options ) == "object" ) )? options : {}; + for ( var i = 0; i < $workingSet.length; i++ ) { + var el = $workingSet.eq( i ), + e = el[ 0 ], + o = $.extend( {}, $.fn.buttonMarkup.defaults, { + icon: options.icon !== undefined ? options.icon : el.jqmData( "icon" ), + iconpos: options.iconpos !== undefined ? options.iconpos : el.jqmData( "iconpos" ), + theme: options.theme !== undefined ? options.theme : el.jqmData( "theme" ) || $.mobile.getInheritedTheme( el, "c" ), + inline: options.inline !== undefined ? options.inline : el.jqmData( "inline" ), + shadow: options.shadow !== undefined ? options.shadow : el.jqmData( "shadow" ), + corners: options.corners !== undefined ? options.corners : el.jqmData( "corners" ), + iconshadow: options.iconshadow !== undefined ? options.iconshadow : el.jqmData( "iconshadow" ), + iconsize: options.iconsize !== undefined ? options.iconsize : el.jqmData( "iconsize" ), + mini: options.mini !== undefined ? options.mini : el.jqmData( "mini" ) + }, options ), + + // Classes Defined + innerClass = "ui-btn-inner", + textClass = "ui-btn-text", + buttonClass, iconClass, + // Button inner markup + buttonInner, + buttonText, + buttonIcon, + buttonElements; + + $.each(o, function(key, value) { + e.setAttribute( "data-" + $.mobile.ns + key, value ); + el.jqmData(key, value); + }); + + // Check if this element is already enhanced + buttonElements = $.data(((e.tagName === "INPUT" || e.tagName === "BUTTON") ? e.parentNode : e), "buttonElements"); + + if (buttonElements) { + e = buttonElements.outer; + el = $(e); + buttonInner = buttonElements.inner; + buttonText = buttonElements.text; + // We will recreate this icon below + $(buttonElements.icon).remove(); + buttonElements.icon = null; + } + else { + buttonInner = document.createElement( o.wrapperEls ); + buttonText = document.createElement( o.wrapperEls ); + } + buttonIcon = o.icon ? document.createElement( "span" ) : null; + + if ( attachEvents && !buttonElements) { + attachEvents(); + } + + // if not, try to find closest theme container + if ( !o.theme ) { + o.theme = $.mobile.getInheritedTheme( el, "c" ); + } + + buttonClass = "ui-btn ui-btn-up-" + o.theme; + buttonClass += o.inline ? " ui-btn-inline" : ""; + buttonClass += o.shadow ? " ui-shadow" : ""; + buttonClass += o.corners ? " ui-btn-corner-all" : ""; + + if ( o.mini !== undefined ) { + // Used to control styling in headers/footers, where buttons default to `mini` style. + buttonClass += o.mini ? " ui-mini" : " ui-fullsize"; + } + + if ( o.inline !== undefined ) { + // Used to control styling in headers/footers, where buttons default to `mini` style. + buttonClass += o.inline === false ? " ui-btn-block" : " ui-btn-inline"; + } + + + if ( o.icon ) { + o.icon = "ui-icon-" + o.icon; + o.iconpos = o.iconpos || "left"; + + iconClass = "ui-icon " + o.icon; + + if ( o.iconshadow ) { + iconClass += " ui-icon-shadow"; + } + + if ( o.iconsize ) { + iconClass += " ui-iconsize-" + o.iconsize; + } + } + + if ( o.iconpos ) { + buttonClass += " ui-btn-icon-" + o.iconpos; + + if ( o.iconpos == "notext" && !el.attr( "title" ) ) { + el.attr( "title", el.getEncodedText() ); + } + } + + innerClass += o.corners ? " ui-btn-corner-all" : ""; + + if ( o.iconpos && o.iconpos === "notext" && !el.attr( "title" ) ) { + el.attr( "title", el.getEncodedText() ); + } + + if ( buttonElements ) { + el.removeClass( buttonElements.bcls || "" ); + } + el.removeClass( "ui-link" ).addClass( buttonClass ); + + buttonInner.className = innerClass; + + buttonText.className = textClass; + if ( !buttonElements ) { + buttonInner.appendChild( buttonText ); + } + if ( buttonIcon ) { + buttonIcon.className = iconClass; + if ( !(buttonElements && buttonElements.icon) ) { + buttonIcon.appendChild( document.createTextNode("\u00a0") ); + buttonInner.appendChild( buttonIcon ); + } + } + + while ( e.firstChild && !buttonElements) { + buttonText.appendChild( e.firstChild ); + } + + if ( !buttonElements ) { + e.appendChild( buttonInner ); + } + + // Assign a structure containing the elements of this button to the elements of this button. This + // will allow us to recognize this as an already-enhanced button in future calls to buttonMarkup(). + buttonElements = { + bcls : buttonClass, + outer : e, + inner : buttonInner, + text : buttonText, + icon : buttonIcon + }; + + $.data(e, 'buttonElements', buttonElements); + $.data(buttonInner, 'buttonElements', buttonElements); + $.data(buttonText, 'buttonElements', buttonElements); + if (buttonIcon) { + $.data(buttonIcon, 'buttonElements', buttonElements); + } + } + + return this; +}; + +$.fn.buttonMarkup.defaults = { + corners: true, + shadow: true, + iconshadow: true, + iconsize: 18, + wrapperEls: "span" +}; + +function closestEnabledButton( element ) { + var cname; + + while ( element ) { + // Note that we check for typeof className below because the element we + // handed could be in an SVG DOM where className on SVG elements is defined to + // be of a different type (SVGAnimatedString). We only operate on HTML DOM + // elements, so we look for plain "string". + cname = ( typeof element.className === 'string' ) && (element.className + ' '); + if ( cname && cname.indexOf("ui-btn ") > -1 && cname.indexOf("ui-disabled ") < 0 ) { + break; + } + + element = element.parentNode; + } + + return element; +} +})(jQuery); \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ir...@us...> - 2012-11-06 07:25:36
|
Revision: 10244 http://sourceforge.net/p/xoops/svn/10244 Author: irmtfan Date: 2012-11-06 07:25:31 +0000 (Tue, 06 Nov 2012) Log Message: ----------- bug fix: "all" typo in view all topic page Modified Paths: -------------- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt XoopsModules/newbb/branches/irmtfan/newbb/class/topic.renderer.php Modified: XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt 2012-10-29 18:38:28 UTC (rev 10243) +++ XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt 2012-11-06 07:25:31 UTC (rev 10244) @@ -1,3 +1,8 @@ +date 2012-11-06 +=================================== +1- bug fix: in view all topic page: a typo "all" instead of all when the status is not set +in newbb/class/topic.renderer.php + date 2012-10-28 =================================== 1- bug fix: getRead_cookie should return array. (important) Modified: XoopsModules/newbb/branches/irmtfan/newbb/class/topic.renderer.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/class/topic.renderer.php 2012-10-29 18:38:28 UTC (rev 10243) +++ XoopsModules/newbb/branches/irmtfan/newbb/class/topic.renderer.php 2012-11-06 07:25:31 UTC (rev 10244) @@ -290,8 +290,8 @@ if (isset($parsed)) return true; if (!isset($this->vars["forum"])) $this->vars["forum"] = null; - //irmtfan parse status for rendering topic correctly - if empty($_GET(status)) it will show all topics include deleted and pendings. - if (!isset($this->vars["status"])) $this->vars["status"] = all; + //irmtfan parse status for rendering topic correctly - if empty($_GET(status)) it will show all topics include deleted and pendings. "all" instead of all + if (!isset($this->vars["status"])) $this->vars["status"] = "all"; foreach ($this->vars as $var => $val) { $this->parseVar($var, $val); |
From: <du...@us...> - 2012-10-29 18:38:30
|
Revision: 10243 http://sourceforge.net/p/xoops/svn/10243 Author: dugris Date: 2012-10-29 18:38:28 +0000 (Mon, 29 Oct 2012) Log Message: ----------- commit original mainfile.php Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/mainfile.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/mainfile.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/mainfile.php 2012-10-29 18:30:48 UTC (rev 10242) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/mainfile.php 2012-10-29 18:38:28 UTC (rev 10243) @@ -17,65 +17,6 @@ * @version $Id$ */ -if (!defined("XOOPS_MAINFILE_INCLUDED")) { - define("XOOPS_MAINFILE_INCLUDED", 1); - - // XOOPS Physical Paths - - // Physical path to the XOOPS documents (served) directory WITHOUT trailing slash - define('XOOPS_ROOT_PATH', 'C:/Internet/Xoops/Xoops_2.6.0/htdocs'); - - // For forward compatibility - // Physical path to the XOOPS library directory WITHOUT trailing slash - define('XOOPS_PATH', 'C:/Internet/Xoops/Xoops_2.6.0/htdocs/xoops_lib'); - // Physical path to the XOOPS datafiles (writable) directory WITHOUT trailing slash - define('XOOPS_VAR_PATH', 'C:/Internet/Xoops/Xoops_2.6.0/htdocs/xoops_data'); - // Alias of XOOPS_PATH, for compatibility, temporary solution - define("XOOPS_TRUST_PATH", XOOPS_PATH); - - // URL Association for SSL and Protocol Compatibility - $http = 'http://'; - if (!empty($_SERVER['HTTPS'])) { - $http = ($_SERVER['HTTPS']=='on') ? 'https://' : 'http://'; - } - define('XOOPS_PROT', $http); - - // XOOPS Virtual Path (URL) - // Virtual path to your main XOOPS directory WITHOUT trailing slash - // Example: define('XOOPS_URL', 'http://dugris.no-ip.org/Xoops/Xoops_2.6.0/htdocs'); - define('XOOPS_URL', 'http://dugris.no-ip.org:8090'); - - // Shall be handled later, don't forget! - define("XOOPS_CHECK_PATH", 0); - // Protect against external scripts execution if safe mode is not enabled - if (XOOPS_CHECK_PATH && !@ini_get("safe_mode")) { - if (function_exists("debug_backtrace")) { - $xoopsScriptPath = debug_backtrace(); - if (!count($xoopsScriptPath)) { - die("XOOPS path check: this file cannot be requested directly"); - } - $xoopsScriptPath = $xoopsScriptPath[0]["file"]; - } else { - $xoopsScriptPath = isset($_SERVER["PATH_TRANSLATED"]) ? $_SERVER["PATH_TRANSLATED"] : $_SERVER["SCRIPT_FILENAME"]; - } - if (DIRECTORY_SEPARATOR != "/") { - // IIS6 may double the \ chars - $xoopsScriptPath = str_replace(strpos($xoopsScriptPath, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, "/", $xoopsScriptPath); - } - if (strcasecmp(substr($xoopsScriptPath, 0, strlen(XOOPS_ROOT_PATH)), str_replace(DIRECTORY_SEPARATOR, "/", XOOPS_ROOT_PATH))) { - exit("XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run."); - } - } - - // Secure file - require XOOPS_VAR_PATH . '/data/secure.php'; - - define('XOOPS_GROUP_ADMIN', '1'); - define('XOOPS_GROUP_USERS', '2'); - define('XOOPS_GROUP_ANONYMOUS', '3'); - - if (!isset($xoopsOption["nocommon"]) && XOOPS_ROOT_PATH != "") { - include XOOPS_ROOT_PATH."/include/common.php"; - } - +if (! defined('XOOPS_INSTALL')) { + header('Location: install/index.php'); } \ No newline at end of file |
From: <du...@us...> - 2012-10-29 18:30:51
|
Revision: 10242 http://sourceforge.net/p/xoops/svn/10242 Author: dugris Date: 2012-10-29 18:30:48 +0000 (Mon, 29 Oct 2012) Log Message: ----------- modify to use a custom file : xoops.bootstrap.css Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/mainfile.php XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/css/xoops.bootstrap.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_siteclosed.html 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/xotpl/head.html XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/xotpl/theme_head.html Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/media/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/media/bootstrap/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/media/bootstrap/css/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/media/bootstrap/css/xoops.bootstrap.css XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/media/ XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/media/bootstrap/ XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/media/bootstrap/css/ XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/media/bootstrap/css/xoops.bootstrap.css Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/mainfile.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/mainfile.php 2012-10-28 14:29:31 UTC (rev 10241) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/mainfile.php 2012-10-29 18:30:48 UTC (rev 10242) @@ -17,6 +17,65 @@ * @version $Id$ */ -if (! defined('XOOPS_INSTALL')) { - header('Location: install/index.php'); +if (!defined("XOOPS_MAINFILE_INCLUDED")) { + define("XOOPS_MAINFILE_INCLUDED", 1); + + // XOOPS Physical Paths + + // Physical path to the XOOPS documents (served) directory WITHOUT trailing slash + define('XOOPS_ROOT_PATH', 'C:/Internet/Xoops/Xoops_2.6.0/htdocs'); + + // For forward compatibility + // Physical path to the XOOPS library directory WITHOUT trailing slash + define('XOOPS_PATH', 'C:/Internet/Xoops/Xoops_2.6.0/htdocs/xoops_lib'); + // Physical path to the XOOPS datafiles (writable) directory WITHOUT trailing slash + define('XOOPS_VAR_PATH', 'C:/Internet/Xoops/Xoops_2.6.0/htdocs/xoops_data'); + // Alias of XOOPS_PATH, for compatibility, temporary solution + define("XOOPS_TRUST_PATH", XOOPS_PATH); + + // URL Association for SSL and Protocol Compatibility + $http = 'http://'; + if (!empty($_SERVER['HTTPS'])) { + $http = ($_SERVER['HTTPS']=='on') ? 'https://' : 'http://'; + } + define('XOOPS_PROT', $http); + + // XOOPS Virtual Path (URL) + // Virtual path to your main XOOPS directory WITHOUT trailing slash + // Example: define('XOOPS_URL', 'http://dugris.no-ip.org/Xoops/Xoops_2.6.0/htdocs'); + define('XOOPS_URL', 'http://dugris.no-ip.org:8090'); + + // Shall be handled later, don't forget! + define("XOOPS_CHECK_PATH", 0); + // Protect against external scripts execution if safe mode is not enabled + if (XOOPS_CHECK_PATH && !@ini_get("safe_mode")) { + if (function_exists("debug_backtrace")) { + $xoopsScriptPath = debug_backtrace(); + if (!count($xoopsScriptPath)) { + die("XOOPS path check: this file cannot be requested directly"); + } + $xoopsScriptPath = $xoopsScriptPath[0]["file"]; + } else { + $xoopsScriptPath = isset($_SERVER["PATH_TRANSLATED"]) ? $_SERVER["PATH_TRANSLATED"] : $_SERVER["SCRIPT_FILENAME"]; + } + if (DIRECTORY_SEPARATOR != "/") { + // IIS6 may double the \ chars + $xoopsScriptPath = str_replace(strpos($xoopsScriptPath, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, "/", $xoopsScriptPath); + } + if (strcasecmp(substr($xoopsScriptPath, 0, strlen(XOOPS_ROOT_PATH)), str_replace(DIRECTORY_SEPARATOR, "/", XOOPS_ROOT_PATH))) { + exit("XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run."); + } + } + + // Secure file + require XOOPS_VAR_PATH . '/data/secure.php'; + + define('XOOPS_GROUP_ADMIN', '1'); + define('XOOPS_GROUP_USERS', '2'); + define('XOOPS_GROUP_ANONYMOUS', '3'); + + if (!isset($xoopsOption["nocommon"]) && XOOPS_ROOT_PATH != "") { + include XOOPS_ROOT_PATH."/include/common.php"; + } + } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/css/xoops.bootstrap.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/css/xoops.bootstrap.css 2012-10-28 14:29:31 UTC (rev 10241) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/css/xoops.bootstrap.css 2012-10-29 18:30:48 UTC (rev 10242) @@ -2,7 +2,6 @@ * Adapt Bootstrap to Xoops * $Id$ */ -@import url(bootstrap.min.css); /* Forms style */ input:required, textarea:required{ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_siteclosed.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_siteclosed.html 2012-10-28 14:29:31 UTC (rev 10241) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_siteclosed.html 2012-10-29 18:30:48 UTC (rev 10242) @@ -18,7 +18,8 @@ <!-- Xoops style sheet --> <link rel="stylesheet" type="text/css" media="screen" href="<{xoAppUrl xoops.css}>" /> <link rel="stylesheet" type="text/css" media="screen" href="<{xoAppUrl media/xoops/css/icons.css}>" /> - <link rel="stylesheet" type="text/css" media="screen" href="<{xoAppUrl media/bootstrap/css/xoops.bootstrap.css}>" /> + <link rel="stylesheet" type="text/css" media="screen" href="<{xoAppUrl media/bootstrap/css/bootstrap.min.css}>" /> + <link rel="stylesheet" type="text/css" media="screen" href="<{xoImgUrl media/bootstrap/css/xoops.bootstrap.css}>" /> <!--[if lte IE 8]> <link rel="stylesheet" href="<{xoImgUrl styleIE8.css}>" type="text/css" /> 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-10-28 14:29:31 UTC (rev 10241) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php 2012-10-29 18:30:48 UTC (rev 10242) @@ -39,9 +39,7 @@ $xoops->theme->addStylesheet('media/xoops/css/moduladmin.css'); $xoops->theme->addStylesheet(XOOPS_ADMINTHEME_URL . '/default/css/style.css'); - $xoops->theme->addStylesheet($xoops->url('/media/bootstrap/css/xoops.bootstrap.css')); - $xoops->theme->addScript($xoops->url('/media/jquery/jquery.js')); $xoops->theme->addScript($xoops->url('/media/jquery/ui/jquery.ui.js')); $xoops->theme->addScript($xoops->url('/media/bootstrap/js/bootstrap.min.js')); Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/media ___________________________________________________________________ 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/system/themes/default/media/bootstrap ___________________________________________________________________ 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/system/themes/default/media/bootstrap/css ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/media/bootstrap/css/xoops.bootstrap.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/media/bootstrap/css/xoops.bootstrap.css (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/media/bootstrap/css/xoops.bootstrap.css 2012-10-29 18:30:48 UTC (rev 10242) @@ -0,0 +1,94 @@ +/** + * Adapt Bootstrap to Xoops + * $Id$ + */ +@import url(bootstrap.min.css); + +/* Forms style */ +input:required, textarea:required{ + background:url(../img/required.png) right center no-repeat; +} +input:focus:invalid, textarea:focus:invalid{ + background-image:none; +} + +.dsc_pattern_vertical{display:none;} + +input:focus:invalid + span + .dsc_pattern_vertical{ + display:block; + color: #b94a48; +} +.dsc_pattern_horizontal{display:none;} +input:focus:invalid + .dsc_pattern_horizontal{ + display:inline; + color: #b94a48; +} +.caption-required{color: #b94a48;} + +/* Area style */ +.xo-window { + background-color: #222222; + background-repeat: repeat-x; + background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222)); + background-image: -moz-linear-gradient(top, #333333, #222222); + background-image: -ms-linear-gradient(top, #333333, #222222); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222)); + background-image: -webkit-linear-gradient(top, #333333, #222222); + background-image: -o-linear-gradient(top, #333333, #222222); + background-image: linear-gradient(top, #333333, #222222); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); + -moz-border-radius: 5px 5px 0 0; + -khtml-border-top-left-radius: 5px; + -khtml-border-top-right-radius: 5px; + -webkit-border-radius-topleft: 5px; + -webkit-border-radius-topright: 5px; + border-radius: 5px 5px 0 0; + border: 1px solid #2D4760; + padding: 4px 6px 6px 4px; + height: 20px; +} +.xo-window-title { + padding: 2px 6px 6px 6px; + color: #fff; + font-weight: bold; + text-shadow: 0 0 2px #000; + font-family: tahoma, verdana, arial, sans-serif; +} +.xo-window-data { + float: left; + min-height: 50px; + padding: 6px; + width: 100%; +} + +.clear { + clear: both; +} +.spacer .spacer-mini { + padding:0 0 3px 0; +} +.spacer-mid { + padding:0 0 6px 0; +} +.spacer-large { + padding:0 0 12px 0; +} + +.txt-center { text-align: center; } + +.form-horizontal .control-label { + float: left; + width: 250px; + padding-top: 5px; + text-align: right; +} + +.form-horizontal .controls { + *display: inline-block; + *padding-left: 20px; + margin-left: 270px; + *margin-left: 0; +} Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/head.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/head.html 2012-10-28 14:29:31 UTC (rev 10241) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/head.html 2012-10-29 18:30:48 UTC (rev 10242) @@ -20,6 +20,9 @@ <!-- Xoops style sheet --> <link rel="stylesheet" type="text/css" media="screen" href="<{xoAppUrl xoops.css}>" /> <link rel="stylesheet" type="text/css" media="screen" href="<{xoAppUrl media/xoops/css/icons.css}>" /> +<link rel="stylesheet" type="text/css" media="screen" href="<{xoAppUrl media/bootstrap/css/bootstrap.min.css}>" /> +<link rel="stylesheet" type="text/css" media="screen" href="<{xoImgUrl media/bootstrap/css/xoops.bootstrap.css}>" /> + <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/media ___________________________________________________________________ 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/themes/default/media/bootstrap ___________________________________________________________________ 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/themes/default/media/bootstrap/css ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/media/bootstrap/css/xoops.bootstrap.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/media/bootstrap/css/xoops.bootstrap.css (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/media/bootstrap/css/xoops.bootstrap.css 2012-10-29 18:30:48 UTC (rev 10242) @@ -0,0 +1,94 @@ +/** + * Adapt Bootstrap to Xoops + * $Id$ + */ +@import url(bootstrap.min.css); + +/* Forms style */ +input:required, textarea:required{ + background:url(../img/required.png) right center no-repeat; +} +input:focus:invalid, textarea:focus:invalid{ + background-image:none; +} + +.dsc_pattern_vertical{display:none;} + +input:focus:invalid + span + .dsc_pattern_vertical{ + display:block; + color: #b94a48; +} +.dsc_pattern_horizontal{display:none;} +input:focus:invalid + .dsc_pattern_horizontal{ + display:inline; + color: #b94a48; +} +.caption-required{color: #b94a48;} + +/* Area style */ +.xo-window { + background-color: #222222; + background-repeat: repeat-x; + background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222)); + background-image: -moz-linear-gradient(top, #333333, #222222); + background-image: -ms-linear-gradient(top, #333333, #222222); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222)); + background-image: -webkit-linear-gradient(top, #333333, #222222); + background-image: -o-linear-gradient(top, #333333, #222222); + background-image: linear-gradient(top, #333333, #222222); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); + -moz-border-radius: 5px 5px 0 0; + -khtml-border-top-left-radius: 5px; + -khtml-border-top-right-radius: 5px; + -webkit-border-radius-topleft: 5px; + -webkit-border-radius-topright: 5px; + border-radius: 5px 5px 0 0; + border: 1px solid #2D4760; + padding: 4px 6px 6px 4px; + height: 20px; +} +.xo-window-title { + padding: 2px 6px 6px 6px; + color: #fff; + font-weight: bold; + text-shadow: 0 0 2px #000; + font-family: tahoma, verdana, arial, sans-serif; +} +.xo-window-data { + float: left; + min-height: 50px; + padding: 6px; + width: 100%; +} + +.clear { + clear: both; +} +.spacer .spacer-mini { + padding:0 0 3px 0; +} +.spacer-mid { + padding:0 0 6px 0; +} +.spacer-large { + padding:0 0 12px 0; +} + +.txt-center { text-align: center; } + +.form-horizontal .control-label { + float: left; + width: 250px; + padding-top: 5px; + text-align: right; +} + +.form-horizontal .controls { + *display: inline-block; + *padding-left: 20px; + margin-left: 270px; + *margin-left: 0; +} Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/xotpl/theme_head.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/xotpl/theme_head.html 2012-10-28 14:29:31 UTC (rev 10241) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/xotpl/theme_head.html 2012-10-29 18:30:48 UTC (rev 10242) @@ -18,7 +18,8 @@ <!-- Xoops style sheet --> <link rel="stylesheet" type="text/css" media="screen" href="<{xoAppUrl xoops.css}>" /> <link rel="stylesheet" type="text/css" media="screen" href="<{xoAppUrl media/xoops/css/icons.css}>" /> - <link rel="stylesheet" type="text/css" media="screen" href="<{xoAppUrl media/bootstrap/css/xoops.bootstrap.css}>" /> + <link rel="stylesheet" type="text/css" media="screen" href="<{xoAppUrl media/bootstrap/css/bootstrap.min.css}>" /> + <link rel="stylesheet" type="text/css" media="screen" href="<{xoImgUrl media/bootstrap/css/xoops.bootstrap.css}>" /> <!--<link rel="stylesheet" type="text/css" media="screen" href="<{xoAppUrl media/bootstrap/css/bootstrap-responsive.min.css}>" />--> <!-- Theme style sheet --> <link rel="stylesheet" type="text/css" media="screen" href="<{xoImgUrl css/style.css}>" /> |
From: <ma...@us...> - 2012-10-28 14:29:34
|
Revision: 10241 http://sourceforge.net/p/xoops/svn/10241 Author: mageg Date: 2012-10-28 14:29:31 +0000 (Sun, 28 Oct 2012) Log Message: ----------- error in ui.base.css Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/ui.base.css Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/ui.base.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/ui.base.css 2012-10-28 12:36:47 UTC (rev 10240) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/ui.base.css 2012-10-28 14:29:31 UTC (rev 10241) @@ -7,7 +7,7 @@ * * http://docs.jquery.com/UI/Theming */ -@import url("jquery.ui.core.css"); +@import url("ui.core.css"); @import url("ui.accordion.css"); @import url("ui.autocomplete.css"); |
From: <ir...@us...> - 2012-10-28 12:36:50
|
Revision: 10240 http://sourceforge.net/p/xoops/svn/10240 Author: irmtfan Date: 2012-10-28 12:36:47 +0000 (Sun, 28 Oct 2012) Log Message: ----------- bug fix: getRead_cookie should return array. bug fix: increment topic_views only if the topic is unread Modified Paths: -------------- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt XoopsModules/newbb/branches/irmtfan/newbb/class/forum.php XoopsModules/newbb/branches/irmtfan/newbb/class/read.php XoopsModules/newbb/branches/irmtfan/newbb/class/topic.php XoopsModules/newbb/branches/irmtfan/newbb/class/topic.renderer.php XoopsModules/newbb/branches/irmtfan/newbb/include/vars.php XoopsModules/newbb/branches/irmtfan/newbb/viewpost.php XoopsModules/newbb/branches/irmtfan/newbb/viewtopic.php Modified: XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt 2012-10-28 08:29:50 UTC (rev 10239) +++ XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt 2012-10-28 12:36:47 UTC (rev 10240) @@ -1,3 +1,17 @@ +date 2012-10-28 +=================================== +1- bug fix: getRead_cookie should return array. (important) +in newbb/class/read.php + +2- improve: add LAST_INSERT_ID to enhance the mysql performances +in newbb/class/topic.php + +3- improve: set IP as COOKIE prefix for anonymous users +in newbb/include/vars.php, newbb/viewpost.php, newbb/class/forum.php, newbb/class/topic.renderer.php + +4- bug fix: increment topic_views only if the topic is unread (important) +in newbb/viewtopic.php + date 2012-10-22 =================================== 1- bug fix: viewpost.php?status=new AND viewforum.php?forum=FFF&status=unread and list.topic.php?status=unread when read_mode = 1 (cookie) Modified: XoopsModules/newbb/branches/irmtfan/newbb/class/forum.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/class/forum.php 2012-10-28 08:29:50 UTC (rev 10239) +++ XoopsModules/newbb/branches/irmtfan/newbb/class/forum.php 2012-10-28 12:36:47 UTC (rev 10240) @@ -221,23 +221,21 @@ } // END irmtfan use read_uid to find the unread posts when the user is logged in } elseif ($xoopsModuleConfig["read_mode"] == 1) { - // START irmtfan fix read_mode = 1 bugs + // START irmtfan fix read_mode = 1 bugs - for all users (member and anon) if ( $time_criterion = max($GLOBALS['last_visit'], $startdate) ) { $criteria_post = ' p.post_time > ' . $time_criterion; // for all users - if (is_object($GLOBALS["xoopsUser"])) { // only for members - $topics = array(); - $topic_lastread = newbb_getcookie('LT', true); - if (count($topic_lastread)>0) { - foreach ($topic_lastread as $id => $time) { - if ($time > $time_criterion) $topics[] = $id; - } + $topics = array(); + $topic_lastread = newbb_getcookie('LT', true); + if (count($topic_lastread)>0) { + foreach ($topic_lastread as $id => $time) { + if ($time > $time_criterion) $topics[] = $id; } - if (count($topics)>0) { - $criteria_extra = ' AND t.topic_id NOT IN (' . implode(",", $topics) . ')'; - } } + if (count($topics)>0) { + $criteria_extra = ' AND t.topic_id NOT IN (' . implode(",", $topics) . ')'; + } } - // END irmtfan fix read_mode = 1 bugs + // END irmtfan fix read_mode = 1 bugs - for all users (member and anon) } break; case 'pending': @@ -498,23 +496,21 @@ } // END irmtfan use read_uid to find the unread posts when the user is logged in } elseif ($xoopsModuleConfig["read_mode"] == 1) { - // START irmtfan fix read_mode = 1 bugs + // START irmtfan fix read_mode = 1 bugs - for all users (member and anon) if ( $time_criterion = max($GLOBALS['last_visit'], $startdate) ) { $criteria_post = ' p.post_time > ' . $time_criterion; // for all users - if (is_object($GLOBALS["xoopsUser"])) { // only for members - $topics = array(); - $topic_lastread = newbb_getcookie('LT', true); - if (count($topic_lastread)>0) { - foreach ($topic_lastread as $id => $time) { - if ($time > $time_criterion) $topics[] = $id; - } + $topics = array(); + $topic_lastread = newbb_getcookie('LT', true); + if (count($topic_lastread)>0) { + foreach ($topic_lastread as $id => $time) { + if ($time > $time_criterion) $topics[] = $id; } - if (count($topics)>0) { - $criteria_extra = ' AND t.topic_id NOT IN (' . implode(",", $topics) . ')'; - } } + if (count($topics)>0) { + $criteria_extra = ' AND t.topic_id NOT IN (' . implode(",", $topics) . ')'; + } } - // END irmtfan fix read_mode = 1 bugs + // END irmtfan fix read_mode = 1 bugs - for all users (member and anon) } break; case 'pending': Modified: XoopsModules/newbb/branches/irmtfan/newbb/class/read.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/class/read.php 2012-10-28 08:29:50 UTC (rev 10239) +++ XoopsModules/newbb/branches/irmtfan/newbb/class/read.php 2012-10-28 12:36:47 UTC (rev 10240) @@ -157,7 +157,8 @@ { $cookie_name = ($this->type == "forum") ? "LF" : "LT"; $cookie_var = $item_id; - $lastview = newbb_getcookie($cookie_name); + // irmtfan set true to return array + $lastview = newbb_getcookie($cookie_name, true); return @$lastview[$cookie_var]; } Modified: XoopsModules/newbb/branches/irmtfan/newbb/class/topic.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/class/topic.php 2012-10-28 08:29:50 UTC (rev 10239) +++ XoopsModules/newbb/branches/irmtfan/newbb/class/topic.php 2012-10-28 12:36:47 UTC (rev 10240) @@ -48,10 +48,10 @@ $this->initVar('poll_id', XOBJ_DTYPE_INT); $this->initVar('topic_tags', XOBJ_DTYPE_SOURCE); } - + // irmtfan add LAST_INSERT_ID to enhance the mysql performances function incrementCounter() { - $sql = 'UPDATE ' . $GLOBALS["xoopsDB"]->prefix('bb_topics') . ' SET topic_views = topic_views + 1 WHERE topic_id =' . $this->getVar('topic_id'); + $sql = 'UPDATE ' . $GLOBALS["xoopsDB"]->prefix('bb_topics') . ' SET topic_views = LAST_INSERT_ID(topic_views + 1) WHERE topic_id =' . $this->getVar('topic_id'); $GLOBALS["xoopsDB"]->queryF($sql); } Modified: XoopsModules/newbb/branches/irmtfan/newbb/class/topic.renderer.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/class/topic.renderer.php 2012-10-28 08:29:50 UTC (rev 10239) +++ XoopsModules/newbb/branches/irmtfan/newbb/class/topic.renderer.php 2012-10-28 12:36:47 UTC (rev 10240) @@ -171,26 +171,24 @@ // END irmtfan change criteria to get from uid p.uid = last post submit user id // User cookie } elseif ($this->config["read_mode"] == 1) { - // START irmtfan fix read_mode = 1 bugs + // START irmtfan fix read_mode = 1 bugs - for all users (member and anon) $startdate = !empty($this->vars["since"]) ? (time() - newbb_getSinceTime($this->vars["since"])) : 0; if ( $lastvisit = max($GLOBALS['last_visit'], $startdate) ) { if ( $lastvisit > $startdate ) { $this->query["where"][] = 'p.post_time > ' . $lastvisit; } - if (is_object($GLOBALS["xoopsUser"])) { // only for members - $topics = array(); - $topic_lastread = newbb_getcookie('LT', true); - if (count($topic_lastread)>0) { - foreach ($topic_lastread as $id => $time) { - if ($time > $lastvisit) $topics[] = $id; - } + $topics = array(); + $topic_lastread = newbb_getcookie('LT', true); + if (count($topic_lastread)>0) { + foreach ($topic_lastread as $id => $time) { + if ($time > $lastvisit) $topics[] = $id; } - if (count($topics)>0) { - $this->query["where"][] = ' t.topic_id NOT IN (' . implode(",", $topics) . ')'; - } } + if (count($topics)>0) { + $this->query["where"][] = ' t.topic_id NOT IN (' . implode(",", $topics) . ')'; + } } - // END irmtfan fix read_mode = 1 bugs + // END irmtfan fix read_mode = 1 bugs - for all users (member and anon) } break; Modified: XoopsModules/newbb/branches/irmtfan/newbb/include/vars.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/include/vars.php 2012-10-28 08:29:50 UTC (rev 10239) +++ XoopsModules/newbb/branches/irmtfan/newbb/include/vars.php 2012-10-28 12:36:47 UTC (rev 10240) @@ -15,6 +15,8 @@ } include_once XOOPS_ROOT_PATH.'/modules/newbb/include/functions.ini.php'; mod_loadFunctions("session", "newbb"); +// irmtfan include user functions for newbb_getIP +mod_loadFunctions("user", "newbb"); // NewBB cookie structure /* NewBB cookie storage @@ -36,7 +38,7 @@ $forumCookie['path'] = "/"; $forumCookie['secure'] = false; $forumCookie['expire'] = time() + 3600 * 24 * 30; // one month -$forumCookie['prefix'] = 'newbb_'.((is_object($xoopsUser)) ? $xoopsUser->getVar('uid') : 0); +$forumCookie['prefix'] = 'newbb_'.((is_object($xoopsUser)) ? $xoopsUser->getVar('uid') : '0IP' . newbb_getIP()); // irmtfan IP for anons // set LastVisitTemp cookie, which only gets the time from the LastVisit cookie if it does not exist yet // otherwise, it gets the time from the LastVisitTemp cookie Modified: XoopsModules/newbb/branches/irmtfan/newbb/viewpost.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/viewpost.php 2012-10-28 08:29:50 UTC (rev 10239) +++ XoopsModules/newbb/branches/irmtfan/newbb/viewpost.php 2012-10-28 12:36:47 UTC (rev 10240) @@ -116,21 +116,19 @@ } elseif ($xoopsModuleConfig["read_mode"] == 1) { $criteria_count->add(new Criteria("post_time", intval($last_visit), ">")); // irmtfan add new criteria $criteria_post->add(new Criteria("p.post_time", intval($last_visit), ">")); // irmtfan add new criteria - // START irmtfan fix read_mode = 1 bugs - if (is_object($GLOBALS["xoopsUser"])) { // only for members - $topics = array(); - $topic_lastread = newbb_getcookie('LT', true); - if (count($topic_lastread)>0) { - foreach ($topic_lastread as $id => $time) { - if ($time > intval($last_visit)) $topics[] = $id; - } + // START irmtfan fix read_mode = 1 bugs - for all users (member and anon) + $topics = array(); + $topic_lastread = newbb_getcookie('LT', true); + if (count($topic_lastread)>0) { + foreach ($topic_lastread as $id => $time) { + if ($time > intval($last_visit)) $topics[] = $id; } - if (count($topics)>0) { - $criteria_count->add(new Criteria("topic_id", "(".implode(",",$topics).")", "NOT IN")); - $criteria_post->add(new Criteria("p.topic_id", "(".implode(",",$topics).")", "NOT IN")); - } } - // END irmtfan fix read_mode = 1 bugs + if (count($topics)>0) { + $criteria_count->add(new Criteria("topic_id", "(".implode(",",$topics).")", "NOT IN")); + $criteria_post->add(new Criteria("p.topic_id", "(".implode(",",$topics).")", "NOT IN")); + } + // END irmtfan fix read_mode = 1 bugs - for all users (member and anon) //$criteria_status_count->add(new Criteria("approved", 1));// irmtfan commented and removed //$criteria_status_post->add(new Criteria("p.approved", 1));// irmtfan commented and removed } Modified: XoopsModules/newbb/branches/irmtfan/newbb/viewtopic.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/viewtopic.php 2012-10-28 08:29:50 UTC (rev 10239) +++ XoopsModules/newbb/branches/irmtfan/newbb/viewtopic.php 2012-10-28 12:36:47 UTC (rev 10240) @@ -76,13 +76,6 @@ } else { $topic_obj = $topic_handler->get($topic_id); } -// START irmtfan - jump to last post read -if (empty($post_id) && !empty($xoopsModuleConfig['jump_to_topic_last_post_read_enabled'])) { - $topic_last_post_id_read = newbb_getRead("topic", $topic_id); - if (!empty($topic_last_post_id_read) && $topic_last_post_id_read!=$topic_obj->getVar("topic_last_post_id")) - header("Location: ".$_SERVER['REQUEST_URI']."&post_id=".$topic_last_post_id_read); -} -// END irmtfan - jump to last post read if ( !is_object($topic_obj) || !$topic_id = $topic_obj->getVar('topic_id') ) { $redirect = empty($forum_id) ? XOOPS_URL."/modules/".$xoopsModule->getVar("dirname")."/index.php" : XOOPS_URL."/modules/".$xoopsModule->getVar("dirname")."/viewforum.php?forum={$forum_id}"; @@ -99,6 +92,34 @@ exit(); } +// START irmtfan - find if topic is read or unread - for all users (member and anon) +$topic_is_unread = true; +/* if $xoopsModuleConfig["read_mode"] == 0 || + * never read && $xoopsModuleConfig["read_mode"] == 1 || + * never read && $xoopsModuleConfig["read_mode"] == 2 || + * => $topic_last_post_time_or_id_read = NULL + * if !$xoopsUser && $xoopsModuleConfig["read_mode"] == 2 + * => $topic_last_post_time_or_id_read = false + * if !$xoopsUser && $xoopsModuleConfig["read_mode"] == 1 + * => $topic_last_post_time_or_id_read = lastview(newbb_IP{ip}LT) +*/ +$topic_last_post_time_or_id_read = newbb_getRead("topic", $topic_id); +if ( !empty($topic_last_post_time_or_id_read) ) { + if ( $xoopsModuleConfig["read_mode"] == 1 ) { + $post_handler =& xoops_getmodulehandler('post', 'newbb'); + $post_obj =& $post_handler->get($topic_obj->getVar("topic_last_post_id")); + $topic_is_unread = ( $topic_last_post_time_or_id_read < $post_obj->getVar("post_time") ); + } + if ( $xoopsModuleConfig["read_mode"] == 2 ) { + $topic_is_unread = ( $topic_last_post_time_or_id_read < $topic_obj->getVar("topic_last_post_id") ); + // hack jump to last post read if post_id is empty - is there any better way? + if ( empty($post_id) && !empty($xoopsModuleConfig['jump_to_topic_last_post_read_enabled']) && $topic_is_unread) { + header("Location: ".$_SERVER['REQUEST_URI']."&post_id=" . $topic_last_post_time_or_id_read); + } + } +} +// END irmtfan - find if topic is read or unread - for all users (member and anon) + /* Only admin has access to admin mode */ if (!$isadmin) { $status = ""; @@ -115,8 +136,8 @@ $total_posts = $topic_handler->getPostCount($topic_obj, $status); $postsArray = $topic_handler->getAllPosts($topic_obj, $order, $xoopsModuleConfig['posts_per_page'], $start, $post_id, $status); -//Threadersteller zählt nicht -if (!$xoopsUser || ($xoopsUser->getVar('uid') != $topic_obj->getVar('topic_poster')) ) { +//irmtfan - increment topic_views only if the topic is unread +if ($topic_is_unread) { $topic_obj->incrementCounter(); } newbb_setRead("topic", $topic_id, $topic_obj->getVar("topic_last_post_id")); |
From: <be...@us...> - 2012-10-28 08:29:54
|
Revision: 10239 http://sourceforge.net/p/xoops/svn/10239 Author: beckmi Date: 2012-10-28 08:29:50 +0000 (Sun, 28 Oct 2012) Log Message: ----------- Updating to Beta 2 Modified Paths: -------------- XoopsModules/jobs/branches/mamba/jobs/addlisting.php XoopsModules/jobs/branches/mamba/jobs/addresume.php XoopsModules/jobs/branches/mamba/jobs/admin/addcomp.php XoopsModules/jobs/branches/mamba/jobs/admin/addresume.php XoopsModules/jobs/branches/mamba/jobs/admin/index.php XoopsModules/jobs/branches/mamba/jobs/admin/job_categories.php XoopsModules/jobs/branches/mamba/jobs/admin/jobs.php XoopsModules/jobs/branches/mamba/jobs/admin/main.php XoopsModules/jobs/branches/mamba/jobs/admin/modcomp.php XoopsModules/jobs/branches/mamba/jobs/admin/modresume.php XoopsModules/jobs/branches/mamba/jobs/admin/resume_categories.php XoopsModules/jobs/branches/mamba/jobs/admin/resumes.php XoopsModules/jobs/branches/mamba/jobs/admin/submitlisting.php XoopsModules/jobs/branches/mamba/jobs/blocks/jobs.php XoopsModules/jobs/branches/mamba/jobs/blocks/jobs2.php XoopsModules/jobs/branches/mamba/jobs/blocks/jobs_b_premium.php XoopsModules/jobs/branches/mamba/jobs/blocks/resumes.php XoopsModules/jobs/branches/mamba/jobs/class/jobs_categories.php XoopsModules/jobs/branches/mamba/jobs/class/jobs_res_categories.php XoopsModules/jobs/branches/mamba/jobs/docs/changelog.txt XoopsModules/jobs/branches/mamba/jobs/include/functions.php XoopsModules/jobs/branches/mamba/jobs/include/resume_functions.php XoopsModules/jobs/branches/mamba/jobs/include/search.inc.php XoopsModules/jobs/branches/mamba/jobs/include/waiting.plugin.php XoopsModules/jobs/branches/mamba/jobs/index.php XoopsModules/jobs/branches/mamba/jobs/jobscat.php XoopsModules/jobs/branches/mamba/jobs/language/english/admin.php XoopsModules/jobs/branches/mamba/jobs/members.php XoopsModules/jobs/branches/mamba/jobs/modjob.php XoopsModules/jobs/branches/mamba/jobs/modresume.php XoopsModules/jobs/branches/mamba/jobs/resumecat.php XoopsModules/jobs/branches/mamba/jobs/resumes.php XoopsModules/jobs/branches/mamba/jobs/sql/mysql.sql XoopsModules/jobs/branches/mamba/jobs/viewjobs.php XoopsModules/jobs/branches/mamba/jobs/viewresume.php XoopsModules/jobs/branches/mamba/jobs/xoops_version.php Added Paths: ----------- XoopsModules/jobs/branches/mamba/jobs/admin/modjobs.php Modified: XoopsModules/jobs/branches/mamba/jobs/addlisting.php =================================================================== --- XoopsModules/jobs/branches/mamba/jobs/addlisting.php 2012-10-27 15:06:41 UTC (rev 10238) +++ XoopsModules/jobs/branches/mamba/jobs/addlisting.php 2012-10-28 08:29:50 UTC (rev 10239) @@ -156,7 +156,7 @@ ); $xoopsDB->query($sql); - if ($valid == 'Yes') { + if ($valid == '1') { $notification_handler =& xoops_gethandler('notification'); $lid = $xoopsDB->getInsertId(); @@ -335,9 +335,9 @@ // $form->addElement(new XoopsFormCaptcha(_JOBS_CAPTCHA, "xoopscaptcha", false), true); // } if ($xoopsModuleConfig['jobs_moderated'] == 0) { - $form->addElement(new XoopsFormHidden("valid", "Yes"), FALSE); + $form->addElement(new XoopsFormHidden("valid", "1"), FALSE); } else { - $form->addElement(new XoopsFormHidden("valid", "No"), FALSE); + $form->addElement(new XoopsFormHidden("valid", "0"), FALSE); } $form->addElement(new XoopsFormHidden("comp_id", $thiscompany["comp_id"]), FALSE); $form->addElement(new XoopsFormButton('', 'submit', _JOBS_SUBMIT, 'submit')); Modified: XoopsModules/jobs/branches/mamba/jobs/addresume.php =================================================================== --- XoopsModules/jobs/branches/mamba/jobs/addresume.php 2012-10-27 15:06:41 UTC (rev 10238) +++ XoopsModules/jobs/branches/mamba/jobs/addresume.php 2012-10-28 08:29:50 UTC (rev 10239) @@ -140,7 +140,7 @@ unset ($_SESSION['email']); $lid = $xoopsDB->getInsertId(); - if ($valid == 'Yes') { + if ($valid == '1') { $notification_handler =& xoops_gethandler('notification'); @@ -261,7 +261,7 @@ $form->addElement(new XoopsFormLabel(_JOBS_CAT3, ob_get_contents()), TRUE); ob_end_clean(); - $radio = new XoopsFormRadio(_JOBS_STATUS, 'status', "" . $_SESSION['status'] . ""); + $radio = new XoopsFormRadio(_JOBS_STATUS, 'status', "" . $_SESSION['status'] . "1"); $options["1"] = _JOBS_ACTIVE; $options["0"] = _JOBS_INACTIVE; $radio->addOptionArray($options); @@ -307,9 +307,9 @@ // } if ($xoopsModuleConfig['jobs_moderate_resume'] == 0) { - $form->addElement(new XoopsFormHidden("valid", "Yes"), FALSE); + $form->addElement(new XoopsFormHidden("valid", "1"), FALSE); } else { - $form->addElement(new XoopsFormHidden("valid", "No"), FALSE); + $form->addElement(new XoopsFormHidden("valid", "0"), FALSE); } $form->addElement(new XoopsFormHidden("usid", $iddd), FALSE); Modified: XoopsModules/jobs/branches/mamba/jobs/admin/addcomp.php =================================================================== --- XoopsModules/jobs/branches/mamba/jobs/admin/addcomp.php 2012-10-27 15:06:41 UTC (rev 10238) +++ XoopsModules/jobs/branches/mamba/jobs/admin/addcomp.php 2012-10-28 08:29:50 UTC (rev 10239) @@ -174,7 +174,9 @@ xoops_cp_header(); // loadModuleAdminMenu(3, ""); $indexAdmin = new ModuleAdmin(); - echo $indexAdmin->addNavigation('company.php'); + echo $indexAdmin->addNavigation("company.php"); + $indexAdmin->addItemButton(_AM_JOBS_MAN_COMPANY, 'company.php', 'list'); + echo $indexAdmin->renderButton('left', ''); $alert_message = ""; if (isset($_GET['cuser1']) && $_GET['cuser1'] != "") { Modified: XoopsModules/jobs/branches/mamba/jobs/admin/addresume.php =================================================================== --- XoopsModules/jobs/branches/mamba/jobs/admin/addresume.php 2012-10-27 15:06:41 UTC (rev 10238) +++ XoopsModules/jobs/branches/mamba/jobs/admin/addresume.php 2012-10-28 08:29:50 UTC (rev 10239) @@ -105,7 +105,7 @@ unset ($_SESSION['email']); $lid = $xoopsDB->getInsertId(); - if ($valid == 'Yes') { + if ($valid == '1') { $notification_handler =& xoops_gethandler('notification'); @@ -270,9 +270,9 @@ $form->addElement($res_radio, TRUE); if ($xoopsModuleConfig['jobs_moderate_resume'] == 0) { - $form->addElement(new XoopsFormHidden("valid", "Yes"), FALSE); + $form->addElement(new XoopsFormHidden("valid", "1"), FALSE); } else { - $form->addElement(new XoopsFormHidden("valid", "No"), FALSE); + $form->addElement(new XoopsFormHidden("valid", "0"), FALSE); } $form->addElement(new XoopsFormHidden("usid", $iddd), FALSE); Modified: XoopsModules/jobs/branches/mamba/jobs/admin/index.php =================================================================== --- XoopsModules/jobs/branches/mamba/jobs/admin/index.php 2012-10-27 15:06:41 UTC (rev 10238) +++ XoopsModules/jobs/branches/mamba/jobs/admin/index.php 2012-10-28 08:29:50 UTC (rev 10239) @@ -26,7 +26,53 @@ $indexAdmin = new ModuleAdmin(); +//----------------------- +/* +* jobs + * validate + * published + * total jobs + * Categories + +* resumes + * validate + * published + * total jobs + * Categories + + * payment type + * job type + * +* Companies +* +* */ + +$summary = jobs_summary(); + +$indexAdmin->addInfoBox(_AM_JOBS_SUMMARY); +//$indexAdmin->addInfoBoxLine(_AM_JOBS_SUMMARY, "------ JOBS -----------------", 'Red'); +$indexAdmin->addInfoBoxLine(_AM_JOBS_SUMMARY, sprintf(_AM_JOBS_WAITVA_JOB,$summary['waitJobValidation']), 'Green'); +$indexAdmin->addInfoBoxLine(_AM_JOBS_SUMMARY, sprintf(_AM_JOBS_PUBLISHED, $summary['jobPublished']), 'Red'); +$indexAdmin->addInfoBoxLine(_AM_JOBS_SUMMARY, sprintf(_AM_JOBS_CATETOT, $summary['jobCategoryCount']), 'Green'); + +//$indexAdmin->addInfoBoxLine(_AM_JOBS_SUMMARY, "</br> "."------ RESUMES -----------------", 'Red'); +$indexAdmin->addInfoBoxLine(_AM_JOBS_SUMMARY, "</br> ".sprintf(_AM_JOBS_WAITVA_RESUME,$summary['waitResumeValidation']), 'Green'); +//$indexAdmin->addInfoBoxLine(_AM_JOBS_SUMMARY, "<b>"._AM_JOBS_VIEWSCAP ."</b> ". sprintf(_AM_JOBS_VIEWS, $summary['views']), 'Green'); +$indexAdmin->addInfoBoxLine(_AM_JOBS_SUMMARY, sprintf(_AM_JOBS_RESUME_PUBLISHED, $summary['resumePublished']), 'Green'); +$indexAdmin->addInfoBoxLine(_AM_JOBS_SUMMARY, sprintf(_AM_JOBS_RESUME_CAT_TOTAL, $summary['resumeCategoryCount']), 'Green'); + + +//$indexAdmin->addInfoBoxLine(_AM_JOBS_SUMMARY, "</br> "."------ COMPANIES -----------------", 'Red'); +//$indexAdmin->addInfoBoxLine(_AM_JOBS_SUMMARY, "</br> "."<b>"._AM_JOBS_COMPANY_TOTCAP ."</b> ". sprintf(_AM_JOBS_WAITVA_RESUME,$summary['waitResumeValidation']), 'Green'); +$indexAdmin->addInfoBoxLine(_AM_JOBS_SUMMARY, "</br> ".sprintf(_AM_JOBS_COMPANY_TOT, $summary['companies']), 'Green'); + + + + + echo $indexAdmin->addNavigation('index.php'); echo $indexAdmin->renderIndex(); +jobs_filechecks(); + include "admin_footer.php"; \ No newline at end of file Modified: XoopsModules/jobs/branches/mamba/jobs/admin/job_categories.php =================================================================== --- XoopsModules/jobs/branches/mamba/jobs/admin/job_categories.php 2012-10-27 15:06:41 UTC (rev 10238) +++ XoopsModules/jobs/branches/mamba/jobs/admin/job_categories.php 2012-10-28 08:29:50 UTC (rev 10239) @@ -71,8 +71,10 @@ echo "<tr class='" . $class . "'>"; echo "<td align=\"left\">" . $prefix . " " . $category_arr[$i]->getVar("title") . "</td>"; -// echo"<td align=\"center\"><img src=\"" . XOOPS_URL . "/uploads/jobs/category/category_img/". $category_arr[$i]->getVar("img") -// . "\" height=\"30px\" title=\"img\" alt=\"img\"></td>"; + + echo"<td align=\"center\"><img src=\"" . XOOPS_URL . "/modules/jobs/images/cat/". $category_arr[$i]->getVar("img") + . "\" height=\"16px\" title=\"img\" alt=\"img\"></td>"; + echo "<td align=\"center\">" . $category_arr[$i]->getVar("ordre") . "</td>"; echo"<td align=\"center\">" . $category_arr[$i]->getVar("affprice") . "</td>"; @@ -102,6 +104,7 @@ echo "<table width='100%' cellspacing='1' class='outer'> <tr> <th align=\"center\">" . _AM_JOBS_CATEGORY . "</th> + <th align=\"center\">" . _AM_JOBS_IMGCAT . "</th> <th align=\"center\">" . _AM_JOBS_ORDRE . "</th> <th align=\"center\">" . _AM_JOBS_PAYMENT . "</th> <th align='center' width='10%'>" . _AM_JOBS_ACTIONS . "</th> @@ -117,9 +120,9 @@ echo "<tr class='" . $class . "'>"; echo "<td align=\"left\">" . $prefix . " " . $category_arr[$i]->getVar("title") . "</td>"; -// echo"<td align=\"center\"><img src=\"" . XOOPS_URL . "/uploads/test1/category/category_img/" -// . $category_arr[$i]->getVar("category_img") -// . "\" height=\"30px\" title=\"category_img\" alt=\"category_img\"></td>"; + echo"<td align=\"center\"><img src=\"" . XOOPS_URL . "/modules/jobs/images/cat/" + . $category_arr[$i]->getVar("img") + . "\" height=\"16px\" title=\"img\" alt=\"img\"></td>"; echo "<td align=\"center\">" . $category_arr[$i]->getVar("ordre") . "</td>"; @@ -182,21 +185,22 @@ //Form category_desc //mb $obj->setVar("category_desc", $_REQUEST["category_desc"]); //Form category_img -// include_once XOOPS_ROOT_PATH . "/class/uploader.php"; -// $uploaddir = XOOPS_UPLOAD_PATH . "/test1/images/"; -// $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS["xoopsModuleConfig"]["category_img_mimetypes"], $GLOBALS["xoopsModuleConfig"]["category_img_size"], NULL, NULL); -// if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { -// $uploader->setPrefix("category_img_"); -// $uploader->fetchMedia($_POST['xoops_upload_file'][0]); -// if (!$uploader->upload()) { -// $errors = $uploader->getErrors(); -// redirect_header("javascript:history.go(-1)", 3, $errors); -// } else { -// $obj->setVar("category_img", $uploader->getSavedFileName()); -// } -// } else { -// $obj->setVar("category_img", $_REQUEST["category_img"]); -// } + include_once XOOPS_ROOT_PATH . "/class/uploader.php"; + $uploaddir = XOOPS_UPLOAD_PATH . "/jobs/images/"; + $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS["xoopsModuleConfig"]["category_img_mimetypes"], $GLOBALS["xoopsModuleConfig"]["category_img_size"], NULL, NULL); + if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { + $uploader->setPrefix("category_img_"); + $uploader->fetchMedia($_POST['xoops_upload_file'][0]); + if (!$uploader->upload()) { + $errors = $uploader->getErrors(); + redirect_header("javascript:history.go(-1)", 3, $errors); + } else { + $obj->setVar("img", $uploader->getSavedFileName()); + } + } else { + $obj->setVar("img", $_REQUEST["img"]); + } + //Form category_weight $obj->setVar("ordre", $_REQUEST["ordre"]); //Form category_color Modified: XoopsModules/jobs/branches/mamba/jobs/admin/jobs.php =================================================================== --- XoopsModules/jobs/branches/mamba/jobs/admin/jobs.php 2012-10-27 15:06:41 UTC (rev 10238) +++ XoopsModules/jobs/branches/mamba/jobs/admin/jobs.php 2012-10-28 08:29:50 UTC (rev 10239) @@ -38,7 +38,7 @@ } $sql - = "select lid, title, date, status, expire, submitter, premium from " . $xoopsDB->prefix("jobs_listing") + = "select lid, title, date, status, expire, submitter, valid, premium from " . $xoopsDB->prefix("jobs_listing") . " ORDER BY lid"; $result1 = $xoopsDB->query($sql, $show, $start); @@ -49,9 +49,10 @@ <th align=\"center\">" . _AM_JOBS_NUMANN . "</th> <th align=\"center\">" . _AM_JOBS_TITLE2 . "</th> <th align=\"center\">" . _AM_JOBS_SUBMITTED_ON . "</th> + <th align=\"center\">" . _AM_JOBS_ACTIVE . "</th> <th align=\"center\">" . _AM_JOBS_EXPIRES . "</th> - <th align=\"center\">" . _AM_JOBS_ACTIVE . "</th> <th align=\"center\">" . _AM_JOBS_SENDBY . "</th> + <th align=\"center\">" . _AM_JOBS_PUBLISHEDCAP . "</th> <th align=\"center\">" . _AM_JOBS_PREMIUM . "</th> <th align='center' width='10%'>" . _AM_JOBS_ACTIONS . "</th> @@ -59,23 +60,24 @@ $class = "odd"; $result1 = $xoopsDB->query($sql, $show, $start); - while (list($lid, $title, $date, $status, $expire, $submitter, $premium) = $xoopsDB->fetchRow($result1)) { + while (list($lid, $title, $date, $status, $expire, $submitter, $valid, $premium) = $xoopsDB->fetchRow($result1)) { $title = $myts->htmlSpecialChars($title); $date2 = formatTimestamp($date, "s"); // $expire2 = formatTimestamp($expire, "s"); echo "<tr class='" . $class . "'>"; $class = ($class == "even") ? "odd" : "even"; - echo "<td align=\"center\">$lid</td>"; + echo "<td align=\"center\">" . $lid."</td>"; echo "<td align=\"center\">" . $title . "</td>"; echo "<td align=\"center\">" . $date2 . "</td>"; + echo "<td align=\"center\">" . $status . "</td>"; echo "<td align=\"center\">" . $expire . "</td>"; - echo "<td align=\"center\">" . $status . "</td>"; echo "<td align=\"center\">" . $submitter . "</td>"; + echo "<td align=\"center\">" . $valid . "</td>"; echo "<td align=\"center\">" . $premium . "</td>"; echo "<td align='center' width='10%'> - <a href='main.php?op=ModJob&lid=" . $lid . "'><img src=" . $pathIcon16 . "/edit.png alt='" + <a href='modjobs.php?lid=" . $lid . "'><img src=" . $pathIcon16 . "/edit.png alt='" . _EDIT . "' title='" . _EDIT . "'></a> <a href='../deljob.php?lid=" . $lid . "'><img src=" . $pathIcon16 . "/delete.png alt='" . _DELETE . "' title='" . _DELETE . "'></a> Modified: XoopsModules/jobs/branches/mamba/jobs/admin/main.php =================================================================== --- XoopsModules/jobs/branches/mamba/jobs/admin/main.php 2012-10-27 15:06:41 UTC (rev 10238) +++ XoopsModules/jobs/branches/mamba/jobs/admin/main.php 2012-10-28 08:29:50 UTC (rev 10239) @@ -71,73 +71,73 @@ echo "</fieldset><br />"; } - if ($xoopsModuleConfig['jobs_moderated'] == '1' || $xoopsModuleConfig['jobs_moderate_up'] == '1') { +// if ($xoopsModuleConfig['jobs_moderated'] == '1' || $xoopsModuleConfig['jobs_moderate_up'] == '1') { +// +// $result = $xoopsDB->query( +// "select lid, title, date from " . $xoopsDB->prefix("jobs_listing") . " WHERE valid='0' order by lid" +// ); +// $numrows = $xoopsDB->getRowsNum($result); +// if ($numrows > 0) { +// echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_JOBS_WAIT . "</legend>"; +// echo "<br />" . _AM_JOBS_THEREIS . " <b>$numrows</b> " . _AM_JOBS_WAIT . "<br /><br />"; +// echo "<table width=100% cellpadding=2 cellspacing=0 border=0>"; +// $rank = 1; +// +// while (list($lid, $title, $date) = $xoopsDB->fetchRow($result)) { +// $title = $myts->htmlSpecialChars($title); +// $date2 = formatTimestamp($date, "s"); +// +// if (is_integer($rank / 2)) { +// $color = "even"; +// } else { +// $color = "odd"; +// } +// echo "<tr class='$color'><td><a href=\"main.php?op=IndexView&lid=$lid\">$title</a></td><td align=right> $date2</td></tr>"; +// $rank++; +// } +// echo "</table><br />"; +// echo "</fieldset><br />"; +// } else { +// +// echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_JOBS_WAIT . "</legend>"; +// echo "<br /> " . _AM_JOBS_NOANNVAL . "<br /><br />"; +// echo "</fieldset><br />"; +// } +// } - $result = $xoopsDB->query( - "select lid, title, date from " . $xoopsDB->prefix("jobs_listing") . " WHERE valid='No' order by lid" - ); - $numrows = $xoopsDB->getRowsNum($result); - if ($numrows > 0) { - echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_JOBS_WAIT . "</legend>"; - echo "<br />" . _AM_JOBS_THEREIS . " <b>$numrows</b> " . _AM_JOBS_WAIT . "<br /><br />"; - echo "<table width=100% cellpadding=2 cellspacing=0 border=0>"; - $rank = 1; +// if ($xoopsModuleConfig['jobs_moderate_resume'] == '1' || $xoopsModuleConfig['jobs_moderate_res_up'] == '1') { +// +// $result1 = $xoopsDB->query( +// "select lid, title, date from " . $xoopsDB->prefix("jobs_resume") . " WHERE valid='0' order by lid" +// ); +// $numrows1 = $xoopsDB->getRowsNum($result1); +// if ($numrows1 > 0) { +// echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_JOBS_RES_WAIT . "</legend>"; +// echo "<br />" . _AM_JOBS_THEREIS . " <b>$numrows1</b> " . _AM_JOBS_RES_WAIT . "<br /><br />"; +// echo "<table width=100% cellpadding=2 cellspacing=0 border=0>"; +// $rank = 1; +// +// while (list($lid, $title, $date) = $xoopsDB->fetchRow($result1)) { +// $title = $myts->htmlSpecialChars($title); +// $date2 = formatTimestamp($date, "s"); +// +// if (is_integer($rank / 2)) { +// $color = "even"; +// } else { +// $color = "odd"; +// } +// echo "<tr class='$color'><td><a href=\"main.php?op=IndexResumeView&lid=$lid\">$title</a></td><td align=right> $date2</td></tr>"; +// $rank++; +// } +// echo "</table>"; +// echo "</fieldset>"; +// } else { +// echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_JOBS_RES_WAIT . "</legend>"; +// echo "<br /> " . _AM_JOBS_RES_NOAPR . ""; +// echo "</fieldset><br />"; +// } +// } - while (list($lid, $title, $date) = $xoopsDB->fetchRow($result)) { - $title = $myts->htmlSpecialChars($title); - $date2 = formatTimestamp($date, "s"); - - if (is_integer($rank / 2)) { - $color = "even"; - } else { - $color = "odd"; - } - echo "<tr class='$color'><td><a href=\"main.php?op=IndexView&lid=$lid\">$title</a></td><td align=right> $date2</td></tr>"; - $rank++; - } - echo "</table><br />"; - echo "</fieldset><br />"; - } else { - - echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_JOBS_WAIT . "</legend>"; - echo "<br /> " . _AM_JOBS_NOANNVAL . "<br /><br />"; - echo "</fieldset><br />"; - } - } - - if ($xoopsModuleConfig['jobs_moderate_resume'] == '1' || $xoopsModuleConfig['jobs_moderate_res_up'] == '1') { - - $result1 = $xoopsDB->query( - "select lid, title, date from " . $xoopsDB->prefix("jobs_resume") . " WHERE valid='No' order by lid" - ); - $numrows1 = $xoopsDB->getRowsNum($result1); - if ($numrows1 > 0) { - echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_JOBS_RES_WAIT . "</legend>"; - echo "<br />" . _AM_JOBS_THEREIS . " <b>$numrows1</b> " . _AM_JOBS_RES_WAIT . "<br /><br />"; - echo "<table width=100% cellpadding=2 cellspacing=0 border=0>"; - $rank = 1; - - while (list($lid, $title, $date) = $xoopsDB->fetchRow($result1)) { - $title = $myts->htmlSpecialChars($title); - $date2 = formatTimestamp($date, "s"); - - if (is_integer($rank / 2)) { - $color = "even"; - } else { - $color = "odd"; - } - echo "<tr class='$color'><td><a href=\"main.php?op=IndexResumeView&lid=$lid\">$title</a></td><td align=right> $date2</td></tr>"; - $rank++; - } - echo "</table>"; - echo "</fieldset>"; - } else { - echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_JOBS_RES_WAIT . "</legend>"; - echo "<br /> " . _AM_JOBS_RES_NOAPR . ""; - echo "</fieldset><br />"; - } - } - // Add Listing // echo"<br /><br /><fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_JOBS_ADD_LINK // . "</legend><a href=\"submitlisting.php\">" . _AM_JOBS_ADD_LINK . "</a>"; @@ -301,7 +301,7 @@ $result = $xoopsDB->query( "select lid, cid, title, status, expire, type, company, desctext, requirements, tel, price, typeprice, contactinfo, contactinfo1, contactinfo2, date, email, submitter, usid, town, state, premium, photo from " - . $xoopsDB->prefix("jobs_listing") . " WHERE valid='No' AND lid='$lid'" + . $xoopsDB->prefix("jobs_listing") . " WHERE valid='0' AND lid='$lid'" ); $numrows = $xoopsDB->getRowsNum($result); if ($numrows > 0) { @@ -483,7 +483,7 @@ $result = $xoopsDB->query( "select lid, cid, title, status, exp, expire, private, tel, salary, typeprice, date, email, submitter, usid, town, state, valid, resume from " - . $xoopsDB->prefix("jobs_resume") . " WHERE valid='No' AND lid='$lid'" + . $xoopsDB->prefix("jobs_resume") . " WHERE valid='0' AND lid='$lid'" ); $numrows = $xoopsDB->getRowsNum($result); if ($numrows > 0) { @@ -754,7 +754,7 @@ <option value=\"ListingDel\"> " . _AM_JOBS_DEL . " </select><input type=\"submit\" value=\"" . _AM_JOBS_GO . "\"></td> </tr></table>"; - echo "<input type=\"hidden\" name=\"valid\" value=\"Yes\">"; + echo "<input type=\"hidden\" name=\"valid\" value=\"1\">"; echo "<input type=\"hidden\" name=\"lid\" value=\"$lid\">"; echo "<input type=\"hidden\" name=\"usid\" value=\"$usid\">"; echo "<input type=\"hidden\" name=\"date\" value=\"$time\">"; Modified: XoopsModules/jobs/branches/mamba/jobs/admin/modcomp.php =================================================================== --- XoopsModules/jobs/branches/mamba/jobs/admin/modcomp.php 2012-10-27 15:06:41 UTC (rev 10238) +++ XoopsModules/jobs/branches/mamba/jobs/admin/modcomp.php 2012-10-28 08:29:50 UTC (rev 10239) @@ -150,7 +150,12 @@ xoops_cp_header(); //loadModuleAdminMenu(3, ""); + $indexAdmin = new ModuleAdmin(); + echo $indexAdmin->addNavigation("company.php"); + $indexAdmin->addItemButton(_AM_JOBS_MAN_COMPANY, 'company.php', 'list'); + echo $indexAdmin->renderButton('left', ''); + // echo "<fieldset><legend style='font-weight: bold; color: #900;'>"._AM_AM_JOBS_MOD_COMPANY."</legend>"; $token = $GLOBALS['xoopsSecurity']->createToken(); Added: XoopsModules/jobs/branches/mamba/jobs/admin/modjobs.php =================================================================== --- XoopsModules/jobs/branches/mamba/jobs/admin/modjobs.php (rev 0) +++ XoopsModules/jobs/branches/mamba/jobs/admin/modjobs.php 2012-10-28 08:29:50 UTC (rev 10239) @@ -0,0 +1,370 @@ +<?php +// ----------------------------------------------------------------------- // +// Jobs Module for Xoops 2.4.x // +// By John Mordo - jlm69 at Xoops // +// // +// // +// // +// ------------------------------------------------------------------------- // +include("admin_header.php"); + +include_once '../../../include/cp_header.php'; +$mydirname = basename(dirname(dirname(__FILE__))); +include_once (XOOPS_ROOT_PATH . "/modules/$mydirname/include/functions.php"); +include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; +$myts =& MyTextSanitizer::getInstance(); +$module_id = $xoopsModule->getVar('mid'); + + +if (!empty($_POST['submit'])) { + + $lid = !isset($_REQUEST['lid']) ? NULL : $_REQUEST['lid']; + + $cid = $myts->addSlashes($_POST["cid"]); + $title = $myts->addSlashes($_POST["title"]); + $status = $myts->addSlashes($_POST["status"]); + $expire = $myts->addSlashes($_POST["expire"]); + $type = $myts->addSlashes($_POST["type"]); + $company = $myts->addSlashes($_POST["company"]); + $desctext = $myts->addSlashes($_POST["desctext"]); + $requirements = $myts->addSlashes($_POST["requirements"]); + $tel = $myts->addSlashes($_POST["tel"]); + $price = $myts->addSlashes($_POST["price"]); + $typeprice = $myts->addSlashes($_POST["typeprice"]); + $contactinfo = $myts->addSlashes($_POST["contactinfo"]); + $contactinfo1 = $myts->addSlashes($_POST["contactinfo1"]); + $contactinfo2 = $myts->addSlashes($_POST["contactinfo2"]); + $date = $myts->addSlashes($_POST["date"]); + $email = $myts->addSlashes($_POST["email"]); + $submitter = $myts->addSlashes($_POST["submitter"]); +// $usid = $myts->addSlashes($_POST["usid"]); + $town = $myts->addSlashes($_POST["town"]); + $state = $myts->addSlashes($_POST["state"]); + $valid = $myts->addSlashes($_POST["valid"]); + $premium = $myts->addSlashes($_POST["premium"]); + $photo = $myts->addSlashes($_POST["photo"]); + $view = $myts->addSlashes($_POST["view"]); + + +// if (!empty($_FILES['resume']['name'])) { +// include_once XOOPS_ROOT_PATH . "/class/uploader.php"; +// $updir = $destination; +// $allowed_mimetypes = array('application/msword', 'application/pdf'); +// $uploader = new XoopsMediaUploader($updir, $allowed_mimetypes, $xoopsModuleConfig['jobs_resumesize']); +// $uploader->setTargetFileName($date . '_' . $_FILES['resume']['name']); +// $uploader->fetchMedia('resume'); +// if (!$uploader->upload()) { +// $errors = $uploader->getErrors(); +// redirect_header("modresume.php?lid=" . addslashes($lid) . "", 5, $errors); +// exit(); +// } else { +// if ($resume_old) { +// if (@file_exists("$destination/$resume_old")) { +// unlink("$destination/$resume_old"); +// } +// } +// $resume_old = $uploader->getSavedFileName(); +// } +// } + +// $xoopsDB->query( +// "update " . $xoopsDB->prefix("jobs_listing") +// . " set cid='$cid', title='$title', status='$status', expire='$expire', type='$type', company='$company',desctext='$desctext',requirements='$requirements',tel='$tel', price='$price', typeprice='$typeprice', contactinfo='$contactinfo',contactinfo1='$contactinfo1',contactinfo2='$contactinfo2',date='$date', email='$email', submitter='$submitter', town='$town', state='$state', valid='$valid', premium='$premium',photo='$photo',view='$view' where lid=$lid" +// ); + + //$lid = intval($_GET['lid']); + +//UPDATE `xtest256a2`.`xcac_jobs_listing` SET `title` = 'zzzzzzzzzzz', +//`desctext` = 'zzzzzzzz', +//`requirements` = 'zzzzzzzzzzzzzzzz', +//`price` = 'zzzzzzzzzzzzz', +//`contactinfo1` = 'zzzzzzzzzzz', +//`contactinfo2` = 'zzzzzzzzzzzz', +//`photo` = 'zzzzzzzzzzz' WHERE `xcac_jobs_listing`.`lid` =3; + + +$myquery = $xoopsDB->query( + "update " . $xoopsDB->prefix("jobs_listing") + . " set cid='$cid', title='$title', status='$status', expire='$expire', type='$type', company='$company', desctext='$desctext', requirements='$requirements', tel='$tel', price='$price', typeprice='$typeprice', contactinfo='$contactinfo', contactinfo1='$contactinfo1', contactinfo2='$contactinfo2', date='$date', email='$email', submitter='$submitter', town='$town', state='$state', valid='$valid', premium='$premium', photo='$photo' where lid=" + . mysql_real_escape_string($lid) . "" + ); + + + + if ($myquery) { + redirect_header("jobs.php", 3, _JOBS_JOBMOD2); + exit(); + } else { + redirect_header("jobs.php", 3, _JOBS_MODIFBEFORE); + exit(); + } + +// if ($valid == "Yes") { +// redirect_header("jobs.php", 3, _JOBS_JOBMOD2); +// exit(); +// } else { +// redirect_header("jobs.php", 3, _JOBS_MODIFBEFORE); +// exit(); +// } + +} else { + + xoops_cp_header(); + //loadModuleAdminMenu(3, ""); + + $adminMenu = new ModuleAdmin(); + echo $adminMenu->addNavigation("jobs.php"); + //$adminMenu->addItemButton(_AM_JOBS_NEWCATEGORY, 'resume_categories.php?op=new_category', 'add'); + $adminMenu->addItemButton(_AM_JOBS_MAN_JOB, 'jobs.php', 'list'); + echo $adminMenu->renderButton('left', ''); + + include_once XOOPS_ROOT_PATH . "/modules/jobs/include/functions.php"; + include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; + include_once(XOOPS_ROOT_PATH . "/modules/$mydirname/class/jobtree.php"); + $mytree = new JobTree($xoopsDB->prefix("jobs_categories"), "cid", "pid"); + + $GLOBALS['xoopsSecurity']->getTokenHTML(); + + $lid = intval($_GET['lid']); + +// $resumesize = $xoopsModuleConfig['jobs_resumesize']; +// $resumesize1 = $xoopsModuleConfig['jobs_resumesize'] / 1024; + + $result = $xoopsDB->query( + "select lid, cid, title, status, expire, type, company, desctext, requirements, tel, price, typeprice, contactinfo, contactinfo1, contactinfo2, date, email, submitter, town, state, valid, premium, photo, view from " + . $xoopsDB->prefix("jobs_listing") . " where lid=" . mysql_real_escape_string($lid) . "" + ); + + list($lid, $cid, $title, $status, $expire, $type, $company, $desctext, $requirements, $tel, $price, $typeprice, $contactinfo, $contactinfo1, $contactinfo2, $date, $email, $submitter, $town, $state, $valid, $premium, $photo, $view) = $xoopsDB->fetchRow($result); + + + //list($lid, $cid, $name, $title, $status, $exp, $expire, $private, $tel, $typeprice, $salary, $date, $email, $submitter, $usid, $town, $state, $valid, $resume_old) = $xoopsDB->fetchRow($result); + + if ($xoopsUser) { + $calusername = $xoopsUser->uname(); + if ($submitter == $calusername || $xoopsUser->isAdmin()) { + + $lid = $myts->htmlSpecialChars($lid); + $cid = $myts->htmlSpecialChars($cid); + $title = $myts->undoHtmlSpecialChars($title); + $status = $myts->htmlSpecialChars($status); + $expire = $myts->htmlSpecialChars($expire); + $type = $myts->htmlSpecialChars($type); + $company = $myts->htmlSpecialChars($company); + $desctext = $myts->htmlSpecialChars($desctext); + $requirements = $myts->htmlSpecialChars($requirements); + $tel = $myts->htmlSpecialChars($tel); + $price = $myts->htmlSpecialChars($price); + $typeprice = $myts->htmlSpecialChars($typeprice); + $contactinfo = $myts->htmlSpecialChars($contactinfo); + $contactinfo1 = $myts->htmlSpecialChars($contactinfo1); + $contactinfo2 = $myts->htmlSpecialChars($contactinfo2); + $date = $myts->htmlSpecialChars($date); + $email = $myts->htmlSpecialChars($email); + $submitter = $myts->htmlSpecialChars($submitter); +// $usid = $myts->htmlSpecialChars($usid); + $town = $myts->htmlSpecialChars($town); + $state = $myts->htmlSpecialChars($state); + $valid = $myts->htmlSpecialChars($valid); + $premium = $myts->htmlSpecialChars($premium); + $photo = $myts->htmlSpecialChars($photo); + $view = $myts->htmlSpecialChars($view); + + + $useroffset = ""; + $timezone = $xoopsUser->timezone(); + if (isset($timezone)) { + $useroffset = $xoopsUser->timezone(); + } else { + $useroffset = $xoopsConfig['default_TZ']; + } + + $dates = ($useroffset * 3600) + $date; + $dates = formatTimestamp($date, "s"); + $del_old = ""; + + $result1 = $xoopsDB->query( + "select nom_price from " . $xoopsDB->prefix("jobs_price") . " order by id_price" + ); + + ob_start(); + $form = new XoopsThemeForm(_AM_JOBS_MODANN, 'modify_jobs', 'modjobs.php'); + $form->setExtra('enctype="multipart/form-data"'); + $GLOBALS['xoopsGTicket']->addTicketXoopsFormElement($form, __LINE__, 1800, 'token'); + + $form->addElement(new XoopsFormLabel(_AM_JOBS_NUMANN, $lid . " " . _AM_JOBS_ADDED . " " . $dates)); + $form->addElement(new XoopsFormLabel(_AM_JOBS_SENDBY, $submitter)); + + + $form->addElement(new XoopsFormText(_AM_JOBS_EMAIL, "email", 30, 30, $email), FALSE); + $form->addElement(new XoopsFormText(_AM_JOBS_COMPANY, "company", 30, 30, $company), FALSE); + $form->addElement(new XoopsFormText(_AM_JOBS_TITLE, "title", 30, 30, $title), FALSE); + + $statusRadio = new XoopsFormRadio(_AM_JOBS_STATUS, 'status', $status); + $statusOptions["1"] = _AM_JOBS_ACTIVE; + $statusOptions["0"] = _AM_JOBS_INACTIVE; + $statusRadio->addOptionArray($statusOptions); + $form->addElement($statusRadio, FALSE); + + $form->addElement(new XoopsFormText(_AM_JOBS_EXPIRE, "expire", 30, 30, $expire), FALSE); + + + $type_form = new XoopsFormSelect(_AM_JOBS_TYPE, "type", $type, "1", FALSE); + $result5 = $xoopsDB->query("select nom_type from " . $xoopsDB->prefix("jobs_type") . " order by nom_type"); + while (list($nom_type) = $xoopsDB->fetchRow($result5)) { + $type_form->addOption($nom_type, $nom_type); + } + $form->addElement($type_form, TRUE); + + $cat_form = (new XoopsFormSelect(_AM_JOBS_CAT, 'cid', $cid)); + $cattree = $mytree->getChildTreeArray(0, "title ASC"); + $cat_form->addOption('', _AM_JOBS_SELECTCAT); + foreach ($cattree as $branch) { + $branch['prefix'] = substr($branch['prefix'], 0, -1); + $branch['prefix'] = str_replace(".", "--", $branch['prefix']); + $cat_form->addOption($branch['cid'], $branch['prefix'] . $branch['title']); + } + $form->addElement($cat_form, TRUE); + + + $wysiwyg_text_area = jobs_getEditor(_AM_JOBS_DESC2, 'desctext', $desctext, '100%', '200px', 'small'); + $form->addElement($wysiwyg_text_area, TRUE); + + $wysiwyg_requirements_area = jobs_getEditor(_AM_JOBS_REQUIRE, 'requirements', $requirements, '100%', '200px', 'small'); + $form->addElement($wysiwyg_requirements_area, TRUE); + + $salary_tray= new XoopsFormElementTray(_AM_JOBS_PRICE2); + + $price_form = new XoopsFormSelect('', "typeprice", $typeprice, "1", FALSE); + $result = $xoopsDB->query("select nom_price from " . $xoopsDB->prefix("jobs_price") . " order by nom_price"); + while (list($nom_price) = $xoopsDB->fetchRow($result)) { + $price_form->addOption($nom_price, $nom_price); + } + $salary_tray->addElement(new XoopsFormText($xoopsModuleConfig['jobs_money'], "price", 35, 100, $price)); + $salary_tray->addElement($price_form); + $form->addElement($salary_tray, FALSE); + + $form->addElement(new XoopsFormText(_AM_JOBS_TEL, "tel", 30, 30, $tel), FALSE); + $form->addElement(new XoopsFormText(_AM_JOBS_TOWN, "town", 30, 30, $town), FALSE); + +// $state_form = new XoopsFormSelect(_AM_JOBS_STATE, "state", $state, "1", FALSE); +// $result2 = $xoopsDB->query("select rid, name from " . $xoopsDB->prefix("jobs_region") . " order by rid"); +// while (list($rid, $name) = $xoopsDB->fetchRow($result2)) { +// $state_form->addOption('', _AM_JOBS_SELECT_STATE); +// $state_form->addOption($rid, $name); +// } + +// $result5 = $xoopsDB->query("select rid, name from " . $xoopsDB->prefix("jobs_region") . " order by rid"); +// while (list($rid, $name) = $xoopsDB->fetchRow($result5)) { +// $sel = ""; +// if ($rid == $state) { +// $sel = "selected"; +// } +// +// +// $form->addElement($state_form, TRUE); + $result2 = $xoopsDB->query("select rid, name from " . $xoopsDB->prefix("jobs_region") . " order by rid"); + $state_form = new XoopsFormSelect(_AM_JOBS_STATE, "state", $state, "1", FALSE); + while (list($rid, $name) = $xoopsDB->fetchRow($result2)) { + $state_form->addOption('', _AM_JOBS_SELECT_STATE); + $state_form->addOption($rid, $name); + } + $form->addElement($state_form, TRUE); + + + + $form->addElement(new XoopsFormTextArea(_AM_JOBS_CONTACTINFO, "contactinfo", $contactinfo, 4,28), FALSE); + $form->addElement(new XoopsFormTextArea(_AM_JOBS_CONTACTINFO1, "contactinfo1", $contactinfo1,4,28), FALSE); + $form->addElement(new XoopsFormTextArea(_AM_JOBS_CONTACTINFO2, "contactinfo2", $contactinfo2, 4,28), FALSE); + + +// $form->addElement(new XoopsFormText(_AM_JOBS_RES_HOW_LONG, "expire", 30, 30, $expire), FALSE); +// +// $radio = new XoopsFormRadio(_AM_JOBS_STATUS, 'status', $status); +// $options["1"] = _AM_JOBS_ACTIVE; +// $options["0"] = _AM_JOBS_INACTIVE; +// $radio->addOptionArray($options); +// $form->addElement($radio, TRUE); +// +// $form->addElement(new XoopsFormText(_AM_JOBS_EMAIL, "email", 30, 30, $email), FALSE); +// $form->addElement(new XoopsFormText(_AM_JOBS_TEL, "tel", 30, 30, $tel), FALSE); +// $form->addElement(new XoopsFormText(_AM_JOBS_TOWN, "town", 30, 30, $town), FALSE); +// +// $state_form = new XoopsFormSelect(_AM_JOBS_STATE, "state", $state, "1", FALSE); +// while (list($rid, $name) = $xoopsDB->fetchRow($result2)) { +// $state_form->addOption('', _AM_JOBS_SELECT_STATE); +// $state_form->addOption($rid, $name); +// } +// $form->addElement($state_form, TRUE); + +// $form->addElement(new XoopsFormText(_AM_JOBS_PRICE2, "salary", 40, 50, $salary), FALSE); +// $sel_form = new XoopsFormSelect(_AM_JOBS_SALARYTYPE, "typeprice", $typeprice, "1", FALSE); +// while (list($nom_price) = $xoopsDB->fetchRow($result1)) { +// $sel_form->addOption($nom_price, $nom_price); +// } +// $form->addElement($sel_form); + +// if ($resume_old) { +// if ($resume_old != 'created') { +// $resume_link = "<a href=\"resumes/$resume_old\">$resume_old</a>"; +// +// $form->addElement(new XoopsFormLabel(_AM_JOBS_ACTUALRES, $resume_link)); +// +// $del_checkbox = new XoopsFormCheckBox(_AM_JOBS_DELRES, 'del_old', $del_old); +// $del_checkbox->addOption(1, "Yes"); +// $form->addElement($del_checkbox); +// $form->addElement(new XoopsFormFile(_AM_JOBS_UP_NEW_RESUME, 'resume', $xoopsModuleConfig['jobs_maxfilesize']), FALSE); +// $form->addElement(new XoopsFormHidden('resume_old', $resume_old)); +// +// } else { +// +// $resume_link = "<a href=\"../myresume.php?lid=" . addslashes($lid) . "\">$resume_old</a>"; +// $form->addElement(new XoopsFormLabel(_AM_JOBS_ACTUALRES, $resume_link)); +// $del_made_resume = new XoopsFormCheckBox(_AM_JOBS_DELRES, 'del_made_resume', $del_made_resume); +// $del_made_resume->addOption(1, "Yes"); +// $form->addElement($del_made_resume); +// $form->addElement(new XoopsFormHidden('resume_old', $resume_old)); +// } +// } else { +// $form->addElement(new XoopsFormFile(_AM_JOBS_NEWRES, 'resume', $xoopsModuleConfig['jobs_maxfilesize']), FALSE); +// } + +// $res_radio = new XoopsFormRadio(_AM_JOBS_Q_NO_RESUME, 'make_resume', "0"); +// $options["0"] = _AM_JOBS_DONT_MAKE; +// $options["1"] = _AM_JOBS_MAKE_RESUME; +// $res_radio->addOptionArray($options); +// $form->addElement($res_radio, TRUE); + + $validRadio = new XoopsFormRadio(_AM_JOBS_PUBLISHEDCAP, 'valid', $valid); + $validOptions["1"] = _YES; + $validOptions["0"] = _NO; + $validRadio->addOptionArray($validOptions); + $form->addElement($validRadio, FALSE); + + $premiumRadio = new XoopsFormRadio(_AM_JOBS_PREMIUM, 'premium', $premium); + $premiumOptions["1"] = _YES; + $premiumOptions["0"] = _NO; + $premiumRadio->addOptionArray($premiumOptions); + $form->addElement($premiumRadio, TRUE); + + +// if ($xoopsModuleConfig['jobs_moderate_res_up'] == 0) { +// $form->addElement(new XoopsFormHidden("valid", "1"), FALSE); +// } else { +// $form->addElement(new XoopsFormHidden("valid", "0"), FALSE); +// } + + $form->addElement(new XoopsFormHidden("lid", $lid), FALSE); + $form->addElement(new XoopsFormHidden("date", $date), FALSE); + $form->addElement(new XoopsFormHidden("submit", "1"), FALSE); + $form->addElement(new XoopsFormHidden("submitter", $submitter), FALSE); + $form->addElement(new XoopsFormButton('', 'submit', _AM_JOBS_SUBMIT, 'submit')); + $form->display(); + $submit_form = ob_get_contents(); + ob_end_clean(); + echo $submit_form; + } + } +} +xoops_cp_footer(); +?> \ No newline at end of file Modified: XoopsModules/jobs/branches/mamba/jobs/admin/modresume.php =================================================================== --- XoopsModules/jobs/branches/mamba/jobs/admin/modresume.php 2012-10-27 15:06:41 UTC (rev 10238) +++ XoopsModules/jobs/branches/mamba/jobs/admin/modresume.php 2012-10-28 08:29:50 UTC (rev 10239) @@ -97,6 +97,12 @@ xoops_cp_header(); //loadModuleAdminMenu(3, ""); + +$indexAdmin = new ModuleAdmin(); +echo $indexAdmin->addNavigation("resumes.php"); +$indexAdmin->addItemButton(_AM_JOBS_MAN_RESUME, 'resumes.php', 'list'); +echo $indexAdmin->renderButton('left', ''); + include_once XOOPS_ROOT_PATH . "/modules/jobs/include/resume_functions.php"; include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; include_once(XOOPS_ROOT_PATH . "/modules/$mydirname/class/restree.php"); @@ -110,10 +116,10 @@ $resumesize1 = $xoopsModuleConfig['jobs_resumesize'] / 1024; $result = $xoopsDB->query( - "select lid, cid, name, title, status, exp, expire, private, tel, salary, date, email, submitter, usid, town, state, valid, resume from " + "select lid, cid, name, title, status, exp, expire, private, tel, typeprice, salary, date, email, submitter, usid, town, state, valid, resume from " . $xoopsDB->prefix("jobs_resume") . " where lid=" . mysql_real_escape_string($lid) . "" ); - list($lid, $cid, $name, $title, $status, $exp, $expire, $private, $tel, $salary, $date, $email, $submitter, $usid, $town, $state, $valid, $resume_old) = $xoopsDB->fetchRow($result); + list($lid, $cid, $name, $title, $status, $exp, $expire, $private, $tel, $typeprice, $salary, $date, $email, $submitter, $usid, $town, $state, $valid, $resume_old) = $xoopsDB->fetchRow($result); if ($xoopsUser) { $calusern = $xoopsUser->uid(); @@ -231,12 +237,20 @@ $res_radio->addOptionArray($options); $form->addElement($res_radio, TRUE); - if ($xoopsModuleConfig['jobs_moderate_res_up'] == 0) { - $form->addElement(new XoopsFormHidden("valid", "Yes"), FALSE); - } else { - $form->addElement(new XoopsFormHidden("valid", "No"), FALSE); - } + $validRadio = new XoopsFormRadio(_AM_JOBS_PUBLISHEDCAP, 'valid', $valid); + $validOptions["1"] = _YES; + $validOptions["0"] = _NO; + $validRadio->addOptionArray($validOptions); + $form->addElement($validRadio, FALSE); + + +// if ($xoopsModuleConfig['jobs_moderate_res_up'] == 0) { +// $form->addElement(new XoopsFormHidden("valid", "1"), FALSE); +// } else { +// $form->addElement(new XoopsFormHidden("valid", "0"), FALSE); +// } + $form->addElement(new XoopsFormHidden("lid", $lid), FALSE); $form->addElement(new XoopsFormHidden("date", $date), FALSE); $form->addElement(new XoopsFormHidden("submit", "1"), FALSE); Modified: XoopsModules/jobs/branches/mamba/jobs/admin/resume_categories.php =================================================================== --- XoopsModules/jobs/branches/mamba/jobs/admin/resume_categories.php 2012-10-27 15:06:41 UTC (rev 10238) +++ XoopsModules/jobs/branches/mamba/jobs/admin/resume_categories.php 2012-10-28 08:29:50 UTC (rev 10239) @@ -59,8 +59,8 @@ echo "<tr class='" . $class . "'>"; echo "<td align=\"left\">" . $prefix . " " . $category_arr[$i]->getVar("title") . "</td>"; -// echo"<td align=\"center\"><img src=\"" . XOOPS_URL . "/uploads/jobs/category/category_img/". $category_arr[$i]->getVar("img") -// . "\" height=\"30px\" title=\"img\" alt=\"img\"></td>"; + echo"<td align=\"center\"><img src=\"" . XOOPS_URL . "/modules/jobs/images/cat/". $category_arr[$i]->getVar("img") + . "\" height=\"16px\" title=\"img\" alt=\"img\"></td>"; echo "<td align=\"center\">" . $category_arr[$i]->getVar("ordre") . "</td>"; echo"<td align=\"center\">" . $category_arr[$i]->getVar("affprice") . "</td>"; @@ -90,6 +90,7 @@ echo "<table width='100%' cellspacing='1' class='outer'> <tr> <th align=\"center\">" . _AM_JOBS_RES_CATEGORY . "</th> + <th align=\"center\">" . _AM_JOBS_IMGCAT . "</th> <th align=\"center\">" . _AM_JOBS_ORDRE . "</th> <th align=\"center\">" . _AM_JOBS_PAYMENT . "</th> <th align='center' width='10%'>" . _AM_JOBS_ACTIONS . "</th> @@ -105,9 +106,9 @@ echo "<tr class='" . $class . "'>"; echo "<td align=\"left\">" . $prefix . " " . $category_arr[$i]->getVar("title") . "</td>"; -// echo"<td align=\"center\"><img src=\"" . XOOPS_URL . "/uploads/test1/category/category_img/" -// . $category_arr[$i]->getVar("category_img") -// . "\" height=\"30px\" title=\"category_img\" alt=\"category_img\"></td>"; + echo"<td align=\"center\"><img src=\"" . XOOPS_URL . "/modules/jobs/images/cat/" + . $category_arr[$i]->getVar("img") + . "\" height=\"16px\" title=\"img\" alt=\"img\"></td>"; echo "<td align=\"center\">" . $category_arr[$i]->getVar("ordre") . "</td>"; @@ -170,21 +171,21 @@ //Form category_desc //mb $obj->setVar("category_desc", $_REQUEST["category_desc"]); //Form category_img -// include_once XOOPS_ROOT_PATH . "/class/uploader.php"; -// $uploaddir = XOOPS_UPLOAD_PATH . "/test1/images/"; -// $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS["xoopsModuleConfig"]["category_img_mimetypes"], $GLOBALS["xoopsModuleConfig"]["category_img_size"], NULL, NULL); -// if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { -// $uploader->setPrefix("category_img_"); -// $uploader->fetchMedia($_POST['xoops_upload_file'][0]); -// if (!$uploader->upload()) { -// $errors = $uploader->getErrors(); -// redirect_header("javascript:history.go(-1)", 3, $errors); -// } else { -// $obj->setVar("category_img", $uploader->getSavedFileName()); -// } -// } else { -// $obj->setVar("category_img", $_REQUEST["category_img"]); -// } + include_once XOOPS_ROOT_PATH . "/class/uploader.php"; + $uploaddir = XOOPS_UPLOAD_PATH . "/jobs/images/"; + $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS["xoopsModuleConfig"]["category_img_mimetypes"], $GLOBALS["xoopsModuleConfig"]["category_img_size"], NULL, NULL); + if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { + $uploader->setPrefix("category_img_"); + $uploader->fetchMedia($_POST['xoops_upload_file'][0]); + if (!$uploader->upload()) { + $errors = $uploader->getErrors(); + redirect_header("javascript:history.go(-1)", 3, $errors); + } else { + $obj->setVar("img", $uploader->getSavedFileName()); + } + } else { + $obj->setVar("img", $_REQUEST["img"]); + } //Form category_weight $obj->setVar("ordre", $_REQUEST["ordre"]); //Form category_color @@ -203,10 +204,10 @@ case "edit_category": xoops_cp_header(); $adminMenu = new ModuleAdmin(); - echo $adminMenu->addNavigation("resume_categories.php"); - $adminMenu->addItemButton(_AM_JOBS_NEWCATEGORY, 'resume_categories.php?op=new_category', 'add'); - $adminMenu->addItemButton(_AM_JOBS_CATEGORYLIST, 'resume_categories.php?op=list', 'list'); - echo $adminMenu->renderButton(); + echo $adminMenu->addNavigation("resumes.php"); + //$adminMenu->addItemButton(_AM_JOBS_NEWCATEGORY, 'resume_categories.php?op=new_category', 'add'); + $adminMenu->addItemButton(_AM_JOBS_CATEGORYLIST, 'resumes.php', 'list'); + echo $adminMenu->renderButton('left', ''); $obj = $jobsJobs_res_categoriesHandler->get($_REQUEST["cid"]); $form = $obj->getForm(); $form->display(); Modified: XoopsModules/jobs/branches/mamba/jobs/admin/resumes.php =================================================================== --- XoopsModules/jobs/branches/mamba/jobs/admin/resumes.php 2012-10-27 15:06:41 UTC (rev 10238) +++ XoopsModules/jobs/branches/mamba/jobs/admin/resumes.php 2012-10-28 08:29:50 UTC (rev 10239) @@ -7,7 +7,7 @@ include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; -include_once(XOOPS_ROOT_PATH . "/modules/$mydirname/class/jobtree.php"); +include_once(XOOPS_ROOT_PATH . "/modules/$mydirname/class/restree.php"); $myts =& MyTextSanitizer::getInstance(); @@ -38,7 +38,7 @@ } $sql - = "select lid, title, name, date, status, expire, submitter, resume from " . $xoopsDB->prefix("jobs_resume") + = "select lid, title, name, date, status, expire, submitter, valid, resume from " . $xoopsDB->prefix("jobs_resume") . " ORDER BY lid"; $result1 = $xoopsDB->query($sql, $show, $start); @@ -53,6 +53,7 @@ <th align=\"center\">" . _AM_JOBS_EXPIRES . "</th> <th align=\"center\">" . _AM_JOBS_ACTIVE . "</th> <th align=\"center\">" . _AM_JOBS_SUBMITTER . "</th> + <th align=\"center\">" . _AM_JOBS_PUBLISHEDCAP . "</th> <th align=\"center\">" . _AM_JOBS_RESUME . "</th> <th align='center' width='10%'>" . _AM_JOBS_ACTIONS . "</th> @@ -60,7 +61,7 @@ $class = "odd"; $result1 = $xoopsDB->query($sql, $show, $start); - while (list($lid, $title, $name, $date, $status, $expire, $submitter, $resume) = $xoopsDB->fetchRow($result1)) { + while (list($lid, $title, $name, $date, $status, $expire, $submitter, $valid, $resume) = $xoopsDB->fetchRow($result1)) { $name = $myts->htmlSpecialChars($name); $title = $myts->htmlSpecialChars($title); $date2 = formatTimestamp($date, "s"); @@ -75,6 +76,7 @@ echo "<td align=\"center\">" . $expire . "</td>"; echo "<td align=\"center\">" . $status . "</td>"; echo "<td align=\"center\">" . $submitter . "</td>"; + echo "<td align=\"center\">" . $valid . "</td>"; echo "<td align=\"center\">" . $resume . "</td>"; echo "<td align='center' width='10%'> Modified: XoopsModules/jobs/branches/mamba/jobs/admin/submitlisting.php =================================================================== --- XoopsModules/jobs/branches/mamba/jobs/admin/submitlisting.php 2012-10-27 15:06:41 UTC (rev 10238) +++ XoopsModules/jobs/branches/mamba/jobs/admin/submitlisting.php 2012-10-28 08:29:50 UTC (rev 10239) @@ -118,7 +118,7 @@ ); $xoopsDB->query($sql); - if ($valid == 'Yes') { + if ($valid == '1') { $notification_handler =& xoops_gethandler('notification'); $lid = $xoopsDB->getInsertId(); @@ -296,7 +296,7 @@ } else { $form->addElement(new XoopsFormTextArea(_AM_JOBS_CONTACTINFO2, "contactinfo2", "", 6, 40), FALSE); } - $form->addElement(new XoopsFormHidden("valid", "Yes"), FALSE); + $form->addElement(new XoopsFormHidden("valid", "1"), FALSE); $form->addElement(new XoopsFormHidden("comp_id", $company["comp_id"]), FALSE); $form->addElement(new XoopsFormButton('', 'submit', _AM_JOBS_SUBMIT, 'submit')); $form->display(); @@ -341,7 +341,7 @@ } $form->addElement($sel_form); $form->addElement(new XoopsFormTextArea(_AM_JOBS_CONTACTINFO, "contactinfo", '', 6, 40), FALSE); - $form->addElement(new XoopsFormHidden("valid", "Yes"), FALSE); + $form->addElement(new XoopsFormHidden("valid", "1"), FALSE); $form->addElement(new XoopsFormHidden("comp_id", ""), FALSE); $form->addElement(new XoopsFormHidden("company", ""), FALSE); $form->addElement(new XoopsFormHidden("contactinfo1", ""), FALSE); Modified: XoopsModules/jobs/branches/mamba/jobs/blocks/jobs.php =================================================================== --- XoopsModules/jobs/branches/mamba/jobs/blocks/jobs.php 2012-10-27 15:06:41 UTC (rev 10238) +++ XoopsModules/jobs/branches/mamba/jobs/blocks/jobs.php 2012-10-28 08:29:50 UTC (rev 10239) @@ -38,7 +38,7 @@ $result = $xoopsDB->query( "SELECT lid, cid, title, status, expire, type, company, desctext, requirements, tel, price, typeprice, contactinfo, date, email, submitter, usid, town, state, valid, photo, view FROM " . $xoopsDB->prefix("" . $blockdirname . "_listing") - . " WHERE valid='Yes' and status!='1' $cat_perms ORDER BY " . $options[0] . " DESC", $options[1], 0 + . " WHERE valid='1' and status!='1' $cat_perms ORDER BY " . $options[0] . " DESC", $options[1], 0 ); while ($myrow = $xoopsDB->fetchArray($result)) { Modified: XoopsModules/jobs/branches/mamba/jobs/blocks/jobs2.php =================================================================== --- XoopsModules/jobs/branches/mamba/jobs/blocks/jobs2.php 2012-10-27 15:06:41 UTC (rev 10238) +++ XoopsModules/jobs/branches/mamba/jobs/blocks/jobs2.php 2012-10-28 08:29:50 UTC (rev 10239) @@ -37,7 +37,7 @@ $result = $xoopsDB->query( "SELECT c.comp_id, c.comp_name, c.comp_img, l.company FROM " . $xoopsDB->prefix("jobs_companies") . " AS c LEFT OUTER JOIN " . $xoopsDB->prefix("jobs_listing") - . " AS l on c.comp_name = l.company WHERE l.valid = 'Yes' and l.status!='0' $cat_perms GROUP BY c.comp_img" + . " AS l on c.comp_name = l.company WHERE l.valid = '1' and l.status!='0' $cat_perms GROUP BY c.comp_img" ); while (list($comp_id, $comp_name, $comp_img, $company) = $xoopsDB->fetchRow($result)) { Modified: XoopsModules/jobs/branches/mamba/jobs/blocks/jobs_b_premium.php =================================================================== --- XoopsModules/jobs/branches/mamba/jobs/blocks/jobs_b_premium.php 2012-10-27 15:06:41 UTC (rev 10238) +++ XoopsModules/jobs/branches/mamba/jobs/blocks/jobs_b_premium.php 2012-10-28 08:29:50 UTC (rev 10239) @@ -41,7 +41,7 @@ $result = $xoopsDB->query( "SELECT c.comp_id, c.comp_name, c.comp_img, l.lid, l.title, l.type, l.company, l.typeprice, l.town, l.state, l.date, l.view FROM " . $xoopsDB->prefix("jobs_companies") . " AS c LEFT OUTER JOIN " . $xoopsDB->prefix("jobs_listing") - . " AS l on c.comp_name = l.company WHERE l.valid = 'Yes' and l.status!='0' and l.premium='1' $cat_perms" + . " AS l on c.comp_name = l.company WHERE l.valid = '1' and l.status!='0' and l.premium='1' $cat_perms" ); while (list($comp_id, $comp_name, $comp_img, $lid, $title, $type, $company, $typeprice, $town, $state, $date, $view) = $xoopsDB->fetchRow($result)) { Modified: XoopsModules/jobs/branches/mamba/jobs/blocks/resumes.php ====================================... [truncated message content] |
From: <du...@us...> - 2012-10-27 15:06:42
|
Revision: 10238 http://sourceforge.net/p/xoops/svn/10238 Author: dugris Date: 2012-10-27 15:06:41 +0000 (Sat, 27 Oct 2012) Log Message: ----------- fix define in xcaptcha Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/image.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/text.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/image.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/image.php 2012-10-26 17:40:36 UTC (rev 10237) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/image.php 2012-10-27 15:06:41 UTC (rev 10238) @@ -22,7 +22,9 @@ if ( !defined('_XCAPTCHA_IMAGE') ) { define('_XCAPTCHA_FORM_IMAGE', 'Configuration CAPTCHA : Image'); - define('_XCAPTCHA_NUM_CHARS', 'Number of characters'); + if (!defined('_XCAPTCHA_NUM_CHARS')) { + define('_XCAPTCHA_NUM_CHARS', 'Number of characters'); + } define('_XCAPTCHA_CASESENSITIVE', 'Case insensitive'); define('_XCAPTCHA_FONTSIZE_MIN', 'Minimum size of the font'); define('_XCAPTCHA_FONTSIZE_MAX', 'Maximum size of the font'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/text.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/text.php 2012-10-26 17:40:36 UTC (rev 10237) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/text.php 2012-10-27 15:06:41 UTC (rev 10238) @@ -20,7 +20,9 @@ if ( !defined('_XCAPTCHA_TEXT') ) { define('_XCAPTCHA_FORM_TEXT', 'Configuration CAPTCHA : Texte'); - //define('_XCAPTCHA_NUM_CHARS', 'Number of characters'); + if (!defined('_XCAPTCHA_NUM_CHARS')) { + define('_XCAPTCHA_NUM_CHARS', 'Number of characters'); + } define('_XCAPTCHA_TEXT', true); } |
From: <ma...@us...> - 2012-10-26 17:40:38
|
Revision: 10237 http://sourceforge.net/p/xoops/svn/10237 Author: mageg Date: 2012-10-26 17:40:36 +0000 (Fri, 26 Oct 2012) Log Message: ----------- fix define in xcaptcha Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/text.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/text.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/text.php 2012-10-26 17:37:20 UTC (rev 10236) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/text.php 2012-10-26 17:40:36 UTC (rev 10237) @@ -20,7 +20,7 @@ if ( !defined('_XCAPTCHA_TEXT') ) { define('_XCAPTCHA_FORM_TEXT', 'Configuration CAPTCHA : Texte'); - define('_XCAPTCHA_NUM_CHARS', 'Number of characters'); + //define('_XCAPTCHA_NUM_CHARS', 'Number of characters'); define('_XCAPTCHA_TEXT', true); } |
From: <ma...@us...> - 2012-10-26 17:37:22
|
Revision: 10236 http://sourceforge.net/p/xoops/svn/10236 Author: mageg Date: 2012-10-26 17:37:20 +0000 (Fri, 26 Oct 2012) Log Message: ----------- change redirect_header() by $xoops->redirect() in xcaptcha and xlanguage Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/index.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/index.php 2012-10-26 01:43:51 UTC (rev 10235) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/index.php 2012-10-26 17:37:20 UTC (rev 10236) @@ -22,17 +22,17 @@ switch ( $op ) { case 'save': if ( !$GLOBALS['xoopsSecurity']->check() ) { - redirect_header('index.php', 5, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + $xoops->redirect('index.php', 5, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); } if ( $type == 'config' ) { $config = $xcaptcha_handler->VerifyData(); $xcaptcha_handler->writeConfig('captcha.config', $config ); - redirect_header('index.php?type=config', 5, _AM_XCAPTCHA_SAVED); + $xoops->redirect('index.php?type=config', 5, _AM_XCAPTCHA_SAVED); } else { if ($xcaptcha_handler->loadPluginHandler( $type )) { $config = $xcaptcha_handler->Pluginhandler->VerifyData(); $xcaptcha_handler->writeConfig('captcha.config.' . $type, $config ); - redirect_header('index.php?type=' . $type, 5, _AM_XCAPTCHA_SAVED); + $xoops->redirect('index.php?type=' . $type, 5, _AM_XCAPTCHA_SAVED); } } break; @@ -55,7 +55,7 @@ $admin_page->addInfoBox( $title ); $admin_page->addInfoBoxLine($xcaptcha_handler->Pluginhandler->getForm()); } else { - redirect_header('index.php', 5, _AM_XCAPTCHA_ERROR); + $xoops->redirect('index.php', 5, _AM_XCAPTCHA_ERROR); } } $admin_page->renderIndex(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/index.php 2012-10-26 01:43:51 UTC (rev 10235) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/index.php 2012-10-26 17:37:20 UTC (rev 10236) @@ -25,7 +25,7 @@ case 'save': if ( !$GLOBALS['xoopsSecurity']->check() ) { - redirect_header('index.php', 5, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + $xoops->redirect('index.php', 5, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); } $xlanguage_id = $system->CleanVars($_POST, 'xlanguage_id', 0, 'int'); @@ -38,7 +38,7 @@ if ($xlanguage_handler->insert($lang)) { $xlanguage_handler->createConfig(); - redirect_header('index.php', 5, _AM_XLANGUAGE_SAVED); + $xoops->redirect('index.php', 5, _AM_XLANGUAGE_SAVED); } break; @@ -55,10 +55,10 @@ $admin_page->addInfoBox(_MI_XLANGUAGE_MODIFY); $admin_page->addInfoBoxLine($lang->getForm()); } else { - redirect_header('index.php', 5); + $xoops->redirect('index.php', 5); } } else { - redirect_header('index.php', 5); + $xoops->redirect('index.php', 5); } break; @@ -69,30 +69,30 @@ $delete = $system->CleanVars( $_POST, 'ok', 0, 'int' ); if ($delete == 1) { if ( !$GLOBALS['xoopsSecurity']->check() ) { - redirect_header('index.php', 5, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + $xoops->redirect('index.php', 5, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); } $xlanguage_handler->delete($lang); $xlanguage_handler->createConfig(); - redirect_header('index.php', 5, _AM_XLANGUAGE_DELETED); + $xoops->redirect('index.php', 5, _AM_XLANGUAGE_DELETED); } else { ob_start(); - $xoops->confirm(array('ok' => 1, 'xlanguage_id' => $xlanguage_id, 'op' => 'del'), $_SERVER['REQUEST_URI'], sprintf(_AM_XLANGUAGE_DELETE_CFM . "<br /><b><span style='color : Red'> %s </span><br /><br />", $lang->getVar('xlanguage_name'))); + $xoops->confirm(array('ok' => 1, 'xlanguage_id' => $xlanguage_id, 'op' => 'del'), $_SERVER['REQUEST_URI'], sprintf(_AM_XLANGUAGE_DELETE_CFM . "<br /><b><span style='color : Red'> %s </span></b><br /><br />", $lang->getVar('xlanguage_name'))); $confirm = '<div class="confirm">' . ob_get_contents() . '</div>'; ob_end_clean(); $admin_page->addInfoBox(_MI_XLANGUAGE_DELETE); $admin_page->addInfoBoxLine($confirm); } } else { - redirect_header('index.php', 5); + $xoops->redirect('index.php', 5); } } else { - redirect_header('index.php', 5); + $xoops->redirect('index.php', 5); } break; case 'createconfig': $xlanguage_handler->createConfig(); - redirect_header( 'index.php', 5, _AM_XLANGUAGE_CREATED ); + $xoops->redirect( 'index.php', 5, _AM_XLANGUAGE_CREATED ); break; case 'default': |
From: <du...@us...> - 2012-10-26 01:43:55
|
Revision: 10235 http://sourceforge.net/p/xoops/svn/10235 Author: dugris Date: 2012-10-26 01:43:51 +0000 (Fri, 26 Oct 2012) Log Message: ----------- update $modversion['module_website_url'] Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/xoops_version.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/xoops_version.php 2012-10-25 13:38:21 UTC (rev 10234) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/xoops_version.php 2012-10-26 01:43:51 UTC (rev 10235) @@ -32,7 +32,7 @@ //about $modversion['release_date'] = '2012/10/01'; -$modversion['module_website_url'] = 'labs.xoofoo.org/modules/news/'; +$modversion['module_website_url'] = 'dugris.xoofoo.org'; $modversion['module_website_name'] = 'XooFoo.org - Laurent JEN'; $modversion['module_status'] = 'alpha'; $modversion['min_php'] = '5.2'; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/xoops_version.php 2012-10-25 13:38:21 UTC (rev 10234) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/xoops_version.php 2012-10-26 01:43:51 UTC (rev 10235) @@ -32,7 +32,7 @@ //about $modversion['release_date'] = '2012/10/01'; -$modversion['module_website_url'] = 'labs.xoofoo.org/modules/news/'; +$modversion['module_website_url'] = 'dugris.xoofoo.org'; $modversion['module_website_name'] = 'XooFoo.org - Laurent JEN'; $modversion['module_status'] = 'alpha'; $modversion['min_php'] = '5.2'; |
From: <du...@us...> - 2012-10-25 13:38:25
|
Revision: 10234 http://sourceforge.net/p/xoops/svn/10234 Author: dugris Date: 2012-10-25 13:38:21 +0000 (Thu, 25 Oct 2012) Log Message: ----------- xlanguage 4.00 alpha (Xoops multi-Language Management) System extensions for xoops 2.6.x Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/footer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/api.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/blocks/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/blocks/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/blocks/xlanguage_blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/xlanguage.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/css/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/css/block.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/css/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/css/moduladmin.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/docs/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/docs/changelog.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/docs/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/icons/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/icons/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/icons/logo_large.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/icons/logo_small.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/images/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/images/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/images/xlanguage_logo.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include/autoload.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include/functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include/vars.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/language/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/media/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/media/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/media/jquery/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/media/jquery/jquery.language/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/media/jquery/jquery.language/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/media/jquery/jquery.language/jquery.language.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/media/jquery/jquery.language/jquery.language.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/preloads/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/preloads/core.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/preloads/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/sql/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/sql/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/sql/mysql.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/templates/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/templates/admin/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/templates/admin/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/templates/admin/xlanguage_admin_list.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/templates/blocks/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/templates/blocks/xlanguage_block.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/templates/blocks/xlanguage_block_bootstrap.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/templates/blocks/xlanguage_block_images.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/templates/blocks/xlanguage_block_jquery.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/templates/blocks/xlanguage_block_select.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/templates/blocks/xlanguage_block_text.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/templates/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/xoops_version.php Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage ___________________________________________________________________ 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/xlanguage/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/xlanguage/admin/about.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/about.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/about.php 2012-10-25 13:38:21 UTC (rev 10234) @@ -0,0 +1,30 @@ +<?php +/** + * Xlanguage extension 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 GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xlanguage + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +include dirname(__FILE__) . '/header.php'; + +$xoops->header(); +$xoops->theme->addStylesheet('modules/xcontact/css/moduladmin.css'); + +$admin_page = new XoopsModuleAdmin(); + +$admin_page->renderNavigation('about.php'); +$admin_page->renderAbout(); +$xoops->footer(); +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/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/xlanguage/admin/footer.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/footer.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/footer.php 2012-10-25 13:38:21 UTC (rev 10234) @@ -0,0 +1,22 @@ +<?php +/** + * Xlanguage extension 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 GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xlanguage + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +$admin_page->renderIndex(); +$xoops->footer(); +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/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/xlanguage/admin/header.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/header.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/header.php 2012-10-25 13:38:21 UTC (rev 10234) @@ -0,0 +1,46 @@ +<?php +/** + * Xlanguage extension 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 GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xlanguage + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; + +$op = ''; +if ( isset( $_POST ) ){ + foreach ( $_POST as $k => $v ) { + ${$k} = $v; + } +} +if ( isset( $_GET ) ){ + foreach ( $_GET as $k => $v ) { + ${$k} = $v; + } +} + +XoopsLoad::load('system', 'system'); + +$xoops = Xoops::getInstance(); +$system = System::getInstance(); + +$xlanguage_handler = $xoops->getModuleHandler('xlanguage', 'xlanguage'); +$xlanguage_handler->loadConfig(); + +$xoops->header(); +$xoops->theme->addStylesheet('modules/xlanguage/css/moduladmin.css'); + +$admin_page = new XoopsModuleAdmin(); +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/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/xlanguage/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/index.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/index.php 2012-10-25 13:38:21 UTC (rev 10234) @@ -0,0 +1,105 @@ +<?php +/** + * Xlanguage extension 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 GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xlanguage + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +include dirname(__FILE__) . '/header.php'; + +$xoops->header(); + +switch ( $op ) { + + case 'save': + if ( !$GLOBALS['xoopsSecurity']->check() ) { + redirect_header('index.php', 5, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + } + + $xlanguage_id = $system->CleanVars($_POST, 'xlanguage_id', 0, 'int'); + if( isset($xlanguage_id) && $xlanguage_id > 0 ){ + $lang = $xlanguage_handler->get($xlanguage_id); + } else { + $lang = $xlanguage_handler->create(); + } + $lang->CleanVarsForDB(); + + if ($xlanguage_handler->insert($lang)) { + $xlanguage_handler->createConfig(); + redirect_header('index.php', 5, _AM_XLANGUAGE_SAVED); + } + break; + + case 'add': + $lang = $xlanguage_handler->create(); + $admin_page->addInfoBox(_MI_XLANGUAGE_ADD_LANG); + $admin_page->addInfoBoxLine($lang->getForm()); + break; + + case 'edit': + $xlanguage_id = $system->CleanVars($_REQUEST, 'xlanguage_id', 0, 'int'); + if( isset($xlanguage_id) && $xlanguage_id > 0 ){ + if ($lang = $xlanguage_handler->get($xlanguage_id) ) { + $admin_page->addInfoBox(_MI_XLANGUAGE_MODIFY); + $admin_page->addInfoBoxLine($lang->getForm()); + } else { + redirect_header('index.php', 5); + } + } else { + redirect_header('index.php', 5); + } + break; + + case 'del': + $xlanguage_id = $system->CleanVars($_REQUEST, 'xlanguage_id', 0, 'int'); + if( isset($xlanguage_id) && $xlanguage_id > 0 ){ + if ($lang = $xlanguage_handler->get($xlanguage_id) ) { + $delete = $system->CleanVars( $_POST, 'ok', 0, 'int' ); + if ($delete == 1) { + if ( !$GLOBALS['xoopsSecurity']->check() ) { + redirect_header('index.php', 5, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + } + $xlanguage_handler->delete($lang); + $xlanguage_handler->createConfig(); + redirect_header('index.php', 5, _AM_XLANGUAGE_DELETED); + } else { + ob_start(); + $xoops->confirm(array('ok' => 1, 'xlanguage_id' => $xlanguage_id, 'op' => 'del'), $_SERVER['REQUEST_URI'], sprintf(_AM_XLANGUAGE_DELETE_CFM . "<br /><b><span style='color : Red'> %s </span><br /><br />", $lang->getVar('xlanguage_name'))); + $confirm = '<div class="confirm">' . ob_get_contents() . '</div>'; + ob_end_clean(); + $admin_page->addInfoBox(_MI_XLANGUAGE_DELETE); + $admin_page->addInfoBoxLine($confirm); + } + } else { + redirect_header('index.php', 5); + } + } else { + redirect_header('index.php', 5); + } + break; + + case 'createconfig': + $xlanguage_handler->createConfig(); + redirect_header( 'index.php', 5, _AM_XLANGUAGE_CREATED ); + break; + + case 'default': + default: + $admin_page->addInfoBox(_AM_XLANGUAGE_LANGLIST); + $admin_page->addInfoBoxLine($xlanguage_handler->renderlist()); + break; +} +include dirname(__FILE__) . '/footer.php'; +?> Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/index.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/menu.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/menu.php 2012-10-25 13:38:21 UTC (rev 10234) @@ -0,0 +1,39 @@ +<?php +/** + * Xlanguage extension 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 GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xlanguage + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +$cpt = 0; +$adminmenu[$cpt]['title'] = _MI_XLANGUAGE_INDEX; +$adminmenu[$cpt]['link'] = 'admin/index.php'; +$adminmenu[$cpt]['icon'] = 'home.png'; + +$cpt++; +$adminmenu[$cpt]['title'] = _MI_XLANGUAGE_ADD_LANG; +$adminmenu[$cpt]['link'] = 'admin/index.php?op=add'; +$adminmenu[$cpt]['icon'] = 'add.png'; + +$cpt++; +$adminmenu[$cpt]['title'] = _MI_XLANGUAGE_CREATE_CONFIG; +$adminmenu[$cpt]['link'] = 'admin/index.php?op=createconfig'; +$adminmenu[$cpt]['icon'] = 'administration.png'; + +$cpt++; +$adminmenu[$cpt]['title'] = _MI_XLANGUAGE_ABOUT; +$adminmenu[$cpt]['link'] = 'admin/about.php'; +$adminmenu[$cpt]['icon'] = 'about.png'; +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/menu.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/api.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/api.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/api.php 2012-10-25 13:38:21 UTC (rev 10234) @@ -0,0 +1,84 @@ +<?php +/** + * Xlanguage extension 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 GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xlanguage + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +global $xoops, $xlanguage; +include_once XOOPS_ROOT_PATH . '/modules/xlanguage/include/vars.php'; +include_once XOOPS_ROOT_PATH . '/modules/xlanguage/include/functions.php'; + +$cookie_var = XLANGUAGE_LANG_TAG; + +$xlanguage['action'] = false; +if (!empty($_GET[XLANGUAGE_LANG_TAG])) { + $cookie_path = '/'; + setcookie($cookie_var, $_GET[XLANGUAGE_LANG_TAG], time()+3600*24*30, $cookie_path, '', 0); + $xlanguage['lang'] = $_GET[XLANGUAGE_LANG_TAG]; +} elseif (!empty($_COOKIE[$cookie_var])) { + $xlanguage['lang'] = $_COOKIE[$cookie_var]; +} elseif ($lang = xlanguage_detectLang()) { + $xlanguage['lang'] = $lang; +} else { + $xlanguage['lang'] = $xoops->getConfig('language'); +} + +$xlanguage_handler = $xoops->getModuleHandler('xlanguage', 'xlanguage'); +$xlanguage_handler->loadConfig(); + +$lang = $xlanguage_handler->getByName($xlanguage['lang']); + +if ( is_array($lang) && strcasecmp($lang['xlanguage_name'], $xoops->getConfig('language')) ) { + $xoops->setConfig('language', $lang['xlanguage_name']); + if ( $lang['xlanguage_charset'] ) { + $xlanguage['charset'] = $lang['xlanguage_charset']; + } + if ( $lang['xlanguage_code'] ) { + $xlanguage['code'] = $lang['xlanguage_code']; + } +} +unset($lang); + +$GLOBALS['xlanguage_handler'] = $xlanguage_handler; + +if ( $xlanguage['action'] ) { + //if(CONV_REQUEST && (!empty($_GET)||!empty($_POST))){ + if ( !empty($_POST) ) { + $in_charset = $xlanguage['charset']; + $out_charset = $xlanguage['charset_base']; + + //$CONV_REQUEST_array=array('_GET', '_POST'); + $CONV_REQUEST_array=array('_POST'); + foreach ( $CONV_REQUEST_array as $HV ) { + if ( !empty(${$HV}) ) { + ${$HV} = xlanguage_convert_encoding(${$HV}, $out_charset, $in_charset); + } + $GLOBALS['HTTP' . $HV . '_VARS'] = ${$HV}; + } + } + ob_start('xlanguage_encoding'); +} else { + ob_start('xlanguage_ml'); +} + +/* + * hardcoded scripts for language switching in theme html files + * + * see include/vars.php + */ + + +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/api.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/blocks ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/blocks/index.html =================================================================== Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/blocks/xlanguage_blocks.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/blocks/xlanguage_blocks.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/blocks/xlanguage_blocks.php 2012-10-25 13:38:21 UTC (rev 10234) @@ -0,0 +1,86 @@ +<?php +/** + * Xlanguage extension 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 GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xlanguage + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + + +function b_xlanguage_select_show($options) +{ + global $xlanguage; + $xoops = Xoops::getInstance(); + + $options[3] = $xoops->getModuleConfig('theme', 'xlanguage'); + + $block = array(); + $xlanguage_handler = $xoops->getModuleHandler('xlanguage', 'xlanguage'); + $xlanguage_handler->loadConfig(); + + if ( !is_array($xlanguage_handler->cached_config) || count($xlanguage_handler->cached_config)<1 ) { + return $block; + } + + $QUERY_STRING_array = array_filter(explode('&',$xoops->getEnv('QUERY_STRING'))); + $QUERY_STRING_new = array(); + foreach ( $QUERY_STRING_array as $QUERY ) { + if ( substr($QUERY, 0, (strlen(XLANGUAGE_LANG_TAG)+1)) != XLANGUAGE_LANG_TAG . '=' ) { + $vals = explode('=', $QUERY); + foreach ( array_keys($vals) as $key ) { + if ( preg_match('/^a-z0-9$/i', $vals[$key]) ) { + $vals[$key] = urlencode($vals[$key]); + } + } + $QUERY_STRING_new[] = implode('=', $vals); + } + } + + $block['display'] = $options[0]; + $block['delimitor'] = $options[1]; + $block['number'] = $options[2]; + + $block['selected'] = $xlanguage['lang']; + + if ( $options[0] == 'images' || $options[0] == 'text' ) { + $query_string = htmlSpecialChars(implode('&', $QUERY_STRING_new)); + $query_string .= empty($query_string) ? '' : '&'; + } else { + $query_string = implode('&', array_map('htmlspecialchars', $QUERY_STRING_new)); + $query_string .= empty($query_string) ? '' : '&'; + } + $block['url'] = $xoops->getEnv('PHP_SELF') . '?' . $query_string . XLANGUAGE_LANG_TAG . '='; + $block['languages'] = $xlanguage_handler->cached_config; + + return $block; +} + +function b_xlanguage_select_edit($options) +{ + $block_form = new XoopsFormElementTray(' ', '<br />'); + + $tmp = new XoopsFormSelect(_MB_XLANGUAGE_DISPLAY_METHOD . ' : ', 'options[0]', $options[0]); + $tmp->addOption('images', _MB_XLANGUAGE_DISPLAY_FLAGLIST); + $tmp->addOption('text', _MB_XLANGUAGE_DISPLAY_TEXTLIST); + $tmp->addOption('select', _MB_XLANGUAGE_DISPLAY_SELECT); + $tmp->addOption('jquery', _MB_XLANGUAGE_DISPLAY_JQUERY); + $tmp->addOption('bootstrap', _MB_XLANGUAGE_DISPLAY_BOOTSTRAP); + $block_form->addElement($tmp); + + $block_form->addElement(new XoopsFormText(_MB_XLANGUAGE_IMAGE_SEPARATOR . ' (' . _MB_XLANGUAGE_OPTIONAL . ') : ', 'options[1]', 5, 5, $options[1] )); + $block_form->addElement(new XoopsFormText(_MB_XLANGUAGE_IMAGE_PERROW . ' (' . _MB_XLANGUAGE_OPTIONAL . ') : ', 'options[2]', 2, 2, $options[2] )); + + return $block_form->render(); +} +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/blocks/xlanguage_blocks.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/index.html =================================================================== Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/xlanguage.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/xlanguage.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/xlanguage.php 2012-10-25 13:38:21 UTC (rev 10234) @@ -0,0 +1,216 @@ +<?php +/** + * Xlanguage extension 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 GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xlanguage + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +include_once XOOPS_ROOT_PATH . '/modules/xlanguage/include/vars.php'; + +class Xlanguage extends XoopsObject +{ + public function __construct() + { + $this->initVar('xlanguage_id' , XOBJ_DTYPE_INT , 0 , false, 10); + $this->initVar('xlanguage_name' , XOBJ_DTYPE_TXTBOX , '' , false); + $this->initVar('xlanguage_description' , XOBJ_DTYPE_TXTBOX , '' , false); + $this->initVar('xlanguage_code' , XOBJ_DTYPE_TXTBOX , '' , false); + $this->initVar('xlanguage_charset' , XOBJ_DTYPE_TXTBOX , '' , false); + $this->initVar('xlanguage_image' , XOBJ_DTYPE_TXTBOX , 'english.png' , false); + $this->initVar('xlanguage_weight' , XOBJ_DTYPE_INT , 1 , false, 10); + } + + function Xlanguage() + { + $this->__construct(); + } + + function toArray() + { + global $xoops; + $ret = parent::toArray(); + $ret['xlanguage_image'] = XOOPS_URL . '/media/xoops/images/flags/' . $xoops->getModuleConfig('theme', 'xlanguage') . '/' . $this->getVar('xlanguage_image'); + return $ret; + } + + function CleanVarsForDB() + { + global $system; + foreach ( $this->getValues() as $k => $v ) { + if ( $k != 'dohtml' ) { + if ( $this->vars[$k]['data_type'] == XOBJ_DTYPE_STIME || $this->vars[$k]['data_type'] == XOBJ_DTYPE_MTIME || $this->vars[$k]['data_type'] == XOBJ_DTYPE_LTIME) { + $value = $system->CleanVars($_POST[$k], 'date', date('Y-m-d'), 'date') + $system->CleanVars($_POST[$k], 'time', date('u'), 'int'); + $this->setVar( $k, isset( $_POST[$k] ) ? $value : $v ); + } elseif ( $this->vars[$k]['data_type'] == XOBJ_DTYPE_INT ) { + $value = $system->CleanVars($_POST, $k, $v, 'int'); + $this->setVar( $k, $value ); + } elseif ( $this->vars[$k]['data_type'] == XOBJ_DTYPE_ARRAY ) { + $value = $system->CleanVars($_POST, $k, $v, 'array'); + $this->setVar( $k, $value ); + } else { + $value = $system->CleanVars($_POST, $k, $v, 'string'); + $this->setVar( $k, $value ); + } + } + } + } + + function getForm() + { + global $xoops; + + $xlanguage_form = new XoopsThemeForm('', 'langform', $xoops->getEnv('PHP_SELF'), 'post', true); + + // language name + $xlanguage_select = new XoopsFormSelect(_AM_XLANGUAGE_NAME, 'xlanguage_name', $this->getVar('xlanguage_name')); + $xlanguage_select->addOptionArray(XoopsLists::getLangList()); + $xlanguage_form->addElement($xlanguage_select, true); + + // language description + $xlanguage_form->addElement(new XoopsFormText(_AM_XLANGUAGE_DESCRIPTION, 'xlanguage_description', 5, 10, $this->getVar('xlanguage_description') ), true); + + // language charset + $autoload = XoopsLoad::loadConfig( 'xlanguage' ); + $charset_select = new XoopsFormSelect(_AM_XLANGUAGE_CHARSET, 'xlanguage_charset', $this->getVar('xlanguage_charset')); + $charset_select->addOptionArray($autoload['charset']); + $xlanguage_form->addElement($charset_select); + + // language code + $xlanguage_form->addElement(new XoopsFormText(_AM_XLANGUAGE_CODE, 'xlanguage_code', 5, 10, $this->getVar('xlanguage_code') ), true); + + // language weight + $xlanguage_form->addElement(new XoopsFormText(_AM_XLANGUAGE_WEIGHT, 'xlanguage_weight', 5, 10, $this->getVar('xlanguage_weight') )); + + // language image + $image_option_tray = new XoopsFormElementTray(_AM_XLANGUAGE_IMAGE, ''); + $image_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . '/media/xoops/images/flags/' . $xoops->getModuleConfig('theme', 'xlanguage') . '/'); + $image_select = new XoopsFormSelect('', 'xlanguage_image', $this->getVar('xlanguage_image')); + $image_select->addOptionArray($image_array); + $image_select->setExtra("onchange='showImgSelected(\"image\", \"xlanguage_image\", \"/media/xoops/images/flags/" . $xoops->getModuleConfig('theme', 'xlanguage') . "/\", \"\", \"" . XOOPS_URL . "\")'"); + $image_tray = new XoopsFormElementTray('', ' '); + $image_tray->addElement($image_select); + $image_tray->addElement(new XoopsFormLabel('', "<div style='padding: 8px;'><img style='width:24px; height:24px; ' src='" . XOOPS_URL . "/media/xoops/images/flags/" . $xoops->getModuleConfig('theme', 'xlanguage') . "/" . $this->getVar("xlanguage_image") . "' name='image' id='image' alt='' /></div>")); + $image_option_tray->addElement($image_tray); + $xlanguage_form->addElement($image_option_tray); + + $xlanguage_form->addElement(new XoopsFormHidden('xlanguage_id', $this->getVar('xlanguage_id') )); + + $button_tray = new XoopsFormElementTray('', ''); + $button_tray->addElement(new XoopsFormHidden('op', 'save')); + $button_tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); + $button_tray->addElement(new XoopsFormButton('', 'reset', _RESET, 'reset')); + $cancel_send = new XoopsFormButton('', 'cancel', _CANCEL, 'button'); + $cancel_send->setExtra("onclick='javascript:history.go(-1);'"); + $button_tray->addElement($cancel_send); + + $xlanguage_form->addElement($button_tray); + + ob_start(); + $xlanguage_form->render(); + $ret = ob_get_contents(); + ob_end_clean(); + + return $ret; + } +} + +class XlanguageXlanguageHandler extends XoopsPersistableObjectHandler +{ + + function __construct(&$db) + { + parent::__construct($db, 'xlanguage', 'Xlanguage', 'xlanguage_id', 'xlanguage_name'); + } + + function loadConfig() + { + $this->configPath = XOOPS_VAR_PATH . '/configs/'; + $this->configFile = XLANGUAGE_CONFIG_FILE; + $this->configFileExt = '.php'; + $this->cached_config = $this->loadFileConfig(); + } + + function loadFileConfig() + { + $cached_config = $this->readConfig(); + if (empty($cached_config)) { + $cached_config = $this->createConfig(); + } + return $cached_config; + } + + function readConfig() + { + $path_file = $this->configPath . $this->configFile . $this->configFileExt; + XoopsLoad::load('XoopsFile'); + $file = XoopsFile::getHandler('file', $path_file); + return eval(@$file->read()); + } + + function createConfig() + { + $cached_config = array(); + foreach ( $this->getAllLanguage( false ) as $key => $language ) { + $cached_config[$language['xlanguage_name']] = $language; + } + $this->writeConfig($cached_config); + return $cached_config; + } + + function writeConfig($data) + { + $path_file = $this->configPath . $this->configFile . $this->configFileExt; + XoopsLoad::load('XoopsFile'); + $file = XoopsFile::getHandler('file', $path_file); + return $file->write( "return " . var_export($data, true) . ";"); + } + + function getByName($name = null) + { + global $xoops; + $lang = empty($name) ? $xoops->getConfig('language') : strtolower($name); + + $file_config = XLANGUAGE_CONFIG_FILE; + if ( !file_exists($file_config) || !isset($this->cached_config)) { + $this->loadConfig(); + } + + if ( isset($this->cached_config[$name]) ) { + return $this->cached_config[$name]; + } + return null; + } + + + function getAllLanguage( $asobject = true ) + { + $criteria = new CriteriaCompo(); + $criteria->setSort( 'xlanguage_weight' ); + $criteria->setOrder( 'asc' ); + + return parent::getAll($criteria, null, $asobject, true); + } + + function renderlist() + { + global $xoops; + $xoops->tpl->assign('theme', $xoops->getModuleConfig('theme', 'xlanguage') ); + $xoops->tpl->assign('languages', $this->getAllLanguage(false) ); + return $xoops->tpl->fetch('db:xlanguage_admin_list.html'); + } +} +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/xlanguage.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/css ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/css/block.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/css/block.css (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/css/block.css 2012-10-25 13:38:21 UTC (rev 10234) @@ -0,0 +1,55 @@ +#xo-language { + background: transparent; + color: #999999; + margin: 0; + padding: 0 15px; +} + +.text { + padding-top: 10px !important; + line-height: 18px; +} + +.text a { + color: #999999; +} + +.text a:active, .text a:hover { + color: #ffffff; +} + +.images { + padding-top: 7px !important; +} +img.flag { + width: 32px; + max-width: 32px; + filter: alpha(opacity=1000); + -moz-opacity: 1; + opacity: 1; + -khtml-opacity: 1; +} + +img.flag:hover { + filter: alpha(opacity=50); + -moz-opacity: 0.5; + opacity: 0.5; + -khtml-opacity: 0.5; +} + +.select { + padding-top: 6px !important; +} + +.jquery { + padding-top: 6px !important; + padding-bottom: 6px !important; +} + +.bootstrap { +} + +.ico-language { + background-image: url('../icons/logo_small.png'); + background-position: 0 0; +} Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/css/index.html =================================================================== Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/css/moduladmin.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/css/moduladmin.css (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/css/moduladmin.css 2012-10-25 13:38:21 UTC (rev 10234) @@ -0,0 +1,19 @@ +.xo-moduleadmin-icon { + width: 100%!important; + max-width:39%; +} +.xo-moduleadmin-box { + width: 60% !important; +} + +.errorMsg,.confirmMsg, .resultMsg { padding: .8em; text-align:center; margin-bottom: 1em; border: 2px solid #ddd;} +.errorMsg { background-color: #FBE3E4; color: #D12F19; border-color: #FBC2C4; } +.confirmMsg { background-color: #FFF6BF; color: #817134; border-color: #FFD324; } +.resultMsg { background-color: #E6EFC2; color: #529214; border-color: #C6D880; } +.errorMsg a { background-color: transparent; color: #D12F19; } +.confirmMsg a { background-color: transparent; color: #817134; } +.successMsg a { background-color: transparent; color: #529214; } + +img.flag { + width:24px; +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/docs ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/docs/changelog.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/docs/changelog.txt (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/docs/changelog.txt 2012-10-25 13:38:21 UTC (rev 10234) @@ -0,0 +1,26 @@ += CHANGES = + +<b>xlanguage 4.00</b> +- rewrite for Xoops 2.6.x Laurent JEN (aka DuGris) + +<b>xlanguage 3.02</b> +- xolanguage plugin added (see www.dugris.info) +- italian translation added (thanks to Lupin) + +<b>xlanguage 2.04</b> +- capable for different language cache, reported by suico @ xoops.org + +<b>xlanguage 2.03</b> +- "input" parse improvement, reported by irmtfan @ xoops.org + +<b>xlanguage 2.02</b> +- Thanks domifara @ dev.xoops.org + +<b>xlanguage 2.01</b> + +Credits: +1 - Adi Chiributa - web...@ar..., language handler +2 - wjue - http://www.wjue.org, ziling BIG5-GB2312 conversion +3 - GIJOE - http://www.peak.ne.jp, easiest multilanguage hack +4 - D.J.(phppp) - http://www.xoopsforge.com +5 - trabis - Xoops Module Developer \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/docs/index.html =================================================================== Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/icons ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/icons/index.html =================================================================== Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/icons/logo_large.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/icons/logo_large.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/icons/logo_small.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/icons/logo_small.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/images ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/images/index.html =================================================================== Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/images/xlanguage_logo.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/images/xlanguage_logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include/autoload.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include/autoload.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include/autoload.php 2012-10-25 13:38:21 UTC (rev 10234) @@ -0,0 +1,50 @@ +<?php +/** + * Xlanguage extension 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 GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xlanguage + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +return array ( + 'charset' => array( + 'big5' => 'big5', + 'euc-kr' => 'euc-kr', + 'iso-8859-1' => 'iso-8859-1', + 'iso-8859-2' => 'iso-8859-2', + 'iso-8859-3' => 'iso-8859-3', + 'iso-8859-4' => 'iso-8859-4', + 'iso-8859-5' => 'iso-8859-5', + 'iso-8859-6' => 'iso-8859-6', + 'iso-8859-7' => 'iso-8859-7', + 'iso-8859-8' => 'iso-8859-8', + 'koi8-r' => 'koi8-r', + 'shift-jis' => 'shift-jis', + 'x-euc' => 'x-euc', + 'utf-8' => 'utf-8', + 'windows-1250' => 'windows-1250', + 'windows-1251' => 'windows-1251', + 'windows-1252' => 'windows-1252', + 'windows-1253' => 'windows-1253', + 'windows-1254' => 'windows-1254', + 'windows-1255' => 'windows-1255', + 'windows-1256' => 'windows-1256', + 'windows-1257' => 'windows-1257', + 'windows-1258' => 'windows-1258', + 'windows-874' => 'windows-874' + ), +); +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include/autoload.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include/functions.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include/functions.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include/functions.php 2012-10-25 13:38:21 UTC (rev 10234) @@ -0,0 +1,225 @@ +<?php +/** + * Xlanguage extension 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 GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xlanguage + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +function xlanguage_convert_encoding($value, $out_charset, $in_charset) +{ + if ( is_array($value) ) { + foreach ( $value as $key => $val ) { + $value[$key] = xlanguage_convert_encoding($val, $out_charset, $in_charset); + } + } else { + $value = xlanguage_convert_item($value, $out_charset, $in_charset); + } + return $value; +} + +function xlanguage_convert_item($value, $out_charset, $in_charset) +{ + if ( strtolower($in_charset) == strtolower($out_charset) ) { + return $value; + } + $xconv_handler = @xoops_getmodulehandler('xconv', 'xconv', true); + if ( is_object($xconv_handler) && $converted_value = @$xconv_handler->convert_encoding($value, $out_charset, $in_charset) ) { + return $converted_value; + } + if ( XOOPS_USE_MULTIBYTES && function_exists('mb_convert_encoding') ) { + $converted_value = @mb_convert_encoding($value, $out_charset, $in_charset); + } elseif ( function_exists('iconv') ) { + $converted_value = @iconv($in_charset, $out_charset, $value); + } + $value = empty($converted_value) ? $value : $converted_value; + + return $value; +} + +/** + * Analyzes some PHP environment variables to find the most probable language + * that should be used + * + * @param string $ string to analyze + * @param integer $ type of the PHP environment variable which value is $str + * @global array the list of available translations + * @global string the retained translation keyword + * @access private + */ +function xlanguage_lang_detect($str = '', $envType = '') +{ + foreach ( $GLOBALS['available_languages'] AS $key => $value ) { + // $envType = 1 for the 'HTTP_ACCEPT_LANGUAGE' environment variable, + // 2 for the 'HTTP_USER_AGENT' one + $expr = $value[0]; + if ( strpos($expr, '[-_]') === FALSE ) { + $expr = str_replace('|', '([-_][[:alpha:]]{2,3})?|', $expr); + } + if ( ($envType == 1 && preg_match('^(' . $expr . ')(;q=[0-9]\\.[0-9])?$^', $str) ) || ($envType == 2 && preg_match('(\(|\[|;[[:space:]])(' . $expr . ')(;|\]|\))', $str))) { + $lang = $key; + //if ( $lang != 'en' ) + break; + } + } + return $lang; +} + +function xlanguage_detectLang() +{ + global $available_languages,$_SERVER; + + if ( !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) ) { + $HTTP_ACCEPT_LANGUAGE = $_SERVER['HTTP_ACCEPT_LANGUAGE']; + } + + if ( !empty($_SERVER['HTTP_USER_AGENT']) ) { + $HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT']; + } + + $lang = ''; + $xoops_lang =''; + // 1. try to findout user's language by checking its HTTP_ACCEPT_LANGUAGE + // variable + if ( empty($lang) && !empty($HTTP_ACCEPT_LANGUAGE) ) { + $accepted = explode(',', $HTTP_ACCEPT_LANGUAGE); + $acceptedCnt = count($accepted); + reset($accepted); + for ($i = 0; $i < $acceptedCnt; $i++) { + $lang = xlanguage_lang_detect($accepted[$i], 1); + if ( strncasecmp($lang,'en',2) ) { + break; + } + } + } + // 2. try to findout user's language by checking its HTTP_USER_AGENT variable + if ( empty($lang) && !empty($HTTP_USER_AGENT) ) { + $lang = xlanguage_lang_detect($HTTP_USER_AGENT, 2); + } + // 3. If we catch a valid language, configure it + if ( !empty($lang) ) { + $xoops_lang = $available_languages[$lang][1]; + } + return $xoops_lang; +} + +function xlanguage_encoding($output) +{ + global $xlanguage; + $output = xlanguage_ml($output); + // escape XML doc + if ( preg_match("/^\<\?[\s]?xml[\s]+version=([\"'])[^\>]+\\1[\s]+encoding=([\"'])[^\>]+\\2[\s]?\?\>/i", $output) ) { + return $output; + } + $in_charset = $xlanguage['charset_base']; + $out_charset = $xlanguage['charset']; + + return $output = xlanguage_convert_encoding($output, $out_charset, $in_charset); +} + +function xlanguage_ml($s) +{ + global $xoops, $xlanguage_langs; + if ( !is_object($xoops) ) { + $xoops = Xoops::getInstance(); + } + $xoopsConfigLanguage = $xoops->getConfig('language'); + + if ( !isset($xlanguage_langs) ) { + $langs = $GLOBALS['xlanguage_handler']->cached_config; + foreach ( array_keys($langs) as $_lang ) { + $xlanguage_langs[$_lang] = $langs[$_lang]['xlanguage_code']; + } + unset($langs); + } + if ( empty($xlanguage_langs) || count($xlanguage_langs) ==0) { + return $s; + } + + // escape brackets inside of <code>...</code> + $patterns[] = "/(\<code>.*\<\/code>)/isU"; + + // escape brackets inside of <input type='...' value='...'> + $patterns[] = '/(\<input\b(?![^\>]*\btype=([\'"]?)(submit|image|reset|button))[^\>]*\>)/isU'; + + // escape brackets inside of <textarea></textarea> + $patterns[] = "/(\<textarea\b[^>]*>[^\<]*\<\/textarea>)/isU"; + + $s = preg_replace_callback( $patterns , 'xlanguage_ml_escape_bracket' , $s ) ; + + // create the pattern between language tags + $pqhtmltags = explode( ',' , preg_quote( XLANGUAGE_TAGS_RESERVED , '/' ) ) ; + $mid_pattern = '(?:(?!(' . implode( '|' , $pqhtmltags ) . ')).)*' ; + + $patterns = array(); + $replaces = array(); + /* */ + if ( isset($xlanguage_langs[$xoopsConfigLanguage]) ) { + $lang = $xlanguage_langs[$xoopsConfigLanguage]; + $patterns[] = '/(\[([^\]]*\|)?' . preg_quote($lang) . '(\|[^\]]*)?\])(' . $mid_pattern . ')(\[\/([^\]]*\|)?' . preg_quote($lang) . '(\|[^\]]*)?\])/isU'; + $replaces[] = '$4'; + } + /* */ + foreach ( array_keys($xlanguage_langs) as $_lang ) { + if ( $_lang == $xoopsConfigLanguage ) { + continue; + } + $name = $xlanguage_langs[$_lang]; + $patterns[] = '/(\[([^\]]*\|)?' . preg_quote($name) . '(\|[^\]]*)?\])(' . $mid_pattern . ')(\[\/([^\]]*\|)?' . preg_quote($name) . '(\|[^\]]*)?(\]\<br[\s]?[\/]?\>|\]))/isU'; + $replaces[] = ''; + } + if ( !empty($xoopsConfigLanguage) ) { + $s = preg_replace( '/\[[\/]?[\|]?' . preg_quote($xoopsConfigLanguage) . '[\|]?\](\<br \/\>)?/i' , '' , $s ) ; + } + if ( count($replaces)>0 ) { + $s = preg_replace( $patterns , $replaces , $s ) ; + } + + return $s ; +} + +function xlanguage_ml_escape_bracket( $matches ) +{ + global $xlanguage_langs; + $ret = $matches[1]; + if ( !empty($xlanguage_langs) ) { + $pattern = '/(\[([\/])?(' . implode('|',array_map('preg_quote', array_values($xlanguage_langs))) . ')([\|\]]))/isU'; + $ret = preg_replace($pattern, '[\\2\\3\\4', $ret); + } + return $ret; +} + + +function xlanguage_select_show($options = null) +{ + global $xoops; + if ( !constant(XLANGUAGE_THEME_ENABLE) ) { + return false; + } + + include_once XOOPS_ROOT_PATH . '/modules/xlanguage/blocks/xlanguage_blocks.php'; + if ( empty($options) ) { + $options[0] = 'images'; // display style: image, text, select + $options[1] = ' '; // delimitor + $options[2] = 5; // items per line + } + + $block = b_xlanguage_select_show($options); + $xoops->theme->addStylesheet('modules/xlanguage/css/block.css'); + $xoops->tpl->assign('block', $block ); + $xlanguage_switch_code = "<div id='xo-language' class='" . $options[0] . "'>" . $xoops->tpl->fetch('db:xlanguage_block.html') . "</div>"; + define('XLANGUAGE_SWITCH_CODE', $xlanguage_switch_code); + return true; +} +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include/functions.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include/index.html =================================================================== Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include/vars.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include/vars.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include/vars.php 2012-10-25 13:38:21 UTC (rev 10234) @@ -0,0 +1,120 @@ +<?php +/** + * Xlanguage extension 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 GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xlanguage + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +if ( !defined('XLANGUAGE_CONFIG_FILE') ) { + define('XLANGUAGE_CONFIG_FILE', 'xlanguage'); +} +if ( !defined('XLANGUAGE_LANG_TAG') ) { + define('XLANGUAGE_LANG_TAG', 'lang'); +} +if ( !defined('XLANGUAGE_TAGS_RESERVED') ) { + define('XLANGUAGE_TAGS_RESERVED', '</head>,</body>'); +} + +/* + * hardcoded scripts for language switching in theme html files + * + * To use it: + * 1 set '$xlanguage_theme_enable = true;' + * 2 config options "$options = array('images', ' ', 5); // display mode, delimitor, number per line"; Options for display mode: image - flag; text - text; dropdown - dropdown selection box with text + * 3 insert "<{$smarty.const.XLANGUAGE_SWITCH_CODE}>" into your theme html anywhere you would like to see it present + */ + +if ( !defined('XLANGUAGE_THEME_ENABLE') ) { + define('XLANGUAGE_THEME_ENABLE', 'true'); +} + +if ( !defined('XLANGUAGE_THEME_OPTIONS') ) { + define('XLANGUAGE_THEME_OPTIONS', 'bootstrap| |5' ); // display mode, delimitor, number per line +} + + +/** + * phpMyAdmin Language Loading File + */ + +/** + * All the supported languages have to be listed in the array below. + * 1. The key must be the "official" ISO 639 language code and, if required, + * the dialect code. It can also contains some informations about the + * charset (see the Russian case). + * 2. The first of the values associated to the key is used in a regular + * expression to find some keywords corresponding to the language inside two + * environment variables. + * These values contains: + * - the "official" ISO language code and, if required, the dialect code + * also ('bu' for Bulgarian, 'fr([-_][[:alpha:]]{2})?' for all French + * dialects, 'zh[-_]tw' for Chinese traditional...); + * - the '|' character (it means 'OR'); + * - the full language name. + * 3. The second values associated to the key is the name of the file to load + * without the '.php' extension. + * 4. The last values associated to the key is the language code as defined by + * the RFC1766. + * + * Beware that the sorting order (first values associated to keys by + * alphabetical reverse order in the array) is important: 'zh-tw' (chinese + * traditional) must be detected before 'zh' (chinese simplified) for + * example. + * + * When there are more than one charset for a language, we put the -utf-8 + * first. + */ +$GLOBALS['available_languages'] = array( + 'ar' => array('ar([-_][[:alpha:]]{2})?|arabic', 'arabic'), + 'bg' => array('bg|bulgarian', 'bulgarian'), + 'ca' => array('ca|catalan', 'catalan'), + 'cs' => array('cs|czech', 'czech'), + 'da' => array('da|danish', 'danish'), + 'de' => array('de([-_][[:alpha:]]{2})?|german', 'german'), + 'el' => array('el|greek', 'greek'), + 'en' => array('en([-_][[:alpha:]]{2})?|english', 'english'), + 'es' => array('es([-_][[:alpha:]]{2})?|spanish', 'spanish'), + 'et' => array('et|estonian', 'estonian'), + 'fi' => array('fi|finnish', 'finnish'), + 'fr' => array('fr([-_][[:alpha:]]{2})?|french', 'french'), + 'gl' => array('gl|galician', 'galician'), + 'he' => array('he|hebrew', 'hebrew'), + 'hr' => array('hr|croatian', 'croatian'), + 'hu' => array('hu|hungarian', 'hungarian'), + 'id' => array('id|indonesian', 'indonesian'), + 'it' => array('it|italian', 'italian'), + 'ja' => array('ja|japanese', 'japanese'), + 'ko' => array('ko|korean', 'koreano'), + 'ka' => array('ka|georgian', 'georgian'), + 'lt' => array('lt|lithuanian', 'lithuanian'), + 'lv' => array('lv|latvian', 'latvian'), + 'nl' => array('nl([-_][[:alpha:]]{2})?|dutch', 'dutch'), + 'no' => array('no|norwegian', 'norwegian'), + 'pl' => array('pl|polish', 'polish'), + 'pt-br' => array('pt[-_]br|brazilian portuguese', 'portuguesebr'), + 'pt' => array('pt([-_][[:alpha:]]{2})?|portuguese', 'portuguese'), + 'ro' => array('ro|romanian', 'romanian'), + 'ru' => array('ru|russian', 'russian'), + 'sk' => array('sk|slovak', 'slovak'), + 'sq' => array('sq|albanian', 'albanian'), + 'sr' => array('sr|serbian', 'serbian'), + 'sv' => array('sv|swedish', 'swedish'), + 'th' => array('th|thai', 'thai'), + 'tr' => array('tr|turkish', 'turkish'), + 'uk' => array('uk|ukrainian', 'ukrainian'), + 'zh-tw' => array('zh[-_]tw|chinese traditional', 'tchinese'), + 'zh-cn' => array('zh[-_]cn|chinese simplified', 'schinese'), + ); +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include/vars.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/index.html ===============... [truncated message content] |
From: <du...@us...> - 2012-10-25 13:35:11
|
Revision: 10233 http://sourceforge.net/p/xoops/svn/10233 Author: dugris Date: 2012-10-25 13:35:09 +0000 (Thu, 25 Oct 2012) Log Message: ----------- FIX form xcaptcha 1.00 alpha (Xoops CAPTCHA configuration) System extensions for xoops 2.6.x Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/xcaptcha.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/image.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/recaptcha.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/text.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/xoops_version.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/xcaptcha.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/xcaptcha.php 2012-10-25 13:05:30 UTC (rev 10232) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/xcaptcha.php 2012-10-25 13:35:09 UTC (rev 10233) @@ -119,8 +119,8 @@ $button_tray = new XoopsFormElementTray('', ''); $button_tray->addElement(new XoopsFormHidden('op', 'save')); - $button_tray->addElement(new XoopsFormButton('', '', _SUBMIT, 'submit')); - $button_tray->addElement(new XoopsFormButton('', '', _CANCEL, 'submit')); + $button_tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); + $button_tray->addElement(new XoopsFormButton('', 'reset', _RESET, 'reset')); $captcha_form->addElement($button_tray); ob_start(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/image.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/image.php 2012-10-25 13:05:30 UTC (rev 10232) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/image.php 2012-10-25 13:35:09 UTC (rev 10233) @@ -85,8 +85,11 @@ $button_tray = new XoopsFormElementTray('', ''); $button_tray->addElement(new XoopsFormHidden('op', 'save')); - $button_tray->addElement(new XoopsFormButton('', '', _SUBMIT, 'submit')); - $button_tray->addElement(new XoopsFormButton('', '', _CANCEL, 'submit')); + $button_tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); + $button_tray->addElement(new XoopsFormButton('', 'reset', _RESET, 'reset')); + $cancel_send = new XoopsFormButton('', 'cancel', _CANCEL, 'button'); + $cancel_send->setExtra("onclick='javascript:history.go(-1);'"); + $button_tray->addElement($cancel_send); $captcha_form->addElement($button_tray); ob_start(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/recaptcha.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/recaptcha.php 2012-10-25 13:05:30 UTC (rev 10232) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/recaptcha.php 2012-10-25 13:35:09 UTC (rev 10233) @@ -55,8 +55,11 @@ $button_tray = new XoopsFormElementTray('', ''); $button_tray->addElement(new XoopsFormHidden('op', 'save')); - $button_tray->addElement(new XoopsFormButton('', '', _SUBMIT, 'submit')); - $button_tray->addElement(new XoopsFormButton('', '', _CANCEL, 'submit')); + $button_tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); + $button_tray->addElement(new XoopsFormButton('', 'reset', _RESET, 'reset')); + $cancel_send = new XoopsFormButton('', 'cancel', _CANCEL, 'button'); + $cancel_send->setExtra("onclick='javascript:history.go(-1);'"); + $button_tray->addElement($cancel_send); $captcha_form->addElement($button_tray); ob_start(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/text.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/text.php 2012-10-25 13:05:30 UTC (rev 10232) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/text.php 2012-10-25 13:35:09 UTC (rev 10233) @@ -46,8 +46,11 @@ $button_tray = new XoopsFormElementTray('', ''); $button_tray->addElement(new XoopsFormHidden('op', 'save')); - $button_tray->addElement(new XoopsFormButton('', '', _SUBMIT, 'submit')); - $button_tray->addElement(new XoopsFormButton('', '', _CANCEL, 'submit')); + $button_tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); + $button_tray->addElement(new XoopsFormButton('', 'reset', _RESET, 'reset')); + $cancel_send = new XoopsFormButton('', 'cancel', _CANCEL, 'button'); + $cancel_send->setExtra("onclick='javascript:history.go(-1);'"); + $button_tray->addElement($cancel_send); $captcha_form->addElement($button_tray); ob_start(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/xoops_version.php 2012-10-25 13:05:30 UTC (rev 10232) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/xoops_version.php 2012-10-25 13:35:09 UTC (rev 10233) @@ -30,7 +30,6 @@ $modversion['image'] = 'images/xcaptcha_logo.png'; $modversion['dirname'] = 'xcaptcha'; - //about $modversion['release_date'] = '2012/10/01'; $modversion['module_website_url'] = 'labs.xoofoo.org/modules/news/'; |
From: <du...@us...> - 2012-10-25 13:05:35
|
Revision: 10232 http://sourceforge.net/p/xoops/svn/10232 Author: dugris Date: 2012-10-25 13:05:30 +0000 (Thu, 25 Oct 2012) Log Message: ----------- Add flags icons for xlanguage System extensions Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/bosnia.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/brazil.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/china.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/croatia.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/czech.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/denmark.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/english.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/french.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/germany.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/greece.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/italy.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/japan.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/netherlands.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/norway.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/poland.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/russia.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/saudi_Arabia.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/south_Korea.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/spain.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/turkey.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/vietnam.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/bosnia.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/brazil.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/china.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/croatia.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/czech.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/denmark.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/english.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/french.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/germany.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/greece.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/italy.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/japan.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/netherlands.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/norway.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/poland.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/russia.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/saudi_Arabia.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/south_Korea.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/spain.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/turkey.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/vietnam.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/bosnia_and_herzegovina.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/brazil.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/china.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/croatia.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/czech_republic.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/denmark.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/english.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/french.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/germany.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/greece.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/iran.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/italy.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/japan.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/netherlands.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/nordic.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/norway.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/poland.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/russia.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/saudi_arabia.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/south_korea.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/spain.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/taiwan.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/turkey.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/vietnam.png Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/index.html =================================================================== Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/bosnia.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/bosnia.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/brazil.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/brazil.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/china.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/china.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/croatia.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/croatia.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/czech.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/czech.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/denmark.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/denmark.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/english.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/english.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/french.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/french.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/germany.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/germany.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/greece.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/greece.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/index.html =================================================================== Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/italy.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/italy.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/japan.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/japan.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/netherlands.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/netherlands.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/norway.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/norway.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/poland.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/poland.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/russia.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/russia.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/saudi_Arabia.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/saudi_Arabia.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/south_Korea.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/south_Korea.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/spain.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/spain.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/turkey.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/turkey.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/vietnam.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/rounded/vietnam.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/bosnia.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/bosnia.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/brazil.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/brazil.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/china.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/china.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/croatia.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/croatia.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/czech.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/czech.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/denmark.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/denmark.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/english.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/english.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/french.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/french.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/germany.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/germany.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/greece.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/greece.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/index.html =================================================================== Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/italy.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/italy.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/japan.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/japan.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/netherlands.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/netherlands.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/norway.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/norway.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/poland.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/poland.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/russia.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/russia.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/saudi_Arabia.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/saudi_Arabia.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/south_Korea.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/south_Korea.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/spain.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/spain.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/turkey.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/turkey.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/vietnam.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/square/vietnam.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/bosnia_and_herzegovina.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/bosnia_and_herzegovina.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/brazil.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/brazil.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/china.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/china.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/croatia.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/croatia.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/czech_republic.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/czech_republic.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/denmark.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/denmark.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/english.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/english.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/french.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/french.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/germany.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/germany.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/greece.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/greece.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/index.html =================================================================== Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/iran.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/iran.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/italy.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/italy.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/japan.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/japan.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/netherlands.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/netherlands.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/nordic.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/nordic.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/norway.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/norway.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/poland.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/poland.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/russia.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/russia.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/saudi_arabia.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/saudi_arabia.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/south_korea.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/south_korea.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/spain.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/spain.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/taiwan.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/taiwan.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/turkey.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/turkey.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/vietnam.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/flags/standard/vietnam.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream |
From: <du...@us...> - 2012-10-25 12:33:44
|
Revision: 10231 http://sourceforge.net/p/xoops/svn/10231 Author: dugris Date: 2012-10-25 12:33:41 +0000 (Thu, 25 Oct 2012) Log Message: ----------- Fix for xlanguage Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/language/english/main.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-10-22 07:38:25 UTC (rev 10230) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-10-25 12:33:41 UTC (rev 10231) @@ -399,6 +399,9 @@ // for legacy support when template is set after header. $this->option['template_main'] = $this->tpl_name; + // Load xlanguage api + $this->preload->triggerEvent('core.language.common'); + $xoopsThemeFactory = null; $xoopsThemeFactory = new XoopsThemeFactory(); $xoopsThemeFactory->allowedThemes = $this->getConfig('theme_set_allowed'); @@ -408,6 +411,9 @@ $this->preload->triggerEvent('core.header.addmeta'); + // load xlanguage block + $this->preload->triggerEvent('core.language.block'); + // Temporary solution for start page redirection if (defined("XOOPS_STARTPAGE_REDIRECTED")) { $this->theme->headContent(null, "<base href='" . XOOPS_URL . '/modules/' . $this->getConfig('startpage') . "/' />", null, null); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php 2012-10-22 07:38:25 UTC (rev 10230) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php 2012-10-25 12:33:41 UTC (rev 10231) @@ -143,7 +143,6 @@ /** * Load Language settings and defines */ -$xoops->preload->triggerEvent('core.include.common.language'); $xoops->loadLanguage('global'); $xoops->loadLanguage('locale'); $xoops->loadLanguage('errors'); @@ -301,4 +300,3 @@ $xoops->logger->stopTime('XOOPS Boot'); $xoops->logger->startTime('Module init'); $xoops->preload->triggerEvent('core.include.common.end'); -$xoops->preload->triggerEvent('core.include.block.language'); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/language/english/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/language/english/main.php 2012-10-22 07:38:25 UTC (rev 10230) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/language/english/main.php 2012-10-25 12:33:41 UTC (rev 10231) @@ -36,4 +36,6 @@ define("_THEME_PM", "Inbox"); define("_THEME_LOGOUT", "Logout"); -define("_THEME_BACKTOP", "Back to top"); \ No newline at end of file +define("_THEME_BACKTOP", "Back to top"); + +define("_THEME_LANGUAGE", "Choose your language"); \ No newline at end of file |
From: <ir...@us...> - 2012-10-22 07:38:29
|
Revision: 10230 http://sourceforge.net/p/xoops/svn/10230 Author: irmtfan Date: 2012-10-22 07:38:25 +0000 (Mon, 22 Oct 2012) Log Message: ----------- bug fix: viewpost.php?status=new AND viewforum.php?forum=FFF&status=unread and list.topic.php?status=unread when read_mode = 1 (cookie) improve: read_mode = 1 for anon Modified Paths: -------------- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt XoopsModules/newbb/branches/irmtfan/newbb/class/forum.php XoopsModules/newbb/branches/irmtfan/newbb/class/topic.renderer.php XoopsModules/newbb/branches/irmtfan/newbb/include/functions.ini.php XoopsModules/newbb/branches/irmtfan/newbb/include/plugin.php XoopsModules/newbb/branches/irmtfan/newbb/index.php XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_index.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_index.html XoopsModules/newbb/branches/irmtfan/newbb/viewpost.php Modified: XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt 2012-10-20 11:50:14 UTC (rev 10229) +++ XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt 2012-10-22 07:38:25 UTC (rev 10230) @@ -1,3 +1,14 @@ +date 2012-10-22 +=================================== +1- bug fix: viewpost.php?status=new AND viewforum.php?forum=FFF&status=unread and list.topic.php?status=unread when read_mode = 1 (cookie) +in newbb/viewpost.php, newbb/class/forum.php, newbb/class/topic.renderer.php + +2- improve: change the read_mode = 2 (db) to read_mode = 1 (cookie) for anonymous users +in newbb/include/functions.ini.php, newbb/include/plugin.php + +3- minor bug fix: <{$lastvisit}> smarty variable is added for all users (members and anons) it was wrongly only for members +in newbb/index.php, newbb/templates/newbb_index.html, newbb/templates_fulldiv_opacity/newbb_index.html + date 2012-10-20 =================================== 1- bug fix: wrongly do not count sub forum posts/topics when count_subforum = 1 Modified: XoopsModules/newbb/branches/irmtfan/newbb/class/forum.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/class/forum.php 2012-10-20 11:50:14 UTC (rev 10229) +++ XoopsModules/newbb/branches/irmtfan/newbb/class/forum.php 2012-10-22 07:38:25 UTC (rev 10230) @@ -221,22 +221,25 @@ } // END irmtfan use read_uid to find the unread posts when the user is logged in } elseif ($xoopsModuleConfig["read_mode"] == 1) { - $topics = array(); - $topic_lastread = newbb_getcookie('LT', true); - if (count($topic_lastread)>0) { - foreach ($topic_lastread as $id => $time) { - if ($time > $time_criterion) $topics[] = $id; - } - } - if (count($topics)>0) { - $criteria_extra = ' AND t.topic_id NOT IN (' . implode(",", $topics) . ')'; - } - if ($lastvisit = max($GLOBALS['last_visit'], $startdate)) { - $criteria_post = ' p.post_time > ' . max($GLOBALS['last_visit'], $startdate); - } + // START irmtfan fix read_mode = 1 bugs + if ( $time_criterion = max($GLOBALS['last_visit'], $startdate) ) { + $criteria_post = ' p.post_time > ' . $time_criterion; // for all users + if (is_object($GLOBALS["xoopsUser"])) { // only for members + $topics = array(); + $topic_lastread = newbb_getcookie('LT', true); + if (count($topic_lastread)>0) { + foreach ($topic_lastread as $id => $time) { + if ($time > $time_criterion) $topics[] = $id; + } + } + if (count($topics)>0) { + $criteria_extra = ' AND t.topic_id NOT IN (' . implode(",", $topics) . ')'; + } + } + } + // END irmtfan fix read_mode = 1 bugs } break; - case 'pending': $post_on = ' p.topic_id = t.topic_id'; $criteria_post .= ' AND p.pid = 0'; @@ -495,15 +498,23 @@ } // END irmtfan use read_uid to find the unread posts when the user is logged in } elseif ($xoopsModuleConfig["read_mode"] == 1) { - $criteria_post = ' p.post_time > ' . max($GLOBALS['last_visit'], $startdate); - $topics = array(); - $topic_lastread = newbb_getcookie('LT', true); - if (count($topic_lastread)>0) foreach ($topic_lastread as $id=>$time) { - if ($time > $time_criterion) $topics[] = $id; - } - if (count($topics)>0) { - $criteria_extra = ' AND t.topic_id NOT IN (' . implode(",", $topics) . ')'; - } + // START irmtfan fix read_mode = 1 bugs + if ( $time_criterion = max($GLOBALS['last_visit'], $startdate) ) { + $criteria_post = ' p.post_time > ' . $time_criterion; // for all users + if (is_object($GLOBALS["xoopsUser"])) { // only for members + $topics = array(); + $topic_lastread = newbb_getcookie('LT', true); + if (count($topic_lastread)>0) { + foreach ($topic_lastread as $id => $time) { + if ($time > $time_criterion) $topics[] = $id; + } + } + if (count($topics)>0) { + $criteria_extra = ' AND t.topic_id NOT IN (' . implode(",", $topics) . ')'; + } + } + } + // END irmtfan fix read_mode = 1 bugs } break; case 'pending': Modified: XoopsModules/newbb/branches/irmtfan/newbb/class/topic.renderer.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/class/topic.renderer.php 2012-10-20 11:50:14 UTC (rev 10229) +++ XoopsModules/newbb/branches/irmtfan/newbb/class/topic.renderer.php 2012-10-22 07:38:25 UTC (rev 10230) @@ -171,9 +171,26 @@ // END irmtfan change criteria to get from uid p.uid = last post submit user id // User cookie } elseif ($this->config["read_mode"] == 1) { - if ($lastvisit =$GLOBALS['last_visit']) { - $this->query["where"][] = 'p.post_time > ' . $lastvisit; + // START irmtfan fix read_mode = 1 bugs + $startdate = !empty($this->vars["since"]) ? (time() - newbb_getSinceTime($this->vars["since"])) : 0; + if ( $lastvisit = max($GLOBALS['last_visit'], $startdate) ) { + if ( $lastvisit > $startdate ) { + $this->query["where"][] = 'p.post_time > ' . $lastvisit; + } + if (is_object($GLOBALS["xoopsUser"])) { // only for members + $topics = array(); + $topic_lastread = newbb_getcookie('LT', true); + if (count($topic_lastread)>0) { + foreach ($topic_lastread as $id => $time) { + if ($time > $lastvisit) $topics[] = $id; + } + } + if (count($topics)>0) { + $this->query["where"][] = ' t.topic_id NOT IN (' . implode(",", $topics) . ')'; + } + } } + // END irmtfan fix read_mode = 1 bugs } break; @@ -238,8 +255,13 @@ case "since": if (!empty($val)) { + // START irmtfan if unread && read_mode = 1 and last_visit > startdate do not add where query + $startdate = time() - newbb_getSinceTime($val); + if ( $this->vars["status"] == "unread" && $this->config["read_mode"] == 1 && $GLOBALS['last_visit'] > $startdate ) + break; // irmtfan - should be >= instead of = - $this->query["where"][] = "p.post_time >= ". (time() - newbb_getSinceTime($val)); + $this->query["where"][] = "p.post_time >= ". $startdate; + // START irmtfan if unread && read_mode = 1 and last_visit > startdate do not add where query } break; Modified: XoopsModules/newbb/branches/irmtfan/newbb/include/functions.ini.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/include/functions.ini.php 2012-10-20 11:50:14 UTC (rev 10229) +++ XoopsModules/newbb/branches/irmtfan/newbb/include/functions.ini.php 2012-10-22 07:38:25 UTC (rev 10230) @@ -50,6 +50,10 @@ load_functions("config"); $moduleConfig = mod_loadConfig("newbb"); + // irmtfan - change the read_mode = 2 (db) to read_mode = 1 (cookie) for anonymous users + if (!is_object($GLOBALS["xoopsUser"]) && $moduleConfig["read_mode_db_to_cookie_for_anon"] && 2 == $moduleConfig["read_mode"]) { + $moduleConfig["read_mode"] = 1; + } return $moduleConfig; } Modified: XoopsModules/newbb/branches/irmtfan/newbb/include/plugin.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/include/plugin.php 2012-10-20 11:50:14 UTC (rev 10229) +++ XoopsModules/newbb/branches/irmtfan/newbb/include/plugin.php 2012-10-22 07:38:25 UTC (rev 10230) @@ -98,6 +98,9 @@ $customConfig["jump_to_topic_last_post_read_enabled"] = true; // highlight keywords in search $customConfig["highlight_search_enable"] = true; +// change the read_mode = 2 (db) to read_mode = 1 (cookie) for anonymous users +// Note: if set to true only change read_mode for anonymous users if read_mode = 2 (db), set to false to no action. +$customConfig["read_mode_db_to_cookie_for_anon"] = true; // END hacked by irmtfan return $customConfig; Modified: XoopsModules/newbb/branches/irmtfan/newbb/index.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/index.php 2012-10-20 11:50:14 UTC (rev 10229) +++ XoopsModules/newbb/branches/irmtfan/newbb/index.php 2012-10-22 07:38:25 UTC (rev 10230) @@ -215,12 +215,14 @@ $userstats["topics"] = sprintf(_MD_USER_TOPICS, intval( @$userstats_row["user_topics"] )); $userstats["posts"] = sprintf(_MD_USER_POSTS, intval( @$userstats_row["user_posts"] )); $userstats["digests"] = sprintf(_MD_USER_DIGESTS, intval( @$userstats_row["user_digests"] )); - $userstats["currenttime"] = sprintf(_MD_TIMENOW, formatTimestamp(time(), "s")); - $userstats["lastvisit"] = sprintf(_MD_USER_LASTVISIT, formatTimestamp($last_visit, "s")); + $userstats["currenttime"] = sprintf(_MD_TIMENOW, formatTimestamp(time(), "s")); // irmtfan should be removed because it is for anon users too + $userstats["lastvisit"] = sprintf(_MD_USER_LASTVISIT, formatTimestamp($last_visit, "s")); // irmtfan should be removed because it is for anon users too $userstats["lastpost"] = empty($userstats_row["user_lastpost"]) ? _MD_USER_NOLASTPOST : sprintf(_MD_USER_LASTPOST, formatTimestamp($userstats_row["user_lastpost"], "s")); } $xoopsTpl->assign_by_ref("userstats", $userstats); - $xoopsTpl->assign('currenttime', sprintf(_MD_TIMENOW, formatTimestamp(time(), "m"))); + // irmtfan add lastvisit smarty variable for all users + $xoopsTpl->assign('lastvisit', sprintf(_MD_USER_LASTVISIT, formatTimestamp($last_visit, "l"))); + $xoopsTpl->assign('currenttime', sprintf(_MD_TIMENOW, formatTimestamp(time(), "m")) ); } Modified: XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_index.html =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_index.html 2012-10-20 11:50:14 UTC (rev 10229) +++ XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_index.html 2012-10-22 07:38:25 UTC (rev 10230) @@ -336,6 +336,8 @@ <div class="forum_stats odd" style="padding: 5px; line-height: 150%;"> <div class="forum_stats_left odd"> <{$currenttime}><br /> + <!-- irmtfan add lastvisit smarty variable for all users --> + <{$lastvisit}><br /> <{$smarty.const._MD_TOTALTOPICSC}> <strong><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/list.topic.php" title="<{$smarty.const._MD_ALL}>"><{$stats[0].topic.total}></a></strong> | <{$smarty.const._MD_TOTALPOSTSC}><strong><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewpost.php" title="<{$smarty.const._MD_ALLPOSTS}>"><{$stats[0].post.total}></a></strong> @@ -344,7 +346,8 @@ <{/if}> <{if $userstats}> <br /><br /> - <{$userstats.lastvisit}><br /><{$userstats.lastpost}> + <!-- irmtfan userstats.lastvisit should be removed because it is for anon users too --> + <{*$userstats.lastvisit*}><br /><{$userstats.lastpost}> <{/if}> </div> <div class="forum_stats_right odd"> Modified: XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_index.html =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_index.html 2012-10-20 11:50:14 UTC (rev 10229) +++ XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_index.html 2012-10-22 07:38:25 UTC (rev 10230) @@ -216,6 +216,7 @@ <div class="index_stat_foot forum_stats odd"> <div class="forum_stats_col odd left floatleft"> <{$currenttime}><br /> + <{$lastvisit}><br /> <{$smarty.const._MD_TOTALTOPICSC}> <strong><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/list.topic.php" title="<{$smarty.const._MD_ALL}>"><{$stats[0].topic.total}></a></strong> | <{$smarty.const._MD_TOTALPOSTSC}><strong><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewpost.php" title="<{$smarty.const._MD_ALLPOSTS}>"><{$stats[0].post.total}></a></strong> @@ -224,7 +225,7 @@ <{/if}> <{if $userstats}> <br /><br /> - <{$userstats.lastvisit}><br /><{$userstats.lastpost}> + <{*$userstats.lastvisit*}><br /><{$userstats.lastpost}> <{/if}> </div> <div class="forum_stats_col odd right floatright"> Modified: XoopsModules/newbb/branches/irmtfan/newbb/viewpost.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/viewpost.php 2012-10-20 11:50:14 UTC (rev 10229) +++ XoopsModules/newbb/branches/irmtfan/newbb/viewpost.php 2012-10-22 07:38:25 UTC (rev 10230) @@ -116,6 +116,21 @@ } elseif ($xoopsModuleConfig["read_mode"] == 1) { $criteria_count->add(new Criteria("post_time", intval($last_visit), ">")); // irmtfan add new criteria $criteria_post->add(new Criteria("p.post_time", intval($last_visit), ">")); // irmtfan add new criteria + // START irmtfan fix read_mode = 1 bugs + if (is_object($GLOBALS["xoopsUser"])) { // only for members + $topics = array(); + $topic_lastread = newbb_getcookie('LT', true); + if (count($topic_lastread)>0) { + foreach ($topic_lastread as $id => $time) { + if ($time > intval($last_visit)) $topics[] = $id; + } + } + if (count($topics)>0) { + $criteria_count->add(new Criteria("topic_id", "(".implode(",",$topics).")", "NOT IN")); + $criteria_post->add(new Criteria("p.topic_id", "(".implode(",",$topics).")", "NOT IN")); + } + } + // END irmtfan fix read_mode = 1 bugs //$criteria_status_count->add(new Criteria("approved", 1));// irmtfan commented and removed //$criteria_status_post->add(new Criteria("p.approved", 1));// irmtfan commented and removed } |
From: <ir...@us...> - 2012-10-20 11:50:59
|
Revision: 10229 http://sourceforge.net/p/xoops/svn/10229 Author: irmtfan Date: 2012-10-20 11:50:14 +0000 (Sat, 20 Oct 2012) Log Message: ----------- Add: new fulldiv template set (opacity), hack XOOPSCORE/search.php bug fix: count_subforum, $criteria_post and $criteria_count only for users improve: add topic_read = 0/1 and forum_read = 0/1 smarty variables Modified Paths: -------------- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt XoopsModules/newbb/branches/irmtfan/newbb/class/forum.php XoopsModules/newbb/branches/irmtfan/newbb/class/topic.renderer.php XoopsModules/newbb/branches/irmtfan/newbb/templates/css/language/english/style.css XoopsModules/newbb/branches/irmtfan/newbb/templates/css/language/persian/style.css XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_index.html XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_viewall.html XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_viewforum.html XoopsModules/newbb/branches/irmtfan/newbb/viewpost.php Added Paths: ----------- XoopsModules/newbb/branches/irmtfan/XOOPS255/ XoopsModules/newbb/branches/irmtfan/XOOPS255/search.php XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/ XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/blocks/ XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/blocks/index.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/blocks/newbb_block.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/blocks/newbb_block_author.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/blocks/newbb_block_post.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/blocks/newbb_block_text.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/blocks/newbb_block_topic.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/blocks/newbb_tag_block_cloud.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/blocks/newbb_tag_block_top.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/css/ XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/css/index.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/css/language/ XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/css/language/english/ XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/css/language/english/index.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/css/language/english/style.css XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/css/language/index.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/css/language/persian/ XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/css/language/persian/index.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/css/language/persian/style.css XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/ XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/ XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/admin_delete.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/admin_edit.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/admin_merge.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/admin_move.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/anonym.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/attachment.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/blank.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/blank.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/buzz.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/delicious.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/digg.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/document.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/down.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/facebook.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/forum.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/forum_new.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/friendfeed.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/googleplus.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/index.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/lastposticon.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/less.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/linkedin.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/minus.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/more.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/new_forum.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/next.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/pdf.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/plus.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/poll.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/post.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/previous.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/printer.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/rate1.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/rate2.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/rate3.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/rate4.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/rate5.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/reddit.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/rss.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/spacer-a.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/statistik.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/stumbleupon.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/subforum.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/technorati.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/topic.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/topic_digest.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/topic_hot.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/topic_hot_new.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/topic_locked.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/topic_my.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/topic_new.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/topic_sticky.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/twitter.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/up.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/whosonline.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/icon/wong.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/index.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/ XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/english/ XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/english/index.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/english/new_forum.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/english/new_subforum.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/english/offline.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/english/online.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/english/p_bann.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/english/p_delete.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/english/p_edit.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/english/p_pdf.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/english/p_quote.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/english/p_reply.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/english/p_report.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/english/t_new.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/english/t_poll.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/english/t_qr.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/english/t_qr_expand.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/english/t_reply.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/index.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/persian/ XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/persian/index.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/persian/new_forum.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/persian/new_subforum.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/persian/offline.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/persian/online.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/persian/p_bann.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/persian/p_delete.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/persian/p_edit.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/persian/p_quote.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/persian/p_reply.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/persian/p_report.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/persian/p_up.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/persian/t_new.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/persian/t_poll.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/persian/t_qr.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/persian/t_qr_expand.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/language/persian/t_reply.png XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/ XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/ace.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/avi.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/bmp.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/doc.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/exe.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/flash.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/gif.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/html.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/index.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/jpeg.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/jpg.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/mid.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/mov.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/mp3.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/mpg.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/netscape.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/pdf.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/png.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/ppt.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/rar.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/txt.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/unknown.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/wav.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/xls.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/mime/zip.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/rpg/ XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/rpg/blue.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/rpg/green.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/rpg/img_backing.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/rpg/img_left.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/rpg/img_right.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/rpg/index.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/images/rpg/orange.gif XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/index.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/js/ XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/js/index.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/js/language/ XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/js/language/english/ XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/js/language/english/index.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/js/language/english/newbb_toggle_class.js XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/js/language/index.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_edit_post.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_index.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_index_menu.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_notification_select.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_online.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_poll_results.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_poll_view.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_rss.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_search.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_searchresults.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_thread.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_viewall.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_viewforum.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_viewforum_menu.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_viewforum_subforum.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_viewpost.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/newbb_viewtopic.html XoopsModules/newbb/branches/irmtfan/newbb/templates_fulldiv_opacity/readme.txt Added: XoopsModules/newbb/branches/irmtfan/XOOPS255/search.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/XOOPS255/search.php (rev 0) +++ XoopsModules/newbb/branches/irmtfan/XOOPS255/search.php 2012-10-20 11:50:14 UTC (rev 10229) @@ -0,0 +1,292 @@ +<?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 + * + * See the enclosed file license.txt for licensing information. + * If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html + * + * @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: search.php 8066 2011-11-06 05:09:33Z beckmi $ + * @todo Modularize; Both search algorithms and interface will be redesigned + */ +include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mainfile.php'; + +xoops_loadLanguage('search'); + +$config_handler =& xoops_gethandler('config'); +$xoopsConfigSearch = $config_handler->getConfigsByCat(XOOPS_CONF_SEARCH); + +if ($xoopsConfigSearch['enable_search'] != 1) { + 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(); + +if ($action == "results") { + if ($query == "") { + redirect_header("search.php", 1, _SR_PLZENTER); + exit(); + } +} else if ($action == "showall") { + if ($query == "" || empty($mid)) { + redirect_header("search.php", 1, _SR_PLZENTER); + exit(); + } +} else if ($action == "showallbyuser") { + if (empty($mid) || empty($uid)) { + redirect_header("search.php", 1, _SR_PLZENTER); + exit(); + } +} + +$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS; +$gperm_handler =& xoops_gethandler('groupperm'); +$available_modules = $gperm_handler->getItemIds('module_read', $groups); +if ($action == 'search') { + include $GLOBALS['xoops']->path('header.php'); + include $GLOBALS['xoops']->path('include/searchform.php'); + $search_form->display(); + include $GLOBALS['xoops']->path('footer.php'); + exit(); +} +if ($andor != "OR" && $andor != "exact" && $andor != "AND") { + $andor = "AND"; +} + +$myts =& MyTextSanitizer::getInstance(); +if ($action != 'showallbyuser') { + if ($andor != "exact") { + $ignored_queries = array(); // holds kewords that are shorter than allowed minmum length + $temp_queries = preg_split('/[\s,]+/', $query); + foreach ($temp_queries as $q) { + $q = trim($q); + if (strlen($q) >= $xoopsConfigSearch['keyword_min']) { + $queries[] = $myts->addSlashes($q); + } else { + $ignored_queries[] = $myts->addSlashes($q); + } + } + if (count($queries) == 0) { + redirect_header('search.php', 2, sprintf(_SR_KEYTOOSHORT, $xoopsConfigSearch['keyword_min'])); + exit(); + } + } else { + $query = trim($query); + if (strlen($query) < $xoopsConfigSearch['keyword_min']) { + redirect_header('search.php', 2, sprintf(_SR_KEYTOOSHORT, $xoopsConfigSearch['keyword_min'])); + exit(); + } + $queries = array($myts->addSlashes($query)); + } +} +switch ($action) { + case "results": + $module_handler =& xoops_gethandler('module'); + $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->getObjects($criteria, true); + $mids = isset($_REQUEST['mids']) ? $_REQUEST['mids'] : array(); + if (empty($mids) || ! is_array($mids)) { + unset($mids); + $mids = array_keys($modules); + } + $xoopsOption['xoops_pagetitle'] = _SR_SEARCHRESULTS . ': ' . implode(' ', $queries); + include $GLOBALS['xoops']->path('header.php'); + $nomatch = true; + echo "<h3>" . _SR_SEARCHRESULTS . "</h3>\n"; + echo _SR_KEYWORDS . ':'; + if ($andor != 'exact') { + foreach ($queries as $q) { + echo ' <strong>' . htmlspecialchars(stripslashes($q)) . '</strong>'; + } + if (!empty($ignored_queries)) { + echo '<br />'; + printf(_SR_IGNOREDWORDS, $xoopsConfigSearch['keyword_min']); + foreach ($ignored_queries as $q) { + echo ' <strong>' . htmlspecialchars(stripslashes($q)) . '</strong>'; + } + } + } else { + echo ' "<strong>' . htmlspecialchars(stripslashes($queries[0])) . '</strong>"'; + } + echo '<br />'; + foreach ($mids as $mid) { + $mid = intval($mid); + if (in_array($mid, $available_modules)) { + $module = $modules[$mid]; + $results = $module->search($queries, $andor, 5, 0); + $count = count($results); + if (is_array($results) && $count > 0) { + $nomatch = false; + echo "<h4>" . $module->getVar('name') . "</h4>"; + for($i = 0; $i < $count; $i++) { + if (isset($results[$i]['image']) && $results[$i]['image'] != "") { + echo "<img src='modules/" . $module->getVar('dirname') . "/" . $results[$i]['image'] . "' alt='" . $module->getVar('name') . "' /> "; + } else { + echo "<img style='width:26px; height:26px;' src='images/icons/posticon2.gif' alt='" . $module->getVar('name') . "' /> "; + } + if (!preg_match("/^http[s]*:\/\//i", $results[$i]['link'])) { + $results[$i]['link'] = "modules/" . $module->getVar('dirname') . "/" . $results[$i]['link']; + } + + echo "<strong><a href='" . $results[$i]['link'] . "' title=''>" . $myts->htmlspecialchars($results[$i]['title']) . "</a></strong><br />\n"; + echo "<span class='x-small'>"; + $results[$i]['uid'] = @intval($results[$i]['uid']); + if (!empty($results[$i]['uid'])) { + $uname = XoopsUser::getUnameFromId($results[$i]['uid']); + echo " <a href='" . XOOPS_URL . "/userinfo.php?uid=" . $results[$i]['uid'] . "' title=''>" . $uname . "</a>\n"; + } + echo !empty($results[$i]['time']) ? " (" . formatTimestamp(intval($results[$i]['time'])) . ")" : ""; + echo "</span><br />\n"; + } + if ($count >= 5) { + // START irmtfan hack to use MODULE_NAME/search.php file instead of XOOPSCORE/search.php + $module_search_file_relpath = "modules/" . $module->getVar('dirname') . "/search.php"; + if ( is_file( XOOPS_ROOT_PATH . "/" . $module_search_file_relpath ) ) { + $queryString = urlencode(stripslashes(implode(' ', $queries))); + $search_url = XOOPS_URL . "/" . $module_search_file_relpath . "?term=" . $queryString . "&query=" . $queryString . "&andor={$andor}"; + } else { + $search_url = XOOPS_URL . '/search.php?query=' . urlencode(stripslashes(implode(' ', $queries))); + $search_url .= "&mid={$mid}&action=showall&andor={$andor}"; + } + // END irmtfan hack to use MODULE_NAME/search.php file instead of XOOPSCORE/search.php + echo '<p><a href="' . htmlspecialchars($search_url) . '" title="' . _SR_SHOWALLR . '">' . _SR_SHOWALLR . '</a></p>'; + } + } + } + unset($results); + unset($module); + } + if ($nomatch) { + echo "<p>" . _SR_NOMATCH . "</p>"; + } + include $GLOBALS['xoops']->path('include/searchform.php'); + $search_form->display(); + break; + + case "showall": + case 'showallbyuser': + include $GLOBALS['xoops']->path('header.php'); + $module_handler =& xoops_gethandler('module'); + $module =& $module_handler->get($mid); + $results = $module->search($queries, $andor, 20, $start, $uid); + $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; + } + echo "<h4>" . _SR_SEARCHRESULTS . "</h4>\n"; + if ($action == 'showall') { + echo _SR_KEYWORDS . ':'; + if ($andor != 'exact') { + foreach ($queries as $q) { + echo ' <strong>' . htmlspecialchars(stripslashes($q)) . '</strong>'; + } + } else { + echo ' "<strong>' . htmlspecialchars(stripslashes($queries[0])) . '</strong>"'; + } + echo '<br />'; + } + printf(_SR_SHOWING, $start + 1, $start + $count); + echo "<h5>" . $module->getVar('name') . "</h5>"; + for ($i = 0; $i < $count; $i ++) { + if (isset($results[$i]['image']) && $results[$i]['image'] != '') { + echo "<img src='modules/" . $module->getVar('dirname', "n") . "/" . $results[$i]['image'] . "' alt='" . $module->getVar('name') . "' /> "; + } else { + echo "<img style='width:26px; height:26px;' src='images/icons/posticon2.gif' alt='" . $module->getVar("name") . "' /> "; + } + if (!preg_match("/^http[s]*:\/\//i", $results[$i]['link'])) { + $results[$i]['link'] = "modules/" . $module->getVar('dirname') . "/" . $results[$i]['link']; + } + echo "<strong><a href='" . $results[$i]['link'] . "'>" . $myts->htmlspecialchars($results[$i]['title']) . "</a></strong><br />\n"; + echo "<span class='x-small'>"; + $results[$i]['uid'] = @intval($results[$i]['uid']); + if (!empty($results[$i]['uid'])) { + $uname = XoopsUser::getUnameFromId($results[$i]['uid']); + echo " <a href='" . XOOPS_URL . "/userinfo.php?uid=" . $results[$i]['uid'] . "'>" . $uname . "</a>\n"; + } + echo !empty($results[$i]['time']) ? " (" . formatTimestamp(intval($results[$i]['time'])) . ")" : ""; + echo "</span><br />\n"; + } + echo '<table><tr>'; + $search_url = XOOPS_URL . '/search.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; + echo '<td align="left">'; + $search_url_prev = $search_url . "&start={$prev}"; + echo '<a href="' . htmlspecialchars($search_url_prev) . '">' . _SR_PREVIOUS . '</a></td>'; + } + echo '<td> </td>'; + if (false != $has_next) { + $next = $start + 20; + $search_url_next = $search_url . "&start={$next}"; + echo '<td align="right"><a href="' . htmlspecialchars($search_url_next) . '">' . _SR_NEXT . '</a></td>'; + } + echo '</tr></table>'; + } else { + echo '<p>' . _SR_NOMATCH . '</p>'; + } + include $GLOBALS['xoops']->path('include/searchform.php'); + $search_form->display(); + break; +} +include $GLOBALS['xoops']->path('footer.php'); +?> \ No newline at end of file Modified: XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt 2012-10-20 00:13:47 UTC (rev 10228) +++ XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt 2012-10-20 11:50:14 UTC (rev 10229) @@ -1,3 +1,21 @@ +date 2012-10-20 +============================= |
From: <du...@us...> - 2012-10-20 00:13:54
|
Revision: 10228 http://sourceforge.net/p/xoops/svn/10228 Author: dugris Date: 2012-10-20 00:13:47 +0000 (Sat, 20 Oct 2012) Log Message: ----------- Fix for xlanguage Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/theme.html XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/xotpl/theme_user.html Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/xotpl/theme_language.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php 2012-10-18 12:42:23 UTC (rev 10227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php 2012-10-20 00:13:47 UTC (rev 10228) @@ -300,4 +300,5 @@ $xoops->logger->stopTime('XOOPS Boot'); $xoops->logger->startTime('Module init'); -$xoops->preload->triggerEvent('core.include.common.end'); \ No newline at end of file +$xoops->preload->triggerEvent('core.include.common.end'); +$xoops->preload->triggerEvent('core.include.block.language'); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/theme.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/theme.html 2012-10-18 12:42:23 UTC (rev 10227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/theme.html 2012-10-20 00:13:47 UTC (rev 10228) @@ -17,13 +17,15 @@ <{includeq file="$theme_tpl/theme_menu.html"}> <!-- User menu --> <{includeq file="$theme_tpl/theme_user.html"}> + <!-- Language menu --> + <{includeq file="$theme_tpl/theme_language.html"}> </div> </div> </div> <div class="xo-hero"> <div class="container xo-hero-content"> <div class="row"> - <div class="span7"> + <div class="span7"> <h1>XOOPS. Powered by You!</h1> <p>easy to use dynamic web content management system written in PHP</p> <p> @@ -147,8 +149,5 @@ </div> </div> </footer> -<script type="text/javascript"> - $().dropdown(); -</script> </body> </html> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/xotpl/theme_language.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/xotpl/theme_language.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/xotpl/theme_language.html 2012-10-20 00:13:47 UTC (rev 10228) @@ -0,0 +1,5 @@ +<{if constant($smarty.const.XLANGUAGE_THEME_ENABLE)}> + <div class="pull-right"> + <{$smarty.const.XLANGUAGE_SWITCH_CODE}> + </div> +<{/if}> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/xotpl/theme_user.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/xotpl/theme_user.html 2012-10-18 12:42:23 UTC (rev 10227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/xotpl/theme_user.html 2012-10-20 00:13:47 UTC (rev 10228) @@ -66,5 +66,8 @@ </ul> </li> </ul> + <script type="text/javascript"> + $('.dropdown-toggle').dropdown(); + </script> <{/if}> </div> |
From: <du...@us...> - 2012-10-18 12:42:30
|
Revision: 10227 http://sourceforge.net/p/xoops/svn/10227 Author: dugris Date: 2012-10-18 12:42:23 +0000 (Thu, 18 Oct 2012) Log Message: ----------- Fix menu for extensions 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/themes/default/default.php Property Changed: ---------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.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-10-17 08:19:31 UTC (rev 10226) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions/main.php 2012-10-18 12:42:23 UTC (rev 10227) @@ -36,9 +36,18 @@ } } $system->loadLanguage('modulesadmin','system'); + // Get Action type $op = $system->cleanVars($_REQUEST, 'op', 'list', 'string'); +$module = $system->cleanVars($_REQUEST, 'module', '', 'string'); +if (in_array($op, array('install', 'update', 'uninstall'))) { + if (!$xoops->security->check()) { + $op = 'list'; + } +} +$myts = MyTextsanitizer::getInstance(); + switch ($op) { case 'list': 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-10-17 08:19:31 UTC (rev 10226) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php 2012-10-18 12:42:23 UTC (rev 10227) @@ -1,204 +1,208 @@ -<?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 Cpanel default GUI class - * - * @copyright The XOOPS project http://sf.net/projects/xoops/ - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @package system - * @usbpackage GUI - * @since 2.4 - * @author Mamba XXXXXXXXXXXXXXXXXXX - * @author Mojtabajml <jam...@gm...> - * @author Voltan <djv...@gm...> - * @author BitC3R0 <Bi...@gm...> - * @author trabis <lus...@gm...> - * @version 1.2 - * @version $Id$ - */ - -class XoopsGuiDefault -{ - - function header() - { - $xoops = Xoops::getInstance(); - $xoops->loadLanguage('admin', 'system'); - $xoops->loadLanguage('cpanel', 'system'); - $xoops->loadLanguage('modinfo', 'system'); - - $xoops->theme->addStylesheet('media/xoops/css/moduladmin.css'); - $xoops->theme->addStylesheet(XOOPS_ADMINTHEME_URL . '/default/css/style.css'); - $xoops->theme->addStylesheet($xoops->url('/media/bootstrap/css/xoops.bootstrap.css')); - - - $xoops->theme->addScript($xoops->url('/media/jquery/jquery.js')); - $xoops->theme->addScript($xoops->url('/media/jquery/ui/jquery.ui.js')); - $xoops->theme->addScript($xoops->url('/media/bootstrap/js/bootstrap.min.js')); - // ddsmoothmenu - $xoops->theme->addScript(XOOPS_ADMINTHEME_URL . '/default/js/ddsmoothmenu.js'); - $xoops->theme->addScript(XOOPS_ADMINTHEME_URL . '/default/js/tooltip.js'); - - $quick = array(); - $quick[] = array('title' => _DEFAULT_CPHOME, 'link' => XOOPS_URL . '/admin.php'); - $quick[] = array('title' => _YOURHOME, 'link' => XOOPS_URL); - $quick[] = array('title' => _DEFAULT_NEWS, 'link' => XOOPS_URL . '/admin.php?xoopsorgnews=1'); - $quick[] = array('title' => 'separator'); - $quick[] = array('title' => _LOGOUT, 'link' => XOOPS_URL . '/user.php?op=logout'); - $xoops->tpl->assign('quick_menu', $quick); - - XoopsLoad::load('module', 'system'); - XoopsLoad::load('extension', 'system'); - $system_module = new SystemModule(); - $system_extension = new SystemExtension(); - - $adminmenu = null; - include dirname(__FILE__) . '/menu.php'; - if (!$xoops->isModule() || 'system' == $xoops->module->getVar('dirname', 'n')) { - $modpath = XOOPS_URL . '/admin.php'; - $modname = _DEFAULT_SYSOPTIONS; - $modid = 1; - $moddir = 'system'; - - $mod_options = $adminmenu; - foreach (array_keys($mod_options) as $item) { - $mod_options[$item]['link'] = empty($mod_options[$item]['absolute']) - ? XOOPS_URL . '/modules/' . $moddir . '/' . $mod_options[$item]['link'] - : $mod_options[$item]['link']; - $mod_options[$item]['icon'] = empty($mod_options[$item]['icon']) ? '' - : XOOPS_ADMINTHEME_URL . '/default/' . $mod_options[$item]['icon']; - unset($mod_options[$item]['icon_small']); - } - - } else { - $moddir = $xoops->module->getVar('dirname', 'n'); - $modpath = XOOPS_URL . '/modules/' . $moddir; - $modname = $xoops->module->getVar('name'); - $modid = $xoops->module->getVar('mid'); - - $mod_options = $xoops->module->getAdminMenu(); - foreach (array_keys($mod_options) as $item) { - $mod_options[$item]['link'] = empty($mod_options[$item]['absolute']) - ? XOOPS_URL . "/modules/{$moddir}/" . $mod_options[$item]['link'] : $mod_options[$item]['link']; - $mod_options[$item]['icon'] = empty($mod_options[$item]['icon']) ? '' - : XOOPS_URL . "/media/xoops/images/icons/32/" . $mod_options[$item]['icon']; - } - } - $xoops->tpl->assign('mod_options', $mod_options); - $xoops->tpl->assign('modpath', $modpath); - $xoops->tpl->assign('modname', $modname); - $xoops->tpl->assign('modid', $modid); - $xoops->tpl->assign('moddir', $moddir); - - // Modules list - $module_list = $system_module->getModuleList(); - $xoops->tpl->assign('module_menu', $module_list); - unset($module_list); - - // Extensions list - $extension_list = $system_extension->getExtensionList(); - $xoops->tpl->assign('extension_menu', $extension_list); - unset($extension_list); - - $extension_mod = $system_extension->getExtension( $moddir ); - $xoops->tpl->assign('extension_mod', $extension_mod); - - // add preferences menu - $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 - ); - $menu[] = array('title' => 'separator'); - - // Module adminmenu - if ($xoops->isModule() && $xoops->module->getVar('dirname') != 'system') { - - if ($xoops->module->getInfo('system_menu')) { - //$xoops->theme->addStylesheet('modules/system/css/menu.css'); - - $xoops->module->loadAdminMenu(); - // Get menu tab handler - /* @var $menu_handler SystemMenuHandler */ - $menu_handler = $xoops->getModuleHandler('menu', 'system'); - // Define top navigation - $menu_handler->addMenuTop(XOOPS_URL . "/modules/system/admin.php?fct=preferences&op=showmod&mod=" . $xoops->module->getVar('mid', 'e'), _AM_SYSTEM_PREF); - $menu_handler->addMenuTop(XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=update&module=" . $xoops->module->getVar('dirname', 'e'), _AM_SYSTEM_UPDATE); - if ($xoops->module->getInfo('blocks')) { - $menu_handler->addMenuTop(XOOPS_URL . "/modules/system/admin.php?fct=blocksadmin&op=list&filter=1&selgen=" . $xoops->module->getVar('mid', 'e') . "&selmod=-2&selgrp=-1&selvis=-1", _AM_SYSTEM_BLOCKS); - } - if ($xoops->module->getInfo('hasMain')) { - $menu_handler->addMenuTop(XOOPS_URL . "/modules/" . $xoops->module->getVar('dirname', 'e') . "/", _AM_SYSTEM_GOTOMODULE); - } - // Define main tab navigation - $i = 0; - $current = $i; - foreach ($xoops->module->adminmenu as $menu) { - if (stripos($_SERVER['REQUEST_URI'], $menu['link']) !== false) { - $current = $i; - } - $menu_handler->addMenuTabs( $xoops->url('modules/' . $xoops->module->getVar('dirname') . '/' . $menu['link']), $menu['title']); - $i++; - } - if ($xoops->module->getInfo('help')) { - if (stripos($_SERVER['REQUEST_URI'], 'admin/' . $xoops->module->getInfo('help')) !== false) { - $current = $i; - } - $menu_handler->addMenuTabs('../../system/help.php?mid=' . $xoops->module->getVar('mid', 's') . '&' . $xoops->module->getInfo('help'), _AM_SYSTEM_HELP); - } - - // Display navigation tabs - $xoops->tpl->assign('xo_system_menu', $menu_handler->render($current, false)); - } - } - - } -} - +<?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 Cpanel default GUI class + * + * @copyright The XOOPS project http://sf.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package system + * @usbpackage GUI + * @since 2.4 + * @author Mamba XXXXXXXXXXXXXXXXXXX + * @author Mojtabajml <jam...@gm...> + * @author Voltan <djv...@gm...> + * @author BitC3R0 <Bi...@gm...> + * @author trabis <lus...@gm...> + * @version 1.2 + * @version $Id$ + */ + +class XoopsGuiDefault +{ + + function header() + { + $xoops = Xoops::getInstance(); + $xoops->loadLanguage('admin', 'system'); + $xoops->loadLanguage('cpanel', 'system'); + $xoops->loadLanguage('modinfo', 'system'); + + $xoops->theme->addStylesheet('media/xoops/css/moduladmin.css'); + $xoops->theme->addStylesheet(XOOPS_ADMINTHEME_URL . '/default/css/style.css'); + $xoops->theme->addStylesheet($xoops->url('/media/bootstrap/css/xoops.bootstrap.css')); + + + $xoops->theme->addScript($xoops->url('/media/jquery/jquery.js')); + $xoops->theme->addScript($xoops->url('/media/jquery/ui/jquery.ui.js')); + $xoops->theme->addScript($xoops->url('/media/bootstrap/js/bootstrap.min.js')); + // ddsmoothmenu + $xoops->theme->addScript(XOOPS_ADMINTHEME_URL . '/default/js/ddsmoothmenu.js'); + $xoops->theme->addScript(XOOPS_ADMINTHEME_URL . '/default/js/tooltip.js'); + + $quick = array(); + $quick[] = array('title' => _DEFAULT_CPHOME, 'link' => XOOPS_URL . '/admin.php'); + $quick[] = array('title' => _YOURHOME, 'link' => XOOPS_URL); + $quick[] = array('title' => _DEFAULT_NEWS, 'link' => XOOPS_URL . '/admin.php?xoopsorgnews=1'); + $quick[] = array('title' => 'separator'); + $quick[] = array('title' => _LOGOUT, 'link' => XOOPS_URL . '/user.php?op=logout'); + $xoops->tpl->assign('quick_menu', $quick); + + XoopsLoad::load('module', 'system'); + XoopsLoad::load('extension', 'system'); + $system_module = new SystemModule(); + $system_extension = new SystemExtension(); + + $adminmenu = null; + include dirname(__FILE__) . '/menu.php'; + if (!$xoops->isModule() || 'system' == $xoops->module->getVar('dirname', 'n')) { + $modpath = XOOPS_URL . '/admin.php'; + $modname = _DEFAULT_SYSOPTIONS; + $modid = 1; + $moddir = 'system'; + + $mod_options = $adminmenu; + foreach (array_keys($mod_options) as $item) { + $mod_options[$item]['link'] = empty($mod_options[$item]['absolute']) + ? XOOPS_URL . '/modules/' . $moddir . '/' . $mod_options[$item]['link'] + : $mod_options[$item]['link']; + $mod_options[$item]['icon'] = empty($mod_options[$item]['icon']) ? '' + : XOOPS_ADMINTHEME_URL . '/default/' . $mod_options[$item]['icon']; + unset($mod_options[$item]['icon_small']); + } + + } else { + $moddir = $xoops->module->getVar('dirname', 'n'); + $modpath = XOOPS_URL . '/modules/' . $moddir; + $modname = $xoops->module->getVar('name'); + $modid = $xoops->module->getVar('mid'); + + $mod_options = $xoops->module->getAdminMenu(); + foreach (array_keys($mod_options) as $item) { + $mod_options[$item]['link'] = empty($mod_options[$item]['absolute']) + ? XOOPS_URL . "/modules/{$moddir}/" . $mod_options[$item]['link'] : $mod_options[$item]['link']; + $mod_options[$item]['icon'] = empty($mod_options[$item]['icon']) ? '' + : XOOPS_URL . "/media/xoops/images/icons/32/" . $mod_options[$item]['icon']; + } + } + $xoops->tpl->assign('mod_options', $mod_options); + $xoops->tpl->assign('modpath', $modpath); + $xoops->tpl->assign('modname', $modname); + $xoops->tpl->assign('modid', $modid); + $xoops->tpl->assign('moddir', $moddir); + + // Modules list + $module_list = $system_module->getModuleList(); + $xoops->tpl->assign('module_menu', $module_list); + unset($module_list); + + // Extensions list + $extension_list = $system_extension->getExtensionList(); + $xoops->tpl->assign('extension_menu', $extension_list); + unset($extension_list); + + $extension_mod = $system_extension->getExtension( $moddir ); + $xoops->tpl->assign('extension_mod', $extension_mod); + + // add preferences menu + $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 + ); + $menu[] = array('title' => 'separator'); + + // Module adminmenu + if ($xoops->isModule() && $xoops->module->getVar('dirname') != 'system') { + + if ($xoops->module->getInfo('system_menu')) { + //$xoops->theme->addStylesheet('modules/system/css/menu.css'); + + $xoops->module->loadAdminMenu(); + // Get menu tab handler + /* @var $menu_handler SystemMenuHandler */ + $menu_handler = $xoops->getModuleHandler('menu', 'system'); + // Define top navigation + $menu_handler->addMenuTop(XOOPS_URL . "/modules/system/admin.php?fct=preferences&op=showmod&mod=" . $xoops->module->getVar('mid', 'e'), _AM_SYSTEM_PREF); + if ($xoops->module->getInfo('extension')) { + $menu_handler->addMenuTop(XOOPS_URL . "/modules/system/admin.php?fct=extensions&op=update&module=" . $xoops->module->getVar('dirname', 'e'), _AM_SYSTEM_UPDATE); + } else { + $menu_handler->addMenuTop(XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=update&module=" . $xoops->module->getVar('dirname', 'e'), _AM_SYSTEM_UPDATE); + } + if ($xoops->module->getInfo('blocks')) { + $menu_handler->addMenuTop(XOOPS_URL . "/modules/system/admin.php?fct=blocksadmin&op=list&filter=1&selgen=" . $xoops->module->getVar('mid', 'e') . "&selmod=-2&selgrp=-1&selvis=-1", _AM_SYSTEM_BLOCKS); + } + if ($xoops->module->getInfo('hasMain')) { + $menu_handler->addMenuTop(XOOPS_URL . "/modules/" . $xoops->module->getVar('dirname', 'e') . "/", _AM_SYSTEM_GOTOMODULE); + } + // Define main tab navigation + $i = 0; + $current = $i; + foreach ($xoops->module->adminmenu as $menu) { + if (stripos($_SERVER['REQUEST_URI'], $menu['link']) !== false) { + $current = $i; + } + $menu_handler->addMenuTabs( $xoops->url('modules/' . $xoops->module->getVar('dirname') . '/' . $menu['link']), $menu['title']); + $i++; + } + if ($xoops->module->getInfo('help')) { + if (stripos($_SERVER['REQUEST_URI'], 'admin/' . $xoops->module->getInfo('help')) !== false) { + $current = $i; + } + $menu_handler->addMenuTabs('../../system/help.php?mid=' . $xoops->module->getVar('mid', 's') . '&' . $xoops->module->getInfo('help'), _AM_SYSTEM_HELP); + } + + // Display navigation tabs + $xoops->tpl->assign('xo_system_menu', $menu_handler->render($current, false)); + } + } + + } +} + ?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php ___________________________________________________________________ Deleted: svn:eol-style - native |
From: <ir...@us...> - 2012-10-17 08:19:35
|
Revision: 10226 http://sourceforge.net/p/xoops/svn/10226 Author: irmtfan Date: 2012-10-17 08:19:31 +0000 (Wed, 17 Oct 2012) Log Message: ----------- improve: add startlag, length, striptag=true/false, strip tages excludes improve: skip empty results improve: default path for themes Modified Paths: -------------- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt XoopsModules/newbb/branches/irmtfan/newbb/class/icon.php XoopsModules/newbb/branches/irmtfan/newbb/class/read.php XoopsModules/newbb/branches/irmtfan/newbb/docs/lang_diff.txt XoopsModules/newbb/branches/irmtfan/newbb/include/functions.text.php XoopsModules/newbb/branches/irmtfan/newbb/language/english/main.php XoopsModules/newbb/branches/irmtfan/newbb/language/persian/main.php XoopsModules/newbb/branches/irmtfan/newbb/search.php XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_search.html Modified: XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt 2012-10-17 00:12:33 UTC (rev 10225) +++ XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt 2012-10-17 08:19:31 UTC (rev 10226) @@ -1,3 +1,20 @@ +date 2012-10-17 +=================================== +1- improve: add startlag, length, striptag=true/false, strip tages excludes in search form. +in newbb/search.php, newbb/include/functions.text.php, newbb/templates/newbb_search.php, newbb/language/LANG/main.php, newbb/docs/lang_diff.txt + +2- improve: in search form: dont show (skip) the result if both (post text) and (post subject) are empty. +in newbb/search.php, newbb/include/functions.text.php + +3- improve: in search fucntion: ability to create criteria for both since and search topic +in newbb/search.php + +4- comment add: the comment in class read about read_expire values was wrong +in newbb/class/read.php + +5- improve: add default path for themes/default and themes/YOUR_THEME (images, css, js) +in newbb/class/icon.php + date 2012-10-15 =================================== 1- bug fix: viewpost.php?status=new AND viewforum.php?forum=FFF&status=unread and list.topic.php?status=unread criteria was wrong when read_mode = 2(important) Modified: XoopsModules/newbb/branches/irmtfan/newbb/class/icon.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/class/icon.php 2012-10-17 00:12:33 UTC (rev 10225) +++ XoopsModules/newbb/branches/irmtfan/newbb/class/icon.php 2012-10-17 08:19:31 UTC (rev 10226) @@ -102,16 +102,32 @@ $theme_path = $this->template->currentTheme->path; $rel_dir = "modules/{$dirname}/{$end_dir}"; - - $path = is_dir($theme_path."/{$rel_dir}/{$type}/") - ? $theme_path."/{$rel_dir}/{$type}" - : ( is_dir(XOOPS_THEME_PATH."/default/{$rel_dir}/{$type}/") - ? XOOPS_THEME_PATH."/default/{$rel_dir}/{$type}" - : ( empty($default) || is_dir(XOOPS_ROOT_PATH."/modules/{$dirname}/templates/{$end_dir}/{$type}/") - ? XOOPS_ROOT_PATH."/modules/{$dirname}/templates/{$end_dir}/{$type}" - : XOOPS_ROOT_PATH."/modules/{$dirname}/templates/{$end_dir}/{$default}" - ) - ); + // START irmtfan add default for all pathes + if (empty($default)) { + $path = is_dir($theme_path."/{$rel_dir}/{$type}/") + ? $theme_path."/{$rel_dir}/{$type}" + : ( is_dir(XOOPS_THEME_PATH."/default/{$rel_dir}/{$type}/") + ? XOOPS_THEME_PATH."/default/{$rel_dir}/{$type}" + : XOOPS_ROOT_PATH."/modules/{$dirname}/templates/{$end_dir}/{$type}" + ); + } else { + $path = is_dir($theme_path."/{$rel_dir}/{$type}/") + ? $theme_path."/{$rel_dir}/{$type}" + : ( is_dir($theme_path."/{$rel_dir}/{$default}/") + ? $theme_path."/{$rel_dir}/{$default}" + : ( is_dir(XOOPS_THEME_PATH."/default/{$rel_dir}/{$type}/") + ? XOOPS_THEME_PATH."/default/{$rel_dir}/{$type}" + : ( is_dir(XOOPS_THEME_PATH."/default/{$rel_dir}/{$default}/") + ? XOOPS_THEME_PATH."/default/{$rel_dir}/{$default}" + : ( is_dir(XOOPS_ROOT_PATH."/modules/{$dirname}/templates/{$end_dir}/{$type}/") + ? XOOPS_ROOT_PATH."/modules/{$dirname}/templates/{$end_dir}/{$type}" + : XOOPS_ROOT_PATH."/modules/{$dirname}/templates/{$end_dir}/{$default}" + ) // XOOPS_ROOT_PATH + ) // XOOPS_THEME_PATH {$default} + ) // XOOPS_THEME_PATH + ); // $theme_path {$default} + } + // END irmtfan add default for all pathes $paths[$end_dir . '/' . $type] = str_replace(XOOPS_ROOT_PATH, "", $path); return $paths[$end_dir . '/' . $type]; Modified: XoopsModules/newbb/branches/irmtfan/newbb/class/read.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/class/read.php 2012-10-17 00:12:33 UTC (rev 10225) +++ XoopsModules/newbb/branches/irmtfan/newbb/class/read.php 2012-10-17 08:19:31 UTC (rev 10226) @@ -75,8 +75,9 @@ * seconds records will persist. * assigned from $xoopsModuleConfig["read_expire"] * <ul> - * <li>0 = never records</li> - * <li>-1 = never expires</li> + * <li>positive days = delete all read records exist in the tables before expire time // irmtfan add comment</li> + * <li>0 = never expires // irmtfan change comment</li> + * <li>-1 or any negative days = never records // irmtfan change comment</li> * </ul> * * @var integer Modified: XoopsModules/newbb/branches/irmtfan/newbb/docs/lang_diff.txt =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/docs/lang_diff.txt 2012-10-17 00:12:33 UTC (rev 10225) +++ XoopsModules/newbb/branches/irmtfan/newbb/docs/lang_diff.txt 2012-10-17 08:19:31 UTC (rev 10226) @@ -62,6 +62,12 @@ define('_MD_SEARCHTOPIC','Search Topic'); define('_MD_SHOWSEARCH','Show results:'); define('_MD_SEARCHPOSTTEXT','posts text'); +define('_MD_SELECT_STARTLAG','Start lag of selected text'); +define('_MD_SELECT_STARTLAG_DESC','Select text from X characters before the first keyword'); +define('_MD_SELECT_LENGTH','Length of selected text'); +define('_MD_SELECT_HTML','Strip all html from result?'); +define('_MD_SELECT_EXCLUDE','Exclude these tags:'); +define('_MD_SELECT_TAG','Tag'); admin.php --------- Modified: XoopsModules/newbb/branches/irmtfan/newbb/include/functions.text.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/include/functions.text.php 2012-10-17 00:12:33 UTC (rev 10225) +++ XoopsModules/newbb/branches/irmtfan/newbb/include/functions.text.php 2012-10-17 08:19:31 UTC (rev 10226) @@ -23,13 +23,14 @@ * @return text $select_text */ -function newbb_selectText($text, $queryarray, $selectstartlag = 100, $selectlength = 200, $striptags = true, $excludetags = '<br>') { +function newbb_selectText($text, $queryarray, $selectstartlag = 100, $selectlength = 200, $striptags = true, $excludetags = '<br>', $start_trimmarker = '[...]', $end_trimmarker = '[...]') { $sanitized_text = $striptags ? strip_tags($text, $excludetags) : $text; $queryarray = newbb_str2array($queryarray); $text_i = strtolower($sanitized_text); $queryarray = array_map('strtolower', $queryarray); $lengtharray = array_map('strlen', $queryarray); $maxlengthquery = max($lengtharray); + $lengthend_trimmarker = strlen($end_trimmarker); $select_text = ""; $startpos = 0; $endpos = strlen($sanitized_text); @@ -43,9 +44,12 @@ if ($pos == $endpos) break; $start = max(($pos - $selectstartlag), ($startpos - $maxlengthquery), 0); // $startpos is the last position in the previous select text $length = $maxlengthquery + $selectlength; //xoops_local("strlen", $query) + 200; - $select_text .= "<p>[...] " . xoops_substr($sanitized_text, $start, $length, " [...]") . "</p>"; + $select_text .= "<p>"; + $select_text .= ($start > 0) ? $start_trimmarker . " " : " "; + $select_text .= xoops_substr($sanitized_text, $start, $length + $lengthend_trimmarker + 1, " ". $end_trimmarker) . "</p>"; $startpos = $start + $length + 1; // start searching from next position. } + if ( empty($select_text) ) return ''; // if no text return empty string return '<span class="newbb_select_text">' . $select_text . '</span>'; } Modified: XoopsModules/newbb/branches/irmtfan/newbb/language/english/main.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/language/english/main.php 2012-10-17 00:12:33 UTC (rev 10225) +++ XoopsModules/newbb/branches/irmtfan/newbb/language/english/main.php 2012-10-17 08:19:31 UTC (rev 10226) @@ -500,4 +500,10 @@ define('_MD_SEARCHTOPIC','Search Topic'); define('_MD_SHOWSEARCH','Show results:'); define('_MD_SEARCHPOSTTEXT','Posts text'); +define('_MD_SELECT_STARTLAG','Start lag of selected text'); +define('_MD_SELECT_STARTLAG_DESC','Select text from X characters before the first keyword'); +define('_MD_SELECT_LENGTH','Length of selected text'); +define('_MD_SELECT_HTML','Strip all html from result?'); +define('_MD_SELECT_EXCLUDE','Exclude these tags:'); +define('_MD_SELECT_TAG','Tag'); ?> \ No newline at end of file Modified: XoopsModules/newbb/branches/irmtfan/newbb/language/persian/main.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/language/persian/main.php 2012-10-17 00:12:33 UTC (rev 10225) +++ XoopsModules/newbb/branches/irmtfan/newbb/language/persian/main.php 2012-10-17 08:19:31 UTC (rev 10226) @@ -498,4 +498,10 @@ define('_MD_SEARCHTOPIC','جستجو تاپیک'); define('_MD_SHOWSEARCH','نمایش نتایج:'); define('_MD_SEARCHPOSTTEXT','متن پست'); +define('_MD_SELECT_STARTLAG','شروع متن انتخابی'); +define('_MD_SELECT_STARTLAG_DESC','شروع انتخاب متن این مقدار کاراکتر قبل از اولین کلمه کلیدی پیدا شده در متن خواهد بود.'); +define('_MD_SELECT_LENGTH','طول متن انتخابی'); +define('_MD_SELECT_HTML','پاک کردن همه کد های html از متن جستجو شده؟'); +define('_MD_SELECT_EXCLUDE','این تگ های html را پاک نکن'); +define('_MD_SELECT_TAG','تگ'); ?> \ No newline at end of file Modified: XoopsModules/newbb/branches/irmtfan/newbb/search.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/search.php 2012-10-17 00:12:33 UTC (rev 10225) +++ XoopsModules/newbb/branches/irmtfan/newbb/search.php 2012-10-17 08:19:31 UTC (rev 10226) @@ -56,13 +56,19 @@ $uid = 0; $forum = 0; $sortby = 'p.post_time'; // irmtfan remove DESC -$criteriaExtra = "";// irmtfan change to criteria +$criteriaExtra = new CriteriaCompo(); // irmtfan new criteria $searchin = "both"; $sort = ""; $since = isset($_POST['since']) ? $_POST['since'] : (isset($_GET['since']) ? $_GET['since'] : null); $next_search['since'] = $since; $term = isset($_POST['term']) ? $_POST['term'] : (isset($_GET['term']) ? $_GET['term'] : null); $uname = isset($_POST['uname']) ? $_POST['uname'] : (isset($_GET['uname']) ? $_GET['uname'] : null); +// irmtfan add select parameters +$selectstartlag = !empty($_GET['selectstartlag']) ? intval($_GET['selectstartlag']) : 100; +$selectlength = !empty($_GET['selectlength']) ? intval($_GET['selectlength']) : 200; +$selecthtml = isset($_GET['selecthtml']) ? ( !empty($_GET['selecthtml']) ? true : false ) : true; +$selectexclude = isset($_GET['selectexclude']) ? $_GET['selectexclude']: ''; +$selectexclude = newbb_str2array($selectexclude); if ($xoopsModuleConfig['wol_enabled']) { $online_handler =& xoops_getmodulehandler('online', 'newbb'); @@ -73,6 +79,15 @@ //$xoopsTpl->assign("img_folder", newbb_displayImage($forumImage['topic'])); if ( !empty($_REQUEST['submit']) || !empty($uname) || !empty($term)) { + // irmtfan filter positive numbers + $selectstartlag = !empty($selectstartlag) ? abs($selectstartlag) : 100; + $selectlength = !empty($selectlength) ? abs($selectlength) : 200; + // irmtfan add select parameters for next search + $next_search['selectstartlag'] = $selectstartlag; + $next_search['selectlength'] = $selectlength; + $next_search['selecthtml'] = $selecthtml; + $next_search['selectexclude'] = implode(", ", $selectexclude); + $start = isset($_GET['start']) ? $_GET['start'] : 0; $forum = isset($_POST['forum']) ? $_POST['forum'] : (isset($_GET['forum']) ? $_GET['forum'] : null); if (empty($forum) or $forum == 'all' or (is_array($forum) and in_array('all', $forum))) { @@ -154,15 +169,14 @@ $sortby = (in_array(strtolower($sortby), $allowed)) ? $sortby : 'p.post_time'; $searchin = isset($_POST['searchin']) ? $_POST['searchin'] : (isset($_GET['searchin']) ? $_GET['searchin'] : 'both'); $next_search['searchin'] = $searchin; - // START irmtfan use criteria - add topic search + // START irmtfan use criteria - add since and topic search if (!empty($since)) { - $criteriaExtra = new CriteriaCompo(); $criteriaExtra->add(new Criteria('p.post_time', (time() - newbb_getSinceTime($since)), '>='), 'OR'); - } elseif (is_numeric($topic) && !empty($topic)) { - $criteriaExtra = new CriteriaCompo(); + } + if (is_numeric($topic) && !empty($topic)) { $criteriaExtra->add(new Criteria('p.topic_id', $topic), 'OR'); } - // END irmtfan use criteria - add topic search + // END irmtfan use criteria - add since and topic search if ($uname_required&&(!$uid||count($uid)<1)) $results = array(); // irmtfan bug fix array() else $results = newbb_search($queries, $andor, $limit, $start, $uid, $forum, $sortby, $searchin, $criteriaExtra); // irmtfan $criteriaExtra @@ -175,13 +189,27 @@ $xoopsTpl->assign("lang_nomatch", _SR_NOMATCH); } else { - // START irmtfan add show search post_text + // START irmtfan add show search post_text, skip the result if both (post text) and (post subject) are empty + $skipresults = 0; foreach ($results as $row) { $post_text = ""; + $post_text_select = "have text"; + $post_subject_select = "have text"; if ($show_search == 'post_text') { - $post_text = newbb_selectText($row['post_text'], $queries, 100, 200, false); // strip html tags = false + $post_text = newbb_selectText($row['post_text'], $queries, $selectstartlag, $selectlength, $selecthtml, implode("",$selectexclude)); // strip html tags = $selecthtml + $post_text_select = $post_text; $post_text = newbb_highlightText($post_text, $queries); + } elseif ( "title" != $searchin && !empty($selecthtml) ) { // find if there is any query left after strip html tags + $post_text_select = newbb_selectText($row['post_text'], $queries, 100, 30000, true, implode("",$selectexclude)); // strip html tags = true } + if ("text" != $searchin) { + $post_subject_select = newbb_selectText($row['title'], $queries, 100, 400, true);// strip html tags = true + } + // if no text remained after select text continue + if (empty($post_text_select) && empty($post_subject_select)) { + $skipresults = $skipresults + 1; + continue; + } // add newbb_highlightText function to subject - add post_text $xoopsTpl->append('results', array('forum_name' => $row['forum_name'], 'forum_link' => $row['forum_link'], 'link' => $row['link'], 'title' => newbb_highlightText($row['title'],$queries), 'poster' => $row['poster'], 'post_time' => formatTimestamp($row['time'], "m"), 'post_text' => $post_text)); } @@ -209,16 +237,22 @@ if ($num_results == $limit) { $next = $start + $limit; $queries = implode(',',$queries); - $search_url_next = $search_url."&start={$next}"; // irmtfan add { and } + $search_url_next = $search_url."&direction=next&start={$next}"; // irmtfan add { and } direction=next $search_next = '<a href="'.htmlspecialchars($search_url_next).'">'._SR_NEXT.'</a>'; $xoopsTpl->assign("search_next", $search_next); } if ( $start > 0 ) { $prev = $start - $limit; - $search_url_prev = $search_url."&start={$prev}"; // irmtfan add { and } + $search_url_prev = $search_url."&direction=previous&start={$prev}"; // irmtfan add { and } and direction=previous $search_prev = '<a href="'.htmlspecialchars($search_url_prev).'">'._SR_PREVIOUS.'</a>'; $xoopsTpl->assign("search_prev", $search_prev); } + // irmtfan if all results skipped then redirect to the next/previous page + if ( $num_results == $skipresults ) { + $direction = isset($_POST['direction']) ? $_POST['direction'] : (isset($_GET['direction']) ? $_GET['direction'] : 'next'); + $search_url_redirect = (strtolower($direction) == "next") ? $search_url_next : $search_url_prev; + redirect_header($search_url_redirect, 1, constant(strtoupper("_SR_{$direction}"))); + } } // irmtfan add newbb_highlightText function $search_info = _SR_KEYWORDS.": ".$search_info_keywords; @@ -228,6 +262,10 @@ } // add num_results $search_info .= "<br />" . sprintf(_SR_SHOWING, $start + 1, $start + $num_results); + // if any result skip show the counter + if (!empty($skipresults)) { + $search_info .= " - " . sprintf(_SR_FOUND, $num_results - $skipresults); + } $xoopsTpl->assign("search_info", $search_info); } // START irmtfan - assign template vars for search @@ -291,6 +329,47 @@ $sortby_select .= ">" . _MD_TOPIC . "</option>"; $sortby_select .= "</select>"; $xoopsTpl->assign("sortby_selection_box", $sortby_select); + +/* selectstartlag */ +$xoopsTpl->assign("selectstartlag_select", $selectstartlag); + +/* selectlength */ +$xoopsTpl->assign("selectlength_select", $selectlength); + +/* selecthtml */ +$selecthtml_select = ""; +$selecthtml_select .= "<input type=\"radio\" name=\"selecthtml\" value=\"1\" onclick=\"javascript: {document.Search.selectexcludeset.disabled=false;}\""; +if (!empty($selecthtml)) $selecthtml_select .= " checked"; +$selecthtml_select .= " />" . _YES . " "; +$selecthtml_select .= "<input type=\"radio\" name=\"selecthtml\" value=\"0\" onclick=\"javascript: {document.Search.selectexcludeset.disabled=true;}\""; +if (empty($selecthtml)) $selecthtml_select .= " checked"; +$selecthtml_select .= " />" . _NO . " "; +$xoopsTpl->assign("selecthtml_radio", $selecthtml_select); + +/* selectexclude */ +$selectexclude_select = "<fieldset name=\"selectexcludeset\""; +if (empty($selecthtml)) $selectexclude_select .= " disabled"; +$selectexclude_select .= " />"; +$selectexclude_select .= "<input type=\"checkbox\" name=\"selectexclude[]\" value=\"<p>\""; +if (in_array("<p>", $selectexclude)) $selectexclude_select .= " checked"; +$selectexclude_select .= " /> " . _MD_SELECT_TAG . " p "; +$selectexclude_select .= "<input type=\"checkbox\" name=\"selectexclude[]\" value=\"<br>\""; +if (in_array("<br>", $selectexclude)) $selectexclude_select .= " checked"; +$selectexclude_select .= " /> " . _MD_SELECT_TAG . " br "; +$selectexclude_select .= "<input type=\"checkbox\" name=\"selectexclude[]\" value=\"<a>\""; +if (in_array("<a>", $selectexclude)) $selectexclude_select .= " checked"; +$selectexclude_select .= " /> " . _MD_SELECT_TAG . " a "; +$selectexclude_select .= "<input type=\"checkbox\" name=\"selectexclude[]\" value=\"<div>\""; +if (in_array("<div>", $selectexclude)) $selectexclude_select .= " checked"; +$selectexclude_select .= " /> " . _MD_SELECT_TAG . " div "; +$selectexclude_select .= "<input type=\"checkbox\" name=\"selectexclude[]\" value=\"<img>\""; +if (in_array("<img>", $selectexclude)) $selectexclude_select .= " checked"; +$selectexclude_select .= " /> " . _MD_SELECT_TAG . " img "; +$selectexclude_select .= "<input type=\"checkbox\" name=\"selectexclude[]\" value=\"<span>\""; +if (in_array("<span>", $selectexclude)) $selectexclude_select .= " checked"; +$selectexclude_select .= " /> " . _MD_SELECT_TAG . " span "; +$selectexclude_select .= "</fieldset>"; +$xoopsTpl->assign("selectexclude_check_box", $selectexclude_select); // END irmtfan - assign template vars for search // irmtfan get since from the user for selction box Modified: XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_search.html =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_search.html 2012-10-17 00:12:33 UTC (rev 10225) +++ XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_search.html 2012-10-17 08:19:31 UTC (rev 10226) @@ -47,6 +47,24 @@ <td class="head" id="align_right"><strong><{$smarty.const._MD_SINCE}></strong> </td> <td class="even"><{$since_selection_box}></td> </tr> +<!-- START irmtfan add select text options --> + <tr> + <td class="head" id="align_right" title="<{$smarty.const._MD_SELECT_STARTLAG_DESC}>"><strong><{$smarty.const._MD_SELECT_STARTLAG}></strong> </td> + <td class="even" title="<{$smarty.const._MD_SELECT_STARTLAG_DESC}>"><input type="text" name="selectstartlag" value="<{$selectstartlag_select}>" /></td> + </tr> + <tr> + <td class="head" id="align_right"><strong><{$smarty.const._MD_SELECT_LENGTH}></strong> </td> + <td class="even"><input type="text" name="selectlength" value="<{$selectlength_select}>" /></td> + </tr> + <tr> + <td class="head" id="align_right"><strong><{$smarty.const._MD_SELECT_HTML}></strong> </td> + <td class="even"><{$selecthtml_radio}></td> + </tr> + <tr> + <td class="head" id="align_right"><strong><{$smarty.const._MD_SELECT_EXCLUDE}></strong> </td> + <td class="even"><{$selectexclude_check_box}></td> + </tr> +<!-- END irmtfan add select text options --> <!-- START irmtfan add show search --> <tr> <td class="head" id="align_right"><strong><{$smarty.const._MD_SHOWSEARCH}></strong> </td> |