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: <txm...@us...> - 2014-03-29 23:12:33
|
Revision: 12417
http://sourceforge.net/p/xoops/svn/12417
Author: txmodxoops
Date: 2014-03-29 23:12:29 +0000 (Sat, 29 Mar 2014)
Log Message:
-----------
Updated work in progress
Added Toggle Change Display in lists
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/functions.js
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/sql/mysql.sql
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_modules.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.html
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-03-29 00:44:39 UTC (rev 12416)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-03-29 23:12:29 UTC (rev 12417)
@@ -58,8 +58,6 @@
unset($criteria);
if ($nb_tables > 0)
{
- $_yes = "<img src='../images/icons/16/green.png' alt='"._YES."' title='"._YES."' />";
- $_no = "<img src='../images/icons/16/red.png' alt='"._NO."' title='"._NO."' />";
foreach (array_keys($tables_arr) as $t)
{
$table['id'] = $t;
@@ -67,13 +65,13 @@
$table['name'] = $tables_arr[$t]->getVar('table_name');
$table['image'] = $tables_arr[$t]->getVar('table_image');
$table['nbfields'] = $tables_arr[$t]->getVar('table_nbfields');
- $table['blocks'] = ( $tables_arr[$t]->getVar('table_blocks') == 1 ) ? $_yes : $_no;
- $table['admin'] = ( $tables_arr[$t]->getVar('table_admin') == 1 ) ? $_yes : $_no;
- $table['user'] = ( $tables_arr[$t]->getVar('table_user') == 1 ) ? $_yes : $_no;
- $table['submenu'] = ( $tables_arr[$t]->getVar('table_submenu') == 1 ) ? $_yes : $_no;
- $table['search'] = ( $tables_arr[$t]->getVar('table_search') == 1 ) ? $_yes : $_no;
- $table['comments'] = ( $tables_arr[$t]->getVar('table_comments') == 1 ) ? $_yes : $_no;
- $table['notifications'] = ( $tables_arr[$t]->getVar('table_notifications') == 1 ) ? $_yes : $_no;
+ $table['blocks'] = $tables_arr[$t]->getVar('table_blocks');
+ $table['admin'] = $tables_arr[$t]->getVar('table_admin');
+ $table['user'] = $tables_arr[$t]->getVar('table_user');
+ $table['submenu'] = $tables_arr[$t]->getVar('table_submenu');
+ $table['search'] = $tables_arr[$t]->getVar('table_search');
+ $table['comments'] = $tables_arr[$t]->getVar('table_comments');
+ $table['notifications'] = $tables_arr[$t]->getVar('table_notifications');
$GLOBALS['xoopsTpl']->append('tables_list', $table);
unset($mod);
}
@@ -151,5 +149,51 @@
$form = $obj->getForm($field_mid, $field_tid, $field_numb, $field_name);
$GLOBALS['xoopsTpl']->assign('form', $form->render());
break;
+
+ case 'toggle':
+ if (isset($_GET['table_id'])) {
+ if (isset($_GET['table_blocks'])) {
+ $table_blocks = intval($_GET['table_blocks']);
+ $table_blocks = ($table_blocks == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($table_id);
+ $obj->setVar('table_blocks', $table_blocks);
+ } elseif (isset($_GET['table_admin'])) {
+ $table_admin = intval($_GET['table_admin']);
+ $table_admin = ($table_admin == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($table_id);
+ $obj->setVar('table_admin', $table_admin);
+ } elseif (isset($_GET['table_user'])) {
+ $table_user = intval($_GET['table_user']);
+ $table_user = ($table_user == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($table_id);
+ $obj->setVar('table_user', $table_user);
+ } elseif (isset($_GET['table_submenu'])) {
+ $table_submenu = intval($_GET['table_submenu']);
+ $table_submenu = ($table_submenu == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($table_id);
+ $obj->setVar('table_submenu', $table_submenu);
+ } elseif (isset($_GET['table_search'])) {
+ $table_search = intval($_GET['table_search']);
+ $table_search = ($table_search == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($table_id);
+ $obj->setVar('table_search', $table_search);
+ } elseif (isset($_GET['table_comments'])) {
+ $table_comments = intval($_GET['table_comments']);
+ $table_comments = ($table_comments == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($table_id);
+ $obj->setVar('table_comments', $table_comments);
+ } elseif (isset($_GET['table_notifications'])) {
+ $table_notifications = intval($_GET['table_notifications']);
+ $table_notifications = ($table_notifications == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($table_id);
+ $obj->setVar('table_notifications', $table_notifications);
+ }
+ if ($modulesHandler->insert($obj, true)) {
+ redirect_header('fields.php', 1, _AM_TDMCREATE_TOGGLE_SUCCESS);
+ } else {
+ redirect_header('fields.php', 1, _AM_TDMCREATE_TOGGLE_FAILED);
+ }
+ }
+ break;
}
include 'footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-03-29 00:44:39 UTC (rev 12416)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-03-29 23:12:29 UTC (rev 12417)
@@ -21,7 +21,7 @@
include 'header.php';
// Recovered the value of the argument op in the URL $
$op = TDMCreate_CleanVars($_REQUEST, 'op', 'list', 'string');
-
+$mod_id = TDMCreate_CleanVars($_REQUEST, 'mod_id');
switch ($op)
{
case 'list':
@@ -32,7 +32,8 @@
$template_main = 'tdmcreate_modules.html';
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('modules.php'));
$adminMenu->addItemButton(_AM_TDMCREATE_ADD_MODULE, 'modules.php?op=new', 'add');
- $GLOBALS['xoopsTpl']->assign('button_new', $adminMenu->renderButton());
+ $GLOBALS['xoopsTpl']->assign('button_new', $adminMenu->renderButton());
+ $GLOBALS['xoopsTpl']->assign('tdmc_url', TDMC_URL);
$GLOBALS['xoopsTpl']->assign('tdmc_upload_imgmod_url', TDMC_UPLOAD_IMGMOD_URL);
$criteria = new CriteriaCompo();
$criteria->setSort('mod_id ASC, mod_name');
@@ -45,18 +46,18 @@
{
foreach (array_keys($mods_arr) as $i)
{
- $mod['mod_id'] = $i;
- $mod['mod_name'] = $mods_arr[$i]->getVar('mod_name');
- $mod['mod_version'] = $mods_arr[$i]->getVar('mod_version');
- $mod['mod_image'] = $mods_arr[$i]->getVar('mod_image');
- $mod['mod_release'] = $mods_arr[$i]->getVar('mod_release');
- $mod['mod_status'] = $mods_arr[$i]->getVar('mod_status');
- $mod['mod_admin'] = $mods_arr[$i]->getVar('mod_admin');
- $mod['mod_user'] = $mods_arr[$i]->getVar('mod_user');
- $mod['mod_submenu'] = $mods_arr[$i]->getVar('mod_submenu');
- $mod['mod_search'] = $mods_arr[$i]->getVar('mod_search');
- $mod['mod_comments'] = $mods_arr[$i]->getVar('mod_comments');
- $mod['mod_notifications'] = $mods_arr[$i]->getVar('mod_notifications');
+ $mod['id'] = $i;
+ $mod['name'] = $mods_arr[$i]->getVar('mod_name');
+ $mod['version'] = $mods_arr[$i]->getVar('mod_version');
+ $mod['image'] = $mods_arr[$i]->getVar('mod_image');
+ $mod['release'] = $mods_arr[$i]->getVar('mod_release');
+ $mod['status'] = $mods_arr[$i]->getVar('mod_status');
+ $mod['admin'] = $mods_arr[$i]->getVar('mod_admin');
+ $mod['user'] = $mods_arr[$i]->getVar('mod_user');
+ $mod['search'] = $mods_arr[$i]->getVar('mod_search');
+ $mod['comments'] = $mods_arr[$i]->getVar('mod_comments');
+ $mod['notifications'] = $mods_arr[$i]->getVar('mod_notifications');
+ $mod['permissions'] = $mods_arr[$i]->getVar('mod_permissions');
$GLOBALS['xoopsTpl']->append('modules_list', $mod);
unset($mod);
}
@@ -86,8 +87,8 @@
if ( !$GLOBALS['xoopsSecurity']->check() ) {
redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
- if (isset($_REQUEST['mod_id'])) {
- $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ if (isset($mod_id)) {
+ $obj =& $modulesHandler->get($mod_id);
} else {
$obj =& $modulesHandler->create();
}
@@ -165,13 +166,13 @@
$GLOBALS['xoopsTpl']->assign('button_new', $adminMenu->renderButton());
$GLOBALS['xoopsTpl']->assign('button_list', $adminMenu->renderButton());
- $obj = $modulesHandler->get($_REQUEST['mod_id']);
+ $obj = $modulesHandler->get($mod_id);
$form = $obj->getForm();
$GLOBALS['xoopsTpl']->assign('form', $form->render());
break;
case 'delete':
- $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ $obj =& $modulesHandler->get($mod_id);
if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) {
if ( !$GLOBALS['xoopsSecurity']->check() ) {
redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
@@ -182,48 +183,47 @@
$GLOBALS['xoopsTpl']->assign('error', $obj->getHtmlErrors());
}
} else {
- xoops_confirm(array('ok' => 1, 'mod_id' => $_REQUEST['mod_id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('mod_name')));
+ xoops_confirm(array('ok' => 1, 'mod_id' => $mod_id, 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('mod_name')));
}
break;
case 'toggle':
if (isset($_GET['mod_id'])) {
- $mod_id = intval($_GET['mod_id']);
if (isset($_GET['mod_admin'])) {
$mod_admin = intval($_GET['mod_admin']);
$mod_admin = ($mod_admin == 1) ? 0 : 1;
- $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ $obj =& $modulesHandler->get($mod_id);
$obj->setVar('mod_admin', $mod_admin);
} elseif (isset($_GET['mod_user'])) {
$mod_user = intval($_GET['mod_user']);
$mod_user = ($mod_user == 1) ? 0 : 1;
- $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ $obj =& $modulesHandler->get($mod_id);
$obj->setVar('mod_user', $mod_user);
- } elseif (isset($_GET['mod_submenu'])) {
- $mod_submenu = intval($_GET['mod_submenu']);
- $mod_submenu = ($mod_submenu == 1) ? 0 : 1;
- $obj =& $modulesHandler->get($_REQUEST['mod_id']);
- $obj->setVar('mod_submenu', $mod_submenu);
} elseif (isset($_GET['mod_search'])) {
$mod_search = intval($_GET['mod_search']);
$mod_search = ($mod_search == 1) ? 0 : 1;
- $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ $obj =& $modulesHandler->get($mod_id);
$obj->setVar('mod_search', $mod_search);
} elseif (isset($_GET['mod_comments'])) {
$mod_comments = intval($_GET['mod_comments']);
$mod_comments = ($mod_comments == 1) ? 0 : 1;
- $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ $obj =& $modulesHandler->get($mod_id);
$obj->setVar('mod_comments', $mod_comments);
} elseif (isset($_GET['mod_notifications'])) {
$mod_notifications = intval($_GET['mod_notifications']);
$mod_notifications = ($mod_notifications == 1) ? 0 : 1;
- $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ $obj =& $modulesHandler->get($mod_id);
$obj->setVar('mod_notifications', $mod_notifications);
+ } elseif (isset($_GET['mod_permissions'])) {
+ $mod_permissions = intval($_GET['mod_permissions']);
+ $mod_permissions = ($mod_permissions == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($mod_id);
+ $obj->setVar('mod_permissions', $mod_permissions);
}
if ($modulesHandler->insert($obj, true)) {
- redirect_header('modules.php', 1, _AM_TDMCREATE_MODULE_TOGGLE_SUCCESS);
+ redirect_header('modules.php', 1, _AM_TDMCREATE_TOGGLE_SUCCESS);
} else {
- redirect_header('modules.php', 1, _AM_TDMCREATE_MODULE_TOGGLE_FAILED);
+ redirect_header('modules.php', 1, _AM_TDMCREATE_TOGGLE_FAILED);
}
}
break;
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-03-29 00:44:39 UTC (rev 12416)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-03-29 23:12:29 UTC (rev 12417)
@@ -66,11 +66,11 @@
$mod['name'] = $mods_arr[$i]->getVar('mod_name');
$mod['image'] = $mods_arr[$i]->getVar('mod_image');
$mod['admin'] = $mods_arr[$i]->getVar('mod_admin');
- $mod['user'] = $mods_arr[$i]->getVar('mod_user');
- $mod['submenu'] = $mods_arr[$i]->getVar('mod_submenu');
+ $mod['user'] = $mods_arr[$i]->getVar('mod_user');
$mod['search'] = $mods_arr[$i]->getVar('mod_search');
$mod['comments'] = $mods_arr[$i]->getVar('mod_comments');
- $mod['notifications'] = $mods_arr[$i]->getVar('mod_notifications');
+ $mod['notifications'] = $mods_arr[$i]->getVar('mod_notifications');
+ $mod['permissions'] = $mods_arr[$i]->getVar('mod_permissions');
// Get the list of tables
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('table_mid', $i));
@@ -96,7 +96,8 @@
$table['submenu'] = $tables_arr[$t]->getVar('table_submenu');
$table['search'] = $tables_arr[$t]->getVar('table_search');
$table['comments'] = $tables_arr[$t]->getVar('table_comments');
- $table['notifications'] = $tables_arr[$t]->getVar('table_notifications');
+ $table['notifications'] = $tables_arr[$t]->getVar('table_notifications');
+ $table['permissions'] = $tables_arr[$t]->getVar('table_permissions');
$tables[] = $table;
unset($table);
}
@@ -171,7 +172,8 @@
'table_submenu' => (($_REQUEST['table_submenu'] == 1) ? '1' : '0'),
'table_search' => (($_REQUEST['table_search'] == 1) ? '1' : '0'),
'table_comments' => (($_REQUEST['table_comments'] == 1) ? '1' : '0'),
- 'table_notifications' => (($_REQUEST['table_notifications'] == 1) ? '1' : '0')));
+ 'table_notifications' => (($_REQUEST['table_notifications'] == 1) ? '1' : '0'),
+ 'table_permissions' => (($_REQUEST['table_permissions'] == 1) ? '1' : '0')));
if( $tablesHandler->insert($obj) ) {
if( $obj->isNew() ) {
@@ -194,13 +196,13 @@
$adminMenu->addItemButton(_AM_TDMCREATE_ADD_TABLE, 'tables.php?op=new', 'add');
$GLOBALS['xoopsTpl']->assign('button_new', $adminMenu->renderButton());
- $obj = $tablesHandler->get($_REQUEST['table_id']);
+ $obj = $tablesHandler->get($table_id);
$form = $obj->getForm();
$GLOBALS['xoopsTpl']->assign('form', $form->render());
break;
case 'delete':
- $obj =& $tablesHandler->get($_REQUEST['table_id']);
+ $obj =& $tablesHandler->get($table_id);
if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) {
if ( !$GLOBALS['xoopsSecurity']->check() ) {
redirect_header('tables.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
@@ -211,53 +213,57 @@
echo $obj->getHtmlErrors();
}
} else {
- xoops_confirm(array('ok' => 1, 'table_id' => $_REQUEST['table_id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('table_name')));
+ xoops_confirm(array('ok' => 1, 'table_id' => $table_id, 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('table_name')));
}
break;
case 'toggle':
if (isset($_GET['table_id'])) {
- $table_id = intval($_GET['table_id']);
- if (isset($_GET['table_blocks'])) {
+ if (isset($_GET['table_blocks'])) {
$table_blocks = intval($_GET['table_blocks']);
$table_blocks = ($table_blocks == 1) ? 0 : 1;
- $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ $obj =& $tablesHandler->get($table_id);
$obj->setVar('table_blocks', $table_blocks);
} elseif (isset($_GET['table_admin'])) {
$table_admin = intval($_GET['table_admin']);
$table_admin = ($table_admin == 1) ? 0 : 1;
- $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ $obj =& $tablesHandler->get($table_id);
$obj->setVar('table_admin', $table_admin);
} elseif (isset($_GET['table_user'])) {
$table_user = intval($_GET['table_user']);
$table_user = ($table_user == 1) ? 0 : 1;
- $obj =& $modulesHandler->get($_REQUEST['table_id']);
+ $obj =& $tablesHandler->get($table_id);
$obj->setVar('table_user', $table_user);
} elseif (isset($_GET['table_submenu'])) {
$table_submenu = intval($_GET['table_submenu']);
$table_submenu = ($table_submenu == 1) ? 0 : 1;
- $obj =& $modulesHandler->get($_REQUEST['table_id']);
+ $obj =& $tablesHandler->get($table_id);
$obj->setVar('table_submenu', $table_submenu);
} elseif (isset($_GET['table_search'])) {
$table_search = intval($_GET['table_search']);
$table_search = ($table_search == 1) ? 0 : 1;
- $obj =& $modulesHandler->get($_REQUEST['table_id']);
+ $obj =& $tablesHandler->get($table_id);
$obj->setVar('table_search', $table_search);
} elseif (isset($_GET['table_comments'])) {
$table_comments = intval($_GET['table_comments']);
$table_comments = ($table_comments == 1) ? 0 : 1;
- $obj =& $modulesHandler->get($_REQUEST['table_id']);
+ $obj =& $tablesHandler->get($table_id);
$obj->setVar('table_comments', $table_comments);
} elseif (isset($_GET['table_notifications'])) {
$table_notifications = intval($_GET['table_notifications']);
$table_notifications = ($table_notifications == 1) ? 0 : 1;
- $obj =& $modulesHandler->get($_REQUEST['table_id']);
+ $obj =& $tablesHandler->get($table_id);
$obj->setVar('table_notifications', $table_notifications);
+ } elseif (isset($_GET['table_permissions'])) {
+ $table_permissions = intval($_GET['table_permissions']);
+ $table_permissions = ($table_permissions == 1) ? 0 : 1;
+ $obj =& $tablesHandler->get($table_id);
+ $obj->setVar('table_permissions', $table_permissions);
}
- if ($modulesHandler->insert($obj, true)) {
- redirect_header('tables.php', 1, _AM_TDMCREATE_TABLE_TOGGLE_SUCCESS);
+ if ($tablesHandler->insert($obj, true)) {
+ redirect_header('tables.php', 1, _AM_TDMCREATE_TOGGLE_SUCCESS);
} else {
- redirect_header('tables.php', 1, _AM_TDMCREATE_TABLE_TOGGLE_FAILED);
+ redirect_header('tables.php', 1, _AM_TDMCREATE_TOGGLE_FAILED);
}
}
break;
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php 2014-03-29 00:44:39 UTC (rev 12416)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php 2014-03-29 23:12:29 UTC (rev 12417)
@@ -25,13 +25,18 @@
*/
class TDMCreateTables extends XoopsObject
{
+ /**
+ * @var string
+ */
+ private $module = null;
+
/*
* @public function constructor class
* @param null
*/
public function __construct()
{
- $this->XoopsObject();
+ $this->module = TDMCreateModules::getInstance();
$this->initVar('table_id',XOBJ_DTYPE_INT);
$this->initVar('table_mid',XOBJ_DTYPE_INT);
$this->initVar('table_category',XOBJ_DTYPE_INT);
@@ -42,9 +47,10 @@
$this->initVar('table_blocks',XOBJ_DTYPE_INT);
$this->initVar('table_admin',XOBJ_DTYPE_INT);
$this->initVar('table_user',XOBJ_DTYPE_INT);
- $this->initVar('table_status',XOBJ_DTYPE_INT);
+ $this->initVar('table_submenu',XOBJ_DTYPE_INT);
+ /*$this->initVar('table_status',XOBJ_DTYPE_INT);
$this->initVar('table_waiting',XOBJ_DTYPE_INT);
- $this->initVar('table_online',XOBJ_DTYPE_INT);
+ $this->initVar('table_online',XOBJ_DTYPE_INT); */
$this->initVar('table_search',XOBJ_DTYPE_INT);
$this->initVar('table_comments',XOBJ_DTYPE_INT);
$this->initVar('table_notifications',XOBJ_DTYPE_INT);
@@ -102,11 +108,6 @@
$form->addElement($category);
}
- /*$radio_category = $this->isNew() ? 0 : $this->getVar('table_category');
- $table_category = new XoopsFormRadioYN(_AM_TDMCREATE_TABLE_CATEGORY, 'table_category', $radio_category);
- $table_category->setDescription(_AM_TDMCREATE_TABLE_CATEGORY_DESC);
- $form->addElement($table_category);*/
-
$table_fieldname = new XoopsFormText(_AM_TDMCREATE_TABLE_FIELDNAME, 'table_fieldname', 30, 50, $this->getVar('table_fieldname'));
$table_fieldname->setDescription(_AM_TDMCREATE_TABLE_FIELDNAME_DESC);
$form->addElement($table_fieldname);
@@ -173,6 +174,11 @@
$check_table_notifications = new XoopsFormCheckBox(' ', 'table_notifications', $table_notifications);
$check_table_notifications->addOption(1, _AM_TDMCREATE_TABLE_NOTIFICATIONS);
$options_tray->addElement($check_table_notifications);
+ $table_permissions = $this->isNew() ? 0 : $this->getVar('table_permissions');
+ $check_table_permissions = new XoopsFormCheckBox(' ', 'table_permissions', $table_permissions);
+ $check_table_permissions->addOption(1, _AM_TDMCREATE_TABLE_PERMISSIONS);
+ $options_tray->addElement($check_table_permissions);
+ $options_tray->setDescription(_AM_TDMCREATE_TABLE_OPTIONS_CHECKS_DESC);
$form->addElement($options_tray);
$form->addElement(new XoopsFormHidden('op', 'save'));
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/functions.js
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/functions.js 2014-03-29 00:44:39 UTC (rev 12416)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/functions.js 2014-03-29 23:12:29 UTC (rev 12417)
@@ -26,30 +26,6 @@
return xhr;
}
-function displayRowClass(tableId, rowClass, Nb) {
- var table = document.getElementById(tableId);
- var display = 'none';
- var ClassName = rowClass + Nb;
- for (var i in table.rows) {
- row = table.rows[i];
- if (row.className === ClassName) {
- if (row.style.display === 'none') {
- /**Test si c'est IE ou pas*/
- display = document.all !== undefined ? 'block' : 'table-row';
- } else {
- display = 'none';
- }
- row.style.display = display;
- }
- /*
- if(rowClass == 'child'){
- if(row.idName == ClassName){
- row.style.display = 'none';
- }
- }*/
- }
-}
-
function swapImg(swap) {
obj = document.getElementById(swap);
obj.src = !(obj.src == img_minus) ? img_minus : img_plus;
@@ -80,11 +56,11 @@
}
}
*/
-
+/*
$(document).ready( function() {
- $('tr').find('img.imageToggle').on('click', function(e) {
+ $('tr').find('a img.imageToggle').on('click', function(e) {
e.preventDefault();
- /*$('tr.toggleChild').toggle();*/
+ $('tr.toggleChild').toggle();
$(this).nextAll('tr.toggleChild').each( function() {
if ($(this).is('.toggleMain')) {
return false;
@@ -92,4 +68,16 @@
$(this).toggle();
});
});
+});*/
+$(document).ready( function() {
+ $('tr.toggleChild').hide();
+ $('tr.toggleMain').click( function(e) {
+ e.preventDefault();
+ $(this).nextAll().each( function() {
+ if ($(this).filter('tr.toggleMain').length) {
+ return false;
+ }
+ $(this).filter('tr.toggleChild').toggle();
+ });
+ });
});
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php 2014-03-29 00:44:39 UTC (rev 12416)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php 2014-03-29 23:12:29 UTC (rev 12417)
@@ -103,7 +103,7 @@
define('_AM_TDMCREATE_MODULE_USER', "Visible User");
define('_AM_TDMCREATE_MODULE_SEARCH', "Enable Search");
define('_AM_TDMCREATE_MODULE_COMMENTS', "Enable Comments");
-define('_AM_TDMCREATE_MODULE_NOTIFICATIONS', "Notifications");
+define('_AM_TDMCREATE_MODULE_NOTIFICATIONS', "Enable Notifications");
define('_AM_TDMCREATE_MODULE_PERMISSIONS', "Enable permissions");
define('_AM_TDMCREATE_MODULE_INSTALL', "Install this module directly in root/modules?");
// Added in version 1.39
@@ -115,6 +115,7 @@
define('_AM_TDMCREATE_MODULE_SEARCH_LIST', "Search");
define('_AM_TDMCREATE_MODULE_COMMENTS_LIST', "Comments");
define('_AM_TDMCREATE_MODULE_NOTIFICATIONS_LIST', "Notifications");
+define('_AM_TDMCREATE_MODULE_PERMISSIONS_LIST', "Permissions");
define('_AM_TDMCREATE_MODULE_MIN_PHP', "Minimum PHP");
define('_AM_TDMCREATE_MODULE_MIN_XOOPS', "Minimum XOOPS");
define('_AM_TDMCREATE_MODULE_MIN_ADMIN', "Minimum Admin");
@@ -129,12 +130,14 @@
define('_AM_TDMCREATE_TABLE_MODULES', "Choose a module");
define('_AM_TDMCREATE_TABLE_NAME', "Table Name");
define('_AM_TDMCREATE_TABLE_NAME_DESC', "Unique Name for this Table");
-define('_AM_TDMCREATE_TABLE_CATEGORY', "This table is a category?");
-define('_AM_TDMCREATE_TABLE_CATEGORY_DESC', "<i>Once you have used this field,<br />will not be displayed following the creation of other tables</i>");
+define('_AM_TDMCREATE_TABLE_CATEGORY', "This table is a category or topic?");
+define('_AM_TDMCREATE_TABLE_CATEGORY_DESC', "<b class='red bold'>ATTENTION</b>: <i>Once you have used this field,<br />will not be displayed following the creation of other tables</i>");
define('_AM_TDMCREATE_TABLE_NBFIELDS', "Number fields");
define('_AM_TDMCREATE_TABLE_NBFIELDS_DESC', "Number of fields for this table");
define('_AM_TDMCREATE_TABLE_FIELDNAME', "Prefix Field Name");
define('_AM_TDMCREATE_TABLE_FIELDNAME_DESC', "This is the prefix of field name (optional)<br />If you leave the field blank,<br />doesn't appear anything in the fields of the next screen,<br />otherwise you'll see all the fields with a prefix type (e.g: <span class='bold'>fieldname_</span>)");
+define('_AM_TDMCREATE_TABLE_OPTIONS_CHECKS_DESC', "For each table created, a file is created on behalf of this.<br />
+Selecting one or more of these options, deciding whether to enter the name of the file to other files or you define a condition in these other files, need to be created or not.");
define('_AM_TDMCREATE_TABLE_IMAGE', "Table Logo");
define('_AM_TDMCREATE_TABLE_BLOCKS', "Block for this table");
define('_AM_TDMCREATE_TABLE_BLOCKS_DESC', "(blocks: random, latest, today)");
@@ -146,7 +149,7 @@
define('_AM_TDMCREATE_TABLE_COMMENTS', "Comments for this table");
// Added in version 1.39
define('_AM_TDMCREATE_TABLE_NOTIFICATIONS', "Notifications for this table");
-
+define('_AM_TDMCREATE_TABLE_PERMISSIONS', "Permissions for this table");
// v1.38
define('_AM_TDMCREATE_TABLE_IMAGE_DESC', "<span class='red bold'>Attention</span>: If you want to choose a new image, is best to name it with the module name before and follow with the name of the image so as not to overwrite any images with the same name, in the <span class='bold'>Frameworks/moduleclasses/moduleadmin/icons/32/</span>. Otherwise an other solution, would be to insert the images in the module, a new folder is created, with the creation of the same module - <span class='bold'>images/32</span>.");
@@ -314,9 +317,15 @@
define('_AM_TDMCREATE_TABLE_SEARCH_LIST', "Search");
define('_AM_TDMCREATE_TABLE_COMMENTS_LIST', "Comments");
define('_AM_TDMCREATE_TABLE_NOTIFICATIONS_LIST', "Notifications");
+define('_AM_TDMCREATE_TABLE_PERMISSIONS_LIST', "Permissions");
define('_AM_TDMCREATE_EDIT_TABLE', "Edit Table");
define('_AM_TDMCREATE_EDIT_FIELDS', "Edit Fields");
define('_AM_TDMCREATE_BUILD_INROOT', "Do you want to install this module in the modules root of your site?");
define('_AM_TDMCREATE_BUILD_INROOT_DESC', "<b class='red big'>ATTENTION</b>: If in the modules directory of your site is installed a module with the same name,<br />as the one you are about to create now, this will be erased with the appropriate consequences.<br />We recommend you to first check, in the root/modules of your site, if this module already exists.");
//define('_AM_TDMCREATE_MODULE_PERMISSIONS', "Enable permissions");
-//define('_AM_TDMCREATE_MODULE_INSTALL', "Install this module directly in root/modules?");
\ No newline at end of file
+//define('_AM_TDMCREATE_MODULE_INSTALL', "Install this module directly in root/modules?");
+
+// Added in version 1.91
+define('_AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY', "Toggle Change Display");
+define('_AM_TDMCREATE_TOGGLE_SUCCESS', "Successfully Changed Display");
+define('_AM_TDMCREATE_TOGGLE_FAILED', "Changing Display Failed");
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/sql/mysql.sql
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/sql/mysql.sql 2014-03-29 00:44:39 UTC (rev 12416)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/sql/mysql.sql 2014-03-29 23:12:29 UTC (rev 12417)
@@ -52,6 +52,7 @@
`table_blocks` tinyint(1) unsigned NOT NULL default '0',
`table_admin` tinyint(1) unsigned NOT NULL default '1',
`table_user` tinyint(1) unsigned NOT NULL default '0',
+ `table_submenu` tinyint(1) unsigned NOT NULL default '0',
`table_status` tinyint(1) unsigned NOT NULL default '0',
`table_waiting` tinyint(1) unsigned NOT NULL default '0',
`table_online` tinyint(1) unsigned NOT NULL default '0',
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html 2014-03-29 00:44:39 UTC (rev 12416)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html 2014-03-29 23:12:29 UTC (rev 12417)
@@ -26,15 +26,43 @@
<td class='center'><{$table.name}></td>
<td class='center'><img src="<{$pathIcon32}>/<{$table.image}>" alt="<{$table.name}>" height="30" /></td>
<td class='center'><{$table.nbfields}></td>
- <td class='center'><{$table.blocks}></td>
- <td class='center'><{$table.admin}></td>
- <td class='center'><{$table.user}></td>
- <td class='center'><{$table.submenu}></td>
- <td class='center'><{$table.search}></td>
- <td class='center'><{$table.comments}></td>
- <td class='center'><{$table.notifications}></td>
- <td class='xo-actions txtcenter width10'>
- <a href="tables.php?op=edit&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_EDIT_TABLE}>">
+ <td class='center'>
+ <a href="fields.php?op=toggle&table_blocks=<{$table.blocks}>&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$table.blocks}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="fields.php?op=toggle&table_admin=<{$table.admin}>&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$table.admin}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="fields.php?op=toggle&table_user=<{$table.user}>&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$table.user}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="fields.php?op=toggle&table_submenu=<{$table.submenu}>&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$table.submenu}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="fields.php?op=toggle&table_search=<{$table.search}>&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$table.search}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="fields.php?op=toggle&table_comments=<{$table.comments}>&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$table.comments}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="fields.php?op=toggle&table_notifications=<{$table.notifications}>&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$table.notifications}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
+ </a>
+ </td>
+ <td class='xo-actions txtcenter width6'>
+ <a href="tables.php?op=edit&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_EDIT_TABLE}>">
<img src="<{xoModuleIcons16 edit.png}>" alt="<{$smarty.const._AM_TDMCREATE_EDIT_TABLE}>" height="16" />
</a>
<a href="fields.php?op=edit&field_tid=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_EDIT_FIELDS}>">
@@ -47,10 +75,9 @@
</tr>
<{foreach item=field from=$table.fields}>
<tr class="<{cycle values='even,odd'}> toggleChild">
- <td class='center'><{$field.id}></td>
+ <td class='center'><{$field.id}> <img src="<{$tdmc_url}>/images/icons/16/drag.png" alt="<{$field.name}>" height="30" /></td>
<td class='center'><{$field.name}></td>
- <td class='center'><img src="<{$pathIcon32}>/<{$field.image}>" alt="<{$field.name}>" height="30" /></td>
- <td class='center'></td>
+ <td class='center' colspan="9"> </td>
</tr>
<{/foreach}>
<{/foreach}>
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_modules.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_modules.html 2014-03-29 00:44:39 UTC (rev 12416)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_modules.html 2014-03-29 23:12:29 UTC (rev 12417)
@@ -12,55 +12,55 @@
<th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_STATUS}></th>
<th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_ADMIN_LIST}></th>
<th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_USER_LIST}></th>
- <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_SUBMENU_LIST}></th>
<th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_SEARCH_LIST}></th>
<th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_COMMENTS_LIST}></th>
<th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_NOTIFICATIONS_LIST}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_PERMISSIONS_LIST}></th>
<th class='center width5'><{$smarty.const._AM_TDMCREATE_FORMACTION}></th>
</tr>
<{foreach item=module from=$modules_list}>
<tr class="<{cycle values='odd,even'}>">
- <td class='center'><{$module.mod_id}></td>
- <td class='center'><{$module.mod_name}></td>
- <td class='center'><{$module.mod_version}></td>
- <td class='center'><img src="<{$tdmc_upload_imgmod_url}>/<{$module.mod_image}>" height="32" /></td>
- <td class='center'><{$module.mod_release}></td>
- <td class='center'><{$module.mod_status}></td>
+ <td class='center'><{$module.id}></td>
+ <td class='center'><{$module.name}></td>
+ <td class='center'><{$module.version}></td>
+ <td class='center'><img src="<{$tdmc_upload_imgmod_url}>/<{$module.image}>" height="32" /></td>
+ <td class='center'><{$module.release}></td>
+ <td class='center'><{$module.status}></td>
<td class='center'>
- <a href="modules.php?op=toggle&mod_admin=<{$module.mod_admin}>&mod_id=<{$module.mod_id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
- <img src="<{xoModuleIcons16}><{$module.mod_admin}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ <a href="modules.php?op=toggle&mod_admin=<{$module.admin}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$module.admin}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
</a>
</td>
<td class='center'>
- <a href="modules.php?op=toggle&mod_user=<{$module.mod_user}>&mod_id=<{$module.mod_id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
- <img src="<{xoModuleIcons16}><{$module.mod_user}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ <a href="modules.php?op=toggle&mod_user=<{$module.user}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$module.user}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
</a>
</td>
<td class='center'>
- <a href="modules.php?op=toggle&mod_submenu=<{$module.mod_submenu}>&mod_id=<{$module.mod_id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
- <img src="<{xoModuleIcons16}><{$module.mod_submenu}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ <a href="modules.php?op=toggle&mod_search=<{$module.search}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$module.search}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
</a>
</td>
<td class='center'>
- <a href="modules.php?op=toggle&mod_search=<{$module.mod_search}>&mod_id=<{$module.mod_id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
- <img src="<{xoModuleIcons16}><{$module.mod_search}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ <a href="modules.php?op=toggle&mod_comments=<{$module.comments}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$module.comments}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
</a>
</td>
<td class='center'>
- <a href="modules.php?op=toggle&mod_comments=<{$module.mod_comments}>&mod_id=<{$module.mod_id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
- <img src="<{xoModuleIcons16}><{$module.mod_comments}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ <a href="modules.php?op=toggle&mod_notifications=<{$module.notifications}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$module.notifications}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
</a>
</td>
<td class='center'>
- <a href="modules.php?op=toggle&mod_notifications=<{$module.mod_notifications}>&mod_id=<{$module.mod_id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
- <img src="<{xoModuleIcons16}><{$module.mod_notifications}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ <a href="modules.php?op=toggle&mod_permissions=<{$module.permissions}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$module.permissions}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
</a>
</td>
<td class='xo-actions txtcenter width5'>
- <a href="modules.php?op=edit&mod_id=<{$module.mod_id}>" title="<{$smarty.const._EDIT}>">
+ <a href="modules.php?op=edit&mod_id=<{$module.id}>" title="<{$smarty.const._EDIT}>">
<img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._EDIT}>" height="16" />
</a>
- <a href="modules.php?op=delete&mod_id=<{$module.mod_id}>" title="<{$smarty.const._DELETE}>">
+ <a href="modules.php?op=delete&mod_id=<{$module.id}>" title="<{$smarty.const._DELETE}>">
<img src="<{xoAdminIcons delete.png}>" alt="<{$smarty.const._DELETE}>" height="16" />
</a>
</td>
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.html 2014-03-29 00:44:39 UTC (rev 12416)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.html 2014-03-29 23:12:29 UTC (rev 12417)
@@ -16,6 +16,7 @@
<th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_SEARCH_LIST}></th>
<th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_COMMENTS_LIST}></th>
<th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_NOTIFICATIONS_LIST}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_PERMISSIONS_LIST}></th>
<th class='center width6'><{$smarty.const._AM_TDMCREATE_FORMACTION}></th>
</tr>
</thead> <!--<a href="" class="linkToggle">Toggle</a> -->
@@ -30,33 +31,34 @@
<td class='center'><img src="<{$tdmc_url}>/images/icons/16/nb_fields.png" height="16" /></td>
<td class='center'><img src="<{$tdmc_url}>/images/icons/16/blocks.png" height="16" /></td>
<td class='center'>
- <a href="modules.php?op=toggle&mod_admin=<{$module.admin}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
- <img src="<{xoModuleIcons16}><{$module.admin}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ <a href="modules.php?op=toggle&mod_admin=<{$module.admin}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$module.admin}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
</a>
</td>
<td class='center'>
- <a href="modules.php?op=toggle&mod_user=<{$module.user}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
- <img src="<{xoModuleIcons16}><{$module.user}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ <a href="modules.php?op=toggle&mod_user=<{$module.user}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$module.user}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
</a>
</td>
+ <td class='center'><img src="<{$tdmc_url}>/images/icons/16/submenu.png" alt="Submenu" title="Submenu" /></td>
<td class='center'>
- <a href="modules.php?op=toggle&mod_submenu=<{$module.submenu}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
- <img src="<{xoModuleIcons16}><{$module.submenu}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ <a href="modules.php?op=toggle&mod_search=<{$module.search}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$module.search}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
</a>
</td>
<td class='center'>
- <a href="modules.php?op=toggle&mod_search=<{$module.search}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
- <img src="<{xoModuleIcons16}><{$module.search}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ <a href="modules.php?op=toggle&mod_comments=<{$module.comments}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$module.comments}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
</a>
</td>
<td class='center'>
- <a href="modules.php?op=toggle&mod_comments=<{$module.comments}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
- <img src="<{xoModuleIcons16}><{$module.comments}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ <a href="modules.php?op=toggle&mod_notifications=<{$module.notifications}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$module.notifications}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
</a>
</td>
<td class='center'>
- <a href="modules.php?op=toggle&mod_notifications=<{$module.notifications}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
- <img src="<{xoModuleIcons16}><{$module.notifications}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ <a href="modules.php?op=toggle&mod_permissions=<{$module.permissions}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$module.permissions}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
</a>
</td>
<td class='xo-actions txtcenter width6'>
@@ -73,15 +75,48 @@
<td class='center'><{$table.id}></td>
<td class='center'><{$table.name}></td>
<td class='center'><img src="<{xoModuleIcons32}><{$table.image}>" alt="<{$table.name}>" height="30" /></td>
- <td class='center'><{$table.nbfields}></td>
- <td class='center'><{$table.blocks}></td>
- <td class='center'><{$table.admin}></td>
- <td class='center'><{$table.user}></td>
- <td class='center'><{$table.submenu}></td>
- <td class='center'><{$table.search}></td>
- <td class='center'><{$table.comments}></td>
- <td class='center'><{$table.notifications}></td>
- <td class='xo-actions txtcenter width5'>
+ <td class='center'><{$table.nbfields}></td>
+ <td class='center'>
+ <a href="tables.php?op=toggle&table_blocks=<{$table.blocks}>&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$table.blocks}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="tables.php?op=toggle&table_admin=<{$table.admin}>&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$table.admin}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="tables.php?op=toggle&table_user=<{$table.user}>&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$table.user}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="tables.php?op=toggle&table_submenu=<{$table.submenu}>&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$table.submenu}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="tables.php?op=toggle&table_search=<{$table.search}>&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$table.search}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="tables.php?op=toggle&table_comments=<{$table.comments}>&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$table.comments}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="tables.php?op=toggle&table_notifications=<{$table.notifications}>&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$table.notifications}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="modules.php?op=toggle&table_permissions=<{$table.permissions}>&mod_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
+ <img src="<{xoModuleIcons16}><{$table.permissions}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
+ </a>
+ </td>
+ <td class='xo-actions txtcenter width6'>
<a href="tables.php?op=edit&table_id=<{$table.id}>" title="<{$smarty.const._EDIT}>">
<img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._EDIT}>" height="16" />
</a>
|
|
From: <txm...@us...> - 2014-03-29 00:44:44
|
Revision: 12416
http://sourceforge.net/p/xoops/svn/12416
Author: txmodxoops
Date: 2014-03-29 00:44:39 +0000 (Sat, 29 Mar 2014)
Log Message:
-----------
Updated
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/admin/style.css
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/functions.js
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_modules.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.html
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-03-28 20:15:39 UTC (rev 12415)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-03-29 00:44:39 UTC (rev 12416)
@@ -42,9 +42,7 @@
unset($criteria);
// Display modules list
if ($numrows>0)
- {
- $yes = "<img src='../images/icons/16/green.png' alt='"._YES."' title='"._YES."' />";
- $no = "<img src='../images/icons/16/red.png' alt='"._NO."' title='"._NO."' />";
+ {
foreach (array_keys($mods_arr) as $i)
{
$mod['mod_id'] = $i;
@@ -53,12 +51,12 @@
$mod['mod_image'] = $mods_arr[$i]->getVar('mod_image');
$mod['mod_release'] = $mods_arr[$i]->getVar('mod_release');
$mod['mod_status'] = $mods_arr[$i]->getVar('mod_status');
- $mod['mod_admin'] = ( $mods_arr[$i]->getVar('mod_admin') == 1 ) ? $yes : $no;
- $mod['mod_user'] = ( $mods_arr[$i]->getVar('mod_user') == 1 ) ? $yes : $no;
- $mod['mod_submenu'] = ( $mods_arr[$i]->getVar('mod_submenu') == 1 ) ? $yes : $no;
- $mod['mod_search'] = ( $mods_arr[$i]->getVar('mod_search') == 1 ) ? $yes : $no;
- $mod['mod_comments'] = ( $mods_arr[$i]->getVar('mod_comments') == 1 ) ? $yes : $no;
- $mod['mod_notifications'] = ( $mods_arr[$i]->getVar('mod_notifications') == 1 ) ? $yes : $no;
+ $mod['mod_admin'] = $mods_arr[$i]->getVar('mod_admin');
+ $mod['mod_user'] = $mods_arr[$i]->getVar('mod_user');
+ $mod['mod_submenu'] = $mods_arr[$i]->getVar('mod_submenu');
+ $mod['mod_search'] = $mods_arr[$i]->getVar('mod_search');
+ $mod['mod_comments'] = $mods_arr[$i]->getVar('mod_comments');
+ $mod['mod_notifications'] = $mods_arr[$i]->getVar('mod_notifications');
$GLOBALS['xoopsTpl']->append('modules_list', $mod);
unset($mod);
}
@@ -186,6 +184,48 @@
} else {
xoops_confirm(array('ok' => 1, 'mod_id' => $_REQUEST['mod_id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('mod_name')));
}
- break;
+ break;
+
+ case 'toggle':
+ if (isset($_GET['mod_id'])) {
+ $mod_id = intval($_GET['mod_id']);
+ if (isset($_GET['mod_admin'])) {
+ $mod_admin = intval($_GET['mod_admin']);
+ $mod_admin = ($mod_admin == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ $obj->setVar('mod_admin', $mod_admin);
+ } elseif (isset($_GET['mod_user'])) {
+ $mod_user = intval($_GET['mod_user']);
+ $mod_user = ($mod_user == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ $obj->setVar('mod_user', $mod_user);
+ } elseif (isset($_GET['mod_submenu'])) {
+ $mod_submenu = intval($_GET['mod_submenu']);
+ $mod_submenu = ($mod_submenu == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ $obj->setVar('mod_submenu', $mod_submenu);
+ } elseif (isset($_GET['mod_search'])) {
+ $mod_search = intval($_GET['mod_search']);
+ $mod_search = ($mod_search == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ $obj->setVar('mod_search', $mod_search);
+ } elseif (isset($_GET['mod_comments'])) {
+ $mod_comments = intval($_GET['mod_comments']);
+ $mod_comments = ($mod_comments == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ $obj->setVar('mod_comments', $mod_comments);
+ } elseif (isset($_GET['mod_notifications'])) {
+ $mod_notifications = intval($_GET['mod_notifications']);
+ $mod_notifications = ($mod_notifications == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ $obj->setVar('mod_notifications', $mod_notifications);
+ }
+ if ($modulesHandler->insert($obj, true)) {
+ redirect_header('modules.php', 1, _AM_TDMCREATE_MODULE_TOGGLE_SUCCESS);
+ } else {
+ redirect_header('modules.php', 1, _AM_TDMCREATE_MODULE_TOGGLE_FAILED);
+ }
+ }
+ break;
}
include 'footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-03-28 20:15:39 UTC (rev 12415)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-03-29 00:44:39 UTC (rev 12416)
@@ -59,20 +59,18 @@
unset($criteria);
// Display modules list
if ( $numrows_modules > 0 )
- {
- $_yyes = "<img src='../images/icons/16/yellow.png' alt='"._YES."' title='"._YES."' />";
- $_no = "<img src='../images/icons/16/red.png' alt='"._NO."' title='"._NO."' />";
+ {
foreach (array_keys($mods_arr) as $i)
{
$mod['id'] = $i;
$mod['name'] = $mods_arr[$i]->getVar('mod_name');
$mod['image'] = $mods_arr[$i]->getVar('mod_image');
- $mod['admin'] = ( $mods_arr[$i]->getVar('mod_admin') == 1 ) ? $_yyes : $_no;
- $mod['user'] = ( $mods_arr[$i]->getVar('mod_user') == 1 ) ? $_yyes : $_no;
- $mod['submenu'] = ( $mods_arr[$i]->getVar('mod_submenu') == 1 ) ? $_yyes : $_no;
- $mod['search'] = ( $mods_arr[$i]->getVar('mod_search') == 1 ) ? $_yyes : $_no;
- $mod['comments'] = ( $mods_arr[$i]->getVar('mod_comments') == 1 ) ? $_yyes : $_no;
- $mod['notifications'] = ( $mods_arr[$i]->getVar('mod_notifications') == 1 ) ? $_yyes : $_no;
+ $mod['admin'] = $mods_arr[$i]->getVar('mod_admin');
+ $mod['user'] = $mods_arr[$i]->getVar('mod_user');
+ $mod['submenu'] = $mods_arr[$i]->getVar('mod_submenu');
+ $mod['search'] = $mods_arr[$i]->getVar('mod_search');
+ $mod['comments'] = $mods_arr[$i]->getVar('mod_comments');
+ $mod['notifications'] = $mods_arr[$i]->getVar('mod_notifications');
// Get the list of tables
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('table_mid', $i));
@@ -85,7 +83,6 @@
$tables = array();
if ( $numrows_tables > 0 )
{
- $_yes = "<img src='../images/icons/16/green.png' alt='"._YES."' title='"._YES."' />";
foreach (array_keys($tables_arr) as $t)
{
$table['id'] = $t;
@@ -93,13 +90,13 @@
$table['name'] = $tables_arr[$t]->getVar('table_name');
$table['image'] = $tables_arr[$t]->getVar('table_image');
$table['nbfields'] = $tables_arr[$t]->getVar('table_nbfields');
- $table['blocks'] = ( $tables_arr[$t]->getVar('table_blocks') == 1 ) ? $_yes : $_no;
- $table['admin'] = ( $tables_arr[$t]->getVar('table_admin') == 1 ) ? $_yes : $_no;
- $table['user'] = ( $tables_arr[$t]->getVar('table_user') == 1 ) ? $_yes : $_no;
- $table['submenu'] = ( $tables_arr[$t]->getVar('table_submenu') == 1 ) ? $_yes : $_no;
- $table['search'] = ( $tables_arr[$t]->getVar('table_search') == 1 ) ? $_yes : $_no;
- $table['comments'] = ( $tables_arr[$t]->getVar('table_comments') == 1 ) ? $_yes : $_no;
- $table['notifications'] = ( $tables_arr[$t]->getVar('table_notifications') == 1 ) ? $_yes : $_no;
+ $table['blocks'] = $tables_arr[$t]->getVar('table_blocks');
+ $table['admin'] = $tables_arr[$t]->getVar('table_admin');
+ $table['user'] = $tables_arr[$t]->getVar('table_user');
+ $table['submenu'] = $tables_arr[$t]->getVar('table_submenu');
+ $table['search'] = $tables_arr[$t]->getVar('table_search');
+ $table['comments'] = $tables_arr[$t]->getVar('table_comments');
+ $table['notifications'] = $tables_arr[$t]->getVar('table_notifications');
$tables[] = $table;
unset($table);
}
@@ -216,6 +213,53 @@
} else {
xoops_confirm(array('ok' => 1, 'table_id' => $_REQUEST['table_id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('table_name')));
}
- break;
+ break;
+
+ case 'toggle':
+ if (isset($_GET['table_id'])) {
+ $table_id = intval($_GET['table_id']);
+ if (isset($_GET['table_blocks'])) {
+ $table_blocks = intval($_GET['table_blocks']);
+ $table_blocks = ($table_blocks == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ $obj->setVar('table_blocks', $table_blocks);
+ } elseif (isset($_GET['table_admin'])) {
+ $table_admin = intval($_GET['table_admin']);
+ $table_admin = ($table_admin == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ $obj->setVar('table_admin', $table_admin);
+ } elseif (isset($_GET['table_user'])) {
+ $table_user = intval($_GET['table_user']);
+ $table_user = ($table_user == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($_REQUEST['table_id']);
+ $obj->setVar('table_user', $table_user);
+ } elseif (isset($_GET['table_submenu'])) {
+ $table_submenu = intval($_GET['table_submenu']);
+ $table_submenu = ($table_submenu == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($_REQUEST['table_id']);
+ $obj->setVar('table_submenu', $table_submenu);
+ } elseif (isset($_GET['table_search'])) {
+ $table_search = intval($_GET['table_search']);
+ $table_search = ($table_search == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($_REQUEST['table_id']);
+ $obj->setVar('table_search', $table_search);
+ } elseif (isset($_GET['table_comments'])) {
+ $table_comments = intval($_GET['table_comments']);
+ $table_comments = ($table_comments == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($_REQUEST['table_id']);
+ $obj->setVar('table_comments', $table_comments);
+ } elseif (isset($_GET['table_notifications'])) {
+ $table_notifications = intval($_GET['table_notifications']);
+ $table_notifications = ($table_notifications == 1) ? 0 : 1;
+ $obj =& $modulesHandler->get($_REQUEST['table_id']);
+ $obj->setVar('table_notifications', $table_notifications);
+ }
+ if ($modulesHandler->insert($obj, true)) {
+ redirect_header('tables.php', 1, _AM_TDMCREATE_TABLE_TOGGLE_SUCCESS);
+ } else {
+ redirect_header('tables.php', 1, _AM_TDMCREATE_TABLE_TOGGLE_FAILED);
+ }
+ }
+ break;
}
include 'footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php 2014-03-28 20:15:39 UTC (rev 12415)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php 2014-03-29 00:44:39 UTC (rev 12416)
@@ -35,11 +35,6 @@
/*
* @var string
*/
- private $folder_name = null;
-
- /*
- * @var string
- */
private $file_name = null;
/*
@@ -86,8 +81,7 @@
* @public function constructor
* @param string $content
*/
- public function create($path, $folder_name, $file_name, $content = '', $created = false, $notcreated = false, $mode = 'w+') {
- $this->folder_name = $folder_name;
+ public function create($path, $file_name, $content = '', $created = false, $notcreated = false, $mode = 'w+') {
$this->file_name = $file_name;
$this->created = $created;
$this->notcreated = $notcreated;
@@ -137,7 +131,14 @@
* @param null
*/
private function getFolderName() {
- return $this->folder_name;
+ $path = $this->path();
+ if(strrpos($path, "/"))
+ {
+ $str = strrpos($path, '/');
+ if($str !== false){
+ return substr($path, $str + 1, strlen($path));
+ }
+ }
}
/*
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/admin/style.css
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/admin/style.css 2014-03-28 20:15:39 UTC (rev 12415)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/admin/style.css 2014-03-29 00:44:39 UTC (rev 12416)
@@ -1,224 +1,35 @@
@charset "UTF-8";
+/*
+ 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.
+ */
/**
- * MyLinks module
+ * tdmcreate module
*
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @copyright:: The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license:: http://www.fsf.org/copyleft/gpl.html GNU public license
- * @package:: mylinks
- * @since:: 2.5.0
- * @author: kris <http://www.xoofoo.org>
- * @version:: $Id $
-**/
-#Slideshow_Title {
- font-size: 20px;
- color: #393e41;
- height: 50px;
- border-bottom: 1px solid #393e41;
- margin-bottom: 5px;
- line-height: 50px;
- background-position: left top;
- background-repeat: no-repeat;
- /*text-shadow: 0 1px 0 #eee,
- 0 2px 0 #e9e9e9,
- 0 3px 0 #ddd,
- 0 4px 0 #d9d9d9,
- 0 5px 0 #ccc,
- 0 6px 1px rgba(0,0,0,.1),
- 0 0 5px rgba(0,0,0,.1),
- 0 1px 3px rgba(0,0,0,.3),
- 0 3px 5px rgba(0,0,0,.2),
- 0 5px 10px rgba(0,0,0,.35),
- 0 10px 10px rgba(0,0,0,.2);*/
+ * @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 tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: style.css 12258 2014-01-02 09:33:29Z timgno $
+ */
+/* Toggle lists */
+tr.toggleMain td {
+ display: block;
}
-.Slideshow_MediumTitle {
- font-size: 14px;
- color: #393e41;
- /*text-shadow: 0 1px 0 #eee,
- 0 2px 0 #e9e9e9,
- 0 3px 0 #ddd,
- 0 4px 0 #d9d9d9,
- 0 5px 0 #ccc,
- 0 6px 1px rgba(0,0,0,.1),
- 0 0 5px rgba(0,0,0,.1),
- 0 1px 3px rgba(0,0,0,.3),
- 0 3px 5px rgba(0,0,0,.2),
- 0 5px 10px rgba(0,0,0,.35),
- 0 10px 10px rgba(0,0,0,.2);*/
-}
-/* Index page */
-#Slideshow_Index {
- float: left;
- padding: 0 0 0 60px;
- background-image: url(../images/admin/index.png);
- background-position: left top;
- background-repeat: no-repeat;
-}
-/* Help page */
-#Slideshow_Help {
- float: left;
- padding: 0 0 0 60px;
- background-image: url(../images/admin/help.png);
- background-position: left top;
- background-repeat: no-repeat;
-}
-/* About page */
-#Slideshow_About {
- float: left;
- padding: 0 0 0 60px;
- background-image: url(../images/admin/about.png);
- background-position: left top;
- background-repeat: no-repeat;
-}
-#about fieldset {
- margin: 10px;
- padding: 5px;
-}
-#about legend {
- margin: 0 5px;
- padding: 0 5px 8px 5px;
-}
-#about label, #about text {
- display: block;
- float: left;
- margin-bottom: 12px;
-}
-#about label {
- text-align: right;
- width: 200px;
- padding-right: 20px;
-}
-#about br { clear: both;}
-#about .txtchangelog { height:350px; overflow:auto;}
-fieldset p { margin-bottom: .5em;}
-
-#myid {}
-
-/* Buttons style */
-.xo-buttons a, .xo-buttons button{
- display:block-inline;
- margin:0 5px 0 0;
- background: #e4e4e5 url('../images/admin/bg_button.gif') repeat-x;
- border:1px solid #d6d6d6;
- border-top:1px solid #dedede;
- border-left:1px solid #dedede;
- font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif;
- font-size:100%;
- line-height:110%;
- text-decoration:none;
- font-weight:bold;
- color:#454545;
- cursor:pointer;
- padding:3px 8px 4px 5px; /* Links */
+.toggleChild {
+ display: none;
}
-.xo-buttons a:hover, .xo-buttons button:hover {
- border:1px solid #ccc;
- border-top:1px solid #d6d6d6;
- border-left:1px solid #d6d6d6;
-}
-.xo-buttons button{
- width:auto;
- overflow:visible;
- padding:3px 8px 4px 5px; /* IE6 */
-}
-.xo-buttons button[type]{
- padding:3px 5px 4px 5px; /* Firefox */
- line-height:15px; /* Safari */
-}
-*:first-child+html button[type]{
- padding:3px 8px 4px 5px; /* IE7 */
-}
-.xo-buttons button img, .xo-buttons a img{
- margin:0 3px -3px 0 !important;
- padding:0;
- border:none;
- width:16px;
- height:16px;
-}
-.ui-corner-all { -moz-border-radius: 5px; -webkit-border-radius: 5px; }
-/* Buttons style */
-/* align */
-.floatright{ float:right; margin:0; padding:2px; border:0; }
-.floatleft{ float:left; margin:0; padding:2px; border:0; }
-.aligncenter{ text-align:center; margin:0; padding:2px; border:0; }
-/* align */
-
-/* label */
-.label{font-size: 16px; color: #2F5376; font-weight: bold;}
-
-/* label */
-
-/* menu */
-div.rmmenuicon{
- margin: 3px;
- font-family: Tahoma, Arial, Helvetica;
- text-align: center;
+img.imageToggle {
+ width: 16px;
+ height: 16px;
}
-div.rmmenuicon a {
- display: block; float: left;
- height: 75px !important;
- height: 75px;
- width: 75px !important;
- width: 75px;
- vertical-align: middle;
- text-decoration : none;
- border: 1px solid #CCCCCC;
- padding: 2px 5px 1px 5px;
- margin: 3px;
- color: #666666;
- background-color: #f0f0f0;
- -moz-border-radius: 6px;
- -webkit-border-radius: 6px;
- -khtml-border-radius: 6px;
- border-radius: 6px;
-
-
-}
-div.rmmenuicon img { margin-top: 8px; margin-bottom: 8px; }
-div.rmmenuicon a span {
- font-size: 11px;
- font-weight: bold;
- display: block;
-}
-div.rmmenuicon a:hover{
- background-color: #FFF6C1;
- border: 1px solid #FF9900;
- color: #1E90FF;
-}
-div.rmmenuicon a:hover span{
- text-decoration: none;
-}
-
-div.CPbigTitle{
- font-size: 12px;
- color: #606060;
- background: no-repeat left top;
- font-weight: bold;
- height: 30px;
- vertical-align: middle;
- padding: 5px 0 0 40px;
- border-bottom: 1px solid #393e41;
-}
-/* menu */
-
-.txtchangelog { height:350px; overflow:auto;}
-
-
-tr.toggleTables td {
- /* display: none;*/
-}
-
-.toggleHidden {
- display: none;
-}
-
.width6{ width: 6%; }
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/functions.js
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/functions.js 2014-03-28 20:15:39 UTC (rev 12415)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/functions.js 2014-03-29 00:44:39 UTC (rev 12416)
@@ -82,10 +82,11 @@
*/
$(document).ready( function() {
- $('.toggleTables').click( function(e) {
+ $('tr').find('img.imageToggle').on('click', function(e) {
e.preventDefault();
- $(this).nextAll('tr').each( function() {
- if ($(this).is('.toggleTables')) {
+ /*$('tr.toggleChild').toggle();*/
+ $(this).nextAll('tr.toggleChild').each( function() {
+ if ($(this).is('.toggleMain')) {
return false;
}
$(this).toggle();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php 2014-03-28 20:15:39 UTC (rev 12415)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php 2014-03-29 00:44:39 UTC (rev 12416)
@@ -253,10 +253,10 @@
define('_AM_TDMCREATE_CONST_TABLES', "Select the table you want to build");
//Creation
//OK
-define('_AM_TDMCREATE_CONST_OK_ARCHITECTURE', "<span class='green'>The structure of the module was created (index.html, folders, ...)</span>");
+define('_AM_TDMCREATE_CONST_OK_ARCHITECTURE', "<span class='green'>The structure of the module was created (index.html, folders, icons, docs files)</span>");
define('_AM_TDMCREATE_CONST_OK_FILE_IN_FOLDER', "The file <b>%s</b> is created in the <span class='green bold'>%s</span> of module");
//NOTOK
-define('_AM_TDMCREATE_CONST_NOTOK_ARCHITECTURE', "<span class='red'>Problems: Creating the structure of the module (index.html, icons ,...)</span>");
+define('_AM_TDMCREATE_CONST_NOTOK_ARCHITECTURE', "<span class='red'>Problems: Creating the structure of the module (index.html, folders, icons, docs files)</span>");
define('_AM_TDMCREATE_CONST_NOTOK_FILE_IN_FOLDER', "Problems: Creating file <b class='red'>%s</b> in the <span class='red bold'>%s</span> of module");
//------------ new additions: Ver. 1.11 -----------------------
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html 2014-03-28 20:15:39 UTC (rev 12415)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html 2014-03-29 00:44:39 UTC (rev 12416)
@@ -3,7 +3,8 @@
<!-- Display tables list -->
<{if $tables_list}>
<table width='100%' cellspacing='1' class='outer'>
- <tr>
+ <thead>
+ <tr>
<th class='center'><{$smarty.const._AM_TDMCREATE_TABLE_ID}></th>
<th class='center'><{$smarty.const._AM_TDMCREATE_TABLE_NAME}></th>
<th class='center'><{$smarty.const._AM_TDMCREATE_TABLE_IMAGE}></th>
@@ -16,12 +17,14 @@
<th class='center'><{$smarty.const._AM_TDMCREATE_TABLE_COMMENTS_LIST}></th>
<th class='center'><{$smarty.const._AM_TDMCREATE_TABLE_NOTIFICATIONS_LIST}></th>
<th class='center width10'><{$smarty.const._AM_TDMCREATE_FORMACTION}></th>
- </tr>
+ </tr>
+ </thead>
+ <tbody>
<{foreach item=table from=$tables_list}>
- <tr class="<{cycle values='even,odd'}>">
- <td class='center'><{$table.id}></td>
+ <tr class="<{cycle values='even,odd'}> toggleMain">
+ <td class='center'><{$table.id}><br /><img src="<{$tdmc_url}>/images/icons/16/toggle.png" alt="Toggle" title="Toggle" /></td>
<td class='center'><{$table.name}></td>
- <td class='center'><img src="<{$pathIcon32}>/<{$table.image}>" alt="<{$table.name}>" height="32" /></td>
+ <td class='center'><img src="<{$pathIcon32}>/<{$table.image}>" alt="<{$table.name}>" height="30" /></td>
<td class='center'><{$table.nbfields}></td>
<td class='center'><{$table.blocks}></td>
<td class='center'><{$table.admin}></td>
@@ -42,7 +45,16 @@
</a>
</td>
</tr>
+ <{foreach item=field from=$table.fields}>
+ <tr class="<{cycle values='even,odd'}> toggleChild">
+ <td class='center'><{$field.id}></td>
+ <td class='center'><{$field.name}></td>
+ <td class='center'><img src="<{$pathIcon32}>/<{$field.image}>" alt="<{$field.name}>" height="30" /></td>
+ <td class='center'></td>
+ </tr>
+ <{/foreach}>
<{/foreach}>
+ </tbody>
</table><br /><br />
<!-- Display modules navigation -->
<div class="clear"> </div>
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_modules.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_modules.html 2014-03-28 20:15:39 UTC (rev 12415)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_modules.html 2014-03-29 00:44:39 UTC (rev 12416)
@@ -26,13 +26,36 @@
<td class='center'><img src="<{$tdmc_upload_imgmod_url}>/<{$module.mod_image}>" height="32" /></td>
<td class='center'><{$module.mod_release}></td>
<td class='center'><{$module.mod_status}></td>
- <td class='center'><{$module.mod_admin}></td>
- <td class='center'><{$module.mod_user}></td>
- <td class='center'><{$module.mod_submenu}></td>
- <td class='center'><{$module.mod_search}></td>
- <td class='center'><{$module.mod_comments}></td>
- <td class='center'><{$module.mod_notifications}></td>
-
+ <td class='center'>
+ <a href="modules.php?op=toggle&mod_admin=<{$module.mod_admin}>&mod_id=<{$module.mod_id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
+ <img src="<{xoModuleIcons16}><{$module.mod_admin}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="modules.php?op=toggle&mod_user=<{$module.mod_user}>&mod_id=<{$module.mod_id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
+ <img src="<{xoModuleIcons16}><{$module.mod_user}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="modules.php?op=toggle&mod_submenu=<{$module.mod_submenu}>&mod_id=<{$module.mod_id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
+ <img src="<{xoModuleIcons16}><{$module.mod_submenu}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="modules.php?op=toggle&mod_search=<{$module.mod_search}>&mod_id=<{$module.mod_id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
+ <img src="<{xoModuleIcons16}><{$module.mod_search}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="modules.php?op=toggle&mod_comments=<{$module.mod_comments}>&mod_id=<{$module.mod_id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
+ <img src="<{xoModuleIcons16}><{$module.mod_comments}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="modules.php?op=toggle&mod_notifications=<{$module.mod_notifications}>&mod_id=<{$module.mod_id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
+ <img src="<{xoModuleIcons16}><{$module.mod_notifications}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ </a>
+ </td>
<td class='xo-actions txtcenter width5'>
<a href="modules.php?op=edit&mod_id=<{$module.mod_id}>" title="<{$smarty.const._EDIT}>">
<img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._EDIT}>" height="16" />
@@ -59,4 +82,4 @@
</div>
<{/if}>
<!-- Footer -->
-<{includeq file="db:tdmcreate_footer.html"}>
\ No newline at end of file
+<{includeq file="db:tdmcreate_footer.html"}>
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.html 2014-03-28 20:15:39 UTC (rev 12415)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.html 2014-03-29 00:44:39 UTC (rev 12416)
@@ -2,8 +2,9 @@
<{includeq file="db:tdmcreate_header.html"}>
<!-- Display modules list -->
<{if $modules_list}>
- <table width='100%' cellspacing='1' class='outer'>
- <tr>
+ <table id="showhide" width='100%' cellspacing='1' class='outer'>
+ <thead>
+ <tr>
<th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_ID}></th>
<th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_NAME}></th>
<th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_IMAGE}></th>
@@ -16,21 +17,48 @@
<th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_COMMENTS_LIST}></th>
<th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_NOTIFICATIONS_LIST}></th>
<th class='center width6'><{$smarty.const._AM_TDMCREATE_FORMACTION}></th>
- </tr>
+ </tr>
+ </thead> <!--<a href="" class="linkToggle">Toggle</a> -->
+ <tbody>
<{foreach item=module from=$modules_list}>
- <tr class="head toggleTables">
- <td class='center'><{$module.id}><br /><img src="<{$tdmc_url}>/images/icons/16/toggle.png" alt="Toggle" title="Toggle" /></td>
+ <tr class="head toggleMain">
+ <td class='center'><{$module.id}><br />
+ <img class="imageToggle" src="<{$tdmc_url}>/images/icons/16/toggle.png" alt="Toggle" title="Toggle" />
+ </td>
<td class='center'><{$module.name}></td>
<td class='center'><img src="<{$tdmc_upload_imgmod_url}>/<{$module.image}>" height="32" /></td>
<td class='center'><img src="<{$tdmc_url}>/images/icons/16/nb_fields.png" height="16" /></td>
<td class='center'><img src="<{$tdmc_url}>/images/icons/16/blocks.png" height="16" /></td>
- <td class='center'><{$module.admin}></td>
- <td class='center'><{$module.user}></td>
- <td class='center'><{$module.submenu}></td>
- <td class='center'><{$module.search}></td>
- <td class='center'><{$module.comments}></td>
- <td class='center'><{$module.notifications}></td>
-
+ <td class='center'>
+ <a href="modules.php?op=toggle&mod_admin=<{$module.admin}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
+ <img src="<{xoModuleIcons16}><{$module.admin}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="modules.php?op=toggle&mod_user=<{$module.user}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
+ <img src="<{xoModuleIcons16}><{$module.user}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="modules.php?op=toggle&mod_submenu=<{$module.submenu}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
+ <img src="<{xoModuleIcons16}><{$module.submenu}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="modules.php?op=toggle&mod_search=<{$module.search}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
+ <img src="<{xoModuleIcons16}><{$module.search}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="modules.php?op=toggle&mod_comments=<{$module.comments}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
+ <img src="<{xoModuleIcons16}><{$module.comments}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ </a>
+ </td>
+ <td class='center'>
+ <a href="modules.php?op=toggle&mod_notifications=<{$module.notifications}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>">
+ <img src="<{xoModuleIcons16}><{$module.notifications}>.png" alt="<{$smarty.const._AM_TDMCREATE_MODULE_TOGGLE}>" />
+ </a>
+ </td>
<td class='xo-actions txtcenter width6'>
<a href="modules.php?op=edit&mod_id=<{$module.id}>" title="<{$smarty.const._EDIT}>">
<img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._EDIT}>" height="16" />
@@ -38,13 +66,13 @@
<a href="modules.php?op=delete&mod_id=<{$module.id}>" title="<{$smarty.const._DELETE}>">
<img src="<{xoAdminIcons delete.png}>" alt="<{$smarty.const._DELETE}>" height="16" />
</a>
- </td>
+ </td>
</tr>
<{foreach item=table from=$module.tables}>
- <tr class="<{cycle values='even,odd'}> toggleHidden">
+ <tr class="<{cycle values='even,odd'}> toggleChild">
<td class='center'><{$table.id}></td>
<td class='center'><{$table.name}></td>
- <td class='center'><img src="<{$pathIcon32}>/<{$table.image}>" alt="<{$table.name}>" height="30" /></td>
+ <td class='center'><img src="<{xoModuleIcons32}><{$table.image}>" alt="<{$table.name}>" height="30" /></td>
<td class='center'><{$table.nbfields}></td>
<td class='center'><{$table.blocks}></td>
<td class='center'><{$table.admin}></td>
@@ -67,6 +95,7 @@
</tr>
<{/foreach}>
<{/foreach}>
+ </tbody>
</table><br /><br />
<!-- Display modules navigation -->
<div class="clear"> </div>
|
|
From: <luc...@us...> - 2014-03-28 20:15:46
|
Revision: 12415
http://sourceforge.net/p/xoops/svn/12415
Author: luciorota
Date: 2014-03-28 20:15:39 +0000 (Fri, 28 Mar 2014)
Log Message:
-----------
multi pages help (only on Xoops 2.5.7+)
Modified Paths:
--------------
XoopsModules/mymenus/trunk/mymenus/blocks/mymenus_block.php
XoopsModules/mymenus/trunk/mymenus/xoops_version.php
Added Paths:
-----------
XoopsModules/mymenus/trunk/mymenus/language/english/help/skins.html
XoopsModules/mymenus/trunk/mymenus/language/english/help/usage.html
XoopsModules/mymenus/trunk/mymenus/language/english/help/usage.txt
Modified: XoopsModules/mymenus/trunk/mymenus/blocks/mymenus_block.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/blocks/mymenus_block.php 2014-03-28 20:12:18 UTC (rev 12414)
+++ XoopsModules/mymenus/trunk/mymenus/blocks/mymenus_block.php 2014-03-28 20:15:39 UTC (rev 12415)
@@ -101,11 +101,11 @@
if ($config['assign_method'] == 'xoopstpl') {
$tpl_vars = '';
foreach ($css as $file) {
- $tpl_vars .= "\n" . '<link rel="stylesheet" type="text/css" media="all" href="'. $file . '" />';
+ $tpl_vars .= "\n" . '<link rel="stylesheet" type="text/css" media="all" href="' . $file . '" />';
}
foreach ($js as $file) {
- $tpl_vars .= "\n" . '<script type="text/javascript" src="'. $file . '"></script>';
+ $tpl_vars .= "\n" . '<script type="text/javascript" src="' . $file . '"></script>';
}
if (isset($skin_info['header'])) {
@@ -194,14 +194,14 @@
xoops_load('XoopsFormLoader');
- //Menu 0
+ // Menu 0
$form = "<b>" . _MB_MYMENUS_SELECT_MENU . "</b> ";
- $element = new XoopsFormSelect('', 'options['.$i.'0]', $options[$i], 1);
+ $element = new XoopsFormSelect('', 'options[' . $i . '0]', $options[$i], 1);
$element->addOptionArray($menus);
$form .= $element->render();
$form .= "</select>\n <i>" . _MB_MYMENUS_SELECT_MENU_DSC . "</i><br /><br />";
- //Skin 1
+ // Skin 1
++$i;
xoops_load('XoopsLists');
$temp_skins = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . "/modules/mymenus/skins/", "");
@@ -212,20 +212,24 @@
}
}
$form .= "<b>" . _MB_MYMENUS_SELECT_SKIN . "</b> ";
- $element = new XoopsFormSelect('', 'options['.$i.'0]', $options[$i], 1);
+ $element = new XoopsFormSelect('', 'options[' . $i . '0]', $options[$i], 1);
$element->addOptionArray($skins_options);
$form .= $element->render();
$form .= "</select>\n <i>" . _MB_MYMENUS_SELECT_SKIN_DSC . "</i><br /><br />";
- //Use skin from,theme 2
+ // Use skin from theme 2
++$i;
$form .= "<b>" . _MB_MYMENUS_USE_THEME_SKIN . "</b> ";
- $element = new XoopsFormRadioYN('', 'options['.$i.'0]', $options[$i]);
+ $element = new XoopsFormRadioYN('', 'options[' . $i . '0]', $options[$i]);
$form .= $element->render();
$form .= "</select>\n <i>" . _MB_MYMENUS_USE_THEME_SKIN_DSC . "</i><br /><br />";
+<<<<<<< .mine
+ // Skin from theme 3 - @luciorota
+=======
//Skin from theme 3 - @luciorota
+>>>>>>> .r12414
if (file_exists(XOOPS_ROOT_PATH . '/themes/' . $GLOBALS['xoopsConfig']['theme_set'] . '/modules/mymenus/skins/')) {
++$i;
xoops_load('XoopsLists');
@@ -237,24 +241,23 @@
$theme_skins_options[$theme_skin] = '/themes/' . $GLOBALS['xoopsConfig']['theme_set'] . '/modules/mymenus/skins/' . $theme_skin . '';
}
}
-
$form .= "<b>" . _MB_MYMENUS_SELECT_SKIN_FROM_THEME . "</b> ";
- $element = new XoopsFormSelect('', 'options['.$i.'0]', $options[$i], 1);
+ $element = new XoopsFormSelect('', 'options[' . $i . '0]', $options[$i], 1);
$element->addOption('', '/themes/' . $GLOBALS['xoopsConfig']['theme_set'] . '/menu');
$element->addOptionArray($theme_skins_options);
$form .= $element->render();
$form .= "</select>\n <i>" . _MB_MYMENUS_SELECT_SKIN_FROM_THEME_DSC . "</i><br /><br />";
-}
-}
+ }
+ }
- //Display method 4
+ // Display method 4
++$i;
$display_options = array(
'block' => _MB_MYMENUS_DISPLAY_METHOD_BLOCK,
'template' => _MB_MYMENUS_DISPLAY_METHOD_TEMPLATE
);
$form .= "<b>" . _MB_MYMENUS_DISPLAY_METHOD . "</b> ";
- $element = new XoopsFormSelect('', 'options['.$i.'0]', $options[$i], 1);
+ $element = new XoopsFormSelect('', 'options[' . $i . '0]', $options[$i], 1);
$element->addOptionArray($display_options);
$form .= $element->render();
$form .= "</select>\n <i>" . _MB_MYMENUS_DISPLAY_METHOD_DSC . "</i><br /><br />";
@@ -262,7 +265,7 @@
//Unique ID 5
++$i;
$form .= "<b>" . _MB_MYMENUS_UNIQUEID . "</b> ";
- $element = new XoopsFormText('', 'options['.$i.'0]', 10, 50, $options[$i]);
+ $element = new XoopsFormText('', 'options[' . $i . '0]', 10, 50, $options[$i]);
$form .= $element->render();
$form .= "\n <i>" . _MB_MYMENUS_UNIQUEID_DSC . "</i><br /><br />";
Added: XoopsModules/mymenus/trunk/mymenus/language/english/help/skins.html
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/language/english/help/skins.html (rev 0)
+++ XoopsModules/mymenus/trunk/mymenus/language/english/help/skins.html 2014-03-28 20:15:39 UTC (rev 12415)
@@ -0,0 +1,121 @@
+<div id="help-template" class="outer">
+ <h1 class="head">Skins:
+ <a class="ui-corner-all tooltip" href="<{$xoops_url}>/modules/mymenus/admin/index.php" title="Back to the administration of MyMenus"> MyMenus
+ <img src="<{xoAdminIcons home.png}>" alt="Back to the Administration of MyMenus"/>
+ </a>
+ </h1>
+
+ <h4 class="odd">Theory of operation</h4>
+ <p class="even">
+ Mymenus separates logic from presentation almost 100%!<br>
+ It is mymenus task to generate an array with menus information and let each skin decide what to do with that information.
+ <br>
+ <br>
+ How can skin know when to open a new <li> or <ul> and when to close it?<br>
+ Mymenus append that information to each menu item, that way you can know if that item should be prefixed with a <li> or not.
+ <br>
+ <br>
+ This is the composition of an item array:
+ <br>
+ <code>
+[id] => 3 (id of the menu item)
+ [pid] => 0 (id of the parent menu item)
+ [mid] => 2 (id of the menu package)
+ [title] => Home (title of the menu item)
+ [alt_title] => Home (alt/title of the menu item)
+ [visible] => 1 (visibility of the menu item, it will be 1 for all menus,you can disregard it)
+ [link] => http://localhost/xoops-2.4.5/htdocs/ (alt/title of the menu item)
+ [weight] => 1 (this is for internal usage of the builder class, you can disregard it)
+ [target] => _self (to be used in link target element, it can be _self, _blank, etc..)
+ [groups] => Array (holds the groups who can view this link, you can disregard it)
+ (
+ [0] => 2
+ [1] => 3
+ )
+ [hooks] => Array (holds the hooks available to render the menu, you can disregard it)
+ (
+ )
+ [image] => (image to be used in the link, you can choose not to support it in your skin)
+ [css] => (this is inline css for this item, it goes inside <a style="$item.css">)
+ [oul] => 1 (IMPORTANT! Open UL -> this menu item requires skin to prepend <ul> open element tag)
+ [oli] => 1 (IMPORTANT! Open LI -> this menu item requires skin to prepend <li> open element tag)
+ [close] => (IMPORTANT! this holds closing tags, it will automatically generate </li></ul> tags for you)
+ [cul] => (IMPORTANT! Close UL -> this menu item requires skin to append </ul> close element tag, you should use [close] instead, unless you are not supporting multilevel menus)
+ [cli] => (IMPORTANT! Close LI -> this menu item requires skin to append </li> close element tag, you should use [close] instead, unless you are not supporting multilevel menus)
+ [hassub] => 1 (informs if this menu item has submenus, 1 for true, 0 for false)
+ [level] => 0 (informs the level of nesting of the menu item, 0 is for root, 1 for second level, etc..)
+ [down_weight] => 3 (for usage in menu sorting in admin side, you can ignore it)
+ [selected] => 1 (IMPORTANT, this tells the skin to highlight this item)
+ [topselected] => 1 (Important, this informs the skin that the menu is of level 0(root) and it is selected, you should highlight it)
+ )
+ </code>
+ </p>
+ <h4 class="odd">Skin structure</h4>
+ <p class="even">
+ Skins go into<br>
+ "mymenus/skins" folder or<br>
+ "public_html/themes/yourtheme/menu" folder<br>
+ and they should have a skin_version.php file in it<br>
+ <br>
+ skin_version.php structure:<br>
+ <code>
+//informs where to find the template for this skin(relative to skin folder)
+$skinversion['template'] = 'templates/template.html';
+
+//informs where to find css file/files
+$skinversion['css'] = 'css/superfish.css';
+ </code>
+ or
+ <code>
+$skinversion['css'] = array('css/superfish.css', css/anotherone.css);
+
+//informs where to find js file/files
+$skinversion['js'] = '../../js/jquery-1.3.2.min.js';
+ </code>
+ or
+ <code>
+$skinversion['js'] = array(
+ '../../js/jquery-1.3.2.min.js'
+ '../../js/hoverIntent.js',
+ '../../js/superfish.js'
+ );
+
+//code to be appended in the <head> theme tag
+$header = "\n" . '<script type="text/javascript">';
+$header .= "\n" . ' var $sf = jQuery.noConflict()';
+$header .= "\n" . ' $sf(function(){';
+$header .= "\n" . ' $sf(\'ul.sf-menu\').superfish({';
+$header .= "\n" . ' delay: 1000,';
+$header .= "\n" . ' animation: {opacity:\'show\',height:\'show\'},';
+$header .= "\n" . ' speed: \'fast\'';
+$header .= "\n" . ' });';
+$header .= "\n" . ' });';
+$header .= "\n" . '</script>';
+$skinversion['header'] = $header;
+
+//you can pass any configuration from this file to the template using ['config']
+ </code>
+ example:
+ <code>
+$skinversion['config']['home'] = true;
+$skinversion['config']['iconset'] = 'default';
+This can be fetched in template with <{$config.home}> and <{$config.iconset}>
+ </code>
+ </p>
+ <h4 class="odd">Smarty variables available in the template</h4>
+ <p class="even">
+ $block - holds an array of menu items<br>
+ $config - holds configuration set in skin_version.php<br>
+ $skinurl - holds the url of the skin<br>
+ $skinpath - holds the path of the skin<br>
+ </p>
+ <h4 class="odd">For Theme designers</h4>
+ <p class="even">
+ Since users can choose the smarty variable for each menu,<br>
+ I would advise you to use <{$xoops_links_navbar}> as a place holder.<br>
+ If you provide a skin for your theme, ask users to:<br>
+ -- --enter "xoops_links_navbar" as unique_id in block settings.<br>
+ -- --set "render to smarty variable" in block settings.<br>
+ -- --set "use skin from theme" in block settings.<br>
+ </p>
+</div>
\ No newline at end of file
Added: XoopsModules/mymenus/trunk/mymenus/language/english/help/usage.html
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/language/english/help/usage.html (rev 0)
+++ XoopsModules/mymenus/trunk/mymenus/language/english/help/usage.html 2014-03-28 20:15:39 UTC (rev 12415)
@@ -0,0 +1,79 @@
+<div id="help-template" class="outer">
+ <h1 class="head">Usage:
+ <a class="ui-corner-all tooltip" href="<{$xoops_url}>/modules/mymenus/admin/index.php" title="Back to the administration of MyMenus"> MyMenus
+ <img src="<{xoAdminIcons home.png}>" alt="Back to the Administration of MyMenus"/>
+ </a>
+ </h1>
+ Important to know:<br>
+ <br>
+ Links and images are relative to the root of your site:<br>
+ modules/profile<br>
+ search.php<br>
+ uploads/blank.gif<br>
+ <br>
+ For linking to external sites you need to use complete url:<br>
+ http://www.xuups.com<br>
+ <br>
+ <br>
+ You can use DECORATORS for links, images, title, and alt_title.<br>
+ The decorators follow this syntax:<br>
+ {decorator|value}<br>
+ <br>
+ There are 6 decorators available:<br>
+ USER -> gets info for the user that is seeing the page<br>
+ OWNER -> gets info for the user that match uid on the url(if given)<br>
+ URI -> gets info about the url arguments<br>
+ MODULE -> gets dynamic menu from a module (Used in title field only)<br>
+ SMARTY -> gets smarty variables<br>
+ CONSTANT -> gets defined constants<br>
+ <br>
+ Some syntax examples<br>
+ {USER|UNAME} gets the username of this user, returns anonymous if not a
+ user<br>
+ {USER|UID} gets the uid of this user, returns 0 if not a user<br>
+ {USER|REGDATE} gets the regdate of this user, returns empty if not a
+ user<br>
+ {USER|any other field of the user table} yes! You can get what you need!<br>
+ <br>
+ Some special fields you may use<br>
+ {USER|PM_NEW} Show number of private messages not read<br>
+ {USER|PM_READED}<br>
+ {USER|PM_TOTAL}<br>
+ <br>
+ The same is valid for OWNER:<br>
+ {OWNER|UNAME}<br>
+ {OWNER|UID}<br>
+ etc..<br>
+ <br>
+ And you can get any parameter on the uri with:<br>
+ {URI|UID}<br>
+ {URI|ID}<br>
+ {URI|SEARCH}<br>
+ {URI|ITEMID}<br>
+ {URI|CATID}<br>
+ etc...<br>
+ <br>
+ Example of links using decorators:<br>
+ modules/profile/userinfo.php?uid={USER|UID}<br>
+ modules/yogurt/pictures.php?uid={OWNER|UID}<br>
+ <br>
+ Example on titles using decorators:<br>
+ {USER|UNAME}<br>
+ {OWNER|UNAME} profile<br>
+ You have searched for {URI|SEARCH}<br>
+ <br>
+ Populating menus with modules information:<br>
+ {MODULE|NEWS}<br>
+ {MODULE|XHELP}<br>
+ {MODULE|MYLINKS}<br>
+ {MODULE|TDMDOWNLOADS}<br>
+ <br>
+ Using smarty information:<br>
+ {SMARTY|xoops_uname}<br>
+ {SMARTY|xoops_avatar}<br>
+ <br>
+ Using constants information:<br>
+ {CONSTANT|XOOPS_URL}/myimages/image.gif<br>
+ {CONSTANT|XOOPS_ROOT_PATH}<br>
+ <br>
+</div>
\ No newline at end of file
Added: XoopsModules/mymenus/trunk/mymenus/language/english/help/usage.txt
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/language/english/help/usage.txt (rev 0)
+++ XoopsModules/mymenus/trunk/mymenus/language/english/help/usage.txt 2014-03-28 20:15:39 UTC (rev 12415)
@@ -0,0 +1,69 @@
+Important to know:
+
+Links and images are relative to the root of your site:
+modules/profile
+search.php
+uploads/blank.gif
+
+For linking to external sites you need to use complete url:
+http://www.xuups.com
+
+
+You can use DECORATORS for links, images, title, and alt_title.
+The decorators follow this syntax:
+{decorator|value}
+
+There are 6 decorators available:
+USER -> gets info for the user that is seeing the page
+OWNER -> gets info for the user that match uid on the url(if given)
+URI -> gets info about the url arguments
+MODULE -> gets dynamic menu from a module (Used in title field only)
+SMARTY -> gets smarty variables
+CONSTANT -> gets defined constants
+
+Some syntax examples
+{USER|UNAME} gets the username of this user, returns anonymous if not a user
+{USER|UID} gets the uid of this user, returns 0 if not a user
+{USER|REGDATE} gets the regdate of this user, returns empty if not a user
+{USER|any other field of the user table} yes! You can get what you need!
+
+Some special fields you may use
+{USER|PM_NEW} Show number of private messages not read
+{USER|PM_READED}
+{USER|PM_TOTAL}
+
+The same is valid for OWNER:
+{OWNER|UNAME}
+{OWNER|UID}
+etc..
+
+And you can get any parameter on the uri with:
+{URI|UID}
+{URI|ID}
+{URI|SEARCH}
+{URI|ITEMID}
+{URI|CATID}
+etc...
+
+Example of links using decorators:
+modules/profile/userinfo.php?uid={USER|UID}
+modules/yogurt/pictures.php?uid={OWNER|UID}
+
+Example on titles using decorators:
+{USER|UNAME}
+{OWNER|UNAME} profile
+You have searched for {URI|SEARCH}
+
+Populating menus with modules information:
+{MODULE|NEWS}
+{MODULE|XHELP}
+{MODULE|MYLINKS}
+{MODULE|TDMDOWNLOADS}
+
+Using smarty information:
+{SMARTY|xoops_uname}
+{SMARTY|xoops_avatar}
+
+Using constants information:
+{CONSTANT|XOOPS_URL}/myimages/image.gif
+{CONSTANT|XOOPS_ROOT_PATH}
Modified: XoopsModules/mymenus/trunk/mymenus/xoops_version.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/xoops_version.php 2014-03-28 20:12:18 UTC (rev 12414)
+++ XoopsModules/mymenus/trunk/mymenus/xoops_version.php 2014-03-28 20:15:39 UTC (rev 12415)
@@ -35,6 +35,19 @@
$modversion['icons16'] = '../../Frameworks/moduleclasses/icons/16';
$modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32';
+
+//help files
+$i = 0;
+$modversion['helpsection'][$i]['name'] = "Overview";
+$modversion['helpsection'][$i]['link'] = "page=help";
+$i++;
+$modversion['helpsection'][$i]['name'] = "Skins";
+$modversion['helpsection'][$i]['link'] = "page=skins";
+$i++;
+$modversion['helpsection'][$i]['name'] = "Usage";
+$modversion['helpsection'][$i]['link'] = "page=usage";
+
+
//about
$modversion['release_date'] = '2014/03/21';
$modversion["module_website_url"] = "www.xoops.org";
|
|
From: <luc...@us...> - 2014-03-28 20:12:27
|
Revision: 12414
http://sourceforge.net/p/xoops/svn/12414
Author: luciorota
Date: 2014-03-28 20:12:18 +0000 (Fri, 28 Mar 2014)
Log Message:
-----------
standardize module (IN PROGRESS)
Modified Paths:
--------------
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/accounts.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/admin_footer.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/admin_header.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/attachment.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/bmh.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/bmh_callback_database.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/cat.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/catsubscr.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/import.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/index.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/letter.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/mailinglist.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/maintenance.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/menu.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/protocol.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/sendletter.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/subscr.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/task.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/blocks/blocks_catsubscr.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/blocks/blocks_letter.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xNewsletter_accounts.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xNewsletter_attachment.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xNewsletter_bmh.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xNewsletter_cat.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xNewsletter_catsubscr.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xNewsletter_import.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xNewsletter_letter.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xNewsletter_mailinglist.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xNewsletter_protocol.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xNewsletter_subscr.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xNewsletter_task.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/cron.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/docs/changelog.txt
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/footer.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/header.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/common.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/config.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/functions.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/mailinglist.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/task.inc.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/index.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/help/help.html
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/modinfo.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/letter.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/csv.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/evennews.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/rmbulletin.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/smartpartner.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/subscribers.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/weblinks.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/xoopsuser.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/print.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/protocol.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/sendletter.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/subscription.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/templates/xnewsletter_index_list_letters.html
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/templates/xnewsletter_letter_list_letters.html
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/templates/xnewsletter_letter_list_subscrs.html
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/templates/xnewsletter_protocol.html
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/templates/xnewsletter_subscription_list_subscriptions.html
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/templates/xnewsletter_subscription_result.html
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/xoops_version.php
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/accounts.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/accounts.php 2014-03-27 14:28:58 UTC (rev 12413)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/accounts.php 2014-03-28 20:12:18 UTC (rev 12414)
@@ -42,8 +42,8 @@
{
case "check_account":
- $img_ok = "<img src='".XNEWSLETTER_ICON."/xn_ok.png' alt='"._AM_XNEWSLETTER_OK."' title='"._AM_XNEWSLETTER_OK."' /> ";
- $img_failed = "<img src='".XNEWSLETTER_ICON."/xn_failed.png' alt='"._AM_XNEWSLETTER_FAILED."' title='"._AM_XNEWSLETTER_FAILED."' /> ";
+ $img_ok = "<img src='" . XNEWSLETTER_ICONS_URL . "/xn_ok.png' alt='" . _AM_XNEWSLETTER_OK . "' title='"._AM_XNEWSLETTER_OK . "' /> ";
+ $img_failed = "<img src='" . XNEWSLETTER_ICONS_URL . "/xn_failed.png' alt='" . _AM_XNEWSLETTER_FAILED . "' title='" . _AM_XNEWSLETTER_FAILED . "' /> ";
echo $indexAdmin->addNavigation("accounts.php");
$indexAdmin->addItemButton(_AM_XNEWSLETTER_ACCOUNTSLIST, 'accounts.php?op=list', 'list');
@@ -52,7 +52,7 @@
if ($accounts_id == 0) {
redirect_header("accounts.php", 3, _AM_XNEWSLETTER_ERROR_NO_VALID_ID);
} else {
- $obj_account =& $accountsHandler->get($accounts_id);
+ $obj_account =& $xnewsletter->getHandler('xNewsletter_accounts')->get($accounts_id);
}
$mailhost = $obj_account->getVar("accounts_server_in");
@@ -188,11 +188,11 @@
$criteria = new CriteriaCompo();
$criteria->setSort("accounts_id ASC, accounts_type");
$criteria->setOrder("ASC");
- $numrows = $accountsHandler->getCount();
+ $numrows = $xnewsletter->getHandler('xNewsletter_accounts')->getCount();
$start = xNewsletter_CleanVars ( $_REQUEST, 'start', 0, 'int' );
$criteria->setStart($start);
$criteria->setLimit($limit);
- $accounts_arr = $accountsHandler->getall($criteria);
+ $accounts_arr = $xnewsletter->getHandler('xNewsletter_accounts')->getall($criteria);
if ( $numrows > $limit ) {
include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
$pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=list');
@@ -236,10 +236,10 @@
echo "<td class='center'>".$verif_accounts_default."</td>";
echo "<td class='center width5'>";
- echo " <a href='accounts.php?op=edit_account&accounts_id=".$i."'><img src=".XNEWSLETTER_ICON."/xn_edit.png alt='"._EDIT."' title='"._EDIT."' /></a>";
- echo " <a href='accounts.php?op=delete_account&accounts_id=".$i."'><img src=".XNEWSLETTER_ICON."/xn_delete.png alt='"._DELETE."' title='"._DELETE."' /></a>";
+ echo " <a href='accounts.php?op=edit_account&accounts_id=".$i."'><img src=".XNEWSLETTER_ICONS_URL."/xn_edit.png alt='"._EDIT."' title='"._EDIT."' /></a>";
+ echo " <a href='accounts.php?op=delete_account&accounts_id=".$i."'><img src=".XNEWSLETTER_ICONS_URL."/xn_delete.png alt='"._DELETE."' title='"._DELETE."' /></a>";
if ($accounts_arr[$i]->getVar("accounts_type") != _AM_ACCOUNTS_TYPE_VAL_PHP_MAIL && $accounts_arr[$i]->getVar("accounts_type") != _AM_ACCOUNTS_TYPE_VAL_PHP_SENDMAIL) {
- echo " <a href='accounts.php?op=check_account&accounts_id=".$i."'><img src=".XNEWSLETTER_ICON."/xn_check.png alt='"._AM_ACCOUNTS_TYPE_CHECK."' title='"._AM_ACCOUNTS_TYPE_CHECK."' /></a>";
+ echo " <a href='accounts.php?op=check_account&accounts_id=".$i."'><img src=".XNEWSLETTER_ICONS_URL."/xn_check.png alt='"._AM_ACCOUNTS_TYPE_CHECK."' title='"._AM_ACCOUNTS_TYPE_CHECK."' /></a>";
}
echo "</td>";
echo "</tr>";
@@ -274,7 +274,7 @@
echo $indexAdmin->addNavigation("accounts.php");
$indexAdmin->addItemButton(_AM_XNEWSLETTER_ACCOUNTSLIST, 'accounts.php?op=list', 'list');
echo $indexAdmin->renderButton();
- $obj =& $accountsHandler->create();
+ $obj = $xnewsletter->getHandler('xNewsletter_accounts')->create();
$obj = xNewsletter_setPost($obj,$_POST);
$form = $obj->getForm();
$form->display();
@@ -285,19 +285,19 @@
redirect_header("accounts.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
}
- $obj =& $accountsHandler->get($accounts_id);
+ $obj =& $xnewsletter->getHandler('xNewsletter_accounts')->get($accounts_id);
$_POST['accounts_id'] = $accounts_id;
$obj = xNewsletter_setPost($obj,$_POST);
$criteria = new CriteriaCompo();
$criteria->add(new Criteria("accounts_default", 1));
- $count_accounts_default = $accountsHandler->getCount($criteria);
+ $count_accounts_default = $xnewsletter->getHandler('xNewsletter_accounts')->getCount($criteria);
if ($count_accounts_default > 0) {
if ($obj->getVar("accounts_default") == 1) {
global $xoopsDB;
$verif_accounts_default = "1";
//reset old accounts_default
- $sql = "UPDATE `".$xoopsDB->prefix("mod_xnewsletter_accounts")."` SET `accounts_default` = '0'";
+ $sql = "UPDATE `{$xoopsDB->prefix("mod_xnewsletter_accounts")}` SET `accounts_default` = '0'";
$result= $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
} else {
$verif_accounts_default = "0";
@@ -307,7 +307,7 @@
}
$obj->setVar("accounts_default", $verif_accounts_default);
if ($obj->getVar("accounts_yourmail") != "" && $obj->getVar("accounts_yourmail") != _AM_ACCOUNTS_TYPE_YOUREMAIL ) {
- if ($accountsHandler->insert($obj)) {
+ if ($xnewsletter->getHandler('xNewsletter_accounts')->insert($obj)) {
if ($save_and_check == 'none') {
redirect_header("accounts.php?op=list", 2, _AM_XNEWSLETTER_FORMOK);
} else {
@@ -328,19 +328,19 @@
$indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWACCOUNTS, 'accounts.php?op=new_account', 'add');
$indexAdmin->addItemButton(_AM_XNEWSLETTER_ACCOUNTSLIST, 'accounts.php?op=list', 'list');
echo $indexAdmin->renderButton();
- $obj = $accountsHandler->get($accounts_id);
+ $obj = $xnewsletter->getHandler('xNewsletter_accounts')->get($accounts_id);
if ( !empty($_POST) ) xNewsletter_setPost($obj,$_POST);
$form = $obj->getForm();
$form->display();
break;
case "delete_account":
- $obj =& $accountsHandler->get($accounts_id);
+ $obj = $xnewsletter->getHandler('xNewsletter_accounts')->get($accounts_id);
if (isset($_POST["ok"]) && $_POST["ok"] == "1") {
if ( !$GLOBALS["xoopsSecurity"]->check() ) {
redirect_header("accounts.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
}
- if ($accountsHandler->delete($obj)) {
+ if ($xnewsletter->getHandler('xNewsletter_accounts')->delete($obj)) {
redirect_header("accounts.php", 3, _AM_XNEWSLETTER_FORMDELOK);
} else {
echo $obj->getHtmlErrors();
@@ -351,5 +351,3 @@
break;
}
include "admin_footer.php";
-
-?>
\ No newline at end of file
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/admin_footer.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/admin_footer.php 2014-03-27 14:28:58 UTC (rev 12413)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/admin_footer.php 2014-03-28 20:12:18 UTC (rev 12414)
@@ -28,11 +28,11 @@
echo "
<br /><br /><div align='center'><a href='http://www.xoops.org' target='_blank'>
-<img src='" . XNEWSLETTER_ICON . "/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS' /></a>
+<img src='" . XNEWSLETTER_ICONS_URL . "/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS' /></a>
</div>";
echo "
<div class='center small italic pad5'>
-<strong>" . $xoopsModule->getVar('name') . "</strong> " . _AM_XNEWSLETTER_MAINTAINEDBY . "
+<strong>" . $xnewsletter->getModule()->getVar('name') . "</strong> " . _AM_XNEWSLETTER_MAINTAINEDBY . "
<a href='http://www.xoops.org' title='Visit' class='tooltip' rel='external'>XOOPS Community</a>
</div>";
xoops_cp_footer();
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/admin_header.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/admin_header.php 2014-03-27 14:28:58 UTC (rev 12413)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/admin_header.php 2014-03-28 20:12:18 UTC (rev 12414)
@@ -27,20 +27,29 @@
*/
include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
+include_once dirname(dirname(__FILE__)) . '/include/common.php';
+
+// Include xoops admin header
include_once XOOPS_ROOT_PATH . "/include/cp_functions.php";
+/*
+$pathIcon16 = XOOPS_URL . '/' . $xnewsletter->getModule()->getInfo('icons16');
+$pathIcon32 = XOOPS_URL . '/' . $xnewsletter->getModule()->getInfo('icons32');
+$pathModuleAdmin = XOOPS_ROOT_PATH . '/' . $xnewsletter->getModule()->getInfo('dirmoduleadmin');
+require_once $pathModuleAdmin . '/moduleadmin/moduleadmin.php';
+*/
-$dirname = basename(dirname(dirname(__FILE__)));
+//$dirname = basename(dirname(dirname(__FILE__)));
-include_once XOOPS_ROOT_PATH . "/modules/" . $dirname . "/include/functions.php";
-include_once XOOPS_ROOT_PATH . "/modules/" . $dirname . "/include/config.php";
+//include_once XOOPS_ROOT_PATH . "/modules/" . $xnewsletter->getModule()->dirname() . "/include/functions.php";
+//include_once XOOPS_ROOT_PATH . "/modules/" . $xnewsletter->getModule()->dirname() . "/include/config.php";
-$module_handler =& xoops_gethandler('module');
-$xoopsModule = & $module_handler->getByDirname($dirname);
+//$module_handler =& xoops_gethandler('module');
+$xoopsModule = $xnewsletter->getModule();
//Load languages
-xoops_loadLanguage('admin', $dirname);
-xoops_loadLanguage('modinfo', $dirname);
-xoops_loadLanguage('main', $dirname);
+xoops_loadLanguage('admin', $xnewsletter->getModule()->dirname());
+xoops_loadLanguage('modinfo', $xnewsletter->getModule()->dirname());
+xoops_loadLanguage('main', $xnewsletter->getModule()->dirname());
if (!xNewsletter_checkModuleAdmin()) {
xoops_cp_header();
@@ -49,33 +58,15 @@
exit();
}
-$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid'));
//$pathIcon = XOOPS_URL . "/modules/" . $dirname . "/images/icons";
$indexAdmin = new ModuleAdmin();
-global $xoopsModuleConfig;
-if (empty($xoopsModuleConfig)) {
- $config_handler =& xoops_gethandler("config");
- $xoopsModuleConfig =& $config_handler->getConfigsByCat(0, $xoopsModule->mid());
-}
+$myts = MyTextSanitizer::getInstance();
-$accountsHandler =& xoops_getModuleHandler('xNewsletter_accounts', $dirname);
-$catHandler =& xoops_getModuleHandler('xNewsletter_cat', $dirname);
-$subscrHandler =& xoops_getModuleHandler('xNewsletter_subscr', $dirname);
-$catsubscrHandler =& xoops_getModuleHandler('xNewsletter_catsubscr', $dirname);
-$letterHandler =& xoops_getModuleHandler('xNewsletter_letter', $dirname);
-$attachmentHandler =& xoops_getModuleHandler('xNewsletter_attachment', $dirname);
-$protocolHandler =& xoops_getModuleHandler('xNewsletter_protocol', $dirname);
-$mailinglistHandler =& xoops_getModuleHandler('xNewsletter_mailinglist', $dirname);
-$bmhHandler =& xoops_getModuleHandler('xNewsletter_bmh', $dirname);
-$importHandler =& xoops_getModuleHandler('xNewsletter_import', $dirname);
-$taskHandler =& xoops_getModuleHandler('xNewsletter_task', $dirname);
-$myts = MyTextSanitizer::getInstance();
-
if ($xoopsUser) {
$moduleperm_handler =& xoops_gethandler('groupperm');
- if (!$moduleperm_handler->checkRight('module_admin', $xoopsModule->getVar('mid'), $xoopsUser->getGroups())) {
+ if (!$moduleperm_handler->checkRight('module_admin', $xnewsletter->getModule()->mid(), $xoopsUser->getGroups())) {
redirect_header(XOOPS_URL, 1, _NOPERM);
exit();
}
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/attachment.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/attachment.php 2014-03-27 14:28:58 UTC (rev 12413)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/attachment.php 2014-03-28 20:12:18 UTC (rev 12414)
@@ -44,11 +44,11 @@
$criteria = new CriteriaCompo();
$criteria->setSort("attachment_letter_id DESC, attachment_id");
$criteria->setOrder("DESC");
- $numrows = $attachmentHandler->getCount();
+ $numrows = $xnewsletter->getHandler('xNewsletter_attachment')->getCount();
$start = xNewsletter_CleanVars ( $_REQUEST, 'start', 0, 'int' );
$criteria->setStart($start);
$criteria->setLimit($limit);
- $attachment_arr = $attachmentHandler->getall($criteria);
+ $attachment_arr = $xnewsletter->getHandler('xNewsletter_attachment')->getall($criteria);
if ($numrows > $limit) {
include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
$pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=list');
@@ -79,7 +79,7 @@
$class = ($class == "even") ? "odd" : "even";
echo "<td class='center'>".$i."</td>";
- $letter =& $letterHandler->get($attachment_arr[$i]->getVar("attachment_letter_id"));
+ $letter =& $xnewsletter->getHandler('xNewsletter_letter')->get($attachment_arr[$i]->getVar("attachment_letter_id"));
$title_letter = $letter->getVar("letter_title");
echo "<td class='center'>" . $title_letter . "</td>";
echo "<td class='center'>" . $attachment_arr[$i]->getVar("attachment_name") . "</td>";
@@ -89,8 +89,8 @@
echo "
<td class='center width5' nowrap='nowrap'>
- <a href='attachment.php?op=edit_attachment&attachment_id=" . $i . "'><img src=" . XNEWSLETTER_ICON . "/xn_edit.png alt='" . _EDIT . "' title='" . _EDIT . "' /></a>
- <a href='attachment.php?op=delete_attachment&attachment_id=" . $i . "'><img src=" . XNEWSLETTER_ICON . "/xn_delete.png alt='" . _DELETE . "' title='" . _DELETE . "' /></a>
+ <a href='attachment.php?op=edit_attachment&attachment_id=" . $i . "'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_edit.png alt='" . _EDIT . "' title='" . _EDIT . "' /></a>
+ <a href='attachment.php?op=delete_attachment&attachment_id=" . $i . "'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_delete.png alt='" . _DELETE . "' title='" . _DELETE . "' /></a>
</td>
";
echo "</tr>";
@@ -119,7 +119,7 @@
$indexAdmin->addItemButton(_AM_XNEWSLETTER_ATTACHMENTLIST, 'attachment.php?op=list', 'list');
echo $indexAdmin->renderButton();
- $obj =& $attachmentHandler->create();
+ $obj =& $xnewsletter->getHandler('xNewsletter_attachment')->create();
$form = $obj->getForm();
$form->display();
break;
@@ -129,7 +129,7 @@
redirect_header("attachment.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
}
- $obj =& $attachmentHandler->get($attachment_id);
+ $obj =& $xnewsletter->getHandler('xNewsletter_attachment')->get($attachment_id);
//Form attachment_letter_id
$obj->setVar("attachment_letter_id", xNewsletter_CleanVars($_REQUEST, "attachment_letter_id", 0, "int"));
//Form attachment_name
@@ -141,7 +141,7 @@
//Form attachment_created
$obj->setVar("attachment_created", xNewsletter_CleanVars($_REQUEST, "attachment_created", time(), "int"));
- if ($attachmentHandler->insert($obj)) {
+ if ($xnewsletter->getHandler('xNewsletter_attachment')->insert($obj)) {
redirect_header("attachment.php?op=list", 2, _AM_XNEWSLETTER_FORMOK);
}
@@ -155,18 +155,18 @@
$indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWATTACHMENT, 'attachment.php?op=new_attachment', 'add');
$indexAdmin->addItemButton(_AM_XNEWSLETTER_ATTACHMENTLIST, 'attachment.php?op=list', 'list');
echo $indexAdmin->renderButton();
- $obj = $attachmentHandler->get($attachment_id);
+ $obj = $xnewsletter->getHandler('xNewsletter_attachment')->get($attachment_id);
$form = $obj->getForm();
$form->display();
break;
case "delete_attachment" :
- $obj =& $attachmentHandler->get($attachment_id);
+ $obj =& $xnewsletter->getHandler('xNewsletter_attachment')->get($attachment_id);
if (isset($_POST["ok"]) && $_POST["ok"] == 1) {
if (!$GLOBALS["xoopsSecurity"]->check()) {
redirect_header("attachment.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
}
- if ($attachmentHandler->delete($obj)) {
+ if ($xnewsletter->getHandler('xNewsletter_attachment')->delete($obj)) {
redirect_header("attachment.php", 3, _AM_XNEWSLETTER_FORMDELOK);
} else {
echo $obj->getHtmlErrors();
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/bmh.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/bmh.php 2014-03-27 14:28:58 UTC (rev 12413)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/bmh.php 2014-03-28 20:12:18 UTC (rev 12414)
@@ -43,7 +43,7 @@
if ( (isset($_POST["ok"]) && $_POST["ok"] == 1) ) {
$count_err = 0;
- $obj_bmh =& $bmhHandler->get($bmh_id);
+ $obj_bmh =& $xnewsletter->getHandler('xNewsletter_bmh')->get($bmh_id);
$bmh_email = $obj_bmh->getVar("bmh_email");
$sql = "SELECT subscr_id FROM " . $xoopsDB->prefix("mod_xnewsletter_subscr") . " WHERE (";
@@ -60,10 +60,10 @@
$xoopsDB->query($sql_upd_measure);
redirect_header("bmh.php?op=list", 5, _AM_XNEWSLETTER_BMH_ERROR_NO_SUBSCRID);
}
- $obj_subscr =& $subscrHandler->get($subscr_id);
+ $obj_subscr =& $xnewsletter->getHandler('xNewsletter_subscr')->get($subscr_id);
// delete subscriber
- if (!$subscrHandler->delete($obj_subscr,true)) {
+ if (!$xnewsletter->getHandler('xNewsletter_subscr')->delete($obj_subscr,true)) {
$actionprot_err = $obj_subscr->getHtmlErrors()."<br/><br/><br/>";
$count_err++;
}
@@ -71,15 +71,15 @@
//delete subscription
$crit_catsubscr = new CriteriaCompo();
$crit_catsubscr->add(new Criteria('catsubscr_subscrid', $subscr_id));
- $numrows_catsubscr = $catsubscrHandler->getCount($crit_catsubscr);
+ $numrows_catsubscr = $xnewsletter->getHandler('xNewsletter_catsubscr')->getCount($crit_catsubscr);
if ($numrows_catsubscr > 0) {
- $catsubscr_arr = $catsubscrHandler->getall($crit_catsubscr);
+ $catsubscr_arr = $xnewsletter->getHandler('xNewsletter_catsubscr')->getall($crit_catsubscr);
foreach (array_keys($catsubscr_arr) as $cat) {
- $obj_catsubscr =& $catsubscrHandler->get($catsubscr_arr[$cat]->getVar("catsubscr_id"));
- $obj_cat =& $catHandler->get($catsubscr_arr[$cat]->getVar("catsubscr_catid"));
+ $obj_catsubscr =& $xnewsletter->getHandler('xNewsletter_catsubscr')->get($catsubscr_arr[$cat]->getVar("catsubscr_id"));
+ $obj_cat =& $xnewsletter->getHandler('xNewsletter_cat')->get($catsubscr_arr[$cat]->getVar("catsubscr_catid"));
$cat_mailinglist = $obj_cat->getVar("cat_mailinglist");
- if ($catsubscrHandler->delete($obj_catsubscr, true)) {
+ if ($xnewsletter->getHandler('xNewsletter_catsubscr')->delete($obj_catsubscr, true)) {
//handle mailinglists
if ($cat_mailinglist > 0) {
require_once( XOOPS_ROOT_PATH."/modules/xNewsletter/include/mailinglist.php" );
@@ -106,7 +106,7 @@
if ($bmh_id == 0) redirect_header("bmh.php", 3, _AM_XNEWSLETTER_ERROR_NO_VALID_ID);
if ($bmh_measure == 0) redirect_header("bmh.php", 3, _AM_XNEWSLETTER_ERROR_NO_VALID_ID);
- $obj_bmh =& $bmhHandler->get($bmh_id);
+ $obj_bmh =& $xnewsletter->getHandler('xNewsletter_bmh')->get($bmh_id);
if ($obj_bmh->getVar("bmh_measure") == _AM_XNEWSLETTER_BMH_MEASURE_VAL_DELETE ) {
redirect_header("bmh.php?op=list&filter=".$filter."'", 3, _AM_XNEWSLETTER_BMH_MEASURE_ALREADY_DELETED);
@@ -141,11 +141,11 @@
$accounts_crit = new CriteriaCompo();
$accounts_crit->add(new Criteria("accounts_use_bmh", "1"));
- $numrows_acc = $accountsHandler->getCount($accounts_crit);
+ $numrows_acc = $xnewsletter->getHandler('xNewsletter_accounts')->getCount($accounts_crit);
if ($numrows_acc > 0)
{
- $accounts_arr = $accountsHandler->getall($accounts_crit);
+ $accounts_arr = $xnewsletter->getHandler('xNewsletter_accounts')->getall($accounts_crit);
$result_bmh = _AM_XNEWSLETTER_BMH_SUCCESSFUL."<br/>";
foreach (array_keys($accounts_arr) as $acc)
@@ -225,11 +225,11 @@
if ($filter > -1) $criteria->add(new Criteria("bmh_measure", $filter));
$criteria->setSort("bmh_id");
$criteria->setOrder("DESC");
- $numrows = $bmhHandler->getCount($criteria);
+ $numrows = $xnewsletter->getHandler('xNewsletter_bmh')->getCount($criteria);
$start = xNewsletter_CleanVars ( $_REQUEST, 'start', 0, 'int' );
$criteria->setStart($start);
$criteria->setLimit($limit);
- $bmh_arr = $bmhHandler->getall($criteria);
+ $bmh_arr = $xnewsletter->getHandler('xNewsletter_bmh')->getall($criteria);
if ( $numrows > $limit ) {
include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
$pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=list');
@@ -300,16 +300,16 @@
echo "<td class='center width20'>
<a href='bmh.php?op=handle_bmh&bmh_id=".$i."&bmh_measure="._AM_XNEWSLETTER_BMH_MEASURE_VAL_NOTHING."&filter=".$filter."'>
- <img src=".XNEWSLETTER_ICON."/xn_nothing.png alt='"._AM_XNEWSLETTER_BMH_MEASURE_NOTHING."' title='"._AM_XNEWSLETTER_BMH_MEASURE_NOTHING."' />
+ <img src=".XNEWSLETTER_ICONS_URL."/xn_nothing.png alt='"._AM_XNEWSLETTER_BMH_MEASURE_NOTHING."' title='"._AM_XNEWSLETTER_BMH_MEASURE_NOTHING."' />
</a>
<a href='bmh.php?op=handle_bmh&bmh_id=".$i."&bmh_measure="._AM_XNEWSLETTER_BMH_MEASURE_VAL_QUIT."&filter=".$filter."'>
- <img src=".XNEWSLETTER_ICON."/xn_catsubscr_temp.png alt='"._AM_XNEWSLETTER_BMH_MEASURE_QUIT."' title='"._AM_XNEWSLETTER_BMH_MEASURE_QUIT."' />
+ <img src=".XNEWSLETTER_ICONS_URL."/xn_catsubscr_temp.png alt='"._AM_XNEWSLETTER_BMH_MEASURE_QUIT."' title='"._AM_XNEWSLETTER_BMH_MEASURE_QUIT."' />
</a>
<a href='bmh.php?op=bmh_delsubscr&bmh_id=".$i."&filter=".$filter."'>
- <img src=".XNEWSLETTER_ICON."/xn_quit.png alt='"._AM_XNEWSLETTER_BMH_MEASURE_DELETE."' title='"._AM_XNEWSLETTER_BMH_MEASURE_DELETE."' />
+ <img src=".XNEWSLETTER_ICONS_URL."/xn_quit.png alt='"._AM_XNEWSLETTER_BMH_MEASURE_DELETE."' title='"._AM_XNEWSLETTER_BMH_MEASURE_DELETE."' />
</a>
- <a href='bmh.php?op=edit_bmh&bmh_id=".$i."'><img src=".XNEWSLETTER_ICON."/xn_edit.png alt='"._AM_XNEWSLETTER_BMH_EDIT."' title='"._AM_XNEWSLETTER_BMH_EDIT."' width='16px' /></a>
- <a href='bmh.php?op=delete_bmh&bmh_id=".$i."'><img src=".XNEWSLETTER_ICON."/xn_delete.png alt='"._AM_XNEWSLETTER_BMH_DELETE."' title='"._AM_XNEWSLETTER_BMH_DELETE."' width='16px' /></a>
+ <a href='bmh.php?op=edit_bmh&bmh_id=".$i."'><img src=".XNEWSLETTER_ICONS_URL."/xn_edit.png alt='"._AM_XNEWSLETTER_BMH_EDIT."' title='"._AM_XNEWSLETTER_BMH_EDIT."' width='16px' /></a>
+ <a href='bmh.php?op=delete_bmh&bmh_id=".$i."'><img src=".XNEWSLETTER_ICONS_URL."/xn_delete.png alt='"._AM_XNEWSLETTER_BMH_DELETE."' title='"._AM_XNEWSLETTER_BMH_DELETE."' width='16px' /></a>
</td>";
echo "</tr>";
}
@@ -341,7 +341,7 @@
redirect_header("bmh.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
}
- $obj =& $bmhHandler->get($bmh_id);
+ $obj =& $xnewsletter->getHandler('xNewsletter_bmh')->get($bmh_id);
//Form bmh_rule_no
$obj->setVar("bmh_rule_no", xNewsletter_CleanVars( $_REQUEST, "bmh_rule_no", "", "string") );
@@ -362,7 +362,7 @@
//Form bmh_created
$obj->setVar("bmh_created", xNewsletter_CleanVars( $_REQUEST, "bmh_created", 0, "int") );
- if ($bmhHandler->insert($obj)) {
+ if ($xnewsletter->getHandler('xNewsletter_bmh')->insert($obj)) {
redirect_header("bmh.php?op=list", 2, _AM_XNEWSLETTER_FORMOK);
}
echo $obj->getHtmlErrors();
@@ -374,18 +374,18 @@
echo $indexAdmin->addNavigation("bmh.php");
$indexAdmin->addItemButton(_AM_XNEWSLETTER_BMHLIST, 'bmh.php?op=list', 'list');
echo $indexAdmin->renderButton();
- $obj = $bmhHandler->get($bmh_id);
+ $obj = $xnewsletter->getHandler('xNewsletter_bmh')->get($bmh_id);
$form = $obj->getForm();
$form->display();
break;
case "delete_bmh":
- $obj =& $bmhHandler->get($bmh_id);
+ $obj =& $xnewsletter->getHandler('xNewsletter_bmh')->get($bmh_id);
if (isset($_POST["ok"]) && $_POST["ok"] == 1) {
if ( !$GLOBALS["xoopsSecurity"]->check() ) {
redirect_header("bmh.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
}
- if ($bmhHandler->delete($obj)) {
+ if ($xnewsletter->getHandler('xNewsletter_bmh')->delete($obj)) {
redirect_header("bmh.php", 3, _AM_XNEWSLETTER_FORMDELOK);
} else {
echo $obj->getHtmlErrors();
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/bmh_callback_database.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/bmh_callback_database.php 2014-03-27 14:28:58 UTC (rev 12413)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/bmh_callback_database.php 2014-03-28 20:12:18 UTC (rev 12414)
@@ -23,9 +23,9 @@
function callbackAction ($msgnum, $bounce_type, $email, $subject, $xheader, $remove, $rule_no = false, $rule_cat = false, $totalFetched = 0) {
if ($rule_no != "0000") {
global $xoopsUser;
- $bmhHandler=& xoops_getModuleHandler('xNewsletter_bmh', 'xNewsletter');
+ $xnewsletter->getHandler('xNewsletter_bmh')=& xoops_getModuleHandler('xNewsletter_bmh', 'xNewsletter');
- $obj =& $bmhHandler->create();
+ $obj =& $xnewsletter->getHandler('xNewsletter_bmh')->create();
//Form bmh_rule_no
$obj->setVar("bmh_rule_no", $rule_no);
@@ -47,7 +47,7 @@
//Form bmh_created
$obj->setVar("bmh_created", time());
- if (!$bmhHandler->insert($obj)) {
+ if (!$xnewsletter->getHandler('xNewsletter_bmh')->insert($obj)) {
echo $obj->getHtmlErrors();
return false;
}
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/cat.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/cat.php 2014-03-27 14:28:58 UTC (rev 12413)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/cat.php 2014-03-28 20:12:18 UTC (rev 12414)
@@ -29,7 +29,7 @@
include "admin_header.php";
xoops_cp_header();
//global $pathIcon, $indexAdmin;
-global $xoopsModuleConfig;
+
// We recovered the value of the argument op in the URL$
$op = xNewsletter_CleanVars($_REQUEST, 'op', 'list', 'string');
$cat_id = xNewsletter_CleanVars($_REQUEST, 'cat_id', 0, 'int');
@@ -44,11 +44,11 @@
$criteria = new CriteriaCompo();
$criteria->setSort("cat_id ASC, cat_name");
$criteria->setOrder("ASC");
- $numrows = $catHandler->getCount();
+ $numrows = $xnewsletter->getHandler('xNewsletter_cat')->getCount();
$start = xNewsletter_CleanVars ( $_REQUEST, 'start', 0, 'int' );
$criteria->setStart($start);
$criteria->setLimit($limit);
- $cat_arr = $catHandler->getall($criteria);
+ $cat_arr = $xnewsletter->getHandler('xNewsletter_cat')->getall($criteria);
if ( $numrows > $limit ) {
include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
$pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=list');
@@ -68,7 +68,7 @@
echo " <th class='center'>" . _AM_XNEWSLETTER_CAT_GPERMS_CREATE . "</th>";
echo " <th class='center'>" . _AM_XNEWSLETTER_CAT_GPERMS_LIST . "</th>";
echo " <th class='center'>" . _AM_XNEWSLETTER_CAT_GPERMS_READ . "</th>";
- if (isset($xoopsModuleConfig['xn_use_mailinglist']) && $xoopsModuleConfig['xn_use_mailinglist'] == 1) {
+ if ($xnewsletter->getConfig('xn_use_mailinglist') == 1) {
echo "<th class='center'>" . _AM_XNEWSLETTER_CAT_MAILINGLIST . "</th>";
}
echo "<th class='center width5'>" . _AM_XNEWSLETTER_FORMACTION . "</th>";
@@ -133,12 +133,12 @@
$cat_gperms_read = substr($cat_gperms_read, 0, -3);
echo "<td class='center'>". $cat_gperms_read . "</td>";
- if (isset($xoopsModuleConfig['xn_use_mailinglist']) && $xoopsModuleConfig['xn_use_mailinglist'] == 1) {
+ if ($xnewsletter->getConfig('xn_use_mailinglist') == 1) {
echo "<td class='center'>" . $cat_arr[$i]->getVar("cat_mailinglist") . "</td>";
}
echo "<td class='center width5' nowrap='nowrap'>";
- echo "<a href='cat.php?op=edit_cat&cat_id=" . $i . "'><img src=".XNEWSLETTER_ICON."/xn_edit.png alt='" . _EDIT . "' title='" . _EDIT . "' /></a>";
- echo " <a href='cat.php?op=delete_cat&cat_id=" . $i . "'><img src=" . XNEWSLETTER_ICON . "/xn_delete.png alt='" . _DELETE . "' title='" . _DELETE . "' /></a>";
+ echo "<a href='cat.php?op=edit_cat&cat_id=" . $i . "'><img src=".XNEWSLETTER_ICONS_URL."/xn_edit.png alt='" . _EDIT . "' title='" . _EDIT . "' /></a>";
+ echo " <a href='cat.php?op=delete_cat&cat_id=" . $i . "'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_delete.png alt='" . _DELETE . "' title='" . _DELETE . "' /></a>";
echo "</td>";
echo "</tr>";
}
@@ -166,7 +166,7 @@
$indexAdmin->addItemButton(_AM_XNEWSLETTER_CATLIST, 'cat.php?op=list', 'list');
echo $indexAdmin->renderButton();
- $obj =& $catHandler->create();
+ $obj =& $xnewsletter->getHandler('xNewsletter_cat')->create();
$form = $obj->getForm();
$form->display();
break;
@@ -176,7 +176,7 @@
redirect_header("cat.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
}
- $obj =& $catHandler->get($cat_id);
+ $obj =& $xnewsletter->getHandler('xNewsletter_cat')->get($cat_id);
// Form cat_name
$obj->setVar("cat_name", $_POST["cat_name"] );
@@ -197,7 +197,7 @@
// Form cat_created
$obj->setVar("cat_created", time());
- if ($catHandler->insert($obj)) {
+ if ($xnewsletter->getHandler('xNewsletter_cat')->insert($obj)) {
$cat_id = $obj->getVar("cat_id");
//Form cat_gperms_admin
@@ -313,18 +313,18 @@
$indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWCAT, 'cat.php?op=new_cat', 'add');
$indexAdmin->addItemButton(_AM_XNEWSLETTER_CATLIST, 'cat.php?op=list', 'list');
echo $indexAdmin->renderButton();
- $obj = $catHandler->get($cat_id);
+ $obj = $xnewsletter->getHandler('xNewsletter_cat')->get($cat_id);
$form = $obj->getForm();
$form->display();
break;
case "delete_cat" :
- $obj =& $catHandler->get($_REQUEST["cat_id"]);
+ $obj =& $xnewsletter->getHandler('xNewsletter_cat')->get($_REQUEST["cat_id"]);
if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) {
if ( !$GLOBALS["xoopsSecurity"]->check() ) {
redirect_header("cat.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
}
- if ($catHandler->delete($obj)) {
+ if ($xnewsletter->getHandler('xNewsletter_cat')->delete($obj)) {
redirect_header("cat.php", 3, _AM_XNEWSLETTER_FORMDELOK);
} else {
echo $obj->getHtmlErrors();
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/catsubscr.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/catsubscr.php 2014-03-27 14:28:58 UTC (rev 12413)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/catsubscr.php 2014-03-28 20:12:18 UTC (rev 12414)
@@ -44,11 +44,11 @@
$criteria = new CriteriaCompo();
$criteria->setSort("cat_id ASC, cat_name");
$criteria->setOrder("ASC");
- $numrows = $catHandler->getCount();
+ $numrows = $xnewsletter->getHandler('xNewsletter_cat')->getCount();
$start = xNewsletter_CleanVars ( $_REQUEST, 'start', 0, 'int' );
$criteria->setStart($start);
$criteria->setLimit($limit);
- $cat_arr = $catHandler->getall($criteria);
+ $cat_arr = $xnewsletter->getHandler('xNewsletter_cat')->getall($criteria);
if ( $numrows > $limit ) {
include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
$pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=list');
@@ -83,11 +83,11 @@
$crit_catsubscr = new CriteriaCompo();
$crit_catsubscr->add(new Criteria("catsubscr_catid", $i));
- $numrows = $catsubscrHandler->getCount($crit_catsubscr);
+ $numrows = $xnewsletter->getHandler('xNewsletter_catsubscr')->getCount($crit_catsubscr);
echo "<td class='center'>".$numrows."</td>";
echo "<td class='center width5'>
- <a href='catsubscr.php?op=list_cat&cat_id=".$i."'><img src=".XNEWSLETTER_ICON."/xn_details.png alt='"._AM_XNEWSLETTER_DETAILS."' title='"._AM_XNEWSLETTER_DETAILS."' /></a>
+ <a href='catsubscr.php?op=list_cat&cat_id=".$i."'><img src=".XNEWSLETTER_ICONS_URL."/xn_details.png alt='"._AM_XNEWSLETTER_DETAILS."' title='"._AM_XNEWSLETTER_DETAILS."' /></a>
</td>";
echo "</tr>";
}
@@ -115,16 +115,16 @@
$indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWCATSUBSCR, 'catsubscr.php?op=new_catsubscr', 'add');
echo $indexAdmin->renderButton();
- $limit = $xoopsModuleConfig['adminperpage'];
+ $limit = $xnewsletter->getConfig('adminperpage');
$crit_catsubscr = new CriteriaCompo();
$crit_catsubscr->add(new Criteria("catsubscr_catid", $cat_id));
$crit_catsubscr->setSort("catsubscr_id ASC, catsubscr_catid");
$crit_catsubscr->setOrder("ASC");
- $numrows = $catsubscrHandler->getCount($crit_catsubscr);
+ $numrows = $xnewsletter->getHandler('xNewsletter_catsubscr')->getCount($crit_catsubscr);
$start = xNewsletter_CleanVars ( $_REQUEST, 'start', 0, 'int' );
$crit_catsubscr->setStart($start);
$crit_catsubscr->setLimit($limit);
- $catsubscr_arr = $catsubscrHandler->getall($crit_catsubscr);
+ $catsubscr_arr = $xnewsletter->getHandler('xNewsletter_catsubscr')->getall($crit_catsubscr);
if ( $numrows > $limit ) {
include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
$pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=list_cat&cat_id='.$cat_id);
@@ -155,11 +155,11 @@
$class = ($class == "even") ? "odd" : "even";
echo "<td class='center'>".$i."</td>";
- $cat =& $catHandler->get($cat_id);
+ $cat =& $xnewsletter->getHandler('xNewsletter_cat')->get($cat_id);
$cat_name = $cat->getVar("cat_name");
echo "<td class='center'>".$cat_name."</td>";
$subscr_id = $catsubscr_arr[$i]->getVar("catsubscr_subscrid");
- $subscr =& $subscrHandler->get($subscr_id);
+ $subscr =& $xnewsletter->getHandler('xNewsletter_subscr')->get($subscr_id);
$subscr_email = ($subscr) ? $subscr->getVar("subscr_email") : "";
echo "<td class='center'>".$subscr_email."</td>";
if ($catsubscr_arr[$i]->getVar("catsubscr_quited") > 0) {
@@ -172,8 +172,8 @@
echo "<td class='center'>".formatTimeStamp($catsubscr_arr[$i]->getVar("catsubscr_created"),"S")."</td>";
echo "<td class='center width5' nowrap='nowrap'>
- <a href='catsubscr.php?op=edit_catsubscr&catsubscr_id=".$i."&cat_id=".$cat_id."'><img src=".XNEWSLETTER_ICON."/xn_edit.png alt='"._EDIT."' title='"._EDIT."' /></a>
- <a href='catsubscr.php?op=delete_catsubscr&catsubscr_id=".$i."&cat_id=".$cat_id."&cat_name=".$cat_name."&subscr_email=".$subscr_email."&subscr_id=".$subscr_id."'><img src=".XNEWSLETTER_ICON."/xn_delete.png alt='"._DELETE."' title='"._DELETE."'></a>
+ <a href='catsubscr.php?op=edit_catsubscr&catsubscr_id=".$i."&cat_id=".$cat_id."'><img src=".XNEWSLETTER_ICONS_URL."/xn_edit.png alt='"._EDIT."' title='"._EDIT."' /></a>
+ <a href='catsubscr.php?op=delete_catsubscr&catsubscr_id=".$i."&cat_id=".$cat_id."&cat_name=".$cat_name."&subscr_email=".$subscr_email."&subscr_id=".$subscr_id."'><img src=".XNEWSLETTER_ICONS_URL."/xn_delete.png alt='"._DELETE."' title='"._DELETE."'></a>
</td>";
echo "</tr>";
}
@@ -199,7 +199,7 @@
$indexAdmin->addItemButton(_AM_XNEWSLETTER_CATSUBSCRLIST, 'catsubscr.php?op=list', 'list');
echo $indexAdmin->renderButton();
- $obj =& $catsubscrHandler->create();
+ $obj =& $xnewsletter->getHandler('xNewsletter_catsubscr')->create();
$form = $obj->getForm();
$form->display();
break;
@@ -209,9 +209,9 @@
redirect_header("catsubscr.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
}
if (isset($_REQUEST["catsubscr_id"])) {
- $obj =& $catsubscrHandler->get($_REQUEST["catsubscr_id"]);
+ $obj =& $xnewsletter->getHandler('xNewsletter_catsubscr')->get($_REQUEST["catsubscr_id"]);
} else {
- $obj =& $catsubscrHandler->create();
+ $obj =& $xnewsletter->getHandler('xNewsletter_catsubscr')->create();
}
//Form catsubscr_catid
@@ -231,9 +231,9 @@
//Form catsubscr_created
$obj->setVar("catsubscr_created", $_REQUEST["catsubscr_created"]);
- if ($catsubscrHandler->insert($obj)) {
+ if ($xnewsletter->getHandler('xNewsletter_catsubscr')->insert($obj)) {
//add subscriber to mailinglist
- $obj_cat = $catHandler->get($_REQUEST["catsubscr_catid"]);
+ $obj_cat = $xnewsletter->getHandler('xNewsletter_cat')->get($_REQUEST["catsubscr_catid"]);
if ($obj_cat->getVar("cat_mailinglist") > 0) {
require_once( XOOPS_ROOT_PATH."/modules/xNewsletter/include/mailinglist.php" );
subscribingMLHandler(1, $catsubscr_subscrid, $obj_cat->getVar("cat_mailinglist"));
@@ -254,21 +254,21 @@
$indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWCATSUBSCR, 'catsubscr.php?op=new_catsubscr', 'add');
echo $indexAdmin->renderButton();
- $obj = $catsubscrHandler->get($_REQUEST["catsubscr_id"]);
+ $obj = $xnewsletter->getHandler('xNewsletter_catsubscr')->get($_REQUEST["catsubscr_id"]);
$form = $obj->getForm();
$form->display();
break;
case "delete_catsubscr":
- $obj =& $catsubscrHandler->get($_REQUEST["catsubscr_id"]);
+ $obj =& $xnewsletter->getHandler('xNewsletter_catsubscr')->get($_REQUEST["catsubscr_id"]);
if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) {
if ( !$GLOBALS["xoopsSecurity"]->check() ) {
redirect_header("catsubscr.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
}
- if ($catsubscrHandler->delete($obj)) {
+ if ($xnewsletter->getHandler('xNewsletter_catsubscr')->delete($obj)) {
//remove subscriber from mailinglist
$subscr_id = $_REQUEST["subscr_id"];
- $obj_cat =& $catHandler->get($_REQUEST["cat_id"]);
+ $obj_cat =& $xnewsletter->getHandler('xNewsletter_cat')->get($_REQUEST["cat_id"]);
if ($obj_cat->getVar("cat_mailinglist") > 0) {
require_once( XOOPS_ROOT_PATH."/modules/xNewsletter/include/mailinglist.php" );
subscribingMLHandler(0, $subscr_id, $obj_cat->getVar("cat_mailinglist"));
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/import.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/import.php 2014-03-27 14:28:58 UTC (rev 12413)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/import.php 2014-03-28 20:12:18 UTC (rev 12414)
@@ -54,15 +54,14 @@
$indexAdmin->addItemButton(_AM_XNEWSLETTER_IMPORT_PLUGINS_AVAIL, 'import.php?op=default', 'list');
echo $indexAdmin->renderButton();
- $importHandler =& xoops_getModuleHandler("xNewsletter_import", "xNewsletter");
$crit_import = new CriteriaCompo();
$crit_import->setSort("import_id");
$crit_import->setOrder("ASC");
- $numrows = $importHandler->getCount($crit_import);
+ $numrows = $xnewsletter->getHandler('xNewsletter_import')->getCount($crit_import);
$crit_import->setStart($start);
$crit_import->setLimit($limitcheck);
- $import_arr = $importHandler->getall($crit_import);
+ $import_arr = $xnewsletter->getHandler('xNewsletter_import')->getall($crit_import);
if ($numrows > 0) {
include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
@@ -101,11 +100,10 @@
$counter = 0;
//get data for dropdown with cats
- $catHandler =& xoops_getModuleHandler("xNewsletter_cat", "xNewsletter");
$criteria = new CriteriaCompo();
$criteria->setSort('cat_id ASC, cat_name');
$criteria->setOrder('ASC');
- $cat_arr=$catHandler->getall($criteria);
+ $cat_arr=$xnewsletter->getHandler('xNewsletter_cat')->getall($criteria);
foreach (array_keys($import_arr) as $i) {
$counter++;
@@ -149,12 +147,12 @@
$form .= "<td align=\"center\">";
$subscr_id = $import_arr[$i]->getVar("import_subscr_id");
$form .= "<input type='hidden' name='subscr_id_".$counter."' title='subscr_id' id='subscr_id_".$counter."' value='".$subscr_id."' />";
- if ($subscr_id > 0) $form .= "<img src='".XNEWSLETTER_ICON."/xn_ok.png' alt='"._AM_XNEWSLETTER_IMPORT_EMAIL_EXIST."' title='"._AM_XNEWSLETTER_IMPORT_EMAIL_EXIST."' />";
+ if ($subscr_id > 0) $form .= "<img src='".XNEWSLETTER_ICONS_URL."/xn_ok.png' alt='"._AM_XNEWSLETTER_IMPORT_EMAIL_EXIST."' title='"._AM_XNEWSLETTER_IMPORT_EMAIL_EXIST."' />";
$form .= "</td>";
$form .= "<td align=\"center\">";
$catsubscr_id = $import_arr[$i]->getVar("import_catsubscr_id");
$form .= "<input type='hidden' name='catsubscr_id_".$counter."' title='catsubscr_id' id='catsubscr_id_".$counter."' value='".$catsubscr_id."' />";
- if ($catsubscr_id > 0) $form .= "<img src='".XNEWSLETTER_ICON."/xn_ok.png' alt='"._AM_XNEWSLETTER_IMPORT_CATSUBSCR_EXIST."' title='"._AM_XNEWSLETTER_IMPORT_CATSUBSCR_EXIST."' />";
+ if ($catsubscr_id > 0) $form .= "<img src='".XNEWSLETTER_ICONS_URL."/xn_ok.png' alt='"._AM_XNEWSLETTER_IMPORT_CATSUBSCR_EXIST."' title='"._AM_XNEWSLETTER_IMPORT_CATSUBSCR_EXIST."' />";
$form .= "</td>";
$form .= "</td>";
$form .= "<td align=\"center\">";
@@ -229,8 +227,8 @@
$crit_import = new CriteriaCompo();
$crit_import->add(new Criteria('import_status', "1"));
- $numrows_total = $importHandler->getCount();
- $numrows_act = $importHandler->getCount($crit_import);
+ $numrows_total = $xnewsletter->getHandler('xNewsletter_import')->getCount();
+ $numrows_act = $xnewsletter->getHandler('xNewsletter_import')->getCount($crit_import);
if ( $numrows_act > 0 ) {
$sql = "SELECT * FROM ".$xoopsDB->prefix("mod_xnewsletter_import")." WHERE ((import_status)=1)";
$sql .= " ORDER BY `import_id` ASC";
@@ -313,13 +311,13 @@
}
echo "<div style='margin-top:20px;margin-bottom:20px;color:#ff0000;font-weight:bold;font-size:14px'>";
- $img_ok = "<img src='".XNEWSLETTER_ICON."/xn_ok.png' alt='"._AM_XNEWSLETTER_OK."' title='"._AM_XNEWSLETTER_OK."' /> ";
+ $img_ok = "<img src='".XNEWSLETTER_ICONS_URL."/xn_ok.png' alt='"._AM_XNEWSLETTER_OK."' title='"._AM_XNEWSLETTER_OK."' /> ";
$resulttext = str_replace("%p", $numrows_act ,_AM_XNEWSLETTER_IMPORT_FINISHED);
$resulttext = str_replace("%t", $numrows_total ,$resulttext);
echo $img_ok.$resulttext;
echo "</div>";
- $numrows_pend = $importHandler->getCount();
+ $numrows_pend = $xnewsletter->getHandler('xNewsletter_import')->getCount();
if ($numrows_pend > 0) {
$form_continue = "<form id='form_continue' enctype='multipart/form-data' method='post' action='import.php' name='form_continue'>";
$form_continue .= "<input id='submit' class='formButton' type='submit' title='"._AM_XNEWSLETTER_IMPORT_CONTINUE."' value='"._AM_XNEWSLETTER_IMPORT_CONTINUE."' name='submit'>";
@@ -423,7 +421,7 @@
case "default":
default:
//show basic search form
- $objImport =& $importHandler->create();
+ $objImport = $xnewsletter->getHandler('xNewsletter_import')->create();
$form = $objImport->getSearchForm($plugin, $action_after_read, $limitcheck);
$form->display();
break;
@@ -433,9 +431,8 @@
function create_prot ( $prot_text, $success, $submitter) {
global $xoopsDB;
- $sql = "INSERT INTO `".$xoopsDB->prefix('mod_xnewsletter_protocol')."` (`protocol_letter_id`, `protocol_subscriber_id`, `protocol_status`, `protocol_success`, `protocol_submitter`, `protocol_created`) VALUES (0,0,'".$prot_text."',".$success.", ".$submitter.",".time().")";
+ $sql = "INSERT INTO `{$xoopsDB->prefix('mod_xnewsletter_protocol')}` (`protocol_letter_id`, `protocol_subscriber_id`, `protocol_status`, `protocol_success`, `protocol_submitter`, `protocol_created`)";
+ $sql.= " VALUES (0,0,'{$prot_text}', {$success}, {$submitter}, " . time() . ")";
$xoopsDB->queryF($sql) or die ("MySQL-Error: " . mysql_error());
}
-
-?>
\ No newline at end of file
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/index.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/index.php 2014-03-27 14:28:58 UTC (rev 12413)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/index.php 2014-03-28 20:12:18 UTC (rev 12414)
@@ -30,22 +30,22 @@
xoops_cp_header();
//global $indexAdmin;
-global $xoopsModuleConfig;
//count "total"
-$count_accounts = $accountsHandler->getCount();
-$count_cat = $catHandler->getCount();
-$count_subscr = $subscrHandler->getCount();
-$count_catsubscr = $catsubscrHandler->getCount();
-$count_letter = $letterHandler->getCount();
-$count_protocol = $protocolHandler->getCount();
-$count_attachment = $attachmentHandler->getCount();
-if (isset($xoopsModuleConfig['xn_use_mailinglist']) && $xoopsModuleConfig['xn_use_mailinglist'] == 1) {
- $count_mailinglist = $mailinglistHandler->getCount();
+$count_cat = $xnewsletter->getHandler('xNewsletter_cat')->getCount();
+$count_accounts = $xnewsletter->getHandler('xNewsletter_accounts')->getCount();
+
+$count_subscr = $xnewsletter->getHandler('xNewsletter_subscr')->getCount();
+$count_catsubscr = $xnewsletter->getHandler('xNewsletter_catsubscr')->getCount();
+$count_letter = $xnewsletter->getHandler('xNewsletter_letter')->getCount();
+$count_protocol = $xnewsletter->getHandler('xNewsletter_protocol')->getCount();
+$count_attachment = $xnewsletter->getHandler('xNewsletter_attachment')->getCount();
+if ($xnewsletter->getConfig('xn_use_mailinglist') == 1) {
+ $count_mailinglist = $xnewsletter->getHandler('xNewsletter_mailinglist')->getCount();
}
-$count_bmh = $bmhHandler->getCount();
-if (isset($xoopsModuleConfig['xn_send_in_packages']) && $xoopsModuleConfig['xn_send_in_packages'] > 0) {
- $count_task = $taskHandler->getCount();
+$count_bmh = $xnewsletter->getHandler('xNewsletter_bmh')->getCount();
+if ($xnewsletter->getConfig('xn_send_in_packages') > 0) {
+ $count_task = $xnewsletter->getHandler('xNewsletter_task')->getCount();
}
@@ -62,11 +62,11 @@
$indexAdmin->addInfoBoxLine(_AM_XNEWSLETTER_LETTER,_AM_XNEWSLETTER_THEREARE_ATTACHMENT, $count_attachment, ($count_attachment == 0) ? $r : $g);
$indexAdmin->addInfoBoxLine(_AM_XNEWSLETTER_LETTER,_AM_XNEWSLETTER_THEREARE_PROTOCOL, $count_protocol, ($count_protocol == 0) ? $r : $g);
-if (isset($xoopsModuleConfig['xn_use_mailinglist']) && $xoopsModuleConfig['xn_use_mailinglist'] == 1) {
+if ($xnewsletter->getConfig('xn_use_mailinglist') == 1) {
$indexAdmin->addInfoBoxLine(_AM_XNEWSLETTER_LETTER,_AM_XNEWSLETTER_THEREARE_MAILINGLIST, $count_mailinglist, ($count_mailinglist == 0) ? $r : $g);
}
-if (isset($xoopsModuleConfig['xn_send_in_packages']) && $xoopsModuleConfig['xn_send_in_packages'] > 0) {
+if ($xnewsletter->getConfig('xn_send_in_packages') > 0) {
$indexAdmin->addInfoBoxLine(_AM_XNEWSLETTER_LETTER,_AM_XNEWSLETTER_THEREARE_TASK, $count_task, ($count_task == 0) ? $r : $g);
}
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/letter.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/letter.php 2014-03-27 14:28:58 UTC (rev 12413)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/letter.php 2014-03-28 20:12:18 UTC (rev 12414)
@@ -65,16 +65,15 @@
case "delete_attachment":
$attachment_id = xNewsletter_CleanVars($_REQUEST, 'attachment_'.$id_del, 'none', 'string');
if ($attachment_id == 'none') redirect_header("letter.php", 3, _AM_XNEWSLETTER_LETTER_ERROR_INVALID_ATT_ID);
- $attachmentHandler =& xoops_getModuleHandler("xNewsletter_attachment", "xNewsletter");
- $obj_attachment = $attachmentHandler->get($attachment_id);
+ $obj_attachment = $xnewsletter->getHandler('xNewsletter_attachment')->get($attachment_id);
$attachment_name = $obj_attachment->getVar("attachment_name");
- if ($attachmentHandler->delete($obj_attachment, true)) {
+ if ($xnewsletter->getHandler('xNewsletter_attachment')->delete($obj_attachment, true)) {
//delete file
- $uploaddir = XOOPS_UPLOAD_PATH.$xoopsModuleConfig['xn_attachment_path'].$letter_id."/";
- unlink($uploaddir.$attachment_name);
+ $uploaddir = XOOPS_UPLOAD_PATH . $xnewsletter->getConfig('xn_attachment_path') . $letter_id . "/";
+ unlink($uploaddir . $attachment_name);
- $obj_letter =& $letterHandler->get($letter_id);
+ $obj_letter =& $xnewsletter->getHandler('xNewsletter_letter')->get($letter_id);
$obj_letter->setVar("letter_title", $_REQUEST["letter_title"]);
$obj_letter->setVar("letter_content", $_REQUEST["letter_content"]);
$obj_letter->setVar("letter_template", $_REQUEST["letter_template"]);
@@ -101,7 +100,7 @@
$tpl = new XoopsTpl();
- $obj_letter =& $letterHandler->get($letter_id);
+ $obj_letter =& $xnewsletter->getHandler('xNewsletter_letter')->get($letter_id);
$template = $template_path . $obj_letter->getVar("letter_template") . ".html";
$tpl->assign('sex', _AM_XNEWSLETTER_SUBSCR_SEX_MALE);
$tpl->assign('firstname', _AM_XNEWSLETTER_SUBSCR_FIRSTNAME);
@@ -128,11 +127,11 @@
$criteria = new CriteriaCompo();
$criteria->setSort("letter_id");
$criteria->setOrder("DESC");
- $numrows = $letterHandler->getCount();
+ $numrows = $xnewsletter->getHandler('xNewsletter_letter')->getCount();
$start = xNewsletter_CleanVars ( $_REQUEST, 'start', 0, 'int' );
$criteria->setStart($start);
$criteria->setLimit($limit);
- $letter_arr = $letterHandler->getall($criteria);
+ $letter_arr = $xnewsletter->getHandler('xNewsletter_letter')->getall($criteria);
if ( $numrows > $limit ) {
include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
$pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=list');
@@ -174,7 +173,7 @@
$cat_arr = explode("|" , $letter_arr[$i]->getVar("letter_cats"));
foreach($cat_arr as $cat) {
$j++;
- $cat_obj = $catHandler->get($cat);
+ $cat_obj = $xnewsletter->getHandler('xNewsletter_cat')->get($cat);
if (count($cat_arr)>1) $letter_cats .= "($j) ";
if (is_object($cat_obj)) {
$letter_cats .= $cat_obj->getVar("cat_name") . "<br/>";
@@ -187,13 +186,13 @@
$crit_att = new CriteriaCompo();
$crit_att->add(new Criteria('attachment_letter_id', $letter_arr[$i]->getVar("letter_id")));
- $num_attachments = $attachmentHandler->getCount($crit_att);
+ $num_attachments = $xnewsletter->getHandler('xNewsletter_attachment')->getCount($crit_att);
echo "<td class='center'>".$num_attachments."</td>";
$crit_accounts = new CriteriaCompo();
$crit_accounts->setSort("accounts_id");
$crit_accounts->setOrder("ASC");
- $obj_account = $accountsHandler->get($letter_arr[$i]->getVar("letter_account"));
+ $obj_account = $xnewsletter->getHandler('xNewsletter_accounts')->get($letter_arr[$i]->getVar("letter_account"));
$letter_account = ( $obj_account ) ? $obj_account->getVar("accounts_name") : _NONE;
echo "<td class='center'>".$letter_account."</td>";
@@ -208,7 +207,7 @@
$criteria->setSort("protocol_id");
$criteria->setOrder("DESC");
$criteria->setLimit(1);
- $protocol_arr = $protocolHandler->getall($criteria);
+ $protocol_arr = $xnewsletter->getHandler('xNewsletter_protocol')->getall($criteria);
$protocol_status = "";
$protocol_letter_id = 0;
foreach($protocol_arr as $protocol) {
@@ -224,25 +223,25 @@
echo "<td class='center width10'>";
echo " <a href='letter.php?op=edit_letter&letter_id=".$i."'>
- <img src=".XNEWSLETTER_ICON."/xn_edit.png alt='"._EDIT."' title='"._EDIT."' style='padding:1px' />
+ <img src=".XNEWSLETTER_ICONS_URL."/xn_edit.png alt='"._EDIT."' title='"._EDIT."' style='padding:1px' />
</a>";
echo " <a href='letter.php?op=clone_letter&letter_id=".$i."'>
- <img src=".XNEWSLETTER_ICON."/xn_clone.png alt='"._CLONE."' title='"._CLONE."' style='padding:1px' />
+ <img src=".XNEWSLETTER_ICONS_URL."/xn_clone.png alt='"._CLONE."' title='"._CLONE."' style='padding:1px' />
</a>";
echo " <a href='letter.php?op=delete_letter&letter_id=".$i."'>
- <img src=".XNEWSLETTER_ICON."/xn_delete.png alt='"._DELETE."' title='"._DELETE."' style='padding:1px' />
+ <img src=".XNEWSLETTER_ICONS_URL."/xn_delete.png alt='"._DELETE."' title='"._DELETE."' style='padding:1px' />
</a>";
echo " <a href='letter.php?op=show_preview&letter_id=".$i."'>
- <img src=".XNEWSLETTER_ICON."/xn_preview.png alt='"._AM_XNEWSLETTER_LETTER_ACTION_PREVIEW."' title='"._AM_XNEWSLETTER_LETTER_ACTION_PREVIEW."' style='padding:1px' />
+ <img src=".XNEWSLETTER_ICONS_URL."/xn_preview.png alt='"._AM_XNEWSLETTER_LETTER_ACTION_PREVIEW."' title='"._AM_XNEWSLETTER_LETTER_ACTION_PREVIEW."' style='padding:1px' />
</a>";
echo " <a href='sendletter.php?op=send_test&letter_id=".$i."'>
- <img src=".XNEWSLETTER_ICON."/xn_sendtest.png alt='"._AM_XNEWSLETTER_LETTER_ACTION_SENDTEST."' title='"._AM_XNEWSLETTER_LETTER_ACTION_SENDTEST."' style='padding:1px' />
+ <img src=".XNEWSLETTER_ICONS_URL."/xn_sendtest...
[truncated message content] |
|
From: <txm...@us...> - 2014-03-27 14:29:02
|
Revision: 12413
http://sourceforge.net/p/xoops/svn/12413
Author: txmodxoops
Date: 2014-03-27 14:28:58 +0000 (Thu, 27 Mar 2014)
Log Message:
-----------
Updated
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/structure.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_building.html
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php
Removed Paths:
-------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/create_file.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php 2014-03-27 10:15:29 UTC (rev 12412)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php 2014-03-27 14:28:58 UTC (rev 12413)
@@ -41,8 +41,12 @@
$handler = TDMCreateArchitecture::getInstance();
$handler->getPath( TDMC_PATH );
$handler->getUploadPath( TDMC_UPLOAD_PATH );
- $handler->getArchitectureFiles( $modules );
-
+ $base_architecture = $handler->getArchitectureFiles( $modules );
+ /*if($base_architecture !== false) { */
+ $GLOBALS['xoopsTpl']->assign('base_architecture', $base_architecture);
+ /*} else {
+ $GLOBALS['xoopsTpl']->assign('base_architecture', false);
+ }*/
// Creation of the structure of folders and files
$GLOBALS['xoopsTpl']->assign('build_list', 'Under new construction - Temporary build');
break;
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-03-27 10:15:29 UTC (rev 12412)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-03-27 14:28:58 UTC (rev 12413)
@@ -18,9 +18,7 @@
* @author Txmod Xoops http://www.txmodxoops.org
* @version $Id: architecture.php 12258 2014-01-02 09:33:29Z timgno $
*/
-if (!defined('XOOPS_ROOT_PATH')) {
- die('XOOPS root path not defined');
-}
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
require_once 'structure.php';
class TDMCreateArchitecture
{
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php 2014-03-27 10:15:29 UTC (rev 12412)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php 2014-03-27 14:28:58 UTC (rev 12413)
@@ -1,266 +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.
- */
-/**
- * tdmcreate module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
- * @package tdmcreate
- * @since 2.5.0
- * @author Txmod Xoops http://www.txmodxoops.org
- * @version $Id: class_files.php 12258 2014-01-02 09:33:29Z timgno $
- */
-if (!defined('XOOPS_ROOT_PATH')) {
- die('XOOPS root path not defined');
-}
-
-class ClassFiles extends CreateFile
-{
- /*
- * @var null
- */
- public $table = null;
- /*
- * @public function constructor
- * @param string $module
- * @param string $table
- * @param string $file_name
- */
- public function __construct($module, $table, $file_name) {
- $this->module = $module;
- $this->table = $table;
- $this->file_name = $file_name;
- }
- /*
- * @public function getInitVar
- * @param array $type
- * @param string $obj
- */
- public function getInitVar(array $type, $obj = 'INT') {
- $ret = <<<EOT
- \$this->initVar('{$type}', XOBJ_DTYPE_{$obj});
-EOT;
- return $ret;
- }
- /*
- * @public function getInitVars
- * @param array $type
- * @param array $fields
- */
- public function getInitVars($table_fields) {
- $ret = '';
- // Counts the number of fields
- $fields = explode('|', $table_fields);
- $nb_fields = count($fields);
- // Creation of the initVar functions list
- for ($i = 0; $i < $nb_fields; $i++) {
- $type = explode(':', $fields[$i]);
- switch($type[1]) {
- case 'int':
- case 'tinyint':
- case 'mediumint':
- case 'smallint':
- $ret .= $this->getInitVar($type[0], 'INT');
- break;
- case 'char':
- case 'varchar':
- $ret .= $this->getInitVar($type[0], 'TXTBOX');
- break;
- case 'text':
- case 'tinytext':
- case 'mediumtext':
- case 'longtext':
- $ret .= $this->getInitVar($type[0], 'TXTAREA');
- break;
- case 'float':
- $ret .= $this->getInitVar($type[0], 'FLOAT');
- break;
- case 'decimal':
- case 'double':
- $ret .= $this->getInitVar($type[0], 'DECIMAL');
- break;
- case 'enum':
- $ret .= $this->getInitVar($type[0], 'ENUM');
- break;
- case 'email':
- $ret .= $this->getInitVar($type[0], 'EMAIL');
- break;
- case 'url':
- $ret .= $this->getInitVar($type[0], 'URL');
- break;
- case 'date':
- case 'datetime':
- case 'timestamp':
- case 'time':
- case 'year':
- $ret .= $this->getInitVar($type[0], 'LTIME');
- break;
- }
- }
- return $ret;
- }
- /*
- * @public function getHeadClass
- * @param mixed $constructor
- */
- public function getHeadClass($mod_name, $initvar_functions) {
- $ucf_mod_name = ucfirst($mod_name);
- $ucf_table_name = ucfirst($this->table->getVar('table_name'));
- $ret = <<<EOT
-\ndefined('XOOPS_ROOT_PATH') or die("Restricted access");
-/*
- * Class Object {$ucf_mod_name}{$ucf_table_name}
- */
-class {$ucf_mod_name}{$ucf_table_name} extends XoopsObject
-{
- /*
- * Constructor
- *
- * @param null
- */
- function __construct()
- {
- \$this->XoopsObject();
- {$initvar_functions}
-\n\t}
-EOT;
- return $ret;
- }
-
- /*
- * @public function getHeadFunctionForm
- * @param string $form
- */
- public function getHeadFunctionForm($elements_form) {
- $lang_add = $this->getLanguage('_AM_', '_ADD');
- $lang_edit = $this->getLanguage('_AM_', '_EDIT');
- $ret = <<<EOT
- /*
- * Get form
- *
- * @param mixed \$action
- */
- function getForm(\$action = false)
- {
- if (\$action === false) {
- \$action = \$_SERVER['REQUEST_URI'];
- }
-
- \$title = \$this->isNew() ? sprintf({$lang_add}) : sprintf({$lang_edit});
-
- include_once(XOOPS_ROOT_PATH.'/class/xoopsformloader.php');
-
- \$form = new XoopsThemeForm(\$title, 'form', \$action, 'post', true);
- \$form->setExtra('enctype="multipart/form-data"');\n
- {$elements_form}
-EOT;
- return $ret;
- }
- /*
- * @public function getPermissionsInFunctionForm
- * @param string $fpif
- */
- public function getPermissionsInFunctionForm($mod_name, $fpif) {
- $perm_approve = $this->getLanguage('_AM_', '_PERMISSIONS_APPROVE');
- $perm_submit = $this->getLanguage('_AM_', '_PERMISSIONS_SUBMIT');
- $perm_view = $this->getLanguage('_AM_', '_PERMISSIONS_VIEW');
- $ret = <<<EOT
- \n//permissions
- \$member_handler = & xoops_gethandler ( 'member' );
- \$group_list = &\$member_handler->getGroupList();
- \$gperm_handler = &xoops_gethandler ( 'groupperm' );
- \$full_list = array_keys ( \$group_list );
- global \$xoopsModule;
- if ( !\$this->isNew() ) {
- \$groups_ids_approve = \$gperm_handler->getGroupIds ( '{$mod_name}_approve', \$this->getVar ( '{$fpif}' ), \$xoopsModule->getVar ( 'mid' ) );
- \$groups_ids_submit = \$gperm_handler->getGroupIds ( '{$mod_name}_submit', \$this->getVar ( '{$fpif}' ), \$xoopsModule->getVar ( 'mid' ) );
- \$groups_ids_view = \$gperm_handler->getGroupIds ( '{$mod_name}_view', \$this->getVar ( '{$fpif}' ), \$xoopsModule->getVar ( 'mid' ) );
- \$groups_ids_approve = array_values ( \$groups_ids_approve );
- \$groups_can_approve_checkbox = new XoopsFormCheckBox ( {$perm_approve}, 'groups_approve[]', \$groups_ids_approve );
- \$groups_ids_submit = array_values ( \$groups_ids_submit );
- \$groups_can_submit_checkbox = new XoopsFormCheckBox ( {$perm_submit}, 'groups_submit[]', \$groups_ids_submit );
- \$groups_ids_view = array_values ( \$groups_ids_view );
- \$groups_can_view_checkbox = new XoopsFormCheckBox ( {$perm_view}, 'groups_view[]', \$groups_ids_view );
- } else {
- \$groups_can_approve_checkbox = new XoopsFormCheckBox ( {$perm_approve}, 'groups_approve[]', \$full_list );
- \$groups_can_submit_checkbox = new XoopsFormCheckBox ( {$perm_submit}, 'groups_submit[]', \$full_list );
- \$groups_can_view_checkbox = new XoopsFormCheckBox ( {$perm_view}, 'groups_view[]', \$full_list );
- }
-
- // For approve
- \$groups_can_approve_checkbox->addOptionArray ( \$group_list );
- \$form->addElement ( \$groups_can_approve_checkbox );
- // For submit
- \$groups_can_submit_checkbox->addOptionArray ( \$group_list );
- \$form->addElement ( \$groups_can_submit_checkbox );
- // For view
- \$groups_can_view_checkbox->addOptionArray ( \$group_list );
- \$form->addElement ( \$groups_can_view_checkbox );
-EOT;
- return $ret;
- }
- /*
- * @public function getFootFunctionForm
- * @param null
- */
- public function getFootFunctionForm() {
- $ret = <<<EOT
- \n\$form->addElement(new XoopsFormHidden('op', 'save'));
- \$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
- return \$form;
- }
-}\n\n
-EOT;
- return $ret;
- }
- /*
- * @public function getClassHandler
- * @param string $fpif
- * @param string $fpmf
- */
- public function getClassHandler($mod_name, $fpif, $fpmf) {
- $table_name = $this->table->getVar('table_name');
- $ucf_mod_table_handler = ucfirst($mod_name).ucfirst($table_name);
- $ret = <<<EOT
-/*
- * Class Object Handler {$ucf_mod_name}{$ucf_table_name}
- */
-class {$ucf_mod_table_handler}Handler extends XoopsPersistableObjectHandler
-{
- /*
- * Constructor
- *
- * @param string \$db
- */
- function __construct(&\$db)
- {
- parent::__construct(\$db, 'mod_{$mod_name}_{$table_name}', '{$mod_name}{$table_name}', '{$fpif}', '{$fpmf}');
- }
-}
-EOT;
- return $ret;
- }
- /*
- * @public function render
- * @param null
- */
- public function render() {
- $module_name = $this->getModuleName();
- $table_fields = $this->table->getVar('table_fields');
- $initvar = $this->getInitVars($table_fields);
- $ret = $this->getHeadClass($module_name, $initvar);
- $ret .= $this->getHeadFunctionForm($form);
- $ret .= $this->getPermissionsInFunctionForm($module_name, $fpif);
- $ret .= $this->getFootFunctionForm();
- $ret .= $this->getClassHandler($module_name, $fpif, $fpmf);
- return $ret;
- }
-}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php 2014-03-27 14:28:58 UTC (rev 12413)
@@ -0,0 +1,266 @@
+<?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.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: class_files.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+if (!defined('XOOPS_ROOT_PATH')) {
+ die('XOOPS root path not defined');
+}
+
+class ClassFiles extends CreateFile
+{
+ /*
+ * @var null
+ */
+ public $table = null;
+ /*
+ * @public function constructor
+ * @param string $module
+ * @param string $table
+ * @param string $file_name
+ */
+ public function __construct($module, $table, $file_name) {
+ $this->module = $module;
+ $this->table = $table;
+ $this->file_name = $file_name;
+ }
+ /*
+ * @public function getInitVar
+ * @param array $type
+ * @param string $obj
+ */
+ public function getInitVar(array $type, $obj = 'INT') {
+ $ret = <<<EOT
+ \$this->initVar('{$type}', XOBJ_DTYPE_{$obj});
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getInitVars
+ * @param array $type
+ * @param array $fields
+ */
+ public function getInitVars($table_fields) {
+ $ret = '';
+ // Counts the number of fields
+ $fields = explode('|', $table_fields);
+ $nb_fields = count($fields);
+ // Creation of the initVar functions list
+ for ($i = 0; $i < $nb_fields; $i++) {
+ $type = explode(':', $fields[$i]);
+ switch($type[1]) {
+ case 'int':
+ case 'tinyint':
+ case 'mediumint':
+ case 'smallint':
+ $ret .= $this->getInitVar($type[0], 'INT');
+ break;
+ case 'char':
+ case 'varchar':
+ $ret .= $this->getInitVar($type[0], 'TXTBOX');
+ break;
+ case 'text':
+ case 'tinytext':
+ case 'mediumtext':
+ case 'longtext':
+ $ret .= $this->getInitVar($type[0], 'TXTAREA');
+ break;
+ case 'float':
+ $ret .= $this->getInitVar($type[0], 'FLOAT');
+ break;
+ case 'decimal':
+ case 'double':
+ $ret .= $this->getInitVar($type[0], 'DECIMAL');
+ break;
+ case 'enum':
+ $ret .= $this->getInitVar($type[0], 'ENUM');
+ break;
+ case 'email':
+ $ret .= $this->getInitVar($type[0], 'EMAIL');
+ break;
+ case 'url':
+ $ret .= $this->getInitVar($type[0], 'URL');
+ break;
+ case 'date':
+ case 'datetime':
+ case 'timestamp':
+ case 'time':
+ case 'year':
+ $ret .= $this->getInitVar($type[0], 'LTIME');
+ break;
+ }
+ }
+ return $ret;
+ }
+ /*
+ * @public function getHeadClass
+ * @param mixed $constructor
+ */
+ public function getHeadClass($mod_name, $initvar_functions) {
+ $ucf_mod_name = ucfirst($mod_name);
+ $ucf_table_name = ucfirst($this->table->getVar('table_name'));
+ $ret = <<<EOT
+\ndefined('XOOPS_ROOT_PATH') or die("Restricted access");
+/*
+ * Class Object {$ucf_mod_name}{$ucf_table_name}
+ */
+class {$ucf_mod_name}{$ucf_table_name} extends XoopsObject
+{
+ /*
+ * Constructor
+ *
+ * @param null
+ */
+ function __construct()
+ {
+ \$this->XoopsObject();
+ {$initvar_functions}
+\n\t}
+EOT;
+ return $ret;
+ }
+
+ /*
+ * @public function getHeadFunctionForm
+ * @param string $form
+ */
+ public function getHeadFunctionForm($elements_form) {
+ $lang_add = $this->getLanguage('_AM_', '_ADD');
+ $lang_edit = $this->getLanguage('_AM_', '_EDIT');
+ $ret = <<<EOT
+ /*
+ * Get form
+ *
+ * @param mixed \$action
+ */
+ function getForm(\$action = false)
+ {
+ if (\$action === false) {
+ \$action = \$_SERVER['REQUEST_URI'];
+ }
+
+ \$title = \$this->isNew() ? sprintf({$lang_add}) : sprintf({$lang_edit});
+
+ include_once(XOOPS_ROOT_PATH.'/class/xoopsformloader.php');
+
+ \$form = new XoopsThemeForm(\$title, 'form', \$action, 'post', true);
+ \$form->setExtra('enctype="multipart/form-data"');\n
+ {$elements_form}
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getPermissionsInFunctionForm
+ * @param string $fpif
+ */
+ public function getPermissionsInFunctionForm($mod_name, $fpif) {
+ $perm_approve = $this->getLanguage('_AM_', '_PERMISSIONS_APPROVE');
+ $perm_submit = $this->getLanguage('_AM_', '_PERMISSIONS_SUBMIT');
+ $perm_view = $this->getLanguage('_AM_', '_PERMISSIONS_VIEW');
+ $ret = <<<EOT
+ \n//permissions
+ \$member_handler = & xoops_gethandler ( 'member' );
+ \$group_list = &\$member_handler->getGroupList();
+ \$gperm_handler = &xoops_gethandler ( 'groupperm' );
+ \$full_list = array_keys ( \$group_list );
+ global \$xoopsModule;
+ if ( !\$this->isNew() ) {
+ \$groups_ids_approve = \$gperm_handler->getGroupIds ( '{$mod_name}_approve', \$this->getVar ( '{$fpif}' ), \$xoopsModule->getVar ( 'mid' ) );
+ \$groups_ids_submit = \$gperm_handler->getGroupIds ( '{$mod_name}_submit', \$this->getVar ( '{$fpif}' ), \$xoopsModule->getVar ( 'mid' ) );
+ \$groups_ids_view = \$gperm_handler->getGroupIds ( '{$mod_name}_view', \$this->getVar ( '{$fpif}' ), \$xoopsModule->getVar ( 'mid' ) );
+ \$groups_ids_approve = array_values ( \$groups_ids_approve );
+ \$groups_can_approve_checkbox = new XoopsFormCheckBox ( {$perm_approve}, 'groups_approve[]', \$groups_ids_approve );
+ \$groups_ids_submit = array_values ( \$groups_ids_submit );
+ \$groups_can_submit_checkbox = new XoopsFormCheckBox ( {$perm_submit}, 'groups_submit[]', \$groups_ids_submit );
+ \$groups_ids_view = array_values ( \$groups_ids_view );
+ \$groups_can_view_checkbox = new XoopsFormCheckBox ( {$perm_view}, 'groups_view[]', \$groups_ids_view );
+ } else {
+ \$groups_can_approve_checkbox = new XoopsFormCheckBox ( {$perm_approve}, 'groups_approve[]', \$full_list );
+ \$groups_can_submit_checkbox = new XoopsFormCheckBox ( {$perm_submit}, 'groups_submit[]', \$full_list );
+ \$groups_can_view_checkbox = new XoopsFormCheckBox ( {$perm_view}, 'groups_view[]', \$full_list );
+ }
+
+ // For approve
+ \$groups_can_approve_checkbox->addOptionArray ( \$group_list );
+ \$form->addElement ( \$groups_can_approve_checkbox );
+ // For submit
+ \$groups_can_submit_checkbox->addOptionArray ( \$group_list );
+ \$form->addElement ( \$groups_can_submit_checkbox );
+ // For view
+ \$groups_can_view_checkbox->addOptionArray ( \$group_list );
+ \$form->addElement ( \$groups_can_view_checkbox );
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getFootFunctionForm
+ * @param null
+ */
+ public function getFootFunctionForm() {
+ $ret = <<<EOT
+ \n\$form->addElement(new XoopsFormHidden('op', 'save'));
+ \$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
+ return \$form;
+ }
+}\n\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getClassHandler
+ * @param string $fpif
+ * @param string $fpmf
+ */
+ public function getClassHandler($mod_name, $fpif, $fpmf) {
+ $table_name = $this->table->getVar('table_name');
+ $ucf_mod_table_handler = ucfirst($mod_name).ucfirst($table_name);
+ $ret = <<<EOT
+/*
+ * Class Object Handler {$ucf_mod_name}{$ucf_table_name}
+ */
+class {$ucf_mod_table_handler}Handler extends XoopsPersistableObjectHandler
+{
+ /*
+ * Constructor
+ *
+ * @param string \$db
+ */
+ function __construct(&\$db)
+ {
+ parent::__construct(\$db, 'mod_{$mod_name}_{$table_name}', '{$mod_name}{$table_name}', '{$fpif}', '{$fpmf}');
+ }
+}
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ $module_name = $this->getModuleName();
+ $table_fields = $this->table->getVar('table_fields');
+ $initvar = $this->getInitVars($table_fields);
+ $ret = $this->getHeadClass($module_name, $initvar);
+ $ret .= $this->getHeadFunctionForm($form);
+ $ret .= $this->getPermissionsInFunctionForm($module_name, $fpif);
+ $ret .= $this->getFootFunctionForm();
+ $ret .= $this->getClassHandler($module_name, $fpif, $fpmf);
+ return $ret;
+ }
+}
\ No newline at end of file
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/create_file.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/create_file.php 2014-03-27 10:15:29 UTC (rev 12412)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/create_file.php 2014-03-27 14:28:58 UTC (rev 12413)
@@ -1,93 +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.
- */
-/**
- * tdmcreate module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
- * @package tdmcreate
- * @since 2.5.0
- * @author Txmod Xoops http://www.txmodxoops.org
- * @version $Id: create_file.php 12258 2014-01-02 09:33:29Z timgno $
- */
-if (!defined('XOOPS_ROOT_PATH')) {
- die('XOOPS root path not defined');
-}
-
-class CreateFile extends HeaderFile
-{
- /*
- * @var string
- */
- public $content = null;
- /*
- * @var string
- */
- public $file_path = null;
- /*
- * @public function constructor
- * @param string $content
- */
- public function __construct($path, $content, $lng_ok, $lng_notok, $file_name, $class = 'even', $mode = 'w+') {
- $this->path .= $path;
- $this->content = $content;
- $this->lng_ok = $lng_ok;
- $this->lng_notok = $lng_notok;
- $this->file_name = $file_name;
- $this->_class = $class;
- $this->mode = $mode;
- //$this->file_path = $this->getHeader($path, $module, $folder, $file_name);
- }
- /*
- * @static function &getInstance
- * @param null
- */
- public static function &getInstance()
- {
- static $instance = false;
- if (!$instance) {
- $instance = new self();
- }
- return $instance;
- }
- /*
- * @public function renderFile
- * @param null
- */
- public function renderFile()
- {
- $path = $this->path;
- $content = $this->content;
- $lng_ok = $this->lng_ok;
- $lng_notok = $this->lng_notok;
- $file_name = $this->file_name;
- $class = $this->_class;
- $handle = XoopsFile::getHandler();
- $handle->__construct($path, false);
- // Integration of the content of file
- if ($handle->open($this->mode) == false) {
- $GLOBALS['xoopsTpl']->assign('lng_notok', sprintf($this->lng_notok, $this->file_name));
- return false;
- }
- if ($handle->is_writable($path))
- {
- if ($handle->write($this->content) == false) {
- $GLOBALS['xoopsTpl']->assign('lng_notok', sprintf($this->lng_notok, $this->file_name));
- exit;
- }
- $GLOBALS['xoopsTpl']->assign('lng_ok', sprintf($this->lng_ok, $this->file_name));
- $handle->close();
- } else {
- $GLOBALS['xoopsTpl']->assign('lng_notok', sprintf($this->lng_notok, $this->file_name));
- }
- return $GLOBALS['xoopsTpl']->fetch("db:tdmcreate_building.html");
- }
-}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php 2014-03-27 14:28:58 UTC (rev 12413)
@@ -0,0 +1,203 @@
+<?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.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: file.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class TDMCreateFile
+{
+ /*
+ * @var string
+ */
+ private $xoopsfile = null;
+
+ /*
+ * @var string
+ */
+ private $path = null;
+
+ /*
+ * @var string
+ */
+ private $folder_name = null;
+
+ /*
+ * @var string
+ */
+ private $file_name = null;
+
+ /*
+ * @var string
+ */
+ private $content = null;
+
+ /*
+ * @var mixed
+ */
+ private $created = false;
+
+ /*
+ * @var mixed
+ */
+ private $notcreated = false;
+
+ /*
+ * @var string
+ */
+ private $mode = null;
+
+ /*
+ * @public function constructor
+ * @param null
+ */
+ public function __construct() {
+ $this->xoopsfile = XoopsFile::getHandler();
+ }
+
+ /*
+ * @public static function &getInstance
+ * @param null
+ */
+ public static function &getInstance() {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+ return $instance;
+ }
+
+ /*
+ * @public function constructor
+ * @param string $content
+ */
+ public function create($path, $folder_name, $file_name, $content = '', $created = false, $notcreated = false, $mode = 'w+') {
+ $this->folder_name = $folder_name;
+ $this->file_name = $file_name;
+ $this->created = $created;
+ $this->notcreated = $notcreated;
+ $this->mode = $mode;
+ if(isset($path)){
+ $this->setPath($path);
+ }
+ if(isset($content)){
+ $this->setContent($content);
+ }
+ }
+
+ /*
+ * @private function setPath
+ * @param string $path
+ */
+ private function setPath($path) {
+ $this->path = $path;
+ }
+
+ /*
+ * @private function getPath
+ * @param null
+ */
+ private function getPath() {
+ return $this->path;
+ }
+
+ /*
+ * @private function setContent
+ * @param string $content
+ */
+ private function setContent($content) {
+ $this->content = $content;
+ }
+
+ /*
+ * @private function setContent
+ * @param null
+ */
+ private function getContent() {
+ return $this->content;
+ }
+
+ /*
+ * @private function getFolderName
+ * @param null
+ */
+ private function getFolderName() {
+ return $this->folder_name;
+ }
+
+ /*
+ * @private function getFileName
+ * @param null
+ */
+ private function getFileName() {
+ return $this->file_name;
+ }
+
+ /*
+ * @private function getCreated
+ * @param null
+ */
+ private function getCreated() {
+ return $this->created;
+ }
+
+ /*
+ * @private function getNotCreated
+ * @param null
+ */
+ private function getNotCreated() {
+ return $this->notcreated;
+ }
+
+ /*
+ * @private function getMode
+ * @param null
+ */
+ private function getMode() {
+ return $this->mode;
+ }
+
+ /*
+ * @public function renderFile
+ * @param null
+ */
+ public function renderFile() {
+ $path = $this->getPath();
+ $folder_name = $this->getFolderName();
+ $file_name = $this->getFileName();
+ $created = $this->getCreated();
+ $notcreated = $this->getNotCreated();
+ $this->xoopsfile->__construct($path);
+ // Integration of the content of file
+ if($this->xoopsfile->open($this->getMode()) == false) {
+ $GLOBALS['xoopsTpl']->assign('notcreated', sprintf($notcreated, $file_name, $folder_name));
+ return false;
+ }
+ if($this->xoopsfile->is_writable($path)) {
+ if ($this->xoopsfile->write($this->getContent()) == false) {
+ $GLOBALS['xoopsTpl']->assign('notcreated', sprintf($notcreated, $file_name, $folder_name));
+ exit;
+ }
+ $GLOBALS['xoopsTpl']->assign('created', sprintf($created, $file_name, $folder_name));
+ $this->xoopsfile->close();
+ } else {
+ $GLOBALS['xoopsTpl']->assign('notcreated', sprintf($notcreated, $file_name, $folder_name));
+ }
+ return $GLOBALS['xoopsTpl']->fetch("db:tdmcreate_building.html");
+ }
+}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/structure.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/structure.php 2014-03-27 10:15:29 UTC (rev 12412)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/structure.php 2014-03-27 14:28:58 UTC (rev 12413)
@@ -18,9 +18,7 @@
* @author Txmod Xoops http://www.txmodxoops.org
* @version $Id: structure.php 12258 2014-01-02 09:33:29Z timgno $
*/
-if (!defined('XOOPS_ROOT_PATH')) {
- die('XOOPS root path not defined');
-}
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
xoops_load('XoopsFile');
class TDMCreateStructure
{
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php 2014-03-27 10:15:29 UTC (rev 12412)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php 2014-03-27 14:28:58 UTC (rev 12413)
@@ -166,8 +166,7 @@
$form->addElement($imgtray);
//---------- START -----------------
- ?>
-
+ ?>
<script type="text/javascript">
function showImgSelected2(imgId, selectId, imgDir, extra, xoopsUrl) {
@@ -179,7 +178,7 @@
if (selectDom.options[selectDom.selectedIndex].value != "") {
imgDom.src = xoopsUrl + imgDir + "/" + selectDom.options[selectDom.selectedIndex].value + extra;
} else {
- imgDom.src = xoopsUrl + "/modules/TDMCreate/images/uploads/modules/blank.gif";
+ imgDom.src = xoopsUrl + "/modules/TDMCreate/images/icons/blank.gif";
}
}
@@ -223,22 +222,16 @@
});
}
</script>
-
-
<?php
$tables_img = $this->getVar('table_image') ? $this->getVar('table_image') : 'about.png';
if(is_dir($pathIcon32)){
- $uploadirectory = $pathIcon32;
+ $uploadirectory = $pathIcon32;
+ $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, "./{$pathIcon32}");
} else {
$uploadirectory = "/uploads/".$GLOBALS['xoopsModule']->dirname()."/images/tables";
+ $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, "./uploads/".$GLOBALS['xoopsModule']->dirname()."/images/tables");
}
$createLogoTray = new XoopsFormElementTray('Create new Logo','<br />');
- //$imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, './' . $uploadirectory);
- if(is_dir($pathIcon32)){
- $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, "./{$pathIcon32}");
- } else {
- $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, "./uploads/".$GLOBALS['xoopsModule']->dirname()."/images/tables");
- }
$iconSelect= new XoopsFormSelect($imgpath, 'tables_img', $tables_img, 8);
$tables_img_array = XoopsLists::getImgListAsArray( $uploadirectory );
foreach( $tables_img_array as $image ) {
@@ -302,12 +295,10 @@
}
}
- $dirname = $GLOBALS['xoopsModule']->dirname();
$iconFileName = $pathIcon32 . '/' . basename($logoIcon);
- $dirlogos = TDMC_PATH . "/images/logos";
- //$dirlogos = XOOPS_ROOT_PATH . "/modules/" . $dirname . "/images/logos";
- if (!file_exists($imageBase = $dirlogos . "/xoops2.png") ||
+ $dirlogos = TDMC_PATH . "/images/logos";
+ if (!file_exists($imageBase = $dirlogos . "/empty.png") ||
!file_exists($font = $dirlogos . "/VeraBd.ttf") ||
!file_exists($iconFile = $iconFileName)) {
return false;
@@ -324,8 +315,7 @@
imagecopy($imageModule, $imageIcon, 29, 2, 0, 0, 32, 32);
$targetImage = TDMC_UPLOAD_IMGMOD_URL . "/" . $moduleName . "_logo.png";
- //$targetImage = "/uploads/" . $dirname . "/images/modules/" . $moduleName . "_logo.png"; XOOPS_ROOT_PATH .
-
+
imagepng($imageModule, $targetImage );
imagedestroy($imageModule);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php 2014-03-27 10:15:29 UTC (rev 12412)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php 2014-03-27 14:28:58 UTC (rev 12413)
@@ -254,35 +254,10 @@
//Creation
//OK
define('_AM_TDMCREATE_CONST_OK_ARCHITECTURE', "<span class='green'>The structure of the module was created (index.html, folders, ...)</span>");
-define('_AM_TDMCREATE_CONST_OK_COMMENTS', "The file <b>%s</b> is created in the <span class='green bold'>directory</span> of module");
-define('_AM_TDMCREATE_CONST_OK_DOCS', "The file <b>%s</b> is created in the <span class='green bold'>docs</span> folder");
-define('_AM_TDMCREATE_CONST_OK_CSS', "The file <b>%s</b> is created in the <span class='green bold'>css</span> folder");
-define('_AM_TDMCREATE_CONST_OK_ROOTS', "The file <b>%s</b> is created in the <span class='green bold'>directory</span> of the module");
-define('_AM_TDMCREATE_CONST_OK_CLASSES', "The file <b>%s</b> is created in the <span class='green bold'>class</span> folder");
-define('_AM_TDMCREATE_CONST_OK_BLOCKS', "The file <b>%s</b> is created in the <span class='green bold'>blocks</span> folder");
-define('_AM_TDMCREATE_CONST_OK_SQL', "The file <b>%s</b> is created in the <span class='green bold'>sql</span> folder");
-define('_AM_TDMCREATE_CONST_OK_ADMINS', "The file <b>%s</b> is created in the <span class='green bold'>admin</span> folder");
-define('_AM_TDMCREATE_CONST_OK_LANGUAGES', "The file <b>%s</b> is created in the <span class='green bold'>language</span> folder");
-define('_AM_TDMCREATE_CONST_OK_INCLUDES', "The file <b>%s</b> is created in the <span class='green bold'>include</span> folder");
-define('_AM_TDMCREATE_CONST_OK_TEMPLATES', "The file <b>%s</b> is created in the <span class='green bold'>templates</span> folder");
-define('_AM_TDMCREATE_CONST_OK_TEMPLATES_BLOCKS', "The file <b>%s</b> is created in the <span class='green bold'>templates/blocks</span> folder");
-define('_AM_TDMCREATE_CONST_OK_TEMPLATES_ADMIN', "The file <b>%s</b> is created in the <span class='green bold'>templates/admin</span> folder");
-
+define('_AM_TDMCREATE_CONST_OK_FILE_IN_FOLDER', "The file <b>%s</b> is created in the <span class='green bold'>%s</span> of module");
//NOTOK
define('_AM_TDMCREATE_CONST_NOTOK_ARCHITECTURE', "<span class='red'>Problems: Creating the structure of the module (index.html, icons ,...)</span>");
-define('_AM_TDMCREATE_CONST_NOTOK_COMMENTS', "Problems: Creating file <b class='red'>%s</b> in the <span class='red bold'>directory</span> of module");
-define('_AM_TDMCREATE_CONST_NOTOK_DOCS', "Problems: Creating file <b class='red'>%s</b> in the <span class='red bold'>docs</span> folder");
-define('_AM_TDMCREATE_CONST_NOTOK_CSS', "Problems: Creating file <b class='red'>%s</b> in the <span class='red bold'>css</span> folder");
-define('_AM_TDMCREATE_CONST_NOTOK_ROOTS', "Problems: Creating file <b class='red'>%s</b> in the <span class='red bold'>directory</span> of the module");
-define('_AM_TDMCREATE_CONST_NOTOK_CLASSES', "Problems: Creating file <b class='red'>%s</b> in the <span class='red bold'>class</span> folder");
-define('_AM_TDMCREATE_CONST_NOTOK_BLOCKS', "Problems: Creating file <b class='red'>%s</b> in <span class='red bold'>blocks</span> folder");
-define('_AM_TDMCREATE_CONST_NOTOK_SQL', "Problems: Creating file <b class='red'>%s</b> in the <span class='red bold'>sql</span> folder");
-define('_AM_TDMCREATE_CONST_NOTOK_ADMINS', "Problems: Creating file <b class='red'>%s</b> in the <span class='red bold'>admin</span> folder");
-define('_AM_TDMCREATE_CONST_NOTOK_LANGUAGES', "Problems: Creating file <b class='red'>%s</b> in the <span class='red bold'>language</span> folder");
-define('_AM_TDMCREATE_CONST_NOTOK_INCLUDES', "Problems: Creating file <b class='red'>%s</b> in the <span class='red bold'>include</span> folder");
-define('_AM_TDMCREATE_CONST_NOTOK_TEMPLATES', "Problems: Creating file <b class='red'>%s</b> in the <span class='red bold'>templates</span> folder");
-define('_AM_TDMCREATE_CONST_NOTOK_TEMPLATES_BLOCKS', "Problems: Creating file <b class='red'>%s</b> in the <span class='red bold'>templates/blocks</span> folder");
-define('_AM_TDMCREATE_CONST_NOTOK_TEMPLATES_ADMIN', "Problems: Creating file <b class='red'>%s</b> in the <span class='red bold'>templates/admin</span> folder");
+define('_AM_TDMCREATE_CONST_NOTOK_FILE_IN_FOLDER', "Problems: Creating file <b class='red'>%s</b> in the <span class='red bold'>%s</span> of module");
//------------ new additions: Ver. 1.11 -----------------------
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_building.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_building.html 2014-03-27 10:15:29 UTC (rev 12412)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_building.html 2014-03-27 14:28:58 UTC (rev 12413)
@@ -13,11 +13,12 @@
</thead>
<tbody>
<tr class="even">
- <td style="padding-left: 30px;"><{$list.file}></td>
- <{if $architecture_created}>
+ <{if $base_architecture}>
+ <td style="padding-left: 30px;"><{$smarty.const._AM_TDMCREATE_CONST_OK_ARCHITECTURE}></td>
<td class="center"><img src="<{xoModuleIcons16 on.png}>" alt="" /></td>
<td> </td>
- <{else}>
+ <{else}>
+ <td style="padding-left: 30px;"><{$smarty.const._AM_TDMCREATE_CONST_NOTOK_ARCHITECTURE}></td>
<td> </td>
<td class="center"><img src="<{xoModuleIcons16 off.png}>" alt="" /></td>
<{/if}>
@@ -27,9 +28,11 @@
<td class="center" colspan="3"><{$build_list}></td>
<!-- <td style="padding-left: 30px;"><{$list.file}></td>
<{if $list.on}>
+ <td style="padding-left: 30px;"><{$created}></td>
<td class="center"><img src="<{xoModuleIcons16 on.png}>" alt="" /></td>
<td> </td>
<{elseif $list.off}>
+ <td style="padding-left: 30px;"><{$notcreated}></td>
<td> </td>
<td class="center"><img src="<{xoModuleIcons16 off.png}>" alt="" /></td>
<{/if}> -->
|
|
From: <be...@us...> - 2014-03-27 10:15:32
|
Revision: 12412
http://sourceforge.net/p/xoops/svn/12412
Author: beckmi
Date: 2014-03-27 10:15:29 +0000 (Thu, 27 Mar 2014)
Log Message:
-----------
removing not needed escaping in function codeConvCallback
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/module.textsanitizer.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/module.textsanitizer.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/module.textsanitizer.php 2014-03-27 00:29:10 UTC (rev 12411)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/module.textsanitizer.php 2014-03-27 10:15:29 UTC (rev 12412)
@@ -678,7 +678,7 @@
*/
function codeConvCallback($match)
{
- return '<div class=\"xoopsCode\">'. $this->executeExtension('syntaxhighlight', str_replace('\\\"', '\"', base64_decode($match[2])), $match[1]).'</div>';
+ return '<div class="xoopsCode">'. $this->executeExtension('syntaxhighlight', str_replace('\\\"', '\"', base64_decode($match[2])), $match[1]).'</div>';
}
/**
|
|
From: <txm...@us...> - 2014-03-27 00:29:14
|
Revision: 12411
http://sourceforge.net/p/xoops/svn/12411
Author: txmodxoops
Date: 2014-03-27 00:29:10 +0000 (Thu, 27 Mar 2014)
Log Message:
-----------
Added style.css file in css/admin folder
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/admin/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/admin/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/admin/style.css
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/admin/index.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/admin/index.html (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/admin/index.html 2014-03-27 00:29:10 UTC (rev 12411)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/admin/style.css
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/admin/style.css (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/admin/style.css 2014-03-27 00:29:10 UTC (rev 12411)
@@ -0,0 +1,224 @@
+@charset "UTF-8";
+/**
+ * MyLinks module
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * @copyright:: The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license:: http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package:: mylinks
+ * @since:: 2.5.0
+ * @author: kris <http://www.xoofoo.org>
+ * @version:: $Id $
+**/
+#Slideshow_Title {
+ font-size: 20px;
+ color: #393e41;
+ height: 50px;
+ border-bottom: 1px solid #393e41;
+ margin-bottom: 5px;
+ line-height: 50px;
+ background-position: left top;
+ background-repeat: no-repeat;
+ /*text-shadow: 0 1px 0 #eee,
+ 0 2px 0 #e9e9e9,
+ 0 3px 0 #ddd,
+ 0 4px 0 #d9d9d9,
+ 0 5px 0 #ccc,
+ 0 6px 1px rgba(0,0,0,.1),
+ 0 0 5px rgba(0,0,0,.1),
+ 0 1px 3px rgba(0,0,0,.3),
+ 0 3px 5px rgba(0,0,0,.2),
+ 0 5px 10px rgba(0,0,0,.35),
+ 0 10px 10px rgba(0,0,0,.2);*/
+}
+.Slideshow_MediumTitle {
+ font-size: 14px;
+ color: #393e41;
+ /*text-shadow: 0 1px 0 #eee,
+ 0 2px 0 #e9e9e9,
+ 0 3px 0 #ddd,
+ 0 4px 0 #d9d9d9,
+ 0 5px 0 #ccc,
+ 0 6px 1px rgba(0,0,0,.1),
+ 0 0 5px rgba(0,0,0,.1),
+ 0 1px 3px rgba(0,0,0,.3),
+ 0 3px 5px rgba(0,0,0,.2),
+ 0 5px 10px rgba(0,0,0,.35),
+ 0 10px 10px rgba(0,0,0,.2);*/
+}
+/* Index page */
+#Slideshow_Index {
+ float: left;
+ padding: 0 0 0 60px;
+ background-image: url(../images/admin/index.png);
+ background-position: left top;
+ background-repeat: no-repeat;
+}
+/* Help page */
+#Slideshow_Help {
+ float: left;
+ padding: 0 0 0 60px;
+ background-image: url(../images/admin/help.png);
+ background-position: left top;
+ background-repeat: no-repeat;
+}
+/* About page */
+#Slideshow_About {
+ float: left;
+ padding: 0 0 0 60px;
+ background-image: url(../images/admin/about.png);
+ background-position: left top;
+ background-repeat: no-repeat;
+}
+#about fieldset {
+ margin: 10px;
+ padding: 5px;
+}
+#about legend {
+ margin: 0 5px;
+ padding: 0 5px 8px 5px;
+}
+#about label, #about text {
+ display: block;
+ float: left;
+ margin-bottom: 12px;
+}
+#about label {
+ text-align: right;
+ width: 200px;
+ padding-right: 20px;
+}
+#about br { clear: both;}
+#about .txtchangelog { height:350px; overflow:auto;}
+
+fieldset p { margin-bottom: .5em;}
+
+#myid {}
+
+/* Buttons style */
+.xo-buttons a, .xo-buttons button{
+ display:block-inline;
+ margin:0 5px 0 0;
+ background: #e4e4e5 url('../images/admin/bg_button.gif') repeat-x;
+ border:1px solid #d6d6d6;
+ border-top:1px solid #dedede;
+ border-left:1px solid #dedede;
+ font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif;
+ font-size:100%;
+ line-height:110%;
+ text-decoration:none;
+ font-weight:bold;
+ color:#454545;
+ cursor:pointer;
+ padding:3px 8px 4px 5px; /* Links */
+}
+.xo-buttons a:hover, .xo-buttons button:hover {
+ border:1px solid #ccc;
+ border-top:1px solid #d6d6d6;
+ border-left:1px solid #d6d6d6;
+}
+.xo-buttons button{
+ width:auto;
+ overflow:visible;
+ padding:3px 8px 4px 5px; /* IE6 */
+}
+.xo-buttons button[type]{
+ padding:3px 5px 4px 5px; /* Firefox */
+ line-height:15px; /* Safari */
+}
+*:first-child+html button[type]{
+ padding:3px 8px 4px 5px; /* IE7 */
+}
+.xo-buttons button img, .xo-buttons a img{
+ margin:0 3px -3px 0 !important;
+ padding:0;
+ border:none;
+ width:16px;
+ height:16px;
+}
+.ui-corner-all { -moz-border-radius: 5px; -webkit-border-radius: 5px; }
+/* Buttons style */
+
+/* align */
+.floatright{ float:right; margin:0; padding:2px; border:0; }
+.floatleft{ float:left; margin:0; padding:2px; border:0; }
+.aligncenter{ text-align:center; margin:0; padding:2px; border:0; }
+/* align */
+
+/* label */
+.label{font-size: 16px; color: #2F5376; font-weight: bold;}
+
+/* label */
+
+/* menu */
+div.rmmenuicon{
+ margin: 3px;
+ font-family: Tahoma, Arial, Helvetica;
+ text-align: center;
+}
+div.rmmenuicon a {
+ display: block; float: left;
+ height: 75px !important;
+ height: 75px;
+ width: 75px !important;
+ width: 75px;
+ vertical-align: middle;
+ text-decoration : none;
+ border: 1px solid #CCCCCC;
+ padding: 2px 5px 1px 5px;
+ margin: 3px;
+ color: #666666;
+
+ background-color: #f0f0f0;
+ -moz-border-radius: 6px;
+ -webkit-border-radius: 6px;
+ -khtml-border-radius: 6px;
+ border-radius: 6px;
+
+
+}
+div.rmmenuicon img { margin-top: 8px; margin-bottom: 8px; }
+div.rmmenuicon a span {
+ font-size: 11px;
+ font-weight: bold;
+ display: block;
+}
+div.rmmenuicon a:hover{
+ background-color: #FFF6C1;
+ border: 1px solid #FF9900;
+ color: #1E90FF;
+}
+div.rmmenuicon a:hover span{
+ text-decoration: none;
+}
+
+div.CPbigTitle{
+ font-size: 12px;
+ color: #606060;
+ background: no-repeat left top;
+ font-weight: bold;
+ height: 30px;
+ vertical-align: middle;
+ padding: 5px 0 0 40px;
+ border-bottom: 1px solid #393e41;
+}
+/* menu */
+
+.txtchangelog { height:350px; overflow:auto;}
+
+
+tr.toggleTables td {
+ /* display: none;*/
+}
+
+.toggleHidden {
+ display: none;
+}
+
+.width6{ width: 6%; }
\ No newline at end of file
|
|
From: <txm...@us...> - 2014-03-27 00:26:35
|
Revision: 12410
http://sourceforge.net/p/xoops/svn/12410
Author: txmodxoops
Date: 2014-03-27 00:26:31 +0000 (Thu, 27 Mar 2014)
Log Message:
-----------
Updated
Work in progress
The base module is created
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/htmltable.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/logoGenerator.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/themeform.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_header.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php
Removed Paths:
-------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields_class.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields_database.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/admin.css
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/default_slogo.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/arrow.gif
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/off.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/on.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/module_logo.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/txmodxoops_logo.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/uploads/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/xoops2.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/functions_const.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php 2014-03-25 08:52:13 UTC (rev 12409)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php 2014-03-27 00:26:31 UTC (rev 12410)
@@ -32,14 +32,15 @@
$template_main = 'tdmcreate_building.html';
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('building.php'));
// Clear repertory of new module if there are
- TDMCreate_clearDir(TDMC_UPLOAD_MODULE_PATH . '/' . strtolower($modules->getVar('mod_name')));
+ TDMCreate_clearDir(TDMC_UPLOAD_MODULES_PATH . '/' . $modules->getVar('mod_name'));
// Debut
/************************************************/
/*Structure*/
/************************************************/
include_once TDMC_PATH . '/class/files/architecture.php';
$handler = TDMCreateArchitecture::getInstance();
- $handler->getUploadPath( TDMC_UPLOAD_MODULE_PATH );
+ $handler->getPath( TDMC_PATH );
+ $handler->getUploadPath( TDMC_UPLOAD_PATH );
$handler->getArchitectureFiles( $modules );
// Creation of the structure of folders and files
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-03-25 08:52:13 UTC (rev 12409)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-03-27 00:26:31 UTC (rev 12410)
@@ -22,22 +22,22 @@
// Recovered value of arguments op in the URL $
$op = TDMCreate_CleanVars($_REQUEST, 'op', 'list', 'string');
// Get table Variables
-$table_id = TDMCreate_CleanVars($_REQUEST, 'table_id', 0, 'int');
-$table_mid = TDMCreate_CleanVars($_REQUEST, 'table_mid', 0, 'int');
-$table_nbfields = TDMCreate_CleanVars($_REQUEST, 'table_nbfields', 0, 'int');
+$table_id = TDMCreate_CleanVars($_REQUEST, 'table_id');
+$table_mid = TDMCreate_CleanVars($_REQUEST, 'table_mid');
+$table_nbfields = TDMCreate_CleanVars($_REQUEST, 'table_nbfields');
$table_fieldname = TDMCreate_CleanVars($_REQUEST, 'table_fieldname', '', 'string');
// Get field Variables
-$field_id = TDMCreate_CleanVars($_REQUEST, 'field_id', 0, 'int');
-$field_tid = TDMCreate_CleanVars($_REQUEST, 'field_tid', 0, 'int');
-$field_mid = TDMCreate_CleanVars($_REQUEST, 'field_mid', 0, 'int');
-$field_numb = TDMCreate_CleanVars($_REQUEST, 'field_numb', 0, 'int');
+$field_id = TDMCreate_CleanVars($_REQUEST, 'field_id');
+$field_tid = TDMCreate_CleanVars($_REQUEST, 'field_tid');
+$field_mid = TDMCreate_CleanVars($_REQUEST, 'field_mid');
+$field_numb = TDMCreate_CleanVars($_REQUEST, 'field_numb');
$field_name = TDMCreate_CleanVars($_REQUEST, 'field_name', '', 'string');
//
switch ($op)
{
case 'list':
default:
- $limit = xoops_getModuleOption('mod_adminpager');
+ $limit = xoops_getModuleOption('fields_adminpager');
$start = TDMCreate_CleanVars($_REQUEST, 'start', 0);
// Define main template
$template_main = 'tdmcreate_fields.html';
@@ -95,7 +95,7 @@
$GLOBALS['xoopsTpl']->assign('button_new', $adminMenu->renderButton());
$obj =& $fieldsHandler->create();
- $form = $obj->getForm($table_id, $table_mid, $table_nbfields, $table_fieldname);
+ $form = $obj->getForm($field_mid, $field_tid, $field_numb, $field_name);
$GLOBALS['xoopsTpl']->assign('form', $form->render());
break;
@@ -125,13 +125,13 @@
'field_blocks' => (($_REQUEST['field_blocks'] == 1) ? '1' : '0'),
'field_mainfield' => (($_REQUEST['field_mainfield'] == 1) ? '1' : '0'),
'field_search' => (($_REQUEST['field_search'] == 1) ? '1' : '0'),
- 'field_required' => (($_REQUEST['field_required'] == 1) ? '1' : '0')),
+ 'field_required' => (($_REQUEST['field_required'] == 1) ? '1' : '0'),
'field_fields' => $_POST['field_fields'],
- 'field_parameters' => $_POST['field_parameters']
+ 'field_parameters' => $_POST['field_parameters'])
);
if ($fieldsHandler->insert($obj)) {
- redirect_header('tables.php', 2, _AM_TDMCREATE_FORMOK);
+ redirect_header('fields.php', 2, _AM_TDMCREATE_FORMOK);
}
echo $obj->getHtmlErrors();
$form = $obj->getForm();
@@ -143,10 +143,12 @@
$template_main = 'tdmcreate_tables.html';
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php'));
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php', 'list');
- $GLOBALS['xoopsTpl']->assign('button_new', $adminMenu->renderButton());
+ $GLOBALS['xoopsTpl']->assign('button_tables_list', $adminMenu->renderButton());
+ $adminMenu->addItemButton(_AM_TDMCREATE_FIELDS_LIST, 'fields.php', 'list');
+ $GLOBALS['xoopsTpl']->assign('button_fields_list', $adminMenu->renderButton());
$obj = $fieldsHandler->get($field_id);
- $form = $obj->getForm($field_tid, $field_mid, $field_numb, $field_name);
+ $form = $obj->getForm($field_mid, $field_tid, $field_numb, $field_name);
$GLOBALS['xoopsTpl']->assign('form', $form->render());
break;
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/header.php 2014-03-25 08:52:13 UTC (rev 12409)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/header.php 2014-03-27 00:26:31 UTC (rev 12410)
@@ -19,8 +19,8 @@
* @version $Id: header.php 12258 2014-01-02 09:33:29Z timgno $
*/
include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php';
-include_once('../include/common.php');
-include_once('../include/functions.php');
+include_once dirname(dirname(__FILE__)) . '/include/common.php';
+include_once dirname(dirname(__FILE__)) . '/include/functions.php';
//include_once 'includes.php';
//
$thisDirname = $GLOBALS['xoopsModule']->getVar('dirname');
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-03-25 08:52:13 UTC (rev 12409)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-03-27 00:26:31 UTC (rev 12410)
@@ -94,16 +94,24 @@
$obj =& $modulesHandler->create();
}
//Form module save
- $obj->setVars(array('mod_name' => $_POST['mod_name'], 'mod_version' => $_POST['mod_version'],
- 'mod_min_php' => $_POST['mod_min_php'], 'mod_min_xoops' => $_POST['mod_min_xoops'],
- 'mod_min_admin' => $_POST['mod_min_admin'], 'mod_min_mysql' => $_POST['mod_min_mysql'],
- 'mod_description' => $_POST['mod_description'], 'mod_author' => $_POST['mod_author'], 'mod_author_mail' => $_POST['mod_author_mail'],
+ $obj->setVars(array('mod_name' => $_POST['mod_name'],
+ 'mod_version' => $_POST['mod_version'],
+ 'mod_since' => $_POST['mod_since'],
+ 'mod_min_php' => $_POST['mod_min_php'],
+ 'mod_min_xoops' => $_POST['mod_min_xoops'],
+ 'mod_min_admin' => $_POST['mod_min_admin'],
+ 'mod_min_mysql' => $_POST['mod_min_mysql'],
+ 'mod_description' => $_POST['mod_description'],
+ 'mod_author' => $_POST['mod_author'],
+ 'mod_author_mail' => $_POST['mod_author_mail'],
'mod_author_website_url' => $_POST['mod_author_website_url'],
'mod_author_website_name' => $_POST['mod_author_website_name'],
- 'mod_credits' => $_POST['mod_credits'], 'mod_license' => $_POST['mod_license'],
+ 'mod_credits' => $_POST['mod_credits'],
+ 'mod_license' => $_POST['mod_license'],
'mod_release_info' => $_POST['mod_release_info'],
'mod_release_file' => $_POST['mod_release_file'],
- 'mod_manual' => $_POST['mod_manual'], 'mod_manual_file' => $_POST['mod_manual_file']));
+ 'mod_manual' => $_POST['mod_manual'],
+ 'mod_manual_file' => $_POST['mod_manual_file']));
//Form mod_image
include_once XOOPS_ROOT_PATH . '/class/uploader.php';
$uploaddir = TDMC_UPLOAD_PATH.'/images/modules/';
@@ -136,7 +144,10 @@
'mod_submenu' => (($_REQUEST['mod_submenu'] == 1) ? '1' : '0'),
'mod_search' => (($_REQUEST['mod_search'] == 1) ? '1' : '0'),
'mod_comments' => (($_REQUEST['mod_comments'] == 1) ? '1' : '0'),
- 'mod_notifications' => (($_REQUEST['mod_notifications'] == 1) ? '1' : '0')));
+ 'mod_notifications' => (($_REQUEST['mod_notifications'] == 1) ? '1' : '0'),
+ 'mod_donations' => $_POST['mod_donations'],
+ 'mod_subversion' => $_POST['mod_subversion'])
+ );
if ($modulesHandler->insert($obj)) {
redirect_header('modules.php', 2, _AM_TDMCREATE_FORMOK);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-03-25 08:52:13 UTC (rev 12409)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-03-27 00:26:31 UTC (rev 12410)
@@ -22,10 +22,10 @@
// Recovered value of arguments op in the URL $
$op = TDMCreate_CleanVars($_REQUEST, 'op', 'list', 'string');
//
-$mod_id = TDMCreate_CleanVars($_REQUEST, 'mod_id', 0);
-$table_id = TDMCreate_CleanVars($_REQUEST, 'table_id', 0);
-$table_mid = TDMCreate_CleanVars($_REQUEST, 'table_mid', 0);
-$table_nbfields = TDMCreate_CleanVars($_REQUEST, 'table_nbfields', 0);
+$mod_id = TDMCreate_CleanVars($_REQUEST, 'mod_id');
+$table_id = TDMCreate_CleanVars($_REQUEST, 'table_id');
+$table_mid = TDMCreate_CleanVars($_REQUEST, 'table_mid');
+$table_nbfields = TDMCreate_CleanVars($_REQUEST, 'table_nbfields');
$table_fieldname = TDMCreate_CleanVars($_REQUEST, 'table_fieldname', '', 'string');
//
switch ($op)
@@ -36,7 +36,7 @@
$start = TDMCreate_CleanVars($_REQUEST, 'start', 0);
// Define main template
$template_main = 'tdmcreate_tables.html';
- $GLOBALS['xoTheme']->addStylesheet( 'modules/TDMCreate/css/admin.css' );
+ $GLOBALS['xoTheme']->addStylesheet( 'modules/TDMCreate/css/admin/style.css' );
$GLOBALS['xoTheme']->addScript('modules/TDMCreate/js/functions.js');
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('tables.php'));
@@ -141,7 +141,8 @@
}
//Form tables
$obj->setVars(array('table_mid' => $table_mid,
- 'table_name' => $_POST['table_name'],
+ 'table_name' => $_POST['table_name'],
+ 'table_category' => (($_REQUEST['table_category'] == 1) ? '1' : '0'),
'table_nbfields' => $table_nbfields,
'table_fieldname' => $table_fieldname));
//Form table_image
@@ -178,7 +179,7 @@
if( $tablesHandler->insert($obj) ) {
if( $obj->isNew() ) {
$field_tid = $GLOBALS['xoopsDB']->getInsertId();
- redirect_header('fields.php?op=new&field_tid='.$field_tid, 3, _AM_TDMCREATE_FORMOK);
+ redirect_header('fields.php?op=new&field_mid='.$table_mid.'&field_tid='.$field_tid.'&field_numb='.$table_nbfields.'&field_name='.$table_fieldname, 3, _AM_TDMCREATE_FORMOK);
} else {
redirect_header('tables.php', 3, _AM_TDMCREATE_FORMOK);
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-03-25 08:52:13 UTC (rev 12409)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-03-27 00:26:31 UTC (rev 12410)
@@ -1,4 +1,4 @@
-<?php
+<?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
@@ -18,23 +18,38 @@
* @author Txmod Xoops http://www.txmodxoops.org
* @version $Id: fields.php 12258 2014-01-02 09:33:29Z timgno $
*/
-if (!defined("XOOPS_ROOT_PATH")) {
- die("XOOPS root path not defined");
-}
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
require_once 'themeform.php';
/*
* @Class TDMCreateFields
-* @extends XoopsObject
+* @extends XoopsObject
*/
class TDMCreateFields extends XoopsObject
-{
+{
+ /**
+ * @var string
+ */
+ private $table = null;
+
+ /**
+ * @var string
+ */
+ private $htmltable = null;
+
+ /**
+ * @var string
+ */
+ private $htmltable_parameters = null;
+
/*
* @public function constructor class
* @param null
*/
public function __construct()
{
- $this->XoopsObject();
+ $this->table = TDMCreateTables::getInstance();
+ $this->htmltable = TDMCreateHtmlTable::getInstance();
+ $this->htmltable_parameters = TDMCreateHtmlTable::getInstance();
$this->initVar('field_id', XOBJ_DTYPE_INT);
$this->initVar('field_tid', XOBJ_DTYPE_INT);
$this->initVar('field_name', XOBJ_DTYPE_TXTBOX);
@@ -54,7 +69,7 @@
$this->initVar('field_fields',XOBJ_DTYPE_TXTAREA);
$this->initVar('field_parameters',XOBJ_DTYPE_TXTAREA);
}
-
+
/*
* @static function &getInstance
* @param null
@@ -82,9 +97,9 @@
if ($action === false) {
$action = $_SERVER['REQUEST_URI'];
}
-
+
$title = $this->isNew() ? sprintf(_AM_TDMCREATE_FIELD_ADD) : sprintf(_AM_TDMCREATE_FIELD_EDIT);
-
+
if ($this->isNew()) {
$field_tid = $table_id;
$nb_fields = $table_nbfields;
@@ -92,35 +107,37 @@
$field_tid = $this->getVar('field_tid');
$nb_fields = $this->getVar('field_numb');
}
-
- include_once(XOOPS_ROOT_PATH.'/class/xoopsformloader.php');
- include_once(XOOPS_ROOT_PATH.'/modules/TDMCreate/class/themeform.php');
+
+ $header_captions = array(_AM_TDMCREATE_FIELD_NUMBER, _AM_TDMCREATE_FIELD_NAME, _AM_TDMCREATE_FIELD_TYPE, _AM_TDMCREATE_FIELD_VALUE, _AM_TDMCREATE_FIELD_ATTRIBUTE, _AM_TDMCREATE_FIELD_NULL, _AM_TDMCREATE_FIELD_DEFAULT, _AM_TDMCREATE_FIELD_KEY, _AM_TDMCREATE_FIELD_OTHERS);
+ xoops_load('xoopsformloader');
$form = new TDMCreateThemeForm($title, 'form', $action, 'post', true);
- $form->setExtra('enctype="multipart/form-data"');
+ $form->setExtra('enctype="multipart/form-data"');
- //$option_tray = new XoopsFormElementTray(' ');
- //$option_tray->setExtra('colspan="2"');//_AM_TDMCREATE_FIELD_TYPE
- $tablesHandler = xoops_getModuleHandler('tables');
+ $tablesHandler = xoops_getModuleHandler('tables');
// New Object HtmlTable
- $tableForm = new TDMCreateHtmlTable(null, 'display outer');
+ //$this->htmltable->initTable(null, 'display outer');
// header row
- $tableForm->addRow('center bgblue');
- $cells = array(_AM_TDMCREATE_FIELD_NUMBER, _AM_TDMCREATE_FIELD_NAME, _AM_TDMCREATE_FIELD_TYPE, _AM_TDMCREATE_FIELD_VALUE, _AM_TDMCREATE_FIELD_ATTRIBUTE, _AM_TDMCREATE_FIELD_NULL, _AM_TDMCREATE_FIELD_DEFAULT, _AM_TDMCREATE_FIELD_KEY, _AM_TDMCREATE_FIELD_OTHERS);
- $tableForm->addCells($cells, 'first', 'header');
+ /*$this->htmltable->addRow('center bgblue');
+ $this->htmltable->addCells($cells, 'first', 'header');*/
+ $this->htmltable->initTable('display outer width100');
+ $this->htmltable->addRow() . NWLINE;
+ $this->htmltable->addCell($title, 'first', 'header', 'colspan="9"');
+ $this->htmltable->addRow('center bgblue') . NWLINE;
+ $this->htmltable->addCells($header_captions, 'first', 'header');
- for($i = 1; $i <= count($nb_fields); $i++)
- {
- $field_name = $this->isNew() ? $this->getVar('table_fieldname') : $this->getVar('field_name');
+ for($i = 1; $i <= intval($nb_fields); $i++)
+ {
+ $field_name = $this->isNew() ? $this->table->getVar('table_fieldname') : $this->getVar('field_name');
$field_name = new XoopsFormText(_AM_TDMCREATE_FIELD_NAME, 'field_name', 15, 255, $field_name);
// fieldtype
$fieldtypeHandler =& xoops_getModuleHandler('fieldtype');
$fieldtype_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_type', $this->getVar('field_type'));
- $fieldtype_select->addOptionArray($fieldtypeHandler->getList());
- // fieldvalue
+ $fieldtype_select->addOptionArray($fieldtypeHandler->getList());
+ // fieldvalue
$field_value = new XoopsFormText(_AM_TDMCREATE_FIELD_VALUE, 'field_value', 5, 20, $this->getVar('field_value'));
// fieldattributes
- $fieldattrsHandler =& xoops_getModuleHandler('fieldattributes');
- $field_attributes_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_attribute', $this->getVar('field_attribute'));
+ $fieldattrsHandler =& xoops_getModuleHandler('fieldattributes');
+ $field_attributes_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_attribute', $this->getVar('field_attribute'));
$field_attributes_select->addOptionArray($fieldattrsHandler->getList());
// fieldnull
$fieldnullHandler =& xoops_getModuleHandler('fieldnull');
@@ -133,108 +150,99 @@
$field_key_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_KEY, 'field_key', $this->getVar('field_key'));
$field_key_select->addOptionArray($fieldkeyHandler->getList());
// render fields
- $tableFormDataArray = array($i, $field_name->render(), $fieldtype_select->render(), $field_value->render(), $field_attributes_select->render(), $field_null_select->render(), $field_default->render(), $field_key_select->render());
+ $htmltableDataArray = array($i, $field_name->render(), $fieldtype_select->render(), $field_value->render(), $field_attributes_select->render(), $field_null_select->render(), $field_default->render(), $field_key_select->render());
// data row
- $tableForm->addRow('center bgyellow');
- $tableForm->addCells($tableFormDataArray, 'first', 'data');
- $tableOtherForm = new TDMCreateHtmlTable(null, 'display');
- if($i == 1) {
+ $this->htmltable->addRow('center bgyellow');
+ $this->htmltable->addCells($htmltableDataArray, 'first', 'data');
+ $this->htmltable_parameters->initTable('display');
+ if($i == 1) {
$field_autoincrement = $this->isNew() ? 0 : $this->getVar('field_auto_increment');
$check_field_autoincrement = new XoopsFormCheckBox(' ', 'field_auto_increment', $field_autoincrement);
$check_field_autoincrement->addOption(1, _AM_TDMCREATE_FIELD_AUTO_INCREMENT);
// data row
- $tableOtherForm->addRow();
- $tableOtherForm->addCell($check_field_autoincrement->render(), null, 'data');
- } elseif($i > 1) {
+ $this->htmltable_parameters->addRow();
+ $this->htmltable_parameters->addCell($check_field_autoincrement->render(), null, 'data');
+ } elseif($i > 1) {
// Box header row
- $tableOtherForm->addRow('center bgyellow');
- $tableOtherForm->addCell(_AM_TDMCREATE_FIELD_ELEMENTS, 'first', 'header');
+ $this->htmltable_parameters->addRow('center bgyellow');
+ $this->htmltable_parameters->addCell(_AM_TDMCREATE_FIELD_ELEMENTS, 'first', 'header');
// fieldelements
$fieldelementsHandler=& xoops_getModuleHandler('fieldelements');
- $field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element_name', $this->getVar('field_element_name'));
- $field_elements_select->addOptionArray($fieldelementsHandler->getList());
+ $field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element_name', $this->getVar('field_element_name'));
+ $field_elements_select->addOptionArray($fieldelementsHandler->getList());
$criteria = new CriteriaCompo(new Criteria('table_id', $table_id));
- $criteria->add(new Criteria('table_mid', $table_mid));
+ $criteria->add(new Criteria('table_mid', $table_mid));
$criteria->setSort('table_name');
$criteria->setOrder('ASC');
$tbls_arr1 = $tablesHandler->getAll($criteria);
unset($criteria);
- foreach (array_keys($tbls_arr1) as $j)
- {
+ foreach (array_keys($tbls_arr1) as $j)
+ {
$tbls_name1 = $tbls_arr1[$j]->getVar('table_name');
- if ( $j[$i] == 'XoopsFormTables-'.$tbls_name1 ) {
- $field_elements_select->addOption('XoopsFormTables-'.$tbls_name1, 'Table : '.$tbls_name1);
- }
+ if ( $j[$i] == 'XoopsFormTables-'.$tbls_name1 ) {
+ $field_elements_select->addOption('XoopsFormTables-'.$tbls_name1, 'Table : '.$tbls_name1);
+ }
}
// data row
- $tableOtherForm->addRow();
- $tableOtherForm->addCell($field_elements_select->render(), null, 'data');
+ $this->htmltable_parameters->addRow();
+ $this->htmltable_parameters->addCell($field_elements_select->render(), null, 'data');
$field_display_admin = $this->isNew() ? 0 : $this->getVar('field_display_admin');
$check_field_display_admin = new XoopsFormCheckBox(' ', 'field_display_admin', $field_display_admin);
- $check_field_display_admin->addOption(1, _AM_TDMCREATE_FIELD_DISPLAY_ADMIN);
+ $check_field_display_admin->addOption(1, _AM_TDMCREATE_FIELD_ADMIN);
// data row
- $tableOtherForm->addRow();
- $tableOtherForm->addCell($check_field_display_admin->render(), null, 'data');
+ $this->htmltable_parameters->addRow();
+ $this->htmltable_parameters->addCell($check_field_display_admin->render(), null, 'data');
$field_display_user = $this->isNew() ? 0 : $this->getVar('field_display_user');
$check_field_display_user = new XoopsFormCheckBox(' ', 'field_display_user', $field_display_user);
- $check_field_display_user->addOption(1, _AM_TDMCREATE_FIELD_DISPLAY_USER);
+ $check_field_display_user->addOption(1, _AM_TDMCREATE_FIELD_USER);
// data row
- $tableOtherForm->addRow();
- $tableOtherForm->addCell($check_field_display_user->render(), null, 'data');
+ $this->htmltable_parameters->addRow();
+ $this->htmltable_parameters->addCell($check_field_display_user->render(), null, 'data');
$field_display_block = $this->isNew() ? 0 : $this->getVar('field_display_block');
$check_field_display_block = new XoopsFormCheckBox(' ', 'field_display_block', $field_display_block);
- $check_field_display_block->addOption(1, _AM_TDMCREATE_FIELD_DISPLAY_BLOCK);
+ $check_field_display_block->addOption(1, _AM_TDMCREATE_FIELD_BLOCK);
// data row
- $tableOtherForm->addRow();
- $tableOtherForm->addCell($check_field_display_block->render(), null, 'data');
+ $this->htmltable_parameters->addRow();
+ $this->htmltable_parameters->addCell($check_field_display_block->render(), null, 'data');
$field_mnfield = $this->isNew() ? 0 : $this->getVar('field_mainfield');
$field_mainfield = new XoopsFormRadio(' ', 'field_mainfield', $field_mnfield);
$field_mainfield->addOption( ' ', _AM_TDMCREATE_FIELD_MAINFIELD );
// data row
- $tableOtherForm->addRow();
- $tableOtherForm->addCell($field_mainfield->render(), null, 'data');
+ $this->htmltable_parameters->addRow();
+ $this->htmltable_parameters->addCell($field_mainfield->render(), null, 'data');
$field_search = $this->isNew() ? 0 : $this->getVar('field_search');
$check_field_search = new XoopsFormCheckBox(' ', 'field_search', $field_search);
- $check_field_search->addOption(1, _AM_TDMCREATE_FIELD_SEARCH);
+ $check_field_search->addOption(1, _AM_TDMCREATE_FIELD_SEARCH);
// data row
- $tableOtherForm->addRow();
- $tableOtherForm->addCell($check_field_search->render(), null, 'data');
+ $this->htmltable_parameters->addRow();
+ $this->htmltable_parameters->addCell($check_field_search->render(), null, 'data');
$field_required = $this->isNew() ? 0 : $this->getVar('field_required');
$check_field_required = new XoopsFormCheckBox(' ', 'field_required', $field_required);
$check_field_required->addOption(1, _AM_TDMCREATE_FIELD_REQUIRED);
// data row
- $tableOtherForm->addRow();
- $tableOtherForm->addCell($check_field_required->render(), null, 'data');
- }
- $tableForm->addCell($tableOtherForm->render(), null, 'data');
-
+ $this->htmltable_parameters->addRow();
+ $this->htmltable_parameters->addCell($check_field_required->render(), null, 'data');
+ }
+ $this->htmltable->addCell($this->htmltable_parameters->render(), null, 'data');
+
if (!$this->isNew()) {
- $tableFormHiddenId = new XoopsFormHidden('table_id', $this->getVar('table_id'));
- //$form->addElement(new XoopsFormHidden('fields_modified', true));
- }
+ $tableId_Hidden = new XoopsFormHidden('table_id', $this->table->getVar('table_id'));
+ $form->addElement($tableId_Hidden);
+ //$form->addElement(new XoopsFormHidden('fields_modified', true));
+ }
}
- $form->addElement($tableForm->render());
- /*if (!$this->isNew()) {
- $form->addElement(new XoopsFormHidden('table_id', $this->getVar('table_id')));
- $form->addElement(new XoopsFormHidden('fields_modified', true));
- }
-
- $form->addElement(new XoopsFormHidden('op', 'save_fields'));
- $form->addElement(new XoopsFormHidden('field_tid', $this->getVar('field_tid')));
- $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));*/
- $tableFormButton = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
- $tableForm->addRow('right grey');
- $tableForm->addCell($tableFormButton, null, 'data');
- $form->addElement(new XoopsFormHidden('op', 'save_fields'));
- $form->addElement($tableForm);
- $form->addElement($tableFormButton);
+ $formHidden = new XoopsFormHidden('op', 'save_fields');
+ $formButton = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
+ $this->htmltable->addCell($formHidden->render(), null, 'data');
+ $this->htmltable->addCell($formButton->render(), null, 'data');
+ $form->addElement($this->htmltable->render());
return $form;
}
}
-class TDMCreateFieldsHandler extends XoopsPersistableObjectHandler
+class TDMCreateFieldsHandler extends XoopsPersistableObjectHandler
{
- function __construct(&$db)
+ function __construct(&$db)
{
parent::__construct($db, 'mod_tdmcreate_fields', 'tdmcreatefields', 'field_id', 'field_tid');
}
-}
+}
\ No newline at end of file
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields_class.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields_class.php 2014-03-25 08:52:13 UTC (rev 12409)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields_class.php 2014-03-27 00:26:31 UTC (rev 12410)
@@ -1,249 +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.
- */
-/**
- * tdmcreate module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
- * @package tdmcreate
- * @since 2.5.0
- * @author Txmod Xoops http://www.txmodxoops.org
- * @version $Id: fields_class.php 12258 2014-01-02 09:33:29Z timgno $
- */
-if (!defined('XOOPS_ROOT_PATH')) {
- die('XOOPS root path not defined');
-}
-
-class FieldsClass /*extends HeaderFile*/
-{
- /*
- * @var string
- */
- public $_module = null;
- /*
- * @var array
- */
- public $_table = array();
- /*
- * @var array
- */
- public $_type = array();
- /*
- * @var string
- */
- public $file_name = null;
- /*
- * @public function constructor
- * @param string $modules
- */
- public function __construct($module, $table, $file_name) {
- $this->_module = $module;
- $this->_table[] = $table;
- $this->file_name = $file_name;
- }
- /*
- * @public function getInitVar
- * @param array $element_name
- * @param mixed $xobj_dtype
- */
- public function getInitVar(array $element_name, $xobj_dtype) {
- $ret = <<<EOT
- \$this->initVar('{$element_name[0]}', {$xobj_dtype});
-EOT;
- return $ret;
- }
- /*
- * @public function render
- * @param null
- */
- public function render() {
- $module_name = $this->getModuleName();
- $language = $this->getLanguage('_AM_', '_');
- // fpda = fields parameter display admin
- // fpe = fields parameter element
- // fprf = fields parameter required field
- $mod_name = strtolower($mod_name);
- $table_name = strtolower($table_name);
- $table_fieldname = strtolower($table_fieldname);
- $ret = '';
- // Counts the number of fields
- $fields = explode('|', $table_fields);
- $nb_fields = count($fields);
- // Retrieve the data
- if ( $option == 0 )
- {
- // Creation of the constructor
- for ($i = 0; $i < $nb_fields; $i++)
- {
- $struct = explode(':', $fields[$i]);
- if ( $struct[1] == 'int' || $struct[1] == 'tinyint' || $struct[1] == 'mediumint' || $struct[1] == 'smallint' ) {
- $ret .= <<<EOT
- \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_INT);
-EOT;
- } elseif ( $struct[1] == 'char' || $struct[1] == 'varchar' ) {
- $ret .= <<<EOT
- \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_TXTBOX);
-EOT;
- } elseif ( $struct[1] == 'text' || $struct[1] == 'tinytext' || $struct[1] == 'mediumtext' || $struct[1] == 'longtext' ) {
- $ret .= <<<EOT
- \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_TXTAREA);';
- } elseif ( $struct[1] == 'float' ) {
- $ret .= <<<EOT
- \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_FLOAT);';
- } elseif ( $struct[1] == 'decimal' || $struct[1] == 'double' ) {
- $ret .= <<<EOT
- \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_DECIMAL);';
- } elseif ( $struct[1] == 'enum' ) {
- $ret .= <<<EOT
- \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_ENUM);';
- } elseif ( $struct[1] == 'email' ) {
- $ret .= <<<EOT
- \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_EMAIL);';
- } elseif ( $struct[1] == 'url' ) {
- $ret .= <<<EOT
- \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_URL);';
- } elseif ( $struct[1] == 'date' || $struct[1] == 'datetime' || $struct[1] == 'timestamp' || $struct[1] == 'time' || $struct[1] == 'year' ) {
- $ret .= <<<EOT
- \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_LTIME);';
- }/* elseif ( $struct[1] == 'other' ) {
- $ret .= <<<EOT
- \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_OTHER, '.$struct[2].', false);';
- }*/
- }
- } else if ( $option == 1 ) {
- // Creation form
- for ($i=0; $i < $nb_fields; $i++)
- {
- if ( $i != 0 ) {
- $struct = explode(':', $fields[$i]);
- $lng_form = $language.strtoupper($struct[0]);
- $ret .= <<<EOT
- $this->form_elements($i, $mod_name, $table_name, $table_fieldname, $fpe, $fprf, $lng_form, $struct[0]);
- }
- }
- } else if ( $option == 2 ) {
- // Creation of file mysql.sql
- $ret .= <<<EOT
-
-#
-# Structure table for `mod_'.$mod_name.'_'.strtolower($table_name).'` '.$nb_fields.'
-#
-
-CREATE TABLE `mod_'.$mod_name.'_'.strtolower($table_name).'` (
-';
- $j = 0;
- for ($i=0; $i < $nb_fields; $i++)
- {
- $struct = explode(':', $fields[$i]);
-// echo "--- START ----------------- STRUCTURE -------------------------------------</br>";
-// var_dump($struct);
- //Debut
- if ( $struct[0] != ' ' )
- {
- //If as text, (not value)
- if ( $struct[1] == 'text' || $struct[1] == 'date' || $struct[1] == 'timestamp' ) {
- $type = $struct[1];
- } else {
- $type = $struct[1].' ('.$struct[2].')';
- }
- //If as empty is default not string(not value), if as text not default, if as numeric default is 0 or 0.0000
- //echo $struct[5]." struct[5] --------------- </br>";
- if ( $struct[5] == '' ) {
- $default = "default ''";
- //echo " default 1 </br>";
- } elseif ( $struct[1] == 'text' || $struct[1] == 'tinytext' || $struct[1] == 'mediumtext' || $struct[1] == 'longtext' ) {
- $default = "";
- // echo " default 2 </br>";
- } elseif ( $struct[1] == 'int' || $struct[1] == 'tinyint' || $struct[1] == 'mediumint' || $struct[1] == 'smallint') {
- $default = "default '0'";
- //echo " default 3 </br>";
- } elseif ( $struct[1] == 'decimal' || $struct[1] == 'double' || $struct[1] == 'float' ) {
- $default = "default '0.0000'";
- // echo " default 4 </br>";
- } elseif ( $struct[1] == 'date' ) {
- // echo " default 5 </br>";
- $default = "default '0000-00-00'";
- } elseif ( $struct[1] == 'datetime' || $struct[1] == 'timestamp') {
- $default = "default '0000-00-00 00:00:00'";
- //echo " default 6 </br>";
- } elseif ( $struct[1] == 'time' ) {
- $default = "default '00:00:00'";
- // echo " default 7 </br>";
- } elseif ( $struct[1] == 'year' ) {
- $default = "default '0000'";
- //echo " default 8 </br>";
- } elseif ( $struct[1] == 'other' ) {
- $default = "default '".$struct[5]."'";
- //echo " default 9 </br>";
- } else {
- $default = "default ''";
- //echo " default 10 </br>";
- }
-
-// echo $default." Default </br>";
-// echo $struct[0]." struct[0] </br>";
-// echo $struct[6]." struct[6] </br>";
-
- if ( $i == 0 ) {
- $comma[$j] = 'PRIMARY KEY (`'.$struct[0].'`)';
- $j++;
- $ret .= <<<EOT`'.$struct[0].'` '.$type.' '.$struct[3].' '.$struct[4].' auto_increment,
-';
- } else {
- if ( $struct[6] == 'unique' || $struct[6] == 'index' || $struct[6] == 'fulltext')
- {
- if ( $struct[6] == 'unique' ) {
- $ret .= <<<EOT`'.$struct[0].'` '.$type.' '.$struct[3].' '.$struct[4].' '.$default.',
-';
- $comma[$j] = 'KEY `'.$struct[0].'` (`'.$struct[0].'`)';
- } else if ( $struct[6] == 'index' ) {
- $ret .= <<<EOT`'.$struct[0].'` '.$type.' '.$struct[3].' '.$struct[4].' '.$default.',
-';
- $comma[$j] = 'INDEX (`'.$struct[0].'`)';
- } else if ( $struct[6] == 'fulltext' ) {
- $ret .= <<<EOT`'.$struct[0].'` '.$type.' '.$struct[3].' '.$struct[4].' '.$default.',
-';
- $comma[$j] = 'FULLTEXT KEY `'.$struct[0].'` (`'.$struct[0].'`)';
- }
- $j++;
- } else {
- $ret .= <<<EOT`'.$struct[0].'` '.$type.' '.$struct[3].' '.$struct[4].' '.$default.',
-';
- }
- }
- }
-// echo $i."--- i -------</br>";
-// echo $j."--- j -------</br>";
-// var_dump($comma);
-// echo $comma[$i]."comma[i] </br>";
-// echo $text."</br>";
- }
- //Problem comma
- $key = '';
- for ($i=0; $i < $j; $i++)
- {
- if ( $i != $j - 1 ) {
- $key .= $comma[$i].',
-';
- } else {
- $key .= $comma[$i].'
-';
- }
- }
- // echo $key."================= KEY ========================= </br>";
- $ret .= <<<EOT$key;
- $ret .= <<<EOT) ENGINE=MyISAM;';
- }
- return $text;
-EOT;
- return $ret;
- }
-}
\ No newline at end of file
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields_database.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields_database.php 2014-03-25 08:52:13 UTC (rev 12409)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields_database.php 2014-03-27 00:26:31 UTC (rev 12410)
@@ -1,250 +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.
- */
-/**
- * tdmcreate module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
- * @package tdmcreate
- * @since 2.5.0
- * @author Txmod Xoops http://www.txmodxoops.org
- * @version $Id: fields_database.php 12258 2014-01-02 09:33:29Z timgno $
- */
-if (!defined('XOOPS_ROOT_PATH')) {
- die('XOOPS root path not defined');
-}
-
-class FieldsDatabase /*extends HeaderFile*/
-{
- /*
- * @var string
- */
- public $_module = null;
- /*
- * @var string
- */
- public $_table = array();
- /*
- * @var string
- */
- public $file_name = null;
- /*
- * @public function constructor
- * @param string $modules
- */
- public function __construct($module, $table, $file_name) {
- $this->_module = $module;
- $this->_table[] = $table;
- $this->file_name = $file_name;
- }
- /*
- * @public function getSupportName
- * @param null
- */
- public function getDatabaseTypes() {
- $ret = $this->_module->getVar('mod_support_name');
- return $ret;
- }
- /*
- * @public function getSupportName
- * @param null
- */
- public function getDatabaseFields() {
- $ret = $this->_module->getVar('mod_support_url');
- return $ret;
- }
- /*
- * @public function render
- * @param null
- */
- public function render() {
- $module_name = $this->getModuleName();
- $language = $this->getLanguage('_AM_', '_');
- // fpda = fields parameter display admin
- // fpe = fields parameter element
- // fprf = fields parameter required field
- $mod_name = strtolower($mod_name);
- $table_name = strtolower($table_name);
- $table_fieldname = strtolower($table_fieldname);
- $text = '';
- // Counts the number of fields
- $fields = explode('|', $table_fields);
- $nb_fields = count($fields);
- // Retrieve the data
- if ( $option == 0 )
- {
- // Creation of the constructor
- for ($i = 0; $i < $nb_fields; $i++)
- {
- $struct = explode(':', $fields[$i]);
- if ( $struct[1] == 'int' || $struct[1] == 'tinyint' || $struct[1] == 'mediumint' || $struct[1] == 'smallint' ) {
- $ret .= <<<EOT
- \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_INT);
-EOT;
- } elseif ( $struct[1] == 'char' || $struct[1] == 'varchar' ) {
- $ret .= <<<EOT
- \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_TXTBOX);
-EOT;
- } elseif ( $struct[1] == 'text' || $struct[1] == 'tinytext' || $struct[1] == 'mediumtext' || $struct[1] == 'longtext' ) {
- $ret .= <<<EOT
- \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_TXTAREA);';
- } elseif ( $struct[1] == 'float' ) {
- $ret .= <<<EOT
- \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_FLOAT);';
- } elseif ( $struct[1] == 'decimal' || $struct[1] == 'double' ) {
- $ret .= <<<EOT
- \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_DECIMAL);';
- } elseif ( $struct[1] == 'enum' ) {
- $ret .= <<<EOT
- \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_ENUM);';
- } elseif ( $struct[1] == 'email' ) {
- $ret .= <<<EOT
- \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_EMAIL);';
- } elseif ( $struct[1] == 'url' ) {
- $ret .= <<<EOT
- \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_URL);';
- } elseif ( $struct[1] == 'date' || $struct[1] == 'datetime' || $struct[1] == 'timestamp' || $struct[1] == 'time' || $struct[1] == 'year' ) {
- $ret .= <<<EOT
- \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_LTIME);';
- }/* elseif ( $struct[1] == 'other' ) {
- $ret .= <<<EOT
- \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_OTHER, '.$struct[2].', false);';
- }*/
- }
- } else if ( $option == 1 ) {
- // Creation form
- for ($i=0; $i < $nb_fields; $i++)
- {
- if ( $i != 0 ) {
- $struct = explode(':', $fields[$i]);
- $lng_form = $language.strtoupper($struct[0]);
- $ret .= <<<EOT
- $this->form_elements($i, $mod_name, $table_name, $table_fieldname, $fpe, $fprf, $lng_form, $struct[0]);
- }
- }
- } else if ( $option == 2 ) {
- // Creation of file mysql.sql
- $ret .= <<<EOT
-
-#
-# Structure table for `mod_'.$mod_name.'_'.strtolower($table_name).'` '.$nb_fields.'
-#
-
-CREATE TABLE `mod_'.$mod_name.'_'.strtolower($table_name).'` (
-';
- $j = 0;
- for ($i=0; $i < $nb_fields; $i++)
- {
- $struct = explode(':', $fields[$i]);
-// echo "--- START ----------------- STRUCTURE -------------------------------------</br>";
-// var_dump($struct);
- //Debut
- if ( $struct[0] != ' ' )
- {
- //If as text, (not value)
- if ( $struct[1] == 'text' || $struct[1] == 'date' || $struct[1] == 'timestamp' ) {
- $type = $struct[1];
- } else {
- $type = $struct[1].' ('.$struct[2].')';
- }
- //If as empty is default not string(not value), if as text not default, if as numeric default is 0 or 0.0000
- //echo $struct[5]." struct[5] --------------- </br>";
- if ( $struct[5] == '' ) {
- $default = "default ''";
- //echo " default 1 </br>";
- } elseif ( $struct[1] == 'text' || $struct[1] == 'tinytext' || $struct[1] == 'mediumtext' || $struct[1] == 'longtext' ) {
- $default = "";
- // echo " default 2 </br>";
- } elseif ( $struct[1] == 'int' || $struct[1] == 'tinyint' || $struct[1] == 'mediumint' || $struct[1] == 'smallint') {
- $default = "default '0'";
- //echo " default 3 </br>";
- } elseif ( $struct[1] == 'decimal' || $struct[1] == 'double' || $struct[1] == 'float' ) {
- $default = "default '0.0000'";
- // echo " default 4 </br>";
- } elseif ( $struct[1] == 'date' ) {
- // echo " default 5 </br>";
- $default = "default '0000-00-00'";
- } elseif ( $struct[1] == 'datetime' || $struct[1] == 'timestamp') {
- $default = "default '0000-00-00 00:00:00'";
- //echo " default 6 </br>";
- } elseif ( $struct[1] == 'time' ) {
- $default = "default '00:00:00'";
- // echo " default 7 </br>";
- } elseif ( $struct[1] == 'year' ) {
- $default = "default '0000'";
- //echo " default 8 </br>";
- } elseif ( $struct[1] == 'other' ) {
- $default = "default '".$struct[5]."'";
- //echo " default 9 </br>";
- } else {
- $default = "default ''";
- //echo " default 10 </br>";
- }
-
-// echo $default." Default </br>";
-// echo $struct[0]." struct[0] </br>";
-// echo $struct[6]." struct[6] </br>";
-
- if ( $i == 0 ) {
- $comma[$j] = 'PRIMARY KEY (`'.$struct[0].'`)';
- $j++;
- $ret .= <<<EOT`'.$struct[0].'` '.$type.' '.$struct[3].' '.$struct[4].' auto_increment,
-';
- } else {
- if ( $struct[6] == 'unique' || $struct[6] == 'index' || $struct[6] == 'fulltext')
- {
- if ( $struct[6] == 'unique' ) {
- $ret .= <<<EOT`'.$struct[0].'` '.$type.' '.$struct[3].' '.$struct[4].' '.$default.',
-';
- $comma[$j] = 'KEY `'.$struct[0].'` (`'.$struct[0].'`)';
- } else if ( $struct[6] == 'index' ) {
- $ret .= <<<EOT`'.$struct[0].'` '.$type.' '.$struct[3].' '.$struct[4].' '.$default.',
-';
- $comma[$j] = 'INDEX (`'.$struct[0].'`)';
- } else if ( $struct[6] == 'fulltext' ) {
- $ret .= <<<EOT`'.$struct[0].'` '.$type.' '.$struct[3].' '.$struct[4].' '.$default.',
-';
- $comma[$j] = 'FULLTEXT KEY `'.$struct[0].'` (`'.$struct[0].'`)';
- }
- $j++;
- } else {
- $ret .= <<<EOT`'.$struct[0].'` '.$type.' '.$struct[3].' '.$struct[4].' '.$default.',
-';
- }
- }
- }
-// echo $i."--- i -------</br>";
-// echo $j."--- j -------</br>";
-// var_dump($comma);
-// echo $comma[$i]."comma[i] </br>";
-// echo $text."</br>";
- }
- //Problem comma
- $key = '';
- for ($i=0; $i < $j; $i++)
- {
- if ( $i != $j - 1 ) {
- $key .= $comma[$i].',
-';
- } else {
- $key .= $comma[$i].'
-';
- }
- }
- // echo $key."================= KEY ========================= </br>";
- $ret .= <<<EOT$key;
- $ret .= <<<EOT) ENGINE=MyISAM;';
- }
- return $text;
-EOT;
- return $ret;
- }
-}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-03-25 08:52:13 UTC (rev 12409)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-03-27 00:26:31 UTC (rev 12410)
@@ -27,15 +27,15 @@
/*
* @var mixed
*/
- public $structure = null;
+ private $structure = null;
/*
* @var mixed
*/
- public $path = null;
+ private $path = null;
/*
* @var mixed
*/
- public $upload_path = null;
+ private $upload_path = null;
/*
* @public function constructor class
* @param null
@@ -76,15 +76,17 @@
public function getArchitectureFiles( $module )
{
$indexFile = $this->path.'/index.html';
+ $docs_folder = $this->path.'/docs';
//Creation of the Directory of modules
- $targetDirectory = $this->upload_path.'/'. str_replace(' ', '', strtolower($module->getVar('mod_name')));
- $upload_folder_docs = $targetDirectory.'/docs';
- $upload_folder_images = $targetDirectory.'/images';
+ $targetDirectory = $this->upload_path.'/modules/'. str_replace(' ', '', strtolower($module->getVar('mod_name')));
+ $upload_images_folder = $this->upload_path.'/images/modules';
// Creation of "module" folder
$this->structure->getPath($targetDirectory);
// Creation of "module" folder
$this->structure->makeDir($targetDirectory);
+ // Copied of index.html file in "root module" folder
+ $this->structure->copyFile('', $indexFile, 'index.html');
// Creation of "admin" folder and index.html file
$this->structure->makeDirAndCopyFile('admin', $indexFile, 'index.html');
// Creation of "blocks" folder and index.html file
@@ -97,7 +99,7 @@
$this->structure->makeDirAndCopyFile('images', $indexFile, 'index.html');
//Copy the logo of the module
$mod_image = str_replace(' ', '', strtolower($module->getVar('mod_image')));
- $this->structure->copyFile('images', $upload_folder_images.'/modules/'.$mod_image, $mod_image);
+ $this->structure->copyFile('images', $upload_images_folder.'/'.$mod_image, $mod_image);
// Creation of 'images/icons' folder and index.html file - Added in Version 1.15
$this->structure->makeDirAndCopyFile('images/icons', $indexFile, 'index.html');
@@ -112,20 +114,20 @@
// Creation of 'arrow.gif' file
//$this->structure->copyFile('images/icons/16', $upload_folder_images.'/icons/16/arrow.gif', 'arrow.gif');
// Creation of 'txmodxoops_logo.png' file
- $this->structure->copyFile('images', $upload_folder_images.'/txmodxoops_logo.png', 'txmodxoops_logo.png');
+ $this->structure->copyFile('images', $upload_images_folder.'/txmodxoops_logo.png', 'txmodxoops_logo.png');
// Creation of 'docs' folder and index.html file
$this->structure->makeDirAndCopyFile('docs', $indexFile, 'index.html');
// Creation of 'credits.txt' file
- $this->structure->copyFile('docs', $fdocs.'/credits.txt', 'credits.txt');
+ $this->structure->copyFile('docs', $docs_folder.'/credits.txt', 'credits.txt');
// Creation of 'install.txt' file
- $this->structure->copyFile('docs', $fdocs.'/install.txt', 'install.txt');
+ $this->structure->copyFile('docs', $docs_folder.'/install.txt', 'install.txt');
// Creation of 'lang_diff.txt' file
- $this->structure->copyFile('docs', $fdocs.'/lang_diff.txt', 'lang_diff.txt');
+ $this->structure->copyFile('docs', $docs_folder.'/lang_diff.txt', 'lang_diff.txt');
// Creation of 'license.txt' file
- $this->structure->copyFile('docs', $fdocs.'/license.txt', 'license.txt');
+ $this->structure->copyFile('docs', $docs_folder.'/license.txt', 'license.txt');
// Creation of 'readme.txt' file
- $this->structure->copyFile('docs', $fdocs.'/readme.txt', 'readme.txt');
+ $this->structure->copyFile('docs', $docs_folder.'/readme.txt', 'readme.txt');
// Creation of "include" folder and index.html file
$this->structure->makeDirAndCopyFile('include', $indexFile, 'index.html');
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/htmltable.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/htmltable.php 2014-03-25 08:52:13 UTC (rev 12409)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/htmltable.php 2014-03-27 00:26:31 UTC (rev 12410)
@@ -18,7 +18,7 @@
* @author Txmod Xoops http://www.txmodxoops.org
* @version $Id: htmltable.php 12258 2014-01-02 09:33:29Z timgno $
*/
-if (!defined('XOOPS_ROOT_PATH')) { die("XOOPS root path not defined"); }
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
/**
* Base class for html tables
@@ -27,8 +27,7 @@
* @package tdmcreate
* @access public
*/
-//xoops_load('XoopsFormElement');
-class TDMCreateHtmlTable /*extends XoopsFormElement*/
+class TDMCreateHtmlTable
{
/**
* array of {@TDMCreateHtmlTable} objects
@@ -49,15 +48,15 @@
*
* @var string
*/
- private $table_string = '';
-
+ private $data = '';
+
/**
* string of {@link TDMCreateHtmlTable} objects
*
* @var string
*/
- private $data = '';
-
+ private $_id = '';
+
/**
* string of {@link TDMCreateHtmlTable} objects
*
@@ -84,7 +83,7 @@
*
* @param null
*/
- public function __construct()
+ public function __construct()
{
}
@@ -106,17 +105,17 @@
*
* @param string $id attribute of the table
* @param string $_class "css class" attribute for the <table> tag
- * @param int $border "border" attribute for the <table> tag
- * @param int $cellspacing "cellspacing" attribute for the <table> tag
- * @param int $cellpadding "cellpadding" attribute for the <table> tag
- * @param array $attributes attributes for the <table> tag
+ * @param mixed $attributes attributes for the <table> tag
*/
- public function initTable($id = '', $_class = '', $border = 0, $cellspacing = 2, $cellpadding = 0, $attributes = array() )
- {
- $this->table_string = '<table' . ( !empty($id) ? ' id="' . $id . '"' : '' );
- $this->table_string .= ( !empty($_class) ? ' class="' . $_class . '"' : '' );
- $this->table_string .= $this->addAttributes( $attributes );
- $this->table_string .= ' border="' . $border . '" cellspacing="' . $cellspacing . '" cellpadding="' . $cellpadding . '">';
+ public function initTable($_class = null, $id = null, $attributes = false )
+ {
+ $ret = '<table' . ( !empty($id) ? ' id="' . $id . '"' : '' );
+ $ret .= ( !empty($_class) ? ' class="' . $_class . '"' : '' );
+ if($attributes && is_array($attributes)) {
+ $ret .= $this->addAttributes( $attributes );
+ }
+ $ret .= '>';
+ return $ret;
}
/**
@@ -125,10 +124,10 @@
* @param array $attributes
* @return string
*/
- public function addAttributes( $attributes )
+ public function addAttributes( $attributes = array() )
{
$str = '';
- if (is_array( $attributes )) {
+ if(is_array( $attributes )) {
foreach( $attributes as $k => $v ) {
$str .= " {$k}=\"{$v}\"";
}
@@ -140,13 +139,15 @@
* Add an element row to the table
*
* @param string $_class
- * @param array $attributes
+ * @param mixed $attributes
*/
- public function addRow($class = '', $attributes = array() )
- {
- $row = self::getInstance();
+ public function addRow( $class = '', $attributes = null )
+ {
+ $row = self::getInstance();
$row->addTableRow( $class, $attributes );
- array_push( $this->rows, $row );
+ if(is_array( $attributes )) {
+ array_push( $this->rows, $row );
+ }
}
/**
@@ -155,28 +156,30 @@
* @param object $data reference to a {@link XoopsFormElement}
* @param string $class css element
* @param string $type reference to a header or data
- * @param array $attributes attributes for a cell
+ * @param mixed $attributes attributes for a cell
*/
- public function addCell($data, $class = '', $type = 'data', $attributes = array() )
+ public function addCell( $data, $class = '', $type = 'data', $attributes = null )
{
$cell = self::getInstance();
$cell->addTableCell( $data, $class, $type, $attributes );
// add new cell to current row's list of cells
$curRow =& $this->rows[ count( $this->rows ) - 1 ]; // copy by reference
- if(isset($curRow->cells) && isset($cell)) {
- array_push( $curRow->cells, $cell );
+ if(is_array( $attributes )) {
+ if(isset($curRow->cells) && isset($cell)) {
+ array_push( $curRow->cells, $cell );
+ }
}
}
/**
* Add an array of cells
*
- * @param object $data reference to a {@link XoopsFormElement}
+ * @param object $data content text
* @param string $_class css element
* @param string $type reference to a header or data
* @param array $attributes attributes for a cell
*/
- public function addCells($data, $class = '', $type = 'data', $attributes = array() )
+ public function addCells( $data, $class = '', $type = 'data', $attributes = array() )
{
if (is_array($data)) {
foreach( $data as $data_cell ) {
@@ -184,6 +187,27 @@
}
}
}
+
+ /**
+ * Add Cell for tables
+ *
+ * return end of html table
+ */
+ public function getRows($rows)
+ {
+ $ret = '';
+ $this->rows = $rows;
+ if (is_array( $this->rows )) {
+ foreach( $this->rows as $row )
+ {
+ $ret .= !empty($row->_class) ? '<tr class="' . $row->_class . '"' : '<tr';
+ $ret .= $this->addAttributes( $row->attributes ) . '>';
+ $ret .= $this->getRowCells( $row->cells );
+ $ret .= '</tr>';
+ }
+ }
+ return $ret;
+ }
/**
* get an array of row & cells
@@ -195,24 +219,26 @@
{
$str = '';
$this->cells = $cells;
- foreach( $this->cells as $cell )
- {
- $tag = ($cell->type == 'data')? 'td': 'th';
- $str .= !empty($cell->_class) ? '<' . $tag . ' class="' . $cell->_class . '"' : '<' . $tag;
- $str .= $this->addAttributes( $cell->attributes ) . '>';
- $str .= $cell->data;
- $str .= '</' . $tag . '>';
- }
+ if (is_array( $this->cells )) {
+ foreach( $this->cells as $cell )
+ {
+ $tag = ($cell->type == 'data')? 'td': 'th';
+ $str .= !empty($cell->_class) ? '<' . $tag . ' class="' . $cell->_class . '"' : '<' . $tag;
+ $str .= $this->addAttributes( $cell->attributes ) . '>';
+ $str .= $cell->data;
+ $str .= '</' . $tag . '>';
+ }
+ }
return $str;
}
/**
* Add Row for tables
*
- * @author TXMod Xoops <in...@tx...>
- * @package tdmcreate
+ * @param string $class css element
+ * @param mixed $attributes attributes for a cell
*/
- public function addTableRow($class = '', $attributes = null)
+ public function addTableRow( $class = '', $attributes = null )
{
$this->_class = $class;
if(!is_array($attributes)){
@@ -225,30 +251,48 @@
/**
* Add Cell for tables
*
- * @author TXMod Xoops <in...@tx...>
- * @package tdmcreate
+ * @param string $data content text
+ * @param string $class css style
+ * @param string $type reference to a header or data
+ * @param array $attributes attributes for a cell
*/
- public function addTableCell( $data, $class = '', $type = '', $attributes = array())
+ public function addTableCell( $data, $class = '', $type = '', $attributes = null )
{
$this->data = $data;
$this->_class = $class;
$this->type = $type;
- $this->attributes = $attributes;
+ if(!is_array($attributes)){
+ $this->attributes[] = $attributes;
+ } else {
+ $this->attributes = $attributes;
+ }
}
+
+ /**
+ * Add Cell for tables
+ *
+ * return end of html table
+ */
+ public function endTable()
+ {
+ $ret = '';
+ $class = $this->_class;
+ $attributes = $this->attributes;
+ $rows = $this->addRow( $class, $attributes );
+ $ret .= $this->getRows($rows);
+ $ret .= '</table>';
+ return $ret;
+ }
/**
- * render html table
+ * Render Function
+ *
+ * return html table
*/
public function render()
{
- foreach( $this->rows as $row )
- {
- $this->table_string .= !empty($row->_class) ? '<tr class="' . $row->_class . '"' : '<tr';
- $this->table_string .= $this->addAttributes( $row->attributes ) . '>';
- $this->table_string .= $this->getRowCells( $row->cells );
- $this->table_string .= '</tr>';
- }
- $this->table_string .= '</table>';
- return $this->table_string;
+ $ret = $this->initTable($id = '', $_class = '', $border = 0, $cellspacing = 2, $cellpadding = 0, $attributes = array() );
+ $ret .= $this->endTable();
+ return $ret;
}
}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/logoGenerator.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/logoGenerator.php 2014-03-25 08:52:13 UTC (rev 12409)
+++ XoopsModules/TDMCreate/bra...
[truncated message content] |
|
From: <be...@us...> - 2014-03-25 08:52:16
|
Revision: 12409
http://sourceforge.net/p/xoops/svn/12409
Author: beckmi
Date: 2014-03-25 08:52:13 +0000 (Tue, 25 Mar 2014)
Log Message:
-----------
Updating changelog
Modified Paths:
--------------
XoopsModules/mymenus/trunk/mymenus/docs/changelog.txt
Modified: XoopsModules/mymenus/trunk/mymenus/docs/changelog.txt
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/docs/changelog.txt 2014-03-25 08:47:48 UTC (rev 12408)
+++ XoopsModules/mymenus/trunk/mymenus/docs/changelog.txt 2014-03-25 08:52:13 UTC (rev 12409)
@@ -2,6 +2,8 @@
- fixed bug: when editing a menu it looses the parent id (trabis)
- changes: Prefix is not used anymore when assigning menus to smarty, choose full name now (trabis)
- added: bootstrap skin with multi level menu support, requires a bootstrap theme prepared to hold the menu (trabis)
+- added: checks for multilingual menus to show only when the language is present (fla-ts/mamba)
+- fixed: bug with adding XOOPS_URL to images (mamba)
<b><u>Version 1.5 Beta 2 (2014-02-10)</u></b>
- fixed some minor issues with block options (mamba)
|
|
From: <be...@us...> - 2014-03-25 08:47:53
|
Revision: 12408
http://sourceforge.net/p/xoops/svn/12408
Author: beckmi
Date: 2014-03-25 08:47:48 +0000 (Tue, 25 Mar 2014)
Log Message:
-----------
Adding checks for Multilingual menus
Modified Paths:
--------------
XoopsModules/mymenus/trunk/mymenus/admin/admin_links.php
XoopsModules/mymenus/trunk/mymenus/admin/admin_menus.php
XoopsModules/mymenus/trunk/mymenus/blocks/mymenus_block.php
XoopsModules/mymenus/trunk/mymenus/class/about.php
XoopsModules/mymenus/trunk/mymenus/class/builder.php
XoopsModules/mymenus/trunk/mymenus/class/links.php
XoopsModules/mymenus/trunk/mymenus/class/menus.php
XoopsModules/mymenus/trunk/mymenus/class/plugin.php
XoopsModules/mymenus/trunk/mymenus/class/registry.php
XoopsModules/mymenus/trunk/mymenus/docs/readme.txt
XoopsModules/mymenus/trunk/mymenus/docs/skins.txt
XoopsModules/mymenus/trunk/mymenus/docs/usage.txt
XoopsModules/mymenus/trunk/mymenus/include/functions.php
XoopsModules/mymenus/trunk/mymenus/include/update.php
XoopsModules/mymenus/trunk/mymenus/include/xoops.php
XoopsModules/mymenus/trunk/mymenus/plugins/constant/constant.php
XoopsModules/mymenus/trunk/mymenus/plugins/dynamic/dynamic.php
XoopsModules/mymenus/trunk/mymenus/plugins/mymenus/mymenus.php
XoopsModules/mymenus/trunk/mymenus/plugins/smarty/smarty.php
XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/templates/template.html
XoopsModules/mymenus/trunk/mymenus/skins/breadcrumb/template.html
XoopsModules/mymenus/trunk/mymenus/skins/clean/template.html
XoopsModules/mymenus/trunk/mymenus/skins/default/templates/template.html
XoopsModules/mymenus/trunk/mymenus/skins/mainmenu/templates/template.html
XoopsModules/mymenus/trunk/mymenus/skins/multiblack/templates/template.html
XoopsModules/mymenus/trunk/mymenus/skins/superfish/templates/template.html
XoopsModules/mymenus/trunk/mymenus/skins/superfish_navbar/templates/template.html
XoopsModules/mymenus/trunk/mymenus/skins/tw_blue/templates/template.html
Modified: XoopsModules/mymenus/trunk/mymenus/admin/admin_links.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/admin/admin_links.php 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/admin/admin_links.php 2014-03-25 08:47:48 UTC (rev 12408)
@@ -28,7 +28,6 @@
$indexAdmin = new ModuleAdmin();
-
if (empty($menus_list)) {
redirect_header('admin_menus.php', 1, _AM_MYMENUS_MSG_NOMENUS);
exit;
@@ -96,30 +95,30 @@
echo mymenus_admin_list($start);
include 'admin_footer.php';
break;
- case 'toggle':
+ case 'toggle':
mymenus_admin_toggle($id, $visible);
break;
case 'order':
- $order = $_POST['mod'];
- parse_str($order,$test);
+ $order = $_POST['mod'];
+ parse_str($order,$test);
- $i = 1;
+ $i = 1;
$this_handler =& xoops_getModuleHandler('links', 'mymenus');
- foreach ($test['mod'] as $order=>$value) {
+ foreach ($test['mod'] as $order=>$value) {
- $obj = $this_handler->get($order);
- $obj->setVar('weight', ++$i);
+ $obj = $this_handler->get($order);
+ $obj->setVar('weight', ++$i);
- /*set submenu*/
- if(isset($value)){
- $obj->setVar('pid', $value);
- }else{
- $obj->setVar('pid', 0);
- }
- $this_handler->insert($obj);
- $this_handler->update_weights($obj);
+ /*set submenu*/
+ if (isset($value)) {
+ $obj->setVar('pid', $value);
+ } else {
+ $obj->setVar('pid', 0);
+ }
+ $this_handler->insert($obj);
+ $this_handler->update_weights($obj);
- }
+ }
break;
case 'list':
default:
@@ -143,13 +142,16 @@
$xoopsLogger->activated = true;
error_reporting(-1);
-
include 'admin_footer.php';
break;
-
}
+/**
+ * @param int $start
+ *
+ * @return bool|mixed|string
+ */
function mymenus_admin_list($start = 0)
{
global $mymenusTpl, $menu_id;
@@ -181,6 +183,10 @@
return $mymenusTpl->fetch($GLOBALS['xoops']->path('modules/mymenus/templates/static/mymenus_admin_links.html'));
}
+/**
+ * @param $id
+ * @param null $redir
+ */
function mymenus_admin_del($id, $redir = null)
{
if (!$GLOBALS['xoopsSecurity']->check()) {
@@ -197,19 +203,19 @@
redirect_header($GLOBALS['mymenus_adminpage'], 1);
}
- //get sub item
- $criteria = new CriteriaCompo();
- $criteria->add(new Criteria('id', $id));
- $criteria->add(new Criteria('pid', $id),'OR');
+ //get sub item
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('id', $id));
+ $criteria->add(new Criteria('pid', $id),'OR');
- //first delete links level 2
- global $xoopsDB;
- $query = "DELETE FROM ".$xoopsDB->prefix("mymenus_links")." WHERE pid = (
- SELECT id FROM (
- SELECT * FROM ".$xoopsDB->prefix("mymenus_links")." WHERE pid = ".$id.") AS sec
- );";
- $result = $xoopsDB->queryF($query);
- //delete links level 0 and 1
+ //first delete links level 2
+ global $xoopsDB;
+ $query = "DELETE FROM ".$xoopsDB->prefix("mymenus_links")." WHERE pid = (
+ SELECT id FROM (
+ SELECT * FROM ".$xoopsDB->prefix("mymenus_links")." WHERE pid = ".$id.") AS sec
+ );";
+ $result = $xoopsDB->queryF($query);
+ //delete links level 0 and 1
if (!$this_handler->deleteAll($criteria)) {
xoops_cp_header();
xoops_error(_AM_MYMENUS_MSG_ERROR, $obj->getVar('id'));
@@ -220,6 +226,9 @@
redirect_header(!is_null($redir) ? base64_decode($redir) : $GLOBALS['mymenus_adminpage'] , 2, _AM_MYMENUS_MSG_SUCCESS);
}
+/**
+ * @param null $redir
+ */
function mymenus_admin_delall($redir = null)
{
if (!$GLOBALS['xoopsSecurity']->check()) {
@@ -235,6 +244,11 @@
redirect_header(!is_null($redir) ? base64_decode($redir) : $GLOBALS['mymenus_adminpage'] , 2, _AM_MYMENUS_MSG_SUCCESS);
}
+/**
+ * @param null $id
+ * @param null $redir
+ * @param string $op
+ */
function mymenus_admin_confirmdel($id = null, $redir = null, $op = 'delok')
{
@@ -271,7 +285,7 @@
if (!isset($_POST['hooks'])) {
$_POST['hooks'] = array();
}
- $obj->setVars($_POST);
+ $obj->setVars($_POST);
$obj->setVar('weight', $weight);
if (!$this_handler->insert($obj)) {
@@ -284,6 +298,9 @@
redirect_header($GLOBALS['mymenus_adminpage'] . '?op=list&menu_id=' . $obj->getVar('mid'), 2, $msg);
}
+/**
+ * @param $id
+ */
function mymenus_admin_edit($id)
{
if (!$GLOBALS['xoopsSecurity']->check()) {
@@ -291,14 +308,12 @@
}
global $menu_id;
+ /* Disable xoops debugger in dialog window */
+ include_once XOOPS_ROOT_PATH.'/class/logger/xoopslogger.php';
+ $xoopsLogger =& XoopsLogger::getInstance();
+ $xoopsLogger->activated = false;
+ error_reporting(0);
- /* Disable xoops debugger in dialog window */
- include_once XOOPS_ROOT_PATH.'/class/logger/xoopslogger.php';
- $xoopsLogger =& XoopsLogger::getInstance();
- $xoopsLogger->activated = false;
- error_reporting(0);
-
-
$this_handler =& xoops_getModuleHandler('links','mymenus');
$obj = $this_handler->get($id);
$obj->setVars($_POST);
@@ -312,13 +327,19 @@
redirect_header($GLOBALS['mymenus_adminpage'] . "?op=list&menu_id=$menu_id", 2, $msg);
}
+/**
+ * @param null $id
+ * @param null $pid
+ *
+ * @return string
+ */
function mymenus_admin_form($id = null, $pid = null)
{
- /* Disable xoops debugger in dialog window */
- include_once XOOPS_ROOT_PATH.'/class/logger/xoopslogger.php';
- $xoopsLogger =& XoopsLogger::getInstance();
- $xoopsLogger->activated = false;
- error_reporting(0);
+ /* Disable xoops debugger in dialog window */
+ include_once XOOPS_ROOT_PATH.'/class/logger/xoopslogger.php';
+ $xoopsLogger =& XoopsLogger::getInstance();
+ $xoopsLogger->activated = false;
+ error_reporting(0);
global $menu_id;
@@ -415,6 +436,10 @@
return $form->render();
}
+/**
+ * @param $id
+ * @param $weight
+ */
function mymenus_admin_move($id, $weight)
{
$this_handler =& xoops_getModuleHandler('links', 'mymenus');
@@ -424,17 +449,21 @@
$this_handler->update_weights($obj);
}
+/**
+ * @param $id
+ * @param $visible
+ */
function mymenus_admin_toggle($id, $visible)
{
- include_once XOOPS_ROOT_PATH.'/class/logger/xoopslogger.php';
- $xoopsLogger =& XoopsLogger::getInstance();
- $xoopsLogger->activated = true;
- error_reporting(0);
+ include_once XOOPS_ROOT_PATH.'/class/logger/xoopslogger.php';
+ $xoopsLogger =& XoopsLogger::getInstance();
+ $xoopsLogger->activated = true;
+ error_reporting(0);
- $this_handler =& xoops_getModuleHandler('links', 'mymenus');
+ $this_handler =& xoops_getModuleHandler('links', 'mymenus');
$obj = $this_handler->get($id);
$visible = ($obj->getVar('visible') == 1) ? 0 : 1;
$obj->setVar('visible', $visible);
$this_handler->insert($obj);
- echo $obj->getVar('visible');
+ echo $obj->getVar('visible');
}
Modified: XoopsModules/mymenus/trunk/mymenus/admin/admin_menus.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/admin/admin_menus.php 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/admin/admin_menus.php 2014-03-25 08:47:48 UTC (rev 12408)
@@ -58,13 +58,18 @@
break;
case 'list':
default:
- xoops_cp_header();
- echo $indexAdmin->addNavigation('admin_menus.php');
+ xoops_cp_header();
+ echo $indexAdmin->addNavigation('admin_menus.php');
echo mymenus_admin_list($start);
include 'admin_footer.php';
break;
}
+/**
+ * @param int $start
+ *
+ * @return bool|mixed|string
+ */
function mymenus_admin_list($start = 0)
{
global $mymenusTpl, $limit;
@@ -114,6 +119,10 @@
return $mymenusTpl->fetch($GLOBALS['xoops']->path('modules/mymenus/templates/static/mymenus_admin_menus.html'));
}
+/**
+ * @param $id
+ * @param null $redir
+ */
function mymenus_admin_del($id, $redir = null)
{
if (!$GLOBALS['xoopsSecurity']->check()) {
@@ -145,6 +154,9 @@
redirect_header(!is_null($redir) ? base64_decode($redir) : $GLOBALS['mymenus_adminpage'] , 2, _AM_MYMENUS_MSG_SUCCESS);
}
+/**
+ * @param null $redir
+ */
function mymenus_admin_delall($redir = null)
{
if (!$GLOBALS['xoopsSecurity']->check()) {
@@ -160,6 +172,11 @@
redirect_header(!is_null($redir) ? base64_decode($redir) : $GLOBALS['mymenus_adminpage'] , 2, _AM_MYMENUS_MSG_SUCCESS);
}
+/**
+ * @param null $id
+ * @param null $redir
+ * @param string $op
+ */
function mymenus_admin_confirmdel($id = null, $redir = null, $op = 'delok')
{
$arr = array();
@@ -192,6 +209,9 @@
redirect_header($GLOBALS['mymenus_adminpage'] . '?op=list', 2, $msg);
}
+/**
+ * @param $id
+ */
function mymenus_admin_edit($id)
{
if (!$GLOBALS['xoopsSecurity']->check()) {
@@ -210,6 +230,11 @@
redirect_header($GLOBALS['mymenus_adminpage'] . '?op=list', 2, $msg);
}
+/**
+ * @param null $id
+ *
+ * @return string
+ */
function mymenus_admin_form($id = null)
{
$this_handler =& xoops_getmodulehandler('menus','mymenus');
Modified: XoopsModules/mymenus/trunk/mymenus/blocks/mymenus_block.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/blocks/mymenus_block.php 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/blocks/mymenus_block.php 2014-03-25 08:47:48 UTC (rev 12408)
@@ -20,6 +20,11 @@
defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined");
+/**
+ * @param $options
+ *
+ * @return array|bool
+ */
function mymenus_block_show($options)
{
$block = array();
@@ -128,6 +133,12 @@
$blockTpl->assign('skinurl', $skin_info['url']);
$blockTpl->assign('skinpath', $skin_info['path']);
+ // xLanguage check
+ if (xoops_isActiveModule('xlanguage')) {
+ $blockTpl->assign('xlanguage', true);
+ }
+
+
/*assign ul class*/
$menucss='';
$menus_handler = xoops_getModuleHandler('menus', 'mymenus');
@@ -136,10 +147,10 @@
$itemsCount = count($menuObj);
if ($menuObj) {
for ($i = 0; $i < $itemsCount; ++$i) {
- $menucss = isset($menuObj[$i]['css']) ? $menuObj[$i]['css']: '';
+ $menucss = isset($menuObj[$i]['css']) ? $menuObj[$i]['css']: '';
}
}
- if(!$menucss){$menucss = "";}
+ if (!$menucss) {$menucss = "";}
$blockTpl->assign('menucss', $menucss);
$block['content'] = $blockTpl->fetch($skin_info['template']);
@@ -156,6 +167,11 @@
return $block;
}
+/**
+ * @param $options
+ *
+ * @return string
+ */
function mymenus_block_edit($options)
{
//Unique ID
@@ -172,6 +188,7 @@
if (count($menus) == 0) {
$form = "<a href='" . $GLOBALS['xoops']->url('modules/mymenus/admin/admin_menus.php') . "'>" . _AM_MYMENUS_MSG_NOMENUS . "</a>";
+
return $form;
}
@@ -209,7 +226,6 @@
//Skin from theme 3 - @luciorota
-
if (file_exists(XOOPS_ROOT_PATH . '/themes/' . $GLOBALS['xoopsConfig']['theme_set'] . '/modules/mymenus/skins/')) {
++$i;
xoops_load('XoopsLists');
Modified: XoopsModules/mymenus/trunk/mymenus/class/about.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/class/about.php 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/class/about.php 2014-03-25 08:47:48 UTC (rev 12408)
@@ -49,6 +49,9 @@
var $_lang_by;
var $_tpl;
+ /**
+ * @param string $aboutTitle
+ */
function __construct($aboutTitle = 'About')
{
@@ -75,6 +78,11 @@
}
+ /**
+ * @param $value
+ *
+ * @return mixed
+ */
function sanitize($value)
{
$myts =& MyTextSanitizer::getInstance();
Modified: XoopsModules/mymenus/trunk/mymenus/class/builder.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/class/builder.php 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/class/builder.php 2014-03-25 08:47:48 UTC (rev 12408)
@@ -22,11 +22,17 @@
var $parents = array();
var $output = array();
+ /**
+ * @param $array
+ */
function __construct($array)
{
$this->addMenu($array);
}
+ /**
+ * @param $array
+ */
function addMenu($array)
{
foreach ($array as $item) {
@@ -34,11 +40,17 @@
}
}
+ /**
+ * @param $item
+ */
function add($item)
{
$this->parents[$item['pid']][] = $item;
}
+ /**
+ * @param int $pid
+ */
function buildMenus($pid = 0)
{
static $idx = -1;
@@ -77,6 +89,9 @@
$level -= 1;
}
+ /**
+ * @param int $pid
+ */
function buildUpDown($pid = 0)
{
static $idx = -1;
@@ -153,6 +168,9 @@
}
}
+ /**
+ * @param $pid
+ */
function addSelectedParents($pid)
{
foreach ($this->output as $idx => $menu) {
@@ -163,6 +181,9 @@
}
}
+ /**
+ * @return array
+ */
function render()
{
$this->buildMenus();
Modified: XoopsModules/mymenus/trunk/mymenus/class/links.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/class/links.php 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/class/links.php 2014-03-25 08:47:48 UTC (rev 12408)
@@ -20,6 +20,9 @@
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
+/**
+ * Class MymenusLinks
+ */
class MymenusLinks extends XoopsObject
{
/**
@@ -42,6 +45,9 @@
$this->initVar('css', XOBJ_DTYPE_TXTBOX);
}
+ /**
+ * @return bool
+ */
function checkAccess()
{
$hooks = $this->getHooks();
@@ -55,6 +61,9 @@
return true;
}
+ /**
+ * @return array
+ */
function getHooks()
{
$ret = array();
@@ -69,19 +78,29 @@
//$info = split(',', trim($line[0]));
$ret[$hook][] = $method;
}
+
return $ret;
}
}
+/**
+ * Class MymenusLinksHandler
+ */
class MymenusLinksHandler extends XoopsPersistableObjectHandler
{
+ /**
+ * @param null|object $db
+ */
function __construct(&$db)
{
parent::__construct($db, 'mymenus_links', 'MymenusLinks', 'id', 'title');
}
+ /**
+ * @param $obj
+ */
function update_weights(&$obj)
{
$sql = "UPDATE " . $this->table
Modified: XoopsModules/mymenus/trunk/mymenus/class/menus.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/class/menus.php 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/class/menus.php 2014-03-25 08:47:48 UTC (rev 12408)
@@ -20,6 +20,9 @@
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
+/**
+ * Class MymenusMenus
+ */
class MymenusMenus extends XoopsObject
{
/**
@@ -35,8 +38,14 @@
}
}
+/**
+ * Class MymenusMenusHandler
+ */
class MymenusMenusHandler extends XoopsPersistableObjectHandler
{
+ /**
+ * @param null|object $db
+ */
function __construct(&$db)
{
parent::__construct($db, 'mymenus_menus', 'MymenusMenus', 'id', 'title', 'css');
Modified: XoopsModules/mymenus/trunk/mymenus/class/plugin.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/class/plugin.php 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/class/plugin.php 2014-03-25 08:47:48 UTC (rev 12408)
@@ -23,6 +23,9 @@
xoops_load('XoopsLists');
include_once $GLOBALS['xoops']->path('modules/mymenus/class/registry.php');
+/**
+ * Class MymenusPlugin
+ */
class MymenusPlugin
{
@@ -30,6 +33,9 @@
var $_plugins;
var $_events;
+ /**
+ *
+ */
function __construct()
{
$this->_plugins = array();
@@ -39,6 +45,9 @@
$this->setEvents();
}
+ /**
+ * @return MymenusPlugin
+ */
static function &getInstance()
{
static $instance = false;
@@ -80,6 +89,10 @@
}
}
+ /**
+ * @param $event_name
+ * @param array $args
+ */
function triggerEvent($event_name, $args = array())
{
$event_name = strtolower(str_replace('.', '', $event_name));
@@ -92,9 +105,17 @@
}
+/**
+ * Class MymenusPluginItem
+ */
class MymenusPluginItem
{
+ /**
+ * @param $name
+ *
+ * @return mixed
+ */
function loadLanguage($name)
{
$language = $GLOBALS['xoopsConfig']['language'];
@@ -102,6 +123,7 @@
if (!($ret = @include_once "{$path}/{$language}/{$name}.php")) {
$ret = @include_once "{$path}/english/{$name}.php";
}
+
return $ret;
}
}
Modified: XoopsModules/mymenus/trunk/mymenus/class/registry.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/class/registry.php 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/class/registry.php 2014-03-25 08:47:48 UTC (rev 12408)
@@ -20,42 +20,68 @@
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
+/**
+ * Class MymenusRegistry
+ */
class MymenusRegistry
{
protected $_entries;
protected $_locks;
+ /**
+ *
+ */
protected function __construct()
{
$this->_entries = array();
$this->_locks = array();
}
+ /**
+ * @return MymenusRegistry
+ */
static public function getInstance()
{
static $instance = false;
if (!$instance) {
$instance = new self();
}
+
return $instance;
}
+ /**
+ * @param $key
+ * @param $item
+ *
+ * @return bool
+ */
public function setEntry($key, $item)
{
if ($this->isLocked($key) == true) {
trigger_error('Unable to set entry `' . $key . '`. Entry is locked.', E_USER_WARNING);
+
return false;
}
$this->_entries[$key] = $item;
+
return true;
}
+ /**
+ * @param $key
+ */
public function unsetEntry($key)
{
unset($this->_entries[$key]);
}
+ /**
+ * @param $key
+ *
+ * @return null
+ */
public function getEntry($key)
{
if (isset($this->_entries[$key]) == false) {
@@ -65,22 +91,41 @@
return $this->_entries[$key];
}
+ /**
+ * @param $key
+ *
+ * @return bool
+ */
public function isEntry($key)
{
return ($this->getEntry($key) !== null);
}
+ /**
+ * @param $key
+ *
+ * @return bool
+ */
public function lockEntry($key)
{
$this->_locks[$key] = true;
+
return true;
}
+ /**
+ * @param $key
+ */
public function unlockEntry($key)
{
unset($this->_locks[$key]);
}
+ /**
+ * @param $key
+ *
+ * @return bool
+ */
public function isLocked($key)
{
return (isset($this->_locks[$key]) == true);
Modified: XoopsModules/mymenus/trunk/mymenus/docs/readme.txt
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/docs/readme.txt 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/docs/readme.txt 2014-03-25 08:47:48 UTC (rev 12408)
@@ -1,6 +1,6 @@
-What is mymenus module (v1.0) ?
+What is MyMenus module ?
======================
-Mymenus is menu manager module that allows you to display dynamic or static menus in your website.
+MyMenus is menu manager module that allows you to display dynamic or static menus in your website.
Features
@@ -9,24 +9,24 @@
- pluggable plugins (title and links decorators for integration of module features)
- infinite menus levels(nested menus)
- auto selected menus(menus are highlighted depending on the page you are in)
-- ability to assign a menu to a smarty variable(you can use my menus has a block or use it inside your theme or templates)
+- ability to assign a menu to a smarty variable(you can use my menus as a block or use it inside your theme or templates)
- ability to get a skin from the current theme folder(theme/mytheme/menu/scripts go here)
- and much more
Requirements
====================
-Requires xoops 2.4.x and php5
+Requires minimum 2.5.x and PHP 5.3.7
-How to install mymenus
+How to install MyMenus
====================
-Copy mymenus folder into the /modules directory of your website.
-Log in to your site as administrator, go to System Admin > Modules, look for the mymenus
-icon in the list of uninstalled modules and click in the install icon.
+Copy mymenus folder into the /modules directory of your website.
+Log in to your site as administrator, go to System Admin > Modules, look for the MyMenus
+icon in the list of uninstalled modules and click in the install icon.
Follow the directions in the screen and you'll be ready to go.
Usage and developing documentation
======================
-Please refer to docs folder for more information.
\ No newline at end of file
+Please refer to docs folder for more information.
Modified: XoopsModules/mymenus/trunk/mymenus/docs/skins.txt
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/docs/skins.txt 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/docs/skins.txt 2014-03-25 08:47:48 UTC (rev 12408)
@@ -33,13 +33,13 @@
[oul] => 1 (IMPORTANT! Open UL -> this menu item requires skin to prepend <ul> open element tag)
[oli] => 1 (IMPORTANT! Open LI -> this menu item requires skin to prepend <li> open element tag)
[close] => (IMPORTANT! this holds closing tags, it will automatically generate </li></ul> tags for you)
- [cul] => (IMPORTANT! Close UL -> this menu item requires skin to apend </ul> close element tag, you should use [close] instead, unless you are not suporting multilevel menus)
- [cli] => (IMPORTANT! Close LI -> this menu item requires skin to apend </li> close element tag, you should use [close] instead, unless you are not suporting multilevel menus)
+ [cul] => (IMPORTANT! Close UL -> this menu item requires skin to append </ul> close element tag, you should use [close] instead, unless you are not supporting multilevel menus)
+ [cli] => (IMPORTANT! Close LI -> this menu item requires skin to append </li> close element tag, you should use [close] instead, unless you are not supporting multilevel menus)
[hassub] => 1 (informs if this menu item has submenus, 1 for true, 0 for false)
[level] => 0 (informs the level of nesting of the menu item, 0 is for root, 1 for second level, etc..)
[down_weight] => 3 (for usage in menu sorting in admin side, you can ignore it)
[selected] => 1 (IMPORTANT, this tells the skin to highlight this item)
- [topselected] => 1 (Important, this informs the skin that the menu is of level 0(root) and it is selected, you should higlight it)
+ [topselected] => 1 (Important, this informs the skin that the menu is of level 0(root) and it is selected, you should highlight it)
)
-- Skin structure:
Modified: XoopsModules/mymenus/trunk/mymenus/docs/usage.txt
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/docs/usage.txt 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/docs/usage.txt 2014-03-25 08:47:48 UTC (rev 12408)
@@ -10,25 +10,25 @@
You can use DECORATORS for links, images, title, and alt_title.
-The decorators follow this sintax:
+The decorators follow this syntax:
{decorator|value}
There are 6 decorators available:
-USER -> gets info for the user that is seing the page
+USER -> gets info for the user that is seeing the page
OWNER -> gets info for the user that match uid on the url(if given)
URI -> gets info about the url arguments
MODULE -> gets dynamic menu from a module (Used in title field only)
SMARTY -> gets smarty variables
CONSTANT -> gets defined constants
-Some sintax examples
+Some syntax examples
{USER|UNAME} gets the username of this user, returns anonymous if not a user
{USER|UID} gets the uid of this user, returns 0 if not a user
{USER|REGDATE} gets the regdate of this user, returns empty if not a user
{USER|any other field of the user table} yes! You can get what you need!
Some special fields you may use
-{USER|PM_NEW} Show number of private messages not readed
+{USER|PM_NEW} Show number of private messages not read
{USER|PM_READED}
{USER|PM_TOTAL}
@@ -37,7 +37,7 @@
{OWNER|UID}
etc..
-And you can get any paramater on the uri with:
+And you can get any parameter on the uri with:
{URI|UID}
{URI|ID}
{URI|SEARCH}
Modified: XoopsModules/mymenus/trunk/mymenus/include/functions.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/include/functions.php 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/include/functions.php 2014-03-25 08:47:48 UTC (rev 12408)
@@ -20,6 +20,10 @@
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
+/**
+ * @param int $currentoption
+ * @param string $breadcrumb
+ */
function mymenus_adminMenu($currentoption = 0, $breadcrumb = '')
{
include_once $GLOBALS['xoops']->path('class/template.php');
@@ -39,6 +43,11 @@
$tpl->display($GLOBALS['xoops']->path('modules/mymenus/templates/static/mymenus_admin_adminmenu.html'));
}
+/**
+ * @param string $dirname
+ *
+ * @return mixed
+ */
function mymenus_getModuleConfig($dirname = 'mymenus')
{
static $config;
@@ -58,6 +67,13 @@
return $config;
}
+/**
+ * @param $skin
+ * @param $skin_from_theme
+ * @param $skin_theme
+ *
+ * @return array
+ */
function mymenus_getSkinInfo($skin, $skin_from_theme, $skin_theme)
{
$error = false;
Modified: XoopsModules/mymenus/trunk/mymenus/include/update.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/include/update.php 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/include/update.php 2014-03-25 08:47:48 UTC (rev 12408)
@@ -17,7 +17,7 @@
//Install
eval ('function xoops_module_pre_install_'.$infoname.'($module) {
- // Templatevorlagen pr�fen
+ // Templatevorlagen prüfen
if (!check_infotemplates($module)) return false;
if (!check_infotable($module)) return false;
return true;
@@ -25,7 +25,7 @@
//Install
eval ('function xoops_module_install_'.$infoname.'($module) {
- // Templatevorlagen pr�fen
+ // Templatevorlagen prüfen
if (!check_infotemplates($module)) return false;
if (!check_infotable($module)) return false;
return true;
@@ -33,23 +33,32 @@
//Update
eval('function xoops_module_update_'.$infoname.'($module) {
- // Templatevorlagen pr�fen
+ // Templatevorlagen prüfen
if (!check_infotemplates($module)) return false;
if (!check_infotable($module)) return false;
return true;
}');
-
+/**
+ * @param $module
+ *
+ * @return bool
+ */
function check_infotemplates($module) {
$err = true;
if (!file_exists(XOOPS_ROOT_PATH."/modules/".$module->getInfo("dirname")."/templates/blocks/".$module->getInfo("dirname")."_block.html")) {
$module->setErrors("Template ".$module->getInfo("dirname")."_block.html not exists!");
- $err = false;
+ $err = false;
}
+
return $err;
}
-
+/**
+ * @param $module
+ *
+ * @return bool
+ */
function check_infotable($module) {
global $xoopsDB;
$err=true;
@@ -73,7 +82,6 @@
"css" => "varchar(150) default NULL"
);
-
if (!InfoTableExists($xoopsDB->prefix($module->getInfo("dirname")).'_menus')) {
$sql= "CREATE TABLE ".$xoopsDB->prefix($module->getInfo("dirname"))."_menus (";
foreach ($tables_menus as $s => $w) {
@@ -82,10 +90,11 @@
$sql.= " PRIMARY KEY (id)
); ";
- echo $sql;
+ echo $sql;
$result = $xoopsDB->queryF($sql);
if (!$result) {
$module->setErrors("Can't create Table ".$xoopsDB->prefix($module->getInfo("dirname")).'_menus');
+
return false;
} else {
$sql="INSERT INTO ".$xoopsDB->prefix($module->getInfo("dirname"))."_menus (id,title) VALUES (1,'Default')";
@@ -105,20 +114,20 @@
}
-
- if (!InfoTableExists($xoopsDB->prefix($module->getInfo("dirname"))."_links")) {
+ if (!InfoTableExists($xoopsDB->prefix($module->getInfo("dirname"))."_links")) {
$sql= "CREATE TABLE ".$xoopsDB->prefix($module->getInfo("dirname"))."_links ( ";
foreach ($tables_links as $c =>$w) {
$sql.= " " . $c . " " .$w.",";
}
$sql .= " PRIMARY KEY (storyid) ) ;";
- $result = $xoopsDB->queryF($sql);
- if (!$result) {
+ $result = $xoopsDB->queryF($sql);
+ if (!$result) {
$module->setErrors("Can't create Table ".$xoopsDB->prefix($module->getInfo("dirname"))."_links");
$sql = 'DROP TABLE ' . $xoopsDB->prefix($module->getInfo("dirname")).'_menus';
$result = $xoopsDB->queryF($sql);
+
return false;
- }
+ }
} else {
foreach ($tables_links as $s => $w) {
if (!InfoColumnExists($xoopsDB->prefix($module->getInfo("dirname")).'_links',$s))
@@ -132,5 +141,6 @@
}
}
+
return true;
}
Modified: XoopsModules/mymenus/trunk/mymenus/include/xoops.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/include/xoops.php 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/include/xoops.php 2014-03-25 08:47:48 UTC (rev 12408)
@@ -18,36 +18,60 @@
$module_name = basename(dirname(dirname(__FILE__))) ;
if (!function_exists("xoops_loadLanguage")) {
+ /**
+ * @param $name
+ * @param string $domain
+ * @param null $language
+ *
+ * @return mixed
+ */
function xoops_loadLanguage( $name, $domain = '', $language = null ) {
$language = empty($language) ? $GLOBALS['xoopsConfig']['language'] : $language;
$path = XOOPS_ROOT_PATH . '/' . ( (empty($domain) || 'global' == $domain) ? '' : "modules/{$domain}/" ) . 'language';
if ( !( $ret = @include_once "{$path}/{$language}/{$name}.php" ) ) {
$ret = @include_once "{$path}/english/{$name}.php";
}
+
return $ret;
}
}
if (!function_exists("InfoTableExists")) {
+ /**
+ * @param $tablename
+ *
+ * @return bool
+ */
function InfoTableExists($tablename) {
global $xoopsDB;
$result=$xoopsDB->queryF("SHOW TABLES LIKE '$tablename'");
- $ret = ($xoopsDB->getRowsNum($result) > 0) ? true : false;
+ $ret = ($xoopsDB->getRowsNum($result) > 0) ? true : false;
+
return $ret;
}
}
if (!function_exists("InfoColumnExists")) {
+ /**
+ * @param $tablename
+ * @param $spalte
+ *
+ * @return bool
+ */
function InfoColumnExists($tablename,$spalte) {
global $xoopsDB;
if ($tablename=="" || $spalte=="") return true; // Fehler!!
$result=$xoopsDB->queryF("SHOW COLUMNS FROM ". $tablename ." LIKE '".$spalte."'");
- $ret = ($xoopsDB->getRowsNum($result) > 0) ? true : false;
+ $ret = ($xoopsDB->getRowsNum($result) > 0) ? true : false;
+
return $ret;
}
}
if (!function_exists("InfoAdminMenu")) {
+ /**
+ * @param int $currentoption
+ */
function InfoAdminMenu ($currentoption = 0) {
/* Nice buttons styles */
global $xoopsConfig,$xoopsModule;
@@ -98,27 +122,34 @@
}
if (!function_exists("self_parrent")) {
- function self_parrent($id=0,$modulname="") {
+ /**
+ * @param int $id
+ * @param string $modulname
+ *
+ * @return array
+ */
+ function self_parrent($id=0,$modulname="") {
global $xoopsDB;
- $currentParent=array();
- if ($modulname=="") return $currentParent;
+ $currentParent=array();
+ if ($modulname=="") return $currentParent;
$cP = $id;
- $sql="SELECT storyid FROM ".$xoopsDB->prefix($modulname)." WHERE parent_id=".intval($cP);
- $result = $xoopsDB->query($sql);
- while ($row = $xoopsDB->fetchArray($result)) {
- if (intval($row['storyid']) > 0) {
+ $sql="SELECT storyid FROM ".$xoopsDB->prefix($modulname)." WHERE parent_id=".intval($cP);
+ $result = $xoopsDB->query($sql);
+ while ($row = $xoopsDB->fetchArray($result)) {
+ if (intval($row['storyid']) > 0) {
$cP = intval($row['storyid']);
- $currentParent[]=$cP;
- $cp2=array();
- $cp2 = self_parrent($cP,$modulname);
- if (count($cp2)>0) {
- foreach ($cp2 as $clist1 ) {
+ $currentParent[]=$cP;
+ $cp2=array();
+ $cp2 = self_parrent($cP,$modulname);
+ if (count($cp2)>0) {
+ foreach ($cp2 as $clist1) {
$currentParent[]=$clist1;
}
}
unset($cp2);
- }
- }
- return $currentParent;
- }
+ }
+ }
+
+ return $currentParent;
+ }
}
Modified: XoopsModules/mymenus/trunk/mymenus/plugins/constant/constant.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/plugins/constant/constant.php 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/plugins/constant/constant.php 2014-03-25 08:47:48 UTC (rev 12408)
@@ -20,6 +20,9 @@
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
+/**
+ * Class ConstantMymenusPluginItem
+ */
class ConstantMymenusPluginItem extends MymenusPluginItem
{
@@ -55,6 +58,11 @@
$registry->setEntry('link_array', $linkArray);
}
+ /**
+ * @param $string
+ *
+ * @return mixed
+ */
function _doDecoration($string)
{
$registry =& MymenusRegistry::getInstance();
Modified: XoopsModules/mymenus/trunk/mymenus/plugins/dynamic/dynamic.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/plugins/dynamic/dynamic.php 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/plugins/dynamic/dynamic.php 2014-03-25 08:47:48 UTC (rev 12408)
@@ -20,6 +20,9 @@
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
+/**
+ * Class DynamicMymenusPluginItem
+ */
class DynamicMymenusPluginItem extends MymenusPluginItem
{
@@ -42,6 +45,12 @@
$registry->setEntry('menus', $newmenus);
}
+ /**
+ * @param $module
+ * @param $pid
+ *
+ * @return array
+ */
function _getModuleMenus($module, $pid)
{
global $xoopsDB, $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig;
Modified: XoopsModules/mymenus/trunk/mymenus/plugins/mymenus/mymenus.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/plugins/mymenus/mymenus.php 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/plugins/mymenus/mymenus.php 2014-03-25 08:47:48 UTC (rev 12408)
@@ -20,6 +20,9 @@
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
+/**
+ * Class MymenusMymenusPluginItem
+ */
class MymenusMymenusPluginItem extends MymenusPluginItem
{
@@ -71,7 +74,7 @@
$registry =& MymenusRegistry::getInstance();
$linkArray = $registry->getEntry('link_array');
- if (!empty($linkArray['image'])) {
+ if (!empty($linkArray['image']) && !filter_var($linkArray['image'], FILTER_VALIDATE_URL)) {
$linkArray['image'] = XOOPS_URL . '/' . $linkArray['image'];
//Do not do this in other decorators
$linkArray['image'] = self::_doDecoration($linkArray['image']);
@@ -98,6 +101,11 @@
$registry->setEntry('link_array', $linkArray);
}
+ /**
+ * @param $string
+ *
+ * @return mixed
+ */
function _doDecoration($string)
{
$registry =& MymenusRegistry::getInstance();
@@ -172,6 +180,9 @@
$registry->setEntry('access_filter', $access_filter);
}
+ /**
+ * @return bool
+ */
function isOwner()
{
$registry =& MymenusRegistry::getInstance();
@@ -179,11 +190,20 @@
return ($registry->getEntry('user_uid') != 0 && $registry->getEntry('user_uid') == $registry->getEntry('get_uid')) ? true : false;
}
+ /**
+ * @return bool
+ */
function isNotOwner()
{
return !self::isOwner();
}
+ /**
+ * @param string $type
+ * @param $value
+ *
+ * @return int
+ */
function getExtraValue($type = 'user', $value)
{
$registry =& MymenusRegistry::getInstance();
Modified: XoopsModules/mymenus/trunk/mymenus/plugins/smarty/smarty.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/plugins/smarty/smarty.php 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/plugins/smarty/smarty.php 2014-03-25 08:47:48 UTC (rev 12408)
@@ -20,6 +20,9 @@
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
+/**
+ * Class SmartyMymenusPluginItem
+ */
class SmartyMymenusPluginItem extends MymenusPluginItem
{
@@ -55,6 +58,11 @@
$registry->setEntry('link_array', $linkArray);
}
+ /**
+ * @param $string
+ *
+ * @return mixed
+ */
function _doDecoration($string)
{
$registry =& MymenusRegistry::getInstance();
Modified: XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/templates/template.html
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/templates/template.html 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/templates/template.html 2014-03-25 08:47:48 UTC (rev 12408)
@@ -10,6 +10,10 @@
<{/if}>
<{if $menu.oli}>
+ <{assign var=myStr value="["|cat:$xoops_langcode|cat:"]"}>
+ <{if ($xlanguage && (($menu.title|strstr:$myStr) OR ($menu.image|strstr:$myStr)) OR !$xlanguage)}>
+
+
<{if $menu.hassub && $menu.level == 0}>
<li class="dropdown <{if $menu.selected}>active <{/if}><{$menu.css}>">
<a href="<{$menu.link}>" target="<{$menu.target}>" alt="<{$menu.alt_title}>" title="<{$menu.alt_title}>">
@@ -29,7 +33,12 @@
<{$menu.title}>
</a>
<{/if}>
+ <{/if}>
+
+
+
+
<{/if}>
<{if $menu.close != ''}><{$menu.close}><{/if}>
-<{/foreach}>
\ No newline at end of file
+<{/foreach}>
Modified: XoopsModules/mymenus/trunk/mymenus/skins/breadcrumb/template.html
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/skins/breadcrumb/template.html 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/skins/breadcrumb/template.html 2014-03-25 08:47:48 UTC (rev 12408)
@@ -1,22 +1,24 @@
<ul class="mymenus-breadcrumb" style="background-image:url('<{$skinurl}>/<{$config.iconset}>/bc_bg.png');">
<{if $config.home}>
- <li>
- <a href="<{$xoops_url}>" alt="<{$smarty.const._MB_MYMENUS_HOME}>" title="<{$smarty.const._MB_MYMENUS_HOME}>" style="background-image:url('<{$skinurl}>/<{$config.iconset}>/bc_separator.png');">
- <img class="mymenus-breadcrumb-home" src="<{$skinurl}>/<{$config.iconset}>/home.png" alt="<{$smarty.const._MB_MYMENUS_HOME}>" />
- </a>
- </li>
+ <li>
+ <a href="<{$xoops_url}>" alt="<{$smarty.const._MB_MYMENUS_HOME}>" title="<{$smarty.const._MB_MYMENUS_HOME}>" style="background-image:url('<{$skinurl}>/<{$config.iconset}>/bc_separator.png');">
+ <img class="mymenus-breadcrumb-home" src="<{$skinurl}>/<{$config.iconset}>/home.png" alt="<{$smarty.const._MB_MYMENUS_HOME}>" />
+ </a>
+ </li>
<{/if}>
<{foreach item=menu from=$block}>
- <{if $menu.selected && !$menu.topselected}>
- <li><a href="<{$menu.link}>" target="<{$menu.target}>" alt="<{$menu.alt_title}>" title="<{$menu.alt_title}>" style="background-image:url('<{$skinurl}>/<{$config.iconset}>/bc_separator.png');">
- <{$menu.title}>
- </a></li>
+ <{assign var=myStr value="["|cat:$xoops_langcode|cat:"]"}>
+ <{if ($xlanguage && (($menu.title|strstr:$myStr) OR ($menu.image|strstr:$myStr)) OR !$xlanguage)}>
+ <{if $menu.selected && !$menu.topselected}>
+ <li><a href="<{$menu.link}>" target="<{$menu.target}>" alt="<{$menu.alt_title}>" title="<{$menu.alt_title}>" style="background-image:url('<{$skinurl}>/<{$config.iconset}>/bc_separator.png');">
+ <{$menu.title}>
+ </a></li>
+ <{/if}>
+ <{if $menu.topselected}>
+ <li>
+ <{$menu.title}>
+ </li>
+ <{/if}>
<{/if}>
- <{if $menu.topselected}>
- <li>
- <{$menu.title}>
- </li>
- <{/if}>
-
<{/foreach}>
-</ul>
\ No newline at end of file
+</ul>
Modified: XoopsModules/mymenus/trunk/mymenus/skins/clean/template.html
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/skins/clean/template.html 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/skins/clean/template.html 2014-03-25 08:47:48 UTC (rev 12408)
@@ -6,11 +6,18 @@
<ul>
<{/if}>
<{/if}>
+
+<{assign var=myStr value="["|cat:$xoops_langcode|cat:"]"}>
+<{if ($xlanguage && (($menu.title|strstr:$myStr) OR ($menu.image|strstr:$myStr)) OR !$xlanguage)}>
+
<{if $menu.level == 0}>
<li <{if $menu.css}>class="<{$menu.css}>"<{/if}>>
<a class="<{if $menu.selected}>active<{/if}>" href="<{$menu.link}>"><{$menu.title}></a>
<{if $menu.hassub}><ul class="dropdown-menu"><{/if}>
<{foreach item=sub from=$block}>
+
+ <{if ($xlanguage && (($menu.title|strstr:$myStr) OR ($menu.image|strstr:$myStr)) OR !$xlanguage)}>
+
<{if $menu.id == $sub.pid}>
<li <{if $sub.css}>class="<{$sub.css}>"<{/if}>>
<a class="<{if $sub.selected}>active<{/if}>" href="<{$sub.link}>" target="<{$sub.target}>" title="<{$sub.alt_title}>"><{$sub.title}></a>
@@ -21,13 +28,17 @@
<a class="<{if $subsub.selected}>active<{/if}>" href="<{$subsub.link}>" target="<{$subsub.target}>" title="<{$subsub.alt_title}>"><{$subsub.title}></a>
</li>
<{/if}>
- <{/foreach}>
+ <{/foreach}>
<{if $sub.hassub}></ul><{/if}>
</li>
<{/if}>
- <{/foreach}>
+ <{/if}>
+ <{/foreach}>
<{if $menu.hassub}></ul><{/if}>
</li>
<{/if}>
+<{/if}>
+
+
<{if $menu.close != ''}><{$menu.close}><{/if}>
-<{/foreach}>
\ No newline at end of file
+<{/foreach}>
Modified: XoopsModules/mymenus/trunk/mymenus/skins/default/templates/template.html
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/skins/default/templates/template.html 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/skins/default/templates/template.html 2014-03-25 08:47:48 UTC (rev 12408)
@@ -10,7 +10,10 @@
<ul>
<{/if}>
<{/if}>
-
+
+
+
+
<{if $menu.oli}>
<{if $menu.level == 0}>
<li class="default_top" class="<{$menu.css}>">
@@ -18,6 +21,10 @@
<li class="<{$menu.css}>">
<{/if}>
<{/if}>
+
+<{assign var=myStr value="["|cat:$xoops_langcode|cat:"]"}>
+<{if ($xlanguage && (($menu.title|strstr:$myStr) OR ($menu.image|strstr:$myStr)) OR !$xlanguage)}>
+
<{if $menu.level == 0}>
<a href="<{$menu.link}>" class="default_top_link<{if $menu.selected}> default_selected<{/if}>" target="<{$menu.target}>" alt="<{$menu.alt_title}>" title="<{$menu.alt_title}>">
<span <{if $menu.hassub}>class="default_down"<{/if}>>
@@ -31,6 +38,9 @@
<{$menu.title}>
</a>
<{/if}>
+ <{/if}>
+
+
<{if $menu.close != ''}><{$menu.close}><{/if}>
-<{/foreach}>
\ No newline at end of file
+<{/foreach}>
Modified: XoopsModules/mymenus/trunk/mymenus/skins/mainmenu/templates/template.html
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/skins/mainmenu/templates/template.html 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/skins/mainmenu/templates/template.html 2014-03-25 08:47:48 UTC (rev 12408)
@@ -1,20 +1,25 @@
<div id="mainmenu">
<{foreach item=menu from=$block}>
- <{if $menu.level == 0}>
- <a class="menuMain <{$menu.css}> <{if $menu.topselected}>maincurrent<{/if}>" href="<{$menu.link}>" target="<{$menu.target}>" title="<{$menu.alt_title}>">
- <{if $menu.image}><img src="<{$menu.image}>" /><{/if}>
- <{$menu.title}>
- </a>
- <{if $menu.selected}>
- <{foreach item=sub from=$block}>
- <{if $menu.id == $sub.pid}>
- <a class="menuSub <{$sub.css}> <{if $sub.selected}>maincurrent<{/if}>" href="<{$sub.link}>" target="<{$sub.target}>" title="<{$sub.alt_title}>">
- <{if $sub.image}><img src="<{$sub.image}>" /><{/if}>
- <{$sub.title}>
- </a>
+ <{if $menu.level == 0}>
+ <{assign var=myStr value="["|cat:$xoops_langcode|cat:"]"}>
+ <{if ($xlanguage && (($menu.title|strstr:$myStr) OR ($menu.image|strstr:$myStr)) OR !$xlanguage)}>
+ <a class="menuMain <{$menu.css}> <{if $menu.topselected}>maincurrent<{/if}>" href="<{$menu.link}>" target="<{$menu.target}>" title="<{$menu.alt_title}>">
+ <{if $menu.image}><img src="<{$menu.image}>"/><{/if}>
+ <{$menu.title}>
+ </a>
+ <{if $menu.selected}>
+ <{foreach item=sub from=$block}>
+ <{if $menu.id == $sub.pid}>
+ <{if ($xlanguage && (($menu.title|strstr:$myStr) OR ($menu.image|strstr:$myStr)) OR !$xlanguage)}>
+ <a class="menuSub <{$sub.css}> <{if $sub.selected}>maincurrent<{/if}>" href="<{$sub.link}>" target="<{$sub.target}>" title="<{$sub.alt_title}>">
+ <{if $sub.image}><img src="<{$sub.image}>"/><{/if}>
+ <{$sub.title}>
+ </a>
+ <{/if}>
+ <{/if}>
+ <{/foreach}>
+ <{/if}>
<{/if}>
- <{/foreach}>
<{/if}>
- <{/if}>
<{/foreach}>
-</div>
\ No newline at end of file
+</div>
Modified: XoopsModules/mymenus/trunk/mymenus/skins/multiblack/templates/template.html
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/skins/multiblack/templates/template.html 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/skins/multiblack/templates/template.html 2014-03-25 08:47:48 UTC (rev 12408)
@@ -10,7 +10,7 @@
<ul>
<{/if}>
<{/if}>
-
+
<{if $menu.oli}>
<{if $menu.level == 0}>
<li class="top <{$menu.css}>">
@@ -18,6 +18,10 @@
<li class="<{$menu.css}>">
<{/if}>
<{/if}>
+
+<{assign var=myStr value="["|cat:$xoops_langcode|cat:"]"}>
+<{if ($xlanguage && (($menu.title|strstr:$myStr) OR ($menu.image|strstr:$myStr)) OR !$xlanguage)}>
+
<{if $menu.level == 0}>
<a href="<{$menu.link}>" class="top_link<{if $menu.selected}> selected<{/if}>" target="<{$menu.target}>" alt="<{$menu.alt_title}>" title="<{$menu.alt_title}>">
<span <{if $menu.hassub}>class="down"<{/if}>>
@@ -31,7 +35,10 @@
<{$menu.title}>
</a>
<{/if}>
+<{/if}>
+
+
<{if $menu.close != ''}><{$menu.close}><{/if}>
<{/foreach}>
Modified: XoopsModules/mymenus/trunk/mymenus/skins/superfish/templates/template.html
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/skins/superfish/templates/template.html 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/skins/superfish/templates/template.html 2014-03-25 08:47:48 UTC (rev 12408)
@@ -1,19 +1,30 @@
<{foreach item=menu from = $block}>
+
+
+
<{if $menu.oul}>
<{if $menu.level == 0}>
- <ul class="sf-menu">
+
+ <ul class="sf-menu">
+
<{else}>
<ul>
<{/if}>
<{/if}>
-
+
+
<{if $menu.oli}>
<li class="<{$menu.css}> <{if $menu.selected}>current<{/if}>">
<{/if}>
- <a href="<{$menu.link}>" target="<{$menu.target}>" alt="<{$menu.alt_title}>" title="<{$menu.alt_title}>">
- <{if $main.image}><img src="<{$menu.image}>" /><{/if}>
- <{$menu.title}>
- </a>
- <{if $menu.close != ''}><{$menu.close}><{/if}>
+
+ <{assign var=myStr value="["|cat:$xoops_langcode|cat:"]"}>
+ <{if ($xlanguage && (($menu.title|strstr:$myStr) OR ($menu.image|strstr:$myStr)) OR !$xlanguage)}>
+
+ <a href="<{$menu.link}>" target="<{$menu.target}>" alt="<{$menu.alt_title}>" title="<{$menu.alt_title}>">
+ <{if $main.image}><img src="<{$menu.image}>" /><{/if}>
+ <{$menu.title}>
+ </a>
+ <{if $menu.close != ''}><{$menu.close}><{/if}>
+ <{/if}>
<{/foreach}>
-<div style="clear: both"></div>
\ No newline at end of file
+<div style="clear: both"></div>
Modified: XoopsModules/mymenus/trunk/mymenus/skins/superfish_navbar/templates/template.html
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/skins/superfish_navbar/templates/template.html 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/skins/superfish_navbar/templates/template.html 2014-03-25 08:47:48 UTC (rev 12408)
@@ -1,19 +1,33 @@
<{foreach item=menu from = $block}>
<{if $menu.oul}>
<{if $menu.level == 0}>
- <ul class="sf-menu sf-navbar">
+
+ <ul class="sf-menu sf-navbar">
+
<{else}>
<ul>
<{/if}>
<{/if}>
-
+
+
+
<{if $menu.oli}>
<li class="<{if $menu.selected}>current <{/if}><{$menu.css}>">
<{/if}>
+
+ <{assign var=myStr value="["|cat:$xoops_langcode|cat:"]"}>
+ <{if ($xlanguage && (($menu.title|strstr:$myStr) OR ($menu.image|strstr:$myStr)) OR !$xlanguage)}>
+
<a href="<{$menu.link}>" target="<{$menu.target}>" alt="<{$menu.alt_title}>" title="<{$menu.alt_title}>">
<{if $main.image}><img src="<{$menu.image}>" /><{/if}>
<{$menu.title}>
</a>
+
+ <{/if}>
+
+
<{if $menu.close != ''}><{$menu.close}><{/if}>
+
+
<{/foreach}>
<div style="clear:both"></div>
Modified: XoopsModules/mymenus/trunk/mymenus/skins/tw_blue/templates/template.html
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/skins/tw_blue/templates/template.html 2014-03-25 05:05:24 UTC (rev 12407)
+++ XoopsModules/mymenus/trunk/mymenus/skins/tw_blue/templates/template.html 2014-03-25 08:47:48 UTC (rev 12408)
@@ -3,43 +3,50 @@
<div class="nav-wrapper">
<div class="nav-left"></div>
<div class="nav">
- <ul id="navigation">
- <{foreach item=main from=$block}>
- <{if $main.level == 0}>
- <li class="<{if $main.selected}>active <{/if}><{$main.css}>">
- <a href="<{$main.link}>" target="<{$main.target}>" alt="<{$main.alt_title}>" title="<{$main.alt_title}>">
- <span class="menu-left"></span>
+ <ul id="navigation">
+
+ <{foreach item=menu from=$block}>
+ <{assign var=myStr value="["|cat:$xoops_langcode|cat:"]"}>
+ <{if ($xlanguage && (($menu.title|strstr:$myStr) OR ($menu.image|strstr:$myStr)) OR !$xlanguage)}>
+
+ <{if $menu.level == 0}>
+ <li class="<{if $menu.selected}>active <{/if}><{$menu.css}>">
+ <a href="<{$menu.link}>" target="<{$menu.target}>" alt="<{$menu.alt_title}>" title="<{$menu.alt_title}>">
+ <span class="menu-left"></span>
<span class="menu-mid">
- <{if $main.image}><img src="<{$main.image}>" /><{/if}>
- <{$main.title}>
+ <{if $menu.image}><img src="<{$menu.image}>" /><{/if}>
+ <{$menu.title}>
</span>
- <span class="menu-right"></span>
- </a>
-
- <{if $main.hassub}>
- <div class="sub">
- <ul>
- <{foreach item=sub from=$block}>
- <{if $sub.pid == $main.id}>
- <li class="<{$sub.css}>">
- <a href="<{$sub.link}>" target="<{$sub.target}>" alt="<{$sub.alt_title}>" title="<{$sub.alt_title}>">
- <{if $sub.image}><img src="<{$sub.image}>" /><{/if}>
- <{$sub.title}>
- </a>
- </li>
- <{/if}>
- <{/foreach}>
- </ul>
- <div class="btm-bg"></div>
- </div>
-
- <{/if}>
- </li>
- <{/if}>
- <{/foreach}>
- </ul>
- </div>
- <div class="nav-right"></div>
- </div>
- </div>
-</div>
\ No newline at end of file
+ <span class="menu-right"></span>
+ </a>
+ <{if $menu.hassub}>
+ <div class="sub">
+ <ul>
+ <{foreach item=sub from=$block}>
+ <{if $sub.pid == $menu.id}>
+
+ <{if ($xlanguage && (($menu.title|strstr:$myStr) OR ($menu.image|strstr:$myStr)) OR !$xlanguage)}>
+
+ <li class="<{$sub.css}>">
+ <a href="<{$sub.link}>" target="<{$sub.target}>" alt="<{$sub.alt_title}>" title="<{$sub.alt_title}>">
+ <{if $sub.image}><img src="<{$sub.image}>" /><{/if}>
+ <{$sub.title}>
+ </a>
+ </li>
+ <{/if}>
+ <{/if}>
+ <{/foreach}>
+ </ul>
+ <div class="btm-bg"></div>
+ </div>
+ <{/if}>
+ </li>
+ <{/if}>
+ <{/if}>
+ <{/foreach}>
+ </ul>
+ </div>
+ <div class="nav-right"></div>
+ </div>
+ </div>
+</div>
|
|
From: <be...@us...> - 2014-03-25 05:05:29
|
Revision: 12407
http://sourceforge.net/p/xoops/svn/12407
Author: beckmi
Date: 2014-03-25 05:05:24 +0000 (Tue, 25 Mar 2014)
Log Message:
-----------
adding 'xml' => 'text/xml' (per Goffy)
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/include/mimetypes.inc.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/include/mimetypes.inc.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/include/mimetypes.inc.php 2014-03-24 19:29:02 UTC (rev 12406)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/include/mimetypes.inc.php 2014-03-25 05:05:24 UTC (rev 12407)
@@ -117,6 +117,7 @@
'wml' => 'text/vnd.wap.wml' ,
'wmls' => 'text/vnd.wap.wmlscript' ,
'xsl' => 'text/xml' ,
+ 'xml' => 'text/xml' ,
'ogv' => 'video/ogg' ,
'mpeg' => 'video/mpeg' ,
'mpg' => 'video/mpeg' ,
|
|
From: <luc...@us...> - 2014-03-24 19:29:07
|
Revision: 12406
http://sourceforge.net/p/xoops/svn/12406
Author: luciorota
Date: 2014-03-24 19:29:02 +0000 (Mon, 24 Mar 2014)
Log Message:
-----------
257 multipage help, added breadcrumb, standardize footer, ..., standardize xoops_version.php (still in progress), ...
Modified Paths:
--------------
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/css/index.html
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/docs/changelog.txt
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/header.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/common.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/config.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/index.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/help/help.html
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/main.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/modinfo.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/letter.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/print.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/protocol.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/sendletter.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/subscription.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/templates/xNewsletter_footer.html
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/templates/xNewsletter_header.html
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/templates/xnewsletter_print.html
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/xoops_version.php
Added Paths:
-----------
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/breadcrumb.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/footer.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/module.css
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/help/help2.html
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/templates/xnewsletter_common_breadcrumb.html
Added: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/breadcrumb.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/breadcrumb.php (rev 0)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/breadcrumb.php 2014-03-24 19:29:02 UTC (rev 12406)
@@ -0,0 +1,70 @@
+<?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.
+ */
+/**
+ * xNewsletterBreadcrumb Class
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @author lucio <luc...@gm...>
+ * @package xNewsletter
+ * @since 1.3
+ * @version $Id:$
+ *
+ * Example:
+ * $breadcrumb = new xNewsletterBreadcrumb();
+ * $breadcrumb->addLink( 'bread 1', 'index1.php' );
+ * $breadcrumb->addLink( 'bread 2', '' );
+ * $breadcrumb->addLink( 'bread 3', 'index3.php' );
+ * echo $breadcrumb->render();
+ */
+defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
+
+class xNewsletterBreadcrumb
+{
+ var $dirname;
+ var $_bread = array();
+
+ function __construct()
+ {
+ $this->dirname = basename(dirname(dirname(__FILE__)));
+ }
+
+ /**
+ * Add link to breadcrumb
+ *
+ */
+ function addLink( $title='', $link='' )
+ {
+ $this->_bread[] = array(
+ 'link' => $link,
+ 'title' => $title
+ );
+ }
+
+ /**
+ * Render xNewsletter BreadCrumb
+ *
+ */
+ function render()
+ {
+ if ( !isset($GLOBALS['xoTheme']) || !is_object($GLOBALS['xoTheme']) ) {
+ include_once $GLOBALS['xoops']->path( "/class/theme.php" );
+ $GLOBALS['xoTheme'] = new xos_opal_Theme();
+ }
+
+ require_once $GLOBALS['xoops']->path('class/template.php');
+ $breadcrumbTpl = new XoopsTpl();
+ $breadcrumbTpl->assign('breadcrumb', $this->_bread);
+ $html = $breadcrumbTpl->fetch("db:" . $this->dirname . "_common_breadcrumb.html");
+ unset($breadcrumbTpl);
+ return $html;
+ }
+}
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/css/index.html
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/css/index.html 2014-03-24 19:19:45 UTC (rev 12405)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/css/index.html 2014-03-24 19:29:02 UTC (rev 12406)
@@ -1 +1 @@
- <script>history.go(-1);</script>
\ No newline at end of file
+<script>history.go(-1);</script>
\ No newline at end of file
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/docs/changelog.txt
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/docs/changelog.txt 2014-03-24 19:19:45 UTC (rev 12405)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/docs/changelog.txt 2014-03-24 19:29:02 UTC (rev 12406)
@@ -3,6 +3,8 @@
- templatize user side (luciorota)
- standardize code (luciorota)
- added html2txt function for non-HTML mail clients (luciorota)
+ - added: breadcrumb class (luciorota)
+ - added: updating to XOOPS 2.5.7 Multi-page help (luciorota)
Version 1.2
--------------
Added: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/footer.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/footer.php (rev 0)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/footer.php 2014-03-24 19:29:02 UTC (rev 12406)
@@ -0,0 +1,37 @@
+<?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.
+ */
+/**
+ * xNewsletter module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package xnewsletter
+ * @since 1.3
+ * @author Xoops Development Team
+ * @version svn:$id$
+ */
+include_once XNEWSLETTER_PATH . "/include/functions.php";
+
+// copyright
+$xoopsTpl->assign('copyright', $moduleCopyrightHtml); // this definition is not removed for backward compatibility issues
+$xoopsTpl->assign('copyright_code', $moduleCopyrightHtml); // include/config.php
+// advertise
+$xoopsTpl->assign('adv', $GLOBALS['xoopsModuleConfig']['advertise']); // this definition is not removed for backward compatibility issues
+$xoopsTpl->assign('advertise_code', $GLOBALS['xoopsModuleConfig']['advertise']);
+// social
+if($GLOBALS['xoopsModuleConfig']['social_active'] == true) {
+ $xoopsTpl->assign('social_active', $GLOBALS['xoopsModuleConfig']['social_active']);
+ $xoopsTpl->assign('social_code', $GLOBALS['xoopsModuleConfig']['social_code']);
+}
+
+$xoopsTpl->assign("isAdmin", xNewsletter_userIsAdmin());
+
+include_once XOOPS_ROOT_PATH . '/footer.php';
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/header.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/header.php 2014-03-24 19:19:45 UTC (rev 12405)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/header.php 2014-03-24 19:29:02 UTC (rev 12406)
@@ -43,7 +43,6 @@
xoops_load('XoopsUserUtility');
$myts = & MyTextSanitizer::getInstance();
-$style = XNEWSLETTER_URL . "/css/style.css";
if (empty($xoopsModuleConfig)) {
$xoopsModuleConfig = $config_handler->getConfigsByCat(0, $xoopsModule->mid());
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/common.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/common.php 2014-03-24 19:19:45 UTC (rev 12405)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/common.php 2014-03-24 19:29:02 UTC (rev 12406)
@@ -38,6 +38,7 @@
include_once XNEWSLETTER_ROOT_PATH . '/class/session.php'; // xNewsletterSession class
include_once XNEWSLETTER_ROOT_PATH . '/class/xnewsletter.php'; // xNewsletterxNewsletter class
include_once XNEWSLETTER_ROOT_PATH . '/class/request.php'; // xNewsletterRequest class
+include_once XNEWSLETTER_ROOT_PATH . '/class/breadcrumb.php'; // xNewsletterBreadcrumb class
xoops_load('XoopsUserUtility');
// MyTextSanitizer object
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/config.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/config.php 2014-03-24 19:19:45 UTC (rev 12405)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/config.php 2014-03-24 19:29:02 UTC (rev 12406)
@@ -38,7 +38,7 @@
// module information
$moduleImageUrl = XNEWSLETTER_URL . "/images/xNewsletter.png";
-$moduleCopyrightHtml = "<br /><br /><a href='' title='' target='_blank'><img src='{$moduleImageUrl}' alt='' /></a>";
+$moduleCopyrightHtml = ""; //"<br /><br /><a href='' title='' target='_blank'><img src='{$moduleImageUrl}' alt='' /></a>";
// constants for account
define("_AM_ACCOUNTS_TYPE_VAL_PHP_MAIL", "1");
Added: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/module.css
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/module.css (rev 0)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/module.css 2014-03-24 19:29:02 UTC (rev 12406)
@@ -0,0 +1,553 @@
+/*
+ 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.
+ */
+/**
+ * xNewsletter module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package xnewsletter
+ * @since 1.3
+ * @author xNewsletter, Xoops Development Team, luciorota
+ * @version svn:$Id$
+ */
+.xnewsletter_headertable {
+ padding: 0;
+ border-bottom: 1px solid;
+ margin: 0 0 10px;
+}
+
+.xnewsletter_modulename {
+ font-size: 10px;
+ text-align: left;
+ font-weight: bold;
+ padding-right: 0.3em;
+ line-height: 18px;
+}
+
+.xnewsletter_breadcrumb {
+ font-size: 10px;
+ line-height: 18px;
+}
+
+.xnewsletter_infotitle {
+ margin-top: 8px;
+ margin-bottom: 8px;
+ font-size: 250%;
+ line-height: 250%;
+ font-weight: bold;
+ display: block;
+}
+
+.xnewsletter_infotext {
+ margin-bottom: 8px;
+ line-height: 130%;
+ display: block;
+}
+
+.xnewsletter_adminlinks {
+ padding-top: 15px;
+ padding-bottom: 5px;
+ font-size: 10px;
+ text-align: center;
+ line-height: 18px;
+}
+
+.xnewsletter_indexfooter {
+ font-size: 10px;
+ font-weight: bold;
+ text-align: center;
+ padding: 10px;
+}
+
+.xnewsletter_itemfooter {
+ font-size: 10px;
+ font-weight: bold;
+ text-align: center;
+ padding: 10px;
+}
+
+ul {
+ padding: 2px;
+ list-style: disc;
+ text-align: left;
+}
+
+li {
+ margin-left: 5px;
+ color: #2F5376;
+}
+
+h4 {
+ font-size: 14px;
+ text-decoration: underline;
+}
+
+.xnewsletter_container {
+ height: 100%;
+ display: table;
+ width: 100%;
+ margin: 0 auto;
+ border: none;
+}
+
+.xnewsletter_static {
+ position: static;
+ clear: both;
+}
+
+/* ---------- global ---------- */
+.xnewsletter_pagenav {
+ text-align: right;
+}
+
+.xnewsletter_copyright {
+ text-align: center;
+}
+
+/* ---------- header.html ---------- */
+.xnewsletter_head_catimgheader {
+ text-align: center;
+}
+
+.xnewsletter_head_downimgheader {
+ text-align: center;
+}
+
+.xnewsletter_head_imgheader {
+ text-align: center;
+}
+
+.xnewsletter_head_catindexheader {
+ /* text-align: center; do not uncomment (will stop index alignment option working) */
+}
+
+.xnewsletter_head_catletters {
+ text-align: center;
+ font-size: 80%;
+}
+
+.xnewsletter_head_cattoolbar {
+ text-align: center;
+}
+
+/* ---------- footer.html ---------- */
+.xnewsletter_foot_commentnav {
+ text-align: center;
+ padding: 3px;
+ margin: 3px;
+}
+
+.xnewsletter_foot_comments {
+ padding: 3px;
+ margin: 3px;
+}
+
+/* ---------- newlist.html ---------- */
+.xnewsletter_newlist_top {
+ text-align: center;
+ width: 100%;
+}
+
+.xnewsletter_newlist_top fieldset {
+ text-align: center;
+ border: 1px solid silver;
+ width: 450px;
+}
+
+.xnewsletter_newlist_totallast {
+ text-align: center;
+ width: 100%;
+ font-weight: bold;
+ font-size: large;
+}
+
+/* ---------- disclaimer.html ---------- */
+.xnewsletter_disc_imghead {
+ text-align: center;
+}
+
+.xnewsletter_disc_disclaimer {
+ text-align: center;
+}
+
+.xnewsletter_disc_discform {
+ text-align: center;
+}
+
+/* ---------- ratefile.html ---------- */
+.xnewsletter_rate_imghead {
+ text-align: center;
+}
+
+/* ---------- viewcat.html ---------- */
+.xnewsletter_view_top {
+}
+
+.xnewsletter_view_subs {
+ border: 0;
+ padding: 0;
+ margin: 0;
+}
+
+.xnewsletter_view_subs h3 {
+ text-align: center;
+ width: 100%;
+ background-color: #BEC8D1;
+}
+
+.xnewsletter_view_subs fieldset {
+}
+
+.xnewsletter_view_subslist {
+ text-align: left;
+ vertical-align: middle;
+ width: 90%;
+}
+
+.xnewsletter_view_catpath {
+ text-align: left;
+ margin-left: 5px;
+ padding: 0;
+ font-weight: bold;
+}
+
+.xnewsletter_view_sortlist {
+ text-align: center;
+ font-size: small;
+}
+
+/* ---------- download.html ---------- */
+.xnewsletter_down_title {
+ padding-top: 2.0em
+}
+
+.xnewsletter_down_top_r {
+ float: right;
+ margin-right: 10px;
+ position: relative;
+}
+
+.xnewsletter_down_top_l {
+ float: left;
+}
+
+.xnewsletter_down_main_l {
+ width: 74%;
+ float: left;
+ height: 100%;
+ position: relative;
+ display: table;
+}
+
+.xnewsletter_down_main_l p {
+ padding-top: 10px;
+ margin: 0;
+}
+
+.xnewsletter_down_viewdetails {
+ text-align: right;
+}
+
+.xnewsletter_down_main_r {
+ width: 25%;
+ height: 100%;
+ float: right;
+ position: relative;
+ display: table;
+}
+
+.xnewsletter_down_main_r p {
+ padding-top: 10px;
+ margin: 0;
+}
+
+.xnewsletter_down_info_top {
+ margin-left: 10px;
+ margin-right: 10px;
+ padding: 4px;
+ background-color: silver;
+ border-color: #999999;
+ font-size: .8em;
+}
+
+.xnewsletter_down_info_bottom {
+ margin-left: 10px;
+ margin-right: 10px;
+ padding: 4px;
+ font-size: .8em;
+}
+
+.xnewsletter_down_main_b {
+ text-align: center;
+}
+
+.xnewsletter_down_main_bottom {
+ width: 100%;
+ position: relative;
+ text-align: center;
+}
+
+.xnewsletter_down_main_bottom2 {
+ text-align: center;
+ background-color: silver;
+ width: 100%;
+ position: relative;
+ line-height: 150%;
+}
+
+.xnewsletter_down_custom {
+ width: 100%;
+ position: relative;
+ text-align: center;
+}
+
+/* ---------- singlefile.html ---------- */
+.xnewsletter_single_title {
+ padding-top: 2.0em
+}
+
+.xnewsletter_single_title a {
+ color: #32529C;
+ background-color: inherit;
+ font-weight: bold;
+ text-decoration: none;
+}
+
+.xnewsletter_single_title a:hover {
+ color: #666;
+ background-color: inherit;
+ text-decoration: none;
+}
+
+.xnewsletter_single_top_r {
+ float: right;
+ margin-right: 10px;
+ position: relative;
+}
+
+.xnewsletter_single_top_l {
+ float: left;
+}
+
+.xnewsletter_single_main_l {
+ width: 74%;
+ height: 100%;
+ float: left;
+ position: relative;
+ display: table;
+}
+
+.xnewsletter_single_main_l p {
+ padding-top: 10px;
+ margin: 0;
+}
+
+.xnewsletter_single_main_r {
+ width: 25%;
+ float: right;
+ display: table-column;
+}
+
+.xnewsletter_single_info_top {
+ margin-left: 10px;
+ margin-right: 10px;
+ padding: 4px;
+ background-color: silver;
+ border-color: #999999;
+ color: #333;
+ font-size: .8em;
+}
+
+.xnewsletter_single_info_dtimes {
+ margin-left: 4px;
+}
+
+.xnewsletter_single_main_custom {
+ width: 100%;
+ position: relative;
+ text-align: center;
+}
+
+.xnewsletter_single_main_bottom {
+ text-align: center;
+ background-color: silver;
+ width: 100%;
+ position: relative;
+ float: bottom;
+}
+
+.xnewsletter_single_userrev {
+ padding: 3px;
+ margin: 3px;
+}
+
+.xnewsletter_single_usermir {
+ padding: 3px;
+ margin: 3px;
+}
+
+/* ---------- mirrors.html ---------- */
+.xnewsletter_mirrors_head, .xnewsletter_mirrors_head2, .xnewsletter_mirrors_head3 {
+ border-bottom: 2px solid #000000;
+ border-left: 1px solid #000000;
+ background-color: #BEC8D1;
+ text-align: left;
+ font-family: Verdana, sans-serif;
+ font-weight: bold;
+ font-size: 14px;
+ color: #404040;
+}
+
+.xnewsletter_mirrors_head4 {
+ border-bottom: 2px solid #000000;
+ border-left: 1px solid #000000;
+ background-color: #BEC8D1;
+ text-align: center;
+ font-weight: bold;
+ font-size: 14px;
+ color: #404040;
+ width: 50px;
+}
+
+.xnewsletter_mirrors_head5 {
+ border-bottom: 2px solid #000000;
+ border-left: 0 solid #000000;
+ background-color: #BEC8D1;
+ text-align: center;
+ font-weight: bold;
+ font-size: 14px;
+ color: #404040;
+ width: 30px;
+}
+
+tr.xnewsletter_mirrors_elist {
+ line-height: 25px;
+}
+
+.xnewsletter_mirrors_list, .xnewsletter_mirrors_list2, .xnewsletter_mirrors_list3 {
+ text-align: left;
+ border-right: 1px solid #000000;
+}
+
+.xnewsletter_mirrors_list4, .xnewsletter_mirrors_list5 {
+ text-align: center;
+ vertical-align: middle;
+}
+
+.xnewsletter_mirrors_found {
+}
+
+table.xnewsletter_mirrors {
+ width: 95%;
+ padding: 10px 10px 10px 10px;
+ border: 1px #000000 solid;
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+tr.xnewsletter_mirrors_end {
+ background-color: #BEC8D1;
+}
+
+.xnewsletter_mirrors_foot, .xnewsletter_mirrors_foot a {
+ border-top: 2px solid #000000;
+ font-weight: bold;
+}
+
+.xnewsletter_mirrors_bottom {
+ font-weight: bold;
+}
+
+/* ---------- reviews.html ---------- */
+.xnewsletter_reviews_title {
+}
+
+.xnewsletter_reviews_desc {
+}
+
+.xnewsletter_reviews_catpath {
+}
+
+.xnewsletter_reviews_found {
+ width: 90%;
+ text-align: center;
+}
+
+.xnewsletter_reviews_revfound {
+ text-align: left;
+}
+
+.xnewsletter_reviews_addrev {
+ text-align: right;
+}
+
+.xnewsletter_reviews_reviewlist {
+ padding: 10px 10px 10px 10px;
+ border: 1px #000000 solid;
+ border-collapse: collapse;
+ width: 95%;
+}
+
+.xnewsletter_reviews_reviewer {
+ text-align: left;
+ width: 80%;
+ background-color: #BEC8D1;
+ /* border-right: 1px solid #000000; */
+ border-bottom: 2px solid #000000;
+}
+
+.xnewsletter_reviews_reviewdate {
+ text-align: right;
+ width: 15%;
+ background-color: #BEC8D1;
+ border-bottom: 2px solid #000000;
+}
+
+.xnewsletter_reviews_revlistleft {
+ text-align: left;
+ border-right: 1px solid #000000;
+ width: 120px;
+}
+
+.xnewsletter_reviews_revlistright {
+ text-align: left;
+}
+
+.xnewsletter_reviews_revlistreview {
+ position: absolute;
+ top: 0;
+ left: 125px;
+ width: 90%;
+}
+
+.xnewsletter_reviews_revlisttitle {
+ margin-left: 10px;
+ margin-right: 10px;
+ padding: 4px;
+ font-weight: bold;
+ color: #0000CC;
+}
+
+.xnewsletter_reviews_revlistrev {
+}
+
+.xnewsletter_reviews_foot {
+ background-color: #BEC8D1;
+ border: 2px solid #000000;
+ width: 95%;
+}
+
+.xnewsletter_reviews_addrev {
+ position: absolute;
+ top: 0;
+ left: 0;
+ background-color: #BEC8D1;
+ border: 2px solid #000000;
+}
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/index.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/index.php 2014-03-24 19:19:45 UTC (rev 12405)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/index.php 2014-03-24 19:29:02 UTC (rev 12406)
@@ -37,20 +37,16 @@
$xoopsOption['template_main'] = 'xNewsletter_index.html';
include XOOPS_ROOT_PATH . "/header.php";
- $xoTheme->addStylesheet($style);
- $xoopsTpl->assign('xnewsletter_url', XNEWSLETTER_URL);
- $xoopsTpl->assign('copyright', $moduleCopyrightHtml);
+ $xoTheme->addStylesheet(XNEWSLETTER_URL . '/css/module.css');
$xoTheme->addMeta('meta', 'keywords', $GLOBALS['xoopsModuleConfig']['keywords']); // keywords only for index page
$xoTheme->addMeta('meta', 'description', strip_tags(_MA_XNEWSLETTER_DESC)); // description
- // module configs for template
- $xoopsTpl->assign('adv', $GLOBALS['xoopsModuleConfig']['advertise']);
- $xoopsTpl->assign('advertise', $GLOBALS['xoopsModuleConfig']['advertise']);
- if($GLOBALS['xoopsModuleConfig']['social_active'] == true) {
- $xoopsTpl->assign('social_active', $GLOBALS['xoopsModuleConfig']['social_active']);
- $xoopsTpl->assign('social_code', $GLOBALS['xoopsModuleConfig']['social_code']);
- }
+
+ // Breadcrumb
+ $breadcrumb = new xNewsletterBreadcrumb();
+ $breadcrumb->addLink($xnewsletter->getModule()->getVar('name'), XNEWSLETTER_URL);
+ $xoopsTpl->assign('xnewsletter_breadcrumb', $breadcrumb->render());
+
$xoopsTpl->assign('welcome_message', $GLOBALS['xoopsModuleConfig']['welcome_message']);
-
$xoopsTpl->assign('xnewsletter_content', _MA_XNEWSLETTER_WELCOME); // this definition is not removed for backward compatibility issues
break;
@@ -59,18 +55,15 @@
$xoopsOption['template_main'] = 'xnewsletter_letter_preview.html';
include XOOPS_ROOT_PATH . "/header.php";
- $xoTheme->addStylesheet($style);
- $xoopsTpl->assign('xnewsletter_url', XNEWSLETTER_URL);
- $xoopsTpl->assign('copyright', $moduleCopyrightHtml);
+ $xoTheme->addStylesheet(XNEWSLETTER_URL . '/css/module.css');
$xoTheme->addMeta('meta', 'keywords', $GLOBALS['xoopsModuleConfig']['keywords']); // keywords only for index page
$xoTheme->addMeta('meta', 'description', strip_tags(_MA_XNEWSLETTER_DESC)); // description
- // module configs for template
- $xoopsTpl->assign('adv', $GLOBALS['xoopsModuleConfig']['advertise']);
- $xoopsTpl->assign('advertise', $GLOBALS['xoopsModuleConfig']['advertise']);
- if($GLOBALS['xoopsModuleConfig']['social_active'] == true) {
- $xoopsTpl->assign('social_active', $GLOBALS['xoopsModuleConfig']['social_active']);
- $xoopsTpl->assign('social_code', $GLOBALS['xoopsModuleConfig']['social_code']);
- }
+
+ // Breadcrumb
+ $breadcrumb = new xNewsletterBreadcrumb();
+ $breadcrumb->addLink($xnewsletter->getModule()->getVar('name'), XNEWSLETTER_URL);
+ $xoopsTpl->assign('xnewsletter_breadcrumb', $breadcrumb->render());
+
$xoopsTpl->assign('welcome_message', $GLOBALS['xoopsModuleConfig']['welcome_message']);
$template_path = XNEWSLETTER_PATH . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/templates/';
@@ -107,18 +100,16 @@
$xoopsOption['template_main'] = 'xNewsletter_index_list_letters.html';
include XOOPS_ROOT_PATH . "/header.php";
- $xoTheme->addStylesheet($style);
- $xoopsTpl->assign('xnewsletter_url', XNEWSLETTER_URL);
- $xoopsTpl->assign('copyright', $moduleCopyrightHtml);
+ $xoTheme->addStylesheet(XNEWSLETTER_URL . '/css/module.css');
$xoTheme->addMeta('meta', 'keywords', $GLOBALS['xoopsModuleConfig']['keywords']); // keywords only for index page
$xoTheme->addMeta('meta', 'description', strip_tags(_MA_XNEWSLETTER_DESC)); // description
- // module configs for template
- $xoopsTpl->assign('adv', $GLOBALS['xoopsModuleConfig']['advertise']);
- $xoopsTpl->assign('advertise', $GLOBALS['xoopsModuleConfig']['advertise']);
- if($GLOBALS['xoopsModuleConfig']['social_active'] == true) {
- $xoopsTpl->assign('social_active', $GLOBALS['xoopsModuleConfig']['social_active']);
- $xoopsTpl->assign('social_code', $GLOBALS['xoopsModuleConfig']['social_code']);
- }
+
+ // Breadcrumb
+ $breadcrumb = new xNewsletterBreadcrumb();
+ $breadcrumb->addLink($xnewsletter->getModule()->getVar('name'), XNEWSLETTER_URL);
+ $breadcrumb->addLink(_MD_XNEWSLETTER_LIST, '');
+ $xoopsTpl->assign('xnewsletter_breadcrumb', $breadcrumb->render());
+
$xoopsTpl->assign('welcome_message', $GLOBALS['xoopsModuleConfig']['welcome_message']);
// get letters array
@@ -163,4 +154,4 @@
break;
}
-include_once XOOPS_ROOT_PATH . "/footer.php";
+include 'footer.php';
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/help/help.html
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/help/help.html 2014-03-24 19:19:45 UTC (rev 12405)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/help/help.html 2014-03-24 19:29:02 UTC (rev 12406)
@@ -25,7 +25,7 @@
* Version : 1 Mon 2012/11/05 14:31:32 : Exp $
* ****************************************************************************
*/
-
+
<div id="help-template" class="outer">
<h1 class="head">Help:
<a class="ui-corner-all tooltip" href="<{$xoops_url}>/modules/xNewsletter/admin/index.php"
@@ -44,10 +44,10 @@
- Newsletter are based on templates<br />
- Detailed handling of permissions for groups and newsletter (subscribe, write, send)<br />
- Send: send test mail, resend to all subscribers or only to subscribers, where sending failed<br />
- - Sending newsletters to unlimited number of recipients or in packages with certain number of recipients by using cronjob<br />
+ - Sending newsletters to unlimited number of recipients or in packages with certain number of recipients by using cron job<br />
- Bounced email handler for handling Bounced emails in case of invalid e-mail-addresses<br />
- Optionally synchronisation with mailing lists (e.g. majordomo)<br />
- - Maintenace function included<br />
+ - Maintenance function included<br />
- Creating protocol for the important steps<br />
<br />
</p>
@@ -59,18 +59,18 @@
Manual</a>.<br /><br /></p>
<h4 class="odd">Tutorial</h4>
<!-- -----Help Content ---------- -->
-
-
-
+
+
+
<h5 class="odd">Basic information</h5>
<p class="even">The module is based on PHPMailer and PHPMailer-BMH
<br /><br /></p>
-
+
<h5 class="odd">(Un) subscriptions to newsletters</h5>
<p class="even">
- You can define for each newsletter and for each group, whether for (un) subscritpion or change a confirmation email with activation key is necessary or not (use double-option).<br />
+ You can define for each newsletter and for each group, whether for (un) subscription or change a confirmation email with activation key is necessary or not (use double-option).<br />
<br /><br /></p>
-
+
<h5 class="odd">Accounts</h5>
<p class="even">
You can use one or more email-account; sending with php mail, php sendmail, smtp is possible.<br />
@@ -78,13 +78,13 @@
<br />
Pay attention: functions like testing account, sending emails, start Bounced email handler,... work not with local server (you get white page without any error).<br />
<br /><br /></p>
-
+
<h5 class="odd">Newsletter categories</h5>
<p class="even">
You can handle one or more newsletter categories.<br />
It is possible to set permissions "read", "create", "admin" and "list subscribers" for each newsletter cat.<br />
<br /><br /></p>
-
+
<h5 class="odd">Create a newsletter</h5>
<p class="even">
The newsletter can be created with each text editor which is installed in current xoops core (e.g. TinyMCE). <br />
@@ -94,14 +94,14 @@
Optionally you can also copy an older newsletter and edit or send it as a new one.<br /><br />
The type of text editor, allows mime-types and size of mail attachments can be set in module preferences.<br />
<br /><br /></p>
-
+
<h5 class="odd">Newsletter templates</h5>
<p class="even">
The newsletters are template based.<br />
The templates you can find in language/{yourlanguage}/templates.<br />
To create a new template you have only to make a new html-file in this folder and to put in the smarty-vars.<br />
<br /><br /></p>
-
+
<h5 class="odd">Sending newsletter</h5>
<p class="even">
You can show a preview of a newsletter before sending.<br />
@@ -112,19 +112,19 @@
You can restart sending procedure. You can send it again to all subscribers or send it only to the subscribers, where sending procedure failed).<br />
<br />
You can send all emails immediately or limit emails send in one package.<br />
- The number of emails and the minutes untill next sending can be defined in module preferences (e.g. 200 emails all 60 minutes).<br />
- The first package will be sent immediately. To start the next sending procedure you need an external cronjob, which is calling "../modules/xNewsletter/cron.php". Xoops cannot do this with current version (2.5.5).<br />
+ The number of emails and the minutes until next sending can be defined in module preferences (e.g. 200 emails all 60 minutes).<br />
+ The first package will be sent immediately. To start the next sending procedure you need an external cron job, which is calling "../modules/xNewsletter/cron.php". Xoops cannot do this with current version (2.5.5).<br />
<br />
Pay attention: functions like testing account, sending emails, start Bounced email handler,... work not with local server (you get white page).<br />
<br /><br /></p>
-
+
<h5 class="odd">Task list</h5>
<p class="even">
- If you limit emails send in one package, you can see all newsletters waiting for next cronjob and the time, when cronjob can send the newsletter.<br />
+ If you limit emails send in one package, you can see all newsletters waiting for next cron job and the time, when cron job can send the newsletter.<br />
If you do not use this option, this list must always be empty.<br />
Normally the tab "Task list" is hidden, if this option is disabled.<br />
<br /><br /></p>
-
+
<h5 class="odd">Handle mailing lists</h5>
<p class="even">
If you have an existing mailing list, you can synchronize the (un) subscriptions of one newsletter category with one mailing list.<br />
@@ -135,7 +135,7 @@
<br />
<b>xNewsletter cannot create mailing lists</b>.
<br /><br /></p>
-
+
<h5 class="odd">Bounced email handler (BMH)</h5>
<p class="even">
If you send newsletters, there will always be some emails not delivered to recipient (Bounced email), because email is no more valid, mailbox is full, and so on.<br />
@@ -159,12 +159,12 @@
<br />
Pay attention: functions like testing account, sending emails, start Bounced email handler,... work not with local server (you get white page).<br />
<br /><br /></p>
-
+
<h5 class="odd">Maintenance</h5>
<p class="even">
This module has a maintain function, which can repair several faults in the data.<br />
<br /><br /></p>
-
+
<h5 class="odd">Import</h5>
<p class="even">
You can import data with various plug-ins:
Added: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/help/help2.html
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/help/help2.html (rev 0)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/help/help2.html 2014-03-24 19:29:02 UTC (rev 12406)
@@ -0,0 +1,20 @@
+<div id="help-template" class="outer">
+ <h1 class="head">Help:
+ <a class="ui-corner-all tooltip" href="<{$xoops_url}>/modules/xNewsletter/admin/index.php" title="Back to the administration of xNewsletter">
+ xNewsletter <img src="<{xoAdminIcons home.png}>" alt="Back to the Administration of xNewsletter"/>
+ </a>
+ </h1>
+ <h4 class="odd">Fresh Install</h4>
+ <p><b>Upload the module to your website</b>
+ <br>
+ <br>Upload the 'xNewsletter' folder to {xoops-rootdirectory}/modules folder
+ <br>
+ <br>
+ <br>Login as administrator and enter Xoops Administration page.
+ <br>Select System --> modules and install xNewsletter from there
+ <br>
+ <br><b>Configure the module</b>
+ <br>
+ <br>Most important steps now will be to setup the group permissions for the module and its blocks via System --> groups.
+ </p>
+</div>
\ No newline at end of file
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/main.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/main.php 2014-03-24 19:19:45 UTC (rev 12405)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/main.php 2014-03-24 19:29:02 UTC (rev 12406)
@@ -88,3 +88,14 @@
define('_MA_XNEWSLETTER_LETTER_NONEAVAIL',"No newsletters available for the moment");
//1.2.2
define('_MA_XNEWSLETTER_ACCOUNTS_NONEAVAIL',"No email-accounts available for the moment");
+//1.3
+define('_MD_XNEWSLETTER_SUBSCRIBE',"(Un)Subscribe");
+define('_MD_XNEWSLETTER_LIST',"Newsletter list");
+define('_MD_XNEWSLETTER_LIST_SUBSCR',"List subscribers");
+define('_MD_XNEWSLETTER_LETTER_CREATE',"Create newsletter");
+define('_MD_XNEWSLETTER_LETTER_EDIT',"Edit newsletter");
+define('_MD_XNEWSLETTER_LETTER_DELETE',"Delete newsletter");
+define('_MD_XNEWSLETTER_LETTER_COPY',"Copy/clone newsletter");
+define('_MD_XNEWSLETTER_LETTER_PREVIEW',"Preview");
+define('_MD_XNEWSLETTER_SUBSCRIPTION_EDIT',"Edit subscriptions");
+define('_MD_XNEWSLETTER_SUBSCRIPTION_DELETE',"Delete subscriptions");
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/modinfo.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/modinfo.php 2014-03-24 19:19:45 UTC (rev 12405)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/modinfo.php 2014-03-24 19:29:02 UTC (rev 12406)
@@ -80,7 +80,7 @@
define('_MI_XNEWSLETTER_USE_SALUTATION',"Use field salutation");
define('_MI_XNEWSLETTER_USE_SALUTATION_DESC',"Please decide, whether you want use salutations like 'Mr.', 'Mrs.',...");
define('_MI_XNEWSLETTER_SEND_IN_PACKAGES',"Send e-mails in packages");
-define('_MI_XNEWSLETTER_SEND_IN_PACKAGES_DESC',"Number of e-mails, which should be sent in one package. 0 means, that all e-mails always be sent immediatly. You can use this option only, if you can start cronjobs with external programs.");
+define('_MI_XNEWSLETTER_SEND_IN_PACKAGES_DESC', "Number of e-mails, which should be sent in one package. 0 means, that all e-mails always be sent immediately. You can use this option only, if you can start cron jobs with external programs.");
define('_MI_XNEWSLETTER_SEND_IN_PACKAGES_TIME',"Time period for sending e-mails in packages");
define('_MI_XNEWSLETTER_SEND_IN_PACKAGES_TIME_DESC',"Time period in minutes, when the next package should be sent. Only used, if 'Send e-mails in packages' is bigger than 0.");
define('_MI_XNEWSLETTER_UPGRADEFAILED',"Error while updating module");
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/letter.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/letter.php 2014-03-24 19:19:45 UTC (rev 12405)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/letter.php 2014-03-24 19:29:02 UTC (rev 12406)
@@ -73,15 +73,16 @@
$xoopsOption['template_main'] = 'xnewsletter_letter_list_subscrs.html';
include_once XOOPS_ROOT_PATH . "/header.php";
- $xoTheme->addStylesheet($style);
- $xoopsTpl->assign('xnewsletter_url', XNEWSLETTER_URL);
- $xoopsTpl->assign('copyright', $moduleCopyrightHtml);
- // module configs for template
- if($xoopsModuleConfig['social_active'] == true) {
- $xoopsTpl->assign('social_active', $xoopsModuleConfig['social_active']);
- $xoopsTpl->assign('social_code', $xoopsModuleConfig['social_code']);
- }
+ $xoTheme->addStylesheet(XNEWSLETTER_URL . '/css/module.css');
+ $xoTheme->addMeta('meta', 'keywords', $GLOBALS['xoopsModuleConfig']['keywords']); // keywords only for index page
+ $xoTheme->addMeta('meta', 'description', strip_tags(_MA_XNEWSLETTER_DESC)); // description
+ // Breadcrumb
+ $breadcrumb = new xNewsletterBreadcrumb();
+ $breadcrumb->addLink($xnewsletter->getModule()->getVar('name'), XNEWSLETTER_URL);
+ $breadcrumb->addLink(_MD_XNEWSLETTER_LIST_SUBSCR, '');
+ $xoopsTpl->assign('xnewsletter_breadcrumb', $breadcrumb->render());
+
// check right to edit/delete subscription of other persons
$permissionChangeOthersSubscriptions = false;
foreach ($groups as $group) {
@@ -142,14 +143,15 @@
//$xoopsOption['template_main'] = 'xnewsletter_letter.html'; // IN PROGRESS
include_once XOOPS_ROOT_PATH . "/header.php";
- $xoTheme->addStylesheet($style);
- $xoopsTpl->assign('xnewsletter_url', XNEWSLETTER_URL);
- $xoopsTpl->assign('copyright', $moduleCopyrightHtml);
- // module configs for template
- if($xoopsModuleConfig['social_active'] == true) {
- $xoopsTpl->assign('social_active', $xoopsModuleConfig['social_active']);
- $xoopsTpl->assign('social_code', $xoopsModuleConfig['social_code']);
- }
+ $xoTheme->addStylesheet(XNEWSLETTER_URL . '/css/module.css');
+ $xoTheme->addMeta('meta', 'keywords', $GLOBALS['xoopsModuleConfig']['keywords']); // keywords only for index page
+ $xoTheme->addMeta('meta', 'description', strip_tags(_MA_XNEWSLETTER_DESC)); // description
+
+ // Breadcrumb
+ $breadcrumb = new xNewsletterBreadcrumb();
+ $breadcrumb->addLink($xnewsletter->getModule()->getVar('name'), XNEWSLETTER_URL);
+ $xoopsTpl->assign('xnewsletter_breadcrumb', $breadcrumb->render());
+
// IN PROGRESS FROM HERE
// get attachment
$attachment_id = xNewsletter_CleanVars($_REQUEST, 'attachment_' . $id_del, 'none', 'string');
@@ -211,15 +213,17 @@
$xoopsOption['template_main'] = 'xnewsletter_letter_preview.html';
include XOOPS_ROOT_PATH . "/header.php";
- $xoTheme->addStylesheet($style);
- $xoopsTpl->assign('xnewsletter_url', XNEWSLETTER_URL);
- $xoopsTpl->assign('copyright', $moduleCopyrightHtml);
- // module configs for template
- if($xoopsModuleConfig['social_active'] == true) {
- $xoopsTpl->assign('social_active', $xoopsModuleConfig['social_active']);
- $xoopsTpl->assign('social_code', $xoopsModuleConfig['social_code']);
- }
+ $xoTheme->addStylesheet(XNEWSLETTER_URL . '/css/module.css');
+ $xoTheme->addMeta('meta', 'keywords', $GLOBALS['xoopsModuleConfig']['keywords']); // keywords only for index page
+ $xoTheme->addMeta('meta', 'description', strip_tags(_MA_XNEWSLETTER_DESC)); // description
+ // Breadcrumb
+ $breadcrumb = new xNewsletterBreadcrumb();
+ $breadcrumb->addLink($xnewsletter->getModule()->getVar('name'), XNEWSLETTER_URL);
+ $breadcrumb->addLink(_MD_XNEWSLETTER_LIST, XNEWSLETTER_URL . '/letter.php?op=list_letters');
+ $breadcrumb->addLink(_MD_XNEWSLETTER_LETTER_PREVIEW, '');
+ $xoopsTpl->assign('xnewsletter_breadcrumb', $breadcrumb->render());
+
// get letter templates path
$letterTemplatePath = XNEWSLETTER_PATH . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/templates/';
if (!is_dir($letterTemplatePath)) {
@@ -254,15 +258,16 @@
$xoopsOption['template_main'] = 'xnewsletter_letter_list_letters.html';
include_once XOOPS_ROOT_PATH . "/header.php";
- $xoTheme->addStylesheet($style);
- $xoopsTpl->assign('xnewsletter_url', XNEWSLETTER_URL);
- $xoopsTpl->assign('copyright', $moduleCopyrightHtml);
- // module configs for template
- if($xoopsModuleConfig['social_active'] == true) {
- $xoopsTpl->assign('social_active', $xoopsModuleConfig['social_active']);
- $xoopsTpl->assign('social_code', $xoopsModuleConfig['social_code']);
- }
+ $xoTheme->addStylesheet(XNEWSLETTER_URL . '/css/module.css');
+ $xoTheme->addMeta('meta', 'keywords', $GLOBALS['xoopsModuleConfig']['keywords']); // keywords only for index page
+ $xoTheme->addMeta('meta', 'description', strip_tags(_MA_XNEWSLETTER_DESC)); // description
+ // Breadcrumb
+ $breadcrumb = new xNewsletterBreadcrumb();
+ $breadcrumb->addLink($xnewsletter->getModule()->getVar('name'), XNEWSLETTER_URL);
+ $breadcrumb->addLink(_MD_XNEWSLETTER_LIST, '');
+ $xoopsTpl->assign('xnewsletter_breadcrumb', $breadcrumb->render());
+
// get letters array
$criteria_letters = new CriteriaCompo();
$criteria_letters->setSort("letter_id");
@@ -343,14 +348,16 @@
$xoopsOption['template_main'] = 'xnewsletter_letter.html'; // IN PROGRESS
include_once XOOPS_ROOT_PATH . "/header.php";
- $xoTheme->addStylesheet($style);
- $xoopsTpl->assign('xnewsletter_url', XNEWSLETTER_URL);
- $xoopsTpl->assign('copyright', $moduleCopyrightHtml);
- // module configs for template
- if($xoopsModuleConfig['social_active'] == true) {
- $xoopsTpl->assign('social_active', $xoopsModuleConfig['social_active']);
- $xoopsTpl->assign('social_code', $xoopsModuleConfig['social_code']);
- }
+ $xoTheme->addStylesheet(XNEWSLETTER_URL . '/css/module.css');
+ $xoTheme->addMeta('meta', 'keywords', $GLOBALS['xoopsModuleConfig']['keywords']); // keywords only for index page
+ $xoTheme->addMeta('meta', 'description', strip_tags(_MA_XNEWSLETTER_DESC)); // description
+
+ // Breadcrumb
+ $breadcrumb = new xNewsletterBreadcrumb();
+ $breadcrumb->addLink($xnewsletter->getModule()->getVar('name'), XNEWSLETTER_URL);
+ $breadcrumb->addLink(_MD_XNEWSLETTER_LETTER_CREATE, '');
+ $xoopsTpl->assign('xnewsletter_breadcrumb', $breadcrumb->render());
+
// IN PROGRESS FROM HERE
$letterObj =& $letterHandler->create();
$form = $letterObj->getForm();
@@ -363,14 +370,17 @@
$xoopsOption['template_main'] = 'xnewsletter_letter.html'; // IN PROGRESS
include_once XOOPS_ROOT_PATH . "/header.php";
- $xoTheme->addStylesheet($style);
- $xoopsTpl->assign('xnewsletter_url', XNEWSLETTER_URL);
- $xoopsTpl->assign('copyright', $moduleCopyrightHtml);
- // module configs for template
- if($xoopsModuleConfig['social_active'] == true) {
- $xoopsTpl->assign('social_active', $xoopsModuleConfig['social_active']);
- $xoopsTpl->assign('social_code', $xoopsModuleConfig['social_code']);
- }
+ $xoTheme->addStylesheet(XNEWSLETTER_URL . '/css/module.css');
+ $xoTheme->addMeta('meta', 'keywords', $GLOBALS['xoopsModuleConfig']['keywords']); // keywords only for index page
+ $xoTheme->addMeta('meta', 'description', strip_tags(_MA_XNEWSLETTER_DESC)); // description
+
+ // Breadcrumb
+ $breadcrumb = new xNewsletterBreadcrumb();
+ $breadcrumb->addLink($xnewsletter->getModule()->getVar('name'), XNEWSLETTER_URL);
+ $breadcrumb->addLink(_MD_XNEWSLETTER_LIST, XNEWSLETTER_URL . '/letter.php?op=list_letters');
+ $breadcrumb->addLink(_MD_XNEWSLETTER_LETTER_COPY, '');
+ $xoopsTpl->assign('xnewsletter_breadcrumb', $breadcrumb->render());
+
// IN PROGRESS FROM HERE
$obj_letter_old =& $letterHandler->get($letter_id);
@@ -393,14 +403,15 @@
$xoopsOption['template_main'] = 'xnewsletter_letter.html'; // IN PROGRESS
include_once XOOPS_ROOT_PATH . "/header.php";
- $xoTheme->addStylesheet($style);
- $xoopsTpl->assign('xnewsletter_url', XNEWSLETTER_URL);
- $xoopsTpl->assign('copyright', $moduleCopyrightHtml);
- // module configs for template
- if($xoopsModuleConfig['social_active'] == true) {
- $xoopsTpl->assign('social_active', $xoopsModuleConfig['social_active']);
- $xoopsTpl->assign('social_code', $xoopsModuleConfig['social_code']);
- }
+ $xoTheme->addStylesheet(XNEWSLETTER_URL . '/css/module.css');
+ $xoTheme->addMeta('meta', 'keywords', $GLOBALS['xoopsModuleConfig']['keywords']); // keywords only for index page
+ $xoTheme->addMeta('meta', 'description', strip_tags(_MA_XNEWSLETTER_DESC)); // description
+
+ // Breadcrumb
+ $breadcrumb = new xNewsletterBreadcrumb();
+ $breadcrumb->addLink($xnewsletter->getModule()->getVar('name'), XNEWSLETTER_URL);
+ $xoopsTpl->assign('xnewsletter_breadcrumb', $breadcrumb->render());
+
// IN PROGRESS FROM HERE
if ( !$GLOBALS["xoopsSecurity"]->check() ) {
@@ -525,14 +536,17 @@
$xoopsOption['template_main'] = 'xnewsletter_letter.html'; // IN PROGRESS
include_once XOOPS_ROOT_PATH . "/header.php";
- $xoTheme->addStylesheet($style);
- $xoopsTpl->assign('xnewsletter_url', XNEWSLETTER_URL);
- $xoopsTpl->assign('copyright', $moduleCopyrightHtml);
- // module configs for template
- if($xoopsModuleConfig['social_active'] == true) {
- $xoopsTpl->assign('social_active', $xoopsModuleConfig['social_active']);
- $xoopsTpl->assign('social_code', $xoopsModuleConfig['social_code']);
- }
+ $xoTheme->addStylesheet(XNEWSLETTER_URL . '/css/module.css');
+ $xoTheme->addMeta('meta', 'keywords', $GLOBALS['xoopsModuleConfig']['keywords']); // keywords only for index page
+ $xoTheme->addMeta('meta', 'description', strip_tags(_MA_XNEWSLETTER_DESC)); // description
+
+ // Breadcrumb
+ $breadcrumb = new xNewsletterBreadcrumb();
+ $breadcrumb->addLink($xnewsletter->getModule()->getVar('name'), XNEWSLETTER_URL);
+ $breadcrumb->addLink(_MD_XNEWSLETTER_LIST, XNEWSLETTER_URL . '/letter.php?op=list_letters');
+ $breadcrumb->addLink(_MD_XNEWSLETTER_LETTER_EDIT, '');
+ $xoopsTpl->assign('xnewsletter_breadcrumb', $breadcrumb->render());
+
// IN PROGRESS FROM HERE
$letterObj = $letterHandler->get($letter_id);
@@ -545,14 +559,17 @@
$xoopsOption['template_main'] = 'xnewsletter_letter.html'; // IN PROGRESS
include_once XOOPS_ROOT_PATH . "/header.php";
- $xoTheme->addStylesheet($style);
- $xoopsTpl->assign('xnewsletter_url', XNEWSLETTER_URL);
- $xoopsTpl->assign('copyright', $moduleCopyrightHtml);
- // module configs for template
- if($xoopsModuleConfig['social_active'] == true) {
- $xoopsTpl->assign('social_active', $xoopsModuleConfig['social_active']);
- $xoopsTpl->assign('social_code', $xoopsModuleConfig['social_code']);
- }
+ $xoTheme->addStylesheet(XNEWSLETTER_URL . '/css/module.css');
+ $xoTheme->addMeta('meta', 'keywords', $GLOBALS['xoopsModuleConfig']['keywords']); // keywords only for index page
+ $xoTheme->addMeta('meta', 'description', strip_tags(_MA_XNEWSLETTER_DESC)); // description
+
+ // Breadcrumb
+ $breadcrumb = new xNewsletterBreadcrumb();
+ $breadcrumb->addLink($xnewsletter->getModule()->getVar('name'), XNEWSLETTER_URL);
+ $breadcrumb->addLink(_MD_XNEWSLETTER_LIST, XNEWSLETTER_URL . '/letter.php?op=list_letters');
+ $breadcrumb->addLink(_MD_XNEWSLETTER_LETTER_DELETE, '');
+ $xoopsTpl->assign('xnewsletter_breadcrumb', $breadcrumb->render());
+
// IN PROGRESS FROM HERE
$obj_letter =& $letterHandler->get($letter_id);
@@ -589,4 +606,4 @@
break;
}
-include_once XOOPS_ROOT_PATH . "/footer.php";
+include 'footer.php';
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/print.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/print.php 2014-03-24 19:19:45 UTC (rev 12405)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/print.php 2014-03-24 19:29:02 UTC (rev 12406)
@@ -114,7 +114,7 @@
echo '<!-- Sheet Css -->';
echo '<link rel="stylesheet" type="text/css" media="all" title="Style sheet" href="' . XOOPS_URL . '/xoops.css" />\n';
echo '<link rel="stylesheet" type="text/css" media="all" title="Style sheet" href="' . XOOPS_URL . '/themes/default/style.css" />\n';
- echo '<link rel="stylesheet" type="text/css" media="all" title="Style sheet" href="' . XOOPS_URL . '/modules/xcomp/style.css" />\n';
+ echo '<link rel="stylesheet" type="text/css" media="all" title="Style sheet" href="' . XOOPS_URL . '/modules/xnewsletter/css/module.css" />\n';
?>
<script type="text/javascript">
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/protocol.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/protocol.php 2014-03-24 19:19:45 UTC (rev 12405)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/protocol.php 2014-03-24 19:29:02 UTC (rev 12406)
@@ -31,10 +31,16 @@
$xoopsOption['template_main'] = 'xnewsletter_protocol.html';
include_once XOOPS_ROOT_PATH . "/header.php";
-$xoTheme->addStylesheet($style);
-//$xoTheme->addScript($script);
-$xoopsTpl->assign('xnewsletter_url', XNEWSLETTER_URL);
+$xoTheme->addStylesheet(XNEWSLETTER_URL . '/css/module.css');
+$xoTheme->addMeta('meta', 'keywords', $GLOBALS['xoopsModuleConfig']['keywords']); // keywords only for index page
+$xoTheme->addMeta('meta', 'description', strip_tags(_MA_XNEWSLETTER_DESC)); // description
+
+// Breadcrumb
+$breadcrumb = new xNewsletterBreadcrumb();
+$breadcrumb->addLink($xnewsletter->getModule()->getVar('name'), XNEWSLETTER_URL);
+$xoopsTpl->assign('xnewsletter_breadcrumb', $breadcrumb->render());
+
$letter_id = xNewsletter_CleanVars($_REQUEST, 'letter_id', 0, 'int');
$letterObj = $letterHandler->get($letter_id);
$xoopsTpl->assign('letter', $letterObj->toArray());
@@ -63,4 +69,4 @@
$xoopsTpl->assign('protocols', $protocols);
-include_once XOOPS_ROOT_PATH . "/footer.php";
+include 'footer.php';
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/sendletter.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/sendletter.php 2014-03-24 19:19:45 UTC (rev 12405)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/sendletter.php 2014-03-24 19:29:02 UTC (rev 12406)
@@ -32,15 +32,14 @@
$xoopsOption['template_main'] = 'xnewsletter_letter.html';
include_once XOOPS_ROOT_PATH . "/header.php";
-$xoTheme->addStylesheet($style);
-$xoopsTpl->assign('xnewsletter_url', XNEWSLETTER_URL);
-$xoopsTpl->assign('copyright', $moduleCopyrightHtml);
-// module configs for template
-if($xoopsModuleConfig['social_active'] == true) {
- $xoopsTpl->assign('social_active', $xoopsModuleConfig['social_active']);
- $xoopsTpl->assign('social_code', $xoopsModuleConfig['social_code']);
-}
+$xoTheme->addStylesheet(XNEWSLETTER_URL . '/css/module.css');
+$xoTheme->addMeta('meta', 'keywords', $GLOBALS['xoopsModuleConfig']['keywords']); // keywords only for index page
+$xoTheme->addMeta('meta', 'description', strip_tags(_MA_XNEWSLETTER_DESC)); // description
+// Breadcrumb
+$breadcrumb = new xNewsletterBreadcrumb();
+$breadcrumb->addLink($xnewsletter->getModule()->getVar('name'), XNEWSLETTER_URL);
+$xoopsTpl->assign('xnewsletter_breadcrumb', $breadcrumb->render());
include XOOPS_ROOT_PATH . "/modules/xNewsletter/include/task.inc.php";
@@ -91,4 +90,4 @@
redirect_header('letter.php', 3, $result_exec);
}
-include_once XOOPS_ROOT_PATH . "/footer.php";
+include 'footer.php';
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/subscription.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/subscription.php 2014-03-24 19:19:45 UTC (rev 12405)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/subscription.php 2014-03-24 19:29:02 UTC (rev 12406)
@@ -97,16 +97,15 @@
$xoopsOption['template_main'] = 'xnewsletter_subscription_result.html';
include_once XOOPS_ROOT_PATH . "/header.php";
- // COMMON
- $xoTheme->addStylesheet($style);
- $xoopsTpl->assign('xnewsletter_url', XNEWSLETTER_URL);
- $xoopsTpl->assign('copyright', $moduleCopyrightHtml);
- // module configs for template
- if($xoopsModuleConfig['social_active'] == true) {
- $xoopsTpl->assign('social_active', $xoopsModuleConfig['social_active']);
- $xoopsTpl->assign('social_code', $xoopsModuleConfig['social_code']);
- }
+ $xoTheme->addStylesheet(XNEWSLETTER_URL . '/css/module.css');
+ $xoTheme->addMeta('meta', 'keywords', $GLOBALS['xoopsModuleConfig']['keywords']); // keywords only for index page
+ $xoTheme->addMeta('meta', 'description', strip_tags(_MA_XNEWSLETTER_DESC)); // description
+ // Breadcrumb
+ $breadcrumb = new xNewsletterBreadcrumb();
+ $breadcrumb->addLink($xnewsletter->getModule()->getVar('name'), XNEWSLETTER_URL);
+ $xoopsTpl->assign('xnewsletter_breadcrumb', $breadcrumb->render());
+
// resend the email with the confirmation code
$subscr_id = xNewsletter_CleanVars($_REQUEST, 'subscr_id', 0, 'int');
$criteria_subscr = new CriteriaCompo();
@@ -149,16 +148,14 @@
case "save_subscription" :
include_once XOOPS_ROOT_PATH . "/header.php";
- // COMMON
- $xoTheme->addStylesheet($style);
- $xoopsTpl->assign('xnewsletter_url', XNEWSLETTER_URL);
- $xoopsTpl->assign('copyright', $moduleCopyrightHtml);
- // module configs for template
- if($xoopsModuleConfig['social_active'] == true) {
- $xoopsTpl->assign('social_active', $xoopsModuleConfig['social_active']);
- $xoopsTpl->assign('social_code', $xoopsModuleConfig['social_code']);
- }
+ $xoTheme->addStylesheet(XNEWSLETTER_URL . '/css/module.css');
+ $xoTheme->addMeta('meta', 'keywords', $GLOBALS['xoopsModuleConfig']['keywords']); // keywords only for index page
+ $xoTheme->addMeta('meta', 'description', strip_tags(_MA_XNEWSLETTER_DESC)); // description
+ // Breadcrumb
+ $breadcrumb = new xNewsletterBreadcrumb();
+ $breadcrumb->addLink($xnewsletter->getModule()->getVar('name'), XNEWSLETTER_URL);
+ $xoopsTpl->assign('xnewsletter_breadcrumb', $breadcrumb->render());
// check right to subscribe directly
$submitterUid = is_object($xoopsUser) ? (int)$xoopsUser->getVar('uid') : 0;
@@ -534,16 +531,15 @@
$xoopsOption['template_main'] = 'xnewsletter_subscription.html';
include_once XOOPS_ROOT_PATH . "/header.php";
- // COMMON
- $xoTheme->addStylesheet($style);
- $xoopsTpl->assign('xnewsletter_url', XNEWSLETTER_URL);
- $xoopsTpl->assign('copyright', $moduleCopyrightHtml);
- // module configs for template
- if($xoopsModuleConfig['social_active'] == true) {
- $xoopsTpl->assign('social_active', $xoopsModuleConfig['social_active']);
- $xoopsTpl->assign('social_code', $xoopsModuleConfig['social_code']);
- }
+ $xoTheme->addStylesheet(XNEWSLETTER_URL . '/css/module.css');
+ $xoTheme->addMeta('meta', 'keywords', $GLOBALS['xoopsModuleConfig']['keywords']); // keywords only for index page
+ $xoTheme->addMeta('meta', 'description', strip_tags(_MA_XNEWSLETTER_DESC)); // description
+ // Breadcrumb
+ $breadcrumb = new xNewsletterBreadcrumb();
+ $breadcrumb->addLink($xnewsletter->getModule()->getVar('name'), XNEWSLETTER_URL);
+ $xoopsTpl->assign('xnewsletter_breadcrumb', $breadcrumb->render());
+
// get create subscr form
if ($subscr_email != '') {
//existing email
@@ -568,16 +564,17 @@
$xoopsOption['template_main'] = 'xnewsletter_subscription.html';
include_once XOOPS_ROOT_PATH . "/header.php";
- // COMMON
- $xoTheme->addStylesheet($style);
- $xoopsTpl->assign('xnewsletter_url', XNEWSLETTER_URL);
- $xoopsTpl->assign('copyright', $moduleCopyrightHtml);
- // module configs for template
- if($xoopsModuleConfig['social_active'] == true) {
- $xoopsTpl->assign('social_active', $xoopsModuleConfig['social_active']);
- $xoopsTpl->assign('social_code', $xoopsModuleConfig['social_code']);
- }
+ $xoTheme->addStylesheet(XNEWSLETTER_URL . '/css/module.css');
+ $xoTheme->addMeta('meta', 'keywords', $GLOBALS['xoopsModuleConfig']['keywords']); // keywords only for index page
+ $xoTheme->addMeta('meta', 'description', strip_tags(_MA_XNEWSLETTER_DESC)); // description
+ // Breadcrumb
+ $breadcrumb = new xNewsletterBreadcrumb();
+ $breadcrumb->addLink($xnewsletter->getModule()->getVar('name'), XNEWSLETTER_URL);
+ $breadcrumb->addLink(_MD_XNEWSLETTER_SUBSCRIBE, XNEWSLETTER_URL . '/subscription.php?op=list_subscriptions');
+ $breadcrumb->addLink(_MD_XNEWSLETTER_SUBSCRIPTION_EDIT, '');
+ $xoopsTpl->assign('xnewsletter_breadcrumb', $breadcrumb->render());
+
// get edit subscr form
$subscr_id = xNewsletter_CleanVars($_REQUEST, 'subscr_id', 0, 'int');
if ($subscr_id <= 0) {
@@ -593,18 +590,17 @@
case "delete_subscription" :
include_once XOOPS_ROOT_PATH . "/header.php";
- // COMMON
- $xoTheme->addStylesheet($style);
- $xoopsTpl->assign('xnewsletter_url', XNEWSLETTER_URL);
- $xoopsTpl->assign('copyright', $moduleCopyrightHtml);
- // module configs for template
- if($xoopsModuleConfig['social_active'] == true) {
- $xoopsTpl->assign('social_active', $xoopsModuleConfig['social_active']);
- $xoopsTpl->assign('social_code', $xoopsModuleConfig['social_code']);
- }
+ $xoTheme->addStylesheet(XNEWSLETTER_URL . '/css/module.css');
+ $xoTheme->addMeta('meta', 'keywords', $GLOBALS['xoopsModuleConfig']['keywords']); // keywords only for index page
+ $xoTheme->addMeta('meta', 'description', strip_tags(_MA_XNEWSLETTER_DESC)); // description
...
[truncated message content] |
|
From: <luc...@us...> - 2014-03-24 19:19:48
|
Revision: 12405
http://sourceforge.net/p/xoops/svn/12405
Author: luciorota
Date: 2014-03-24 19:19:45 +0000 (Mon, 24 Mar 2014)
Log Message:
-----------
change directory structure
Added Paths:
-----------
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/css/module.css
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/js/
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/js/index.html
Removed Paths:
-------------
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/css/style.css
Added: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/css/module.css
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/css/module.css (rev 0)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/css/module.css 2014-03-24 19:19:45 UTC (rev 12405)
@@ -0,0 +1,574 @@
+/**
+ * ****************************************************************************
+ * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org )
+ * ****************************************************************************
+ * XNEWSLETTER - MODULE FOR XOOPS
+ * Copyright (c) 2007 - 2012
+ * goffy ( )
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting
+ * source code which is considered copyrighted (c) material of the
+ * original comment or credit authors.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * ---------------------------------------------------------------------------
+ * @copyright goffy. luciorota ( )
+ * @license gpl 2.0
+ * @package xNewsletter
+ * @author goffy, luciorota ( )
+ *
+ * Version : svn:$Id$
+ * ****************************************************************************
+ */
+
+.box-header {
+ margin: 2px;
+ padding: 5px;
+ background-color: #ccc;
+ width: 100%;
+ height: 50px;
+}
+
+.registration {
+ padding: 30px;
+ text-align: center;
+}
+
+.xnewsletter_headertable {
+ padding: 0;
+ border-bottom: 1px solid;
+ margin: 0 0 10px;
+}
+
+.xnewsletter_modulename {
+ font-size: 10px;
+ text-align: left;
+ font-weight: bold;
+ padding-right: 0.3em;
+ line-height: 18px;
+}
+
+.xnewsletter_breadcrumb {
+ font-size: 10px;
+ line-height: 18px;
+}
+
+.xnewsletter_infotitle {
+ margin-top: 8px;
+ margin-bottom: 8px;
+ font-size: 250%;
+ line-height: 250%;
+ font-weight: bold;
+ display: block;
+}
+
+.xnewsletter_infotext {
+ margin-bottom: 8px;
+ line-height: 130%;
+ display: block;
+}
+
+.xnewsletter_adminlinks {
+ padding-top: 15px;
+ padding-bottom: 5px;
+ font-size: 10px;
+ text-align: center;
+ line-height: 18px;
+}
+
+.xnewsletter_indexfooter {
+ font-size: 10px;
+ font-weight: bold;
+ text-align: center;
+ padding: 10px;
+}
+
+.xnewsletter_itemfooter {
+ font-size: 10px;
+ font-weight: bold;
+ text-align: center;
+ padding: 10px;
+}
+
+ul {
+ padding: 2px;
+ list-style: disc;
+ text-align: left;
+}
+
+li {
+ margin-left: 5px;
+ color: #2F5376;
+}
+
+h4 {
+ font-size: 14px;
+ text-decoration: underline;
+}
+
+.xnewsletter_container {
+ height: 100%;
+ display: table;
+ width: 100%;
+ margin: 0 auto;
+ border: none;
+}
+
+.xnewsletter_static {
+ position: static;
+ clear: both;
+}
+
+/* ---------- global ---------- */
+.xnewsletter_pagenav {
+ text-align: right;
+}
+
+.xnewsletter_copyright {
+ text-align: center;
+}
+
+/* ---------- header.html ---------- */
+.xnewsletter_head_catimgheader {
+ text-align: center;
+}
+
+.xnewsletter_head_downimgheader {
+ text-align: center;
+}
+
+.xnewsletter_head_imgheader {
+ text-align: center;
+}
+
+.xnewsletter_head_catindexheader {
+ /* text-align: center; do not uncomment (will stop index alignment option working) */
+}
+
+.xnewsletter_head_catletters {
+ text-align: center;
+ font-size: 80%;
+}
+
+.xnewsletter_head_cattoolbar {
+ text-align: center;
+}
+
+/* ---------- footer.html ---------- */
+.xnewsletter_foot_commentnav {
+ text-align: center;
+ padding: 3px;
+ margin: 3px;
+}
+
+.xnewsletter_foot_comments {
+ padding: 3px;
+ margin: 3px;
+}
+
+/* ---------- newlist.html ---------- */
+.xnewsletter_newlist_top {
+ text-align: center;
+ width: 100%;
+}
+
+.xnewsletter_newlist_top fieldset {
+ text-align: center;
+ border: 1px solid silver;
+ width: 450px;
+}
+
+.xnewsletter_newlist_totallast {
+ text-align: center;
+ width: 100%;
+ font-weight: bold;
+ font-size: large;
+}
+
+/* ---------- disclaimer.html ---------- */
+.xnewsletter_disc_imghead {
+ text-align: center;
+}
+
+.xnewsletter_disc_disclaimer {
+ text-align: center;
+}
+
+.xnewsletter_disc_discform {
+ text-align: center;
+}
+
+/* ---------- ratefile.html ---------- */
+.xnewsletter_rate_imghead {
+ text-align: center;
+}
+
+/* ---------- viewcat.html ---------- */
+.xnewsletter_view_top {
+}
+
+.xnewsletter_view_subs {
+ border: 0;
+ padding: 0;
+ margin: 0;
+}
+
+.xnewsletter_view_subs h3 {
+ text-align: center;
+ width: 100%;
+ background-color: #BEC8D1;
+}
+
+.xnewsletter_view_subs fieldset {
+}
+
+.xnewsletter_view_subslist {
+ text-align: left;
+ vertical-align: middle;
+ width: 90%;
+}
+
+.xnewsletter_view_catpath {
+ text-align: left;
+ margin-left: 5px;
+ padding: 0;
+ font-weight: bold;
+}
+
+.xnewsletter_view_sortlist {
+ text-align: center;
+ font-size: small;
+}
+
+/* ---------- download.html ---------- */
+.xnewsletter_down_title {
+ padding-top: 2.0em
+}
+
+.xnewsletter_down_top_r {
+ float: right;
+ margin-right: 10px;
+ position: relative;
+}
+
+.xnewsletter_down_top_l {
+ float: left;
+}
+
+.xnewsletter_down_main_l {
+ width: 74%;
+ float: left;
+ height: 100%;
+ position: relative;
+ display: table;
+}
+
+.xnewsletter_down_main_l p {
+ padding-top: 10px;
+ margin: 0;
+}
+
+.xnewsletter_down_viewdetails {
+ text-align: right;
+}
+
+.xnewsletter_down_main_r {
+ width: 25%;
+ height: 100%;
+ float: right;
+ position: relative;
+ display: table;
+}
+
+.xnewsletter_down_main_r p {
+ padding-top: 10px;
+ margin: 0;
+}
+
+.xnewsletter_down_info_top {
+ margin-left: 10px;
+ margin-right: 10px;
+ padding: 4px;
+ background-color: silver;
+ border-color: #999999;
+ font-size: .8em;
+}
+
+.xnewsletter_down_info_bottom {
+ margin-left: 10px;
+ margin-right: 10px;
+ padding: 4px;
+ font-size: .8em;
+}
+
+.xnewsletter_down_main_b {
+ text-align: center;
+}
+
+.xnewsletter_down_main_bottom {
+ width: 100%;
+ position: relative;
+ text-align: center;
+}
+
+.xnewsletter_down_main_bottom2 {
+ text-align: center;
+ background-color: silver;
+ width: 100%;
+ position: relative;
+ line-height: 150%;
+}
+
+.xnewsletter_down_custom {
+ width: 100%;
+ position: relative;
+ text-align: center;
+}
+
+/* ---------- singlefile.html ---------- */
+.xnewsletter_single_title {
+ padding-top: 2.0em
+}
+
+.xnewsletter_single_title a {
+ color: #32529C;
+ background-color: inherit;
+ font-weight: bold;
+ text-decoration: none;
+}
+
+.xnewsletter_single_title a:hover {
+ color: #666;
+ background-color: inherit;
+ text-decoration: none;
+}
+
+.xnewsletter_single_top_r {
+ float: right;
+ margin-right: 10px;
+ position: relative;
+}
+
+.xnewsletter_single_top_l {
+ float: left;
+}
+
+.xnewsletter_single_main_l {
+ width: 74%;
+ height: 100%;
+ float: left;
+ position: relative;
+ display: table;
+}
+
+.xnewsletter_single_main_l p {
+ padding-top: 10px;
+ margin: 0;
+}
+
+.xnewsletter_single_main_r {
+ width: 25%;
+ float: right;
+ display: table-column;
+}
+
+.xnewsletter_single_info_top {
+ margin-left: 10px;
+ margin-right: 10px;
+ padding: 4px;
+ background-color: silver;
+ border-color: #999999;
+ color: #333;
+ font-size: .8em;
+}
+
+.xnewsletter_single_info_dtimes {
+ margin-left: 4px;
+}
+
+.xnewsletter_single_main_custom {
+ width: 100%;
+ position: relative;
+ text-align: center;
+}
+
+.xnewsletter_single_main_bottom {
+ text-align: center;
+ background-color: silver;
+ width: 100%;
+ position: relative;
+ float: bottom;
+}
+
+.xnewsletter_single_userrev {
+ padding: 3px;
+ margin: 3px;
+}
+
+.xnewsletter_single_usermir {
+ padding: 3px;
+ margin: 3px;
+}
+
+/* ---------- mirrors.html ---------- */
+.xnewsletter_mirrors_head, .xnewsletter_mirrors_head2, .xnewsletter_mirrors_head3 {
+ border-bottom: 2px solid #000000;
+ border-left: 1px solid #000000;
+ background-color: #BEC8D1;
+ text-align: left;
+ font-family: Verdana, sans-serif;
+ font-weight: bold;
+ font-size: 14px;
+ color: #404040;
+}
+
+.xnewsletter_mirrors_head4 {
+ border-bottom: 2px solid #000000;
+ border-left: 1px solid #000000;
+ background-color: #BEC8D1;
+ text-align: center;
+ font-weight: bold;
+ font-size: 14px;
+ color: #404040;
+ width: 50px;
+}
+
+.xnewsletter_mirrors_head5 {
+ border-bottom: 2px solid #000000;
+ border-left: 0 solid #000000;
+ background-color: #BEC8D1;
+ text-align: center;
+ font-weight: bold;
+ font-size: 14px;
+ color: #404040;
+ width: 30px;
+}
+
+tr.xnewsletter_mirrors_elist {
+ line-height: 25px;
+}
+
+.xnewsletter_mirrors_list, .xnewsletter_mirrors_list2, .xnewsletter_mirrors_list3 {
+ text-align: left;
+ border-right: 1px solid #000000;
+}
+
+.xnewsletter_mirrors_list4, .xnewsletter_mirrors_list5 {
+ text-align: center;
+ vertical-align: middle;
+}
+
+.xnewsletter_mirrors_found {
+}
+
+table.xnewsletter_mirrors {
+ width: 95%;
+ padding: 10px 10px 10px 10px;
+ border: 1px #000000 solid;
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+tr.xnewsletter_mirrors_end {
+ background-color: #BEC8D1;
+}
+
+.xnewsletter_mirrors_foot, .xnewsletter_mirrors_foot a {
+ border-top: 2px solid #000000;
+ font-weight: bold;
+}
+
+.xnewsletter_mirrors_bottom {
+ font-weight: bold;
+}
+
+/* ---------- reviews.html ---------- */
+.xnewsletter_reviews_title {
+}
+
+.xnewsletter_reviews_desc {
+}
+
+.xnewsletter_reviews_catpath {
+}
+
+.xnewsletter_reviews_found {
+ width: 90%;
+ text-align: center;
+}
+
+.xnewsletter_reviews_revfound {
+ text-align: left;
+}
+
+.xnewsletter_reviews_addrev {
+ text-align: right;
+}
+
+.xnewsletter_reviews_reviewlist {
+ padding: 10px 10px 10px 10px;
+ border: 1px #000000 solid;
+ border-collapse: collapse;
+ width: 95%;
+}
+
+.xnewsletter_reviews_reviewer {
+ text-align: left;
+ width: 80%;
+ background-color: #BEC8D1;
+ /* border-right: 1px solid #000000; */
+ border-bottom: 2px solid #000000;
+}
+
+.xnewsletter_reviews_reviewdate {
+ text-align: right;
+ width: 15%;
+ background-color: #BEC8D1;
+ border-bottom: 2px solid #000000;
+}
+
+.xnewsletter_reviews_revlistleft {
+ text-align: left;
+ border-right: 1px solid #000000;
+ width: 120px;
+}
+
+.xnewsletter_reviews_revlistright {
+ text-align: left;
+}
+
+.xnewsletter_reviews_revlistreview {
+ position: absolute;
+ top: 0;
+ left: 125px;
+ width: 90%;
+}
+
+.xnewsletter_reviews_revlisttitle {
+ margin-left: 10px;
+ margin-right: 10px;
+ padding: 4px;
+ font-weight: bold;
+ color: #0000CC;
+}
+
+.xnewsletter_reviews_revlistrev {
+}
+
+.xnewsletter_reviews_foot {
+ background-color: #BEC8D1;
+ border: 2px solid #000000;
+ width: 95%;
+}
+
+.xnewsletter_reviews_addrev {
+ position: absolute;
+ top: 0;
+ left: 0;
+ background-color: #BEC8D1;
+ border: 2px solid #000000;
+}
Deleted: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/css/style.css
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/css/style.css 2014-03-24 19:16:59 UTC (rev 12404)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/css/style.css 2014-03-24 19:19:45 UTC (rev 12405)
@@ -1,39 +0,0 @@
-/**
- * ****************************************************************************
- * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org )
- * ****************************************************************************
- * XNEWSLETTER - MODULE FOR XOOPS
- * Copyright (c) 2007 - 2012
- * goffy ( )
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting
- * source code which is considered copyrighted (c) material of the
- * original comment or credit authors.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- * ---------------------------------------------------------------------------
- * @copyright goffy ( )
- * @license gpl 2.0
- * @package xNewsletter
- * @author goffy ( )
- *
- * Version : 1 Mon 2012/11/05 14:31:32 : Exp $
- * ****************************************************************************
- */
-
-.box-header {
- margin: 2px;
- padding: 5px;
- background-color: #ccc;
- width: 100%;
- height: 50px;
-}
-
-.registration {
- padding: 30px;
- text-align: center;
-}
\ No newline at end of file
Added: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/js/index.html
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/js/index.html (rev 0)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/js/index.html 2014-03-24 19:19:45 UTC (rev 12405)
@@ -0,0 +1 @@
+<script>history.go(-1);</script>
\ No newline at end of file
|
|
From: <luc...@us...> - 2014-03-24 19:17:08
|
Revision: 12404
http://sourceforge.net/p/xoops/svn/12404
Author: luciorota
Date: 2014-03-24 19:16:59 +0000 (Mon, 24 Mar 2014)
Log Message:
-----------
fixed minor errors and standardization
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/categories.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/mimetypes.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/mirrors.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/permissions.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/ratings.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/reviews.php
XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
XoopsModules/wfdownloads/trunk/wfdownloads/index.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/common.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php
XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php
XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php
XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/review.php
XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/submit.php
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html
XoopsModules/wfdownloads/trunk/wfdownloads/topten.php
XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php
XoopsModules/wfdownloads/trunk/wfdownloads/visit.php
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/categories.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/categories.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/categories.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -241,7 +241,7 @@
$sorted_categories = wfdownloads_sortCategories();
$GLOBALS['xoopsTpl']->assign('sorted_categories', $sorted_categories);
$GLOBALS['xoopsTpl']->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML() );
- $GLOBALS['xoopsTpl']->display("db:" . $wfdownloads->getModule()->dirname() . "_admin_categorieslist.html");
+ $GLOBALS['xoopsTpl']->display("db:{$wfdownloads->getModule()->dirname()}_admin_categorieslist.html");
} else {
redirect_header("{$currentFile}?op=category.add", 1, _AM_WFDOWNLOADS_CCATEGORY_NOEXISTS);
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -602,7 +602,7 @@
$start_expired = WfdownloadsRequest::getInt('start_expired', 0);
$start_offline = WfdownloadsRequest::getInt('start_offline', 0);
- $totalcats = wfdownloads_categoriesCount();
+ $totalCategoriesCount = wfdownloads_categoriesCount();
$categories = $wfdownloads->getHandler('category')->getObjects(null, true, false);
$totalDownloadsCount = $wfdownloads->getHandler('download')->getCount();
@@ -654,6 +654,7 @@
$publishedDownloads = $wfdownloads->getHandler('download')->getActiveDownloads($criteria);
$publishedDownloadsCount = $wfdownloads->getHandler('download')->getActiveCount();
$GLOBALS['xoopsTpl']->assign('published_downloads_count', $publishedDownloadsCount);
+
if ($publishedDownloadsCount > 0) {
foreach ($publishedDownloads as $publishedDownload) {
$publishedDownload_array = $publishedDownload->toArray();
@@ -670,7 +671,16 @@
$GLOBALS['xoopsTpl']->assign('filter_title_condition', $filter_title_condition);
$GLOBALS['xoopsTpl']->assign('filter_category_title', $filter_category_title);
$GLOBALS['xoopsTpl']->assign('filter_category_title_condition', $filter_category_title_condition);
- $submitter_select = new XoopsFormSelectUser(null, 'filter_submitter', true, $filter_submitter, 5, true);
+ $submitters = array();
+ $downloadsSubmitters_array = $wfdownloads->getHandler('download')->getAll(null, array('submitter'), false, false);
+ foreach ($downloadsSubmitters_array as $downloadSubmitters_array) {
+ $submitters[$downloadSubmitters_array['submitter']] = XoopsUserUtility::getUnameFromId($downloadSubmitters_array['submitter']);
+ }
+ asort($submitters);
+ $submitter_select = new XoopsFormSelect('', 'filter_submitter', $filter_submitter, (count($submitters) > 5) ? 5 : count($submitters), true);
+ foreach ($submitters as $submitter_uid => $submitter_uname) {
+ $submitter_select->addOption($submitter_uid, $submitter_uname);
+ }
$GLOBALS['xoopsTpl']->assign('filter_submitter_select', $submitter_select->render());
$date_select = new XoopsFormDateTime (null, 'filter_date', 15, time(), false);
$GLOBALS['xoopsTpl']->assign('filter_date_select', $date_select->render());
@@ -780,7 +790,7 @@
} else {
// NOP
}
- $GLOBALS['xoopsTpl']->display("db:" . $wfdownloads->getModule()->dirname() . "_admin_downloadslist.html");
+ $GLOBALS['xoopsTpl']->display("db:{$wfdownloads->getModule()->dirname()}_admin_downloadslist.html");
include 'admin_footer.php';
break;
@@ -846,7 +856,7 @@
}
}
- $GLOBALS['xoopsTpl']->display("db:" . $wfdownloads->getModule()->dirname() . "_admin_ip_logslist.html");
+ $GLOBALS['xoopsTpl']->display("db:{$wfdownloads->getModule()->dirname()}_admin_ip_logslist.html");
include 'admin_footer.php';
break;
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/mimetypes.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/mimetypes.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/mimetypes.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -218,7 +218,7 @@
$GLOBALS['xoopsTpl']->assign('allowAdminMimetypes', $allowAdminMimetypes);
$GLOBALS['xoopsTpl']->assign('allowUserMimetypes', $allowUserMimetypes);
- $GLOBALS['xoopsTpl']->display("db:" . $wfdownloads->getModule()->dirname() . "_admin_mimetypeslist.html");
+ $GLOBALS['xoopsTpl']->display("db:{$wfdownloads->getModule()->dirname()}_admin_mimetypeslist.html");
include 'admin_footer.php';
break;
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/mirrors.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/mirrors.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/mirrors.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -190,7 +190,7 @@
$xoopsTpl->assign('use_reviews', $wfdownloads->getConfig('enable_reviews'));
$xoopsTpl->assign('use_brokenreports', $wfdownloads->getConfig('enable_brokenreports'));
- $GLOBALS['xoopsTpl']->display("db:" . $wfdownloads->getModule()->dirname() . "_admin_mirrorslist.html");
+ $GLOBALS['xoopsTpl']->display("db:{$wfdownloads->getModule()->dirname()}_admin_mirrorslist.html");
include 'admin_footer.php';
break;
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/permissions.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/permissions.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/permissions.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -45,6 +45,6 @@
$GLOBALS['xoopsTpl']->assign('down_cat_form', $down_cat_form->render());
$GLOBALS['xoopsTpl']->assign('up_cat_form', $up_cat_form->render());
-$GLOBALS['xoopsTpl']->display("db:" . $wfdownloads->getModule()->dirname() . "_admin_permissions.html");
+$GLOBALS['xoopsTpl']->display("db:{$wfdownloads->getModule()->dirname()}_admin_permissions.html");
include 'admin_footer.php';
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/ratings.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/ratings.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/ratings.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -83,7 +83,7 @@
$xoopsTpl->assign('use_reviews', $wfdownloads->getConfig('enable_reviews'));
$xoopsTpl->assign('use_brokenreports', $wfdownloads->getConfig('enable_brokenreports'));
- $GLOBALS['xoopsTpl']->display("db:" . $wfdownloads->getModule()->dirname() . "_admin_ratingslist.html");
+ $GLOBALS['xoopsTpl']->display("db:{$wfdownloads->getModule()->dirname()}_admin_ratingslist.html");
include 'admin_footer.php';
break;
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/reviews.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/reviews.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/reviews.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -202,7 +202,7 @@
$xoopsTpl->assign('use_reviews', $wfdownloads->getConfig('enable_reviews'));
$xoopsTpl->assign('use_brokenreports', $wfdownloads->getConfig('enable_brokenreports'));
- $GLOBALS['xoopsTpl']->display("db:" . $wfdownloads->getModule()->dirname() . "_admin_reviewslist.html");
+ $GLOBALS['xoopsTpl']->display("db:{$wfdownloads->getModule()->dirname()}_admin_reviewslist.html");
include 'admin_footer.php';
break;
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -120,7 +120,7 @@
}
}
} else {
- $xoopsOption['template_main'] = 'wfdownloads_brokenfile.html';
+ $xoopsOption['template_main'] = "{$wfdownloads->getModule()->dirname()}_brokenfile.html";
include XOOPS_ROOT_PATH . '/header.php';
// Begin Main page Heading etc
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -130,12 +130,15 @@
'description',
'e'
), 15, 60);
+ $description_textarea->setDescription(_AM_WFDOWNLOADS_FCATEGORY_DESCRIPTION_DESC);
$form->addElement($description_textarea, true);
// category: summary
$summary_textarea = new XoopsFormTextArea(_AM_WFDOWNLOADS_FCATEGORY_SUMMARY, 'summary', $this->getVar('summary'), 10, 60);
+ $summary_textarea->setDescription(_AM_WFDOWNLOADS_FCATEGORY_SUMMARY_DESC);
$form->addElement($summary_textarea);
// category: dohtml, dosmiley, doxcode, doimage, dobr
- $options_tray = new XoopsFormElementTray(_AM_WFDOWNLOADS_TEXTOPTIONS, '<br />');
+ $options_tray = new XoopsFormElementTray(_AM_WFDOWNLOADS_TEXTOPTIONS, ' ');
+ $options_tray->setDescription(_AM_WFDOWNLOADS_TEXTOPTIONS_DESC);
$html_checkbox = new XoopsFormCheckBox('', 'dohtml', $this->getVar('dohtml'));
$html_checkbox->addOption(1, _AM_WFDOWNLOADS_ALLOWHTML);
$options_tray->addElement($html_checkbox);
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -575,21 +575,22 @@
$description_dhtmltextarea->setDescription(_MD_WFDOWNLOADS_DESCRIPTION_DESC);
$sform->addElement($description_dhtmltextarea, true);
// download: dohtml, dosmiley, doxcode, doimage, dobr
- $options_tray = new XoopsFormElementTray(_AM_WFDOWNLOADS_TEXTOPTIONS, '<br />');
+ $options_tray = new XoopsFormElementTray(_MD_WFDOWNLOADS_TEXTOPTIONS, '<br />');
+ $options_tray->setDescription(_MD_WFDOWNLOADS_TEXTOPTIONS_DESC);
$html_checkbox = new XoopsFormCheckBox('', 'dohtml', $this->getVar('dohtml'));
- $html_checkbox->addOption(1, _AM_WFDOWNLOADS_ALLOWHTML);
+ $html_checkbox->addOption(1, _MD_WFDOWNLOADS_ALLOWHTML);
$options_tray->addElement($html_checkbox);
$smiley_checkbox = new XoopsFormCheckBox('', 'dosmiley', $this->getVar('dosmiley'));
- $smiley_checkbox->addOption(1, _AM_WFDOWNLOADS_ALLOWSMILEY);
+ $smiley_checkbox->addOption(1, _MD_WFDOWNLOADS_ALLOWSMILEY);
$options_tray->addElement($smiley_checkbox);
$xcodes_checkbox = new XoopsFormCheckBox('', 'doxcode', $this->getVar('doxcode'));
- $xcodes_checkbox->addOption(1, _AM_WFDOWNLOADS_ALLOWXCODE);
+ $xcodes_checkbox->addOption(1, _MD_WFDOWNLOADS_ALLOWXCODE);
$options_tray->addElement($xcodes_checkbox);
$noimages_checkbox = new XoopsFormCheckBox('', 'doimage', $this->getVar('doimage'));
- $noimages_checkbox->addOption(1, _AM_WFDOWNLOADS_ALLOWIMAGES);
+ $noimages_checkbox->addOption(1, _MD_WFDOWNLOADS_ALLOWIMAGES);
$options_tray->addElement($noimages_checkbox);
$breaks_checkbox = new XoopsFormCheckBox('', 'dobr', $this->getVar('dobr'));
- $breaks_checkbox->addOption(1, _AM_WFDOWNLOADS_ALLOWBREAK);
+ $breaks_checkbox->addOption(1, _MD_WFDOWNLOADS_ALLOWBREAK);
$options_tray->addElement($breaks_checkbox);
$sform->addElement($options_tray);
// download: features
@@ -658,14 +659,14 @@
$button_tray = new XoopsFormElementTray('', '');
if ($this->isNew()) {
$button_tray->addElement(new XoopsFormHidden('op', 'download.save'));
- $button_submit = new XoopsFormButton('', '', _SUBMIT, 'submit');
- $button_submit->setExtra('onclick="this.form.elements.op.value=\'download.save\'"');
+ $button_submit = new XoopsFormButton('', '', _SUBMIT, 'submit');
+ //$button_submit->setExtra('onclick="this.form.elements.op.value=\'download.save\'"');
$button_tray->addElement($button_submit);
} else {
$button_tray->addElement(new XoopsFormHidden('lid', (int)$this->getVar('lid')));
$button_tray->addElement(new XoopsFormHidden('op', 'download.save'));
- $button_submit = new XoopsFormButton('', '', _SUBMIT, 'submit');
- $button_submit->setExtra('onclick="this.form.elements.op.value=\'download.save\'"');
+ $button_submit = new XoopsFormButton('', '', _SUBMIT, 'submit');
+ //$button_submit->setExtra('onclick="this.form.elements.op.value=\'download.save\'"');
$button_tray->addElement($button_submit);
}
$button_reset = new XoopsFormButton('', '', _RESET, 'reset');
@@ -836,7 +837,8 @@
$description_tray->setDescription(_MD_WFDOWNLOADS_DESCRIPTION_DESC);
$sform->addElement($description_tray);
// download: dohtml, dosmiley, doxcode, doimage, dobr
- $options_tray = new XoopsFormElementTray(_AM_WFDOWNLOADS_TEXTOPTIONS, '<br />');
+ $options_tray = new XoopsFormElementTray(_AM_WFDOWNLOADS_TEXTOPTIONS, ' ');
+ $options_tray->setDescription(_AM_WFDOWNLOADS_TEXTOPTIONS_DESC);
$html_checkbox = new XoopsFormCheckBox('', 'dohtml', $this->getVar('dohtml'));
$html_checkbox->addOption(1, _AM_WFDOWNLOADS_ALLOWHTML);
$options_tray->addElement($html_checkbox);
@@ -1063,11 +1065,11 @@
} else {
$button_tray->addElement(new XoopsFormHidden('status', _WFDOWNLOADS_STATUS_UPDATED));
$button_tray->addElement(new XoopsFormHidden('lid', (int)$this->getVar('lid')));
- $button_submit = new XoopsFormButton('', '', _SUBMIT, 'submit');
- $button_submit->setExtra('onclick="this.form.elements.op.value=\'download.save\'"');
+ $button_submit = new XoopsFormButton('', '', _SUBMIT, 'submit');
+ $button_submit->setExtra('onclick="this.form.elements.op.value=\'download.save\'"');
$button_tray->addElement($button_submit);
- $button_delete = new XoopsFormButton('', '', _DELETE, 'submit');
- $button_delete->setExtra('onclick="this.form.elements.op.value=\'download.delete\'"');
+ $button_delete = new XoopsFormButton('', '', _DELETE, 'submit');
+ $button_delete->setExtra('onclick="this.form.elements.op.value=\'download.delete\'"');
$button_tray->addElement($button_delete);
}
$button_reset = new XoopsFormButton('', '', _RESET, 'reset');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2014-03-24 19:16:59 UTC (rev 12404)
@@ -1,4 +1,4 @@
-<b><u>=> Version 3.23 Beta (2014-02-14)</u></b>
+<b><u>=> Version 3.23 Beta (2014-03-12)</u></b>
- update jQuery Thickbox plugin to 3.1 (luciorota)
- fixed: jQuery bug in templates (luciorota)
- standardization of English language files (cesag)
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -374,16 +374,11 @@
$wfdownloads = WfdownloadsWfdownloads::getInstance();
static $wfdownloads_isAdmin;
-
if (isset($wfdownloads_isAdmin)) {
return $wfdownloads_isAdmin;
}
- if (!$xoopsUser) {
- $wfdownloads_isAdmin = false;
- } else {
- $wfdownloads_isAdmin = $xoopsUser->isAdmin($wfdownloads->getModule()->getVar('mid'));
- }
+ $wfdownloads_isAdmin = (!is_object($xoopsUser)) ? false : $xoopsUser->isAdmin($wfdownloads->getModule()->getVar('mid'));
return $wfdownloads_isAdmin;
}
@@ -1203,10 +1198,10 @@
}
$uploadDirectory = $uploadDirectory . '/';
- $file_name = $_FILES['userfile']['name'];
+ $file_name = $_FILES['userfile']['name'];
- $maxFileSize = $wfdownloads->getConfig('maxfilesize');
- $maxImageWidth = $wfdownloads->getConfig('maximgwidth');
+ $maxFileSize = $wfdownloads->getConfig('maxfilesize');
+ $maxImageWidth = $wfdownloads->getConfig('maximgwidth');
$maxImageHeight = $wfdownloads->getConfig('maximgheight');
// TO DO: use Xoops XoopsMediaUploader class
@@ -1235,9 +1230,8 @@
// $file['url'] = XOOPS_URL . '/' . $uploadDirectory . '/';
$file['filename'] = strtolower($uploader->savedFileName);
$file['filetype'] = $_FILES['userfile']['type'];
- $file['size'] = filesize($uploadDirectory . strtolower($uploader->savedFileName));
+ $file['size'] = filesize($uploadDirectory . strtolower($uploader->savedFileName));
}
-
return $file;
}
}
@@ -1332,11 +1326,11 @@
{
if ($considerHtml) {
// if the plain text is shorter than the maximum length, return the whole text
- if (strlen(preg_replace('/<.*?>/', '', $text)) <= $length) {
+ if (strlen(preg_replace('/<.*?'.'>/', '', $text)) <= $length) {
return $text;
}
// splits all html-tags to scanable lines
- preg_match_all('/(<.+?>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER);
+ preg_match_all('/(<.+?'.'>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER);
$total_length = strlen($ending);
$open_tags = array();
$truncate = '';
@@ -1358,7 +1352,7 @@
unset($open_tags[$pos]);
}
// if tag is an opening tag
- } elseif (preg_match('/^<\s*([^\s>!]+).*?>$/s', $line_matchings[1], $tag_matchings)) {
+ } elseif (preg_match('/^<\s*([^\s>!]+).*?'.'>$/s', $line_matchings[1], $tag_matchings)) {
// add tag to the beginning of $open_tags list
array_unshift($open_tags, strtolower($tag_matchings[1]));
}
@@ -1443,32 +1437,30 @@
*/
function wfdownloads_swishe_config()
{
- // IN PROGRESS
- // IN PROGRESS
- // IN PROGRESS
- global $xoopsUser;
$wfdownloads = WfdownloadsWfdownloads::getInstance();
// Get the path to the repository
// IN PROGRESS
- $doc_path = $wfdownloads->getConfig('swishe_doc_path');
+ // IN PROGRESS
+ // IN PROGRESS
+ $swisheDocPath = $wfdownloads->getConfig('swishe_doc_path'); // IN PROGRESS WFDOWNLOADS REPOSITORY PATH
// Create _binfilter.sh
- //$file = $doc_path."/_binfilter.sh";
- //$fp = fopen($file,'w') or die("<BR><BR>Unable to open $file");
-
- //fputs($fp,"strings \"\$1\" - 2>/dev/null\n");
+ // IN PROGRESS
+ // IN PROGRESS
+ // IN PROGRESS
+ //$file = "{$swisheDocPath}/_binfilter.sh";
+ //$fp = fopen($file, 'w') or die("<BR><BR>Unable to open $file");
+ //fputs($fp, "strings \"\$1\" - 2>/dev/null\n");
//fclose($fp);
+ //chmod($file, 0755);
- //chmod($file,0755);
-
// Create swish-e.conf
- $file = $doc_path . "/swish-e.conf";
+ $file = "{$swisheDocPath}/swish-e.conf";
$fp = fopen($file, 'w') or die("<BR><BR>Unable to open {$file}");
-
- $line = "IndexDir " . $doc_path . "/\n";
+ $line = "IndexDir {$swisheDocPath}/\n";
fputs($fp, $line);
- $line = "IndexFile " . $doc_path . "/index.swish-e\n";
+ $line = "IndexFile {$swisheDocPath}/index.swish-e\n";
fputs($fp, $line);
//$line = "TruncateDocSize 100000\n";
//fputs($fp,$line);
@@ -1476,17 +1468,18 @@
fputs($fp, $line);
$line = "IndexContents TXT* .dat\n";
fputs($fp, $line);
- //$line = "FileFilter .dat \"".$doc_path."/_binfilter.sh\" \"'%p'\"\n";
+ //$line = "FileFilter .dat \"{$swisheDocPath}/_binfilter.sh\" \"'%p'\"\n";
//fputs($fp,$line);
$line = "IndexOnly .dat\n";
fputs($fp, $line);
$line = "MinWordLimit 3\n";
fputs($fp, $line);
-
fclose($fp);
-
chmod($file, 0755);
+ // IN PROGRESS
+ // IN PROGRESS
+ // IN PROGRESS
print("<SCRIPT LANGUAGE='Javascript'>\r");
print("location='config_main.php';");
print("</SCRIPT>");
@@ -1494,16 +1487,18 @@
function wfdownloads_swishe_search($search_query)
{
+ $wfdownloads = WfdownloadsWfdownloads::getInstance();
+
// IN PROGRESS
// IN PROGRESS
// IN PROGRESS
- global $xoopsUser;
- $wfdownloads = WfdownloadsWfdownloads::getInstance();
-
$search_query = stripslashes($search_query);
if (((strlen($search_query) > 2) && ($last_query != $search_query)) && ($page == false)) {
//print "<BR>SEARCH!";
// Get the first word in $search_query and use it for the $summary_query.
+ // IN PROGRESS
+ // IN PROGRESS
+ // IN PROGRESS
$summary_query = str_replace("\"", " ", $search_query);
$summary_query = trim($summary_query);
$summary_query_e = explode(" ", $summary_query);
@@ -1513,23 +1508,35 @@
//print "<BR>SQ: ".$summary_query;
// Get the location of the document repository (the index files are located in the root)
- $repository_root = $dms_config['doc_path'];
- $repository_root_strlen = strlen($dms_config['doc_path']);
+ // IN PROGRESS
+ // IN PROGRESS
+ // IN PROGRESS
+ $swisheDocPath = $wfdownloads->getConfig('swishe_doc_path'); // IN PROGRESS WFDOWNLOADS REPOSITORY PATH
+ $swisheDocPath_strlen = strlen($wfdownloads->getConfig('swishe_doc_path'));
// Get the location of the SWISH-E executable
- $swish_e_path = $dms_config['swish-e_path'];
+ // IN PROGRESS
+ // IN PROGRESS
+ // IN PROGRESS
+ $swisheExePath = $wfdownloads->getConfig('swishe_exe_path');
// Get the search_limit to limit the search to X number of entries
- $search_limit = $dms_config['search_limit'];
+ // IN PROGRESS
+ // IN PROGRESS
+ // IN PROGRESS
+ $search_limit = $wfdownloads->getConfig('search_limit');
//print "<BR>Query: ".$search_query;
+
+ // Get search query
$search_query = EscapeShellCmd($search_query); // escape potentially malicious shell commands
$search_query = stripslashes($search_query); // remove backslashes from search query
$search_query = preg_replace('#("|\')#', '', $search_query); // remove quotes from search query
- $swish = $swish_e_path . "/swish-e"; // path of swish-e command
- $search_index = $repository_root . "/index.swish-e"; // path of swish-e index file
- $search_params = "-H1 -m" . $search_limit; // Additional search parameters
+ $swish = "{$swisheExePath}/swish-e"; // path of swish-e command
+ $search_index = "{$swisheDocPath}/index.swish-e"; // path of swish-e index file
+ $search_params = "-H1 -m{$search_limit}"; // Additional search parameters
- $pipe_handler = popen("$swish -w $search_query -f $search_index $search_params", "r")
+ // Opens a pipe to swish-e
+ $pipe_handler = popen("{$swish} -w {$search_query} -f {$search_index} {$search_params}", "r")
or die("The search request generated an error...Please try again.");
//print "$swish -w $search_query -f $search_index $search_params<BR>";
@@ -1565,7 +1572,7 @@
$relevance = $relevance / 10; // format relevance as a percentage for search results
$full_path_and_file = $result_url;
- $result_url = trim(substr($result_url, ($repository_root_strlen - 1), strlen($result_url)));
+ $result_url = trim(substr($result_url, ($swisheDocPath_strlen - 1), strlen($result_url)));
$file_path = strright($result_url, (strlen($result_url) - 2));
$query = "SELECT * ";
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/index.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -45,7 +45,7 @@
$allowedDownCategoriesIds = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $wfdownloads->getModule()->mid());
$allowedUpCategoriesIds = $gperm_handler->getItemIds('WFUpCatPerm', $groups, $wfdownloads->getModule()->mid());
-$xoopsOption['template_main'] = 'wfdownloads_index.html';
+$xoopsOption['template_main'] = "{$wfdownloads->getModule()->dirname()}_index.html";
include XOOPS_ROOT_PATH . '/header.php';
$xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -638,4 +638,9 @@
define('_AM_WFDOWNLOADS_MOD_FORMULIZE_IDREQ', "Formulize Form ID");
// 3.23
define('_AM_WFDOWNLOADS_MOD_APPROVE', "Approve and delete modification request");
-define('_AM_WFDOWNLOADS_MOD_SAVE', "Save");
\ No newline at end of file
+define('_AM_WFDOWNLOADS_MOD_SAVE', "Save");
+
+define('_AM_WFDOWNLOADS_TEXTOPTIONS_DESC', "Description and Summary text options");
+define('_AM_WFDOWNLOADS_FCATEGORY_DESCRIPTION_DESC', "");
+define('_AM_WFDOWNLOADS_FCATEGORY_SUMMARY_DESC', "");
+define('_AM_WFDOWNLOADS_TEXTOPTIONS_DESC', "Description and Summary text options");
\ No newline at end of file
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/common.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/common.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/common.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -32,4 +32,4 @@
define('_CO_WFDOWNLOADS_ACTIONS', "Actions");
define('_CO_WFDOWNLOADS_LEGEND', "Legend");
define('_CO_WFDOWNLOADS_ERROR_NOCATEGORY', "Error: non-existent category");
-define('_CO_WFDOWNLOADS_ERROR_NODOWNLOAD', "Error: non-existent download");
\ No newline at end of file
+define('_CO_WFDOWNLOADS_ERROR_NODOWNLOAD', "Error: non-existent download");
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -347,3 +347,15 @@
define('_MD_WFDOWNLOADS_SUBCATEGORIESLISTING', "Subcategories listing");
define('_MD_WFDOWNLOADS_DOWNLOADSLISTING', "Downloads listing");
define('_MD_WFDOWNLOADS_SORTDOWNLOADSBY', "Sort downloads by");
+// Other Options
+define('_MD_WFDOWNLOADS_TEXTOPTIONS', "Text options");
+define('_MD_WFDOWNLOADS_TEXTOPTIONS_DESC', "Description and Summary text options");
+define('_MD_WFDOWNLOADS_ALLOWHTML', " Allow HTML tags");
+define('_MD_WFDOWNLOADS_ALLOWSMILEY', " Allow Smiley icons");
+define('_MD_WFDOWNLOADS_ALLOWXCODE', " Allow XOOPS codes");
+define('_MD_WFDOWNLOADS_ALLOWIMAGES', " Allow images");
+define('_MD_WFDOWNLOADS_ALLOWBREAK', " Use XOOPS line break conversion");
+define('_MD_WFDOWNLOADS_UPLOADFILE', "File uploaded successfully");
+define('_MD_WFDOWNLOADS_NOMENUITEMS', "No menu items within the menu");
+//singlefile.php
+define('_MD_WFDOWNLOADS_PREVIEW', "Preview");
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -68,7 +68,7 @@
case "list" : // this case is not removed for backward compatibility issues
$start = WfdownloadsRequest::getInt('start', 0);
- $xoopsOption['template_main'] = 'wfdownloads_mirrors.html';
+ $xoopsOption['template_main'] = "{$wfdownloads->getModule()->dirname()}_mirrors.html";
include XOOPS_ROOT_PATH . '/header.php';
$xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -21,7 +21,7 @@
$currentFile = basename(__FILE__);
include 'header.php';
-$xoopsOption['template_main'] = 'wfdownloads_newlistindex.html';
+$xoopsOption['template_main'] = "{$wfdownloads->getModule()->dirname()}_newlistindex.html";
include XOOPS_ROOT_PATH . '/header.php';
$xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -116,7 +116,7 @@
echo $rating->getHtmlErrors();
}
} else {
- $xoopsOption['template_main'] = 'wfdownloads_ratefile.html';
+ $xoopsOption['template_main'] = "{$wfdownloads->getModule()->dirname()}_ratefile.html";
include XOOPS_ROOT_PATH . '/header.php';
$xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/review.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/review.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/review.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -68,7 +68,7 @@
case "list" : // this care is not removed for backward compatibility issues
$start = WfdownloadsRequest::getInt('start', 0);
- $xoopsOption['template_main'] = 'wfdownloads_reviews.html';
+ $xoopsOption['template_main'] = "{$wfdownloads->getModule()->dirname()}_reviews.html";
include XOOPS_ROOT_PATH . '/header.php';
$xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -58,7 +58,7 @@
}
// Load Template
-$xoopsOption['template_main'] = 'wfdownloads_singlefile.html';
+$xoopsOption['template_main'] = "{$wfdownloads->getModule()->dirname()}_singlefile.html";
include XOOPS_ROOT_PATH . '/header.php';
$xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
@@ -195,7 +195,20 @@
$xoopsTpl->assign('shotheight', $wfdownloads->getConfig('shotheight'));
$xoopsTpl->assign('show_screenshot', true);
}
+// Get file url
+$fullFilename = trim($downloadInfo['filename']);
+if ((!$downloadInfo['url'] == '' && !$downloadInfo['url'] == 'http://') || $fullFilename == '') {
+ $fileUrl = $myts->htmlSpecialChars(preg_replace('/javascript:/si', 'javascript:', $downloadInfo['url']), ENT_QUOTES);
+} else {
+ $mimeType = $downloadInfo['filetype'];
+ $file = strrev($fullFilename);
+ $tempFilename = strtolower(strrev(substr($file, 0, strpos($file, '--'))));
+ $filename = ($tempFilename == '') ? $fullFilename : $tempFilename;
+ $fileUrl = XOOPS_URL . str_replace(XOOPS_ROOT_PATH, '', $wfdownloads->getConfig('uploaddir')) . '/' . stripslashes(trim($fullFilename));
+}
+$xoopsTpl->assign('file_url', $fileUrl);
+
// Breadcrumb
include_once XOOPS_ROOT_PATH . '/class/tree.php';
$categoriesTree = new XoopsObjectTree($wfdownloads->getHandler('category')->getObjects(), 'cid', 'pid');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/submit.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/submit.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/submit.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -72,7 +72,7 @@
switch ($op) {
case "download.disclaimer" :
// Show disclaimers
- $xoopsOption['template_main'] = 'wfdownloads_disclaimer.html';
+ $xoopsOption['template_main'] = "{$wfdownloads->getModule()->dirname()}_disclaimer.html";
include XOOPS_ROOT_PATH . '/header.php';
$xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
@@ -212,7 +212,7 @@
$title = trim($_POST['title']);
} else {
$isAdmin = wfdownloads_userIsAdmin();
- $down = wfdownloads_uploading($_FILES, $wfdownloads->getConfig('uploaddir'), '', $currentFile, 0, true, $isAdmin);
+ $down = wfdownloads_uploading($_FILES, $wfdownloads->getConfig('uploaddir'), '', $currentFile, 0, false, $isAdmin);
$url = ($_POST['url'] != "http://") ? $_POST['url'] : '';
$size = $down['size'];
$filename = $down['filename'];
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html 2014-03-24 19:16:59 UTC (rev 12404)
@@ -32,6 +32,7 @@
<br/>
<div><b><{$smarty.const._MD_WFDOWNLOADS_FILESIZE}>:</b> <{$download.size}></div>
+ <div><b><{$smarty.const._MD_WFDOWNLOADS_UPLOAD_FILETYPE}>:</b> <{$download.filetype}></div>
<b><{$smarty.const._MD_WFDOWNLOADS_DOWNTIMES}></b>
<div style="margin-left: 4px;">
@@ -44,6 +45,38 @@
<br/>
+ <{if @in_array($download.filetype, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png'))}>
+ <div style="margin-left: 10px; margin-right: 10px; padding: 4px; background-color:#e6e6e6; border-color:#999999;" class="outer">
+ <b><{$smarty.const._MD_WFDOWNLOADS_PREVIEW}></b>
+ <br/>
+ <img style="width:100%; height:auto;" src="<{$file_url}>" />
+ </div>
+ <br/>
+ <{elseif @in_array($download.filetype, array('audio/mpeg'))}>
+ <div style="margin-left: 10px; margin-right: 10px; padding: 4px; background-color:#e6e6e6; border-color:#999999;" class="outer">
+ <b><{$smarty.const._MD_WFDOWNLOADS_PREVIEW}></b>
+ <br/>
+ AUDIO PLAYER // IN PROGRESS
+ </div>
+ <br/>
+ <{elseif @in_array($download.filetype, array('application/pdf'))}>
+ <div style="margin-left: 10px; margin-right: 10px; padding: 4px; background-color:#e6e6e6; border-color:#999999;" class="outer">
+ <b><{$smarty.const._MD_WFDOWNLOADS_PREVIEW}></b>
+ <br/>
+ <iframe style="width:100%; height: auto;" src="<{$file_url}>">
+ <p>Your browser does not support iframes.</p>
+ </iframe>
+ </div>
+ <br/>
+ <{elseif @in_array($download.filetype, array('video/flv', 'application/octet-stream', 'video/x-flv'))}>
+ <div style="margin-left: 10px; margin-right: 10px; padding: 4px; background-color:#e6e6e6; border-color:#999999;" class="outer">
+ <b><{$smarty.const._MD_WFDOWNLOADS_PREVIEW}></b>
+ <br/>
+ VIDEO PLAYER // IN PROGRESS
+ </div>
+ <br/>
+ <{/if}>
+
<{if $download.use_ratings == 1}>
<div style="margin-left: 10px; margin-right: 10px; padding: 4px; background-color:#e6e6e6; border-color:#999999;" class="outer">
<div><b><{$smarty.const._MD_WFDOWNLOADS_RATINGC}></b> <img src="images/icon/<{$download.rateimg}>"
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/topten.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/topten.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/topten.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -21,7 +21,7 @@
$currentFile = basename(__FILE__);
include 'header.php';
-$xoopsOption['template_main'] = 'wfdownloads_topten.html';
+$xoopsOption['template_main'] = "{$wfdownloads->getModule()->dirname()}_topten.html";
// Check permissions
if (($_GET['list'] == 'rate') && $wfdownloads->getConfig('enable_ratings') == false && !wfdownloads_userIsAdmin()) {
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -68,7 +68,7 @@
$allowedDownCategoriesIds = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $wfdownloads->getModule()->mid());
$allowedUpCategoriesIds = $gperm_handler->getItemIds('WFUpCatPerm', $groups, $wfdownloads->getModule()->mid());
-$xoopsOption['template_main'] = 'wfdownloads_viewcat.html';
+$xoopsOption['template_main'] = "{$wfdownloads->getModule()->dirname()}_viewcat.html";
include XOOPS_ROOT_PATH . '/header.php';
$xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/visit.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/visit.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/visit.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -81,7 +81,7 @@
}
if ($wfdownloads->getConfig('showDowndisclaimer') && $agreed == false) {
- $xoopsOption['template_main'] = 'wfdownloads_disclaimer.html';
+ $xoopsOption['template_main'] = "{$wfdownloads->getModule()->dirname()}_disclaimer.html";
include XOOPS_ROOT_PATH . '/header.php';
$xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2014-03-23 20:03:14 UTC (rev 12403)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2014-03-24 19:16:59 UTC (rev 12404)
@@ -42,9 +42,9 @@
$modversion['onUpdate'] = 'include/module.php';
$modversion['onUninstall'] = 'include/module.php';
-$modversion['date'] = '2014-02-14';
-$modversion['release_date'] = '2014/02/14';
-$modversion['releasedate'] = '2014-02-14';
+$modversion['date'] = '2014-03-12';
+$modversion['release_date'] = '2014/03/12';
+$modversion['releasedate'] = '2014-03-12';
$modversion['status'] = 'BETA 2';
$modversion['teammembers'] = "Bender, David, FrankBlack, Xpider, M0nty, Mithrandir, Marcan, felix[fx2024], Sudhaker, Jegelstaff";
@@ -219,8 +219,8 @@
$modversion['comments']['extraParams'] = array('cid');
// Comment callback functions
$modversion['comments']['callbackFile'] = 'include/comment_functions.php';
-$modversion['comments']['callback']['approve'] = 'wfdownloads_com_approve';
-$modversion['comments']['callback']['update'] = 'wfdownloads_com_update';
+$modversion['comments']['callback']['approve'] = $modversion['dirname'] . '_com_approve';
+$modversion['comments']['callback']['update'] = $modversion['dirname'] . '_com_update';
// Templates
@@ -1036,7 +1036,7 @@
// Notification
$modversion['hasNotification'] = true;
$modversion['notification']['lookup_file'] = 'include/notification.inc.php';
-$modversion['notification']['lookup_func'] = 'wfdownloads_notify_iteminfo';
+$modversion['notification']['lookup_func'] = $modversion['dirname'] . '_notify_iteminfo';
$i = 0;
$modversion['notification']['category'][$i]['name'] = 'global';
|
|
From: <be...@us...> - 2014-03-23 20:03:18
|
Revision: 12403
http://sourceforge.net/p/xoops/svn/12403
Author: beckmi
Date: 2014-03-23 20:03:14 +0000 (Sun, 23 Mar 2014)
Log Message:
-----------
fixing bugs
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-03-23 19:52:22 UTC (rev 12402)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-03-23 20:03:14 UTC (rev 12403)
@@ -1,4 +1,4 @@
-<?php
+<?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
@@ -24,10 +24,10 @@
require_once 'themeform.php';
/*
* @Class TDMCreateFields
-* @extends XoopsObject
+* @extends XoopsObject
*/
class TDMCreateFields extends XoopsObject
-{
+{
/*
* @public function constructor class
* @param null
@@ -54,7 +54,7 @@
$this->initVar('field_fields',XOBJ_DTYPE_TXTAREA);
$this->initVar('field_parameters',XOBJ_DTYPE_TXTAREA);
}
-
+
/*
* @static function &getInstance
* @param null
@@ -82,9 +82,9 @@
if ($action === false) {
$action = $_SERVER['REQUEST_URI'];
}
-
+
$title = $this->isNew() ? sprintf(_AM_TDMCREATE_FIELD_ADD) : sprintf(_AM_TDMCREATE_FIELD_EDIT);
-
+
if ($this->isNew()) {
$field_tid = $table_id;
$nb_fields = $table_nbfields;
@@ -92,35 +92,35 @@
$field_tid = $this->getVar('field_tid');
$nb_fields = $this->getVar('field_numb');
}
-
+
include_once(XOOPS_ROOT_PATH.'/class/xoopsformloader.php');
include_once(XOOPS_ROOT_PATH.'/modules/TDMCreate/class/themeform.php');
$form = new TDMCreateThemeForm($title, 'form', $action, 'post', true);
- $form->setExtra('enctype="multipart/form-data"');
-
+ $form->setExtra('enctype="multipart/form-data"');
+
//$option_tray = new XoopsFormElementTray(' ');
//$option_tray->setExtra('colspan="2"');//_AM_TDMCREATE_FIELD_TYPE
- $tablesHandler = xoops_getModuleHandler('tables');
+ $tablesHandler = xoops_getModuleHandler('tables');
// New Object HtmlTable
$tableForm = new TDMCreateHtmlTable(null, 'display outer');
// header row
$tableForm->addRow('center bgblue');
$cells = array(_AM_TDMCREATE_FIELD_NUMBER, _AM_TDMCREATE_FIELD_NAME, _AM_TDMCREATE_FIELD_TYPE, _AM_TDMCREATE_FIELD_VALUE, _AM_TDMCREATE_FIELD_ATTRIBUTE, _AM_TDMCREATE_FIELD_NULL, _AM_TDMCREATE_FIELD_DEFAULT, _AM_TDMCREATE_FIELD_KEY, _AM_TDMCREATE_FIELD_OTHERS);
- $tableForm->addCells($cells, 'first', 'header');
+ $tableForm->addCells($cells, 'first', 'header');
for($i = 1; $i <= count($nb_fields); $i++)
- {
- $field_name = $this->isNew() ? $this->getVar('table_fieldname') : $this->getVar('field_name');
+ {
+ $field_name = $this->isNew() ? $this->getVar('table_fieldname') : $this->getVar('field_name');
$field_name = new XoopsFormText(_AM_TDMCREATE_FIELD_NAME, 'field_name', 15, 255, $field_name);
// fieldtype
$fieldtypeHandler =& xoops_getModuleHandler('fieldtype');
$fieldtype_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_type', $this->getVar('field_type'));
- $fieldtype_select->addOptionArray($fieldtypeHandler->getList());
- // fieldvalue
+ $fieldtype_select->addOptionArray($fieldtypeHandler->getList());
+ // fieldvalue
$field_value = new XoopsFormText(_AM_TDMCREATE_FIELD_VALUE, 'field_value', 5, 20, $this->getVar('field_value'));
// fieldattributes
- $fieldattrsHandler =& xoops_getModuleHandler('fieldattributes');
- $field_attributes_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_attribute', $this->getVar('field_attribute'));
+ $fieldattrsHandler =& xoops_getModuleHandler('fieldattributes');
+ $field_attributes_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_attribute', $this->getVar('field_attribute'));
$field_attributes_select->addOptionArray($fieldattrsHandler->getList());
// fieldnull
$fieldnullHandler =& xoops_getModuleHandler('fieldnull');
@@ -138,37 +138,37 @@
$tableForm->addRow('center bgyellow');
$tableForm->addCells($tableFormDataArray, 'first', 'data');
$tableOtherForm = new TDMCreateHtmlTable(null, 'display');
- if($i == 1) {
+ if($i == 1) {
$field_autoincrement = $this->isNew() ? 0 : $this->getVar('field_auto_increment');
$check_field_autoincrement = new XoopsFormCheckBox(' ', 'field_auto_increment', $field_autoincrement);
$check_field_autoincrement->addOption(1, _AM_TDMCREATE_FIELD_AUTO_INCREMENT);
// data row
$tableOtherForm->addRow();
$tableOtherForm->addCell($check_field_autoincrement->render(), null, 'data');
- } elseif($i > 1) {
+ } elseif($i > 1) {
// Box header row
$tableOtherForm->addRow('center bgyellow');
$tableOtherForm->addCell(_AM_TDMCREATE_FIELD_ELEMENTS, 'first', 'header');
// fieldelements
$fieldelementsHandler=& xoops_getModuleHandler('fieldelements');
- $field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element_name', $this->getVar('field_element_name'));
- $field_elements_select->addOptionArray($fieldelementsHandler->getList());
- $criteria = new CriteriaCompo(new Criteria('table_id', $table_id)));
- $criteria->add(new Criteria('table_mid', $table_mid)));
+ $field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element_name', $this->getVar('field_element_name'));
+ $field_elements_select->addOptionArray($fieldelementsHandler->getList());
+ $criteria = new CriteriaCompo(new Criteria('table_id', $table_id));
+ $criteria->add(new Criteria('table_mid', $table_mid));
$criteria->setSort('table_name');
$criteria->setOrder('ASC');
$tbls_arr1 = $tablesHandler->getAll($criteria);
unset($criteria);
- foreach (array_keys($tbls_arr1) as $j)
- {
+ foreach (array_keys($tbls_arr1) as $j)
+ {
$tbls_name1 = $tbls_arr1[$j]->getVar('table_name');
- if ( $j[$i] == 'XoopsFormTables-'.$tbls_name1 ) {
- $field_elements_select->addOption('XoopsFormTables-'.$tbls_name1, 'Table : '.$tbls_name1);
- }
+ if ( $j[$i] == 'XoopsFormTables-'.$tbls_name1 ) {
+ $field_elements_select->addOption('XoopsFormTables-'.$tbls_name1, 'Table : '.$tbls_name1);
+ }
}
// data row
$tableOtherForm->addRow();
- $tableOtherForm->addCell($field_elements_select->render(), null, 'data');
+ $tableOtherForm->addCell($field_elements_select->render(), null, 'data');
$field_display_admin = $this->isNew() ? 0 : $this->getVar('field_display_admin');
$check_field_display_admin = new XoopsFormCheckBox(' ', 'field_display_admin', $field_display_admin);
$check_field_display_admin->addOption(1, _AM_TDMCREATE_FIELD_DISPLAY_ADMIN);
@@ -195,7 +195,7 @@
$tableOtherForm->addCell($field_mainfield->render(), null, 'data');
$field_search = $this->isNew() ? 0 : $this->getVar('field_search');
$check_field_search = new XoopsFormCheckBox(' ', 'field_search', $field_search);
- $check_field_search->addOption(1, _AM_TDMCREATE_FIELD_SEARCH);
+ $check_field_search->addOption(1, _AM_TDMCREATE_FIELD_SEARCH);
// data row
$tableOtherForm->addRow();
$tableOtherForm->addCell($check_field_search->render(), null, 'data');
@@ -204,21 +204,21 @@
$check_field_required->addOption(1, _AM_TDMCREATE_FIELD_REQUIRED);
// data row
$tableOtherForm->addRow();
- $tableOtherForm->addCell($check_field_required->render(), null, 'data');
- }
- $tableForm->addCell($tableOtherForm->render(), null, 'data');
-
+ $tableOtherForm->addCell($check_field_required->render(), null, 'data');
+ }
+ $tableForm->addCell($tableOtherForm->render(), null, 'data');
+
if (!$this->isNew()) {
$tableFormHiddenId = new XoopsFormHidden('table_id', $this->getVar('table_id'));
//$form->addElement(new XoopsFormHidden('fields_modified', true));
- }
+ }
}
$form->addElement($tableForm->render());
/*if (!$this->isNew()) {
$form->addElement(new XoopsFormHidden('table_id', $this->getVar('table_id')));
$form->addElement(new XoopsFormHidden('fields_modified', true));
}
-
+
$form->addElement(new XoopsFormHidden('op', 'save_fields'));
$form->addElement(new XoopsFormHidden('field_tid', $this->getVar('field_tid')));
$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));*/
@@ -231,10 +231,10 @@
return $form;
}
}
-class TDMCreateFieldsHandler extends XoopsPersistableObjectHandler
+class TDMCreateFieldsHandler extends XoopsPersistableObjectHandler
{
- function __construct(&$db)
+ function __construct(&$db)
{
parent::__construct($db, 'mod_tdmcreate_fields', 'tdmcreatefields', 'field_id', 'field_tid');
}
-}
\ No newline at end of file
+}
|
|
From: <txm...@us...> - 2014-03-23 19:52:28
|
Revision: 12402
http://sourceforge.net/p/xoops/svn/12402
Author: txmodxoops
Date: 2014-03-23 19:52:22 +0000 (Sun, 23 Mar 2014)
Log Message:
-----------
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/about.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/htmltable.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/logoGenerator.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/themeform.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/functions.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/install.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/sql/mysql.sql
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_about.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_building.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_footer.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_help.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_modules.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.html
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/htmlform.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/about.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/about.php 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/about.php 2014-03-23 19:52:22 UTC (rev 12402)
@@ -22,7 +22,4 @@
$template_main = 'tdmcreate_about.html';
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('about.php'));
$GLOBALS['xoopsTpl']->assign('about', $adminMenu->renderAbout('6KJ7RW5DR3VTJ', false));
-if ( isset($template_main) ) {
- $GLOBALS['xoopsTpl']->display("db:{$template_main}");
-}
include 'footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php 2014-03-23 19:52:22 UTC (rev 12402)
@@ -57,7 +57,4 @@
$GLOBALS['xoopsTpl']->assign('form', $form->render());
break;
}
-if ( isset($template_main) ) {
- $GLOBALS['xoopsTpl']->display("db:{$template_main}");
-}
include 'footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-03-23 19:52:22 UTC (rev 12402)
@@ -19,20 +19,20 @@
* @version $Id: fields.php 12258 2014-01-02 09:33:29Z timgno $
*/
include 'header.php';
-// Recovered the value of the argument op in the URL $
+// Recovered value of arguments op in the URL $
$op = TDMCreate_CleanVars($_REQUEST, 'op', 'list', 'string');
-$mod_id = TDMCreate_CleanVars($_REQUEST, 'mod_id', 0, 'int');
+// Get table Variables
$table_id = TDMCreate_CleanVars($_REQUEST, 'table_id', 0, 'int');
+$table_mid = TDMCreate_CleanVars($_REQUEST, 'table_mid', 0, 'int');
+$table_nbfields = TDMCreate_CleanVars($_REQUEST, 'table_nbfields', 0, 'int');
+$table_fieldname = TDMCreate_CleanVars($_REQUEST, 'table_fieldname', '', 'string');
+// Get field Variables
$field_id = TDMCreate_CleanVars($_REQUEST, 'field_id', 0, 'int');
-// Get table Variables
$field_tid = TDMCreate_CleanVars($_REQUEST, 'field_tid', 0, 'int');
$field_mid = TDMCreate_CleanVars($_REQUEST, 'field_mid', 0, 'int');
$field_numb = TDMCreate_CleanVars($_REQUEST, 'field_numb', 0, 'int');
$field_name = TDMCreate_CleanVars($_REQUEST, 'field_name', '', 'string');
-/*$table_id = $_SESSION['field_tid'];
-$table_mid = $_SESSION['field_mid'];
-$table_nbfields = $_SESSION['field_numb'];
-$table_fieldname = $_SESSION['field_name'];*/
+//
switch ($op)
{
case 'list':
@@ -50,7 +50,7 @@
$GLOBALS['xoopsTpl']->assign('pathIcon32', $pathIcon32);
// Get the list of tables
$criteria = new CriteriaCompo();
- $criteria->add(new Criteria('table_mid', $_REQUEST['mod_id']));
+ $criteria->add(new Criteria('table_mid', $table_mid));
$criteria->setSort('table_id ASC, table_name');
$criteria->setOrder('ASC');
$nb_tables = $tablesHandler->getCount();
@@ -89,14 +89,14 @@
case 'new':
// Define main template
- $template_main = 'tdmcreate_tables.html';
+ $template_main = 'tdmcreate_fields.html';
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php'));
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php', 'list');
$GLOBALS['xoopsTpl']->assign('button_new', $adminMenu->renderButton());
$obj =& $fieldsHandler->create();
$form = $obj->getForm($table_id, $table_mid, $table_nbfields, $table_fieldname);
- $form->display();
+ $GLOBALS['xoopsTpl']->assign('form', $form->render());
break;
case 'save':
@@ -109,24 +109,33 @@
$obj =& $fieldsHandler->create();
}
//Form fields
- $obj->setVars(array('field_mid' => $table_mid, 'field_tid' => $table_id, 'field_name' => $_POST['field_name'],
- 'field_numb' => $table_nbfields, 'field_type' => $_POST['field_type'],
- 'field_value' => $_POST['field_value'], 'field_attribute' => $_POST['field_attribute'],
- 'field_null' => $_POST['field_null'], 'field_default' => $_POST['field_default'],
- 'field_key' => $_POST['field_key'], 'field_elements' => $_POST['field_elements'],
+ $obj->setVars(array('field_mid' => $table_mid,
+ 'field_tid' => $table_id,
+ 'field_name' => $_POST['field_name'],
+ 'field_numb' => $table_nbfields,
+ 'field_type' => $_POST['field_type'],
+ 'field_value' => $_POST['field_value'],
+ 'field_attribute' => $_POST['field_attribute'],
+ 'field_null' => $_POST['field_null'],
+ 'field_default' => $_POST['field_default'],
+ 'field_key' => $_POST['field_key'],
+ 'field_elements' => $_POST['field_elements'],
'field_admin' => (($_REQUEST['field_admin'] == 1) ? '1' : '0'),
'field_user' => (($_REQUEST['field_user'] == 1) ? '1' : '0'),
'field_blocks' => (($_REQUEST['field_blocks'] == 1) ? '1' : '0'),
'field_mainfield' => (($_REQUEST['field_mainfield'] == 1) ? '1' : '0'),
'field_search' => (($_REQUEST['field_search'] == 1) ? '1' : '0'),
- 'field_required' => (($_REQUEST['field_required'] == 1) ? '1' : '0')));
+ 'field_required' => (($_REQUEST['field_required'] == 1) ? '1' : '0')),
+ 'field_fields' => $_POST['field_fields'],
+ 'field_parameters' => $_POST['field_parameters']
+ );
if ($fieldsHandler->insert($obj)) {
redirect_header('tables.php', 2, _AM_TDMCREATE_FORMOK);
}
echo $obj->getHtmlErrors();
$form = $obj->getForm();
- $form->display();
+ $GLOBALS['xoopsTpl']->assign('form', $form->render());
break;
case 'edit':
@@ -137,11 +146,8 @@
$GLOBALS['xoopsTpl']->assign('button_new', $adminMenu->renderButton());
$obj = $fieldsHandler->get($field_id);
- $form = $obj->getForm($table_id, $table_mid, $table_nbfields, $table_fieldname);
- $form->display();
+ $form = $obj->getForm($field_tid, $field_mid, $field_numb, $field_name);
+ $GLOBALS['xoopsTpl']->assign('form', $form->render());
break;
}
-if ( isset($template_main) ) {
- $GLOBALS['xoopsTpl']->display("db:{$template_main}");
-}
include 'footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/footer.php 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/footer.php 2014-03-23 19:52:22 UTC (rev 12402)
@@ -18,7 +18,9 @@
* @author Txmod Xoops http://www.txmodxoops.org
* @version $Id: footer.php 12207 2013-10-23 02:46:52Z beckmi $
*/
-
-$xoopsTpl->assign('module_name', $xoopsModule->getVar('name'));
+$GLOBALS['xoopsTpl']->assign('module_name', $GLOBALS['xoopsModule']->getVar('name'));
+if ( isset($template_main) ) {
+ $GLOBALS['xoopsTpl']->display("db:{$template_main}");
+}
xoops_cp_footer();
?>
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/index.php 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/index.php 2014-03-23 19:52:22 UTC (rev 12402)
@@ -19,20 +19,15 @@
* @version $Id: index.php 11084 2013-02-23 15:44:20Z timgno $
*/
include 'header.php';
-
$criteria = new CriteriaCompo();
$count_modules = $modulesHandler->getCount($criteria);
$count_tables = $tablesHandler->getCount($criteria);
unset($criteria);
-
+$template_main = 'tdmcreate_index.html';
$adminMenu->addInfoBox(_AM_TDMCREATE_ADMIN_NUMMODULES) ;
$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' ._AM_TDMCREATE_THEREARE_NUMMODULES. '</label>', $count_modules, 'Green') ;
$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' ._AM_TDMCREATE_THEREARE_NUMTABLES. '</label>', $count_tables, 'Orange');
//$xoopsOption['template_main'] = 'tdmcreate_index.html';
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('index.php'));
$GLOBALS['xoopsTpl']->assign('index', $adminMenu->renderIndex());
-$template_main = 'tdmcreate_index.html';
-if ( isset($template_main) ) {
- $GLOBALS['xoopsTpl']->display("db:{$template_main}");
-}
include 'footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-03-23 19:52:22 UTC (rev 12402)
@@ -22,7 +22,7 @@
// Recovered the value of the argument op in the URL $
$op = TDMCreate_CleanVars($_REQUEST, 'op', 'list', 'string');
-switch ($op) http://localhost/xoops-2.5.7testTDMCreate1.91/Frameworks/moduleclasses/icons/32/user-icon.png
+switch ($op)
{
case 'list':
default:
@@ -177,7 +177,4 @@
}
break;
}
-if ( isset($template_main) ) {
- $GLOBALS['xoopsTpl']->display("db:{$template_main}");
-}
include 'footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-03-23 19:52:22 UTC (rev 12402)
@@ -19,9 +19,15 @@
* @version $Id: tables.php 12258 2014-01-02 09:33:29Z timgno $
*/
include 'header.php';
-// Recovered the value of the argument op in the URL $
+// Recovered value of arguments op in the URL $
$op = TDMCreate_CleanVars($_REQUEST, 'op', 'list', 'string');
+//
$mod_id = TDMCreate_CleanVars($_REQUEST, 'mod_id', 0);
+$table_id = TDMCreate_CleanVars($_REQUEST, 'table_id', 0);
+$table_mid = TDMCreate_CleanVars($_REQUEST, 'table_mid', 0);
+$table_nbfields = TDMCreate_CleanVars($_REQUEST, 'table_nbfields', 0);
+$table_fieldname = TDMCreate_CleanVars($_REQUEST, 'table_fieldname', '', 'string');
+//
switch ($op)
{
case 'list':
@@ -128,23 +134,16 @@
if ( !$GLOBALS['xoopsSecurity']->check() ) {
redirect_header('tables.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
- $table_id = TDMCreate_CleanVars($_REQUEST, 'table_id', 0, 'int');
if (isset($table_id)) {
$obj =& $tablesHandler->get($table_id);
} else {
$obj =& $tablesHandler->create();
}
-
- $table_mid = intval($_REQUEST['table_mid']);
- $table_nbfields = intval($_REQUEST['table_nbfields']);
- $table_fieldname = strtolower($_REQUEST['table_fieldname']);
- $_SESSION['field_tid'] = $tid;
- $_SESSION['field_mid'] = $table_mid;
- $_SESSION['field_numb'] = $table_nbfields;
- $_SESSION['field_name'] = $table_fieldname;
//Form tables
- $obj->setVars(array('table_mid' => $table_mid, 'table_name' => $_POST['table_name'],
- 'table_nbfields' => $table_nbfields, 'table_fieldname' => $table_fieldname));
+ $obj->setVars(array('table_mid' => $table_mid,
+ 'table_name' => $_POST['table_name'],
+ 'table_nbfields' => $table_nbfields,
+ 'table_fieldname' => $table_fieldname));
//Form table_image
include_once XOOPS_ROOT_PATH.'/class/uploader.php';
if(is_dir($pathIcon32)){
@@ -169,17 +168,17 @@
$obj->setVar('table_image', $_POST['table_image']);
}
$obj->setVars(array('table_blocks' => (($_REQUEST['table_blocks'] == 1) ? '1' : '0'),
- 'table_admin' => (($_REQUEST['table_admin'] == 1) ? '1' : '0'),
- 'table_user' => (($_REQUEST['table_user'] == 1) ? '1' : '0'),
- 'table_submenu' => (($_REQUEST['table_submenu'] == 1) ? '1' : '0'),
- 'table_search' => (($_REQUEST['table_search'] == 1) ? '1' : '0'),
- 'table_comments' => (($_REQUEST['table_comments'] == 1) ? '1' : '0'),
- 'table_notifications' => (($_REQUEST['table_notifications'] == 1) ? '1' : '0')));
+ 'table_admin' => (($_REQUEST['table_admin'] == 1) ? '1' : '0'),
+ 'table_user' => (($_REQUEST['table_user'] == 1) ? '1' : '0'),
+ 'table_submenu' => (($_REQUEST['table_submenu'] == 1) ? '1' : '0'),
+ 'table_search' => (($_REQUEST['table_search'] == 1) ? '1' : '0'),
+ 'table_comments' => (($_REQUEST['table_comments'] == 1) ? '1' : '0'),
+ 'table_notifications' => (($_REQUEST['table_notifications'] == 1) ? '1' : '0')));
if( $tablesHandler->insert($obj) ) {
if( $obj->isNew() ) {
- $tid = $GLOBALS['xoopsDB']->getInsertId();
- redirect_header('fields.php?op=new&field_tid='.$tid, 3, _AM_TDMCREATE_FORMOK);
+ $field_tid = $GLOBALS['xoopsDB']->getInsertId();
+ redirect_header('fields.php?op=new&field_tid='.$field_tid, 3, _AM_TDMCREATE_FORMOK);
} else {
redirect_header('tables.php', 3, _AM_TDMCREATE_FORMOK);
}
@@ -218,7 +217,4 @@
}
break;
}
-if ( isset($template_main) ) {
- $GLOBALS['xoopsTpl']->display("db:{$template_main}");
-}
include 'footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-03-23 19:52:22 UTC (rev 12402)
@@ -35,34 +35,24 @@
public function __construct()
{
$this->XoopsObject();
- $this->initVar('field_id', XOBJ_DTYPE_INT, null, false, 8);
- $this->initVar('field_tid', XOBJ_DTYPE_INT, null, false, 5);
- $this->initVar('field_name', XOBJ_DTYPE_TXTBOX, null, false, 255);
- $this->initVar('field_type', XOBJ_DTYPE_TXTBOX, null, false, 100);
- $this->initVar('field_value', XOBJ_DTYPE_TXTBOX, null, false, 4);
- $this->initVar('field_attribute', XOBJ_DTYPE_TXTBOX, null, false, 50);
- $this->initVar('field_null', XOBJ_DTYPE_TXTBOX, null, false, 10);
- $this->initVar('field_default', XOBJ_DTYPE_TXTBOX, null, false, 150);
- $this->initVar('field_key', XOBJ_DTYPE_TXTBOX, null, false, 10);
- $this->initVar('field_auto_increment', XOBJ_DTYPE_INT, null, false, 1);
- $this->initVar('field_display_admin', XOBJ_DTYPE_INT, null, false, 1);
- $this->initVar('field_display_user', XOBJ_DTYPE_INT, null, false, 1);
- $this->initVar('field_display_block', XOBJ_DTYPE_INT, null, false, 1);
- $this->initVar('field_mainfield', XOBJ_DTYPE_INT, null, false, 1);
- $this->initVar('field_search', XOBJ_DTYPE_INT, null, false, 1);
- $this->initVar('field_required', XOBJ_DTYPE_INT, null, false, 1);
- // For relationship
- $this->initVar('table_id', XOBJ_DTYPE_INT, null, false, 8);
- $this->initVar('table_mid', XOBJ_DTYPE_INT, null, false, 5);
- $this->initVar('table_name', XOBJ_DTYPE_TXTBOX, null, false, 255);
- $this->initVar('table_nbfields', XOBJ_DTYPE_INT, null, false, 5);
- $this->initVar('table_fieldname', XOBJ_DTYPE_TXTBOX, null, false, 50);
- $this->initVar('table_fields', XOBJ_DTYPE_TXTAREA, null);
- $this->initVar('table_parameters', XOBJ_DTYPE_TXTAREA, null);
-
- $this->initVar('fieldtype_id', XOBJ_DTYPE_INT, null, false, 5);
- $this->initVar('fieldtype_value', XOBJ_DTYPE_TXTBOX, null, false, 25);
- $this->initVar('fieldtype_name', XOBJ_DTYPE_TXTBOX, null, false, 255);
+ $this->initVar('field_id', XOBJ_DTYPE_INT);
+ $this->initVar('field_tid', XOBJ_DTYPE_INT);
+ $this->initVar('field_name', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('field_type', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('field_value', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('field_attribute', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('field_null', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('field_default', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('field_key', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('field_auto_increment', XOBJ_DTYPE_INT);
+ $this->initVar('field_display_admin', XOBJ_DTYPE_INT);
+ $this->initVar('field_display_user', XOBJ_DTYPE_INT);
+ $this->initVar('field_display_block', XOBJ_DTYPE_INT);
+ $this->initVar('field_mainfield', XOBJ_DTYPE_INT);
+ $this->initVar('field_search', XOBJ_DTYPE_INT);
+ $this->initVar('field_required', XOBJ_DTYPE_INT);
+ $this->initVar('field_fields',XOBJ_DTYPE_TXTAREA);
+ $this->initVar('field_parameters',XOBJ_DTYPE_TXTAREA);
}
/*
@@ -79,43 +69,45 @@
}
/*
- * @static function getForm
+ * @public function getForm
+ *
+ * @param integer $table_id
+ * @param integer $table_mid
+ * @param integer $table_nbfields
+ * @param string $table_fieldname
* @param mixed $action
*/
- public function getForm($action = false)
+ public function getForm($table_id = null, $table_mid = null, $table_nbfields = null, $table_fieldname = null, $action = false)
{
if ($action === false) {
$action = $_SERVER['REQUEST_URI'];
}
$title = $this->isNew() ? sprintf(_AM_TDMCREATE_FIELD_ADD) : sprintf(_AM_TDMCREATE_FIELD_EDIT);
-
+
+ if ($this->isNew()) {
+ $field_tid = $table_id;
+ $nb_fields = $table_nbfields;
+ } else {
+ $field_tid = $this->getVar('field_tid');
+ $nb_fields = $this->getVar('field_numb');
+ }
+
include_once(XOOPS_ROOT_PATH.'/class/xoopsformloader.php');
- include_once(XOOPS_ROOT_PATH.'/modules/TDMCreate/class/tdmcreate_themeform.php');
+ include_once(XOOPS_ROOT_PATH.'/modules/TDMCreate/class/themeform.php');
$form = new TDMCreateThemeForm($title, 'form', $action, 'post', true);
$form->setExtra('enctype="multipart/form-data"');
-
- if (!$this->isNew()) {
- $field_tid = $this->getVar('field_tid');
- } else {
- $field_tid = array( 1 => 0 );
- }
//$option_tray = new XoopsFormElementTray(' ');
//$option_tray->setExtra('colspan="2"');//_AM_TDMCREATE_FIELD_TYPE
-
+ $tablesHandler = xoops_getModuleHandler('tables');
// New Object HtmlTable
$tableForm = new TDMCreateHtmlTable(null, 'display outer');
// header row
$tableForm->addRow('center bgblue');
$cells = array(_AM_TDMCREATE_FIELD_NUMBER, _AM_TDMCREATE_FIELD_NAME, _AM_TDMCREATE_FIELD_TYPE, _AM_TDMCREATE_FIELD_VALUE, _AM_TDMCREATE_FIELD_ATTRIBUTE, _AM_TDMCREATE_FIELD_NULL, _AM_TDMCREATE_FIELD_DEFAULT, _AM_TDMCREATE_FIELD_KEY, _AM_TDMCREATE_FIELD_OTHERS);
$tableForm->addCells($cells, 'first', 'header');
-
- $tablesHandler = xoops_getModuleHandler('tables');
- $criteria = new CriteriaCompo(new Criteria('table_name', $this->getVar('table_name')));
- $criteria->add(new Criteria('table_nbfields', $this->getVar('table_nbfields')));
- $nb_fields = $tablesHandler->getAll($criteria);
- unset($criteria);
+
for($i = 1; $i <= count($nb_fields); $i++)
{
$field_name = $this->isNew() ? $this->getVar('table_fieldname') : $this->getVar('field_name');
@@ -161,11 +153,11 @@
$fieldelementsHandler=& xoops_getModuleHandler('fieldelements');
$field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element_name', $this->getVar('field_element_name'));
$field_elements_select->addOptionArray($fieldelementsHandler->getList());
- $criteria = new CriteriaCompo(new Criteria('table_id', $this->getVar('table_id')));
- $criteria->add(new Criteria('table_module', $this->getVar('table_module')));
+ $criteria = new CriteriaCompo(new Criteria('table_id', $table_id)));
+ $criteria->add(new Criteria('table_mid', $table_mid)));
$criteria->setSort('table_name');
$criteria->setOrder('ASC');
- $tbls_arr1 = $tablesHandler->getall($criteria);
+ $tbls_arr1 = $tablesHandler->getAll($criteria);
unset($criteria);
foreach (array_keys($tbls_arr1) as $j)
{
@@ -214,14 +206,14 @@
$tableOtherForm->addRow();
$tableOtherForm->addCell($check_field_required->render(), null, 'data');
}
- $tableForm->addCell($tableOtherForm->display(), null, 'data');
+ $tableForm->addCell($tableOtherForm->render(), null, 'data');
if (!$this->isNew()) {
$tableFormHiddenId = new XoopsFormHidden('table_id', $this->getVar('table_id'));
//$form->addElement(new XoopsFormHidden('fields_modified', true));
}
}
- $form->addElement($tableForm->display());
+ $form->addElement($tableForm->render());
/*if (!$this->isNew()) {
$form->addElement(new XoopsFormHidden('table_id', $this->getVar('table_id')));
$form->addElement(new XoopsFormHidden('fields_modified', true));
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/htmlform.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/htmlform.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/htmlform.php 2014-03-23 19:52:22 UTC (rev 12402)
@@ -0,0 +1,140 @@
+<?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.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.5
+ * @author Txmod Xoops <su...@tx...>
+ * @version $Id: 1.91 htmlform.php 11297 2014-03-22 10:19:18Z timgno $
+ */
+
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+/**
+ * Form HTML
+ *
+ */
+class HtmlForm
+{
+ /**
+ * name attribute
+ *
+ * @var string
+ */
+ private $name = null;
+
+ /**
+ * id attribute
+ *
+ * @var mixed
+ */
+ private $id = null;
+
+ /**
+ * action attribute
+ *
+ * @var mixed
+ */
+ private $action = null;
+
+ /**
+ * method attribute
+ *
+ * @var string
+ */
+ private $method = null;
+
+ /**
+ * display attribute
+ *
+ * @var bool
+ */
+ private $display = false;
+
+ /**
+ * hidden attribute
+ *
+ * @var bool
+ */
+ private $hidden = false;
+
+ /**
+ * constructor
+ *
+ */
+ public function __construct()
+ {
+ }
+
+ /*
+ * @static function &getInstance
+ * @param null
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+ return $instance;
+ }
+
+ /**
+ * Function getForm
+ *
+ * @param string $name "name" attribute for the <form> tag
+ * @param string $id "id" attribute for the <form> tag
+ * @param string $action "action" attribute for the <form> tag
+ * @param string $method "method" attribute for the <form> tag
+ * @param bool $extra whether to add a javascript to the form
+ * @param string $display "display" attribute for the <table> tag
+ * @param string $hidden "hidden" attribute for the <form> tag
+ */
+ public function getForm($name = null, $id = null, $action = false, $method = 'post', $extra = false, $display = false, $hidden = false)
+ {
+ $this->name = $name;
+ $this->id = $id;
+ $this->action = $action;
+ $this->method = $method;
+ $this->extra = $extra;
+ $this->display = $display;
+ $this->hidden = $hidden;
+ }
+
+ /**
+ * Function OpenForm
+ *
+ * @param null
+ */
+ public function getOpenForm()
+ {
+ $ret = '<form name="' . $this->name . '" id="' . $this->id . '" action="' . $this->action . '" method="' . $this->method . '" onsubmit="return xoopsFormValidate_' . $this->name . '();"' . $this->extra . '>' . NWLINE;
+ return $ret;
+ }
+
+ /**
+ * Function CloseForm
+ *
+ * @param null
+ */
+ public function getCloseForm()
+ {
+ if($this->display && $this->hidden) {
+ $ret = $this->display . NWLINE . ' ' . $this->hidden . '</form>' . NWLINE;
+ } else {
+ $ret = NWLINE . '</form>' . NWLINE;
+ }
+ return $ret;
+ }
+}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/htmltable.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/htmltable.php 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/htmltable.php 2014-03-23 19:52:22 UTC (rev 12402)
@@ -27,22 +27,57 @@
* @package tdmcreate
* @access public
*/
-xoops_load('XoopsFormElement');
-class TDMCreateHtmlTable extends XoopsFormElement
+//xoops_load('XoopsFormElement');
+class TDMCreateHtmlTable /*extends XoopsFormElement*/
{
/**
- * array of {@link XoopsFormElement} objects
+ * array of {@TDMCreateHtmlTable} objects
*
* @var array
*/
- var $rows = array();
+ private $rows = array();
/**
- * "tStr" string of the table
+ * array of {@link TDMCreateHtmlTable} objects
*
+ * @var array
+ */
+ private $cells = array();
+
+ /**
+ * string of {@link TDMCreateHtmlTable} objects
+ *
* @var string
*/
- var $tStr = '';
+ private $table_string = '';
+
+ /**
+ * string of {@link TDMCreateHtmlTable} objects
+ *
+ * @var string
+ */
+ private $data = '';
+
+ /**
+ * string of {@link TDMCreateHtmlTable} objects
+ *
+ * @var string
+ */
+ private $_class = '';
+
+ /**
+ * string of {@link TDMCreateHtmlTable} objects
+ *
+ * @var string
+ */
+ private $type = '';
+
+ /**
+ * array of {@link TDMCreateHtmlTable} objects
+ *
+ * @var array
+ */
+ private $attributes = array();
/**
* constructor
@@ -74,27 +109,27 @@
* @param int $border "border" attribute for the <table> tag
* @param int $cellspacing "cellspacing" attribute for the <table> tag
* @param int $cellpadding "cellpadding" attribute for the <table> tag
- * @param array $attrs attributes for the <table> tag
+ * @param array $attributes attributes for the <table> tag
*/
- public function initTable($id = '', $_class = '', $border = 0, $cellspacing = 2, $cellpadding = 0, $attrs = array() )
+ public function initTable($id = '', $_class = '', $border = 0, $cellspacing = 2, $cellpadding = 0, $attributes = array() )
{
- $this->tStr = '<table' . ( !empty($id) ? ' id="' . $id . '"' : '' );
- $this->tStr .= ( !empty($_class) ? ' class="' . $_class . '"' : '' );
- $this->tStr .= $this->addAttributes( $attrs );
- $this->tStr .= ' border="' . $border . '" cellspacing="' . $cellspacing . '" cellpadding="' . $cellpadding . '">';
+ $this->table_string = '<table' . ( !empty($id) ? ' id="' . $id . '"' : '' );
+ $this->table_string .= ( !empty($_class) ? ' class="' . $_class . '"' : '' );
+ $this->table_string .= $this->addAttributes( $attributes );
+ $this->table_string .= ' border="' . $border . '" cellspacing="' . $cellspacing . '" cellpadding="' . $cellpadding . '">';
}
/**
* return key & value of attributes
*
- * @param array $attrs
+ * @param array $attributes
* @return string
*/
- public function addAttributes( $attrs )
+ public function addAttributes( $attributes )
{
$str = '';
- if (is_array( $attrs )) {
- foreach( $attrs as $k => $v ) {
+ if (is_array( $attributes )) {
+ foreach( $attributes as $k => $v ) {
$str .= " {$k}=\"{$v}\"";
}
}
@@ -105,11 +140,12 @@
* Add an element row to the table
*
* @param string $_class
- * @param array $attrs
+ * @param array $attributes
*/
- public function addRow($class = '', $attrs = array() )
+ public function addRow($class = '', $attributes = array() )
{
- $row = self::addTableRow( $class, $attrs );
+ $row = self::getInstance();
+ $row->addTableRow( $class, $attributes );
array_push( $this->rows, $row );
}
@@ -117,16 +153,19 @@
* Add an element cell to the table
*
* @param object $data reference to a {@link XoopsFormElement}
- * @param string $_class css element
+ * @param string $class css element
* @param string $type reference to a header or data
- * @param array $attrs attributes for a cell
+ * @param array $attributes attributes for a cell
*/
- public function addCell($data, $class = '', $type = 'data', $attrs = array() )
+ public function addCell($data, $class = '', $type = 'data', $attributes = array() )
{
- $cell = self::addTableCell( $data, $class, $type, $attrs );
+ $cell = self::getInstance();
+ $cell->addTableCell( $data, $class, $type, $attributes );
// add new cell to current row's list of cells
$curRow =& $this->rows[ count( $this->rows ) - 1 ]; // copy by reference
- array_push( $curRow->cells, $cell );
+ if(isset($curRow->cells) && isset($cell)) {
+ array_push( $curRow->cells, $cell );
+ }
}
/**
@@ -135,13 +174,14 @@
* @param object $data reference to a {@link XoopsFormElement}
* @param string $_class css element
* @param string $type reference to a header or data
- * @param array $attrs attributes for a cell
+ * @param array $attributes attributes for a cell
*/
- public function addCells($data, $class = '', $type = 'data', $attrs = array() )
+ public function addCells($data, $class = '', $type = 'data', $attributes = array() )
{
- foreach( $data as $data_cell )
- {
- $this->addCell($data_cell, $class, $type, $attrs );
+ if (is_array($data)) {
+ foreach( $data as $data_cell ) {
+ $this->addCell($data_cell, $class, $type, $attributes );
+ }
}
}
@@ -154,11 +194,12 @@
public function getRowCells($cells)
{
$str = '';
- foreach( $cells as $cell )
+ $this->cells = $cells;
+ foreach( $this->cells as $cell )
{
$tag = ($cell->type == 'data')? 'td': 'th';
$str .= !empty($cell->_class) ? '<' . $tag . ' class="' . $cell->_class . '"' : '<' . $tag;
- $str .= $this->addAttributes( $cell->attrs ) . '>';
+ $str .= $this->addAttributes( $cell->attributes ) . '>';
$str .= $cell->data;
$str .= '</' . $tag . '>';
}
@@ -170,13 +211,15 @@
*
* @author TXMod Xoops <in...@tx...>
* @package tdmcreate
- * @access private
*/
- public function addTableRow($class = '', $attrs = array())
+ public function addTableRow($class = '', $attributes = null)
{
$this->_class = $class;
- $this->attrs = $attrs;
- $this->cells = array();
+ if(!is_array($attributes)){
+ $this->attributes[] = $attributes;
+ } else {
+ $this->attributes = $attributes;
+ }
}
/**
@@ -184,29 +227,28 @@
*
* @author TXMod Xoops <in...@tx...>
* @package tdmcreate
- * @access private
*/
- public function addTableCell( $data, $class = '', $type = '', $attrs = array())
+ public function addTableCell( $data, $class = '', $type = '', $attributes = array())
{
$this->data = $data;
$this->_class = $class;
$this->type = $type;
- $this->attrs = $attrs;
+ $this->attributes = $attributes;
}
/**
- * displays rendered table
+ * render html table
*/
- public function display()
+ public function render()
{
foreach( $this->rows as $row )
{
- $this->tStr .= !empty($row->_class) ? '<tr class="' . $row->_class . '"' : '<tr';
- $this->tStr .= $this->addAttributes( $row->attrs ) . '>';
- $this->tStr .= $this->getRowCells( $row->cells );
- $this->tStr .= '</tr>';
+ $this->table_string .= !empty($row->_class) ? '<tr class="' . $row->_class . '"' : '<tr';
+ $this->table_string .= $this->addAttributes( $row->attributes ) . '>';
+ $this->table_string .= $this->getRowCells( $row->cells );
+ $this->table_string .= '</tr>';
}
- $this->tStr .= '</table>';
- return $this->tStr;
+ $this->table_string .= '</table>';
+ return $this->table_string;
}
}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/logoGenerator.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/logoGenerator.php 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/logoGenerator.php 2014-03-23 19:52:22 UTC (rev 12402)
@@ -51,7 +51,7 @@
imagecopy($imageModule, $imageIcon, 29, 2, 0, 0, 32, 32);
- $targetImage = "/modules/" . $dirname . "/images/uploads/modules/".$moduleName."_slogo.png";
+ $targetImage = "/uploads/" . $dirname . "/images/modules/".$moduleName."_slogo.png";
imagepng($imageModule, XOOPS_ROOT_PATH . $targetImage );
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php 2014-03-23 19:52:22 UTC (rev 12402)
@@ -37,42 +37,42 @@
{
$this->XoopsObject();
$this->initVar('mod_id',XOBJ_DTYPE_INT);
- $this->initVar('mod_name',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('name'));
- $this->initVar('mod_version',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('version'));
- $this->initVar('mod_since',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('since'));
- $this->initVar('mod_min_php',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('min_php'));
- $this->initVar('mod_min_xoops',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('min_xoops'));
- $this->initVar('mod_min_admin',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('min_admin'));
- $this->initVar('mod_min_mysql',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('min_mysql'));
- $this->initVar('mod_description',XOBJ_DTYPE_TXTAREA, xoops_getModuleOption('description'));
- $this->initVar('mod_author',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('author'));
- $this->initVar('mod_author_mail',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('author_email'));
- $this->initVar('mod_author_website_url',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('author_website_url'));
- $this->initVar('mod_author_website_name',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('author_website_name'));
- $this->initVar('mod_credits',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('credits'));
- $this->initVar('mod_license',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('license'));
- $this->initVar('mod_release_info',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('release_info'));
- $this->initVar('mod_release_file',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('release_file'));
- $this->initVar('mod_manual',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('manual'));
- $this->initVar('mod_manual_file',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('manual_file'));
+ $this->initVar('mod_name',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['name']);
+ $this->initVar('mod_version',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['version']);
+ $this->initVar('mod_since',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['since']);
+ $this->initVar('mod_min_php',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_php']);
+ $this->initVar('mod_min_xoops',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_xoops']);
+ $this->initVar('mod_min_admin',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_admin']);
+ $this->initVar('mod_min_mysql',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_mysql']);
+ $this->initVar('mod_description',XOBJ_DTYPE_TXTAREA, $GLOBALS['xoopsModuleConfig']['description']);
+ $this->initVar('mod_author',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['author']);
+ $this->initVar('mod_author_mail',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['author_email']);
+ $this->initVar('mod_author_website_url',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['author_website_url']);
+ $this->initVar('mod_author_website_name',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['author_website_name']);
+ $this->initVar('mod_credits',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['credits']);
+ $this->initVar('mod_license',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['license']);
+ $this->initVar('mod_release_info',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['release_info']);
+ $this->initVar('mod_release_file',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['release_file']);
+ $this->initVar('mod_manual',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['manual']);
+ $this->initVar('mod_manual_file',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['manual_file']);
$this->initVar('mod_image',XOBJ_DTYPE_TXTBOX, null);
- $this->initVar('mod_demo_site_url',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('demo_site_url'));
- $this->initVar('mod_demo_site_name',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('demo_site_name'));
- $this->initVar('mod_support_url',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('support_url'));
- $this->initVar('mod_support_name',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('support_name'));
- $this->initVar('mod_website_url',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('website_url'));
- $this->initVar('mod_website_name',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('website_name'));
- $this->initVar('mod_release',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('release_date'));
- $this->initVar('mod_status',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('status'));
- $this->initVar('mod_admin',XOBJ_DTYPE_INT,xoops_getModuleOption('display_admin'));
- $this->initVar('mod_user',XOBJ_DTYPE_INT, xoops_getModuleOption('display_user'));
- $this->initVar('mod_search',XOBJ_DTYPE_INT, xoops_getModuleOption('active_search'));
- $this->initVar('mod_comments',XOBJ_DTYPE_INT, xoops_getModuleOption('active_comments'));
- $this->initVar('mod_notifications', XOBJ_DTYPE_INT, xoops_getModuleOption('active_notifications'));
- $this->initVar('mod_permissions', XOBJ_DTYPE_INT, xoops_getModuleOption('active_permissions'));
- $this->initVar('mod_install', XOBJ_DTYPE_INT, xoops_getModuleOption('inroot_install'));
- $this->initVar('mod_donations', XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('donations'));
- $this->initVar('mod_subversion', XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('subversion'));
+ $this->initVar('mod_demo_site_url',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['demo_site_url']);
+ $this->initVar('mod_demo_site_name',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['demo_site_name']);
+ $this->initVar('mod_support_url',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['support_url']);
+ $this->initVar('mod_support_name',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['support_name']);
+ $this->initVar('mod_website_url',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['website_url']);
+ $this->initVar('mod_website_name',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['website_name']);
+ $this->initVar('mod_release',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['release_date']);
+ $this->initVar('mod_status',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['status']);
+ $this->initVar('mod_admin',XOBJ_DTYPE_INT,$GLOBALS['xoopsModuleConfig']['display_admin']);
+ $this->initVar('mod_user',XOBJ_DTYPE_INT, $GLOBALS['xoopsModuleConfig']['display_user']);
+ $this->initVar('mod_search',XOBJ_DTYPE_INT, $GLOBALS['xoopsModuleConfig']['active_search']);
+ $this->initVar('mod_comments',XOBJ_DTYPE_INT, $GLOBALS['xoopsModuleConfig']['active_comments']);
+ $this->initVar('mod_notifications', XOBJ_DTYPE_INT, $GLOBALS['xoopsModuleConfig']['active_notifications']);
+ $this->initVar('mod_permissions', XOBJ_DTYPE_INT, $GLOBALS['xoopsModuleConfig']['active_permissions']);
+ $this->initVar('mod_install', XOBJ_DTYPE_INT, $GLOBALS['xoopsModuleConfig']['inroot_install']);
+ $this->initVar('mod_donations', XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['donations']);
+ $this->initVar('mod_subversion', XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['subversion']);
}
/*
@@ -122,34 +122,34 @@
$editor_configs['cols'] = 100;
$editor_configs['width'] = '50%';
$editor_configs['height'] = '100px';
- $editor_configs['editor'] = xoops_getModuleOption('tdmcreate_editor');
+ $editor_configs['editor'] = $GLOBALS['xoopsModuleConfig']['tdmcreate_editor'];
$form->addElement( new XoopsFormEditor(_AM_TDMCREATE_MODULE_DESCRIPTION, 'mod_description', $editor_configs), true);
// Author
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_AUTHOR, 'mod_author', 50, 255, $this->getVar('mod_author')), true);
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_LICENSE, 'mod_license', 50, 255, $this->getVar('mod_license')), true);
- $mod_admin = $this->isNew() ? xoops_getModuleOption('display_admin') : $this->getVar('mod_admin');
+ $mod_admin = $this->isNew() ? $GLOBALS['xoopsModuleConfig']['display_admin'] : $this->getVar('mod_admin');
$form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULE_ADMIN, 'mod_admin', $mod_admin, _YES, _NO));
- $mod_user = $this->isNew() ? xoops_getModuleOption('display_user') : $this->getVar('mod_user');
+ $mod_user = $this->isNew() ? $GLOBALS['xoopsModuleConfig']['display_user'] : $this->getVar('mod_user');
$form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULE_USER, 'mod_user', $mod_user, _YES, _NO));
- $mod_search = $this->isNew() ? xoops_getModuleOption('active_search') : $this->getVar('mod_search');
+ $mod_search = $this->isNew() ? $GLOBALS['xoopsModuleConfig']['active_search'] : $this->getVar('mod_search');
$form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULE_SEARCH, 'mod_search', $mod_search, _YES, _NO));
- $mod_comments = $this->isNew() ? xoops_getModuleOption('active_comments') : $this->getVar('mod_comments');
+ $mod_comments = $this->isNew() ? $GLOBALS['xoopsModuleConfig']['active_comments'] : $this->getVar('mod_comments');
$form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULE_COMMENTS, 'mod_comments', $mod_comments, _YES, _NO));
- $mod_notifications = $this->isNew() ? xoops_getModuleOption('active_notifications') : $this->getVar('mod_notifications');
+ $mod_notifications = $this->isNew() ? $GLOBALS['xoopsModuleConfig']['active_notifications'] : $this->getVar('mod_notifications');
$form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULE_NOTIFICATIONS, 'mod_notifications', $mod_notifications, _YES, _NO));
- $mod_permissions = $this->isNew() ? xoops_getModuleOption('active_permissions') : $this->getVar('mod_permissions');
+ $mod_permissions = $this->isNew() ? $GLOBALS['xoopsModuleConfig']['active_permissions'] : $this->getVar('mod_permissions');
$form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULE_PERMISSIONS, 'mod_permissions', $mod_permissions, _YES, _NO));
- $mod_install = $this->isNew() ? xoops_getModuleOption('inroot_install') : $this->getVar('mod_install');
+ $mod_install = $this->isNew() ? $GLOBALS['xoopsModuleConfig']['inroot_install'] : $this->getVar('mod_install');
$form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULE_INSTALL, 'mod_install', $mod_install, _YES, _NO));
$mod_image = $this->getVar('mod_image') ? $this->getVar('mod_image') : 'empty.png';
- $uploadirectory = '/modules/'.$xoopsModule->dirname().'/images/uploads/modules';
+ $uploadirectory = '/uploads/'.$GLOBALS['xoopsModule']->dirname().'/images/modules/';
$imgtray = new XoopsFormElementTray(_AM_TDMCREATE_MODULE_IMAGE, '<br />');
- $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, './modules/' . $xoopsModule->dirname() . '/images/uploads/modules');
+ $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, '.' . strtolower($uploadirectory));
$imageselect= new XoopsFormSelect($imgpath, 'mod_image', $mod_image);
$mod_image_array = XoopsLists::getImgListAsArray( XOOPS_ROOT_PATH . $uploadirectory );
foreach( $mod_image_array as $image ) {
@@ -157,10 +157,10 @@
}
$imageselect->setExtra( "onchange='showImgSelected(\"image3\", \"mod_image\", \"" . $uploadirectory . "\", \"\", \"" . XOOPS_URL . "\")'" );
$imgtray->addElement($imageselect);
- $imgtray -> addElement( new XoopsFormLabel( '', "<br /><img src='" . XOOPS_URL . "/" . $uploadirectory . "/" . $mod_image . "' name='image3' id='image3' alt='' />" ) );
+ $imgtray->addElement( new XoopsFormLabel( '', "<br /><img src='" . XOOPS_URL . "/" . $uploadirectory . "/" . $mod_image . "' name='image3' id='image3' alt='' />" ) );
$fileseltray = new XoopsFormElementTray('', '<br />');
- $fileseltray->addElement(new XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD, 'attachedfile', xoops_getModuleOption('maxsize')));
+ $fileseltray->addElement(new XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD, 'attachedfile', $GLOBALS['xoopsModuleConfig']['maxsize']));
$fileseltray->addElement(new XoopsFormLabel(''));
$imgtray->addElement($fileseltray);
$form->addElement($imgtray);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php 2014-03-23 19:52:22 UTC (rev 12402)
@@ -38,9 +38,7 @@
$this->initVar('table_name',XOBJ_DTYPE_TXTBOX);
$this->initVar('table_fieldname',XOBJ_DTYPE_TXTBOX);
$this->initVar('table_image',XOBJ_DTYPE_TXTBOX);
- $this->initVar('table_nbfields',XOBJ_DTYPE_INT);
- $this->initVar('table_fields',XOBJ_DTYPE_TXTBOX);
- $this->initVar('table_parameters',XOBJ_DTYPE_TXTBOX);
+ $this->initVar('table_nbfields',XOBJ_DTYPE_INT);
$this->initVar('table_blocks',XOBJ_DTYPE_INT);
$this->initVar('table_admin',XOBJ_DTYPE_INT);
$this->initVar('table_user',XOBJ_DTYPE_INT);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/themeform.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/themeform.php 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/themeform.php 2014-03-23 19:52:22 UTC (rev 12402)
@@ -45,7 +45,7 @@
* @param string $method "method" attribute for the <form> tag
* @param bool $addtoken whether to add a security token to the form
*/
- public function __construct($title, $tab_header = null, $name, $action, $method = 'post', $addtoken = false, $summary = '')
+ public function __construct($title, $name = null, $action = false, $method = 'post', $tab_header = null, $addtoken = false, $summary = '')
{
parent::__construct($title, $name, $action, $method = 'post', $addtoken = false, $summary = '');
$this->addHeader($tab_header);
@@ -134,7 +134,8 @@
$ret .= $tableForm->addCells($this->getHeader(), 'first', 'header');
$hidden = '';
- $class = ($class == 'even') ? 'odd' : 'even';
+ $class = '';
+ $class .= ($class == 'even') ? 'odd' : 'even';
foreach ($this->getElements() as $ele) {
if (!is_object($ele)) {
$ret .= $ele;
@@ -168,7 +169,7 @@
$hidden .= $ele->render();
}
}
- $ret .= $tableForm->display() . NWLINE . ' ' . $hidden . '</form>' . NWLINE;
+ $ret .= $tableForm->render() . NWLINE . ' ' . $hidden . '</form>' . NWLINE;
$ret .= $this->renderValidationJS(true);
return $ret;
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/functions.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/functions.php 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/functions.php 2014-03-23 19:52:22 UTC (rev 12402)
@@ -18,9 +18,7 @@
* @author Txmod Xoops http://www.txmodxoops.org
* @version $Id: functions.php 11084 2013-02-23 15:44:20Z timgno $
*/
-if (!defined('XOOPS_ROOT_PATH')) {
- die('XOOPS root path not defined');
-}
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
function TDMCreate_CleanVars( &$global, $key, $default = '', $type = 'int' ) {
switch ( $type ) {
@@ -42,17 +40,17 @@
if (!$opening) return;
while($file=readdir($opening)) {
if ($file == '.' || $file == '..') continue;
- if (is_dir($folder."/".$file)) {
- $r=TDMCreate_clearDir($folder."/".$file);
- if (!$r) return false;
- }
- else {
- $r=@unlink($folder."/".$file);
- if (!$r) return false;
- }
+ if (is_dir($folder."/".$file)) {
+ $r=TDMCreate_clearDir($folder."/".$file);
+ if (!$r) return false;
+ }
+ else {
+ $r=@unlink($folder."/".$file);
+ if (!$r) return false;
+ }
}
-closedir($opening);
-$r=@rmdir($folder);
-if (!$r) return false;
+ closedir($opening);
+ $r=@rmdir($folder);
+ if (!$r) return false;
return true;
}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/install.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/install.php 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/install.php 2014-03-23 19:52:22 UTC (rev 12402)
@@ -21,6 +21,7 @@
$indexFile = XOOPS_UPLOAD_PATH.'/index.html';
$blankFile = XOOPS_UPLOAD_PATH.'/blank.gif';
+$emptyFile = XOOPS_ROOT_PATH.'/modules/TDMCreate/images/empty.png';
// Making of "uploads" folder
$tdmcreate = XOOPS_UPLOAD_PATH.'/tdmcreate';
@@ -50,6 +51,7 @@
chmod($modules, 0777);
copy($indexFile, $modules.'/index.html');
copy($blankFile, $modules.'/blank.gif');
+copy($emptyFile, $modules.'/empty.png');
// Making of "tables" images folder
$tables = $images.'/tables';
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/sql/mysql.sql
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/sql/mysql.sql 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/sql/mysql.sql 2014-03-23 19:52:22 UTC (rev 12402)
@@ -49,8 +49,6 @@
`table_fieldname` varchar(150) NOT NULL default '',
`table_image` varchar(150) NOT NULL default '',
`table_nbfields` int(5) unsigned NOT NULL default '0',
- `table_fields` text,
- `table_parameters` text,
`table_blocks` tinyint(1) unsigned NOT NULL default '0',
`table_admin` tinyint(1) unsigned NOT NULL default '1',
`table_user` tinyint(1) unsigned NOT NULL default '0',
@@ -89,6 +87,8 @@
`field_mainfield` tinyint (1) unsigned NOT NULL default '0',
`field_search` tinyint (1) unsigned NOT NULL default '0',
`field_required` tinyint (1) unsigned NOT NULL default '0',
+`field_fields` text,
+`field_parameters` text,
PRIMARY KEY (`field_id`),
KEY `field_tid` (`field_tid`)
) ENGINE=MyISAM;
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_about.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_about.html 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_about.html 2014-03-23 19:52:22 UTC (rev 12402)
@@ -1,4 +1,6 @@
<!-- Header -->
<{includeq file="db:tdmcreate_header.html"}>
<!-- About Page -->
-<div class="top"><{$about}></div>
\ No newline at end of file
+<div class="top"><{$about}></div>
+<!-- Footer -->
+<{includeq file="db:tdmcreate_footer.html"}>
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_building.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_building.html 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_building.html 2014-03-23 19:52:22 UTC (rev 12402)
@@ -41,4 +41,6 @@
<{if $form}>
<{$form}>
<{/if}>
-<{/if}>
\ No newline at end of file
+<{/if}>
+<!-- Footer -->
+<{includeq file="db:tdmcreate_footer.html"}>
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html 2014-03-23 19:52:22 UTC (rev 12402)
@@ -32,13 +32,13 @@
<td class='center'><{$table.notifications}></td>
<td class='xo-actions txtcenter width10'>
<a href="tables.php?op=edit&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_EDIT_TABLE}>">
- <img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._AM_TDMCREATE_EDIT_TABLE}>" height="16" />
+ <img src="<{$xoModuleIcons edit.png}>" alt="<{$smarty.const._AM_TDMCREATE_EDIT_TABLE}>" height="16" />
</a>
<a href="fields.php?op=edit&field_tid=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_EDIT_FIELDS}>">
- <img src="<{$tdmc_url}>/images/icons/16/editfields.png" alt="<{$smarty.const._AM_TDMCREATE_EDIT_FIELDS}>" height="16" />
+ <img src="<{$xoModuleIcons inserttable.png}>" alt="<{$smarty.const._AM_TDMCREATE_EDIT_FIELDS}>" height="16" />
</a>
<a href="tables.php?op=delete&table_id=<{$table.id}>" title="<{$smarty.const._DELETE}>">
- <img src="<{xoAdminIcons delete.png}>" alt="<{$smarty.const._DELETE}>" height="16" />
+ <img src="<{$xoModuleIcons delete.png}>" alt="<{$smarty.const._DELETE}>" height="16" />
</a>
</td>
</tr>
@@ -56,4 +56,6 @@
<!-- Display module form (add,edit) -->
<{if $form}>
<div class="spacer"><{$form}></div>
-<{/if}>
\ No newline at end of file
+<{/if}>
+<!-- Footer -->
+<{includeq file="db:tdmcreate_footer.html"}>
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_footer.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_footer.html 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_footer.html 2014-03-23 19:52:22 UTC (rev 12402)
@@ -1,3 +1,4 @@
+<br />
<div class='center'><a href='http://www.xoops.org' title='Visit XOOPS' target='_blank'>
<img src="<{xoModuleIcons32 xoopsmicrobutton.gif}>" alt='XOOPS' /></a></div>
<div class='center smallsmall italic pad5'>
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_help.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_help.html 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_help.html 2014-03-23 19:52:22 UTC (rev 12402)
@@ -1 +1 @@
- <script>history.go(-1);</script>
\ No newline at end of file
+<script>history.go(-1);</script>
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_index.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_index.html 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_index.html 2014-03-23 19:52:22 UTC (rev 12402)
@@ -1,4 +1,6 @@
<!-- Header -->
<{includeq file="db:tdmcreate_header.html"}>
<!-- Index Page -->
-<div class="top"><{$index}></div>
\ No newline at end of file
+<div class="top"><{$index}></div>
+<!-- Footer -->
+<{includeq file="db:tdmcreate_footer.html"}>
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_modules.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_modules.html 2014-03-22 12:36:09 UTC (rev 12401)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_modules.html 2014-03-23 19:52:22 UTC (rev 12402)
@@ -57,4 +57,6 @@
<div class="errorMsg">
<strong><{$error}></strong>
</div>
-<{/if}>
\ No newline at end of file
+<{/if}>
+<!-- Footer -->
+<{includeq file="db:tdmcreate_footer.html"}>
\ No newlin...
[truncated message content] |
|
From: <be...@us...> - 2014-03-22 12:36:15
|
Revision: 12401
http://sourceforge.net/p/xoops/svn/12401
Author: beckmi
Date: 2014-03-22 12:36:09 +0000 (Sat, 22 Mar 2014)
Log Message:
-----------
Updating to CKEdit 4.3.3
Modified Paths:
--------------
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/CHANGES.md
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/ckeditor.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/about/dialogs/about.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/link/dialogs/link.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/tabletools/dialogs/tableCell.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/kama/editor.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/kama/editor_ie.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/kama/editor_ie7.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/kama/editor_ie8.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/kama/editor_iequirks.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/kama/icons.png
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/kama/icons_hidpi.png
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/moono/editor.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/moono/editor_gecko.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/moono/editor_ie.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/moono/editor_ie7.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/moono/editor_ie8.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/moono/editor_iequirks.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/moono/icons.png
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/moono/icons_hidpi.png
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/CHANGES.md
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/CHANGES.md 2014-03-21 19:35:13 UTC (rev 12400)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/CHANGES.md 2014-03-22 12:36:09 UTC (rev 12401)
@@ -1,8 +1,36 @@
CKEditor 4 Changelog
====================
+## CKEditor 4.3.3
+
+Fixed Issues:
+
+* [#11500](http://dev.ckeditor.com/ticket/11500): [Webkit/Blink] Fixed: Selection lost when setting data in another inline editor. Additionally, [`selection.removeAllRanges()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-method-removeAllRanges) is now scoped to selection's [root](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-property-root).
+* [#11104](http://dev.ckeditor.com/ticket/11104): [IE] Fixed: Various issues with scrolling and selection when focusing widgets.
+* [#11487](http://dev.ckeditor.com/ticket/11487): Moving mouse over the [Enhanced Image](http://ckeditor.com/addon/image2) widget will no longer change the value returned by the [`editor.checkDirty()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-checkDirty) method.
+* [#8673](http://dev.ckeditor.com/ticket/8673): [WebKit] Fixed: Cannot select and remove the [Page Break](http://ckeditor.com/addon/pagebreak).
+* [#11413](http://dev.ckeditor.com/ticket/11413): Fixed: Incorrect [`editor.execCommand()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-execCommand) behavior.
+* [#11438](http://dev.ckeditor.com/ticket/11438): Splitting table cells vertically is no longer changing table structure.
+* [#8899](http://dev.ckeditor.com/ticket/8899): Fixed: Links in the [About CKEditor](http://ckeditor.com/addon/about) dialog window now open in a new browser window or tab.
+* [#11490](http://dev.ckeditor.com/ticket/11490): Fixed: [Menu button](http://ckeditor.com/addon/menubutton) panel not showing in the source mode.
+* [#11417](http://dev.ckeditor.com/ticket/11417): The [`widget.doubleclick`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-event-doubleclick) event is not canceled anymore after editing was triggered.
+* [#11253](http://dev.ckeditor.com/ticket/11253): [IE] Fixed: Clipped upload button in the [Enhanced Image](http://ckeditor.com/addon/image2) dialog window.
+* [#11359](http://dev.ckeditor.com/ticket/11359): Standardized the way anchors are discovered by the [Link](http://ckeditor.com/addon/link) plugin.
+* [#11058](http://dev.ckeditor.com/ticket/11058): [IE8] Fixed: Error when deleting a table row.
+* [#11508](http://dev.ckeditor.com/ticket/11508): Fixed: [`htmlDataProcessor`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlDataProcessor) discovering protected attributes within other attributes' values.
+* [#11533](http://dev.ckeditor.com/ticket/11533): Widgets: Avoid recurring upcasts if the DOM structure was modified during an upcast.
+* [#11400](http://dev.ckeditor.com/ticket/11400): Fixed: The [`domObject.removeAllListeners()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.domObject-method-removeAllListeners) method does not remove custom listeners completely.
+* [#11493](http://dev.ckeditor.com/ticket/11493): Fixed: The [`selection.getRanges()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-method-getRanges) method does not override cached ranges when used with the `onlyEditables` argument.
+* [#11390](http://dev.ckeditor.com/ticket/11390): [IE] All [XML](http://ckeditor.com/addon/xml) plugin [methods](http://docs.ckeditor.com/#!/api/CKEDITOR.xml) now work in IE10+.
+* [#11542](http://dev.ckeditor.com/ticket/11542): [IE11] Fixed: Blurry toolbar icons when Right-to-Left UI language is set.
+* [#11504](http://dev.ckeditor.com/ticket/11504): Fixed: When [`config.fullPage`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-fullPage) is set to `true`, entities are not encoded in editor output.
+* [#11004](http://dev.ckeditor.com/ticket/11004): Integrated [Enhanced Image](http://ckeditor.com/addon/image2) dialog window with [Advanced Content Filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter).
+* [#11439](http://dev.ckeditor.com/ticket/11439): Fixed: Properties get cloned in the Cell Properties dialog window if multiple cells are selected.
+
## CKEditor 4.3.2
+Fixed Issues:
+
* [#11331](http://dev.ckeditor.com/ticket/11331): A menu button will have a changed label when selected instead of using the `aria-pressed` attribute.
* [#11177](http://dev.ckeditor.com/ticket/11177): Widget drag handler improvements:
* [#11176](http://dev.ckeditor.com/ticket/11176): Fixed: Initial position is not updated when the widget data object is empty.
@@ -14,7 +42,7 @@
* [#11102](http://dev.ckeditor.com/ticket/11102): Added newline character support.
* [#11216](http://dev.ckeditor.com/ticket/11216): Added "\\'" substring support.
* [#11121](http://dev.ckeditor.com/ticket/11121): [Firefox] Fixed: High Contrast mode is enabled when the editor is loaded in a hidden iframe.
-* [#11350](http://dev.ckeditor.com/ticket/11350): The default value of [`config.contentsCss`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-contentsCss) is affected by [`CKEDITOR.getUrl`](http://docs.ckeditor.com/#!/api/CKEDITOR-method-getUrl).
+* [#11350](http://dev.ckeditor.com/ticket/11350): The default value of [`config.contentsCss`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-contentsCss) is affected by [`CKEDITOR.getUrl()`](http://docs.ckeditor.com/#!/api/CKEDITOR-method-getUrl).
* [#11097](http://dev.ckeditor.com/ticket/11097): Improved the [Autogrow](http://ckeditor.com/addon/autogrow) plugin performance when dealing with very big tables.
* [#11290](http://dev.ckeditor.com/ticket/11290): Removed redundant code in the [Source Dialog](http://ckeditor.com/addon/sourcedialog) plugin.
* [#11133](http://dev.ckeditor.com/ticket/11133): [Page Break](http://ckeditor.com/addon/pagebreak) becomes editable if pasted.
@@ -24,7 +52,7 @@
* [#10778](http://dev.ckeditor.com/ticket/10778): Fixed a bug with range enlargement. The range no longer expands to visible whitespace.
* [#11146](http://dev.ckeditor.com/ticket/11146): [IE] Fixed: Preview window switches Internet Explorer to Quirks Mode.
* [#10762](http://dev.ckeditor.com/ticket/10762): [IE] Fixed: JavaScript code displayed in preview window's URL bar.
-* [#11186](http://dev.ckeditor.com/ticket/11186): Introduced the [`widgets.repository.addUpcastCallback`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-addUpcastCallback) method that allows to block upcasting given element to a widget.
+* [#11186](http://dev.ckeditor.com/ticket/11186): Introduced the [`widgets.repository.addUpcastCallback()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-addUpcastCallback) method that allows to block upcasting given element to a widget.
* [#11307](http://dev.ckeditor.com/ticket/11307): Fixed: Paste as Plain Text conflict with the [MooTools](http://mootools.net) library.
* [#11140](http://dev.ckeditor.com/ticket/11140): [IE11] Fixed: Anchors are not draggable.
* [#11379](http://dev.ckeditor.com/ticket/11379): Changed default contents `line-height` to unitless values to avoid huge text overlapping (like in [#9696](http://dev.ckeditor.com/ticket/9696)).
@@ -138,15 +166,15 @@
* [Widget plugin](http://ckeditor.com/addon/widget) introducing the [Widget API](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget).
* New [`editor.enterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-enterMode) and [`editor.shiftEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-shiftEnterMode) properties – normalized versions of [`config.enterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-enterMode) and [`config.shiftEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-shiftEnterMode).
* Dynamic editor settings. Starting from CKEditor 4.3 Beta, *Enter* mode values and [content filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) instances may be changed dynamically (for example when the caret was placed in an element in which editor features should be adjusted). When you are implementing a new editor feature, you should base its behavior on [dynamic](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeEnterMode) or [static](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-enterMode) *Enter* mode values depending on whether this feature works in selection context or globally on editor content.
- * Dynamic *Enter* mode values – [`editor.setActiveEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setActiveEnterMode) method, [`editor.activeEnterModeChange`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-activeEnterModeChange) event, and two properties: [`editor.activeEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeEnterMode) and [`editor.activeShiftEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeShiftEnterMode).
- * Dynamic content filter instances – [`editor.setActiveFilter`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setActiveFilter) method, [`editor.activeFilterChange`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-activeFilterChange) event, and [`editor.activeFilter`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeFilter) property.
- * "Fake" selection was introduced. It makes it possible to virtually select any element when the real selection remains hidden. See the [`selection.fake`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-method-fake) method.
- * Default [`htmlParser.filter`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.filter) rules are not applied to non-editable elements (elements with `contenteditable` attribute set to `false` and their descendants) anymore. To add a rule which will be applied to all elements you need to pass an additional argument to the [`filter.addRules`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.filter-method-addRules) method.
+ * Dynamic *Enter* mode values – [`editor.setActiveEnterMode()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setActiveEnterMode) method, [`editor.activeEnterModeChange`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-activeEnterModeChange) event, and two properties: [`editor.activeEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeEnterMode) and [`editor.activeShiftEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeShiftEnterMode).
+ * Dynamic content filter instances – [`editor.setActiveFilter()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setActiveFilter) method, [`editor.activeFilterChange`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-activeFilterChange) event, and [`editor.activeFilter`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeFilter) property.
+ * "Fake" selection was introduced. It makes it possible to virtually select any element when the real selection remains hidden. See the [`selection.fake()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-method-fake) method.
+ * Default [`htmlParser.filter`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.filter) rules are not applied to non-editable elements (elements with `contenteditable` attribute set to `false` and their descendants) anymore. To add a rule which will be applied to all elements you need to pass an additional argument to the [`filter.addRules()`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.filter-method-addRules) method.
* Dozens of new methods were introduced – most interesting ones:
- * [`document.find`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.document-method-find),
- * [`document.findOne`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.document-method-findOne),
- * [`editable.insertElementIntoRange`](http://docs.ckeditor.com/#!/api/CKEDITOR.editable-method-insertElementIntoRange),
- * [`range.moveToClosestEditablePosition`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.range-method-moveToClosestEditablePosition),
+ * [`document.find()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.document-method-find),
+ * [`document.findOne()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.document-method-findOne),
+ * [`editable.insertElementIntoRange()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editable-method-insertElementIntoRange),
+ * [`range.moveToClosestEditablePosition()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.range-method-moveToClosestEditablePosition),
* New methods for [`htmlParser.node`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.node) and [`htmlParser.element`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.element).
* [#10659](http://dev.ckeditor.com/ticket/10659): New [Enhanced Image](http://ckeditor.com/addon/image2) plugin that introduces a widget with integrated image captions, an option to center images, and dynamic "click and drag" resizing.
* [#10664](http://dev.ckeditor.com/ticket/10664): New [Mathematical Formulas](http://ckeditor.com/addon/mathjax) plugin that introduces the MathJax widget.
@@ -171,13 +199,13 @@
* [#10308](http://dev.ckeditor.com/ticket/10308): [IE10] Fixed: Unspecified error when deleting a row.
* [#10945](http://dev.ckeditor.com/ticket/10945): [Chrome] Fixed: Clicking with a mouse inside the editor does not show the caret.
* [#10912](http://dev.ckeditor.com/ticket/10912): Prevent default action when content of a non-editable link is clicked.
-* [#10913](http://dev.ckeditor.com/ticket/10913): Fixed [`CKEDITOR.plugins.addExternal`](http://docs.ckeditor.com/#!/api/CKEDITOR.resourceManager-method-addExternal) not handling paths including file name specified.
-* [#10666](http://dev.ckeditor.com/ticket/10666): Fixed [`CKEDITOR.tools.isArray`](http://docs.ckeditor.com/#!/api/CKEDITOR.tools-method-isArray) not working cross frame.
+* [#10913](http://dev.ckeditor.com/ticket/10913): Fixed [`CKEDITOR.plugins.addExternal()`](http://docs.ckeditor.com/#!/api/CKEDITOR.resourceManager-method-addExternal) not handling paths including file name specified.
+* [#10666](http://dev.ckeditor.com/ticket/10666): Fixed [`CKEDITOR.tools.isArray()`](http://docs.ckeditor.com/#!/api/CKEDITOR.tools-method-isArray) not working cross frame.
* [#10910](http://dev.ckeditor.com/ticket/10910): [IE9] Fixed JavaScript error thrown in Compatibility Mode when clicking and/or typing in the editing area.
* [#10868](http://dev.ckeditor.com/ticket/10868): [IE8] Prevent the browser from crashing when applying the Inline Quotation style.
* [#10915](http://dev.ckeditor.com/ticket/10915): Fixed: Invalid CSS filter in the Kama skin.
* [#10914](http://dev.ckeditor.com/ticket/10914): Plugins [Indent List](http://ckeditor.com/addon/indentlist) and [Indent Block](http://ckeditor.com/addon/indentblock) are now included in the build configuration.
-* [#10812](http://dev.ckeditor.com/ticket/10812): Fixed [`range#createBookmark2`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.range-method-createBookmark2) incorrectly normalizing offsets. This bug was causing many issues: [#10850](http://dev.ckeditor.com/ticket/10850), [#10842](http://dev.ckeditor.com/ticket/10842).
+* [#10812](http://dev.ckeditor.com/ticket/10812): Fixed [`range.createBookmark2()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.range-method-createBookmark2) incorrectly normalizing offsets. This bug was causing many issues: [#10850](http://dev.ckeditor.com/ticket/10850), [#10842](http://dev.ckeditor.com/ticket/10842).
* [#10951](http://dev.ckeditor.com/ticket/10951): Reviewed and optimized focus handling on panels (combo, menu buttons, color buttons, and context menu) to enhance accessibility. Fixed [#10705](http://dev.ckeditor.com/ticket/10705), [#10706](http://dev.ckeditor.com/ticket/10706) and [#10707](http://dev.ckeditor.com/ticket/10707).
* [#10704](http://dev.ckeditor.com/ticket/10704): Fixed a JAWS issue with the Select Color dialog window title not being announced.
* [#10753](http://dev.ckeditor.com/ticket/10753): The floating toolbar in inline instances now has a dedicated accessibility label.
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/ckeditor.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/ckeditor.js 2014-03-21 19:35:13 UTC (rev 12400)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/ckeditor.js 2014-03-22 12:36:09 UTC (rev 12401)
@@ -2,82 +2,82 @@
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
-(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a={timestamp:"E0LB",version:"4.3.2",revision:"ba625e6",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var d=document.getElementsByTagName("script"),a=0;a<d.length;a++){var e=d[a].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(e){b=e[1];break}}-1==b.indexOf(":/")&&"//"!=b.slice(0,2)&&(b=0===b.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+
+(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a={timestamp:"E1PE",version:"4.3.3",revision:"7841b02",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var e=document.getElementsByTagName("script"),a=0;a<e.length;a++){var d=e[a].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(d){b=d[1];break}}-1==b.indexOf(":/")&&"//"!=b.slice(0,2)&&(b=0===b.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+
b:location.href.match(/^[^\?]*\/(?:)/)[0]+b);if(!b)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return b}(),getUrl:function(b){-1==b.indexOf(":/")&&0!==b.indexOf("/")&&(b=this.basePath+b);this.timestamp&&("/"!=b.charAt(b.length-1)&&!/[&?]t=/.test(b))&&(b+=(0<=b.indexOf("?")?"&":"?")+"t="+this.timestamp);return b},domReady:function(){function b(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",
-b,!1),d()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",b),d())}catch(a){}}function d(){for(var d;d=a.shift();)d()}var a=[];return function(d){a.push(d);"complete"===document.readyState&&setTimeout(b,1);if(1==a.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",b,!1),window.addEventListener("load",b,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",b);window.attachEvent("onload",b);d=!1;try{d=
-!window.frameElement}catch(e){}if(document.documentElement.doScroll&&d){var j=function(){try{document.documentElement.doScroll("left")}catch(d){setTimeout(j,1);return}b()};j()}}}}()},e=window.CKEDITOR_GETURL;if(e){var b=a.getUrl;a.getUrl=function(c){return e.call(a,c)||b.call(a,c)}}return a}());
-CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(a){var e=CKEDITOR.event.prototype,b;for(b in e)a[b]==void 0&&(a[b]=e[b])},CKEDITOR.event.prototype=function(){function a(a){var d=e(this);return d[a]||(d[a]=new b(a))}var e=function(b){b=b.getPrivate&&b.getPrivate()||b._||(b._={});return b.events||(b.events={})},b=function(b){this.name=b;this.listeners=[]};b.prototype={getListenerIndex:function(b){for(var d=0,a=this.listeners;d<a.length;d++)if(a[d].fn==b)return d;return-1}};
-return{define:function(b,d){var g=a.call(this,b);CKEDITOR.tools.extend(g,d,true)},on:function(b,d,g,e,m){function j(a,f,n,r){a={name:b,sender:this,editor:a,data:f,listenerData:e,stop:n,cancel:r,removeListener:i};return d.call(g,a)===false?false:a.data}function i(){r.removeListener(b,d)}var n=a.call(this,b);if(n.getListenerIndex(d)<0){n=n.listeners;g||(g=this);isNaN(m)&&(m=10);var r=this;j.fn=d;j.priority=m;for(var o=n.length-1;o>=0;o--)if(n[o].priority<=m){n.splice(o+1,0,j);return{removeListener:i}}n.unshift(j)}return{removeListener:i}},
-once:function(){var b=arguments[1];arguments[1]=function(d){d.removeListener();return b.apply(this,arguments)};return this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var b=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return b},fire:function(){var b=0,d=function(){b=1},a=0,h=function(){a=1};return function(m,j,i){var n=e(this)[m],m=b,r=a;b=a=0;if(n){var o=n.listeners;if(o.length)for(var o=o.slice(0),u,f=0;f<o.length;f++){if(n.errorProof)try{u=o[f].call(this,
-i,j,d,h)}catch(s){}else u=o[f].call(this,i,j,d,h);u===false?a=1:typeof u!="undefined"&&(j=u);if(b||a)break}}j=a?false:typeof j=="undefined"?true:j;b=m;a=r;return j}}(),fireOnce:function(b,d,a){d=this.fire(b,d,a);delete e(this)[b];return d},removeListener:function(b,d){var a=e(this)[b];if(a){var h=a.getListenerIndex(d);h>=0&&a.listeners.splice(h,1)}},removeAllListeners:function(){var b=e(this),d;for(d in b)delete b[d]},hasListeners:function(b){return(b=e(this)[b])&&b.listeners.length>0}}}());
-CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fire.call(this,a,e,this)},CKEDITOR.editor.prototype.fireOnce=function(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fireOnce.call(this,a,e,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype));
-CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),e=window.opera,b={ie:a.indexOf("trident/")>-1,opera:!!e&&e.version,webkit:a.indexOf(" applewebkit/")>-1,air:a.indexOf(" adobeair/")>-1,mac:a.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat"&&(!document.documentMode||document.documentMode<10),mobile:a.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return false;var d=document.domain,b=window.location.hostname;return d!=
-b&&d!="["+b+"]"},secure:location.protocol=="https:"};b.gecko=navigator.product=="Gecko"&&!b.webkit&&!b.opera&&!b.ie;if(b.webkit)a.indexOf("chrome")>-1?b.chrome=true:b.safari=true;var c=0;if(b.ie){c=b.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode;b.ie9Compat=c==9;b.ie8Compat=c==8;b.ie7Compat=c==7;b.ie6Compat=c<7||b.quirks}if(b.gecko){var d=a.match(/rv:([\d\.]+)/);if(d){d=d[1].split(".");c=d[0]*1E4+(d[1]||0)*100+(d[2]||0)*1}}b.opera&&(c=parseFloat(e.version()));
+b,!1),e()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",b),e())}catch(a){}}function e(){for(var e;e=a.shift();)e()}var a=[];return function(e){a.push(e);"complete"===document.readyState&&setTimeout(b,1);if(1==a.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",b,!1),window.addEventListener("load",b,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",b);window.attachEvent("onload",b);e=!1;try{e=
+!window.frameElement}catch(d){}if(document.documentElement.doScroll&&e){var j=function(){try{document.documentElement.doScroll("left")}catch(e){setTimeout(j,1);return}b()};j()}}}}()},d=window.CKEDITOR_GETURL;if(d){var b=a.getUrl;a.getUrl=function(c){return d.call(a,c)||b.call(a,c)}}return a}());
+CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(a){var d=CKEDITOR.event.prototype,b;for(b in d)a[b]==void 0&&(a[b]=d[b])},CKEDITOR.event.prototype=function(){function a(a){var e=d(this);return e[a]||(e[a]=new b(a))}var d=function(b){b=b.getPrivate&&b.getPrivate()||b._||(b._={});return b.events||(b.events={})},b=function(b){this.name=b;this.listeners=[]};b.prototype={getListenerIndex:function(b){for(var e=0,a=this.listeners;e<a.length;e++)if(a[e].fn==b)return e;return-1}};
+return{define:function(b,e){var g=a.call(this,b);CKEDITOR.tools.extend(g,e,true)},on:function(b,e,g,d,m){function j(a,f,n,s){a={name:b,sender:this,editor:a,data:f,listenerData:d,stop:n,cancel:s,removeListener:i};return e.call(g,a)===false?false:a.data}function i(){s.removeListener(b,e)}var n=a.call(this,b);if(n.getListenerIndex(e)<0){n=n.listeners;g||(g=this);isNaN(m)&&(m=10);var s=this;j.fn=e;j.priority=m;for(var r=n.length-1;r>=0;r--)if(n[r].priority<=m){n.splice(r+1,0,j);return{removeListener:i}}n.unshift(j)}return{removeListener:i}},
+once:function(){var b=arguments[1];arguments[1]=function(e){e.removeListener();return b.apply(this,arguments)};return this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var b=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return b},fire:function(){var b=0,e=function(){b=1},a=0,h=function(){a=1};return function(m,j,i){var n=d(this)[m],m=b,s=a;b=a=0;if(n){var r=n.listeners;if(r.length)for(var r=r.slice(0),v,f=0;f<r.length;f++){if(n.errorProof)try{v=r[f].call(this,
+i,j,e,h)}catch(q){}else v=r[f].call(this,i,j,e,h);v===false?a=1:typeof v!="undefined"&&(j=v);if(b||a)break}}j=a?false:typeof j=="undefined"?true:j;b=m;a=s;return j}}(),fireOnce:function(b,e,a){e=this.fire(b,e,a);delete d(this)[b];return e},removeListener:function(b,e){var a=d(this)[b];if(a){var h=a.getListenerIndex(e);h>=0&&a.listeners.splice(h,1)}},removeAllListeners:function(){var b=d(this),e;for(e in b)delete b[e]},hasListeners:function(b){return(b=d(this)[b])&&b.listeners.length>0}}}());
+CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,d){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fire.call(this,a,d,this)},CKEDITOR.editor.prototype.fireOnce=function(a,d){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fireOnce.call(this,a,d,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype));
+CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),d=window.opera,b={ie:a.indexOf("trident/")>-1,opera:!!d&&d.version,webkit:a.indexOf(" applewebkit/")>-1,air:a.indexOf(" adobeair/")>-1,mac:a.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat"&&(!document.documentMode||document.documentMode<10),mobile:a.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return false;var e=document.domain,b=window.location.hostname;return e!=
+b&&e!="["+b+"]"},secure:location.protocol=="https:"};b.gecko=navigator.product=="Gecko"&&!b.webkit&&!b.opera&&!b.ie;if(b.webkit)a.indexOf("chrome")>-1?b.chrome=true:b.safari=true;var c=0;if(b.ie){c=b.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode;b.ie9Compat=c==9;b.ie8Compat=c==8;b.ie7Compat=c==7;b.ie6Compat=c<7||b.quirks}if(b.gecko){var e=a.match(/rv:([\d\.]+)/);if(e){e=e[1].split(".");c=e[0]*1E4+(e[1]||0)*100+(e[2]||0)*1}}b.opera&&(c=parseFloat(d.version()));
b.air&&(c=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));b.webkit&&(c=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));b.version=c;b.isCompatible=b.iOS&&c>=534||!b.mobile&&(b.ie&&c>6||b.gecko&&c>=10801||b.opera&&c>=9.5||b.air&&c>=1||b.webkit&&c>=522||false);b.hidpi=window.devicePixelRatio>=2;b.needsBrFiller=b.gecko||b.webkit||b.ie&&c>10;b.needsNbspFiller=b.ie&&c<11;b.cssClass="cke_browser_"+(b.ie?"ie":b.gecko?"gecko":b.opera?"opera":b.webkit?"webkit":"unknown");if(b.quirks)b.cssClass=b.cssClass+" cke_browser_quirks";
if(b.ie){b.cssClass=b.cssClass+(" cke_browser_ie"+(b.quirks||b.version<7?"6":b.version));if(b.quirks)b.cssClass=b.cssClass+" cke_browser_iequirks"}if(b.gecko)if(c<10900)b.cssClass=b.cssClass+" cke_browser_gecko18";else if(c<=11E3)b.cssClass=b.cssClass+" cke_browser_gecko19";if(b.air)b.cssClass=b.cssClass+" cke_browser_air";if(b.iOS)b.cssClass=b.cssClass+" cke_browser_ios";if(b.hidpi)b.cssClass=b.cssClass+" cke_hidpi";return b}());
"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if(CKEDITOR.status!="basic_ready")CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a=
-CKEDITOR.loadFullCore,e=CKEDITOR.loadFullCoreTimeout;if(a){CKEDITOR.status="basic_ready";a&&a._load?a():e&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},e*1E3)}})})();CKEDITOR.status="basic_loaded"}();CKEDITOR.dom={};
-(function(){var a=[],e=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.opera?"-o-":CKEDITOR.env.ie?"-ms-":"";CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(b,a){if(!b&&!a)return true;if(!b||!a||b.length!=a.length)return false;for(var d=0;d<b.length;d++)if(b[d]!=a[d])return false;return true},clone:function(b){var a;if(b&&b instanceof Array){a=[];for(var d=0;d<b.length;d++)a[d]=CKEDITOR.tools.clone(b[d]);return a}if(b===null||typeof b!="object"||
-b instanceof String||b instanceof Number||b instanceof Boolean||b instanceof Date||b instanceof RegExp)return b;a=new b.constructor;for(d in b)a[d]=CKEDITOR.tools.clone(b[d]);return a},capitalize:function(b,a){return b.charAt(0).toUpperCase()+(a?b.slice(1):b.slice(1).toLowerCase())},extend:function(b){var a=arguments.length,d,g;if(typeof(d=arguments[a-1])=="boolean")a--;else if(typeof(d=arguments[a-2])=="boolean"){g=arguments[a-1];a=a-2}for(var e=1;e<a;e++){var m=arguments[e],j;for(j in m)if(d===
-true||b[j]==void 0)if(!g||j in g)b[j]=m[j]}return b},prototypedCopy:function(b){var a=function(){};a.prototype=b;return new a},copy:function(b){var a={},d;for(d in b)a[d]=b[d];return a},isArray:function(b){return Object.prototype.toString.call(b)=="[object Array]"},isEmpty:function(b){for(var a in b)if(b.hasOwnProperty(a))return false;return true},cssVendorPrefix:function(b,a,d){if(d)return e+b+":"+a+";"+b+":"+a;d={};d[b]=a;d[e+b]=a;return d},cssStyleToDomStyle:function(){var b=document.createElement("div").style,
-a=typeof b.cssFloat!="undefined"?"cssFloat":typeof b.styleFloat!="undefined"?"styleFloat":"float";return function(d){return d=="float"?a:d.replace(/-./g,function(d){return d.substr(1).toUpperCase()})}}(),buildStyleHtml:function(b){for(var b=[].concat(b),a,d=[],g=0;g<b.length;g++)if(a=b[g])/@import|[{}]/.test(a)?d.push("<style>"+a+"</style>"):d.push('<link type="text/css" rel=stylesheet href="'+a+'">');return d.join("")},htmlEncode:function(b){return(""+b).replace(/&/g,"&").replace(/>/g,">").replace(/</g,
-"<")},htmlEncodeAttr:function(b){return b.replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},htmlDecodeAttr:function(b){return b.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")},getNextNumber:function(){var b=0;return function(){return++b}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(b,a){var d=a(b);d.prototype=b.prototype;return d},setTimeout:function(b,a,d,g,e){e||(e=window);d||(d=e);return e.setTimeout(function(){g?b.apply(d,[].concat(g)):
-b.apply(d)},a||0)},trim:function(){var b=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(a){return a.replace(b,"")}}(),ltrim:function(){var b=/^[ \t\n\r]+/g;return function(a){return a.replace(b,"")}}(),rtrim:function(){var b=/[ \t\n\r]+$/g;return function(a){return a.replace(b,"")}}(),indexOf:function(b,a){if(typeof a=="function")for(var d=0,g=b.length;d<g;d++){if(a(b[d]))return d}else{if(b.indexOf)return b.indexOf(a);d=0;for(g=b.length;d<g;d++)if(b[d]===a)return d}return-1},search:function(b,
-a){var d=CKEDITOR.tools.indexOf(b,a);return d>=0?b[d]:null},bind:function(b,a){return function(){return b.apply(a,arguments)}},createClass:function(b){var a=b.$,d=b.base,g=b.privates||b._,e=b.proto,b=b.statics;!a&&(a=function(){d&&this.base.apply(this,arguments)});if(g)var m=a,a=function(){var d=this._||(this._={}),a;for(a in g){var b=g[a];d[a]=typeof b=="function"?CKEDITOR.tools.bind(b,this):b}m.apply(this,arguments)};if(d){a.prototype=this.prototypedCopy(d.prototype);a.prototype.constructor=a;a.base=
-d;a.baseProto=d.prototype;a.prototype.base=function(){this.base=d.prototype.base;d.apply(this,arguments);this.base=arguments.callee}}e&&this.extend(a.prototype,e,true);b&&this.extend(a,b,true);return a},addFunction:function(b,c){return a.push(function(){return b.apply(c||this,arguments)})-1},removeFunction:function(b){a[b]=null},callFunction:function(b){var c=a[b];return c&&c.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,c;return function(d){c=
-CKEDITOR.tools.trim(d+"")+"px";return a.test(c)?c:d||""}}(),convertToPx:function(){var a;return function(c){if(!a){a=CKEDITOR.dom.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"></div>',CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(c)){a.setStyle("width",c);return a.$.clientWidth}return c}}(),repeat:function(a,c){return Array(c+1).join(a)},tryThese:function(){for(var a,c=0,d=arguments.length;c<d;c++){var g=
-arguments[c];try{a=g();break}catch(e){}}return a},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(a){return function(){var c=arguments,d=this;window.setTimeout(function(){a.apply(d,c)},0)}},normalizeCssText:function(a,c){var d=[],g,e=CKEDITOR.tools.parseCssText(a,true,c);for(g in e)d.push(g+":"+e[g]);d.sort();return d.length?d.join(";")+";":""},convertRgbToHex:function(a){return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(a,d,b,e){a=
-[d,b,e];for(d=0;d<3;d++)a[d]=("0"+parseInt(a[d],10).toString(16)).slice(-2);return"#"+a.join("")})},parseCssText:function(a,c,d){var g={};if(d){d=new CKEDITOR.dom.element("span");d.setAttribute("style",a);a=CKEDITOR.tools.convertRgbToHex(d.getAttribute("style")||"")}if(!a||a==";")return g;a.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,d,b){if(c){d=d.toLowerCase();d=="font-family"&&(b=b.toLowerCase().replace(/["']/g,"").replace(/\s*,\s*/g,","));b=CKEDITOR.tools.trim(b)}g[d]=
-b});return g},writeCssText:function(a,c){var d,g=[];for(d in a)g.push(d+":"+a[d]);c&&g.sort();return g.join("; ")},objectCompare:function(a,c,d){var g;if(!a&&!c)return true;if(!a||!c)return false;for(g in a)if(a[g]!=c[g])return false;if(!d)for(g in c)if(a[g]!=c[g])return false;return true},objectKeys:function(a){var c=[],d;for(d in a)c.push(d);return c},convertArrayToObject:function(a,c){var d={};arguments.length==1&&(c=true);for(var g=0,e=a.length;g<e;++g)d[a[g]]=c;return d},fixDomain:function(){for(var a;;)try{a=
-window.parent.document.domain;break}catch(c){a=a?a.replace(/.+?(?:\.|$)/,""):document.domain;if(!a)break;document.domain=a}return!!a},eventsBuffer:function(a,c){function d(){e=(new Date).getTime();g=false;c()}var g,e=0;return{input:function(){if(!g){var c=(new Date).getTime()-e;c<a?g=setTimeout(d,a-c):d()}},reset:function(){g&&clearTimeout(g);g=e=0}}},enableHtml5Elements:function(a,c){for(var d=["abbr","article","aside","audio","bdi","canvas","data","datalist","details","figcaption","figure","footer",
-"header","hgroup","mark","meter","nav","output","progress","section","summary","time","video"],g=d.length,e;g--;){e=a.createElement(d[g]);c&&a.appendChild(e)}}}})();
-CKEDITOR.dtd=function(){var a=CKEDITOR.tools.extend,e=function(a,d){for(var b=CKEDITOR.tools.clone(a),g=1;g<arguments.length;g++){var d=arguments[g],c;for(c in d)delete b[c]}return b},b={},c={},d={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},g={command:1,link:1,meta:1,noscript:1,script:1,style:1},h={},m={"#":1},j={center:1,dir:1,noframes:1};
-a(b,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},m,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(c,d,b,j);e={a:e(b,{a:1,button:1}),abbr:b,address:c,
-area:h,article:a({style:1},c),aside:a({style:1},c),audio:a({source:1,track:1},c),b:b,base:h,bdi:b,bdo:b,blockquote:c,body:c,br:h,button:e(b,{a:1,button:1}),canvas:b,caption:c,cite:b,code:b,col:h,colgroup:{col:1},command:h,datalist:a({option:1},b),dd:c,del:b,details:a({summary:1},c),dfn:b,div:a({style:1},c),dl:{dt:1,dd:1},dt:c,em:b,embed:h,fieldset:a({legend:1},c),figcaption:c,figure:a({figcaption:1},c),footer:c,form:c,h1:b,h2:b,h3:b,h4:b,h5:b,h6:b,head:a({title:1,base:1},g),header:c,hgroup:{h1:1,
-h2:1,h3:1,h4:1,h5:1,h6:1},hr:h,html:a({head:1,body:1},c,g),i:b,iframe:m,img:h,input:h,ins:b,kbd:b,keygen:h,label:b,legend:b,li:c,link:h,map:c,mark:b,menu:a({li:1},c),meta:h,meter:e(b,{meter:1}),nav:c,noscript:a({link:1,meta:1,style:1},b),object:a({param:1},b),ol:{li:1},optgroup:{option:1},option:m,output:b,p:b,param:h,pre:b,progress:e(b,{progress:1}),q:b,rp:b,rt:b,ruby:a({rp:1,rt:1},b),s:b,samp:b,script:m,section:a({style:1},c),select:{optgroup:1,option:1},small:b,source:h,span:b,strong:b,style:m,
-sub:b,summary:b,sup:b,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:c,textarea:m,tfoot:{tr:1},th:c,thead:{tr:1},time:e(b,{time:1}),title:m,tr:{th:1,td:1},track:h,u:b,ul:{li:1},"var":b,video:a({source:1,track:1},c),wbr:h,acronym:b,applet:a({param:1},c),basefont:h,big:b,center:c,dialog:h,dir:{li:1},font:b,isindex:h,noframes:c,strike:b,tt:b};a(e,{$block:a({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},d,j),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,
+CKEDITOR.loadFullCore,d=CKEDITOR.loadFullCoreTimeout;if(a){CKEDITOR.status="basic_ready";a&&a._load?a():d&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},d*1E3)}})})();CKEDITOR.status="basic_loaded"}();CKEDITOR.dom={};
+(function(){var a=[],d=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.opera?"-o-":CKEDITOR.env.ie?"-ms-":"";CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(b,a){if(!b&&!a)return true;if(!b||!a||b.length!=a.length)return false;for(var e=0;e<b.length;e++)if(b[e]!=a[e])return false;return true},clone:function(b){var a;if(b&&b instanceof Array){a=[];for(var e=0;e<b.length;e++)a[e]=CKEDITOR.tools.clone(b[e]);return a}if(b===null||typeof b!="object"||
+b instanceof String||b instanceof Number||b instanceof Boolean||b instanceof Date||b instanceof RegExp)return b;a=new b.constructor;for(e in b)a[e]=CKEDITOR.tools.clone(b[e]);return a},capitalize:function(b,a){return b.charAt(0).toUpperCase()+(a?b.slice(1):b.slice(1).toLowerCase())},extend:function(b){var a=arguments.length,e,g;if(typeof(e=arguments[a-1])=="boolean")a--;else if(typeof(e=arguments[a-2])=="boolean"){g=arguments[a-1];a=a-2}for(var d=1;d<a;d++){var m=arguments[d],j;for(j in m)if(e===
+true||b[j]==void 0)if(!g||j in g)b[j]=m[j]}return b},prototypedCopy:function(b){var a=function(){};a.prototype=b;return new a},copy:function(b){var a={},e;for(e in b)a[e]=b[e];return a},isArray:function(b){return Object.prototype.toString.call(b)=="[object Array]"},isEmpty:function(b){for(var a in b)if(b.hasOwnProperty(a))return false;return true},cssVendorPrefix:function(b,a,e){if(e)return d+b+":"+a+";"+b+":"+a;e={};e[b]=a;e[d+b]=a;return e},cssStyleToDomStyle:function(){var b=document.createElement("div").style,
+a=typeof b.cssFloat!="undefined"?"cssFloat":typeof b.styleFloat!="undefined"?"styleFloat":"float";return function(e){return e=="float"?a:e.replace(/-./g,function(e){return e.substr(1).toUpperCase()})}}(),buildStyleHtml:function(b){for(var b=[].concat(b),a,e=[],g=0;g<b.length;g++)if(a=b[g])/@import|[{}]/.test(a)?e.push("<style>"+a+"</style>"):e.push('<link type="text/css" rel=stylesheet href="'+a+'">');return e.join("")},htmlEncode:function(b){return(""+b).replace(/&/g,"&").replace(/>/g,">").replace(/</g,
+"<")},htmlEncodeAttr:function(b){return b.replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},htmlDecodeAttr:function(b){return b.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")},getNextNumber:function(){var b=0;return function(){return++b}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(b,a){var e=a(b);e.prototype=b.prototype;return e},setTimeout:function(b,a,e,g,d){d||(d=window);e||(e=d);return d.setTimeout(function(){g?b.apply(e,[].concat(g)):
+b.apply(e)},a||0)},trim:function(){var b=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(a){return a.replace(b,"")}}(),ltrim:function(){var b=/^[ \t\n\r]+/g;return function(a){return a.replace(b,"")}}(),rtrim:function(){var b=/[ \t\n\r]+$/g;return function(a){return a.replace(b,"")}}(),indexOf:function(b,a){if(typeof a=="function")for(var e=0,g=b.length;e<g;e++){if(a(b[e]))return e}else{if(b.indexOf)return b.indexOf(a);e=0;for(g=b.length;e<g;e++)if(b[e]===a)return e}return-1},search:function(b,
+a){var e=CKEDITOR.tools.indexOf(b,a);return e>=0?b[e]:null},bind:function(b,a){return function(){return b.apply(a,arguments)}},createClass:function(b){var a=b.$,e=b.base,g=b.privates||b._,d=b.proto,b=b.statics;!a&&(a=function(){e&&this.base.apply(this,arguments)});if(g)var m=a,a=function(){var e=this._||(this._={}),a;for(a in g){var b=g[a];e[a]=typeof b=="function"?CKEDITOR.tools.bind(b,this):b}m.apply(this,arguments)};if(e){a.prototype=this.prototypedCopy(e.prototype);a.prototype.constructor=a;a.base=
+e;a.baseProto=e.prototype;a.prototype.base=function(){this.base=e.prototype.base;e.apply(this,arguments);this.base=arguments.callee}}d&&this.extend(a.prototype,d,true);b&&this.extend(a,b,true);return a},addFunction:function(b,c){return a.push(function(){return b.apply(c||this,arguments)})-1},removeFunction:function(b){a[b]=null},callFunction:function(b){var c=a[b];return c&&c.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,c;return function(e){c=
+CKEDITOR.tools.trim(e+"")+"px";return a.test(c)?c:e||""}}(),convertToPx:function(){var a;return function(c){if(!a){a=CKEDITOR.dom.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"></div>',CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(c)){a.setStyle("width",c);return a.$.clientWidth}return c}}(),repeat:function(a,c){return Array(c+1).join(a)},tryThese:function(){for(var a,c=0,e=arguments.length;c<e;c++){var g=
+arguments[c];try{a=g();break}catch(d){}}return a},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(a){return function(){var c=arguments,e=this;window.setTimeout(function(){a.apply(e,c)},0)}},normalizeCssText:function(a,c){var e=[],g,d=CKEDITOR.tools.parseCssText(a,true,c);for(g in d)e.push(g+":"+d[g]);e.sort();return e.length?e.join(";")+";":""},convertRgbToHex:function(a){return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(a,e,b,d){a=
+[e,b,d];for(e=0;e<3;e++)a[e]=("0"+parseInt(a[e],10).toString(16)).slice(-2);return"#"+a.join("")})},parseCssText:function(a,c,e){var g={};if(e){e=new CKEDITOR.dom.element("span");e.setAttribute("style",a);a=CKEDITOR.tools.convertRgbToHex(e.getAttribute("style")||"")}if(!a||a==";")return g;a.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,e,b){if(c){e=e.toLowerCase();e=="font-family"&&(b=b.toLowerCase().replace(/["']/g,"").replace(/\s*,\s*/g,","));b=CKEDITOR.tools.trim(b)}g[e]=
+b});return g},writeCssText:function(a,c){var e,g=[];for(e in a)g.push(e+":"+a[e]);c&&g.sort();return g.join("; ")},objectCompare:function(a,c,e){var g;if(!a&&!c)return true;if(!a||!c)return false;for(g in a)if(a[g]!=c[g])return false;if(!e)for(g in c)if(a[g]!=c[g])return false;return true},objectKeys:function(a){var c=[],e;for(e in a)c.push(e);return c},convertArrayToObject:function(a,c){var e={};arguments.length==1&&(c=true);for(var g=0,d=a.length;g<d;++g)e[a[g]]=c;return e},fixDomain:function(){for(var a;;)try{a=
+window.parent.document.domain;break}catch(c){a=a?a.replace(/.+?(?:\.|$)/,""):document.domain;if(!a)break;document.domain=a}return!!a},eventsBuffer:function(a,c){function e(){d=(new Date).getTime();g=false;c()}var g,d=0;return{input:function(){if(!g){var c=(new Date).getTime()-d;c<a?g=setTimeout(e,a-c):e()}},reset:function(){g&&clearTimeout(g);g=d=0}}},enableHtml5Elements:function(a,c){for(var e=["abbr","article","aside","audio","bdi","canvas","data","datalist","details","figcaption","figure","footer",
+"header","hgroup","mark","meter","nav","output","progress","section","summary","time","video"],g=e.length,d;g--;){d=a.createElement(e[g]);c&&a.appendChild(d)}}}})();
+CKEDITOR.dtd=function(){var a=CKEDITOR.tools.extend,d=function(a,e){for(var b=CKEDITOR.tools.clone(a),g=1;g<arguments.length;g++){var e=arguments[g],c;for(c in e)delete b[c]}return b},b={},c={},e={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},g={command:1,link:1,meta:1,noscript:1,script:1,style:1},h={},m={"#":1},j={center:1,dir:1,noframes:1};
+a(b,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},m,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(c,e,b,j);d={a:d(b,{a:1,button:1}),abbr:b,address:c,
+area:h,article:a({style:1},c),aside:a({style:1},c),audio:a({source:1,track:1},c),b:b,base:h,bdi:b,bdo:b,blockquote:c,body:c,br:h,button:d(b,{a:1,button:1}),canvas:b,caption:c,cite:b,code:b,col:h,colgroup:{col:1},command:h,datalist:a({option:1},b),dd:c,del:b,details:a({summary:1},c),dfn:b,div:a({style:1},c),dl:{dt:1,dd:1},dt:c,em:b,embed:h,fieldset:a({legend:1},c),figcaption:c,figure:a({figcaption:1},c),footer:c,form:c,h1:b,h2:b,h3:b,h4:b,h5:b,h6:b,head:a({title:1,base:1},g),header:c,hgroup:{h1:1,
+h2:1,h3:1,h4:1,h5:1,h6:1},hr:h,html:a({head:1,body:1},c,g),i:b,iframe:m,img:h,input:h,ins:b,kbd:b,keygen:h,label:b,legend:b,li:c,link:h,map:c,mark:b,menu:a({li:1},c),meta:h,meter:d(b,{meter:1}),nav:c,noscript:a({link:1,meta:1,style:1},b),object:a({param:1},b),ol:{li:1},optgroup:{option:1},option:m,output:b,p:b,param:h,pre:b,progress:d(b,{progress:1}),q:b,rp:b,rt:b,ruby:a({rp:1,rt:1},b),s:b,samp:b,script:m,section:a({style:1},c),select:{optgroup:1,option:1},small:b,source:h,span:b,strong:b,style:m,
+sub:b,summary:b,sup:b,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:c,textarea:m,tfoot:{tr:1},th:c,thead:{tr:1},time:d(b,{time:1}),title:m,tr:{th:1,td:1},track:h,u:b,ul:{li:1},"var":b,video:a({source:1,track:1},c),wbr:h,acronym:b,applet:a({param:1},c),basefont:h,big:b,center:c,dialog:h,dir:{li:1},font:b,isindex:h,noframes:c,strike:b,tt:b};a(d,{$block:a({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},e,j),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,
div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1},$cdata:{script:1,style:1},$editable:{address:1,article:1,aside:1,blockquote:1,body:1,details:1,div:1,fieldset:1,figcaption:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,nav:1,p:1,pre:1,section:1},$empty:{area:1,base:1,basefont:1,br:1,col:1,command:1,dialog:1,embed:1,hr:1,img:1,input:1,isindex:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,
-wbr:1},$inline:b,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:a({body:1,head:1,html:1},e.head),$nonEditable:{applet:1,audio:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,param:1,script:1,textarea:1,video:1},$object:{applet:1,audio:1,button:1,hr:1,iframe:1,img:1,input:1,object:1,select:1,table:1,textarea:1,video:1},$removeEmpty:{abbr:1,acronym:1,b:1,bdi:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,mark:1,meter:1,output:1,q:1,ruby:1,s:1,samp:1,
-small:1,span:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},$transparent:{a:1,audio:1,canvas:1,del:1,ins:1,map:1,noscript:1,object:1,video:1},$intermediate:{caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,rp:1,rt:1,summary:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}});return e}();
+wbr:1},$inline:b,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:a({body:1,head:1,html:1},d.head),$nonEditable:{applet:1,audio:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,param:1,script:1,textarea:1,video:1},$object:{applet:1,audio:1,button:1,hr:1,iframe:1,img:1,input:1,object:1,select:1,table:1,textarea:1,video:1},$removeEmpty:{abbr:1,acronym:1,b:1,bdi:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,mark:1,meter:1,output:1,q:1,ruby:1,s:1,samp:1,
+small:1,span:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},$transparent:{a:1,audio:1,canvas:1,del:1,ins:1,map:1,noscript:1,object:1,video:1},$intermediate:{caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,rp:1,rt:1,summary:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}});return d}();
CKEDITOR.dom.event=function(a){this.$=a};
-CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var a=this.getKey();if(this.$.ctrlKey||this.$.metaKey)a=a+CKEDITOR.CTRL;this.$.shiftKey&&(a=a+CKEDITOR.SHIFT);this.$.altKey&&(a=a+CKEDITOR.ALT);return a},preventDefault:function(a){var e=this.$;e.preventDefault?e.preventDefault():e.returnValue=false;a&&this.stopPropagation()},stopPropagation:function(){var a=this.$;a.stopPropagation?a.stopPropagation():a.cancelBubble=true},getTarget:function(){var a=
+CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var a=this.getKey();if(this.$.ctrlKey||this.$.metaKey)a=a+CKEDITOR.CTRL;this.$.shiftKey&&(a=a+CKEDITOR.SHIFT);this.$.altKey&&(a=a+CKEDITOR.ALT);return a},preventDefault:function(a){var d=this.$;d.preventDefault?d.preventDefault():d.returnValue=false;a&&this.stopPropagation()},stopPropagation:function(){var a=this.$;a.stopPropagation?a.stopPropagation():a.cancelBubble=true},getTarget:function(){var a=
this.$.target||this.$.srcElement;return a?new CKEDITOR.dom.node(a):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var a=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(a.documentElement.scrollLeft||a.body.scrollLeft),y:this.$.pageY||this.$.clientY+(a.documentElement.scrollTop||a.body.scrollTop)}}};CKEDITOR.CTRL=1114112;CKEDITOR.SHIFT=2228224;CKEDITOR.ALT=4456448;CKEDITOR.EVENT_PHASE_CAPTURING=1;CKEDITOR.EVENT_PHASE_AT_TARGET=2;
CKEDITOR.EVENT_PHASE_BUBBLING=3;CKEDITOR.dom.domObject=function(a){if(a)this.$=a};
-CKEDITOR.dom.domObject.prototype=function(){var a=function(a,b){return function(c){typeof CKEDITOR!="undefined"&&a.fire(b,new CKEDITOR.dom.event(c))}};return{getPrivate:function(){var a;if(!(a=this.getCustomData("_")))this.setCustomData("_",a={});return a},on:function(e){var b=this.getCustomData("_cke_nativeListeners");if(!b){b={};this.setCustomData("_cke_nativeListeners",b)}if(!b[e]){b=b[e]=a(this,e);this.$.addEventListener?this.$.addEventListener(e,b,!!CKEDITOR.event.useCapture):this.$.attachEvent&&
-this.$.attachEvent("on"+e,b)}return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(a){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(a)){var b=this.getCustomData("_cke_nativeListeners"),c=b&&b[a];if(c){this.$.removeEventListener?this.$.removeEventListener(a,c,false):this.$.detachEvent&&this.$.detachEvent("on"+a,c);delete b[a]}}},removeAllListeners:function(){var a=this.getCustomData("_cke_nativeListeners"),b;for(b in a){var c=a[b];this.$.detachEvent?
-this.$.detachEvent("on"+b,c):this.$.removeEventListener&&this.$.removeEventListener(b,c,false);delete a[b]}}}}();
-(function(a){var e={};CKEDITOR.on("reset",function(){e={}});a.equals=function(a){try{return a&&a.$===this.$}catch(c){return false}};a.setCustomData=function(a,c){var d=this.getUniqueId();(e[d]||(e[d]={}))[a]=c;return this};a.getCustomData=function(a){var c=this.$["data-cke-expando"];return(c=c&&e[c])&&a in c?c[a]:null};a.removeCustomData=function(a){var c=this.$["data-cke-expando"],c=c&&e[c],d,g;if(c){d=c[a];g=a in c;delete c[a]}return g?d:null};a.clearCustomData=function(){this.removeAllListeners();
-var a=this.$["data-cke-expando"];a&&delete e[a]};a.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(a)})(CKEDITOR.dom.domObject.prototype);
+CKEDITOR.dom.domObject.prototype=function(){var a=function(a,b){return function(c){typeof CKEDITOR!="undefined"&&a.fire(b,new CKEDITOR.dom.event(c))}};return{getPrivate:function(){var a;if(!(a=this.getCustomData("_")))this.setCustomData("_",a={});return a},on:function(d){var b=this.getCustomData("_cke_nativeListeners");if(!b){b={};this.setCustomData("_cke_nativeListeners",b)}if(!b[d]){b=b[d]=a(this,d);this.$.addEventListener?this.$.addEventListener(d,b,!!CKEDITOR.event.useCapture):this.$.attachEvent&&
+this.$.attachEvent("on"+d,b)}return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(a){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(a)){var b=this.getCustomData("_cke_nativeListeners"),c=b&&b[a];if(c){this.$.removeEventListener?this.$.removeEventListener(a,c,false):this.$.detachEvent&&this.$.detachEvent("on"+a,c);delete b[a]}}},removeAllListeners:function(){var a=this.getCustomData("_cke_nativeListeners"),b;for(b in a){var c=a[b];this.$.detachEvent?
+this.$.detachEvent("on"+b,c):this.$.removeEventListener&&this.$.removeEventListener(b,c,false);delete a[b]}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}();
+(function(a){var d={};CKEDITOR.on("reset",function(){d={}});a.equals=function(a){try{return a&&a.$===this.$}catch(c){return false}};a.setCustomData=function(a,c){var e=this.getUniqueId();(d[e]||(d[e]={}))[a]=c;return this};a.getCustomData=function(a){var c=this.$["data-cke-expando"];return(c=c&&d[c])&&a in c?c[a]:null};a.removeCustomData=function(a){var c=this.$["data-cke-expando"],c=c&&d[c],e,g;if(c){e=c[a];g=a in c;delete c[a]}return g?e:null};a.clearCustomData=function(){this.removeAllListeners();
+var a=this.$["data-cke-expando"];a&&delete d[a]};a.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(a)})(CKEDITOR.dom.domObject.prototype);
CKEDITOR.dom.node=function(a){return a?new CKEDITOR.dom[a.nodeType==CKEDITOR.NODE_DOCUMENT?"document":a.nodeType==CKEDITOR.NODE_ELEMENT?"element":a.nodeType==CKEDITOR.NODE_TEXT?"text":a.nodeType==CKEDITOR.NODE_COMMENT?"comment":a.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](a):this};CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject;CKEDITOR.NODE_ELEMENT=1;CKEDITOR.NODE_DOCUMENT=9;CKEDITOR.NODE_TEXT=3;CKEDITOR.NODE_COMMENT=8;CKEDITOR.NODE_DOCUMENT_FRAGMENT=11;
CKEDITOR.POSITION_IDENTICAL=0;CKEDITOR.POSITION_DISCONNECTED=1;CKEDITOR.POSITION_FOLLOWING=2;CKEDITOR.POSITION_PRECEDING=4;CKEDITOR.POSITION_IS_CONTAINED=8;CKEDITOR.POSITION_CONTAINS=16;
-CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(a,e){a.append(this,e);return a},clone:function(a,e){var b=this.$.cloneNode(a),c=function(d){d["data-cke-expando"]&&(d["data-cke-expando"]=false);if(d.nodeType==CKEDITOR.NODE_ELEMENT){e||d.removeAttribute("id",false);if(a)for(var d=d.childNodes,b=0;b<d.length;b++)c(d[b])}};c(b);return new CKEDITOR.dom.node(b)},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$,
-a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$,a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var e=[],b=this.getDocument().$.documentElement,c=this.$;c&&c!=b;){var d=c.parentNode;d&&e.unshift(this.getIndex.call({$:c},a));c=d}return e},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){var e=this.$,b=-1,
-c;if(!this.$.parentNode)return b;do if(!a||!(e!=this.$&&e.nodeType==CKEDITOR.NODE_TEXT&&(c||!e.nodeValue))){b++;c=e.nodeType==CKEDITOR.NODE_TEXT}while(e=e.previousSibling);return b},getNextSourceNode:function(a,e,b){if(b&&!b.call)var c=b,b=function(a){return!a.equals(c)};var a=!a&&this.getFirst&&this.getFirst(),d;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&b(this,true)===false)return null;a=this.getNext()}for(;!a&&(d=(d||this).getParent());){if(b&&b(d,true)===false)return null;a=d.getNext()}return!a||
-b&&b(a)===false?null:e&&e!=a.type?a.getNextSourceNode(false,e,b):a},getPreviousSourceNode:function(a,e,b){if(b&&!b.call)var c=b,b=function(a){return!a.equals(c)};var a=!a&&this.getLast&&this.getLast(),d;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&b(this,true)===false)return null;a=this.getPrevious()}...
[truncated message content] |
|
From: <be...@us...> - 2014-03-21 19:35:18
|
Revision: 12400
http://sourceforge.net/p/xoops/svn/12400
Author: beckmi
Date: 2014-03-21 19:35:13 +0000 (Fri, 21 Mar 2014)
Log Message:
-----------
Adding changes from Trabis (see changelog), updating to Beta 3
Modified Paths:
--------------
XoopsModules/mymenus/trunk/mymenus/admin/admin_links.php
XoopsModules/mymenus/trunk/mymenus/blocks/mymenus_block.php
XoopsModules/mymenus/trunk/mymenus/docs/changelog.txt
XoopsModules/mymenus/trunk/mymenus/docs/skins.txt
XoopsModules/mymenus/trunk/mymenus/js/order.js
XoopsModules/mymenus/trunk/mymenus/plugins/mymenus/mymenus.php
XoopsModules/mymenus/trunk/mymenus/templates/static/mymenus_admin_links.html
XoopsModules/mymenus/trunk/mymenus/xoops_version.php
Added Paths:
-----------
XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/
XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/css/
XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/css/index.html
XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/css/superfish-navbar.css
XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/css/superfish-vertical.css
XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/css/superfish.css
XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/images/
XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/images/arrows-ffffff.png
XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/images/index.html
XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/images/shadow.png
XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/index.html
XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/skin_version.php
XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/templates/
XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/templates/index.html
XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/templates/template.html
Modified: XoopsModules/mymenus/trunk/mymenus/admin/admin_links.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/admin/admin_links.php 2014-03-21 15:05:23 UTC (rev 12399)
+++ XoopsModules/mymenus/trunk/mymenus/admin/admin_links.php 2014-03-21 19:35:13 UTC (rev 12400)
@@ -289,6 +289,7 @@
if (!$GLOBALS['xoopsSecurity']->check()) {
redirect_header($GLOBALS['mymenus_adminpage'], 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
}
+ global $menu_id;
/* Disable xoops debugger in dialog window */
@@ -308,7 +309,7 @@
$msg = _AM_MYMENUS_MSG_SUCCESS;
}
- redirect_header($GLOBALS['mymenus_adminpage'] . '?op=list', 2, $msg);
+ redirect_header($GLOBALS['mymenus_adminpage'] . "?op=list&menu_id=$menu_id", 2, $msg);
}
function mymenus_admin_form($id = null, $pid = null)
@@ -409,6 +410,7 @@
}
$form->addElement(new XoopsFormHidden('mid', $menu_id));
+ $form->addElement(new XoopsFormHidden('menu_id', $menu_id));
return $form->render();
}
Modified: XoopsModules/mymenus/trunk/mymenus/blocks/mymenus_block.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/blocks/mymenus_block.php 2014-03-21 15:05:23 UTC (rev 12399)
+++ XoopsModules/mymenus/trunk/mymenus/blocks/mymenus_block.php 2014-03-21 19:35:13 UTC (rev 12400)
@@ -144,9 +144,9 @@
$block['content'] = $blockTpl->fetch($skin_info['template']);
- if ($options[4] == 'template') {
- $xoopsTpl->assign('xoops_links_' . $options[5] , $block['content']);
- $block = array();
+ if ($options[3] == 'template') {
+ $xoopsTpl->assign($options[4] , $block['content']);
+ $block = false;
}
$registry->unsetAll();
Modified: XoopsModules/mymenus/trunk/mymenus/docs/changelog.txt
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/docs/changelog.txt 2014-03-21 15:05:23 UTC (rev 12399)
+++ XoopsModules/mymenus/trunk/mymenus/docs/changelog.txt 2014-03-21 19:35:13 UTC (rev 12400)
@@ -1,3 +1,8 @@
+<b><u>Version 1.5 Beta 3 (2014-03-21)</u></b>
+- fixed bug: when editing a menu it looses the parent id (trabis)
+- changes: Prefix is not used anymore when assigning menus to smarty, choose full name now (trabis)
+- added: bootstrap skin with multi level menu support, requires a bootstrap theme prepared to hold the menu (trabis)
+
<b><u>Version 1.5 Beta 2 (2014-02-10)</u></b>
- fixed some minor issues with block options (mamba)
Modified: XoopsModules/mymenus/trunk/mymenus/docs/skins.txt
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/docs/skins.txt 2014-03-21 15:05:23 UTC (rev 12399)
+++ XoopsModules/mymenus/trunk/mymenus/docs/skins.txt 2014-03-21 19:35:13 UTC (rev 12400)
@@ -29,7 +29,7 @@
)
[image] => (image to be used in the link, you can choose not to support it in your skin)
- [css] => (this is inline css for this item, it goes inside <a style="$item.css">)
+ [css] => (this is inline css for this item, it goes inside <a style="$item.css">)
[oul] => 1 (IMPORTANT! Open UL -> this menu item requires skin to prepend <ul> open element tag)
[oli] => 1 (IMPORTANT! Open LI -> this menu item requires skin to prepend <li> open element tag)
[close] => (IMPORTANT! this holds closing tags, it will automatically generate </li></ul> tags for you)
@@ -43,7 +43,7 @@
)
-- Skin structure:
-Skins go into
+Skins go into
"mymenus/skins" folder or
"public_html/themes/yourtheme/menu" folder
and they should have a skin_version.php file in it
@@ -92,9 +92,9 @@
$skinpath - holds the path of the skin
-- For Theme designers:
-Since users can choose the smarty variable for each menu,
+Since users can choose the smarty variable for each menu,
I would advise you to use <{$xoops_links_navbar}> as a place holder.
-If you provide a skin for your theme, ask users to:
--- --enter "navbar" as unique_id in block settings.
+If you provide a skin for your theme, ask users to:
+-- --enter "xoops_links_navbar" as unique_id in block settings.
-- --set "render to smarty variable" in block settings.
-- --set "use skin from theme" in block settings.
Modified: XoopsModules/mymenus/trunk/mymenus/js/order.js
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/js/order.js 2014-03-21 15:05:23 UTC (rev 12399)
+++ XoopsModules/mymenus/trunk/mymenus/js/order.js 2014-03-21 19:35:13 UTC (rev 12400)
@@ -75,9 +75,9 @@
});
}
- function showWindow(id){
+ function showWindow(id, menuid){
$("#hidden-result_"+id).show();
- $( "#result" ).load( "admin_links.php?id="+id+"&op=edit", function(response, status, xhr) {
+ $( "#result" ).load( "admin_links.php?id="+id+"&menu_id="+menuid+"&op=edit", function(response, status, xhr) {
if ( status == "error" ) {
var msg = "Sorry but there was an error: ";
$( "#error" ).html( msg + xhr.status + " " + xhr.statusText );
Modified: XoopsModules/mymenus/trunk/mymenus/plugins/mymenus/mymenus.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/plugins/mymenus/mymenus.php 2014-03-21 15:05:23 UTC (rev 12399)
+++ XoopsModules/mymenus/trunk/mymenus/plugins/mymenus/mymenus.php 2014-03-21 19:35:13 UTC (rev 12400)
@@ -68,13 +68,15 @@
function eventImageDecoration()
{
- /*
+
$registry =& MymenusRegistry::getInstance();
$linkArray = $registry->getEntry('link_array');
if (!empty($linkArray['image'])) {
- $linkArray['image'] = XOOPS_URL . '/' . $linkArray['image']; //Do not do this in other decorators
+ $linkArray['image'] = XOOPS_URL . '/' . $linkArray['image'];
+ //Do not do this in other decorators
+ $linkArray['image'] = self::_doDecoration($linkArray['image']);
$registry->setEntry('link_array', $linkArray);
- }*/
+ }
}
function eventTitleDecoration()
Added: XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/css/index.html
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/css/index.html (rev 0)
+++ XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/css/index.html 2014-03-21 19:35:13 UTC (rev 12400)
@@ -0,0 +1 @@
+<script>history.go(-1);</script>
Added: XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/css/superfish-navbar.css
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/css/superfish-navbar.css (rev 0)
+++ XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/css/superfish-navbar.css 2014-03-21 19:35:13 UTC (rev 12400)
@@ -0,0 +1,101 @@
+/*** adding the class sf-navbar in addition to sf-menu creates an all-horizontal nav-bar menu ***/
+.sf-navbar {
+ background: #BDD2FF;
+ height: 2.5em;
+ /*padding-bottom: 2.5em;*/
+ position: relative;
+}
+
+.sf-navbar li {
+ background: #AABDE6;
+ position: static;
+}
+
+.sf-navbar a {
+ border-top: none;
+}
+
+.sf-navbar li ul {
+ width: 44em; /*IE6 soils itself without this*/
+}
+
+.sf-navbar li li {
+ background: #BDD2FF;
+ position: relative;
+}
+
+.sf-navbar li li ul {
+ width: 13em;
+}
+
+.sf-navbar li li li {
+ width: 100%;
+}
+
+.sf-navbar ul li {
+ width: auto;
+ float: left;
+}
+
+.sf-navbar a,.sf-navbar a:visited {
+ border: none;
+}
+
+.sf-navbar li.current {
+ background: #BDD2FF;
+}
+
+.sf-navbar li:hover,.sf-navbar li.sfHover,.sf-navbar li li.current,.sf-navbar a:focus,.sf-navbar a:hover,.sf-navbar a:active
+ {
+ background: #BDD2FF;
+}
+
+.sf-navbar ul li:hover,.sf-navbar ul li.sfHover,ul.sf-navbar ul li:hover li,ul.sf-navbar ul li.sfHover li,.sf-navbar ul a:focus,.sf-navbar ul a:hover,.sf-navbar ul a:active
+ {
+ background: #D1DFFF;
+}
+
+ul.sf-navbar li li li:hover,ul.sf-navbar li li li.sfHover,.sf-navbar li li.current li.current,.sf-navbar ul li li a:focus,.sf-navbar ul li li a:hover,.sf-navbar ul li li a:active
+ {
+ background: #E6EEFF;
+}
+
+ul.sf-navbar .current ul,ul.sf-navbar ul li:hover ul,ul.sf-navbar ul li.sfHover ul
+ {
+ left: 0;
+ top: 2.5em; /* match top ul list item height */
+}
+
+ul.sf-navbar .current ul ul {
+ top: -999em;
+}
+
+.sf-navbar li li.current>a {
+ font-weight: bold;
+}
+
+/*** point all arrows down ***/ /* point right for anchors in subs */
+.sf-navbar ul .sf-sub-indicator {
+ background-position: -10px -100px;
+}
+
+.sf-navbar ul a>.sf-sub-indicator {
+ background-position: 0 -100px;
+}
+
+/* apply hovers to modern browsers */
+.sf-navbar ul a:focus>.sf-sub-indicator,.sf-navbar ul a:hover>.sf-sub-indicator,.sf-navbar ul a:active>.sf-sub-indicator,.sf-navbar ul li:hover>a>.sf-sub-indicator,.sf-navbar ul li.sfHover>a>.sf-sub-indicator
+ {
+ background-position: -10px -100px;
+ /* arrow hovers for modern browsers*/
+}
+
+/*** remove shadow on first submenu ***/
+.sf-navbar>li>ul {
+ background: transparent;
+ padding: 0;
+ -moz-border-radius-bottomleft: 0;
+ -moz-border-radius-topright: 0;
+ -webkit-border-top-right-radius: 0;
+ -webkit-border-bottom-left-radius: 0;
+}
\ No newline at end of file
Added: XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/css/superfish-vertical.css
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/css/superfish-vertical.css (rev 0)
+++ XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/css/superfish-vertical.css 2014-03-21 19:35:13 UTC (rev 12400)
@@ -0,0 +1,23 @@
+/*** adding sf-vertical in addition to sf-menu creates a vertical menu ***/
+.sf-vertical,.sf-vertical li {
+ width: 10em;
+}
+
+/* this lacks ul at the start of the selector, so the styles from the main CSS file override it where needed */
+.sf-vertical li:hover ul,.sf-vertical li.sfHover ul {
+ left: 10em; /* match ul width */
+ top: 0;
+}
+
+/*** alter arrow directions ***/
+.sf-vertical .sf-sub-indicator {
+ background-position: -10px 0;
+} /* IE6 gets solid image only */
+.sf-vertical a>.sf-sub-indicator {
+ background-position: 0 0;
+} /* use translucent arrow for modern browsers*/
+ /* hover arrow direction for modern browsers*/
+.sf-vertical a:focus>.sf-sub-indicator,.sf-vertical a:hover>.sf-sub-indicator,.sf-vertical a:active>.sf-sub-indicator,.sf-vertical li:hover>a>.sf-sub-indicator,.sf-vertical li.sfHover>a>.sf-sub-indicator
+ {
+ background-position: -10px 0; /* arrow hovers for modern browsers*/
+}
\ No newline at end of file
Added: XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/css/superfish.css
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/css/superfish.css (rev 0)
+++ XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/css/superfish.css 2014-03-21 19:35:13 UTC (rev 12400)
@@ -0,0 +1,156 @@
+/*** ESSENTIAL STYLES ***/
+.sf-menu,.sf-menu * {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+
+.sf-menu {
+ line-height: 1.0;
+}
+
+.sf-menu ul {
+ position: absolute;
+ top: -999em;
+ width: 10em; /* left offset of submenus need to match (see below) */
+}
+
+.sf-menu ul li {
+ width: 100%;
+}
+
+.sf-menu li:hover {
+ visibility: inherit; /* fixes IE7 'sticky bug' */
+}
+
+.sf-menu li {
+ float: left;
+ position: relative;
+}
+
+.sf-menu a {
+ display: block;
+ position: relative;
+}
+
+.sf-menu li:hover ul,.sf-menu li.sfHover ul {
+ left: 0;
+ top: 2.5em; /* match top ul list item height */
+ z-index: 99;
+}
+
+ul.sf-menu li:hover li ul,ul.sf-menu li.sfHover li ul {
+ top: -999em;
+}
+
+ul.sf-menu li li:hover ul,ul.sf-menu li li.sfHover ul {
+ left: 10em; /* match ul width */
+ top: 0;
+}
+
+ul.sf-menu li li:hover li ul,ul.sf-menu li li.sfHover li ul {
+ top: -999em;
+}
+
+ul.sf-menu li li li:hover ul,ul.sf-menu li li li.sfHover ul {
+ left: 10em; /* match ul width */
+ top: 0;
+}
+
+/*** DEMO SKIN ***/
+.sf-menu {
+ float: left;
+ margin-bottom: 1em;
+}
+
+.sf-menu a {
+ border-left: 1px solid #fff;
+ border-top: 1px solid #CFDEFF;
+ padding: .75em 1em;
+ text-decoration: none;
+}
+
+.sf-menu a,.sf-menu a:visited {
+ /* visited pseudo selector so IE6 applies text colour*/
+ color: #13a;
+}
+
+.sf-menu li {
+ background: #BDD2FF;
+}
+
+.sf-menu li li {
+ background: #AABDE6;
+}
+
+.sf-menu li li li {
+ background: #9AAEDB;
+}
+
+.sf-menu li:hover,.sf-menu li.sfHover,.sf-menu a:focus,.sf-menu a:hover,.sf-menu a:active
+ {
+ background: #CFDEFF;
+ outline: 0;
+}
+
+/*** arrows **/
+.sf-menu a.sf-with-ul {
+ padding-right: 2.25em;
+ min-width: 1px;
+ /* trigger IE7 hasLayout so spans position accurately */
+}
+
+.sf-sub-indicator {
+ position: absolute;
+ display: block;
+ right: .75em;
+ top: 1.05em; /* IE6 only */
+ width: 10px;
+ height: 10px;
+ text-indent: -999em;
+ overflow: hidden;
+ background: url('../images/arrows-ffffff.png') no-repeat -10px -100px;
+ /* 8-bit indexed alpha png. IE6 gets solid image only */
+}
+
+a>.sf-sub-indicator { /* give all except IE6 the correct values */
+ top: .8em;
+ background-position: 0 -100px;
+ /* use translucent arrow for modern browsers*/
+}
+
+/* apply hovers to modern browsers */
+a:focus>.sf-sub-indicator,a:hover>.sf-sub-indicator,a:active>.sf-sub-indicator,li:hover>a>.sf-sub-indicator,li.sfHover>a>.sf-sub-indicator
+ {
+ background-position: -10px -100px;
+ /* arrow hovers for modern browsers*/
+}
+
+/* point right for anchors in subs */
+.sf-menu ul .sf-sub-indicator {
+ background-position: -10px 0;
+}
+
+.sf-menu ul a>.sf-sub-indicator {
+ background-position: 0 0;
+}
+
+/* apply hovers to modern browsers */
+.sf-menu ul a:focus>.sf-sub-indicator,.sf-menu ul a:hover>.sf-sub-indicator,.sf-menu ul a:active>.sf-sub-indicator,.sf-menu ul li:hover>a>.sf-sub-indicator,.sf-menu ul li.sfHover>a>.sf-sub-indicator
+ {
+ background-position: -10px 0; /* arrow hovers for modern browsers*/
+}
+
+/*** shadows for all but IE6 ***/
+.sf-shadow ul {
+ background: url('../images/shadow.png') no-repeat bottom right;
+ padding: 0 8px 9px 0;
+ -moz-border-radius-bottomleft: 17px;
+ -moz-border-radius-topright: 17px;
+ -webkit-border-top-right-radius: 17px;
+ -webkit-border-bottom-left-radius: 17px;
+}
+
+.sf-shadow ul.sf-shadow-off {
+ background: transparent;
+}
\ No newline at end of file
Added: XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/images/arrows-ffffff.png
===================================================================
(Binary files differ)
Index: XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/images/arrows-ffffff.png
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/images/arrows-ffffff.png 2014-03-21 15:05:23 UTC (rev 12399)
+++ XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/images/arrows-ffffff.png 2014-03-21 19:35:13 UTC (rev 12400)
Property changes on: XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/images/arrows-ffffff.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/images/index.html
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/images/index.html (rev 0)
+++ XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/images/index.html 2014-03-21 19:35:13 UTC (rev 12400)
@@ -0,0 +1 @@
+<script>history.go(-1);</script>
Added: XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/images/shadow.png
===================================================================
(Binary files differ)
Index: XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/images/shadow.png
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/images/shadow.png 2014-03-21 15:05:23 UTC (rev 12399)
+++ XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/images/shadow.png 2014-03-21 19:35:13 UTC (rev 12400)
Property changes on: XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/images/shadow.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/index.html
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/index.html (rev 0)
+++ XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/index.html 2014-03-21 19:35:13 UTC (rev 12400)
@@ -0,0 +1 @@
+<script>history.go(-1);</script>
Added: XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/skin_version.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/skin_version.php (rev 0)
+++ XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/skin_version.php 2014-03-21 19:35:13 UTC (rev 12400)
@@ -0,0 +1,43 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License
+ * @package Mymenus
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @version $Id$
+ */
+
+$skinversion['template'] = 'templates/template.html';
+
+$skinversion['css'] = array(
+ 'css/superfish.css',
+ 'css/superfish-navbar.css'
+);
+
+$skinversion['js'] = array(
+ '../../js/jquery-1.3.2.min.js',
+ '../../js/hoverIntent.js',
+ '../../js/superfish.js'
+);
+
+$header = "\n" . '<script type="text/javascript">';
+$header .= "\n" . ' var $sfnav = jQuery.noConflict()';
+$header .= "\n" . ' $sfnav(function(){';
+$header .= "\n" . ' $sfnav(\'ul.sf-menu\').superfish({';
+$header .= "\n" . ' pathClass: \'current\'';
+$header .= "\n" . ' });';
+$header .= "\n" . ' });';
+$header .= "\n" . '</script>';
+
+$skinversion['header'] = $header;
Property changes on: XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/skin_version.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/mymenus/trunk/mymenus/skins/bootstrap/templates/index.html
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/templates/index.html (rev 0)
+++ XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/templates/index.html 2014-03-21 19:35:13 UTC (rev 12400)
@@ -0,0 +1 @@
+<script>history.go(-1);</script>
Added: XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/templates/template.html
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/templates/template.html (rev 0)
+++ XoopsModules/mymenus/trunk/mymenus/skins/bootstrap/templates/template.html 2014-03-21 19:35:13 UTC (rev 12400)
@@ -0,0 +1,35 @@
+<{foreach item=menu from = $block}>
+<{if $menu.oul}>
+ <{if $menu.level == 0}>
+ <ul class="nav navbar-nav <{$menucss}>">
+ <{elseif $menu.level == 1}>
+ <ul class="dropdown-menu <{$menucss}>">
+ <{else}>
+ <ul class="dropdown-menu sub-menu <{$menucss}>">
+ <{/if}>
+<{/if}>
+
+ <{if $menu.oli}>
+ <{if $menu.hassub && $menu.level == 0}>
+ <li class="dropdown <{if $menu.selected}>active <{/if}><{$menu.css}>">
+ <a href="<{$menu.link}>" target="<{$menu.target}>" alt="<{$menu.alt_title}>" title="<{$menu.alt_title}>">
+ <{if $menu.image}><img class="menu-image" src="<{$menu.image}>"/><{/if}>
+ <{$menu.title}> <b class="caret"></b>
+ </a>
+ <{elseif $menu.hassub && $menu.level == 1}>
+ <li class="<{if $menu.selected}>active <{/if}><{$menu.css}>">
+ <a href="<{$menu.link}>" target="<{$menu.target}>" alt="<{$menu.alt_title}>" title="<{$menu.alt_title}>">
+ <{if $menu.image}><img class="menu-image" src="<{$menu.image}>"/><{/if}>
+ <{$menu.title}> <i class="glyphicon glyphicon-arrow-right"></i>
+ </a>
+ <{else}>
+ <li class="<{if $menu.selected}>active <{/if}><{$menu.css}>">
+ <a href="<{$menu.link}>" target="<{$menu.target}>" alt="<{$menu.alt_title}>" title="<{$menu.alt_title}>">
+ <{if $menu.image}><img class="menu-image" src="<{$menu.image}>"/><{/if}>
+ <{$menu.title}>
+ </a>
+ <{/if}>
+ <{/if}>
+
+<{if $menu.close != ''}><{$menu.close}><{/if}>
+<{/foreach}>
\ No newline at end of file
Modified: XoopsModules/mymenus/trunk/mymenus/templates/static/mymenus_admin_links.html
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/templates/static/mymenus_admin_links.html 2014-03-21 15:05:23 UTC (rev 12399)
+++ XoopsModules/mymenus/trunk/mymenus/templates/static/mymenus_admin_links.html 2014-03-21 19:35:13 UTC (rev 12400)
@@ -54,7 +54,7 @@
<input id="id-<{$menu.id}>" type="button" title="<{$smarty.const._AM_MYMENUS_ACTION_TOGGLE}>" class="toggleBtn icon-<{$menu.visible}>" onclick="itemOnOff(<{$menu.id}>)" readonly="readonly">
- <a href="#" onclick="showWindow(<{$menu.id}>)">
+ <a href="#" onclick="showWindow(<{$menu.id}>, <{$menu_id}>)">
<img style="padding: 1px 2px 0 0" src="<{xoModuleIcons16 edit.png}>" title="<{$smarty.const._EDIT}>" alt="<{$smarty.const._EDIT}>"/>
</a>
<a href="admin_links.php?menu_id=<{$menu_id}>&op=del&id=<{$menu.id}>">
Modified: XoopsModules/mymenus/trunk/mymenus/xoops_version.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/xoops_version.php 2014-03-21 15:05:23 UTC (rev 12399)
+++ XoopsModules/mymenus/trunk/mymenus/xoops_version.php 2014-03-21 19:35:13 UTC (rev 12400)
@@ -36,10 +36,10 @@
$modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32';
//about
-$modversion['release_date'] = '2014/02/10';
+$modversion['release_date'] = '2014/03/21';
$modversion["module_website_url"] = "www.xoops.org";
$modversion["module_website_name"] = "XOOPS";
-$modversion["module_status"] = "Beta 2";
+$modversion["module_status"] = "Beta 3";
$modversion["author_website_url"] = "http://www.xuups.com/";
$modversion["author_website_name"] = "Xuups";
$modversion['min_php'] = '5.3.7';
|
|
From: <be...@us...> - 2014-03-21 15:05:28
|
Revision: 12399
http://sourceforge.net/p/xoops/svn/12399
Author: beckmi
Date: 2014-03-21 15:05:23 +0000 (Fri, 21 Mar 2014)
Log Message:
-----------
Adding check for existence of Description
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/admin/modulesadmin/modulesadmin.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/admin/modulesadmin/modulesadmin.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/admin/modulesadmin/modulesadmin.php 2014-03-19 18:20:48 UTC (rev 12398)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/admin/modulesadmin/modulesadmin.php 2014-03-21 15:05:23 UTC (rev 12399)
@@ -326,7 +326,7 @@
$confobj->setVar('conf_catid', 0);
$confobj->setVar('conf_name', $config['name']);
$confobj->setVar('conf_title', $config['title'], true);
- $confobj->setVar('conf_desc', $config['description'], true);
+ $confobj->setVar('conf_desc', isset($config['description']) ? $config['description'] : '', true);
$confobj->setVar('conf_formtype', $config['formtype']);
$confobj->setVar('conf_valuetype', $config['valuetype']);
$confobj->setConfValueForInput($config['default'], true);
|
|
From: <txm...@us...> - 2014-03-19 18:20:55
|
Revision: 12398
http://sourceforge.net/p/xoops/svn/12398
Author: txmodxoops
Date: 2014-03-19 18:20:48 +0000 (Wed, 19 Mar 2014)
Log Message:
-----------
Work in progress
Updated
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/about.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/menu.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/structure.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/admin.css
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/docs/changelog.txt
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/install.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/sql/mysql.sql
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_building.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_modules.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldattributes.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldelements.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldkey.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldnull.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldtype.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/htmltable.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/themeform.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/xcvLogo.txt
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/about.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/about.php 2014-03-19 17:46:49 UTC (rev 12397)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/about.php 2014-03-19 18:20:48 UTC (rev 12398)
@@ -20,8 +20,8 @@
*/
include 'header.php';
$template_main = 'tdmcreate_about.html';
-$xoopsTpl->assign('navigation', $adminMenu->addNavigation('about.php'));
-$xoopsTpl->assign('about', $adminMenu->renderAbout('6KJ7RW5DR3VTJ', false));
+$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('about.php'));
+$GLOBALS['xoopsTpl']->assign('about', $adminMenu->renderAbout('6KJ7RW5DR3VTJ', false));
if ( isset($template_main) ) {
$GLOBALS['xoopsTpl']->display("db:{$template_main}");
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php 2014-03-19 17:46:49 UTC (rev 12397)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php 2014-03-19 18:20:48 UTC (rev 12398)
@@ -16,7 +16,7 @@
* @package tdmcreate
* @since 2.5.0
* @author Txmod Xoops http://www.txmodxoops.org
- * @version $Id: building.php 11084 2013-02-23 15:44:20Z timgno $
+ * @version $Id: building.php 12258 2014-01-02 09:33:29Z timgno $
*/
include 'header.php';
$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-03-19 17:46:49 UTC (rev 12397)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-03-19 18:20:48 UTC (rev 12398)
@@ -14,19 +14,21 @@
* @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 tdmcreate
- * @since 2.5.5
- * @author Txmod Xoops <su...@tx...>
- * @version $Id: 1.59 fields.php 11297 2013-03-24 10:58:10Z timgno $
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: fields.php 12258 2014-01-02 09:33:29Z timgno $
*/
include 'header.php';
// Recovered the value of the argument op in the URL $
$op = TDMCreate_CleanVars($_REQUEST, 'op', 'list', 'string');
+$mod_id = TDMCreate_CleanVars($_REQUEST, 'mod_id', 0, 'int');
+$table_id = TDMCreate_CleanVars($_REQUEST, 'table_id', 0, 'int');
$field_id = TDMCreate_CleanVars($_REQUEST, 'field_id', 0, 'int');
// Get table Variables
-$table_id = TDMCreate_CleanVars($_REQUEST, 'field_tid', 0, 'int');
-$table_mid = TDMCreate_CleanVars($_REQUEST, 'field_mid', 0, 'int');
-$table_nbfields = TDMCreate_CleanVars($_REQUEST, 'field_numb', 0, 'int');
-$table_fieldname = TDMCreate_CleanVars($_REQUEST, 'field_name', '', 'string');
+$field_tid = TDMCreate_CleanVars($_REQUEST, 'field_tid', 0, 'int');
+$field_mid = TDMCreate_CleanVars($_REQUEST, 'field_mid', 0, 'int');
+$field_numb = TDMCreate_CleanVars($_REQUEST, 'field_numb', 0, 'int');
+$field_name = TDMCreate_CleanVars($_REQUEST, 'field_name', '', 'string');
/*$table_id = $_SESSION['field_tid'];
$table_mid = $_SESSION['field_mid'];
$table_nbfields = $_SESSION['field_numb'];
@@ -35,17 +37,17 @@
{
case 'list':
default:
- $limit = $GLOBALS['xoopsModuleConfig']['adminperpage'];
+ $limit = xoops_getModuleOption('mod_adminpager');
$start = TDMCreate_CleanVars($_REQUEST, 'start', 0);
// Define main template
- $xoopsOption['template_main'] = 'tdmcreate_fields.html';
- xoops_cp_header();
- $xoopsTpl->assign('navigation', $adminMenu->addNavigation('fields.php'));
+ $template_main = 'tdmcreate_fields.html';
+
+ $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php'));
$adminMenu->addItemButton(_AM_TDMCREATE_ADD_TABLE, 'tables.php?op=new', 'add');
- $xoopsTpl->assign('button_new', $adminMenu->renderButton());
- $xoopsTpl->assign('tdmc_url', TDMC_URL);
- $xoopsTpl->assign('tdmc_upload_url', TDMC_UPLOAD_URL);
- $xoopsTpl->assign('pathIcon32', XOOPS_URL.'/Frameworks/moduleclasses/icons/32');
+ $GLOBALS['xoopsTpl']->assign('button_new', $adminMenu->renderButton());
+ $GLOBALS['xoopsTpl']->assign('tdmc_url', TDMC_URL);
+ $GLOBALS['xoopsTpl']->assign('tdmc_upload_url', TDMC_UPLOAD_URL);
+ $GLOBALS['xoopsTpl']->assign('pathIcon32', $pathIcon32);
// Get the list of tables
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('table_mid', $_REQUEST['mod_id']));
@@ -72,22 +74,26 @@
$table['search'] = ( $tables_arr[$t]->getVar('table_search') == 1 ) ? $_yes : $_no;
$table['comments'] = ( $tables_arr[$t]->getVar('table_comments') == 1 ) ? $_yes : $_no;
$table['notifications'] = ( $tables_arr[$t]->getVar('table_notifications') == 1 ) ? $_yes : $_no;
- $xoopsTpl->append('tables_list', $table);
+ $GLOBALS['xoopsTpl']->append('tables_list', $table);
unset($mod);
}
if ( $nb_tables > $limit ) {
include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
$pagenav = new XoopsPageNav($nb_tables, $limit, $start, 'start', 'op=list&limit=' . $limit);
- $xoopsTpl->assign('pagenav', $pagenav->renderNav(4));
+ $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4));
}
} else {
- $xoopsTpl->assign('error', 'Add, Edit or List View in Tables');
+ $GLOBALS['xoopsTpl']->assign('error', 'Add, Edit or List View in Tables');
}
break;
case 'new':
- xoops_cp_header();
- echo $adminMenu->addNavigation('fields.php');
+ // Define main template
+ $template_main = 'tdmcreate_tables.html';
+ $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php'));
+ $adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php', 'list');
+ $GLOBALS['xoopsTpl']->assign('button_new', $adminMenu->renderButton());
+
$obj =& $fieldsHandler->create();
$form = $obj->getForm($table_id, $table_mid, $table_nbfields, $table_fieldname);
$form->display();
@@ -124,11 +130,18 @@
break;
case 'edit':
- xoops_cp_header();
- echo $adminMenu->addNavigation('fields.php');
+ // Define main template
+ $template_main = 'tdmcreate_tables.html';
+ $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php'));
+ $adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php', 'list');
+ $GLOBALS['xoopsTpl']->assign('button_new', $adminMenu->renderButton());
+
$obj = $fieldsHandler->get($field_id);
$form = $obj->getForm($table_id, $table_mid, $table_nbfields, $table_fieldname);
$form->display();
break;
}
+if ( isset($template_main) ) {
+ $GLOBALS['xoopsTpl']->display("db:{$template_main}");
+}
include 'footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/header.php 2014-03-19 17:46:49 UTC (rev 12397)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/header.php 2014-03-19 18:20:48 UTC (rev 12398)
@@ -16,8 +16,8 @@
* @package tdmcreate
* @since 2.5.0
* @author Txmod Xoops http://www.txmodxoops.org
- * @version $Id: header.php 12207 2013-10-23 02:46:52Z beckmi $
- */
+ * @version $Id: header.php 12258 2014-01-02 09:33:29Z timgno $
+*/
include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php';
include_once('../include/common.php');
include_once('../include/functions.php');
@@ -32,6 +32,12 @@
// Get class handler
$modulesHandler =& xoops_getModuleHandler('modules', $thisDirname);
$tablesHandler =& xoops_getModuleHandler('tables', $thisDirname);
+$fieldsHandler =& xoops_getModuleHandler('fields', $thisDirname);
+$fieldtypeHandler=& xoops_getModuleHandler('fieldtype', $thisDirname);
+$fieldattributesHandler=& xoops_getModuleHandler('fieldattributes', $thisDirname);
+$fieldnullHandler=& xoops_getModuleHandler('fieldnull', $thisDirname);
+$fieldkeyHandler=& xoops_getModuleHandler('fieldkey', $thisDirname);
+$fieldelementsHandler=& xoops_getModuleHandler('fieldelements', $thisDirname);
//
$myts =& MyTextSanitizer::getInstance();
if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/menu.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/menu.php 2014-03-19 17:46:49 UTC (rev 12397)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/menu.php 2014-03-19 18:20:48 UTC (rev 12398)
@@ -24,23 +24,27 @@
$pathIcon32 = $moduleInfo->getInfo('icons32');
$adminmenu = array();
$i = 1;
-$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_INDEX;
-$adminmenu[$i]["link"] = 'admin/index.php';
-$adminmenu[$i]["icon"] = $pathIcon32.'/home.png';
+$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU1;
+$adminmenu[$i]['link'] = 'admin/index.php';
+$adminmenu[$i]['icon'] = $pathIcon32.'/home.png';
$i++;
-$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_MODULES;
-$adminmenu[$i]["link"] = 'admin/modules.php';
-$adminmenu[$i]["icon"] = 'images/icons/32/addmodule.png';
+$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU2;
+$adminmenu[$i]['link'] = 'admin/modules.php';
+$adminmenu[$i]['icon'] = 'images/icons/32/addmodule.png';
$i++;
-$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_TABLES;
-$adminmenu[$i]["link"] = 'admin/tables.php';
-$adminmenu[$i]["icon"] = 'images/icons/32/addtable.png';
+$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU3;
+$adminmenu[$i]['link'] = 'admin/tables.php';
+$adminmenu[$i]['icon'] = 'images/icons/32/addtable.png';
$i++;
-$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_CONST;
-$adminmenu[$i]["link"] = 'admin/building.php';
-$adminmenu[$i]["icon"] = 'images/icons/32/builder.png';
+$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU4;
+$adminmenu[$i]['link'] = 'admin/fields.php';
+$adminmenu[$i]['icon'] = 'images/icons/32/fields.png';
$i++;
-$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_ABOUT;
-$adminmenu[$i]["link"] = 'admin/about.php';
-$adminmenu[$i]["icon"] = $pathIcon32.'/about.png';
+$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU5;
+$adminmenu[$i]['link'] = 'admin/building.php';
+$adminmenu[$i]['icon'] = 'images/icons/32/builder.png';
+$i++;
+$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU6;
+$adminmenu[$i]['link'] = 'admin/about.php';
+$adminmenu[$i]['icon'] = $pathIcon32.'/about.png';
unset($i);
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-03-19 17:46:49 UTC (rev 12397)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-03-19 18:20:48 UTC (rev 12398)
@@ -22,18 +22,18 @@
// Recovered the value of the argument op in the URL $
$op = TDMCreate_CleanVars($_REQUEST, 'op', 'list', 'string');
-switch ($op)
+switch ($op) http://localhost/xoops-2.5.7testTDMCreate1.91/Frameworks/moduleclasses/icons/32/user-icon.png
{
case 'list':
default:
- $limit = $GLOBALS['xoopsModuleConfig']['mod_adminpager'];
+ $limit = xoops_getModuleOption('mod_adminpager');
$start = TDMCreate_CleanVars($_REQUEST, 'start', 0);
// Define main template
$template_main = 'tdmcreate_modules.html';
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('modules.php'));
$adminMenu->addItemButton(_AM_TDMCREATE_ADD_MODULE, 'modules.php?op=new', 'add');
$GLOBALS['xoopsTpl']->assign('button_new', $adminMenu->renderButton());
- $GLOBALS['xoopsTpl']->assign('tdmc_upload_url', TDMC_UPLOAD_URL);
+ $GLOBALS['xoopsTpl']->assign('tdmc_upload_imgmod_url', TDMC_UPLOAD_IMGMOD_URL);
$criteria = new CriteriaCompo();
$criteria->setSort('mod_id ASC, mod_name');
$criteria->setOrder('ASC');
@@ -107,8 +107,8 @@
//Form mod_image
include_once XOOPS_ROOT_PATH . '/class/uploader.php';
$uploaddir = TDMC_UPLOAD_PATH.'/images/modules/';
- $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']['mimetypes'],
- $GLOBALS['xoopsModuleConfig']['maxsize'], null, null);
+ $uploader = new XoopsMediaUploader($uploaddir, xoops_getModuleOption('mimetypes'),
+ xoops_getModuleOption('maxsize'), null, null);
if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
$extension = preg_replace( '/^.+\.([^.]+)$/sU' , '\\1' , $_FILES['attaccedFile']['name']);
$name_img = $_GET['mod_name'].'_slogo.'.$extension;
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-03-19 17:46:49 UTC (rev 12397)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-03-19 18:20:48 UTC (rev 12398)
@@ -1,22 +1,22 @@
<?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.
+ 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.
-*/
+ 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.
+ */
/**
-* tdmcreate module
-*
-* @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
-* @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
-* @package tdmcreate
-* @since 2.5.5
-* @author Txmod Xoops <su...@tx...>
-* @version $Id: 1.59 tables.php 11297 2013-03-24 10:58:10Z timgno $
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: tables.php 12258 2014-01-02 09:33:29Z timgno $
*/
include 'header.php';
// Recovered the value of the argument op in the URL $
@@ -30,15 +30,16 @@
$start = TDMCreate_CleanVars($_REQUEST, 'start', 0);
// Define main template
$template_main = 'tdmcreate_tables.html';
- $GLOBALS['xoTheme']->addStylesheet( 'modules/TDMCreate/css/style.css' );
+ $GLOBALS['xoTheme']->addStylesheet( 'modules/TDMCreate/css/admin.css' );
$GLOBALS['xoTheme']->addScript('modules/TDMCreate/js/functions.js');
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('tables.php'));
$adminMenu->addItemButton(_AM_TDMCREATE_ADD_TABLE, 'tables.php?op=new', 'add');
$GLOBALS['xoopsTpl']->assign('button_new', $adminMenu->renderButton());
$GLOBALS['xoopsTpl']->assign('tdmc_url', TDMC_URL);
- $GLOBALS['xoopsTpl']->assign('tdmc_upload_url', TDMC_UPLOAD_URL);
- $GLOBALS['xoopsTpl']->assign('pathIcon32', XOOPS_URL.'/Frameworks/moduleclasses/icons/32');
+ $GLOBALS['xoopsTpl']->assign('tdmc_upload_imgmod_url', TDMC_UPLOAD_IMGMOD_URL);
+ //$GLOBALS['xoopsTpl']->assign('tdmc_upload_table_url', TDMC_UPLOAD_IMGTAB_URL);
+ $GLOBALS['xoopsTpl']->assign('pathIcon32', $pathIcon32);
// Get the list of modules
$criteria = new CriteriaCompo();
$criteria->setSort('mod_id ASC, mod_name');
@@ -119,7 +120,7 @@
$GLOBALS['xoopsTpl']->assign('button_new', $adminMenu->renderButton());
$obj =& $tablesHandler->create();
- $form = $obj->getFormTable();
+ $form = $obj->getForm();
$GLOBALS['xoopsTpl']->assign('form', $form->render());
break;
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldattributes.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldattributes.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldattributes.php 2014-03-19 18:20:48 UTC (rev 12398)
@@ -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.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.5
+ * @author Txmod Xoops <su...@tx...>
+ * @version $Id: 1.59 fieldattributes.php 11297 2013-03-24 10:58:10Z timgno $
+ */
+if (!defined('XOOPS_ROOT_PATH')) { die("XOOPS root path not defined"); }
+
+class TDMCreateFieldattributes extends XoopsObject
+{
+ //Constructor
+ function __construct()
+ {
+ $this->XoopsObject();
+ $this->initVar('fieldattribute_value', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('fieldattribute_name', XOBJ_DTYPE_TXTBOX);
+ }
+
+ //Constructor
+ function TDMCreateFieldattributes()
+ {
+ $this->__construct();
+ }
+}
+
+class TDMCreateFieldattributesHandler extends XoopsPersistableObjectHandler
+{
+ function __construct(&$db)
+ {
+ parent::__construct($db, 'mod_tdmcreate_fieldattributes', 'tdmcreatefieldattributes', 'fieldattribute_value', 'fieldattribute_name');
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldelements.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldelements.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldelements.php 2014-03-19 18:20:48 UTC (rev 12398)
@@ -0,0 +1,54 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.5
+ * @author Txmod Xoops <su...@tx...>
+ * @version $Id: 1.59 fieldelements.php 11297 2013-03-24 10:58:10Z timgno $
+ */
+if (!defined('XOOPS_ROOT_PATH')) { die("XOOPS root path not defined"); }
+
+class TDMCreateFieldelements extends XoopsObject
+{
+ //Constructor
+ function __construct()
+ {
+ $this->XoopsObject();
+ $this->initVar('fieldelement_id', XOBJ_DTYPE_INT);
+ $this->initVar('fieldelement_value', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('fieldelement_name', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('fieldelement_admin', XOBJ_DTYPE_INT);
+ $this->initVar('fieldelement_inlist', XOBJ_DTYPE_INT);
+ $this->initVar('fieldelement_pid', XOBJ_DTYPE_INT);
+ $this->initVar('fieldelement_user', XOBJ_DTYPE_INT);
+ $this->initVar('fieldelement_block', XOBJ_DTYPE_INT);
+ $this->initVar('fieldelement_mfield', XOBJ_DTYPE_INT);
+ $this->initVar('fieldelement_search', XOBJ_DTYPE_INT);
+ $this->initVar('fieldelement_required', XOBJ_DTYPE_INT);
+ }
+
+ //Constructor
+ function TDMCreateFieldelements()
+ {
+ $this->__construct();
+ }
+}
+class TDMCreateFieldelementsHandler extends XoopsPersistableObjectHandler
+{
+ function __construct(&$db)
+ {
+ parent::__construct($db, 'mod_tdmcreate_fieldelements', 'tdmcreatefieldelements', 'fieldelement_id', 'fieldelement_name');
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldkey.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldkey.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldkey.php 2014-03-19 18:20:48 UTC (rev 12398)
@@ -0,0 +1,45 @@
+<?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.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.5
+ * @author Txmod Xoops <su...@tx...>
+ * @version $Id: 1.59 fieldkey.php 11297 2013-03-24 10:58:10Z timgno $
+ */
+if (!defined('XOOPS_ROOT_PATH')) { die("XOOPS root path not defined"); }
+
+class TDMCreateFieldkey extends XoopsObject
+{
+ //Constructor
+ function __construct()
+ {
+ $this->XoopsObject();
+ $this->initVar('fieldkey_value', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('fieldkey_name', XOBJ_DTYPE_TXTBOX);
+ }
+
+ //Constructor
+ function TDMCreateFieldkey()
+ {
+ $this->__construct();
+ }
+}
+class TDMCreateFieldkeyHandler extends XoopsPersistableObjectHandler
+{
+ function __construct(&$db)
+ {
+ parent::__construct($db, 'mod_tdmcreate_fieldkey', 'tdmcreatefieldkey', 'fieldkey_value', 'fieldkey_name');
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldnull.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldnull.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldnull.php 2014-03-19 18:20:48 UTC (rev 12398)
@@ -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.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.5
+ * @author Txmod Xoops <su...@tx...>
+ * @version $Id: 1.59 fieldnull.php 11297 2013-03-24 10:58:10Z timgno $
+ */
+if (!defined('XOOPS_ROOT_PATH')) { die("XOOPS root path not defined"); }
+
+class TDMCreateFieldnull extends XoopsObject
+{
+ //Constructor
+ function __construct()
+ {
+ $this->XoopsObject();
+ $this->initVar('fieldnull_value', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('fieldnull_name', XOBJ_DTYPE_TXTBOX);
+ }
+
+ //Constructor
+ function TDMCreateFieldnull()
+ {
+ $this->__construct();
+ }
+}
+
+class TDMCreateFieldnullHandler extends XoopsPersistableObjectHandler
+{
+ function __construct(&$db)
+ {
+ parent::__construct($db, 'mod_tdmcreate_fieldnull', 'tdmcreatefieldnull', 'fieldnull_value', 'fieldnull_name');
+ }
+}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-03-19 17:46:49 UTC (rev 12397)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-03-19 18:20:48 UTC (rev 12398)
@@ -21,108 +21,134 @@
if (!defined("XOOPS_ROOT_PATH")) {
die("XOOPS root path not defined");
}
-require_once "tdmcreate_htmltable.php";
+require_once 'themeform.php';
+/*
+* @Class TDMCreateFields
+* @extends XoopsObject
+*/
class TDMCreateFields extends XoopsObject
{
- //Constructor
+ /*
+ * @public function constructor class
+ * @param null
+ */
public function __construct()
{
$this->XoopsObject();
- $this->initVar("field_id", XOBJ_DTYPE_INT, null, false, 8);
- $this->initVar("field_table", XOBJ_DTYPE_INT, null, false, 5);
- $this->initVar("field_name", XOBJ_DTYPE_TXTBOX, null, false, 255);
- $this->initVar("field_type", XOBJ_DTYPE_TXTBOX, null, false, 100);
- $this->initVar("field_value", XOBJ_DTYPE_TXTBOX, null, false, 4);
- $this->initVar("field_attribute", XOBJ_DTYPE_TXTBOX, null, false, 50);
- $this->initVar("field_null", XOBJ_DTYPE_TXTBOX, null, false, 10);
- $this->initVar("field_default", XOBJ_DTYPE_TXTBOX, null, false, 150);
- $this->initVar("field_key", XOBJ_DTYPE_TXTBOX, null, false, 10);
- $this->initVar("field_auto_increment", XOBJ_DTYPE_INT, null, false, 1);
- $this->initVar("field_display_admin", XOBJ_DTYPE_INT, null, false, 1);
- $this->initVar("field_display_user", XOBJ_DTYPE_INT, null, false, 1);
- $this->initVar("field_display_block", XOBJ_DTYPE_INT, null, false, 1);
- $this->initVar("field_mainfield", XOBJ_DTYPE_INT, null, false, 1);
- $this->initVar("field_search", XOBJ_DTYPE_INT, null, false, 1);
- $this->initVar("field_required", XOBJ_DTYPE_INT, null, false, 1);
+ $this->initVar('field_id', XOBJ_DTYPE_INT, null, false, 8);
+ $this->initVar('field_tid', XOBJ_DTYPE_INT, null, false, 5);
+ $this->initVar('field_name', XOBJ_DTYPE_TXTBOX, null, false, 255);
+ $this->initVar('field_type', XOBJ_DTYPE_TXTBOX, null, false, 100);
+ $this->initVar('field_value', XOBJ_DTYPE_TXTBOX, null, false, 4);
+ $this->initVar('field_attribute', XOBJ_DTYPE_TXTBOX, null, false, 50);
+ $this->initVar('field_null', XOBJ_DTYPE_TXTBOX, null, false, 10);
+ $this->initVar('field_default', XOBJ_DTYPE_TXTBOX, null, false, 150);
+ $this->initVar('field_key', XOBJ_DTYPE_TXTBOX, null, false, 10);
+ $this->initVar('field_auto_increment', XOBJ_DTYPE_INT, null, false, 1);
+ $this->initVar('field_display_admin', XOBJ_DTYPE_INT, null, false, 1);
+ $this->initVar('field_display_user', XOBJ_DTYPE_INT, null, false, 1);
+ $this->initVar('field_display_block', XOBJ_DTYPE_INT, null, false, 1);
+ $this->initVar('field_mainfield', XOBJ_DTYPE_INT, null, false, 1);
+ $this->initVar('field_search', XOBJ_DTYPE_INT, null, false, 1);
+ $this->initVar('field_required', XOBJ_DTYPE_INT, null, false, 1);
// For relationship
- $this->initVar("table_id", XOBJ_DTYPE_INT, null, false, 8);
- $this->initVar("table_module", XOBJ_DTYPE_INT, null, false, 5);
- $this->initVar("table_name", XOBJ_DTYPE_TXTBOX, null, false, 255);
- $this->initVar("table_nbfields", XOBJ_DTYPE_INT, null, false, 5);
- $this->initVar("table_fieldname", XOBJ_DTYPE_TXTBOX, null, false, 50);
+ $this->initVar('table_id', XOBJ_DTYPE_INT, null, false, 8);
+ $this->initVar('table_mid', XOBJ_DTYPE_INT, null, false, 5);
+ $this->initVar('table_name', XOBJ_DTYPE_TXTBOX, null, false, 255);
+ $this->initVar('table_nbfields', XOBJ_DTYPE_INT, null, false, 5);
+ $this->initVar('table_fieldname', XOBJ_DTYPE_TXTBOX, null, false, 50);
+ $this->initVar('table_fields', XOBJ_DTYPE_TXTAREA, null);
+ $this->initVar('table_parameters', XOBJ_DTYPE_TXTAREA, null);
- $this->initVar("fieldtype_id", XOBJ_DTYPE_INT, null, false, 5);
- $this->initVar("fieldtype_value", XOBJ_DTYPE_TXTBOX, null, false, 25);
- $this->initVar("fieldtype_name", XOBJ_DTYPE_TXTBOX, null, false, 255);
+ $this->initVar('fieldtype_id', XOBJ_DTYPE_INT, null, false, 5);
+ $this->initVar('fieldtype_value', XOBJ_DTYPE_TXTBOX, null, false, 25);
+ $this->initVar('fieldtype_name', XOBJ_DTYPE_TXTBOX, null, false, 255);
}
+
+ /*
+ * @static function &getInstance
+ * @param null
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+ return $instance;
+ }
+ /*
+ * @static function getForm
+ * @param mixed $action
+ */
public function getForm($action = false)
{
if ($action === false) {
- $action = $_SERVER["REQUEST_URI"];
+ $action = $_SERVER['REQUEST_URI'];
}
$title = $this->isNew() ? sprintf(_AM_TDMCREATE_FIELD_ADD) : sprintf(_AM_TDMCREATE_FIELD_EDIT);
- include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
- include_once(XOOPS_ROOT_PATH."/modules/TDMCreate/class/tdmcreate_themeform.php");
- $form = new TDMCreate_XoopsThemeForm($title, "form", $action, "post", true);
+ include_once(XOOPS_ROOT_PATH.'/class/xoopsformloader.php');
+ include_once(XOOPS_ROOT_PATH.'/modules/TDMCreate/class/tdmcreate_themeform.php');
+ $form = new TDMCreateThemeForm($title, 'form', $action, 'post', true);
$form->setExtra('enctype="multipart/form-data"');
if (!$this->isNew()) {
- $field_table = $this->getVar('field_table');
+ $field_tid = $this->getVar('field_tid');
} else {
- $field_table = array( 1 => 0 );
+ $field_tid = array( 1 => 0 );
}
//$option_tray = new XoopsFormElementTray(' ');
//$option_tray->setExtra('colspan="2"');//_AM_TDMCREATE_FIELD_TYPE
// New Object HtmlTable
- $tableForm = new TDMCreate_HtmlTable(null, 'display outer');
+ $tableForm = new TDMCreateHtmlTable(null, 'display outer');
// header row
$tableForm->addRow('center bgblue');
$cells = array(_AM_TDMCREATE_FIELD_NUMBER, _AM_TDMCREATE_FIELD_NAME, _AM_TDMCREATE_FIELD_TYPE, _AM_TDMCREATE_FIELD_VALUE, _AM_TDMCREATE_FIELD_ATTRIBUTE, _AM_TDMCREATE_FIELD_NULL, _AM_TDMCREATE_FIELD_DEFAULT, _AM_TDMCREATE_FIELD_KEY, _AM_TDMCREATE_FIELD_OTHERS);
$tableForm->addCells($cells, 'first', 'header');
- $tablesHandler = xoops_getModuleHandler('tdmcreate_tables');
+ $tablesHandler = xoops_getModuleHandler('tables');
$criteria = new CriteriaCompo(new Criteria('table_name', $this->getVar('table_name')));
$criteria->add(new Criteria('table_nbfields', $this->getVar('table_nbfields')));
$nb_fields = $tablesHandler->getAll($criteria);
unset($criteria);
for($i = 1; $i <= count($nb_fields); $i++)
{
- $field_name = $this->isNew() ? $this->getVar("table_fieldname") : $this->getVar("field_name");
- $field_name = new XoopsFormText(_AM_TDMCREATE_FIELD_NAME, "field_name", 15, 255, $field_name);
+ $field_name = $this->isNew() ? $this->getVar('table_fieldname') : $this->getVar('field_name');
+ $field_name = new XoopsFormText(_AM_TDMCREATE_FIELD_NAME, 'field_name', 15, 255, $field_name);
// fieldtype
- $fieldtypeHandler=& xoops_getModuleHandler('tdmcreate_fieldtype');
- $fieldtype_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, "field_type", $this->getVar("field_type"));
+ $fieldtypeHandler =& xoops_getModuleHandler('fieldtype');
+ $fieldtype_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_type', $this->getVar('field_type'));
$fieldtype_select->addOptionArray($fieldtypeHandler->getList());
// fieldvalue
- $field_value = new XoopsFormText(_AM_TDMCREATE_FIELD_VALUE, "field_value", 5, 20, $this->getVar("field_value"));
+ $field_value = new XoopsFormText(_AM_TDMCREATE_FIELD_VALUE, 'field_value', 5, 20, $this->getVar('field_value'));
// fieldattributes
- $fieldattrsHandler=& xoops_getModuleHandler('tdmcreate_fieldattributes');
- $field_attributes_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, "field_attribute", $this->getVar("field_attribute"));
- $field_attributes_select->addOptionArray($fieldattrsHandler->getList());
+ $fieldattrsHandler =& xoops_getModuleHandler('fieldattributes');
+ $field_attributes_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_attribute', $this->getVar('field_attribute'));
+ $field_attributes_select->addOptionArray($fieldattrsHandler->getList());
// fieldnull
- $fieldnullHandler=& xoops_getModuleHandler('tdmcreate_fieldnull');
- $field_null_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_NULL, "field_null", $this->getVar("field_null"));
- $field_null_select->addOptionArray($fieldnullHandler->getList());
+ $fieldnullHandler =& xoops_getModuleHandler('fieldnull');
+ $field_null_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_NULL, 'field_null', $this->getVar('field_null'));
+ $field_null_select->addOptionArray($fieldnullHandler->getList());
// fielddefault
- $field_default = new XoopsFormText(_AM_TDMCREATE_FIELD_DEFAULT, "field_default", 15, 25, $this->getVar("field_default"));
+ $field_default = new XoopsFormText(_AM_TDMCREATE_FIELD_DEFAULT, 'field_default', 15, 25, $this->getVar('field_default'));
// fieldkey
- $fieldkeyHandler=& xoops_getModuleHandler('tdmcreate_fieldkey');
- $field_key_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_KEY, "field_key", $this->getVar("field_key"));
- $field_key_select->addOptionArray($fieldkeyHandler->getList());
+ $fieldkeyHandler =& xoops_getModuleHandler('fieldkey');
+ $field_key_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_KEY, 'field_key', $this->getVar('field_key'));
+ $field_key_select->addOptionArray($fieldkeyHandler->getList());
// render fields
$tableFormDataArray = array($i, $field_name->render(), $fieldtype_select->render(), $field_value->render(), $field_attributes_select->render(), $field_null_select->render(), $field_default->render(), $field_key_select->render());
// data row
$tableForm->addRow('center bgyellow');
$tableForm->addCells($tableFormDataArray, 'first', 'data');
- $tableOtherForm = new TDMCreate_HtmlTable(null, 'display');
+ $tableOtherForm = new TDMCreateHtmlTable(null, 'display');
if($i == 1) {
- $field_autoincrement = $this->isNew() ? 0 : $this->getVar("field_auto_increment");
- $check_field_autoincrement = new XoopsFormCheckBox(" ", "field_auto_increment", $field_autoincrement);
+ $field_autoincrement = $this->isNew() ? 0 : $this->getVar('field_auto_increment');
+ $check_field_autoincrement = new XoopsFormCheckBox(' ', 'field_auto_increment', $field_autoincrement);
$check_field_autoincrement->addOption(1, _AM_TDMCREATE_FIELD_AUTO_INCREMENT);
// data row
$tableOtherForm->addRow();
@@ -132,8 +158,8 @@
$tableOtherForm->addRow('center bgyellow');
$tableOtherForm->addCell(_AM_TDMCREATE_FIELD_ELEMENTS, 'first', 'header');
// fieldelements
- $fieldelementsHandler=& xoops_getModuleHandler('tdmcreate_fieldelements');
- $field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element_name', $this->getVar("field_element_name"));
+ $fieldelementsHandler=& xoops_getModuleHandler('fieldelements');
+ $field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element_name', $this->getVar('field_element_name'));
$field_elements_select->addOptionArray($fieldelementsHandler->getList());
$criteria = new CriteriaCompo(new Criteria('table_id', $this->getVar('table_id')));
$criteria->add(new Criteria('table_module', $this->getVar('table_module')));
@@ -151,38 +177,38 @@
// data row
$tableOtherForm->addRow();
$tableOtherForm->addCell($field_elements_select->render(), null, 'data');
- $field_display_admin = $this->isNew() ? 0 : $this->getVar("field_display_admin");
- $check_field_display_admin = new XoopsFormCheckBox(" ", "field_display_admin", $field_display_admin);
+ $field_display_admin = $this->isNew() ? 0 : $this->getVar('field_display_admin');
+ $check_field_display_admin = new XoopsFormCheckBox(' ', 'field_display_admin', $field_display_admin);
$check_field_display_admin->addOption(1, _AM_TDMCREATE_FIELD_DISPLAY_ADMIN);
// data row
$tableOtherForm->addRow();
$tableOtherForm->addCell($check_field_display_admin->render(), null, 'data');
- $field_display_user = $this->isNew() ? 0 : $this->getVar("field_display_user");
- $check_field_display_user = new XoopsFormCheckBox(" ", "field_display_user", $field_display_user);
+ $field_display_user = $this->isNew() ? 0 : $this->getVar('field_display_user');
+ $check_field_display_user = new XoopsFormCheckBox(' ', 'field_display_user', $field_display_user);
$check_field_display_user->addOption(1, _AM_TDMCREATE_FIELD_DISPLAY_USER);
// data row
$tableOtherForm->addRow();
$tableOtherForm->addCell($check_field_display_user->render(), null, 'data');
- $field_display_block = $this->isNew() ? 0 : $this->getVar("field_display_block");
- $check_field_display_block = new XoopsFormCheckBox(" ", "field_display_block", $field_display_block);
+ $field_display_block = $this->isNew() ? 0 : $this->getVar('field_display_block');
+ $check_field_display_block = new XoopsFormCheckBox(' ', 'field_display_block', $field_display_block);
$check_field_display_block->addOption(1, _AM_TDMCREATE_FIELD_DISPLAY_BLOCK);
// data row
$tableOtherForm->addRow();
$tableOtherForm->addCell($check_field_display_block->render(), null, 'data');
- $field_mnfield = $this->isNew() ? 0 : $this->getVar("field_mainfield");
- $field_mainfield = new XoopsFormRadio(" ", "field_mainfield", $field_mnfield);
+ $field_mnfield = $this->isNew() ? 0 : $this->getVar('field_mainfield');
+ $field_mainfield = new XoopsFormRadio(' ', 'field_mainfield', $field_mnfield);
$field_mainfield->addOption( ' ', _AM_TDMCREATE_FIELD_MAINFIELD );
// data row
$tableOtherForm->addRow();
$tableOtherForm->addCell($field_mainfield->render(), null, 'data');
- $field_search = $this->isNew() ? 0 : $this->getVar("field_search");
- $check_field_search = new XoopsFormCheckBox(" ", "field_search", $field_search);
+ $field_search = $this->isNew() ? 0 : $this->getVar('field_search');
+ $check_field_search = new XoopsFormCheckBox(' ', 'field_search', $field_search);
$check_field_search->addOption(1, _AM_TDMCREATE_FIELD_SEARCH);
// data row
$tableOtherForm->addRow();
$tableOtherForm->addCell($check_field_search->render(), null, 'data');
- $field_required = $this->isNew() ? 0 : $this->getVar("field_required");
- $check_field_required = new XoopsFormCheckBox(" ", "field_required", $field_required);
+ $field_required = $this->isNew() ? 0 : $this->getVar('field_required');
+ $check_field_required = new XoopsFormCheckBox(' ', 'field_required', $field_required);
$check_field_required->addOption(1, _AM_TDMCREATE_FIELD_REQUIRED);
// data row
$tableOtherForm->addRow();
@@ -201,13 +227,13 @@
$form->addElement(new XoopsFormHidden('fields_modified', true));
}
- $form->addElement(new XoopsFormHidden("op", "save_fields"));
- $form->addElement(new XoopsFormHidden("field_table", $this->getVar("field_table")));
- $form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit"));*/
- $tableFormButton = new XoopsFormButton("", "submit", _SUBMIT, "submit");
+ $form->addElement(new XoopsFormHidden('op', 'save_fields'));
+ $form->addElement(new XoopsFormHidden('field_tid', $this->getVar('field_tid')));
+ $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));*/
+ $tableFormButton = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
$tableForm->addRow('right grey');
$tableForm->addCell($tableFormButton, null, 'data');
- $form->addElement(new XoopsFormHidden("op", "save_fields"));
+ $form->addElement(new XoopsFormHidden('op', 'save_fields'));
$form->addElement($tableForm);
$form->addElement($tableFormButton);
return $form;
@@ -217,6 +243,6 @@
{
function __construct(&$db)
{
- parent::__construct($db, "mod_tdmcreate_fields", "tdmcreatefields", "field_id", "field_table");
+ parent::__construct($db, 'mod_tdmcreate_fields', 'tdmcreatefields', 'field_id', 'field_tid');
}
}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldtype.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldtype.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldtype.php 2014-03-19 18:20:48 UTC (rev 12398)
@@ -0,0 +1,45 @@
+<?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.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.5
+ * @author Txmod Xoops <su...@tx...>
+ * @version $Id: 1.59 fieldtype.php 11297 2013-03-24 10:58:10Z timgno $
+ */
+if (!defined('XOOPS_ROOT_PATH')) { die("XOOPS root path not defined"); }
+
+class TDMCreateFieldtype extends XoopsObject
+{
+ //Constructor
+ function __construct()
+ {
+ $this->XoopsObject();
+ $this->initVar('fieldtype_value', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('fieldtype_name', XOBJ_DTYPE_TXTBOX);
+ }
+
+ //Constructor
+ function TDMCreateFieldtype()
+ {
+ $this->__construct();
+ }
+}
+class TDMCreateFieldtypeHandler extends XoopsPersistableObjectHandler
+{
+ function __construct(&$db)
+ {
+ parent::__construct($db, 'mod_tdmcreate_fieldtype', 'tdmcreatefieldtype', 'fieldtype_value', 'fieldtype_name');
+ }
+}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-03-19 17:46:49 UTC (rev 12397)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-03-19 18:20:48 UTC (rev 12398)
@@ -74,12 +74,12 @@
* @param string $module
*/
public function getArchitectureFiles( $module )
- {
- $indexFile = $this->upload_path.'/index.html';
- $fdocs = $this->upload_path.'/docs';
- $fimages = $this->upload_path.'/images';
+ {
+ $indexFile = $this->path.'/index.html';
//Creation of the Directory of modules
- $targetDirectory = $this->upload_path.'/'. str_replace(' ', '', strtolower($module->getVar('mod_name')));
+ $targetDirectory = $this->upload_path.'/'. str_replace(' ', '', strtolower($module->getVar('mod_name')));
+ $upload_folder_docs = $targetDirectory.'/docs';
+ $upload_folder_images = $targetDirectory.'/images';
// Creation of "module" folder
$this->structure->getPath($targetDirectory);
@@ -97,7 +97,7 @@
$this->structure->makeDirAndCopyFile('images', $indexFile, 'index.html');
//Copy the logo of the module
$mod_image = str_replace(' ', '', strtolower($module->getVar('mod_image')));
- $this->structure->copyFile('images', $fimages.'/modules/'.$mod_image, $mod_image);
+ $this->structure->copyFile('images', $upload_folder_images.'/modules/'.$mod_image, $mod_image);
// Creation of 'images/icons' folder and index.html file - Added in Version 1.15
$this->structure->makeDirAndCopyFile('images/icons', $indexFile, 'index.html');
@@ -106,13 +106,13 @@
// Creation of "images/icons/32" folder and index.html file
$this->structure->makeDirAndCopyFile('images/icons/32', $indexFile, 'index.html');
// Creation of 'on.png' file
- $this->structure->copyFile('images/icons/16', $fimages.'/icons/16/on.png', 'on.png');
+ //$this->structure->copyFile('images/icons/16', $upload_folder_images.'/icons/16/on.png', 'on.png');
// Creation of 'off.png' file
- $this->structure->copyFile('images/icons/16', $fimages.'/icons/16/off.png', 'off.png');
+ //$this->structure->copyFile('images/icons/16', $upload_folder_images.'/icons/16/off.png', 'off.png');
// Creation of 'arrow.gif' file
- $this->structure->copyFile('images/icons/16', $fimages.'/icons/16/arrow.gif', 'arrow.gif');
+ //$this->structure->copyFile('images/icons/16', $upload_folder_images.'/icons/16/arrow.gif', 'arrow.gif');
// Creation of 'txmodxoops_logo.png' file
- $this->structure->copyFile('images', $fimages.'/txmodxoops_logo.png', 'txmodxoops_logo.png');
+ $this->structure->copyFile('images', $upload_folder_images.'/txmodxoops_logo.png', 'txmodxoops_logo.png');
// Creation of 'docs' folder and index.html file
$this->structure->makeDirAndCopyFile('docs', $indexFile, 'index.html');
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/structure.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/structure.php 2014-03-19 17:46:49 UTC (rev 12397)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/structure.php 2014-03-19 18:20:48 UTC (rev 12398)
@@ -132,8 +132,8 @@
*/
public function makeDirAndCopyFile($folder_name, $from_file, $to_file)
{
- $fname = $this->folderPath($folder_name);
- $this->makeDir($fname);
+ $dname = $this->folderPath($folder_name);
+ $this->makeDir($dname);
$this->copyFile($folder_name, $from_file, $to_file);
}
/*
@@ -169,13 +169,13 @@
* @public function deleteFolders
* @param string $path
*/
- public function deleteFolders($path)
+ public function deleteFolders($path, $folders = array())
{
$deleteFolders = 0;
// folder open/read
$folderHandler = $this->xoopsfile->getHandler('folder', $path);
- foreach($log_files as $older) {
- $folderHandler->__construct($older, false);
+ foreach($folders as $folder) {
+ $folderHandler->__construct($folder, false);
if (!$folderHandler->exists()) {
$this->setErrors("({$folder}) folder not exist");
continue;
@@ -193,12 +193,12 @@
* @public function deleteFiles
* @param string $path
*/
- public function deleteFiles($path)
+ public function deleteFiles($path, $files = array())
{
$deletedFiles = 0;
// file open/read
$fileHandler = $this->xoopsfile->getHandler('file', $path);
- foreach($log_files as $file) {
+ foreach($files as $file) {
$fileHandler->__construct($file, false);
if (!$fileHandler->exists()) {
$this->setErrors("({$file}) is a folder or not exist");
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/htmltable.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/htmltable.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/htmltable.php 2014-03-19 18:20:48 UTC (rev 12398)
@@ -0,0 +1,212 @@
+<?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.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: htmltable.php 12258 2014-01-02 09:33:29Z timgno $
+*/
+if (!defined('XOOPS_ROOT_PATH')) { die("XOOPS root path not defined"); }
+
+/**
+ * Base class for html tables
+ *
+ * @author TXMod Xoops <in...@tx...>
+ * @package tdmcreate
+ * @access public
+ */
+xoops_load('XoopsFormElement');
+class TDMCreateHtmlTable extends XoopsFormElement
+{
+ /**
+ * array of {@link XoopsFormElement} objects
+ *
+ * @var array
+ */
+ var $rows = array();
+
+ /**
+ * "tStr" string of the table
+ *
+ * @var string
+ */
+ var $tStr = '';
+
+ /**
+ * constructor
+ *
+ * @param null
+ */
+ public function __construct()
+ {
+ }
+
+ /*
+ * @public static function &getInstance
+ * @param null
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+ return $instance;
+ }
+
+ /**
+ * @public Function initTable
+ *
+ * @param string $id attribute of the table
+ * @param string $_class "css class" attribute for the <table> tag
+ * @param int $border "border" attribute for the <table> tag
+ * @param int $cellspacing "cellspacing" attribute for the <table> tag
+ * @param int $cellpadding "cellpadding" attribute for the <table> tag
+ * @param array $attrs attributes for the <table> tag
+ */
+ public function initTable($id = '', $_class = '', $border = 0, $cellspacing = 2, $cellpadding = 0, $attrs = array() )
+ {
+ $this->tStr = '<table' . ( !empty($id) ? ' id="' . $id . '"' : '' );
+ $this->tStr .= ( !empty($_class) ? ' class="' . $_class . '"' : '' );
+ $this->tStr .= $this->addAttributes( $attrs );
+ $this->tStr .= ' border="' . $border . '" cellspacing="' . $cellspacing . '" cellpadding="' . $cellpadding . '">';
+ }
+
+ /**
+ * return key & value of attributes
+ *
+ * @param array $attrs
+ * @return string
+ */
+ public function addAttributes( $attrs )
+ {
+ $str = '';
+ if (is_array( $attrs )) {
+ foreach( $attrs as $k => $v ) {
+ $str .= " {$k}=\"{$v}\"";
+ }
+ }
+ return $str;
+ }
+
+ /**
+ * Add an element row to the table
+ *
+ * @param string $_class
+ * @param array $attrs
+ */
+ public function addRow($class = '', $attrs = array() )
+ {
+ $row = self::addTableRow( $class, $attrs );
+ array_push( $this->rows, $row );
+ }
+
+ /**
+ * Add an element cell to the table
+ *
+ * @param object $data reference to a {@link XoopsFormElement}
+ * @param string $_class css element
+ * @param string $type reference to a header or data
+ * @param array $attrs attributes for a cell
+ */
+ public function addCell($data, $class = '', $type = 'data', $attrs = array() )
+ {
+ $cell = self::addTableCell( $data, $class, $type, $attrs );
+ // add new cell to current row's list of cells
+ $curRow =& $this->rows[ count( $this->rows ) - 1 ]; // copy by reference
+ array_push( $curRow->cells, $cell );
+ }
+
+ /**
+ * Add an array of cells
+ *
+ * @param object $data reference to a {@link XoopsFormElement}
+ * @param string $_class css element
+ * @param string $type reference to a header or data
+ * @param array $attrs attributes for a cell
+ */
+ public function addCells($data, $class = '', $type = 'data', $attrs = array() )
+ {
+ foreach( $data as $data_cell )
+ {
+ $this->addCell($data_cell, $class, $type, $attrs );
+ }
+ }
+
+ /**
+ * get an array of row & cells
+ *
+ * @param cells $cells elements
+ * @return array - array of RowCells
+ */
+ public function getRowCells($cells)
+ {
+ $str = '';
+ foreach( $cells as $cell )
+ {
+ $tag = ($cell->type == 'data')? 'td': 'th';
+ $str .= !empty($cell->_class) ? '<' . $tag . ' class="' . $cell->_class . '"' : '<' . $tag;
+ $str .= $this->addAttributes( $cell->attrs ) . '>';
+ $str .= $cell->data;
+ $str .= '</' . $tag . '>';
+ }
+ return $str;
+ }
+
+ /**
+ * Add Row for tables
+ *
+ * @author TXMod Xoops <in...@tx...>
+ * @package tdmcreate
+ * @access private
+ */
+ public function addTableRow($class = '', $attrs = array())
+ {
+ $this->_class = $class;
+ $this->attrs = $attrs;
+ $this->cells = array();
+ }
+
+ /**
+ * Add Cell for tables
+ *
+ * @author TXMod Xoops <in...@tx...>
+ * @package tdmcreate
+ * @access private
+ */
+ public function addTableCell( $data, $class = '', $type = '', $attrs = array())
+ {
+ $this->data = $data;
+ $this->_class = $class;
+ $this->type = $type;
+ $this->attrs = $attrs;
+ }
+
+ /**
+ * displays rendered table
+ */
+ public function display()
+ {
+ foreach( $this->rows as $row )
+ {
+ $this->tStr .= !empty($row->_class) ? '<tr class="' . $row->_class . '"' : '<tr';
+ $this->tStr .= $this->addAttributes( $row->attrs ) . '>';
+ $this->tStr .= $this->getRowCells( $row->cells );
+ $this->tStr .= '</tr>';
+ }
+ $this->tStr .= '</table>';
+ return $this->tStr;
+ }
+}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php 2014-03-19 17:46:49 UTC (rev 12397)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php 2014-03-19 18:20:48 UTC (rev 12398)
@@ -23,53 +23,76 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
//include_once 'iconGenerator.php';
-
+/*
+* @Class TDMCreateModules
+* @extends XoopsObject
+*/
class TDMCreateModules extends XoopsObject
{
- // constructor
- function __construct()
+ /*
+ * @public function constructor class
+ * @param null
+ */
+ public function __construct()
{
$this->XoopsObject();
- $this->initVar('mod_id',XOBJ_DTYPE_INT, 0);
- $this->initVar('mod_name',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['name']);
- $this->initVar('mod_version',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['version']);
- $this->initVar('mod_since',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['since']);
- $this->initVar('mod_min_php',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_php']);
- $this->initVar('mod_min_xoops',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_xoops']);
- $this->initVar('mod_min_admin',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_admin']);
- $this->initVar('mod_min_mysql',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_mysql']);
- $this->initVar('mod_description',XOBJ_DTYPE_TXTAREA, $GLOBALS['xoopsModuleConfig']['description']);
- $this->initVar('mod_author',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['author']);
- $this->initVar('mod_author_mail',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['author_email']);
- $this->initVar('mod_author_website_url',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['author_website_url']);
- $this->initVar('mod_author_website_name',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['author_website_name']);
- $this->initVar('mod_credits',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['credits']);
- $this->initVar('mod_license',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['license']);
- $this->initVar('mod_release_info',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['release_info']);
- $this->initVar('mod_release_file',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['release_file']);
- $this->initVar('mod_manual',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['manual']);
- $this->initVar('mod_manual_file',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['manual_file']);
+ $this->initVar('mod_id',XOBJ_DTYPE_INT);
+ $this->initVar('mod_name',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('name'));
+ $this->initVar('mod_version',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('version'));
+ $this->initVar('mod_since',XOBJ_DTYPE_TXTBOX, xoops_getModuleOption('since'));
+ $this->initVar...
[truncated message content] |
|
From: <be...@us...> - 2014-03-19 17:46:54
|
Revision: 12397
http://sourceforge.net/p/xoops/svn/12397
Author: beckmi
Date: 2014-03-19 17:46:49 +0000 (Wed, 19 Mar 2014)
Log Message:
-----------
Updating changelog.250.txt
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
Modified: XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2014-03-19 17:44:50 UTC (rev 12396)
+++ XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2014-03-19 17:46:49 UTC (rev 12397)
@@ -9,6 +9,7 @@
- replaced "array_diff_assoc" with "array_diff_key" in /class/theme_blocks.php (masel/mamba)
- icons for active module sections in System module not shown correctly (Slider84/mamba)
- added two new language definitions (see lang_diff.txt)
+- added Office 2007 MIME types (Voltan)
===============================
2014/03/06: Version 2.5.7 Beta 1
|
|
From: <be...@us...> - 2014-03-19 17:44:53
|
Revision: 12396
http://sourceforge.net/p/xoops/svn/12396
Author: beckmi
Date: 2014-03-19 17:44:50 +0000 (Wed, 19 Mar 2014)
Log Message:
-----------
Adding Office 2007 MIME types
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/include/mimetypes.inc.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/include/mimetypes.inc.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/include/mimetypes.inc.php 2014-03-19 10:17:26 UTC (rev 12395)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/include/mimetypes.inc.php 2014-03-19 17:44:50 UTC (rev 12396)
@@ -128,4 +128,21 @@
'mp4' => 'video/mp4' ,
'wmv' => 'video/x-ms-wmv' ,
'webm' => 'video/webm' ,
- '3gp' => 'video/quicktime' );
+ '3gp' => 'video/quicktime',
+ 'odt' => 'application/vnd.oasis.opendocument.text',
+ 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
+ // Office 2007
+ 'docm'=>'application/vnd.ms-word.document.macroEnabled.12',
+ 'docx'=>'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+ 'dotm'=>'application/vnd.ms-word.template.macroEnabled.12',
+ 'dotx'=>'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
+ 'ppsm'=>'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',
+ 'ppsx'=>'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
+ 'pptm'=>'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
+ 'pptx'=>'application/vnd.openxmlformats-officedocument.presentationml.presentation',
+ 'xlsb'=>'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
+ 'xlsm'=>'application/vnd.ms-excel.sheet.macroEnabled.12',
+ 'xlsx'=>'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+ 'xps'=>'application/vnd.ms-xpsdocument'
+ );
+
\ No newline at end of file
|
|
From: <ce...@us...> - 2014-03-19 10:17:29
|
Revision: 12395
http://sourceforge.net/p/xoops/svn/12395
Author: cesag
Date: 2014-03-19 10:17:26 +0000 (Wed, 19 Mar 2014)
Log Message:
-----------
Fixed typos in english language files.
Modified Paths:
--------------
XoopsModules/xnewsletter/trunk/xNewsletter/language/english/help/help.html
XoopsModules/xnewsletter/trunk/xNewsletter/language/english/modinfo.php
Modified: XoopsModules/xnewsletter/trunk/xNewsletter/language/english/help/help.html
===================================================================
--- XoopsModules/xnewsletter/trunk/xNewsletter/language/english/help/help.html 2014-03-19 09:18:33 UTC (rev 12394)
+++ XoopsModules/xnewsletter/trunk/xNewsletter/language/english/help/help.html 2014-03-19 10:17:26 UTC (rev 12395)
@@ -44,10 +44,10 @@
- Newsletter are based on templates<br />
- Detailed handling of permissions for groups and newsletter (subscribe, write, send)<br />
- Send: send test mail, resend to all subscribers or only to subscribers, where sending failed<br />
- - Sending newsletters to unlimited number of recipients or in packages with certain number of recipients by using cronjob<br />
+ - Sending newsletters to unlimited number of recipients or in packages with certain number of recipients by using cron job<br />
- Bounced email handler for handling Bounced emails in case of invalid e-mail-addresses<br />
- Optionally synchronisation with mailing lists (e.g. majordomo)<br />
- - Maintenace function included<br />
+ - Maintenance function included<br />
- Creating protocol for the important steps<br />
<br />
</p>
@@ -68,7 +68,7 @@
<h5 class="odd">(Un) subscriptions to newsletters</h5>
<p class="even">
- You can define for each newsletter and for each group, whether for (un) subscritpion or change a confirmation email with activation key is necessary or not (use double-option).<br />
+ You can define for each newsletter and for each group, whether for (un) subscription or change a confirmation email with activation key is necessary or not (use double-option).<br />
<br /><br /></p>
<h5 class="odd">Accounts</h5>
@@ -112,15 +112,15 @@
You can restart sending procedure. You can send it again to all subscribers or send it only to the subscribers, where sending procedure failed).<br />
<br />
You can send all emails immediately or limit emails send in one package.<br />
- The number of emails and the minutes untill next sending can be defined in module preferences (e.g. 200 emails all 60 minutes).<br />
- The first package will be sent immediately. To start the next sending procedure you need an external cronjob, which is calling "../modules/xNewsletter/cron.php". Xoops cannot do this with current version (2.5.5).<br />
+ The number of emails and the minutes until next sending can be defined in module preferences (e.g. 200 emails all 60 minutes).<br />
+ The first package will be sent immediately. To start the next sending procedure you need an external cron job, which is calling "../modules/xNewsletter/cron.php". Xoops cannot do this with current version (2.5.5).<br />
<br />
Pay attention: functions like testing account, sending emails, start Bounced email handler,... work not with local server (you get white page).<br />
<br /><br /></p>
<h5 class="odd">Task list</h5>
<p class="even">
- If you limit emails send in one package, you can see all newsletters waiting for next cronjob and the time, when cronjob can send the newsletter.<br />
+ If you limit emails send in one package, you can see all newsletters waiting for next cron job and the time, when cron job can send the newsletter.<br />
If you do not use this option, this list must always be empty.<br />
Normally the tab "Task list" is hidden, if this option is disabled.<br />
<br /><br /></p>
Modified: XoopsModules/xnewsletter/trunk/xNewsletter/language/english/modinfo.php
===================================================================
--- XoopsModules/xnewsletter/trunk/xNewsletter/language/english/modinfo.php 2014-03-19 09:18:33 UTC (rev 12394)
+++ XoopsModules/xnewsletter/trunk/xNewsletter/language/english/modinfo.php 2014-03-19 10:17:26 UTC (rev 12395)
@@ -80,7 +80,7 @@
define('_MI_XNEWSLETTER_USE_SALUTATION', "Use field salutation");
define('_MI_XNEWSLETTER_USE_SALUTATION_DESC', "Please decide, whether you want use salutations like 'Mr.', 'Mrs.',...");
define('_MI_XNEWSLETTER_SEND_IN_PACKAGES', "Send e-mails in packages");
-define('_MI_XNEWSLETTER_SEND_IN_PACKAGES_DESC', "Number of e-mails, which should be sent in one package. 0 means, that all e-mails always be sent immediately. You can use this option only, if you can start cronjobs with external programs.");
+define('_MI_XNEWSLETTER_SEND_IN_PACKAGES_DESC', "Number of e-mails, which should be sent in one package. 0 means, that all e-mails always be sent immediately. You can use this option only, if you can start cron jobs with external programs.");
define('_MI_XNEWSLETTER_SEND_IN_PACKAGES_TIME', "Time period for sending e-mails in packages");
define('_MI_XNEWSLETTER_SEND_IN_PACKAGES_TIME_DESC', "Time period in minutes, when the next package should be sent. Only used, if 'Send e-mails in packages' is bigger than 0.");
define('_MI_XNEWSLETTER_UPGRADEFAILED', "Error while updating module");
|
|
From: <be...@us...> - 2014-03-19 09:18:37
|
Revision: 12394
http://sourceforge.net/p/xoops/svn/12394
Author: beckmi
Date: 2014-03-19 09:18:33 +0000 (Wed, 19 Mar 2014)
Log Message:
-----------
Adding 1.01 Beta 1 (see changelog.txt)
Modified Paths:
--------------
XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/install.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/uninstall.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/class/installwizard.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/changelog.txt
XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/lang_diff.txt
XoopsModules/moduleinstaller/trunk/moduleinstaller/js/xo-installer.js
XoopsModules/moduleinstaller/trunk/moduleinstaller/language/english/admin.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/xoops_version.php
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/install.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/install.php 2014-03-19 09:11:53 UTC (rev 12393)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/install.php 2014-03-19 09:18:33 UTC (rev 12394)
@@ -16,6 +16,8 @@
**/
include 'admin_header.php';
xoops_cp_header();
+
+
$xoopsOption['checkadmin'] = true;
$xoopsOption['hascommon'] = true;
require_once './../include/common.inc.php';
@@ -91,6 +93,7 @@
$javascript = "";
$content = "<ul class='log'><li>";
$content .= "<table class='module'>\n";
+// $content .= "<input type='button' name='getTotal1' id='getTotal1' value='Select All' onclick='selectAll();' /> <input type='button' name='getTotal1' id='getTotal1' value='Unselect All' onclick='unselectAll();' /><br />";
foreach ($dirlist as $file) {
clearstatcache();
if (!in_array($file, $listed_mods)) {
@@ -121,7 +124,7 @@
$content .= " <td class='yesno'>";
$content .= $moduleYN->render() ;
$content .= " </td></tr>\n";
- $toinstal++;
+ ++$toinstal;
}
}
$content .= "</table>";
@@ -131,8 +134,24 @@
$content = "<div class='x2-note confirmMsg'>" . NO_MODULES_FOUND . "</div>";
}
}
+
$indexAdmin = new ModuleAdmin();
echo $indexAdmin->addNavigation('install.php');
+$indexAdmin->addItemButton(
+ _AM_INSTALLER_SELECT_ALL,
+ "javascript:selectAll();",
+ 'button_ok'
+);
+
+$indexAdmin->addItemButton(
+ _AM_INSTALLER_SELECT_NONE,
+ "javascript:unselectAll();",
+ 'prune'
+);
+
+echo $indexAdmin->renderButton('left', '');
+
+
include './../include/install_tpl.php';
include 'admin_footer.php';
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/uninstall.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/uninstall.php 2014-03-19 09:11:53 UTC (rev 12393)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/uninstall.php 2014-03-19 09:18:33 UTC (rev 12394)
@@ -123,7 +123,7 @@
$content .= " <td class='yesno'>";
$content .= $moduleYN->render() ;
$content .= " </td></tr>\n";
- $toinstal++;
+ ++$toinstal;
}
}
$content .= "</table>";
@@ -136,5 +136,21 @@
$indexAdmin = new ModuleAdmin();
echo $indexAdmin->addNavigation('uninstall.php');
+
+$indexAdmin->addItemButton(
+ _AM_INSTALLER_SELECT_ALL,
+ "javascript:selectAll();",
+ 'button_ok'
+);
+
+$indexAdmin->addItemButton(
+ _AM_INSTALLER_SELECT_NONE,
+ "javascript:unselectAll();",
+ 'prune'
+);
+
+echo $indexAdmin->renderButton('left', '');
+
+
include './../include/install_tpl.php';
include 'admin_footer.php';
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/class/installwizard.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/class/installwizard.php 2014-03-19 09:11:53 UTC (rev 12393)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/class/installwizard.php 2014-03-19 09:18:33 UTC (rev 12394)
@@ -32,6 +32,9 @@
var $pageIndex = 0;
var $configs = array();
+ /**
+ * @return bool
+ */
function xoInit()
{
if (@empty( $_SERVER['REQUEST_URI'])) {
@@ -90,6 +93,9 @@
return true;
}
+ /**
+ * @return bool
+ */
function checkAccess()
{
if (INSTALL_USER != '' && INSTALL_PASSWORD != '') {
@@ -131,6 +137,9 @@
return true;
}
+ /**
+ * @param $file
+ */
function loadLangFile($file)
{
if (file_exists("./language/{$this->language}/{$file}.php")) {
@@ -140,6 +149,9 @@
}
}
+ /**
+ * @param $language
+ */
function initLanguage($language)
{
$language = preg_replace("/[^a-z0-9_\-]/i", "", $language);
@@ -150,6 +162,11 @@
$this->loadLangFile('install');
}
+ /**
+ * @param $page
+ *
+ * @return bool|mixed
+ */
function setPage($page)
{
$pages = array_keys($this->pages);
@@ -170,6 +187,9 @@
return $this->pageIndex;
}
+ /**
+ * @return string
+ */
function baseLocation()
{
$proto = ( @$_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
@@ -179,6 +199,11 @@
return $proto . '://' . $host . $base;
}
+ /**
+ * @param $page
+ *
+ * @return string
+ */
function pageURI( $page )
{
$pages = array_keys($this->pages);
@@ -204,6 +229,11 @@
return $this->baseLocation() . "/page_{$page}.php";
}
+ /**
+ * @param $page
+ * @param int $status
+ * @param string $message
+ */
function redirectToPage( $page, $status = 303, $message = 'See other' )
{
$location = $this->pageURI( $page );
@@ -213,6 +243,9 @@
header("Location: {$location}");
}
+ /**
+ * @return string
+ */
function CreateForm()
{
$hidden = '';
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/changelog.txt
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/changelog.txt 2014-03-19 09:11:53 UTC (rev 12393)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/changelog.txt 2014-03-19 09:18:33 UTC (rev 12394)
@@ -1,3 +1,7 @@
+1.01 Beta 1 [2014/03/18]
+=================================
+- added option to select and un-select ALL modules (mamba)
+
1.00 Final [2014/02/15]
=================================
- fixed highlight of selected modules (mamba)
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/lang_diff.txt
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/lang_diff.txt 2014-03-19 09:11:53 UTC (rev 12393)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/lang_diff.txt 2014-03-19 09:18:33 UTC (rev 12394)
@@ -1,4 +1,10 @@
LANGUAGE DIFFERENCES
=====================
-Below are language differences from a version to next version.
\ No newline at end of file
+Below are language differences from a version to next version.
+
+1.01
+-------------------
+/language/english/admin.php
+added define('_AM_INSTALLER_SELECT_ALL' , "Select All");
+added define('_AM_INSTALLER_SELECT_NONE' , "Un-Select All");
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/js/xo-installer.js
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/js/xo-installer.js 2014-03-19 09:11:53 UTC (rev 12393)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/js/xo-installer.js 2014-03-19 09:18:33 UTC (rev 12394)
@@ -113,4 +113,37 @@
return true;
}
-window.onload = xoopsExternalLinks;
\ No newline at end of file
+
+function selectAll() {
+// alert('You are clicking on me');
+ var radios = document.getElementsByTagName("input");
+ var modules = document.getElementsByTagName("input");
+ for (var i = 0; i < radios.length; i++) {
+
+ if (radios[i].type === "radio" && radios[i].id.slice(-1) === "1") {
+ radios[i].checked = true;
+
+ radios[i].parentNode.parentNode.style.background = '#E6EFC2';
+ } else {
+ radios[i].checked = false;
+ }
+ }
+}
+
+
+function unselectAll() {
+// alert('You are clicking on me');
+ var radios = document.getElementsByTagName("input");
+ for (var i = 0; i < radios.length; i++) {
+
+ if (radios[i].type === "radio" && radios[i].id.slice(-1) === "2") {
+ radios[i].checked = true;
+ radios[i].parentNode.parentNode.style.background = 'transparent';
+ } else {
+ radios[i].checked = false;
+ }
+ }
+}
+
+
+window.onload = xoopsExternalLinks;
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/language/english/admin.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/language/english/admin.php 2014-03-19 09:11:53 UTC (rev 12393)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/language/english/admin.php 2014-03-19 09:18:33 UTC (rev 12394)
@@ -2,3 +2,5 @@
// Text for Admin footer
define("_AM_ADMIN_FOOTER","<div class='center smallsmall italic pad5'>Module Installer is maintained by the <a class='tooltip' rel='external' href='http://xoops.org/' title='Visit XOOPS Community'>XOOPS Community</a></div>");
+define('_AM_INSTALLER_SELECT_ALL' , "Select All");
+define('_AM_INSTALLER_SELECT_NONE' , "Un-Select All");
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/xoops_version.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/xoops_version.php 2014-03-19 09:11:53 UTC (rev 12393)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/xoops_version.php 2014-03-19 09:18:33 UTC (rev 12394)
@@ -27,7 +27,7 @@
$moduleDirName = basename( dirname( __FILE__ ) ) ;
$modversion['name'] = _MI_INSTALLER_NAME;
-$modversion['version'] = '1.0';
+$modversion['version'] = '1.01';
$modversion['description'] = _MI_INSTALLER_DESC;
$modversion['author'] = 'Michael Beck';
$modversion['nickname'] = 'Mamba';
@@ -45,7 +45,7 @@
$modversion['release_date'] = '2014/02/15';
$modversion["module_website_url"] = "www.xoops.org/";
$modversion["module_website_name"] = "XOOPS";
-$modversion["module_status"] = "Final";
+$modversion["module_status"] = "Beta 1";
$modversion['min_php']='5.3.7';
$modversion['min_xoops']="2.5.6";
$modversion['min_admin']='1.1';
|
|
From: <be...@us...> - 2014-03-19 09:11:56
|
Revision: 12393
http://sourceforge.net/p/xoops/svn/12393
Author: beckmi
Date: 2014-03-19 09:11:53 +0000 (Wed, 19 Mar 2014)
Log Message:
-----------
Adding 1.0 to releases
Added Paths:
-----------
XoopsModules/moduleinstaller/releases/1.0/moduleinstaller/
|