|
From: <be...@us...> - 2013-10-08 12:12:25
|
Revision: 12165
http://sourceforge.net/p/xoops/svn/12165
Author: beckmi
Date: 2013-10-08 12:12:22 +0000 (Tue, 08 Oct 2013)
Log Message:
-----------
Module standardization
Modified Paths:
--------------
XoopsModules/contact/trunk/contact/admin/about.php
XoopsModules/contact/trunk/contact/admin/contact.php
XoopsModules/contact/trunk/contact/admin/index.php
XoopsModules/contact/trunk/contact/admin/log.php
XoopsModules/contact/trunk/contact/admin/menu.php
XoopsModules/contact/trunk/contact/admin/tools.php
XoopsModules/contact/trunk/contact/include/functions_update.php
XoopsModules/contact/trunk/contact/xoops_version.php
Added Paths:
-----------
XoopsModules/contact/trunk/contact/admin/admin_footer.php
XoopsModules/contact/trunk/contact/admin/admin_header.php
Removed Paths:
-------------
XoopsModules/contact/trunk/contact/admin/footer.php
XoopsModules/contact/trunk/contact/admin/header.php
Modified: XoopsModules/contact/trunk/contact/admin/about.php
===================================================================
--- XoopsModules/contact/trunk/contact/admin/about.php 2013-10-08 11:14:45 UTC (rev 12164)
+++ XoopsModules/contact/trunk/contact/admin/about.php 2013-10-08 12:12:22 UTC (rev 12165)
@@ -21,7 +21,7 @@
*/
// Call header
-require dirname(__FILE__) . '/header.php';
+require dirname(__FILE__) . '/admin_header.php';
// Display Admin header
xoops_cp_header();
@@ -31,4 +31,4 @@
// Call template file
$xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/contact/templates/admin/contact_about.html');
// Call footer
-require dirname(__FILE__) . '/footer.php';
+require dirname(__FILE__) . '/admin_footer.php';
Added: XoopsModules/contact/trunk/contact/admin/admin_footer.php
===================================================================
--- XoopsModules/contact/trunk/contact/admin/admin_footer.php (rev 0)
+++ XoopsModules/contact/trunk/contact/admin/admin_footer.php 2013-10-08 12:12:22 UTC (rev 12165)
@@ -0,0 +1,23 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*/
+
+/**
+ * Contact module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @author Kazumi Ono (aka Onokazu)
+ * @author Trabis <lus...@gm...>
+ * @author Hossein Azizabadi (AKA Voltan)
+ * @version $Id$
+ */
+
+xoops_cp_footer();
Property changes on: XoopsModules/contact/trunk/contact/admin/admin_footer.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/contact/trunk/contact/admin/admin_header.php
===================================================================
--- XoopsModules/contact/trunk/contact/admin/admin_header.php (rev 0)
+++ XoopsModules/contact/trunk/contact/admin/admin_header.php 2013-10-08 12:12:22 UTC (rev 12165)
@@ -0,0 +1,46 @@
+<?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.
+*/
+
+/**
+ * Contact module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @author Kazumi Ono (aka Onokazu)
+ * @author Trabis <lus...@gm...>
+ * @author Hossein Azizabadi (AKA Voltan)
+ * @version $Id$
+ */
+
+$path = dirname(dirname(dirname(dirname(__FILE__))));
+
+include_once $path . '/mainfile.php';
+include_once XOOPS_ROOT_PATH . '/include/cp_functions.php';
+include_once XOOPS_ROOT_PATH . '/include/cp_header.php';
+include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
+include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
+global $xoopsModule;
+
+$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname');
+
+// Load language files
+xoops_loadLanguage('admin', $thisModuleDir);
+xoops_loadLanguage('modinfo', $thisModuleDir);
+xoops_loadLanguage('main', $thisModuleDir);
+
+$pathIcon16 = XOOPS_URL . '/' . $xoopsModule->getInfo('icons16');
+$pathIcon32 = XOOPS_URL . '/' . $xoopsModule->getInfo('icons32');
+$pathModuleAdmin = XOOPS_ROOT_PATH . '/' . $xoopsModule->getInfo('dirmoduleadmin');
+require_once $pathModuleAdmin . '/moduleadmin/moduleadmin.php';
+$admin_class = new ModuleAdmin();
+
+// Contact Handler
+$contact_handler = & xoops_getModuleHandler('contact', 'contact');
Property changes on: XoopsModules/contact/trunk/contact/admin/admin_header.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: XoopsModules/contact/trunk/contact/admin/contact.php
===================================================================
--- XoopsModules/contact/trunk/contact/admin/contact.php 2013-10-08 11:14:45 UTC (rev 12164)
+++ XoopsModules/contact/trunk/contact/admin/contact.php 2013-10-08 12:12:22 UTC (rev 12165)
@@ -21,7 +21,7 @@
*/
// Call header
-require dirname(__FILE__) . '/header.php';
+require dirname(__FILE__) . '/admin_header.php';
// Display Admin header
xoops_cp_header();
// Define default value
@@ -203,4 +203,4 @@
// Call template file
$xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/contact/templates/admin/contact_contact.html');
// Call footer
-require dirname(__FILE__) . '/footer.php';
+require dirname(__FILE__) . '/admin_footer.php';
Deleted: XoopsModules/contact/trunk/contact/admin/footer.php
===================================================================
--- XoopsModules/contact/trunk/contact/admin/footer.php 2013-10-08 11:14:45 UTC (rev 12164)
+++ XoopsModules/contact/trunk/contact/admin/footer.php 2013-10-08 12:12:22 UTC (rev 12165)
@@ -1,23 +0,0 @@
-<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-
-/**
- * Contact module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @author Kazumi Ono (aka Onokazu)
- * @author Trabis <lus...@gm...>
- * @author Hossein Azizabadi (AKA Voltan)
- * @version $Id$
- */
-
-xoops_cp_footer();
Deleted: XoopsModules/contact/trunk/contact/admin/header.php
===================================================================
--- XoopsModules/contact/trunk/contact/admin/header.php 2013-10-08 11:14:45 UTC (rev 12164)
+++ XoopsModules/contact/trunk/contact/admin/header.php 2013-10-08 12:12:22 UTC (rev 12165)
@@ -1,53 +0,0 @@
-<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-
-/**
- * Contact module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @author Kazumi Ono (aka Onokazu)
- * @author Trabis <lus...@gm...>
- * @author Hossein Azizabadi (AKA Voltan)
- * @version $Id$
- */
-
-$path = dirname(dirname(dirname(dirname(__FILE__))));
-
-include_once $path . '/mainfile.php';
-include_once XOOPS_ROOT_PATH . '/include/cp_functions.php';
-include_once XOOPS_ROOT_PATH . '/include/cp_header.php';
-include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
-include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
-global $xoopsModule;
-
-$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname');
-
-// Load language files
-xoops_loadLanguage('admin', $thisModuleDir);
-xoops_loadLanguage('modinfo', $thisModuleDir);
-xoops_loadLanguage('main', $thisModuleDir);
-
-$pathIcon16 = '../' . $xoopsModule->getInfo('icons16');
-$pathIcon32 = '../' . $xoopsModule->getInfo('icons32');
-$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
-
-// Contact Handler
-$contact_handler = & xoops_getModuleHandler('contact', 'contact');
-
-// Locad admin menu class
-if (file_exists($GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php'))) {
- include_once $GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php');
-} else {
- redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false);
-}
-
-$admin_class = new ModuleAdmin();
Modified: XoopsModules/contact/trunk/contact/admin/index.php
===================================================================
--- XoopsModules/contact/trunk/contact/admin/index.php 2013-10-08 11:14:45 UTC (rev 12164)
+++ XoopsModules/contact/trunk/contact/admin/index.php 2013-10-08 12:12:22 UTC (rev 12165)
@@ -21,7 +21,7 @@
*/
// Call header
-require dirname(__FILE__) . '/header.php';
+require dirname(__FILE__) . '/admin_header.php';
// Display Admin header
xoops_cp_header();
@@ -34,4 +34,4 @@
// Call template file
$xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/contact/templates/admin/contact_index.html');
// Call footer
-require dirname(__FILE__) . '/footer.php';
+require dirname(__FILE__) . '/admin_footer.php';
Modified: XoopsModules/contact/trunk/contact/admin/log.php
===================================================================
--- XoopsModules/contact/trunk/contact/admin/log.php 2013-10-08 11:14:45 UTC (rev 12164)
+++ XoopsModules/contact/trunk/contact/admin/log.php 2013-10-08 12:12:22 UTC (rev 12165)
@@ -21,7 +21,7 @@
*/
// Call header
-require dirname(__FILE__) . '/header.php';
+require dirname(__FILE__) . '/admin_header.php';
// Display Admin header
xoops_cp_header();
// Define default value
@@ -52,4 +52,4 @@
// Call template file
$xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/contact/templates/admin/contact_logs.html');
// Call footer
-require dirname(__FILE__) . '/footer.php';
+require dirname(__FILE__) . '/admin_footer.php';
Modified: XoopsModules/contact/trunk/contact/admin/menu.php
===================================================================
--- XoopsModules/contact/trunk/contact/admin/menu.php 2013-10-08 11:14:45 UTC (rev 12164)
+++ XoopsModules/contact/trunk/contact/admin/menu.php 2013-10-08 12:12:22 UTC (rev 12165)
@@ -22,13 +22,11 @@
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
-$dirname = basename(dirname(dirname(__FILE__)));
-$module_handler = xoops_gethandler('module');
-$module = $module_handler->getByDirname($dirname);
-$pathIcon32 = $module->getInfo('icons32');
+$module_handler = xoops_gethandler('module');
+$module = $module_handler->getByDirname(basename(dirname(dirname(__FILE__))));
+$pathIcon32 = '../../' . $module->getInfo('icons32');
+xoops_loadLanguage('modinfo', $module->dirname());
-//xoops_loadLanguage('admin', $dirname);
-
$adminmenu = array();
$i = 1;
Modified: XoopsModules/contact/trunk/contact/admin/tools.php
===================================================================
--- XoopsModules/contact/trunk/contact/admin/tools.php 2013-10-08 11:14:45 UTC (rev 12164)
+++ XoopsModules/contact/trunk/contact/admin/tools.php 2013-10-08 12:12:22 UTC (rev 12165)
@@ -21,7 +21,7 @@
*/
// Call header
-require dirname(__FILE__) . '/header.php';
+require dirname(__FILE__) . '/admin_header.php';
// Display Admin header
xoops_cp_header();
// Define default value
@@ -56,4 +56,4 @@
// Call template file
$xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/contact/templates/admin/contact_tools.html');
// Call footer
-require dirname(__FILE__) . '/footer.php';
+require dirname(__FILE__) . '/admin_footer.php';
Modified: XoopsModules/contact/trunk/contact/include/functions_update.php
===================================================================
--- XoopsModules/contact/trunk/contact/include/functions_update.php 2013-10-08 11:14:45 UTC (rev 12164)
+++ XoopsModules/contact/trunk/contact/include/functions_update.php 2013-10-08 12:12:22 UTC (rev 12165)
@@ -26,25 +26,25 @@
if ($version < 180) {
$sql = "CREATE TABLE " . $xoopsDB->prefix('contact') . " (
- contact_id int(10) unsigned NOT NULL auto_increment,
- contact_uid int(10) NOT NULL,
- contact_cid int(10) NOT NULL,
- contact_create int(10) NOT NULL,
- contact_subject varchar(255) NOT NULL,
- contact_name varchar(255) NOT NULL,
- contact_mail varchar(255) NOT NULL,
- contact_url varchar(255) NOT NULL,
- contact_icq varchar(255) NOT NULL,
- contact_company varchar(255) NOT NULL,
- contact_location varchar(255) NOT NULL,
- contact_department varchar(60) NOT NULL,
- contact_ip varchar(20) NOT NULL,
- contact_phone varchar(20) NOT NULL,
- contact_message text NOT NULL,
- contact_address text NOT NULL,
- contact_reply tinyint(1) NOT NULL,
- PRIMARY KEY (contact_id)
- ) ENGINE=MyISAM;";
+ contact_id int(10) unsigned NOT NULL auto_increment,
+ contact_uid int(10) NOT NULL,
+ contact_cid int(10) NOT NULL,
+ contact_create int(10) NOT NULL,
+ contact_subject varchar(255) NOT NULL,
+ contact_name varchar(255) NOT NULL,
+ contact_mail varchar(255) NOT NULL,
+ contact_url varchar(255) NOT NULL,
+ contact_icq varchar(255) NOT NULL,
+ contact_company varchar(255) NOT NULL,
+ contact_location varchar(255) NOT NULL,
+ contact_department varchar(60) NOT NULL,
+ contact_ip varchar(20) NOT NULL,
+ contact_phone varchar(20) NOT NULL,
+ contact_message text NOT NULL,
+ contact_address text NOT NULL,
+ contact_reply tinyint(1) NOT NULL,
+ PRIMARY KEY (contact_id)
+ ) ENGINE=MyISAM;";
$xoopsDB->query($sql);
}
Modified: XoopsModules/contact/trunk/contact/xoops_version.php
===================================================================
--- XoopsModules/contact/trunk/contact/xoops_version.php 2013-10-08 11:14:45 UTC (rev 12164)
+++ XoopsModules/contact/trunk/contact/xoops_version.php 2013-10-08 12:12:22 UTC (rev 12165)
@@ -39,9 +39,9 @@
$modversion['image'] = "images/contact_slogo.png";
$modversion['dirname'] = basename(dirname(__FILE__));
$modversion['onUpdate'] = 'include/functions_update.php';
-$modversion['dirmoduleadmin'] = '/Frameworks/moduleclasses/moduleadmin';
-$modversion['icons16'] = '../../Frameworks/moduleclasses/icons/16';
-$modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32';
+$modversion['dirmoduleadmin'] = 'Frameworks/moduleclasses';
+$modversion['icons16'] = 'Frameworks/moduleclasses/icons/16';
+$modversion['icons32'] = 'Frameworks/moduleclasses/icons/32';
// DB
$modversion['sqlfile']['mysql'] = "sql/mysql.sql";
|