From: <for...@us...> - 2012-05-08 11:28:29
|
Revision: 9457 http://xoops.svn.sourceforge.net/xoops/?rev=9457&view=rev Author: forxoops Date: 2012-05-08 11:28:18 +0000 (Tue, 08 May 2012) Log Message: ----------- Change mailuser as plugin Correct an error in new form Remove some error for PHP5.3 STRICT Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/send_mails.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/templates/admin/mailusers_admin_send_mail.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php 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/class/xoopsform/themeform.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php 2012-05-08 11:28:18 UTC (rev 9457) @@ -52,10 +52,9 @@ /** * create HTML to output the form as a theme-enabled table with validation. - * - * @return string + * @param bool $template */ - public function render($template = true) + public function render($template = false) { $xoops = Xoops::getInstance(); $xoops->theme->addStylesheet('media/xoops/css/form.css'); @@ -85,6 +84,7 @@ $xoops->tpl->assign('extra', $this->getExtra()); $hidden = ''; foreach ($this->getElements() as $ele) { + /* @var $ele XoopsFormElement */ if (!$ele->isHidden()) { $input['name'] = $ele->getName(); $input['caption'] = $ele->getCaption(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/language/english/modinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/language/english/modinfo.php 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/language/english/modinfo.php 2012-05-08 11:28:18 UTC (rev 9457) @@ -10,7 +10,7 @@ */ /** - * avatars module + * Avatars plugin * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/xoops_version.php 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/xoops_version.php 2012-05-08 11:28:18 UTC (rev 9457) @@ -10,7 +10,7 @@ */ /** - * avatars module + * avatars plugin * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/menu.php 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/menu.php 2012-05-08 11:28:18 UTC (rev 9457) @@ -10,7 +10,7 @@ */ /** - * smiles module + * mail user plugin * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) @@ -20,19 +20,16 @@ * @version $Id$ */ -$pathIcon32 = '../../media/xoops/images/icons/32/'; - $adminmenu = array(); $i = 1; $adminmenu[$i]['title'] = _MI_MAILUSERS_INDEX; $adminmenu[$i]['link'] = "admin/index.php"; -$adminmenu[$i]['icon'] = $pathIcon32 . 'home.png'; +$adminmenu[$i]['icon'] = 'home.png'; $i++; $adminmenu[$i]['title'] = _MI_MAILUSERS_SENDMAIL; $adminmenu[$i]['link'] = "admin/send_mails.php"; -$adminmenu[$i]['icon'] = $pathIcon32 . 'mail_country.png'; +$adminmenu[$i]['icon'] = 'mail_country.png'; $i++; $adminmenu[$i]['title'] = _MI_MAILUSERS_ABOUT; $adminmenu[$i]['link'] = 'admin/about.php'; -$adminmenu[$i]['icon'] = $pathIcon32 . 'about.png'; - +$adminmenu[$i]['icon'] = 'about.png'; \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/send_mails.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/send_mails.php 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/send_mails.php 2012-05-08 11:28:18 UTC (rev 9457) @@ -10,7 +10,7 @@ */ /** - * Mailusers Manager + * Mailusers Plugin * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) @@ -45,6 +45,8 @@ // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addScript('media/jquery/jquery.js'); +// Add Scripts +$xoops->theme->addScript('media/xoops/xoops.js'); $xoops->theme->addScript('modules/system/js/admin.js'); @@ -57,9 +59,8 @@ case 'list': default: - $display_criteria = 1; - $form = new XoopsThemeForm(_AM_MAILUSERS_LIST, "mailusers", "send_mails.php?", 'post', true); + $form = new XoopsThemeForm(_AM_MAILUSERS_LIST, "mailusers", "send_mails.php", 'post', true); //---------------------------------------- if (!empty($_POST['memberslist_id'])) { $user_count = count($_POST['memberslist_id']); @@ -153,7 +154,7 @@ $form->setRequired($subject_text); $form->setRequired($body_text); // Assign form - $xoops->tpl->assign('form', $form->render()); + $xoops->tpl->assign('form_mail', $form->render()); break; // Send Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/language/english/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/language/english/admin.php 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/language/english/admin.php 2012-05-08 11:28:18 UTC (rev 9457) @@ -10,7 +10,7 @@ */ /** - * smiles module + * Mailusers Plugin * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) @@ -27,24 +27,8 @@ define("_AM_MAILUSERS_MAILER_MAIL", ""); define("_AM_MAILUSERS_MAILER_SENDMAIL", ""); define("_AM_MAILUSERS_MAILER_", ""); -define("_AM_MAILUSERS_MAILFROM", "FROM address"); -define("_AM_MAILUSERS_MAILFROMDESC", ""); -define("_AM_MAILUSERS_MAILFROMNAME", "FROM name"); -define("_AM_MAILUSERS_MAILFROMNAMEDESC", ""); // RMV-NOTIFY -define("_AM_MAILUSERS_MAILFROMUID", "FROM user"); -define("_AM_MAILUSERS_MAILFROMUIDDESC", "When the system sends a private message, which user should appear to have sent it?"); -define("_AM_MAILUSERS_MAILERMETHOD", "Mail delivery method"); -define("_AM_MAILUSERS_MAILERMETHODDESC", "Method used to deliver mail. Default is \"mail\", use others only if that makes trouble."); -define("_AM_MAILUSERS_SMTPHOST", "SMTP host(s)"); -define("_AM_MAILUSERS_SMTPHOSTDESC", "List of SMTP servers to try to connect to."); -define("_AM_MAILUSERS_SMTPUSER", "SMTPAuth username"); -define("_AM_MAILUSERS_SMTPUSERDESC", "Username to connect to an SMTP host with SMTPAuth."); -define("_AM_MAILUSERS_SMTPPASS", "SMTPAuth password"); -define("_AM_MAILUSERS_SMTPPASSDESC", "Password to connect to an SMTP host with SMTPAuth."); -define("_AM_MAILUSERS_SENDMAILPATH", "Path to sendmail"); -define("_AM_MAILUSERS_SENDMAILPATHDESC", "Path to the sendmail program (or substitute) on the webserver."); define("_AM_MAILUSERS_THEMEOK", "Selectable themes"); define("_AM_MAILUSERS_THEMEOKDSC", "Choose themes that users can select as the default theme"); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/language/english/modinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/language/english/modinfo.php 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/language/english/modinfo.php 2012-05-08 11:28:18 UTC (rev 9457) @@ -10,7 +10,7 @@ */ /** - * smiles module + * Mailusers Plugin * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) @@ -24,9 +24,24 @@ define("_MI_MAILUSERS_NAME", "Mail users"); define("_MI_MAILUSERS_DESC", "Module for managing mails"); define("_MI_MAILUSERS_SENDMAIL", "Send Mail"); - // Menu define("_MI_MAILUSERS_INDEX", "Home"); define("_MI_MAILUSERS_MAILUSER_MANAGER", "Mail users manager"); define("_MI_MAILUSERS_ABOUT", "About"); - +// Preferences +define("_AM_MAILUSERS_MAILFROM", "FROM address"); +define("_AM_MAILUSERS_MAILFROMDESC", ""); +define("_AM_MAILUSERS_MAILFROMNAME", "FROM name"); +define("_AM_MAILUSERS_MAILFROMNAMEDESC", ""); +define("_AM_MAILUSERS_MAILFROMUID", "FROM user"); +define("_AM_MAILUSERS_MAILFROMUIDDESC", "When the system sends a private message, which user should appear to have sent it?"); +define("_AM_MAILUSERS_MAILERMETHOD", "Mail delivery method"); +define("_AM_MAILUSERS_MAILERMETHODDESC", "Method used to deliver mail. Default is \"mail\", use others only if that makes trouble."); +define("_AM_MAILUSERS_SENDMAILPATH", "Path to sendmail"); +define("_AM_MAILUSERS_SENDMAILPATHDESC", "Path to the sendmail program (or substitute) on the webserver."); +define("_AM_MAILUSERS_SMTPHOST", "SMTP host(s)"); +define("_AM_MAILUSERS_SMTPHOSTDESC", "List of SMTP servers to try to connect to."); +define("_AM_MAILUSERS_SMTPUSER", "SMTPAuth username"); +define("_AM_MAILUSERS_SMTPUSERDESC", "Username to connect to an SMTP host with SMTPAuth."); +define("_AM_MAILUSERS_SMTPPASS", "SMTPAuth password"); +define("_AM_MAILUSERS_SMTPPASSDESC", "Password to connect to an SMTP host with SMTPAuth."); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/templates/admin/mailusers_admin_send_mail.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/templates/admin/mailusers_admin_send_mail.html 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/templates/admin/mailusers_admin_send_mail.html 2012-05-08 11:28:18 UTC (rev 9457) @@ -9,4 +9,4 @@ <{includeq file="admin:system|admin_buttons.html"}> -<{$form}> \ No newline at end of file +<{$form_mail}> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/xoops_version.php 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/xoops_version.php 2012-05-08 11:28:18 UTC (rev 9457) @@ -10,7 +10,7 @@ */ /** - * smiles module + * Mailusers Plugin * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) @@ -51,6 +51,12 @@ // Set to 1 if you want to display menu generated by system module $modversion['system_menu'] = 1; +/* + Manage plugin + */ +$modversion['plugin'] = 1; +$modversion['plugin_module'][] = 'system'; + // Admin things $modversion['hasAdmin'] = 1; $modversion['adminindex'] = 'admin/index.php'; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php 2012-05-08 11:28:18 UTC (rev 9457) @@ -161,9 +161,9 @@ if (round($module->getInfo('version'), 2) != $plugin->getVar('version')) { $module->setInfo('warning_update', true); } - $sadmin = $moduleperm_handler->checkRight('module_admin', $module->getVar('mid'), $xoops->user->getGroups()); + $sadmin = $moduleperm_handler->checkRight('module_admin', $module->getInfo('mid'), $xoops->user->getGroups()); if ($sadmin && ($module->getVar('hasnotification') || is_array($module->getInfo('config')) || is_array($module->getInfo('comments')))) { - $module->setInfo('link_pref', XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $module->getVar('mid')); + $module->setInfo('link_pref', XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $module->getInfo('mid')); } } else { $module->setInfo('install', false); 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-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php 2012-05-08 11:28:18 UTC (rev 9457) @@ -60,7 +60,7 @@ XoopsLoad::load('module', 'system'); $system_module = new SystemModule(); - + $adminmenu = null; include dirname(__FILE__) . '/menu.php'; if (!$xoops->isModule() || 'system' == $xoops->module->getVar('dirname', 'n')) { $modpath = XOOPS_URL . '/admin.php'; @@ -159,6 +159,7 @@ $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); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |