From: <txm...@us...> - 2012-04-12 18:31:22
|
Revision: 9311 http://xoops.svn.sourceforge.net/xoops/?rev=9311&view=rev Author: txmodxoops Date: 2012-04-12 18:31:14 +0000 (Thu, 12 Apr 2012) Log Message: ----------- Fixed all bugs Modified Paths: -------------- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/includes.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_header.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_modinfo_language.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_user_index.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions.php Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php 2012-04-12 18:30:10 UTC (rev 9310) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php 2012-04-12 18:31:14 UTC (rev 9311) @@ -27,7 +27,7 @@ switch ($op) { case "creation": - $mods =& $modsHandler->get($_REQUEST['modules_name']); + $mods =& $modulesHandler->get($_REQUEST['modules_name']); $mods_name = $mods->getVar('modules_name'); //$mods_fname = $mods->getVar('modules_fname'); $mods_desc = $mods->getVar('modules_description'); @@ -37,13 +37,13 @@ $mods_display_admin = $mods->getVar('modules_display_admin'); $mods_display_user = $mods->getVar('modules_display_user'); //Remove the new module directory if it exists - TDMCreate_clearDir($modPath.'/modules/'.$modules_fname); + TDMCreate_clearDir($modPath.'/modules/'.$mods_name); //Nom des tables et combien de tables $criteria = new CriteriaCompo(); $criteria->add(new Criteria('tables_modules', $_REQUEST['modules_name'])); - $nb_tables = $tblsHandler->getCount($criteria); - $tbls_arr = $tblsHandler->getall($criteria); + $nb_tables = $tablesHandler->getCount($criteria); + $tbls_arr = $tablesHandler->getall($criteria); //Debut echo '<table width="100%" cellspacing="1" style="background: #fff;"> @@ -122,19 +122,19 @@ } } //Variables - $tbls_id = $tblsHandler->getVar('tables_id'); - $tbls_name = $tblsHandler->getVar('tables_name'); - $tbls_module_table = $tblsHandler->getVar('tables_module_table'); - $tbls_img = $tblsHandler->getVar('tables_img'); - $tbls_champs = $tblsHandler->getVar('tables_champs'); - $tbls_parametres = $tblsHandler->getVar('tables_parametres'); - $tbls_blocks = $tblsHandler->getVar('tables_blocks'); - $tbls_display_admin = $tblsHandler->getVar('tables_display_admin'); - $tbls_display_user = $tblsHandler->getVar('tables_display_user'); - $tbls_online = $tblsHandler->getVar('tables_online'); - $tbls_pending = $tblsHandler->getVar('tables_pending'); - $tbls_search = $tblsHandler->getVar('tables_search'); - $tbls_coms = $tblsHandler->getVar('tables_coms'); + $tbls_id = $tablesHandler->getVar('tables_id'); + $tbls_name = $tablesHandler->getVar('tables_name'); + $tbls_module_table = $tablesHandler->getVar('tables_module_table'); + $tbls_img = $tablesHandler->getVar('tables_img'); + $tbls_champs = $tablesHandler->getVar('tables_champs'); + $tbls_parametres = $tablesHandler->getVar('tables_parametres'); + $tbls_blocks = $tablesHandler->getVar('tables_blocks'); + $tbls_display_admin = $tablesHandler->getVar('tables_display_admin'); + $tbls_display_user = $tablesHandler->getVar('tables_display_user'); + $tbls_online = $tablesHandler->getVar('tables_online'); + $tbls_pending = $tablesHandler->getVar('tables_pending'); + $tbls_search = $tablesHandler->getVar('tables_search'); + $tbls_coms = $tablesHandler->getVar('tables_coms'); //Creation of xoopsversion.php file //Xoops version set to integrate the end of the block, etc. const_xoopsversion($mods, $mods_name, $tbls_arr, $tbls_module_table, $tbls_blocks); @@ -142,7 +142,7 @@ // Creation of template index const_templates_index($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres); // Creation of template header - const_templates_header($mods, $mods_name); + const_templates_header($mods, $mods_name, $mods_desc); // Creation of template footer const_templates_footer($mods, $mods_name, $tbls_module_table); } @@ -157,7 +157,7 @@ //Configs const_include_configs($mods, $mods_name, $mods_author_website_name, $mods_author_website_url); //Style - const_css_admin($mods, $mods_name); + //const_css_admin($mods, $mods_name); const_css_style($mods, $mods_name); //Functions const_include_functions($mods, $mods_name); @@ -166,13 +166,13 @@ //Language /////////////////////////////////////////////////////////////////////// //Creation of language main.php - const_main_language($mods, $mods_name, $mods_desc); + const_main_language($mods, $mods_name, $mods_desc, $tbls_arr); //Creation of language modinfo.php - const_modinfo_language($mods, $mods_name, $tbls_arr, $mods_desc); + const_modinfo_language($mods, $mods_name, $tbls_arr, $mods_desc, $topic); //Creation of language admin.php - const_admin_language($mods, $mods_name, $mods_desc, $tbls_name, $tbls_arr, $tbls_pending); + const_admin_language($mods, $mods_name, $tbls_arr, $tbls_name); //Creation of language blocks.php - const_blocks_language($mods, $mods_name); + const_blocks_language($mods, $mods_name, $tbls_arr); //Creation of language help.php const_help_language($mods, $mods_name, $mods_desc); //Creation of language @@ -212,22 +212,22 @@ $form = new XoopsThemeForm(_AM_TDMCREATE_ADMIN_CONST, 'form_creation', $action, 'post', true); - $mods_select = new XoopsFormSelect(_AM_TDMCREATE_CONST_MODULES, 'modules_name', 'modules_name', 10); - $mods_select->addOptionArray($modsHandler->getList()); + $mods_select = new XoopsFormSelect(_AM_TDMCREATE_CONST_MODULES, 'modules_name', 'modules_name'); + $mods_select->addOptionArray($modulesHandler->getList()); $form->addElement($mods_select, true); - $modules_name = xoops_getModuleHandler('tdmcreate_modules', 'TDMCreate'); + /*$modules_name = xoops_getModuleHandler('tdmcreate_modules', 'TDMCreate'); $criteria = new CriteriaCompo(new Criteria('modules_name', $modules_name)); $criteria->setSort('tables_name'); $criteria->setOrder('ASC'); - $tbls_name_arr = $tblsHandler->getAll($criteria); + $tbls_name_arr = $tablesHandler->getAll($criteria); foreach (array_keys($tbls_name_arr) as $i) { $tbls_option_name = $tbls_name_arr[$i]->getVar('tables_name'); } - $tbls_select = new XoopsFormSelect(_AM_TDMCREATE_CONST_TABLES, 'tables_name', 'tables_name', 4, true); - $tbls_select->addOptionArray($tblsHandler->getList($criteria)); // $tbls_option_name - $form->addElement($tbls_select, false); + $tbls_select = new XoopsFormSelect(_AM_TDMCREATE_CONST_TABLES, 'tables_name', 'tables_name'); + $tbls_select->addOptionArray($tablesHandler->getList($criteria)); // $tbls_option_name + $form->addElement($tbls_select, false);*/ $form->addElement(new XoopsFormHidden('op', 'creation')); $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/includes.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/includes.php 2012-04-12 18:30:10 UTC (rev 9310) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/includes.php 2012-04-12 18:31:14 UTC (rev 9311) @@ -36,7 +36,6 @@ include_once $cPath.'/const_blocks.php'; include_once $cPath.'/const_blocks_templates.php'; include_once $cPath.'/const_class.php'; -include_once $cPath.'/const_class_admin.php'; include_once $cPath.'/const_js_jquery.php'; include_once $cPath.'/const_admin_header.php'; @@ -48,7 +47,6 @@ include_once $cPath.'/const_admin_permissions.php'; include_once $cPath.'/const_admin_language.php'; include_once $cPath.'/const_modinfo_language.php'; -include_once $cPath.'/const_about_language.php'; include_once $cPath.'/const_help_language.php'; include_once $cPath.'/const_blocks_language.php'; include_once $cPath.'/const_main_language.php'; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php 2012-04-12 18:30:10 UTC (rev 9310) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php 2012-04-12 18:31:14 UTC (rev 9311) @@ -2,8 +2,10 @@ /** * **************************************************************************** * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS - * - Licence GPL Copyright (c) (http://www.xoops.org) + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) * + * Cette licence, contient des limitations!!! + * * 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. @@ -12,9 +14,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * @license TDM GPL license - * @author TDM TEAM DEV MODULE + * @author TDM TEAM DEV MODULE * - * Version : 1.38 Thu 2012/04/12 14:04:25 : Timgno Exp $ * **************************************************************************** */ include '../../../include/cp_header.php'; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-04-12 18:30:10 UTC (rev 9310) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-04-12 18:31:14 UTC (rev 9311) @@ -2,8 +2,10 @@ /** * **************************************************************************** * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS - * - Licence GPL Copyright (c) (http://www.xoops.org) + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) * + * Cette licence, contient des limitations!!! + * * 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. @@ -14,7 +16,6 @@ * @license TDM GPL license * @author TDM TEAM DEV MODULE * - * Version : 1.38 Thu 2012/04/12 14:04:25 : Timgno Exp $ * **************************************************************************** */ include 'admin_header.php'; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_header.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_header.php 2012-04-12 18:30:10 UTC (rev 9310) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_header.php 2012-04-12 18:31:14 UTC (rev 9311) @@ -57,8 +57,8 @@ $module_handler =& xoops_gethandler(\'module\'); $xoopsModule = & $module_handler->getByDirname($dirname); $moduleInfo =& $module_handler->get($xoopsModule->getVar(\'mid\')); -$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo(\'icons16\'); -$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo(\'icons32\'); +$pathImageIcon = XOOPS_URL .\'/\'. $moduleInfo->getInfo(\'icons16\'); +$pathImageAdmin = XOOPS_URL .\'/\'. $moduleInfo->getInfo(\'icons32\'); '; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_modinfo_language.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_modinfo_language.php 2012-04-12 18:30:10 UTC (rev 9310) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_modinfo_language.php 2012-04-12 18:31:14 UTC (rev 9311) @@ -38,8 +38,8 @@ $text = '<?php'.$en_tete.' // Admin -define("'.$language.'NAME","'.ucfirst( $modules_name ).'"); -define("'.$language.'DESC","'.ucfirst( $modules_desc ).'"); +define("'.$language.'NAME","'. $modules_name .'"); +define("'.$language.'DESC","'. $modules_desc .'"); //Menu define("'.$language.'ADMENU'.$menu.'","Dashboard"); @@ -47,7 +47,7 @@ foreach (array_keys($tables_arr) as $i) { $menu++; - $text .= 'define("'.$language.'ADMENU'.$menu.'","'.ucfirst(strtolower($tables_arr[$i]->getVar("tables_name"))).'"); + $text .= 'define("'.$language.'ADMENU'.$menu.'","'.UcFirstAndToLower($tables_arr[$i]->getVar("tables_name")).'"); '; } if ( $topic == 1 ) { Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_user_index.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_user_index.php 2012-04-12 18:30:10 UTC (rev 9310) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_user_index.php 2012-04-12 18:31:14 UTC (rev 9311) @@ -20,7 +20,7 @@ include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_entete.php'; include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php'; -function const_user_index($modules, $modules_name, $tables_id, $tables_module_table, $tables_name) +function const_user_index($modules, $modules_name) { $language = '_MA_'.strtoupper($modules_name).''; $file = "index.php"; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions.php 2012-04-12 18:30:10 UTC (rev 9310) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions.php 2012-04-12 18:31:14 UTC (rev 9311) @@ -42,7 +42,7 @@ while($file=readdir($opening)) { if ($file == '.' || $file == '..') continue; if (is_dir($folder."/".$file)) { - $r=clearDir($folder."/".$file); + $r=TDMCreate_clearDir($folder."/".$file); if (!$r) return false; } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-04-13 10:08:32
|
Revision: 9314 http://xoops.svn.sourceforge.net/xoops/?rev=9314&view=rev Author: txmodxoops Date: 2012-04-13 10:08:22 +0000 (Fri, 13 Apr 2012) Log Message: ----------- Fixed all bugs Modified Paths: -------------- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_coms.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_user_pages.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions_const.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php 2012-04-13 10:07:27 UTC (rev 9313) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php 2012-04-13 10:08:22 UTC (rev 9314) @@ -90,7 +90,7 @@ } //Creation of pages and templates user if ( $mods_display_user == 1 ) { - const_user_pages($mods, $mods_name, $tbls_name, $tbls_champs, $tbls_champs, $tbls_parametres); + const_user_pages($mods, $mods_name, $tbls_name, $tbls_champs, $tbls_parametres); // Creation of templates pages const_templates_pages($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres); } Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-04-13 10:07:27 UTC (rev 9313) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-04-13 10:08:22 UTC (rev 9314) @@ -439,13 +439,13 @@ { echo '<table width="100%" cellspacing="1" class="outer">'; echo '<tr>'; - echo '<th align="center" width="30%">'._AM_TDMCREATE_NAME.'</th>'; + echo '<th align="center" width="10%">'._AM_TDMCREATE_NAME.'</th>'; echo '<th align="center" width="10%">'._AM_TDMCREATE_IMAGE.'</th>'; - echo '<th align="center" width="10%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>'; - echo '<th align="center" width="10%">'._AM_TDMCREATE_DISPLAY_USER.'</th>'; - echo '<th align="center" width="10%">'._AM_TDMCREATE_BLOCS.'</th>'; - echo '<th align="center" width="10%">'._AM_TDMCREATE_NB_CHAMPS.'</th>'; - echo '<th align="center" width="20%">'._AM_TDMCREATE_FORMACTION.'</th>'; + echo '<th align="center" width="8%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>'; + echo '<th align="center" width="8%">'._AM_TDMCREATE_DISPLAY_USER.'</th>'; + echo '<th align="center" width="5%">'._AM_TDMCREATE_BLOCS.'</th>'; + echo '<th align="center" width="8%">'._AM_TDMCREATE_NB_CHAMPS.'</th>'; + echo '<th align="center" width="5%">'._AM_TDMCREATE_FORMACTION.'</th>'; echo '</tr>'; $class = 'odd'; foreach (array_keys($modules_arr) as $i) Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_coms.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_coms.php 2012-04-13 10:07:27 UTC (rev 9313) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_coms.php 2012-04-13 10:08:22 UTC (rev 9314) @@ -19,7 +19,7 @@ */ include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php'; -function const_include_coms($modules, $modules_name, $tables_name, $tables_module_table, $tables_champs, $tables_parametres, $tables_img) +function const_include_coms($modules, $modules_name, $tables_name, $tables_module_table, $tables_champs, $tables_parametres) { $file = "comment_new.php"; $path_file = TDM_CREATE_MURL."/".$modules_name."/".$file; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_user_pages.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_user_pages.php 2012-04-13 10:07:27 UTC (rev 9313) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_user_pages.php 2012-04-13 10:08:22 UTC (rev 9314) @@ -20,12 +20,9 @@ include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_entete.php'; include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php'; -function const_user_pages($modules, $modules_name, $tables_id, $tables_module_table, $tables_name, $tables_img, $tables_champs, $tables_parametres) +function const_user_pages($modules, $modules_name, $tables_name, $tables_champs, $tables_parametres) { $language = '_MD_'.strtoupper($modules_name).''; - $language_manager = '_MD_'.strtoupper($modules_name).'_'.strtoupper($tables_name).''; - - $modules_name_minuscule = strtolower($modules_name); $file = $tables_name.".php"; $path_file = TDM_CREATE_MURL."/".$modules_name."/".$file; $en_tete = const_entete($modules, 0); Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions_const.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions_const.php 2012-04-13 10:07:27 UTC (rev 9313) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions_const.php 2012-04-13 10:08:22 UTC (rev 9314) @@ -35,7 +35,7 @@ if ( $option == 0 ) { - //Creation du constructor + //Creation of constructor for ($i=0; $i<$nb_champs; $i++) { $structure = explode(":", $champs[$i]); @@ -180,8 +180,7 @@ $text = ''; if ( $option == 0 ) { - //print_r($champs_param_display_admin); - //Nom des colonnes du tableau + // Name of columns table for($i=0; $i<$nb_champs; $i++) { if ( $i != 0 ) { @@ -192,7 +191,7 @@ } } } elseif ( $option == 1 ) { - //Donn\xE9es du tableau + // Given Tables for($i=0; $i<$nb_champs; $i++) { if ( $champs_param_display_admin[$i] == 1 ) { Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php 2012-04-13 10:07:27 UTC (rev 9313) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php 2012-04-13 10:08:22 UTC (rev 9314) @@ -62,7 +62,7 @@ //Form define("_AM_TDMCREATE_MODULES_ADD", "Add a new module"); define("_AM_TDMCREATE_MODULES_EDIT", "Create a module"); -define("_AM_TDMCREATE_MODULES_IMPORTANT", "Required Information"); +//define("_AM_TDMCREATE_MODULES_IMPORTANT", "Required Information"); define("_AM_TDMCREATE_MODULES_IMPORTANT", "Information"); define("_AM_TDMCREATE_MODULES_NOTIMPORTANT", "Optional Information"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-04-13 14:29:08
|
Revision: 9316 http://xoops.svn.sourceforge.net/xoops/?rev=9316&view=rev Author: txmodxoops Date: 2012-04-13 14:28:56 +0000 (Fri, 13 Apr 2012) Log Message: ----------- Reupload Modified Paths: -------------- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_index.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_language.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_pages.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_configs.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_modinfo_language.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_user_pages.php Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php 2012-04-13 14:21:08 UTC (rev 9315) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php 2012-04-13 14:28:56 UTC (rev 9316) @@ -170,7 +170,7 @@ //Creation of language modinfo.php const_modinfo_language($mods, $mods_name, $tbls_arr, $mods_desc, $topic); //Creation of language admin.php - const_admin_language($mods, $mods_name, $tbls_arr, $tbls_name); + const_admin_language($mods, $mods_name, $tbls_arr, $topic); //Creation of language blocks.php const_blocks_language($mods, $mods_name, $tbls_arr); //Creation of language help.php Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_index.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_index.php 2012-04-13 14:21:08 UTC (rev 9315) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_index.php 2012-04-13 14:28:56 UTC (rev 9316) @@ -32,34 +32,50 @@ $text = '<?php'.$en_tete.' include "admin_header.php"; xoops_cp_header(); - $indexAdmin = new ModuleAdmin(); -'; + $indexAdmin = new ModuleAdmin();'; foreach (array_keys($tables_arr) as $i) { $t_name = $tables_arr[$i]->getVar("tables_name"); + $t_champs = $tables_arr[$i]->getVar("tables_champs"); + $text .= ' //count "total" - $count_'.$t_name.' = $'.$t_name.'Handler->getCount(); + $count_'.$t_name.' = $'.$t_name.'Handler->getCount(); //count "online" - $criteria = new CriteriaCompo(); + $criteria = new CriteriaCompo();'; + //if(array_key_exists($t_name."_online", $t_champs)){ + $text .= ' $criteria->add(new Criteria("'.$t_name.'_online", 1)); - $'.$t_name.'_online = $'.$t_name.'Handler->getCount($criteria); + $'.$t_name.'_online = $'.$t_name.'Handler->getCount($criteria);'; + //} + //if(array_key_exists($t_name."_pending", $t_champs)){ + $text .= ' $criteria->add(new Criteria("'.$t_name.'_pending", 1)); - $'.$t_name.'_pending = $'.$t_name.'Handler->getCount($criteria); + $'.$t_name.'_pending = $'.$t_name.'Handler->getCount($criteria);'; + //} + $text .= ' + unset($criteria); '; } $text .= ' - + $r = \'#FF0000\'; // Red + $g = \'#00AA00\'; // Green '; foreach (array_keys($tables_arr) as $i) { $t_name = $tables_arr[$i]->getVar("tables_name"); + $t_champs = $tables_arr[$i]->getVar("tables_champs"); $text .= ' $indexAdmin->addInfoBox('.$language.strtoupper($t_name).'); - $indexAdmin->addInfoBoxLine('.$language.strtoupper($t_name).','.$language1.strtoupper($t_name).', $count_'.$t_name.', ); - $indexAdmin->addInfoBoxLine('.$language.strtoupper($t_name).','.$language1.strtoupper($t_name).'_ONLINE, $'.$t_name.'_online, ); - $indexAdmin->addInfoBoxLine('.$language.strtoupper($t_name).','.$language1.strtoupper($t_name).'_PENDING, $'.$t_name.'_pending, ); -'; + $indexAdmin->addInfoBoxLine('.$language.strtoupper($t_name).','.$language1.strtoupper($t_name).', $count_'.$t_name.', ($count_'.$t_name.' == 0) ? $r : $g);'; + //if(array_key_exists($t_name."_online", $t_champs)){ + $text .= ' + $indexAdmin->addInfoBoxLine('.$language.strtoupper($t_name).','.$language1.strtoupper($t_name).'_ONLINE, $'.$t_name.'_online, ($count_'.$t_name.' == 0) ? $r : $g);'; + //} + //if(array_key_exists($t_name."_pending", $t_champs)){ + $text .= ' + $indexAdmin->addInfoBoxLine('.$language.strtoupper($t_name).','.$language1.strtoupper($t_name).'_PENDING, $'.$t_name.'_pending, ($count_'.$t_name.' == 0) ? $r : $g); +'; //} } $text .= ' echo $indexAdmin->addNavigation("index.php") ; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_language.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_language.php 2012-04-13 14:21:08 UTC (rev 9315) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_language.php 2012-04-13 14:28:56 UTC (rev 9316) @@ -20,13 +20,12 @@ include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_entete.php'; include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php'; -function const_admin_language($modules, $modules_name, $tables_arr, $tables_name) +function const_admin_language($modules, $modules_name, $tables_arr, $topic) { if(!isset($xoopsConfig)) { global $xoopsConfig; } - $language = '_AM_'.strtoupper($modules_name).'_'; - + $language = '_AM_'.strtoupper($modules_name).'_'; $file = "admin.php"; $path_file = TDM_CREATE_MURL."/".$modules_name."/language/".$xoopsConfig['language']."/".$file; $en_tete = const_entete($modules, 0); @@ -42,19 +41,20 @@ '; } foreach (array_keys($tables_arr) as $i) -{ +{ + $t_name = $tables_arr[$i]->getVar("tables_name"); $text .= '//Buttons -define("'.$language.'NEW'.strtoupper($tables_arr[$i]->getVar("tables_name")).'","Add New '.$tables_name.'"); -define("'.$language.''.strtoupper($tables_arr[$i]->getVar("tables_name")).'LIST","List '.$tables_name.'"); -define("'.$language.''.strtoupper($tables_arr[$i]->getVar("tables_name")).'WAIT","Pending '.$tables_name.'"); +define("'.$language.'NEW'.strtoupper($t_name).'","Add New '.UcFirstAndToLower($t_name).'"); +define("'.$language.''.strtoupper($t_name).'LIST","List '.UcFirstAndToLower($t_name).'"); +define("'.$language.''.strtoupper($t_name).'WAIT","Pending '.UcFirstAndToLower($t_name).'"); '; } $text .= ' //General define("'.$language.'FORMOK","Registered successfull"); define("'.$language.'FORMDELOK","Deleted successfull"); -define("'.$language.'FORMSUREDEL", "Are you sure you want to delete: <b><span style=\"color : Red\"> %s </span></b>"); -define("'.$language.'FORMSURERENEW", "Are you sure you want renew: <b><span style=\"color : Red\"> %s </span></b>"); +define("'.$language.'FORMSUREDEL", "Are you sure you want to delete: <span class=\'bold red\'>%s</span>"); +define("'.$language.'FORMSURERENEW", "Are you sure you want renew: <span class=\'bold red\'>%s</span>"); define("'.$language.'FORMUPLOAD","Upload"); define("'.$language.'FORMIMAGE_PATH","File presents in %s"); define("'.$language.'FORMACTION","Action"); @@ -64,11 +64,12 @@ $verif = true; foreach (array_keys($tables_arr) as $i) { + $t_name = $tables_arr[$i]->getVar("tables_name"); //Champs $champs_total = explode("|", $tables_arr[$i]->getVar("tables_champs")); $nb_champs = count($champs_total); - $nb_caracteres = strlen($tables_arr[$i]->getVar("tables_name")); - $language1 = $language.strtoupper($tables_arr[$i]->getVar("tables_name")).'_'; + $nb_caracteres = strlen($t_name); + $language1 = $language.strtoupper($t_name).'_'; //Recuperation des noms des tables for($j=0; $j<$nb_champs; $j++) @@ -81,9 +82,9 @@ if ( $verif == true ) { $text .= ' -define("'.$language1.'ADD","Add a '.$tables_arr[$i]->getVar("tables_name").'"); -define("'.$language1.'EDIT","Edit a '.$tables_arr[$i]->getVar("tables_name").'"); -define("'.$language1.'DELETE","Delete a '.$tables_arr[$i]->getVar("tables_name").'"); +define("'.$language1.'ADD","Add a '.UcFirstAndToLower($t_name).'"); +define("'.$language1.'EDIT","Edit a '.UcFirstAndToLower($t_name).'"); +define("'.$language1.'DELETE","Delete a '.UcFirstAndToLower($t_name).'"); '; } @@ -98,18 +99,21 @@ $text .= '//Blocks.php'; foreach (array_keys($tables_arr) as $i) { - $language1 = $language.strtoupper($tables_arr[$i]->getVar("tables_name")).'_'; + $t_name = $tables_arr[$i]->getVar("tables_name"); + $language1 = $language.strtoupper($t_name).'_'; $text .= ' -define("'.$language1.'BLOCK_DAY","'.$tables_arr[$i]->getVar("tables_name").'s of today"); -define("'.$language1.'BLOCK_RANDOM","'.$tables_arr[$i]->getVar("tables_name").'s random"); -define("'.$language1.'BLOCK_RECENT","'.$tables_arr[$i]->getVar("tables_name").'s recents"); +define("'.$language1.'BLOCK_DAY","'.UcFirstAndToLower($t_name).' of today"); +define("'.$language1.'BLOCK_RANDOM","'.UcFirstAndToLower($t_name).' random"); +define("'.$language1.'BLOCK_RECENT","'.UcFirstAndToLower($t_name).' recents"); '; } +if( $topic == 1 ){ $text .= ' //Permissions define("'.$language.'PERMISSIONS_ACCESS","Permissions to access"); define("'.$language.'PERMISSIONS_VIEW","Permissions to view"); -define("'.$language.'PERMISSIONS_SUBMIT","Permissions to submit"); +define("'.$language.'PERMISSIONS_SUBMIT","Permissions to submit");';} +$text .= ' //Error NoFrameworks define("'.$language.'NOFRAMEWORKS","Error: You don't use the Frameworks \"admin module\". Please install this Frameworks"); define("'.$language.'MAINTAINEDBY", "is maintained by the"); Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_pages.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_pages.php 2012-04-13 14:21:08 UTC (rev 9315) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_pages.php 2012-04-13 14:28:56 UTC (rev 9316) @@ -71,12 +71,11 @@ case "list": default: echo $'.$tables_name.'Admin->addNavigation(\''.$tables_name.'.php\'); - $'.$tables_name.'Admin->addItemButton('.$language.'_'.strtoupper($tables_name).'LIST, \''.$tables_name.'.php?op=list\', \'list\'); $'.$tables_name.'Admin->addItemButton('.$language.'_NEW'.strtoupper($tables_name).', \''.$tables_name.'.php?op=new_'.$tables_name.'\', \'add\'); echo $'.$tables_name.'Admin->renderButton(); $limit = $GLOBALS[\'xoopsModuleConfig\'][\'adminperpage\']; $criteria = new CriteriaCompo(); - $criteria->setSort("'.$champs_id.'"); + $criteria->setSort("'.$champs_id.' ASC, '.$champs_name.'"); $criteria->setOrder("ASC"); $numrows = $'.$tables_name.'Handler->getCount(); $start = '.$modules_name.'_CleanVars ( $_REQUEST, \'start\', 0, \'int\' ); @@ -175,14 +174,14 @@ } } - //Affichage du tableau + // View Table if ($numrows>0) { echo "<table class=\'outer width100\' cellspacing=\'1\'> <tr> '; $champs_colonne_name = const_show_champs_parametres($modules_name, $tables_name, $champs_id, $nb_champs, $champs, $champs_param_display_admin, $champs_param_type, $language, '', 0); - $text .= ''.$champs_colonne_name.' + $text .= $champs_colonne_name.' <th class=\'center width5\'>".'.$language.'_FORMACTION."</th> </tr>"; $class = "odd"; @@ -293,7 +292,7 @@ echo $obj->getHtmlErrors(); } } else { - xoops_confirm(array("ok" => 1, "'.$champs_id.'" => $_REQUEST["'.$champs_id.'"], "op" => "delete_'.$tables_name.'"), $_SERVER["REQUEST_URI"], sprintf('.$language.'_FORMSUREDEL, $obj->getVar("'.$tables_name.'_title"))); + xoops_confirm(array("ok" => 1, "'.$champs_id.'" => $_REQUEST["'.$champs_id.'"], "op" => "delete_'.$tables_name.'"), $_SERVER["REQUEST_URI"], sprintf('.$language.'_FORMSUREDEL, $obj->getVar("'.$champs_name.'"))); } break; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_configs.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_configs.php 2012-04-13 14:21:08 UTC (rev 9315) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_configs.php 2012-04-13 14:28:56 UTC (rev 9316) @@ -38,9 +38,6 @@ $mod_admin = "<a href=\'".'.strtoupper($modules_name).'_URL."/admin/index.php\'><strong>".'.$language.'_ADMIN."</strong></a>"; $mod_copyright = "<a href=\''.$modules_a_w_url.'\' title=\''.$modules_a_w_name.'\' target=\'_blank\'> <img src=\'".$mod_img."\' alt=\''.$modules_a_w_name.'\' /></a>"; -//Load languages -xoops_loadLanguage(\'modinfo\', $GLOBALS[\'xoopsModule\']->getVar("dirname")); -xoops_loadLanguage(\'main\', $GLOBALS[\'xoopsModule\']->getVar("dirname")); ?>'; createFile($path_file, $text, _AM_TDMCREATE_CONST_OK_INCLUDES, Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_modinfo_language.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_modinfo_language.php 2012-04-13 14:21:08 UTC (rev 9315) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_modinfo_language.php 2012-04-13 14:28:56 UTC (rev 9316) @@ -95,10 +95,11 @@ '; foreach (array_keys($tables_arr) as $i) { - $language1 = $language.strtoupper($tables_arr[$i]->getVar("tables_name")).''; - $text .= 'define("'.$language1.'_BLOCK_RECENT","'.strtolower($tables_arr[$i]->getVar("tables_name")).' recents"); -define("'.$language1.'_BLOCK_DAY","'.strtolower($tables_arr[$i]->getVar("tables_name")).' d\'aujourdh\'ui"); -define("'.$language1.'_BLOCK_RANDOM","'.strtolower($tables_arr[$i]->getVar("tables_name")).' aleatoires"); + $t_name = $tables_arr[$i]->getVar("tables_name"); + $language1 = $language.strtoupper($t_name).''; + $text .= 'define("'.$language1.'_BLOCK_RECENT","'.UcFirstAndToLower($t_name).' recents"); +define("'.$language1.'_BLOCK_DAY","'.UcFirstAndToLower($t_name).' of today"); +define("'.$language1.'_BLOCK_RANDOM","'.UcFirstAndToLower($t_name).' random"); '; } $text .=' @@ -106,7 +107,6 @@ define("'.$language.'EDITOR","Editor"); define("'.$language.'KEYWORDS","Keywords"); define("'.$language.'KEYWORDS_DESC","Insert here the keywords (separate by comma)"); - define("'.$language.'ADMINPERPAGE", "Admin per page"); define("'.$language.'ADMINPERPAGE_DESC", "Specifies how many items you want to display per page in the list."); define("'.$language.'ADVERTISE","Code of advertise"); Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_user_pages.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_user_pages.php 2012-04-13 14:21:08 UTC (rev 9315) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_user_pages.php 2012-04-13 14:28:56 UTC (rev 9316) @@ -81,17 +81,17 @@ $text .= ''.$champs_save.' if ($'.$tables_name.'Handler->insert($obj)) { - redirect_header("'.$tables_name.'.php?op=show_list_'.$tables_name.'", 2, '.$language.'_FORMOK); + redirect_header("'.$tables_name.'.php?op=list", 2, '.$language.'_FORMOK); } echo $obj->getHtmlErrors(); $form =& $obj->getForm(); break; - case "default": + case "list": default: $criteria = new CriteriaCompo(); - $criteria->setSort("'.$champs_id.'"); + $criteria->setSort("'.$champs_id.' ASC, '.$champs_name.'"); $criteria->setOrder("ASC"); $numrows = $'.$tables_name.'Handler->getCount(); $'.$tables_name.'_arr = $'.$tables_name.'Handler->getall($criteria); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-04-15 15:26:36
|
Revision: 9332 http://xoops.svn.sourceforge.net/xoops/?rev=9332&view=rev Author: txmodxoops Date: 2012-04-15 15:26:28 +0000 (Sun, 15 Apr 2012) Log Message: ----------- Updated and fixed Modified Paths: -------------- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_header.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_pages.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_class.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_header.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_configs.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_functions.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_templates_header.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_templates_pages.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_user_pages.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_xoopsversion.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions_const.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/italian/admin.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/sql/mysql.sql Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php 2012-04-15 12:28:46 UTC (rev 9331) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php 2012-04-15 15:26:28 UTC (rev 9332) @@ -74,7 +74,12 @@ $tbls_pending = $tbls_arr[$i]->getVar('tables_pending'); $tbls_search = $tbls_arr[$i]->getVar('tables_search'); $tbls_coms = $tbls_arr[$i]->getVar('tables_coms'); - + + //Creation of the file mysql.sql + const_sql($mods_name, $tbls_module_table, $tbls_name, $tbls_champs); + $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix("tdmcreate_tables")." WHERE tables_name = ".$mods_name."'_topic'"); + list( $topic ) = $xoopsDB->fetchRow($result); + //Fabrication //Copie of images tables $tbls_img1 = $modPath."/images/uploads/tables/".$tbls_img; @@ -86,11 +91,11 @@ //Creation of pages admin if ( $mods_display_admin == 1 ) { - const_admin_pages($mods, $mods_name, $tbls_id, $tbls_module_table, $tbls_name, $tbls_img, $tbls_champs, $tbls_parametres, $tbls_online, $tbls_pending); + const_admin_pages($mods, $mods_name, $tbls_id, $tbls_module_table, $tbls_name, $tbls_img, $tbls_champs, $tbls_parametres, $topic); } //Creation of pages and templates user if ( $mods_display_user == 1 ) { - const_user_pages($mods, $mods_name, $tbls_name, $tbls_champs, $tbls_parametres); + const_user_pages($mods, $mods_name, $tbls_name, $tbls_champs, $tbls_parametres, $topic); // Creation of templates pages const_templates_pages($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres); } @@ -101,19 +106,8 @@ //Creation of the comments if ( $tbls_coms == 1 ) { const_include_coms($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres); - } + } - //Creation of the file mysql.sql - const_sql($mods_name, $tbls_module_table, $tbls_name, $tbls_champs); - $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix("tdmcreate_tables"). - " WHERE tables_name = 'topic' OR tables_name = '".$tbls_name."_topic' - OR tables_name = 'cat' - OR tables_name = 'category' - OR tables_name = 'categories' - OR tables_name = '".$tbls_name."_cat' - OR tables_name = '".$tbls_name."_category' - OR tables_name = '".$tbls_name."_categories' "); - list( $topic ) = $xoopsDB->fetchRow($result); //Creation of the blocks if ( $tbls_blocks != 1 ) { const_blocks($mods, $mods_name, $tbls_module_table, $tbls_name, $tbls_champs, $tbls_parametres, $topic); Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-04-15 12:28:46 UTC (rev 9331) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-04-15 15:26:28 UTC (rev 9332) @@ -52,10 +52,12 @@ $obj->setVar('tables_display_user', 1); $obj->setVar('tables_search', 0); $obj->setVar('tables_coms', 0); - $obj->setVar('tables_nb_champs', 7); - $tables_champs = ''; - $tables_parametres = 'XoopsFormTopic:0:0:0:0:0:0|XoopsFormText:1:1:0:1:0:1|XoopsFormTextArea:0:1:0:0:0:1|XoopsFormUploadImage:1:1:0:0:0:0|XoopsFormText:1:1:0:0:0:1|XoopsFormColorPicker:1:1:0:0:0:0|XoopsFormSelectUser:0:0:0:0:0:1|XoopsFormTextDateSelect:0:0:0:0:0:1|XoopsFormCheckBox:1:1:0:0:0:1'; + $tables_champs = 'topic_id:int:11:unsigned:NOT NULL: :|topic_pid:int:5:unsigned:NOT NULL:0:|topic_title:varchar:255: :NOT NULL: :|topic_desc:text: : :NOT NULL: :|topic_img:varchar:255: :NOT NULL: :|topic_weight:int:5: :NOT NULL:0:|topic_color:varchar:10: :NULL: :|topic_submitter:int:10: :NOT NULL:0:|topic_created:int:10: :NOT NULL:0:|topic_online:tinyint:1: :NOT NULL:0:'; + + $obj->setVar('tables_nb_champs', 10 ); + + $tables_parametres = 'XoopsFormTopic:0:0:0:0:0:0|XoopsFormText:1:1:0:1:0:1|XoopsFormTextArea:0:1:0:0:0:1|XoopsFormUploadImage:1:1:0:0:0:0|XoopsFormText:1:1:0:0:0:1|XoopsFormColorPicker:1:1:0:0:0:0|XoopsFormSelect:0:0:0:0:0:1|XoopsFormSelectUser:0:0:0:0:0:1|XoopsFormTextDateSelect:0:0:0:0:0:1|XoopsFormCheckBox:1:1:0:0:0:1'; //Image include_once XOOPS_ROOT_PATH.'/class/uploader.php'; @@ -91,7 +93,7 @@ $obj->setVar('tables_display_user', $_REQUEST['tables_display_user']); $obj->setVar('tables_search', $_REQUEST['tables_search']); $obj->setVar('tables_coms', $_REQUEST['tables_coms']); - $obj->setVar('tables_nb_champs', $_REQUEST['tables_nb_champs']); + //$obj->setVar('tables_nb_champs', $_REQUEST['tables_nb_champs']); $tables_champs = ''; $tables_parametres = ''; @@ -123,16 +125,28 @@ if ( $i != 0 ) $tables_parametres .= '|'; } else { - /*if ( isset($_REQUEST['tables_submitter']) == 1 ) + $submit = 0; $create = 0; $online = 0; + if ( isset($_REQUEST['tables_submitter']) == 1 ) { $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_submitter:int:10: :NOT NULL:0:'; - if ( isset($_REQUEST['tables_date_created']) == 1 ) - $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_date_created:int:10: :NOT NULL:0:'; - if ( isset($_REQUEST['tables_online']) == 1 ) - $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_online:tinyint:1: :NOT NULL:0:'; */ - $tables_champs .= ''; + $submit = 1; + } + if ( isset($_REQUEST['tables_created']) == 1 ) { + $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_created:int:10: :NOT NULL:0:'; + $create = 1; + } + if ( isset($_REQUEST['tables_online']) == 1 ) { + $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_online:tinyint:1: :NOT NULL:0:'; + $online = 1; + } + $tables_parametres .= '|XoopsFormSelectUser:1:1:1:0:0:1|XoopsFormTextDateSelect:1:1:1:0:0:1|XoopsFormCheckBox:1:1:1:0:0:1'; } } + $nb_champs = $_REQUEST['tables_nb_champs']; + $nb_champs += $submit; + $nb_champs += $create; + $nb_champs += $online; + $obj->setVar('tables_nb_champs', $nb_champs); } $obj->setVar('tables_champs', $tables_champs); $obj->setVar('tables_parametres', $tables_parametres); Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php 2012-04-15 12:28:46 UTC (rev 9331) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php 2012-04-15 15:26:28 UTC (rev 9332) @@ -682,25 +682,25 @@ $modules_select = new XoopsFormSelect(_AM_TDMCREATE_TABLES_MODULES, 'tables_modules', $this->getVar('tables_modules')); $modules_select->addOptionArray($modulesHandler->getList()); $form->addElement($modules_select, true); - $form->addElement(new XoopsFormText(_AM_TDMCREATE_TABLES_NAME, 'tables_name', 40, 255, $this->getVar('tables_name')), true); - $form->addElement(new XoopsFormText(_AM_TDMCREATE_TABLES_NB_CHAMPS, 'tables_nb_champs', 10, 25, $this->getVar('tables_nb_champs')), true); - - $select_blocs = $this->isNew() ? 0 : $this->getVar('tables_blocs'); - $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_BLOCS, 'tables_blocs', $select_blocs, _YES, _NO)); - - $select_display_admin = $this->isNew() ? 0 : $this->getVar('tables_display_admin'); - $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_DISPLAY_ADMIN, 'tables_display_admin', $select_display_admin, _YES, _NO)); + $form->addElement(new XoopsFormText(_AM_TDMCREATE_TABLES_NAME, 'tables_name', 40, 255, $this->getVar('tables_name')), true); + $form->addElement(new XoopsFormText(_AM_TDMCREATE_TABLES_NB_CHAMPS, 'tables_nb_champs', 10, 25, $this->getVar('tables_nb_champs')), true); + + $select_blocs = $this->isNew() ? 0 : $this->getVar('tables_blocs'); + $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_BLOCS, 'tables_blocs', $select_blocs, _YES, _NO)); + + $select_display_admin = $this->isNew() ? 0 : $this->getVar('tables_display_admin'); + $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_DISPLAY_ADMIN, 'tables_display_admin', $select_display_admin, _YES, _NO)); - $select_display_user = $this->isNew() ? 0 : $this->getVar('tables_display_user'); - $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_DISPLAY_USER, 'tables_display_user', $select_display_user, _YES, _NO)); - - $form->addElement(new XoopsFormLabel(_AM_TDMCREATE_FORM_INFO_TABLE,_AM_TDMCREATE_FORM_INFO_TABLE_FIELD)); - $select_submitter = $this->isNew() ? 0 : $this->getVar('tables_submitter'); - $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_SUBMITTER, 'tables_submitter', $select_submitter, _YES, _NO)); - $select_date_created = $this->isNew() ? 0 : $this->getVar('tables_date_created'); - $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_DATE_CREATED, 'tables_date_created', $select_date_created, _YES, _NO)); - $select_online = $this->isNew() ? 0 : $this->getVar('tables_online'); - $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_ONLINE, 'tables_online', $select_online, _YES, _NO)); + $select_display_user = $this->isNew() ? 0 : $this->getVar('tables_display_user'); + $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_DISPLAY_USER, 'tables_display_user', $select_display_user, _YES, _NO)); + + $form->addElement(new XoopsFormLabel(_AM_TDMCREATE_FORM_INFO_TABLE,_AM_TDMCREATE_FORM_INFO_TABLE_FIELD)); + $select_submitter = $this->isNew() ? 0 : $this->getVar('tables_submitter'); + $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_SUBMITTER, 'tables_submitter', $select_submitter, _YES, _NO)); + $select_created = $this->isNew() ? 0 : $this->getVar('tables_created'); + $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_CREATED, 'tables_created', $select_created, _YES, _NO)); + $select_online = $this->isNew() ? 0 : $this->getVar('tables_online'); + $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_ONLINE, 'tables_online', $select_online, _YES, _NO)); $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix("tdmcreate_tables")." WHERE tables_search = '1'"); list( $active_search ) = $xoopsDB->fetchRow($result); @@ -776,13 +776,13 @@ $modules_select->addOptionArray($modulesHandler->getList()); $form->addElement($modules_select, true); - $form->addElement(new XoopsFormLabel(_AM_TDMCREATE_FORM_INFO_TABLE,_AM_TDMCREATE_FORM_INFO_TABLE_FIELD)); + /*$form->addElement(new XoopsFormLabel(_AM_TDMCREATE_FORM_INFO_TABLE,_AM_TDMCREATE_FORM_INFO_TABLE_FIELD)); $select_submitter = $this->isNew() ? 0 : $this->getVar('tables_submitter'); $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_SUBMITTER, 'tables_submitter', $select_submitter, _YES, _NO)); - $select_date_created = $this->isNew() ? 0 : $this->getVar('tables_date_created'); - $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_DATE_CREATED, 'tables_date_created', $select_date_created, _YES, _NO)); + $select_created = $this->isNew() ? 0 : $this->getVar('tables_created'); + $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_CREATED, 'tables_created', $select_created, _YES, _NO)); $select_online = $this->isNew() ? 0 : $this->getVar('tables_online'); - $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_ONLINE, 'tables_online', $select_online, _YES, _NO)); + $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_ONLINE, 'tables_online', $select_online, _YES, _NO));*/ $tables_img1 = $this->getVar('tables_img') ? $this->getVar('tables_img') : 'blank.gif'; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_header.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_header.php 2012-04-15 12:28:46 UTC (rev 9331) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_header.php 2012-04-15 15:26:28 UTC (rev 9332) @@ -61,15 +61,13 @@ $pathImageAdmin = XOOPS_URL .\'/\'. $moduleInfo->getInfo(\'icons32\'); '; - foreach (array_keys($tables_arr) as $i) { -$text .= '$'.$tables_arr[$i]->getVar("tables_name").'Handler=& xoops_getModuleHandler(\''.$modules_name.'_'.$tables_arr[$i]->getVar("tables_name"). '\', $dirname); - + $t_name = $tables_arr[$i]->getVar("tables_name"); +$text .= '$'.$t_name.'Handler=& xoops_getModuleHandler(\''.$modules_name.'_'.$t_name.'\', $dirname); '; } $text .=<<<'EOD' - $myts =& MyTextSanitizer::getInstance(); if ($xoopsUser) { Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_pages.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_pages.php 2012-04-15 12:28:46 UTC (rev 9331) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_pages.php 2012-04-15 15:26:28 UTC (rev 9332) @@ -20,16 +20,12 @@ include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_entete.php'; include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php'; -function const_admin_pages($modules, $modules_name, $tables_id, $tables_module_table, $tables_name, $tables_img, $tables_champs, $tables_parametres) +function const_admin_pages($modules, $modules_name, $tables_id, $tables_module_table, $tables_name, $tables_img, $tables_champs, $tables_parametres, $topic) { $language = '_AM_'.strtoupper($modules_name).''; - $language_manager = '_AM_'.strtoupper($modules_name).'_'.strtoupper($tables_name).''; - - $modules_name_minuscule = strtolower($modules_name); $file = $tables_name.".php"; $path_file = TDM_CREATE_MURL."/".$modules_name."/admin/".$file; $en_tete = const_entete($modules, 0); - $text = '<?php'.$en_tete.' include "admin_header.php"; xoops_cp_header(); @@ -90,7 +86,7 @@ $pagenav = \'\'; } '; - if ( $tables_name != 'topic' ) + if ( $topic != 1 ) { $text .=' // View Table @@ -98,66 +94,86 @@ { echo "<table class=\'outer width100\' cellspacing=\'1\'> <tr> + <th class=\'center width2\'>".'.$language.'_'.strtoupper($tables_name).'_ID."</th> '; $champs_colonne_name = const_show_champs_parametres($modules_name, $tables_name, $champs_id, $nb_champs, $champs, $champs_param_display_admin, $champs_param_type, $language, '', 0); - $text .= ''.$champs_colonne_name.' - <th class=\'center width5\'>".'.$language.'_FORMACTION."</th> + $text .= ''.$champs_colonne_name.'<th class=\'center width5\'>".'.$language.'_FORMACTION."</th> </tr>"; $class = "odd"; foreach (array_keys($'.$tables_name.'_arr) as $i) - { + { '; + if( $topic == 1) { + $text .= ' if ( $'.$tables_name.'_arr[$i]->getVar("topic_pid") == 0) { echo "<tr class=\'".$class."\'>"; $class = ($class == "even") ? "odd" : "even"; + echo "<td class=\'center\'>".$i."</td>"; '; $champs_data = const_show_champs_parametres($modules_name, $tables_name, $champs_id, $nb_champs, $champs, $champs_param_display_admin, $champs_param_type, $language, '', 1); - $text .= ''.$champs_data.' + $text .= $champs_data.' echo "<td class=\'center width5\'> - <a href=\"'.$tables_name.'.php?op=edit_'.$tables_name.'&'.$champs_id.'=".$'.$tables_name.'_arr[$i]->getVar("'.$champs_id.'")."\"><img src=".$pathImageIcon."/edit.png alt=\""._EDIT."\" title=\""._EDIT."\"></a> - <a href=\"'.$tables_name.'.php?op=delete_'.$tables_name.'&'.$champs_id.'=".$'.$tables_name.'_arr[$i]->getVar("'.$champs_id.'")."\"><img src=".$pathImageIcon."/delete.png alt=\""._DELETE."\" title=\""._DELETE."\"></a> + <a href=\''.$tables_name.'.php?op=edit_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathImageIcon."/edit.png alt=\'"._EDIT."\' title=\'"._EDIT."\'></a> + <a href=\''.$tables_name.'.php?op=delete_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathImageIcon."/delete.png alt=\'"._DELETE."\' title=\'"._DELETE."\'></a> </td>"; echo "</tr>"; - } + }'; + } else { + $text .= ' + echo "<tr class=\'".$class."\'>"; + $class = ($class == "even") ? "odd" : "even"; + echo "<td class=\'center\'>".$i."</td>"; + '; + $champs_data = const_show_champs_parametres($modules_name, $tables_name, $champs_id, $nb_champs, $champs, $champs_param_display_admin, $champs_param_type, $language, '', 1); + + $text .= $champs_data.' + echo "<td class=\'center width5\'> + <a href=\''.$tables_name.'.php?op=edit_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathImageIcon."/edit.png alt=\'"._EDIT."\' title=\'"._EDIT."\'></a> + <a href=\''.$tables_name.'.php?op=delete_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathImageIcon."/delete.png alt=\'"._DELETE."\' title=\'"._DELETE."\'></a> + </td>"; + echo "</tr>";'; + } + $text .= ' } - echo "</table><br><br>"; + echo "</table><br /><br />"; echo "<br /><div class=\'center\'>" . $pagenav . "</div><br />"; } else { echo "<table class=\'outer width100\' cellspacing=\'1\'> - <tr> - '; + <tr> + <th class=\'center width2\'>".'.$language.'_'.strtoupper($tables_name).'_ID."</th> + '; $champs_colonne_name = const_show_champs_parametres($modules_name, $tables_name, $champs_id, $nb_champs, $champs, $champs_param_display_admin, $champs_param_type, $language, '', 0); - $text .= ''.$champs_colonne_name.' - <th class=\'center width5\'>".'.$language.'_FORMACTION."</th> + $text .= ''.$champs_colonne_name.'<th class=\'center width5\'>".'.$language.'_FORMACTION."</th> </tr>"; - echo "</table><br><br>"; + echo "</table><br /><br />"; } '; } else { $text .= ' - //Fonction qui permet afficher les catégories enfants + //Function that enables display child categories function '.$modules_name.'_display_children($topic_id = 0, $topic_arr, $prefix = "", $order = "", &$class) { global $pathImageIcon; $topicHandler =& xoops_getModuleHandler("'.$tables_module_table.'", "'.$modules_name.'"); - $prefix = $prefix."<img src=\"".XOOPS_URL."/modules/'.$modules_name.'/images/deco/arrow.gif\">"; + $prefix = $prefix."<img src=\'".XOOPS_URL."/modules/'.$modules_name.'/images/deco/arrow.gif\'>"; foreach (array_keys($topic_arr) as $i) { $topic_id = $topic_arr[$i]->getVar("topic_id"); $topic_img = $topic_arr[$i]->getVar("topic_img"); $topic_title = $topic_arr[$i]->getVar("topic_title"); $topic_weight = $topic_arr[$i]->getVar("topic_weight"); - echo "<tr class=\"".$class."\">"; + echo "<tr class=\'".$class."\'>"; + echo "<td class=\'center\'>".$i."</td>"; '; $champs_data = const_show_champs_parametres($modules_name, $tables_name, $champs_id, $nb_champs, $champs, $champs_param_display_admin, $champs_param_type, $language, 1, 1); - $text .= ''.$champs_data.' - echo "<td class=\'center\' width=\"10%\"> - <a href=\"'.$tables_name.'.php?op=edit_'.$tables_name.'&'.$champs_id.'=".$'.$tables_name.'_arr[$i]->getVar("'.$champs_id.'")."\"><img src=".$pathImageIcon."/edit.png alt=\""._EDIT."\" title=\""._EDIT."\"></a> - <a href=\"'.$tables_name.'.php?op=delete_'.$tables_name.'&'.$champs_id.'=".$'.$tables_name.'_arr[$i]->getVar("'.$champs_id.'")."\"><img src=".$pathImageIcon."/delete.png alt=\""._DELETE."\" title=\""._DELETE."\"></a> + $text .= $champs_data.' + echo "<td class=\'center\' width=\'10%\'> + <a href=\''.$tables_name.'.php?op=edit_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathImageIcon."/edit.png alt=\'"._EDIT."\' title=\'"._EDIT."\'></a> + <a href=\''.$tables_name.'.php?op=delete_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathImageIcon."/delete.png alt=\'"._DELETE."\' title=\'"._DELETE."\'></a> </td> </tr>"; $class = ($class == "even") ? "odd" : "even"; @@ -179,29 +195,32 @@ { echo "<table class=\'outer width100\' cellspacing=\'1\'> <tr> - '; + <th class=\'center width2\'>".'.$language.'_'.strtoupper($tables_name).'_ID."</th> + '; $champs_colonne_name = const_show_champs_parametres($modules_name, $tables_name, $champs_id, $nb_champs, $champs, $champs_param_display_admin, $champs_param_type, $language, '', 0); - $text .= $champs_colonne_name.' - <th class=\'center width5\'>".'.$language.'_FORMACTION."</th> + $text .= $champs_colonne_name.'<th class=\'center width5\'>".'.$language.'_FORMACTION."</th> </tr>"; $class = "odd"; - $prefix = "<img src=\"".XOOPS_URL."/modules/'.$modules_name.'/images/deco/arrow.gif\">"; + $prefix = "<img src=\'".XOOPS_URL."/modules/'.$modules_name.'/images/deco/arrow.gif\'>"; foreach (array_keys($'.$tables_name.'_arr) as $i) - { + { + '; + if( $topic == 1) { + $text .= ' if ( $'.$tables_name.'_arr[$i]->getVar("topic_pid") == 0 ) { $topic_id = $'.$tables_name.'_arr[$i]->getVar("topic_id"); $topic_img = $'.$tables_name.'_arr[$i]->getVar("topic_img"); $topic_title = $'.$tables_name.'_arr[$i]->getVar("topic_title"); $topic_weight = $'.$tables_name.'_arr[$i]->getVar("topic_weight"); - echo "<tr class=\'".$class."\'>"; + echo "<tr class=\'".$class."\'>"; '; $champs_data = const_show_champs_parametres($modules_name, $tables_name, $champs_id, $nb_champs, $champs, $champs_param_display_admin, $champs_param_type, $language, 1, 1); $text .= ''.$champs_data.' echo "<td class=\'center width5\'> - <a href=\"'.$tables_name.'.php?op=edit_'.$tables_name.'&'.$champs_id.'=".$'.$tables_name.'_arr[$i]->getVar("'.$champs_id.'")."\"><img src=".$pathImageIcon."/edit.png alt=\""._EDIT."\" title=\""._EDIT."\"></a> - <a href=\"'.$tables_name.'.php?op=delete_'.$tables_name.'&'.$champs_id.'=".$'.$tables_name.'_arr[$i]->getVar("'.$champs_id.'")."\"><img src=".$pathImageIcon."/delete.png alt=\""._DELETE."\" title=\""._DELETE."\"></a> + <a href=\''.$tables_name.'.php?op=edit_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathImageIcon."/edit.png alt=\'"._EDIT."\' title=\'"._EDIT."\'></a> + <a href=\''.$tables_name.'.php?op=delete_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathImageIcon."/delete.png alt=\'"._DELETE."\' title=\'"._DELETE."\'></a> </td> </tr>"; $class = ($class == "even") ? "odd" : "even"; @@ -216,19 +235,36 @@ { '.$modules_name.'_display_children($topic_id, $topic_pid, $prefix, "topic_title", $class); } - } + }'; + } else { + $text .= ' + echo "<tr class=\'".$class."\'>"; + $class = ($class == "even") ? "odd" : "even"; + echo "<td class=\'center\'>".$i."</td>"; + '; + $champs_data = const_show_champs_parametres($modules_name, $tables_name, $champs_id, $nb_champs, $champs, $champs_param_display_admin, $champs_param_type, $language, '', 1); + + $text .= $champs_data.' + echo "<td class=\'center width5\'> + <a href=\''.$tables_name.'.php?op=edit_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathImageIcon."/edit.png alt=\'"._EDIT."\' title=\'"._EDIT."\'></a> + <a href=\''.$tables_name.'.php?op=delete_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathImageIcon."/delete.png alt=\'"._DELETE."\' title=\'"._DELETE."\'></a> + </td>"; + echo "</tr>";'; + } + $text .= ' } - echo "</table><br><br>"; + echo "</table><br /><br />"; echo "<br /><div class=\'center\'>" . $pagenav . "</div><br />"; } else { echo "<table class=\'outer width100\' cellspacing=\'1\'> <tr> - '; + <th class=\'center width2\'>".'.$language.'_'.strtoupper($tables_name).'_ID."</th> + '; $champs_colonne_name = const_show_champs_parametres($modules_name, $tables_name, $champs_id, $nb_champs, $champs, $champs_param_display_admin, $champs_param_type, $language, '', 0); $text .= ''.$champs_colonne_name.' <th class=\'center width5\'>".'.$language.'_FORMACTION."</th> </tr>"; - echo "</table><br><br>"; + echo "</table><br /><br />"; } '; } Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_class.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_class.php 2012-04-15 12:28:46 UTC (rev 9331) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_class.php 2012-04-15 15:26:28 UTC (rev 9332) @@ -23,9 +23,7 @@ function const_class($modules, $modules_name, $tables_module_table, $tables_name, $tables_champs, $tables_parametres) { $language = '_AM_'.strtoupper($modules_name).'_'; - $modules_name_minuscule = strtolower($modules_name); - $class_name = $tables_name; - $file = $modules_name.'_'.$class_name. ".php"; + $file = $modules_name.'_'.$tables_name. ".php"; $path_file = TDM_CREATE_MURL."/".$modules_name."/class/".$file; $constructor = const_champs($modules_name, $tables_module_table, $tables_name, $tables_champs, $language, 0, 0, 0, 0); $en_tete = const_entete($modules, 0); @@ -57,7 +55,7 @@ } } - $form = const_champs($modules_name, $tables_module_table, $tables_name, $tables_champs, $language, $champs_param_display_form, $champs_param_elements,$champs_param_required_field, 1); + $form = const_champs($modules_name, $tables_module_table, $tables_name, $tables_champs, $language, $champs_param_display_form, $champs_param_elements, $champs_param_required_field, 1); $text = '<?php'.$en_tete.' if (!defined("XOOPS_ROOT_PATH")) { Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_header.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_header.php 2012-04-15 12:28:46 UTC (rev 9331) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_header.php 2012-04-15 15:26:28 UTC (rev 9332) @@ -34,21 +34,12 @@ $text .= ' /** * **************************************************************************** - * - Original Copyright (TDM) - * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS - * - Licence GPL Copyright (c) (http://www.tdmxoops.net) - * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) - * - Revision By TXMod Xoops (http://www.txmodxoops.org) + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) * **************************************************************************** * '.strtoupper($modules_name).' - MODULE FOR XOOPS * Copyright (c) 2007 - '.date("Y").' - * '.$modules_author.' ('.$modules_author_website_url.') + * '.$modules_author.' ( '.$modules_author_website_url.' ) * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * * You may not change or alter any portion of this comment or credits * of supporting developers from this source code or any supporting * source code which is considered copyrighted (c) material of the @@ -59,10 +50,10 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * --------------------------------------------------------------------------- - * @copyright '.$modules_author.' ('.$modules_author_website_url.') - * @license '.$modules_license.' - * @package '.$modules_name.' - * @author '.$modules_author.' ('.$modules_author_mail.') + * @copyright '.$modules_author.' ( '.$modules_author_website_url.' ) + * @license '.$modules_license.' + * @package '.$modules_name.' + * @author '.$modules_author.' ( '.$modules_author_mail.' ) * * Version : '.$modules_version.' '.date("D Y/m/d G:i:s").' : '.$modules_credits.' Exp $ * **************************************************************************** Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_configs.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_configs.php 2012-04-15 12:28:46 UTC (rev 9331) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_configs.php 2012-04-15 15:26:28 UTC (rev 9332) @@ -19,7 +19,6 @@ */ include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_entete.php'; include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/class/tdmcreate_modules.php'; function const_include_configs($modules, $modules_name, $modules_a_w_name, $modules_a_w_url) { $language = '_MA_'.strtoupper($modules_name).''; @@ -30,12 +29,9 @@ if( ! defined( \'XOOPS_ROOT_PATH\' ) ) exit ; define("'.strtoupper($modules_name).'_PATH", XOOPS_ROOT_PATH."/modules/'.$modules_name.'"); define("'.strtoupper($modules_name).'_URL", XOOPS_URL."/modules/'.$modules_name.'"); -define("'.strtolower($modules_name).'_url", "'.strtoupper($modules_name).'_URL"); // module information $mod_img = '.strtoupper($modules_name).'_URL."/images/'.str_replace(" ", "", strtolower($modules_a_w_name)).'_logo.png"; -// Attention: if don't have declared ( _ADMIN ) variable, you can do in languages/yourlanguage/global.php -$mod_admin = "<a href=\'".'.strtoupper($modules_name).'_URL."/admin/index.php\'><strong>".'.$language.'_ADMIN."</strong></a>"; $mod_copyright = "<a href=\''.$modules_a_w_url.'\' title=\''.$modules_a_w_name.'\' target=\'_blank\'> <img src=\'".$mod_img."\' alt=\''.$modules_a_w_name.'\' /></a>"; ?>'; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_functions.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_functions.php 2012-04-15 12:28:46 UTC (rev 9331) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_functions.php 2012-04-15 15:26:28 UTC (rev 9332) @@ -92,6 +92,21 @@ $xoopsTpl->assign(\'xoops_meta_description\', strip_tags($content)); } } + +/** + * Convert StringToTime Date + * + * @param mixed $date + * @return + */ +function '.$modules_name.'_convertDate($date) +{ + if (strpos(_SHORTDATESTRING, "/")) + { + $date=str_replace("/", "-", $date); + } + return strtotime($date); +} ?>'; createFile($path_file, $text, Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_templates_header.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_templates_header.php 2012-04-15 12:28:46 UTC (rev 9331) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_templates_header.php 2012-04-15 15:26:28 UTC (rev 9332) @@ -28,8 +28,8 @@ $en_tete = const_entete($modules, 0); $text = '<div class="box-header"> - <span class="left"><b><{$smarty.const.'.$language.'TITLE}></b>: '.$modules_name.'</span><br /> - <span class="left"><{$smarty.const.'.$language.'DESC}>: '.$modules_desc.'</span> + <span class="left"><b>Title</b>: <{$smarty.const.'.$language.'TITLE}></span><br /> + <span class="left">Description: <{$smarty.const.'.$language.'DESC}></span> </div> <br /> <{if $adv != \'\'}> Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_templates_pages.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_templates_pages.php 2012-04-15 12:28:46 UTC (rev 9331) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_templates_pages.php 2012-04-15 15:26:28 UTC (rev 9332) @@ -27,7 +27,7 @@ $path_file = TDM_CREATE_MURL."/".$modules_name."/templates/".$file; $en_tete = const_entete($modules, 0); - $text = '<{include file="db:'.$modules_name.'_header.html"}>'; + $text = '<{include file="db:'.strtolower($modules_name).'_header.html"}>'; if($tables_module_table != null){ $text .= ' <div class="outer"> @@ -77,7 +77,7 @@ </div>'; } $text .= ' -<{include file="db:'.$modules_name.'_footer.html"}> +<{include file="db:'.strtolower($modules_name).'_footer.html"}> '; createFile($path_file, $text, _AM_TDMCREATE_CONST_OK_TEMPLATES, Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_user_pages.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_user_pages.php 2012-04-15 12:28:46 UTC (rev 9331) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_user_pages.php 2012-04-15 15:26:28 UTC (rev 9332) @@ -20,7 +20,7 @@ include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_entete.php'; include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php'; -function const_user_pages($modules, $modules_name, $tables_name, $tables_champs, $tables_parametres) +function const_user_pages($modules, $modules_name, $tables_name, $tables_champs, $tables_parametres, $topic) { $language = '_MA_'.strtoupper($modules_name).''; $file = $tables_name.".php"; @@ -97,23 +97,23 @@ $numrows = $'.$tables_name.'Handler->getCount(); $'.$tables_name.'_arr = $'.$tables_name.'Handler->getall($criteria); '; - if ( $tables_name != 'topic' ) + if ( $topic != 1 ) { $text .=' - // Table View - if ($numrows>0) - { - echo "<table width=\"100%\" cellspacing=\"1\" class=\"outer\"> - <tr> - '; - $champs_colonne_name = const_show_champs_parametres($modules_name, $tables_name, $champs_id, $nb_champs, $champs, $champs_param_display_admin, $champs_param_type, $language, '', 0); - $text .= ''.$champs_colonne_name.' - </tr>"; - - $class = "odd"; - echo "</table><br /><br />"; - } - '; + // Table View + if ($numrows>0) + { + echo "<table width=\"100%\" cellspacing=\"1\" class=\"outer\"> + <tr> + '; + $champs_colonne_name = const_show_champs_parametres($modules_name, $tables_name, $champs_id, $nb_champs, $champs, $champs_param_display_admin, $champs_param_type, $language, '', 0); + $text .= ''.$champs_colonne_name.' + </tr>"; + + $class = "odd"; + echo "</table><br /><br />"; + } + break; '; } $text .= ' } Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_xoopsversion.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_xoopsversion.php 2012-04-15 12:28:46 UTC (rev 9331) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_xoopsversion.php 2012-04-15 15:26:28 UTC (rev 9332) @@ -151,7 +151,7 @@ $language1 = $language.'_'.strtoupper($tables_name).''; $modvb = ''.$modv.'[\'blocks\'][$i]'; $text .= ' -'.$modvb.'[$i][\'file\'] = "blocks_'.$tables_name.'.php"; +'.$modvb.'[\'file\'] = "blocks_'.$tables_name.'.php"; '.$modvb.'[\'name\'] = '.$language1.'_BLOCK_RECENT; '.$modvb.'[\'description\'] = ""; '.$modvb.'[\'show_func\'] = "b_'.strtolower($tm_table).'"; @@ -198,8 +198,7 @@ '.$modvc.'[\'formtype\'] = "textbox"; '.$modvc.'[\'valuetype\'] = "text"; '.$modvc.'[\'default\'] = ""; -$i++; -'; +$i++;'; foreach (array_keys($tables_arr) as $i) { $tables_name = $tables_arr[$i]->getVar("tables_name"); @@ -232,7 +231,6 @@ '.$modvc.'[\'valuetype\'] = "int"; '.$modvc.'[\'default\'] = "10485760"; $i++; - //Uploads : mimetypes '.$structure_champs[0].' '.$modvc.'[\'name\'] = "mimetypes"; '.$modvc.'[\'title\'] = "'.$language.'_MIMETYPES"; @@ -242,8 +240,7 @@ '.$modvc.'[\'default\'] = array("image/gif", "image/jpeg", "image/png"); '.$modvc.'[\'options\'] = array("bmp" => "image/bmp","gif" => "image/gif","jpeg" => "image/pjpeg", "jpeg" => "image/jpeg","jpg" => "image/jpeg","jpe" => "image/jpeg","png" => "image/png"); -$i++; -'; +$i++;'; } else if ( $structure_parametres[0] == 'XoopsFormUploadFile' ) { $text .= ' //Uploads : size '.$structure_champs[0].' @@ -254,7 +251,6 @@ '.$modvc.'[\'valuetype\'] = "int"; '.$modvc.'[\'default\'] = "10485760"; $i++; - //Uploads : mimetypes '.$structure_champs[0].' '.$modvc.'[\'name\'] = "mimetypes"; '.$modvc.'[\'title\'] = "'.$language.'_MIMETYPES"; @@ -263,8 +259,7 @@ '.$modvc.'[\'valuetype\'] = "array"; '.$modvc.'[\'default\'] = array("image/gif", "image/jpeg", "image/png"); '.$modvc.'[\'options\'] = XoopsLists::getMimetypesList(); -$i++; -'; +$i++;'; } } } Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions_const.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions_const.php 2012-04-15 12:28:46 UTC (rev 9331) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions_const.php 2012-04-15 15:26:28 UTC (rev 9332) @@ -198,26 +198,25 @@ if ( $i == $nb_champs - 1 ) { $text .= ' - $online = $'.$tables_name.'_arr[$i]->getVar("'.$champs[$i].'"); - + $online = $'.$tables_name.'_arr[$i]->getVar("'.$champs[$i].'"); if( $online == 1 ) {'; $text .= ' - echo "<td class=\'center\'><a href=\"./'.$tables_name.'.php?op=update_online_'.$tables_name.'&'.$champs_id.'=".$'.$tables_name.'_arr[$i]->getVar("'.$champs_id.'")."&'.$tables_name.'_online=0\"><img src=".$pathImageIcon."/on.png border=\"0\" alt=\"".'.$language.'_ON."\" title=\"".'.$language.'_ON."\"></a></td>"; + echo "<td class=\'center\'><a href=\''.$tables_name.'.php?op=update_online_'.$tables_name.'&'.$champs_id.'=".$i."&'.$tables_name.'_online=0\'><img src=".$pathImageIcon."/on.png border=\'0\' alt=\'".'.$language.'_ON."\' title=\'".'.$language.'_ON."\'></a></td>"; } else {'; $text .= ' - echo "<td class=\'center\'><a href=\"./'.$tables_name.'.php?op=update_online_'.$tables_name.'&'.$champs_id.'=".$'.$tables_name.'_arr[$i]->getVar("'.$champs_id.'")."&'.$tables_name.'_online=1\"><img src=".$pathImageIcon."/off.png border=\"0\" alt=\"".'.$language.'_OFF."\" title=\"".'.$language.'_OFF."\"></a></td>"; + echo "<td class=\'center\'><a href=\''.$tables_name.'.php?op=update_online_'.$tables_name.'&'.$champs_id.'=".$i."&'.$tables_name.'_online=1\'><img src=".$pathImageIcon."/off.png border=\'0\' alt=\'".'.$language.'_OFF."\' title=\'".'.$language.'_OFF."\'></a></td>"; }'; } else if ( $champs[$i] == 'topic_title' ) { if ( $prefix == 1 ) { $text .= 'echo "<td class=\'left\'>".$prefix." ".$topic_arr[$i]->getVar("'.$champs[$i].'")."</td>"; '; } else { - $text .= 'echo "<td class=\'left\'><img src=\"".XOOPS_URL."/modules/'.$modules_name.'/images/deco/arrow.gif\"> ".$topic_arr[$i]->getVar("'.$champs[$i].'")."</td>"; + $text .= 'echo "<td class=\'left\'><img src=\'".'.strtoupper($modules_name).'_URL."/images/deco/arrow.gif\'> ".$topic_arr[$i]->getVar("'.$champs[$i].'")."</td>"; '; } } else if ( $champs_param_type[$i] == 'XoopsFormUploadImage' ) { - $text .= 'echo "<td class=\'center\'><img src=\"".XOOPS_URL."/uploads/'.$modules_name.'/'.$tables_name.'/'.$champs[$i].'/".$'.$tables_name.'_arr[$i]->getVar("'.$champs[$i].'")."\" height=\"30px\" title=\"'.$champs[$i].'\" alt=\"'.$champs[$i].'\"></td>"; + $text .= 'echo "<td class=\'center\'><img src=\'".XOOPS_UPLOAD_URL."/'.$modules_name.'/images/".$'.$tables_name.'_arr[$i]->getVar("'.$champs[$i].'")."\' height=\'30px\' title=\''.$champs[$i].'\' alt=\''.$champs[$i].'\'></td>"; '; } else if ( $champs_param_type[$i] == 'XoopsFormUploadFile' ) { @@ -225,7 +224,7 @@ '; } else if ( $champs_param_type[$i] == 'XoopsFormColorPicker' ) { - $text .= 'echo "<td class=\'center\'><span style=\"background-color:".$'.$tables_name.'_arr[$i]->getVar("'.$champs[$i].'")."\"> </span> -> ".$'.$tables_name.'_arr[$i]->getVar("'.$champs[$i].'")."</td>"; + $text .= 'echo "<td class=\'center\'><span style=\'background-color:".$'.$tables_name.'_arr[$i]->getVar("'.$champs[$i].'")."\'> </span> -> ".$'.$tables_name.'_arr[$i]->getVar("'.$champs[$i].'")."</td>"; '; } else if ( $champs_param_type[$i] == 'XoopsFormTextDateSelect' ) { @@ -284,7 +283,6 @@ } } } - $text .= ' $'.$data[1].' =& $'.$data[1].'Handler->get($'.$tables_name.'_arr[$i]->getVar("'.$champs[$i].'")); $title_'.$data[1].' = $'.$data[1].'->getVar("'.$champs_param_main_field.'"); @@ -303,7 +301,7 @@ if ( $champs_param_type[$i] == 'XoopsFormTextDateSelect' ) { $text .= '//Form '.$champs[$i].' - $obj->setVar("'.$champs[$i].'", strtotime($_REQUEST["'.$champs[$i].'"])); + $obj->setVar("'.$champs[$i].'", '.$modules_name.'_convertDate($_REQUEST["'.$champs[$i].'"])); '; } else if ( $champs_param_type[$i] == 'XoopsFormCheckBox' || $champs_param_type[$i] == 'XoopsFormRadioYN' ) { $text .= '//Form '.$champs[$i].' @@ -438,10 +436,22 @@ '; break; + case "XoopsFormSelect": + $data = explode("-", $champs_param_elements[$i]); + $text .= ' + $'.$data[1].'Handler =& xoops_getModuleHandler("'.$modules_name.'_'.$data[1].'", "'.$modules_name.'"); + $'.$data[1].'_select = new XoopsFormSelect('.$language_form.', "'.$structure0.'", $this->getVar("'.$structure0.'")); + $'.$data[1].'_select->addOptionArray($'.$data[1].'Handler->getList()); + $form->addElement($'.$data[1].'_select, '.$required_field.'); + '; + unset($data); + break; + case "XoopsFormSelectUser": $text .= '$form->addElement(new XoopsFormSelectUser('.$language_form.', "'.$structure0.'", false, $this->getVar("'.$structure0.'"), 1, false), '.$required_field.'); '; break; + case "XoopsFormTopic": $text .= ' include_once(XOOPS_ROOT_PATH."/class/tree.php"); @@ -464,24 +474,18 @@ break; default: - $data = explode("-", $champs_param_elements[$i]); - /*$text .= ' - $'.$data[1].'Handler =& xoops_getModuleHandler("'.$modules_name.'_'.$data[1].'", "'.$modules_name.'"); - $'.$data[1].'_select = new XoopsFormSelect('.$language_form.', "'.$structure0.'", $this->getVar("'.$structure0.'")); - $'.$data[1].'_select->addOptionArray($'.$data[1].'Handler->getList()); - $form->addElement($'.$data[1].'_select, '.$required_field.'); - '; - $data = substr($structure0, 0, strpos($structure0, '_'));*/ + $data = explode("-", $champs_param_elements[$i]); $text .= ' include_once(XOOPS_ROOT_PATH."/class/tree.php"); $'.$data[1].'Handler =& xoops_getModuleHandler("'.$modules_name.'_'.$data[1].'", "'.$modules_name.'"); $criteria = new CriteriaCompo(); - $criteria->setSort(\''.$data[1].'_id\'); + $criteria->setSort(\''.$data[1].'_id ASC, '.$data[1].'_title\'); $criteria->setOrder(\'ASC\'); $'.$data[1].'_arr = $'.$data[1].'Handler->getall(); $mytree = new XoopsObjectTree($'.$data[1].'_arr, "'.$data[1].'_id", "'.$data[1].'_pid"); $form->addElement(new XoopsFormLabel('.$language_form.', $mytree->makeSelBox("'.$data[1].'_pid", "'.$data[1].'_title","--", $this->getVar("'.$data[1].'_pid"),'.$required_field.'))); '; + unset($data); break; } return $text; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php 2012-04-15 12:28:46 UTC (rev 9331) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php 2012-04-15 15:26:28 UTC (rev 9332) @@ -48,7 +48,7 @@ define("_AM_TDMCREATE_FORMDEL", "Clear"); define("_AM_TDMCREATE_FORMCHAMPS", "Edit fields"); define("_AM_TDMCREATE_FORM_INFO_TABLE", "Information on the table"); -define("_AM_TDMCREATE_FORM_INFO_TABLE_FIELD", "You can add your choice 3 fields in this table: table_submitter, table_date_created, table_online"); +define("_AM_TDMCREATE_FORM_INFO_TABLE_FIELD", "You can add your choice 3 fields in this table: '<b>table</b>'_submitter, '<b>table</b>'_created, '<b>table</b>'_online"); define("_AM_TDMCREATE_NAME", "Name"); define("_AM_TDMCREATE_BLOCS", "Blocks"); @@ -104,9 +104,9 @@ define("_AM_TDMCREATE_TABLES_BLOCS", "Create a new block for this table (blocks: random, latest, today)"); define("_AM_TDMCREATE_TABLES_DISPLAY_ADMIN", "Use the side view of TAB Admin"); define("_AM_TDMCREATE_TABLES_DISPLAY_USER", "Use the side view of TAB Member"); -define("_AM_TDMCREATE_TABLES_SUBMITTER", "Add submitter"); -define("_AM_TDMCREATE_TABLES_DATE_CREATED", "Add date created"); -define("_AM_TDMCREATE_TABLES_ONLINE", "Add online"); +define("_AM_TDMCREATE_TABLES_SUBMITTER", "Add champ submitter?"); +define("_AM_TDMCREATE_TABLES_CREATED", "Add champ date created?"); +define("_AM_TDMCREATE_TABLES_ONLINE", "Add champ online?"); define("_AM_TDMCREATE_TABLES_SEARCH", "Active research for this table <br> <i>the form for the moment, is able to handle the search on the table <br> If you confirm the search option will be disabled</i>"); define("_AM_TDMCREATE_TABLES_EXIST", "The name specified for this table is already in use"); define("_AM_TDMCREATE_TABLES_COMS", "Enable the search in this table <br> <i>the module can manage for the moment, the coms on a table <br> Coms option will be disabled if you Confirmed</i>"); Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/italian/admin.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/italian/admin.php 2012-04-15 12:28:46 UTC (rev 9331) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/italian/admin.php 2012-04-15 15:26:28 UTC (rev 9332) @@ -48,7 +48,7 @@ define("_AM_TDMCREATE_FORMDEL","Cancella"); define("_AM_TDMCREATE_FORMCHAMPS","Modifica campi"); define("_AM_TDMCREATE_FORM_INFO_TABLE","Informazione sulla tabella"); -define("_AM_TDMCREATE_FORM_INFO_TABLE_FIELD","Si possono aggiungere a scelta 3 campi in questa tabella : table_submitter, table_date_created, table_online"); +define("_AM_TDMCREATE_FORM_INFO_TABLE_FIELD","Si possono aggiungere a scelta 3 campi in questa tabella : '<b>table</b>'_submitter, '<b>table</b>'_created, '<b>table</b>'_online"); define("_AM_TDMCREATE_NAME", "Nome"); define("_AM_TDMCREATE_BLOCS", "Blocchi"); @@ -102,9 +102,9 @@ define("_AM_TDMCREATE_TABLES_BLOCS", "Crea un nuovo blocco per questa tabella (blocchi: casuali, recenti, oggi)"); define("_AM_TDMCREATE_TABLES_DISPLAY_ADMIN", "Usa vista TAB lato Admin"); define("_AM_TDMCREATE_TABLES_DISPLAY_USER", "Usa vista TAB lato Utente"); -define("_AM_TDMCREATE_TABLES_SUBMITTER", "Aggiungere utente che invia"); -define("_AM_TDMCREATE_TABLES_DATE_CREATED", "Aggiungere data creazione"); -define("_AM_TDMCREATE_TABLES_ONLINE", "Aggiungere online"); +define("_AM_TDMCREATE_TABLES_SUBMITTER", "Aggiungere campo utente che invia?"); +define("_AM_TDMCREATE_TABLES_CREATED", "Aggiungere campo data creazione?"); +define("_AM_TDMCREATE_TABLES_ONLINE", "Aggiungere campo online?"); define("_AM_TDMCREATE_TABLES_SEARCH", "Attiva la ricerca per questa tabella <br> <i>il modulo per il momento, è in grado di gestire la ricerca sulla tabella <br>Se confermi l'opzione di ricerca verrà disabilitata</i>"); define("_AM_TDMCREATE_TABLES_EXIST", "Il nome specificato per questa tabella è già in uso"); define("_AM_TDMCREATE_TABLES_COMS","Enable the search in this table <br><i>the module can manage for the moment, the coms on a table<br>Coms option will be disabled if you confirmed</i>"); Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/sql/mysql.sql =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/sql/mysql.sql 2012-04-15 12:28:46 UTC (rev 9331) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/sql/mysql.sql 2012-04-15 15:26:28 UTC (rev 9332) @@ -43,7 +43,7 @@ `tables_display_admin` tinyint(1) NOT NULL default '1', `tables_display_user` tinyint(1) NOT NULL default '0', `tables_submitter` tinyint(1) NOT NULL default '0', - `tables_date_created` tinyint(1) NOT NULL default '0', + `tables_created` tinyint(1) NOT NULL default '0', `tables_online` tinyint(1) NOT NULL default '0', `tables_search` tinyint(1) NOT NULL default '0', `tables_coms` tinyint(1) NOT NULL default '0', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-04-15 16:54:30
|
Revision: 9334 http://xoops.svn.sourceforge.net/xoops/?rev=9334&view=rev Author: txmodxoops Date: 2012-04-15 16:54:23 +0000 (Sun, 15 Apr 2012) Log Message: ----------- Updated Modified Paths: -------------- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions_const.php Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-04-15 15:27:10 UTC (rev 9333) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-04-15 16:54:23 UTC (rev 9334) @@ -387,7 +387,7 @@ if ($tablesHandler->insert($obj)) { $tables_id = $xoopsDB->getInsertId(); $obj = $tablesHandler->get($tables_id); - $form = $obj->getFormChamps(false, $tables_id, intval($_REQUEST['tables_modules']), strtolower($_REQUEST['tables_name']), $tables_blocks, $tables_display_admin, $tables_display_user, $tables_submitter, $tables_date_created, $tables_online, $tables_search, $tables_coms, intval($_REQUEST['tables_nb_champs']), $select); + $form = $obj->getFormChamps(false, $tables_id, intval($_REQUEST['tables_modules']), strtolower($_REQUEST['tables_name']), $tables_blocks, $tables_display_admin, $tables_display_user, $tables_search, $tables_coms, intval($_REQUEST['tables_nb_champs']), $select); } } else { redirect_header('tables.php?op=list_tables', 2, _AM_TDMCREATE_TABLES_EXIST); Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php 2012-04-15 15:27:10 UTC (rev 9333) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php 2012-04-15 16:54:23 UTC (rev 9334) @@ -46,7 +46,7 @@ $this->initVar("tables_display_admin",XOBJ_DTYPE_INT,null,false, 1); $this->initVar("tables_display_user",XOBJ_DTYPE_INT,null,false, 1); $this->initVar("tables_submitter",XOBJ_DTYPE_INT,null,false, 1); - $this->initVar("tables_date_created",XOBJ_DTYPE_INT,null,false, 1); + $this->initVar("tables_created",XOBJ_DTYPE_INT,null,false, 1); $this->initVar("tables_online",XOBJ_DTYPE_INT,null,false, 1); $this->initVar("tables_search",XOBJ_DTYPE_INT,null,false, 1); $this->initVar("tables_coms",XOBJ_DTYPE_INT,null,false, 1); @@ -59,7 +59,7 @@ } //Formulaire de saisi de champs - function getFormChamps($action = false, $tables_id, $tables_modules, $tables_name, $tables_blocks, $tables_display_admin, $tables_display_user, $tables_submitter, $tables_date_created, $tables_online, $tables_search, $tables_coms, $tables_nb_champs, $select) + function getFormChamps($action = false, $tables_id, $tables_modules, $tables_name, $tables_blocks, $tables_display_admin, $tables_display_user, $tables_search, $tables_coms, $tables_nb_champs, $select) { global $xoopsDB, $xoopsModule, $xoopsModuleConfig; if ($action === false) { @@ -68,7 +68,7 @@ $class = 'even'; $title = $this->isNew() ? sprintf(_AM_TDMCREATE_TABLES_CHAMPS_ADD) : sprintf(_AM_TDMCREATE_TABLES_CHAMPS_EDIT); - $tables_actions = $tables_modules."&tables_id=".$tables_id."&tables_name=".$tables_name."&tables_blocs=".$tables_blocks."&tables_display_admin=".$tables_display_admin."&tables_display_user=".$tables_display_user."&tables_submitter=".$tables_submitter."&tables_date_created=".$tables_date_created."&tables_online=".$tables_online."&tables_search=".$tables_search."&tables_coms=".$tables_coms."&tables_nb_champs=".$tables_nb_champs."&select=".$select; + $tables_actions = $tables_modules."&tables_id=".$tables_id."&tables_name=".$tables_name."&tables_blocs=".$tables_blocks."&tables_display_admin=".$tables_display_admin."&tables_display_user=".$tables_display_user."&tables_search=".$tables_search."&tables_coms=".$tables_coms."&tables_nb_champs=".$tables_nb_champs."&select=".$select; echo "<FORM Method='POST' Action='".$action."?op=tables_save&tables_modules=".$tables_actions."'> <table border='0' width='100%' cellspacing='1' class='outer'> @@ -147,6 +147,7 @@ <OPTION VALUE='XoopsFormDhtmlTextArea'>DhtmlTextArea</OPTION> <OPTION VALUE='XoopsFormCheckBox'>CheckBox</OPTION> <OPTION VALUE='XoopsFormRadioYN'>RadioYN</OPTION> + <OPTION VALUE='XoopsFormSelect'>SelectUser</OPTION> <OPTION VALUE='XoopsFormSelectUser'>SelectUser</OPTION> <OPTION VALUE='XoopsFormColorPicker'>ColorPicker</OPTION> <OPTION VALUE='XoopsFormUploadImage'>UploadImage</OPTION> @@ -245,7 +246,7 @@ $tables_display_admin = $this->getVar('tables_display_admin'); $tables_display_user = $this->getVar('tables_display_user'); $tables_submitter = $this->getVar('tables_submitter'); - $tables_date_created = $this->getVar('tables_date_created'); + $tables_created = $this->getVar('tables_created'); $tables_online = $this->getVar('tables_online'); $tables_search = $this->getVar('tables_search'); $tables_coms = $this->getVar('tables_coms'); @@ -301,7 +302,7 @@ $champs_param_required_field[$i] = $parametres[6]; } } - $tables_action = $tables_modules."&tables_id=".$tables_id."&tables_name=".$tables_name."&tables_blocs=".$tables_blocks."&tables_display_admin=".$tables_display_admin."&tables_display_user=".$tables_display_user."&tables_submitter=".$tables_submitter."&tables_date_created=".$tables_date_created."&tables_online=".$tables_online."&tables_search=".$tables_search."&tables_coms=".$tables_coms."&tables_nb_champs=".$tables_nb_champs."&select=".$select; + $tables_action = $tables_modules."&tables_id=".$tables_id."&tables_name=".$tables_name."&tables_blocs=".$tables_blocks."&tables_display_admin=".$tables_display_admin."&tables_display_user=".$tables_display_user."&tables_submitter=".$tables_submitter."&tables_created=".$tables_created."&tables_online=".$tables_online."&tables_search=".$tables_search."&tables_coms=".$tables_coms."&tables_nb_champs=".$tables_nb_champs."&select=".$select; echo "<FORM Method='POST' Action='".$action."?op=tables_save&tables_modules=".$tables_action."'> <table border='0' width='100%' cellspacing='1' class='outer'> @@ -309,14 +310,14 @@ <td colspan='8' class='head' align='center'>".$title."</td> </tr> <tr class='head'> - <td align='center'>"._AM_TDMCREATE_TABLES_CHAMPS_NAME."</td> - <td align='center'>"._AM_TDMCREATE_TABLES_CHAMPS_TYPE."</td> - <td align='center'>"._AM_TDMCREATE_TABLES_CHAMPS_VALEUR."</td> - <td align='center'>"._AM_TDMCREATE_TABLES_CHAMPS_ATTRIBUTS."</td> - <td align='center'>"._AM_TDMCREATE_TABLES_CHAMPS_NULL."</td> - <td align='center'>"._AM_TDMCREATE_TABLES_CHAMPS_DEFAULT."</td> - <td align='center'>"._AM_TDMCREATE_TABLES_CHAMPS_CLEF."</td> - <td align='center'>"._AM_TDMCREATE_TABLES_CHAMPS_MORE."</td> + <td align='center'>"._AM_TDMCREATE_TABLES_CHAMPS_NAME."</td> + <td align='center'>"._AM_TDMCREATE_TABLES_CHAMPS_TYPE."</td> + <td align='center'>"._AM_TDMCREATE_TABLES_CHAMPS_VALEUR."</td> + <td align='center'>"._AM_TDMCREATE_TABLES_CHAMPS_ATTRIBUTS."</td> + <td align='center'>"._AM_TDMCREATE_TABLES_CHAMPS_NULL."</td> + <td align='center'>"._AM_TDMCREATE_TABLES_CHAMPS_DEFAULT."</td> + <td align='center'>"._AM_TDMCREATE_TABLES_CHAMPS_CLEF."</td> + <td align='center'>"._AM_TDMCREATE_TABLES_CHAMPS_MORE."</td> </tr>"; for($i=0; $i<$tables_nb_champs ; $i++) { @@ -523,6 +524,11 @@ } else { echo "<OPTION VALUE='XoopsFormRadioYN'>RadioYN</OPTION>"; } + if ( $param_elements[$i] == 'XoopsFormSelect' ) { + echo "<OPTION VALUE='XoopsFormSelect' selected>SelectBox</OPTION>"; + } else { + echo "<OPTION VALUE='XoopsFormSelectUser'>SelectUser</OPTION>"; + } if ( $param_elements[$i] == 'XoopsFormSelectUser' ) { echo "<OPTION VALUE='XoopsFormSelectUser' selected>SelectUser</OPTION>"; } else { Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions_const.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions_const.php 2012-04-15 15:27:10 UTC (rev 9333) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions_const.php 2012-04-15 16:54:23 UTC (rev 9334) @@ -439,10 +439,10 @@ case "XoopsFormSelect": $data = explode("-", $champs_param_elements[$i]); $text .= ' - $'.$data[1].'Handler =& xoops_getModuleHandler("'.$modules_name.'_'.$data[1].'", "'.$modules_name.'"); - $'.$data[1].'_select = new XoopsFormSelect('.$language_form.', "'.$structure0.'", $this->getVar("'.$structure0.'")); - $'.$data[1].'_select->addOptionArray($'.$data[1].'Handler->getList()); - $form->addElement($'.$data[1].'_select, '.$required_field.'); + $'.$data[0].'Handler =& xoops_getModuleHandler("'.$modules_name.'_'.$data[0].'", "'.$modules_name.'"); + $'.$data[0].'_select = new XoopsFormSelect('.$language_form.', "'.$structure0.'", $this->getVar("'.$structure0.'")); + $'.$data[0].'_select->addOptionArray($'.$data[0].'Handler->getList()); + $form->addElement($'.$data[0].'_select, '.$required_field.'); '; unset($data); break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-04-15 19:29:27
|
Revision: 9337 http://xoops.svn.sourceforge.net/xoops/?rev=9337&view=rev Author: txmodxoops Date: 2012-04-15 19:29:20 +0000 (Sun, 15 Apr 2012) Log Message: ----------- Updated for admin language now work Modified Paths: -------------- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_language.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions_const.php Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-04-15 19:28:43 UTC (rev 9336) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-04-15 19:29:20 UTC (rev 9337) @@ -387,7 +387,7 @@ if ($tablesHandler->insert($obj)) { $tables_id = $xoopsDB->getInsertId(); $obj = $tablesHandler->get($tables_id); - $form = $obj->getFormChamps(false, $tables_id, intval($_REQUEST['tables_modules']), strtolower($_REQUEST['tables_name']), $tables_blocks, $tables_display_admin, $tables_display_user, $tables_search, $tables_coms, intval($_REQUEST['tables_nb_champs']), $select); + $form = $obj->getFormChamps(false, $tables_id, intval($_REQUEST['tables_modules']), strtolower($_REQUEST['tables_name']), $tables_blocks, $tables_display_admin, $tables_display_user, $tables_submitter, $tables_created, $tables_online, $tables_search, $tables_coms, intval($_REQUEST['tables_nb_champs']), $select); } } else { redirect_header('tables.php?op=list_tables', 2, _AM_TDMCREATE_TABLES_EXIST); Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php 2012-04-15 19:28:43 UTC (rev 9336) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php 2012-04-15 19:29:20 UTC (rev 9337) @@ -59,7 +59,7 @@ } //Formulaire de saisi de champs - function getFormChamps($action = false, $tables_id, $tables_modules, $tables_name, $tables_blocks, $tables_display_admin, $tables_display_user, $tables_search, $tables_coms, $tables_nb_champs, $select) + function getFormChamps($action = false, $tables_id, $tables_modules, $tables_name, $tables_blocks, $tables_display_admin, $tables_display_user,$tables_submitter, $tables_created, $tables_online, $tables_search, $tables_coms, $tables_nb_champs, $select) { global $xoopsDB, $xoopsModule, $xoopsModuleConfig; if ($action === false) { @@ -68,7 +68,7 @@ $class = 'even'; $title = $this->isNew() ? sprintf(_AM_TDMCREATE_TABLES_CHAMPS_ADD) : sprintf(_AM_TDMCREATE_TABLES_CHAMPS_EDIT); - $tables_actions = $tables_modules."&tables_id=".$tables_id."&tables_name=".$tables_name."&tables_blocs=".$tables_blocks."&tables_display_admin=".$tables_display_admin."&tables_display_user=".$tables_display_user."&tables_search=".$tables_search."&tables_coms=".$tables_coms."&tables_nb_champs=".$tables_nb_champs."&select=".$select; + $tables_actions = $tables_modules."&tables_id=".$tables_id."&tables_name=".$tables_name."&tables_blocs=".$tables_blocks."&tables_display_admin=".$tables_display_admin."&tables_display_user=".$tables_display_user."&tables_submitter=".$tables_submitter."&tables_created=".$tables_created."&tables_online=".$tables_online."&tables_search=".$tables_search."&tables_coms=".$tables_coms."&tables_nb_champs=".$tables_nb_champs."&select=".$select; echo "<FORM Method='POST' Action='".$action."?op=tables_save&tables_modules=".$tables_actions."'> <table border='0' width='100%' cellspacing='1' class='outer'> Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_language.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_language.php 2012-04-15 19:28:43 UTC (rev 9336) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_language.php 2012-04-15 19:29:20 UTC (rev 9337) @@ -34,10 +34,11 @@ '; foreach (array_keys($tables_arr) as $i) { - $text .= 'define("'.$language.strtoupper($tables_arr[$i]->getVar("tables_name")).'","'.ucfirst($tables_arr[$i]->getVar("tables_name")).' Statistics"); -define("'.$language.'THEREARE_'.strtoupper($tables_arr[$i]->getVar("tables_name")).'","There are <span class=\'bold\'>%s</span> '. ucfirst ($tables_arr[$i]->getVar("tables_name")).' in the Database"); -define("'.$language.'THEREARE_'.strtoupper($tables_arr[$i]->getVar("tables_name")).'_ONLINE","There are <span class=\'bold\'>%s</span> '. ucfirst ($tables_arr[$i]->getVar("tables_name")).' online in the Database"); -define("'.$language.'THEREARE_'.strtoupper($tables_arr[$i]->getVar("tables_name")).'_PENDING","There are <span class=\'bold\'>%s</span> '. ucfirst ($tables_arr[$i]->getVar("tables_name")).' pending in the Database"); + $t_name = $tables_arr[$i]->getVar("tables_name"); + $text .= 'define("'.$language.strtoupper($t_name).'","'.ucfirst($t_name).' Statistics"); +define("'.$language.'THEREARE_'.strtoupper($t_name).'","There are <span class=\'bold\'>%s</span> '. ucfirst($t_name).' in the Database"); +define("'.$language.'THEREARE_'.strtoupper($t_name).'_ONLINE","There are <span class=\'bold\'>%s</span> '. ucfirst($t_name).' online in the Database"); +define("'.$language.'THEREARE_'.strtoupper($t_name).'_PENDING","There are <span class=\'bold\'>%s</span> '. ucfirst($t_name).' pending in the Database"); '; } foreach (array_keys($tables_arr) as $i) @@ -69,7 +70,7 @@ $champs_total = explode("|", $tables_arr[$i]->getVar("tables_champs")); $nb_champs = count($champs_total); $nb_caracteres = strlen($t_name); - $language1 = $language.strtoupper($t_name).'_'; + $language1 = $language.strtoupper($t_name).''; //Recuperation des noms des tables for($j=0; $j<$nb_champs; $j++) @@ -89,7 +90,7 @@ '; } $verif = false; - $text .= 'define("'.$language1.strtoupper($champs_final[$j]).'","'.UcFirstAndToLower($champs_final[$j]).'"); + $text .= 'define("'.$language1.strtoupper($champs_final[$j]).'","'.str_ireplace("_", "", UcFirstAndToLower($champs_final[$j])).'"); '; } $verif = true; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions_const.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions_const.php 2012-04-15 19:28:43 UTC (rev 9336) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions_const.php 2012-04-15 19:29:20 UTC (rev 9337) @@ -236,6 +236,10 @@ $'.$tables_name.'_topic1 = $'.$tables_name.'1->getVar("topic_title"); echo "<td class=\'center\'>".$'.$tables_name.'_topic1."</td>"; '; + } else if ( $champs_param_type[$i] == 'XoopsFormSelect' ) + { + $text .= 'echo "<td class=\'center\'>".$'.$tables_name.'_arr[$i]->getVar("'.$champs[$i].'")."</td>"; + '; } else if ( $champs_param_type[$i] == 'XoopsFormSelectUser' ) { $text .= 'echo "<td class=\'center\'>".XoopsUser::getUnameFromId($'.$tables_name.'_arr[$i]->getVar("'.$champs[$i].'"),"S")."</td>"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-04-17 15:14:55
|
Revision: 9360 http://xoops.svn.sourceforge.net/xoops/?rev=9360&view=rev Author: txmodxoops Date: 2012-04-17 14:57:39 +0000 (Tue, 17 Apr 2012) Log Message: ----------- Updated solved language bugs Modified Paths: -------------- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/includes.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_language.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_pages.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_architecture.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_class.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_modinfo_language.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_xoopsversion.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions_const.php Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php 2012-04-17 05:32:30 UTC (rev 9359) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php 2012-04-17 14:57:39 UTC (rev 9360) @@ -19,20 +19,17 @@ */ include 'admin_header.php'; xoops_cp_header(); - $indexAdmin = new ModuleAdmin(); echo $indexAdmin->addNavigation('building.php'); - $op = TDMCreate_CleanVars($_REQUEST, 'op', 'default', 'string'); - switch ($op) { case "creation": $mods =& $modulesHandler->get($_REQUEST['modules_name']); $mods_name = $mods->getVar('modules_name'); //$mods_fname = $mods->getVar('modules_fname'); $mods_desc = $mods->getVar('modules_description'); - $mods_author_website_name = $mods->getVar('modules_author_website_name'); - $mods_author_website_url = $mods->getVar('modules_author_website_url'); + $mods_a_w_name = $mods->getVar('modules_author_website_name'); + $mods_a_w_url = $mods->getVar('modules_author_website_url'); $mods_image = $mods->getVar('modules_image'); $mods_display_admin = $mods->getVar('modules_display_admin'); $mods_display_user = $mods->getVar('modules_display_user'); @@ -105,7 +102,7 @@ } //Creation of the comments if ( $tbls_coms == 1 ) { - const_include_coms($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres); + const_user_comments($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres); } //Creation of the blocks @@ -131,7 +128,7 @@ $tbls_coms = $tablesHandler->getVar('tables_coms'); //Creation of xoopsversion.php file //Xoops version set to integrate the end of the block, etc. - const_xoopsversion($mods, $mods_name, $tbls_arr, $tbls_module_table, $tbls_blocks); + const_xoopsversion($mods, $mods_name, $tbls_arr, $tbls_module_table, $tbls_blocks, $tbls_search); if($mods_display_user == 1){ // Creation of template index const_templates_index($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres); @@ -149,7 +146,7 @@ //Include const_js_jquery($mods, $mods_name); //Configs - const_include_configs($mods, $mods_name, $mods_author_website_name, $mods_author_website_url); + const_include_configs($mods, $mods_name, $mods_a_w_name, $mods_a_w_url); // a_w = author_website //Style //const_css_admin($mods, $mods_name); const_css_style($mods, $mods_name); @@ -162,7 +159,7 @@ //Creation of language main.php const_main_language($mods, $mods_name, $mods_desc, $tbls_arr); //Creation of language modinfo.php - const_modinfo_language($mods, $mods_name, $tbls_arr, $mods_desc, $topic); + const_modinfo_language($mods, $mods_name, $mods_desc, $tbls_arr, $topic); //Creation of language admin.php const_admin_language($mods, $mods_name, $tbls_arr, $topic); //Creation of language blocks.php Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/includes.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/includes.php 2012-04-17 05:32:30 UTC (rev 9359) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/includes.php 2012-04-17 14:57:39 UTC (rev 9360) @@ -27,7 +27,6 @@ include_once $cPath.'/const_xoopsversion.php'; include_once $cPath.'/const_changelog.php'; include_once $cPath.'/const_include_search.php'; -include_once $cPath.'/const_include_coms.php'; include_once $cPath.'/const_include_configs.php'; include_once $cPath.'/const_include_functions.php'; include_once $cPath.'/const_include_install.php'; @@ -50,6 +49,7 @@ include_once $cPath.'/const_help_language.php'; include_once $cPath.'/const_blocks_language.php'; include_once $cPath.'/const_main_language.php'; +include_once $cPath.'/const_user_comments.php'; include_once $cPath.'/const_user_header.php'; include_once $cPath.'/const_user_index.php'; include_once $cPath.'/const_user_pages.php'; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-04-17 05:32:30 UTC (rev 9359) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-04-17 14:57:39 UTC (rev 9360) @@ -57,7 +57,7 @@ $obj->setVar('tables_nb_champs', 10 ); - $tables_parametres = 'XoopsFormTopic:0:0:0:0:0:0|XoopsFormText:1:1:0:1:0:1|XoopsFormTextArea:0:1:0:0:0:1|XoopsFormUploadImage:1:1:0:0:0:0|XoopsFormText:1:1:0:0:0:1|XoopsFormColorPicker:1:1:0:0:0:0|XoopsFormSelect:0:0:0:0:0:1|XoopsFormSelectUser:0:0:0:0:0:1|XoopsFormTextDateSelect:0:0:0:0:0:1|XoopsFormCheckBox:1:1:0:0:0:1'; + $tables_parametres = 'XoopsFormTopic:0:0:0:0:0:0|XoopsFormText:1:1:0:1:0:1|XoopsFormTextArea:0:1:0:0:0:1|XoopsFormUploadImage:1:1:0:0:0:0|XoopsFormText:1:1:0:0:0:1|XoopsFormColorPicker:1:1:0:0:0:0|XoopsFormSelectUser:0:0:0:0:0:1|XoopsFormTextDateSelect:0:0:0:0:0:1|XoopsFormCheckBox:1:1:0:0:0:1'; //Image include_once XOOPS_ROOT_PATH.'/class/uploader.php'; @@ -91,6 +91,9 @@ $obj->setVar('tables_blocs', $_REQUEST['tables_blocs']); $obj->setVar('tables_display_admin', $_REQUEST['tables_display_admin']); $obj->setVar('tables_display_user', $_REQUEST['tables_display_user']); + $obj->setVar('tables_submitter', $_REQUEST['tables_submitter']); + $obj->setVar('tables_created', $_REQUEST['tables_created']); + $obj->setVar('tables_online', $_REQUEST['tables_online']); $obj->setVar('tables_search', $_REQUEST['tables_search']); $obj->setVar('tables_coms', $_REQUEST['tables_coms']); //$obj->setVar('tables_nb_champs', $_REQUEST['tables_nb_champs']); @@ -142,10 +145,11 @@ $tables_parametres .= '|XoopsFormSelectUser:1:1:1:0:0:1|XoopsFormTextDateSelect:1:1:1:0:0:1|XoopsFormCheckBox:1:1:1:0:0:1'; } } - $nb_champs = $_REQUEST['tables_nb_champs']; - $nb_champs += $submit; - $nb_champs += $create; - $nb_champs += $online; + if($nb_champs == $_REQUEST['tables_nb_champs']) { + $nb_champs += $submit; + $nb_champs += $create; + $nb_champs += $online; + } $obj->setVar('tables_nb_champs', $nb_champs); } $obj->setVar('tables_champs', $tables_champs); @@ -175,7 +179,10 @@ $tables_blocks = (isset($_REQUEST['tables_blocs'])) ? $_REQUEST['tables_blocs'] : '0'; $tables_display_admin = (isset($_REQUEST['tables_display_admin'])) ? $_REQUEST['tables_display_admin'] : '0'; - $tables_display_user = (isset($_REQUEST['tables_display_user'])) ? $_REQUEST['tables_display_user'] : '0'; + $tables_display_user = (isset($_REQUEST['tables_display_user'])) ? $_REQUEST['tables_display_user'] : '0'; + $tables_submitter = (isset($_REQUEST['tables_submitter'])) ? $_REQUEST['tables_submitter'] : '0'; + $tables_created = (isset($_REQUEST['tables_created'])) ? $_REQUEST['tables_created'] : '0'; + $tables_online = (isset($_REQUEST['tables_online'])) ? $_REQUEST['tables_online'] : '0'; $tables_search = (isset($_REQUEST['tables_search'])) ? $_REQUEST['tables_search'] : '0'; $tables_coms = (isset($_REQUEST['tables_coms'])) ? $_REQUEST['tables_coms'] : '0'; $select = (isset($_REQUEST['select'])) ? $_REQUEST['select'] : '0'; @@ -209,6 +216,9 @@ $obj->setVar('tables_blocs', $_REQUEST['tables_blocs']); $obj->setVar('tables_display_admin', $_REQUEST['tables_display_admin']); $obj->setVar('tables_display_user', $_REQUEST['tables_display_user']); + $obj->setVar('tables_submitter', $_REQUEST['tables_submitter']); + $obj->setVar('tables_created', $_REQUEST['tables_created']); + $obj->setVar('tables_online', $_REQUEST['tables_online']); //mettre des isset pour search if ( isset($_REQUEST['tables_search']) ) $obj->setVar('tables_search', $_REQUEST['tables_search']); @@ -356,6 +366,9 @@ $tables_blocks = (isset($_REQUEST['tables_blocs'])) ? $_REQUEST['tables_blocs'] : '0'; $tables_display_admin = (isset($_REQUEST['tables_display_admin'])) ? $_REQUEST['tables_display_admin'] : '0'; $tables_display_user = (isset($_REQUEST['tables_display_user'])) ? $_REQUEST['tables_display_user'] : '0'; + $tables_submitter = (isset($_REQUEST['tables_submitter'])) ? $_REQUEST['tables_submitter'] : '0'; + $tables_created = (isset($_REQUEST['tables_created'])) ? $_REQUEST['tables_created'] : '0'; + $tables_online = (isset($_REQUEST['tables_online'])) ? $_REQUEST['tables_online'] : '0'; $tables_search = (isset($_REQUEST['tables_search'])) ? $_REQUEST['tables_search'] : '0'; $tables_coms = (isset($_REQUEST['tables_coms'])) ? $_REQUEST['tables_coms'] : '0'; $select = (isset($_REQUEST['select'])) ? $_REQUEST['select'] : '0'; @@ -385,7 +398,7 @@ } if ($tablesHandler->insert($obj)) { - $tables_id = $xoopsDB->getInsertId(); + $tables_id = $GLOBALS['xoopsDB']->getInsertId(); $obj = $tablesHandler->get($tables_id); $form = $obj->getFormChamps(false, $tables_id, intval($_REQUEST['tables_modules']), strtolower($_REQUEST['tables_name']), $tables_blocks, $tables_display_admin, $tables_display_user, $tables_submitter, $tables_created, $tables_online, $tables_search, $tables_coms, intval($_REQUEST['tables_nb_champs']), $select); } Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php 2012-04-17 05:32:30 UTC (rev 9359) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php 2012-04-17 14:57:39 UTC (rev 9360) @@ -59,7 +59,7 @@ } //Formulaire de saisi de champs - function getFormChamps($action = false, $tables_id, $tables_modules, $tables_name, $tables_blocks, $tables_display_admin, $tables_display_user,$tables_submitter, $tables_created, $tables_online, $tables_search, $tables_coms, $tables_nb_champs, $select) + function getFormChamps($action = false, $tables_id, $tables_modules, $tables_name, $tables_blocks, $tables_display_admin, $tables_display_user, $tables_submitter, $tables_created, $tables_online, $tables_search, $tables_coms, $tables_nb_champs, $select) { global $xoopsDB, $xoopsModule, $xoopsModuleConfig; if ($action === false) { @@ -146,8 +146,7 @@ <OPTION VALUE='XoopsFormTextArea'>TextArea</OPTION> <OPTION VALUE='XoopsFormDhtmlTextArea'>DhtmlTextArea</OPTION> <OPTION VALUE='XoopsFormCheckBox'>CheckBox</OPTION> - <OPTION VALUE='XoopsFormRadioYN'>RadioYN</OPTION> - <OPTION VALUE='XoopsFormSelect'>SelectUser</OPTION> + <OPTION VALUE='XoopsFormRadioYN'>RadioYN</OPTION> <OPTION VALUE='XoopsFormSelectUser'>SelectUser</OPTION> <OPTION VALUE='XoopsFormColorPicker'>ColorPicker</OPTION> <OPTION VALUE='XoopsFormUploadImage'>UploadImage</OPTION> @@ -523,12 +522,7 @@ echo "<OPTION VALUE='XoopsFormRadioYN' selected>RadioYN</OPTION>"; } else { echo "<OPTION VALUE='XoopsFormRadioYN'>RadioYN</OPTION>"; - } - if ( $param_elements[$i] == 'XoopsFormSelect' ) { - echo "<OPTION VALUE='XoopsFormSelect' selected>SelectBox</OPTION>"; - } else { - echo "<OPTION VALUE='XoopsFormSelectUser'>SelectUser</OPTION>"; - } + } if ( $param_elements[$i] == 'XoopsFormSelectUser' ) { echo "<OPTION VALUE='XoopsFormSelectUser' selected>SelectUser</OPTION>"; } else { Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_language.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_language.php 2012-04-17 05:32:30 UTC (rev 9359) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_language.php 2012-04-17 14:57:39 UTC (rev 9360) @@ -62,23 +62,22 @@ define("'.$language.'OFF","Offline"); define("'.$language.'ON","Online"); '; + $verif = true; foreach (array_keys($tables_arr) as $i) { - $t_name = $tables_arr[$i]->getVar("tables_name"); //Champs + $t_name = $tables_arr[$i]->getVar("tables_name"); $champs_total = explode("|", $tables_arr[$i]->getVar("tables_champs")); - $nb_champs = count($champs_total); - $nb_caracteres = strlen($t_name); - $language1 = $language.strtoupper($t_name).''; + $nb_champs = $tables_arr[$i]->getVar("tables_nb_champs"); + $language1 = $language.strtoupper($t_name).'_'; //Recuperation des noms des tables for($j=0; $j<$nb_champs; $j++) { //Nom des champs - $champs1 = explode(":", $champs_total[$j]); - $champs[$j] = $champs1[0]; - $champs_final[$j] = substr("".$champs1[0]."", $nb_caracteres); + $champs_name = explode(":", $champs_total[$j]); + $champs_final[$j] = substr($champs_name[0], strpos($champs_name[0], "_") + 1); if ( $verif == true ) { @@ -86,17 +85,17 @@ define("'.$language1.'ADD","Add a '.UcFirstAndToLower($t_name).'"); define("'.$language1.'EDIT","Edit a '.UcFirstAndToLower($t_name).'"); define("'.$language1.'DELETE","Delete a '.UcFirstAndToLower($t_name).'"); - '; } $verif = false; - $text .= 'define("'.$language1.strtoupper($champs_final[$j]).'","'.str_ireplace("_", "", UcFirstAndToLower($champs_final[$j])).'"); + $text .= 'define("'.$language1.strtoupper($champs_final[$j]).'","'.str_ireplace("_", " ", UcFirstAndToLower($champs_final[$j])).'"); '; } $verif = true; $text .= ' '; } + $text .= '//Blocks.php'; foreach (array_keys($tables_arr) as $i) { Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_pages.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_pages.php 2012-04-17 05:32:30 UTC (rev 9359) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_pages.php 2012-04-17 14:57:39 UTC (rev 9360) @@ -54,7 +54,8 @@ $parametres = explode(":", $parametres_total[$i-1]); $champs_param_type[$i] = $parametres[0]; $champs_param_display_admin[$i] = $parametres[1]; - } + } + $online = substr($champs[$i], strpos($champs[$i], "_")); } $champs_id = $champs[0]; @@ -330,8 +331,9 @@ } else { xoops_confirm(array("ok" => 1, "'.$champs_id.'" => $_REQUEST["'.$champs_id.'"], "op" => "delete_'.$tables_name.'"), $_SERVER["REQUEST_URI"], sprintf('.$language.'_FORMSUREDEL, $obj->getVar("'.$champs_name.'"))); } - break; - + break;'; + if ( $online == 'online'){ + $text .= ' case "update_online_'.$tables_name.'": if (isset($_REQUEST["'.$champs_id.'"])) { $obj =& $'.$tables_name.'Handler->get($_REQUEST["'.$champs_id.'"]); @@ -341,7 +343,9 @@ redirect_header("'.$tables_name.'.php", 3, '.$language.'_FORMOK); } echo $obj->getHtmlErrors(); - break; + break;'; + } + $text .= ' } include "admin_footer.php"; ?>'; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_architecture.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_architecture.php 2012-04-17 05:32:30 UTC (rev 9359) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_architecture.php 2012-04-17 14:57:39 UTC (rev 9360) @@ -64,7 +64,9 @@ // Creation of "images/icons" folder and index.html file - Added in Version 1.15 echo $images_icons_index = $classArch->makeDirAndCopyFile('images/icons', $indexFile, 'index.html'); - // Creation of "on.png" file + // Creation of "arrow.gif" file + echo $module_images_arrow = $classArch->CopyFile('images/icons/', $fimages."/icons/arrow.gif", 'arrow.gif'); + // Creation of "on.png" file echo $module_images_icon_on = $classArch->CopyFile('images/icons/', $fimages."/icons/on.png", 'on.png'); // Creation of "off.png" file echo $module_images_icon_off = $classArch->CopyFile('images/icons/', $fimages."/icons/off.png", 'off.png'); Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_class.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_class.php 2012-04-17 05:32:30 UTC (rev 9359) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_class.php 2012-04-17 14:57:39 UTC (rev 9360) @@ -68,8 +68,8 @@ function __construct() { $this->XoopsObject(); - '; - $text .= $constructor.' + '; + $text .= $constructor.' } function '.$tables_module_table.'() @@ -88,13 +88,10 @@ $title = $this->isNew() ? sprintf('.$language.strtoupper($tables_name).'_ADD) : sprintf('.$language.strtoupper($tables_name).'_EDIT); include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php"); - $form = new XoopsThemeForm($title, "form", $action, "post", true); - $form->setExtra(\'enctype="multipart/form-data"\'); - + $form->setExtra(\'enctype="multipart/form-data"\'); '; $text .= $form.' - $form->addElement(new XoopsFormHidden("op", "save_'.$tables_name.'")); $form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit")); return $form; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_modinfo_language.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_modinfo_language.php 2012-04-17 05:32:30 UTC (rev 9359) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_modinfo_language.php 2012-04-17 14:57:39 UTC (rev 9360) @@ -83,8 +83,8 @@ if ( $structure_parametres[0] == 'XoopsFormUploadImage' || $structure_parametres[0] == 'XoopsFormUploadFile' ) { $text .= ' -define("'.$language1.'_MAXSIZE","Mime max size '.$structure_champs[0].'"); -define("'.$language1.'_MIMETYPES","Mime Types '.$structure_champs[0].'"); +define("'.$language.'_MAXSIZE","Mime max size '.$structure_champs[0].'"); +define("'.$language.'_MIMETYPES","Mime Types '.$structure_champs[0].'"); '; } } Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_xoopsversion.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_xoopsversion.php 2012-04-17 05:32:30 UTC (rev 9359) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_xoopsversion.php 2012-04-17 14:57:39 UTC (rev 9360) @@ -19,7 +19,7 @@ */ include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php'; -function const_xoopsversion($modules, $modules_name, $tables_arr, $tables_module_table) +function const_xoopsversion($modules, $modules_name, $tables_arr, $tables_module_table, $tables_blocks, $tables_search) { $language = '_MI_'.strtoupper($modules_name).''; $file = "xoops_version.php"; @@ -85,7 +85,7 @@ '.$modv.'[\'adminmenu\'] = "admin/menu.php"; '; $j = 1; -if ( $tables_module_table != null ) { +if ( $tables_module_table == null ) { $text .= '// Mysql file '.$modv.'[\'sqlfile\'][\'mysql\'] = "sql/mysql.sql"; // Tables'; @@ -109,7 +109,7 @@ '; } -if ( $modules->getVar("modules_active_search") == 1 ) { +if ( $modules->getVar("modules_active_search") == 1 && $tables_search == 1 ) { $text .= '//Search '.$modv.'[\'hasSearch\'] = 1; '.$modv.'[\'search\'][\'file\'] = "include/search.inc.php"; @@ -139,6 +139,7 @@ '.$modvt.'[\'description\'] = "'.UcFirstAndToLower($modules_name).' footer page"; unset( $i ); '; +if ( $tables_blocks == 1 ) { $j = 1; $text .='//Blocks $i = 1;'; @@ -179,11 +180,12 @@ $j++; } } unset($j); +} $modvc = ''.$modv.'[\'config\'][$i]'; $text .= ' // Config $i = 1; -'.$modvc.'[\'name\'] = "editor"; +'.$modvc.'[\'name\'] = "'.strtolower($modules_name).'_editor"; '.$modvc.'[\'title\'] = "'.$language.'_EDITOR"; '.$modvc.'[\'description\'] = "'.$language.'_EDITOR_DESC"; '.$modvc.'[\'formtype\'] = "select"; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions_const.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions_const.php 2012-04-17 05:32:30 UTC (rev 9359) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/include/functions_const.php 2012-04-17 14:57:39 UTC (rev 9360) @@ -40,34 +40,33 @@ { $structure = explode(":", $champs[$i]); if ( $structure[1] == 'int' || $structure[1] == 'tinyint' || $structure[1] == 'mediumint' || $structure[1] == 'smallint' ) { - $text .= '$this->initVar("'.$structure[0].'", XOBJ_DTYPE_INT, null, false, '.$structure[2].'); - '; + $text .= '$this->initVar("'.$structure[0].'", XOBJ_DTYPE_INT, null, false, '.$structure[2].'); + '; } elseif ( $structure[1] == 'char' || $structure[1] == 'varchar' ) { - $text .= '$this->initVar("'.$structure[0].'", XOBJ_DTYPE_TXTBOX, null, false, '.$structure[2].'); - '; + $text .= '$this->initVar("'.$structure[0].'", XOBJ_DTYPE_TXTBOX, null, false, '.$structure[2].'); + '; } elseif ( $structure[1] == 'text' || $structure[1] == 'tinytext' || $structure[1] == 'mediumtext' || $structure[1] == 'longtext' ) { - $text .= ' $this->initVar("'.$structure[0].'", XOBJ_DTYPE_TXTAREA, null, false); - '; + $text .= '$this->initVar("'.$structure[0].'", XOBJ_DTYPE_TXTAREA, null, false); + '; } elseif ( $structure[1] == 'float' ) { - $text .= ' $this->initVar("'.$structure[0].'", XOBJ_DTYPE_FLOAT, null, false); - '; + $text .= '$this->initVar("'.$structure[0].'", XOBJ_DTYPE_FLOAT, null, false); + '; } elseif ( $structure[1] == 'decimal' || $structure[1] == 'double' ) { - $text .= ' $this->initVar("'.$structure[0].'", XOBJ_DTYPE_DECIMAL, null, false); - '; + $text .= '$this->initVar("'.$structure[0].'", XOBJ_DTYPE_DECIMAL, null, false); + '; } elseif ( $structure[1] == 'enum' ) { - $text .= ' $this->initVar("'.$structure[0].'", XOBJ_DTYPE_ENUM, null, false); - '; + $text .= '$this->initVar("'.$structure[0].'", XOBJ_DTYPE_ENUM, null, false); + '; } elseif ( $structure[1] == 'email' ) { - $text .= ' $this->initVar("'.$structure[0].'", XOBJ_DTYPE_EMAIL, null, false, '.$structure[2].'); - '; + $text .= '$this->initVar("'.$structure[0].'", XOBJ_DTYPE_EMAIL, null, false, '.$structure[2].'); + '; } elseif ( $structure[1] == 'url' ) { - $text .= ' $this->initVar("'.$structure[0].'", XOBJ_DTYPE_URL, null, false, '.$structure[2].'); - '; + $text .= '$this->initVar("'.$structure[0].'", XOBJ_DTYPE_URL, null, false, '.$structure[2].'); + '; } elseif ( $structure[1] == 'date' || $structure[1] == 'datetime' || $structure[1] == 'timestamp' || $structure[1] == 'time' || $structure[1] == 'year' ) { - $text .= '$this->initVar("'.$structure[0].'", XOBJ_DTYPE_LTIME, null, false); - '; + $text .= '$this->initVar("'.$structure[0].'", XOBJ_DTYPE_LTIME, null, false);'; }/* elseif ( $structure[1] == 'other' ) { - $text .= ' $this->initVar("'.$structure[0].'", XOBJ_DTYPE_OTHER, '.$structure[2].', false); + $text .= ' $this->initVar("'.$structure[0].'", XOBJ_DTYPE_OTHER, '.$structure[2].', false); '; }*/ } @@ -195,7 +194,8 @@ for($i=0; $i<$nb_champs; $i++) { if ( $champs_param_display_admin[$i] == 1 ) { - if ( $i == $nb_champs - 1 ) + $online = substr($champs[$i], strpos($champs[$i], "_")); + if ( $i == $nb_champs && $online == 'online' && $champs[$i] == 'topic_online') { $text .= ' $online = $'.$tables_name.'_arr[$i]->getVar("'.$champs[$i].'"); @@ -211,7 +211,7 @@ $text .= 'echo "<td class=\'left\'>".$prefix." ".$topic_arr[$i]->getVar("'.$champs[$i].'")."</td>"; '; } else { - $text .= 'echo "<td class=\'left\'><img src=\'".'.strtoupper($modules_name).'_URL."/images/deco/arrow.gif\'> ".$topic_arr[$i]->getVar("'.$champs[$i].'")."</td>"; + $text .= 'echo "<td class=\'left\'><img src=\'".'.strtoupper($modules_name).'_URL."/images/icons/arrow.gif\'> ".$topic_arr[$i]->getVar("'.$champs[$i].'")."</td>"; '; } @@ -236,10 +236,6 @@ $'.$tables_name.'_topic1 = $'.$tables_name.'1->getVar("topic_title"); echo "<td class=\'center\'>".$'.$tables_name.'_topic1."</td>"; '; - } else if ( $champs_param_type[$i] == 'XoopsFormSelect' ) - { - $text .= 'echo "<td class=\'center\'>".$'.$tables_name.'_arr[$i]->getVar("'.$champs[$i].'")."</td>"; - '; } else if ( $champs_param_type[$i] == 'XoopsFormSelectUser' ) { $text .= 'echo "<td class=\'center\'>".XoopsUser::getUnameFromId($'.$tables_name.'_arr[$i]->getVar("'.$champs[$i].'"),"S")."</td>"; @@ -371,123 +367,120 @@ break; case "XoopsFormText": - $text .= '$form->addElement(new XoopsFormText('.$language_form.', "'.$structure0.'", 50, 255, $this->getVar("'.$structure0.'")), '.$required_field.'); + $text .= ' + $form->addElement(new XoopsFormText('.$language_form.', "'.$structure0.'", 50, 255, $this->getVar("'.$structure0.'")), '.$required_field.'); '; break; case "XoopsFormTextArea": - $text .= '$form->addElement(new XoopsFormTextArea('.$language_form.', "'.$structure0.'", $this->getVar("'.$structure0.'"), 4, 47), '.$required_field.'); + $text .= ' + $form->addElement(new XoopsFormTextArea('.$language_form.', "'.$structure0.'", $this->getVar("'.$structure0.'"), 4, 47), '.$required_field.'); '; break; case "XoopsFormDhtmlTextArea": - $text .= '$editor_configs=array(); - $editor_configs["name"] ="'.$structure0.'"; - $editor_configs["value"] = $this->getVar("'.$structure0.'", "e"); - $editor_configs["rows"] = 10; - $editor_configs["cols"] = 80; - $editor_configs["width"] = "100%"; - $editor_configs["height"] = "400px"; - $editor_configs["editor"] = $GLOBALS["xoopsModuleConfig"]["editor"]; - $form->addElement( new XoopsFormEditor('.$language_form.', "'.$structure0.'", $editor_configs), true ); + $text .= ' + $editor_configs=array(); + $editor_configs["name"] ="'.$structure0.'"; + $editor_configs["value"] = $this->getVar("'.$structure0.'", "e"); + $editor_configs["rows"] = 10; + $editor_configs["cols"] = 80; + $editor_configs["width"] = "100%"; + $editor_configs["height"] = "400px"; + $editor_configs["editor"] = $GLOBALS["xoopsModuleConfig"]["'.strtolower($modules_name).'_editor"]; + $form->addElement( new XoopsFormEditor('.$language_form.', "'.$structure0.'", $editor_configs), true ); '; break; case "XoopsFormCheckBox": - $text .= ' $'.$structure0.' = $this->isNew() ? 0 : $this->getVar("'.$structure0.'"); - $check_'.$structure0.' = new XoopsFormCheckBox('.$language_form.', "'.$structure0.'", $'.$structure0.'); - $check_'.$structure0.'->addOption(1, " "); - $form->addElement($check_'.$structure0.'); + $text .= ' + $'.$structure0.' = $this->isNew() ? 0 : $this->getVar("'.$structure0.'"); + $check_'.$structure0.' = new XoopsFormCheckBox('.$language_form.', "'.$structure0.'", $'.$structure0.'); + $check_'.$structure0.'->addOption(1, " "); + $form->addElement($check_'.$structure0.'); '; break; case "XoopsFormHidden": - $text .= '$form->addElement(new XoopsFormHidden("'.$structure0.'", $this->getVar("'.$structure0.'"))); + $text .= ' + $form->addElement(new XoopsFormHidden("'.$structure0.'", $this->getVar("'.$structure0.'"))); '; break; case "XoopsFormUploadImage": $text .= ' - $'.$structure0.' = $this->getVar("'.$structure0.'") ? $this->getVar("'.$structure0.'") : \'blank.gif\'; - - $uploadirectory = \'/uploads/'.$modules_name.'/images\'; - $imgtray = new XoopsFormElementTray('.$language_form.',\'<br />\'); - $imgpath = sprintf('.$language1.'FORMIMAGE_PATH, ".".$uploadirectory."/"); - $imageselect = new XoopsFormSelect($imgpath, \''.$structure0.'\', $'.$structure0.'); - $image_array = XoopsLists :: getImgListAsArray( XOOPS_ROOT_PATH.$uploadirectory ); - foreach( $image_array as $image ) { - $imageselect->addOption("$image", $image); - } - $imageselect->setExtra( "onchange=\'showImgSelected(\"image1\", \"'.$structure0.'\", \"".$uploadirectory."\", \"\", \"".XOOPS_URL."\")\'" ); - $imgtray->addElement($imageselect, false); - $imgtray->addElement( new XoopsFormLabel( \'\', "<br /><img src=\'".XOOPS_URL."/".$uploadirectory."/".$'.$structure0.'."\' name=\'image1\' id=\'image1\' alt=\'\' />" ) ); - $fileseltray = new XoopsFormElementTray(\'\',\'<br />\'); - $fileseltray->addElement(new XoopsFormFile('.$language1.'FORMUPLOAD , "'.$structure0.'", $GLOBALS[\'xoopsModuleConfig\'][\'maxsize\']),false); - $fileseltray->addElement(new XoopsFormLabel(\'\'), false); - $imgtray->addElement($fileseltray); - $form->addElement($imgtray); - + $'.$structure0.' = $this->getVar("'.$structure0.'") ? $this->getVar("'.$structure0.'") : \'blank.gif\'; + + $uploadirectory = \'/uploads/'.$modules_name.'/images\'; + $imgtray = new XoopsFormElementTray('.$language_form.',\'<br />\'); + $imgpath = sprintf('.$language1.'FORMIMAGE_PATH, ".".$uploadirectory."/"); + $imageselect = new XoopsFormSelect($imgpath, \''.$structure0.'\', $'.$structure0.'); + $image_array = XoopsLists :: getImgListAsArray( XOOPS_ROOT_PATH.$uploadirectory ); + foreach( $image_array as $image ) { + $imageselect->addOption("$image", $image); + } + $imageselect->setExtra( "onchange=\'showImgSelected(\"image1\", \"'.$structure0.'\", \"".$uploadirectory."\", \"\", \"".XOOPS_URL."\")\'" ); + $imgtray->addElement($imageselect, false); + $imgtray->addElement( new XoopsFormLabel( \'\', "<br /><img src=\'".XOOPS_URL."/".$uploadirectory."/".$'.$structure0.'."\' name=\'image1\' id=\'image1\' alt=\'\' />" ) ); + $fileseltray = new XoopsFormElementTray(\'\',\'<br />\'); + $fileseltray->addElement(new XoopsFormFile('.$language1.'FORMUPLOAD , "'.$structure0.'", $GLOBALS[\'xoopsModuleConfig\'][\'maxsize\']),false); + $fileseltray->addElement(new XoopsFormLabel(\'\'), false); + $imgtray->addElement($fileseltray); + $form->addElement($imgtray); '; break; case "XoopsFormUploadFile": - $text .= '$form->addElement(new XoopsFormFile('.$language_form.', "'.$structure0.'", $GLOBALS[\'xoopsModuleConfig\'][\'maxsize\']), '.$required_field.'); + $text .= ' + $form->addElement(new XoopsFormFile('.$language_form.', "'.$structure0.'", $GLOBALS[\'xoopsModuleConfig\'][\'maxsize\']), '.$required_field.'); '; break; case "XoopsFormColorPicker": - $text .= '$form->addElement(new XoopsFormColorPicker('.$language_form.', "'.$structure0.'", $this->getVar("'.$structure0.'")), '.$required_field.'); - '; - break; - - case "XoopsFormSelect": - $data = explode("-", $champs_param_elements[$i]); $text .= ' - $'.$data[0].'Handler =& xoops_getModuleHandler("'.$modules_name.'_'.$data[0].'", "'.$modules_name.'"); - $'.$data[0].'_select = new XoopsFormSelect('.$language_form.', "'.$structure0.'", $this->getVar("'.$structure0.'")); - $'.$data[0].'_select->addOptionArray($'.$data[0].'Handler->getList()); - $form->addElement($'.$data[0].'_select, '.$required_field.'); + $form->addElement(new XoopsFormColorPicker('.$language_form.', "'.$structure0.'", $this->getVar("'.$structure0.'")), '.$required_field.'); '; - unset($data); - break; - + break; + case "XoopsFormSelectUser": - $text .= '$form->addElement(new XoopsFormSelectUser('.$language_form.', "'.$structure0.'", false, $this->getVar("'.$structure0.'"), 1, false), '.$required_field.'); + $text .= ' + $form->addElement(new XoopsFormSelectUser('.$language_form.', "'.$structure0.'", false, $this->getVar("'.$structure0.'"), 1, false), '.$required_field.'); '; break; case "XoopsFormTopic": $text .= ' - include_once(XOOPS_ROOT_PATH."/class/tree.php"); - $topicHandler =& xoops_getModuleHandler("'.$modules_name.'_topic", "'.$modules_name.'"); - $arr = $topicHandler->getall(); - $mytree = new XoopsObjectTree($arr, "topic_id", "topic_pid"); - $form->addElement(new XoopsFormLabel('.$language_form.', $mytree->makeSelBox("'.$structure0.'", "topic_title","-", $this->getVar("'.$structure0.'"),'.$required_field.'))); + include_once(XOOPS_ROOT_PATH."/class/tree.php"); + $topicHandler =& xoops_getModuleHandler("'.$modules_name.'_topic", "'.$modules_name.'"); + $arr = $topicHandler->getall(); + $mytree = new XoopsObjectTree($arr, "topic_id", "topic_pid"); + $form->addElement(new XoopsFormLabel('.$language_form.', $mytree->makeSelBox("'.$structure0.'", "topic_title","-", $this->getVar("'.$structure0.'"),'.$required_field.'))); '; break; case "XoopsFormRadioYN": $text .= ' $'.$structure0.' = $this->isNew() ? 0 : $this->getVar("'.$structure0.'"); - $form->addElement(new XoopsFormRadioYN('.$language_form.', "'.$structure0.'", $'.$structure0.', _YES, _NO), '.$required_field.'); + $form->addElement(new XoopsFormRadioYN('.$language_form.', "'.$structure0.'", $'.$structure0.', _YES, _NO), '.$required_field.'); '; break; case "XoopsFormTextDateSelect": - $text .= '$form->addElement(new XoopsFormTextDateSelect('.$language_form.', "'.$structure0.'", "", $this->getVar("'.$structure0.'"))); + $text .= ' + $form->addElement(new XoopsFormTextDateSelect('.$language_form.', "'.$structure0.'", "", $this->getVar("'.$structure0.'"))); '; break; default: $data = explode("-", $champs_param_elements[$i]); $text .= ' - include_once(XOOPS_ROOT_PATH."/class/tree.php"); - $'.$data[1].'Handler =& xoops_getModuleHandler("'.$modules_name.'_'.$data[1].'", "'.$modules_name.'"); - $criteria = new CriteriaCompo(); - $criteria->setSort(\''.$data[1].'_id ASC, '.$data[1].'_title\'); - $criteria->setOrder(\'ASC\'); - $'.$data[1].'_arr = $'.$data[1].'Handler->getall(); - $mytree = new XoopsObjectTree($'.$data[1].'_arr, "'.$data[1].'_id", "'.$data[1].'_pid"); - $form->addElement(new XoopsFormLabel('.$language_form.', $mytree->makeSelBox("'.$data[1].'_pid", "'.$data[1].'_title","--", $this->getVar("'.$data[1].'_pid"),'.$required_field.'))); + include_once(XOOPS_ROOT_PATH."/class/tree.php"); + $'.$data[1].'Handler =& xoops_getModuleHandler("'.$modules_name.'_'.$data[1].'", "'.$modules_name.'"); + $criteria = new CriteriaCompo(); + $criteria->setSort(\''.$data[1].'_id ASC, '.$data[1].'_title\'); + $criteria->setOrder(\'ASC\'); + $'.$data[1].'_arr = $'.$data[1].'Handler->getall(); + $mytree = new XoopsObjectTree($'.$data[1].'_arr, "'.$data[1].'_id", "'.$data[1].'_pid"); + $form->addElement(new XoopsFormLabel('.$language_form.', $mytree->makeSelBox("'.$data[1].'_pid", "'.$data[1].'_title","--", $this->getVar("'.$data[1].'_pid"),'.$required_field.'))); '; unset($data); break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-04-22 18:57:03
|
Revision: 9371 http://xoops.svn.sourceforge.net/xoops/?rev=9371&view=rev Author: txmodxoops Date: 2012-04-22 18:56:55 +0000 (Sun, 22 Apr 2012) Log Message: ----------- Updated Modified Paths: -------------- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/index.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_modules.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_xoopsversion.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/italian/admin.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/update language 1.37 to 1.38.txt XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/sql/mysql.sql Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php 2012-04-21 14:35:22 UTC (rev 9370) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php 2012-04-22 18:56:55 UTC (rev 9371) @@ -33,6 +33,7 @@ $mods_image = $mods->getVar('modules_image'); $mods_display_admin = $mods->getVar('modules_display_admin'); $mods_display_user = $mods->getVar('modules_display_user'); + $mods_display_submenu = $mods->getVar('modules_display_submenu'); //Remove the new module directory if it exists TDMCreate_clearDir($modPath.'/modules/'.$mods_name); @@ -68,7 +69,7 @@ $tbls_display_admin = $tbls_arr[$i]->getVar('tables_display_admin'); $tbls_display_user = $tbls_arr[$i]->getVar('tables_display_user'); $tbls_online = $tbls_arr[$i]->getVar('tables_online'); - $tbls_pending = $tbls_arr[$i]->getVar('tables_pending'); + $tbls_submenu = $tbls_arr[$i]->getVar('tables_submenu'); $tbls_search = $tbls_arr[$i]->getVar('tables_search'); $tbls_coms = $tbls_arr[$i]->getVar('tables_coms'); @@ -123,12 +124,12 @@ $tbls_display_admin = $tablesHandler->getVar('tables_display_admin'); $tbls_display_user = $tablesHandler->getVar('tables_display_user'); $tbls_online = $tablesHandler->getVar('tables_online'); - $tbls_pending = $tablesHandler->getVar('tables_pending'); + $tbls_submenu = $tablesHandler->getVar('tables_submenu'); $tbls_search = $tablesHandler->getVar('tables_search'); $tbls_coms = $tablesHandler->getVar('tables_coms'); //Creation of xoopsversion.php file //Xoops version set to integrate the end of the block, etc. - const_xoopsversion($mods, $mods_name, $tbls_arr, $tbls_module_table, $tbls_blocks, $tbls_search); + const_xoopsversion($mods, $mods_name, $tbls_arr, $tbls_module_table, $tbls_blocks, $tbls_submenu, $tbls_search, $tbls_coms); if($mods_display_user == 1){ // Creation of template index const_templates_index($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres); Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/index.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/index.php 2012-04-21 14:35:22 UTC (rev 9370) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/index.php 2012-04-22 18:56:55 UTC (rev 9371) @@ -19,13 +19,16 @@ */ include 'admin_header.php'; xoops_cp_header(); + $criteria = new CriteriaCompo(); $count_modules = $modulesHandler->getCount($criteria); + $count_tables = $tablesHandler->getCount($criteria); + $indexAdmin = new ModuleAdmin(); -$indexAdmin->addInfoBox(_AM_TDMCREATE_ADMIN_NUMMODULES) ; -$indexAdmin->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, "<label>" ._AM_TDMCREATE_THEREARE_NUMMODULES. "</label>", $count_modules, 'Green') ; + $indexAdmin->addInfoBox(_AM_TDMCREATE_ADMIN_NUMMODULES) ; + $indexAdmin->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, "<label>" ._AM_TDMCREATE_THEREARE_NUMMODULES. "</label>", $count_modules, 'Green'); + $indexAdmin->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, "<label>" ._AM_TDMCREATE_THEREARE_NUMTABLES. "</label>", $count_tables, 'Orange'); echo $indexAdmin->addNavigation('index.php'); echo $indexAdmin->renderIndex(); - include "admin_footer.php"; \ No newline at end of file Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_modules.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_modules.php 2012-04-21 14:35:22 UTC (rev 9370) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_modules.php 2012-04-22 18:56:55 UTC (rev 9371) @@ -56,11 +56,13 @@ $this->initVar("modules_module_website_url",XOBJ_DTYPE_TXTBOX, null, false); $this->initVar("modules_module_website_name",XOBJ_DTYPE_TXTBOX, null, false); $this->initVar("modules_release",XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar("modules_module_status",XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar("modules_display_menu",XOBJ_DTYPE_INT, null, false, 1); + $this->initVar("modules_module_status",XOBJ_DTYPE_TXTBOX, null, false); $this->initVar("modules_display_admin",XOBJ_DTYPE_INT, null, false, 1); $this->initVar("modules_display_user",XOBJ_DTYPE_INT, null, false, 1); + $this->initVar("modules_display_submenu",XOBJ_DTYPE_INT, null, false, 1); $this->initVar("modules_active_search",XOBJ_DTYPE_INT, null, false, 1); + $this->initVar("modules_active_coms",XOBJ_DTYPE_INT, null, false, 1); + $this->initVar("modules_active_notify",XOBJ_DTYPE_INT, null, false, 1); } function tdmcreate_modules() @@ -98,15 +100,40 @@ $form->addElement( new XoopsFormEditor(_AM_TDMCREATE_MODULES_DESCRIPTION, "modules_description", $editor_configs), true); $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_AUTHOR, 'modules_author', 50, 255, $this->getVar('modules_author')), true); - $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_LICENSE, 'modules_license', 50, 255, $this->getVar('modules_license')), true); + $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_LICENSE, 'modules_license', 50, 255, $this->getVar('modules_license')), true); + // Options + $options_tray = new XoopsFormElementTray(_OPTIONS,'<br />'); + // Display Admin $modules_display_admin = $this->isNew() ? 0 : $this->getVar('modules_display_admin'); - $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_DISPLAY_ADMIN, 'modules_display_admin', $modules_display_admin, _YES, _NO)); + $check_display_admin = new XoopsFormCheckBox('', 'modules_display_admin', $modules_display_admin); + $check_display_admin->addOption( 1, _AM_TDMCREATE_MODULES_DISPLAY_ADMIN ); + $options_tray->addElement($check_display_admin); + // Display Admin $modules_display_user = $this->isNew() ? 0 : $this->getVar('modules_display_user'); - $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_DISPLAY_USER, 'modules_display_user', $modules_display_user, _YES, _NO)); + $check_display_user = new XoopsFormCheckBox('', 'modules_display_user', $modules_display_user); + $check_display_user->addOption( 1, _AM_TDMCREATE_MODULES_DISPLAY_USER ); + $options_tray->addElement($check_display_user); + // Display Submenu + $modules_display_submenu = $this->isNew() ? 0 : $this->getVar('modules_display_submenu'); + $check_display_submenu = new XoopsFormCheckBox('', 'modules_display_submenu', $modules_display_submenu); + $check_display_submenu->addOption( 1, _AM_TDMCREATE_MODULES_DISPLAY_SUBMENU ); + $options_tray->addElement($check_display_submenu); + // Active Search $modules_active_search = $this->isNew() ? 0 : $this->getVar('modules_active_search'); - $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_ACTIVE_SEARCH, 'modules_active_search', $modules_active_search, _YES, _NO)); - $modules_active_comments = $this->isNew() ? 0 : $this->getVar('modules_active_comments'); - $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_ACTIVE_COMMENTS, 'modules_active_comments', $modules_active_comments, _YES, _NO)); + $check_display_search = new XoopsFormCheckBox('', 'modules_active_search', $modules_active_search); + $check_display_search->addOption( 1, _AM_TDMCREATE_MODULES_ACTIVE_SEARCH ); + $options_tray->addElement($check_display_search); + // Active Comments + $modules_active_comments = $this->isNew() ? 0 : $this->getVar('modules_active_coms'); + $check_active_comments = new XoopsFormCheckBox('', 'modules_active_coms', $modules_active_comments); + $check_active_comments->addOption( 1, _AM_TDMCREATE_MODULES_ACTIVE_COMMENTS ); + $options_tray->addElement($check_active_comments); + // Active Notify + $modules_active_notify = $this->isNew() ? 0 : $this->getVar('modules_active_notify'); + $check_active_notify = new XoopsFormCheckBox('', 'modules_active_notify', $modules_active_notify); + $check_active_notify->addOption( 1, _AM_TDMCREATE_MODULES_ACTIVE_NOTIFY ); + $options_tray->addElement($check_active_notify); + $form->addElement($options_tray); $modules_image = $this->getVar('modules_image') ? $this->getVar('modules_image') : 'default_slogo.png'; @@ -152,15 +179,11 @@ return $form; } } - class TDMCreatetdmcreate_modulesHandler extends XoopsPersistableObjectHandler { - function __construct(&$db) { parent::__construct($db, "tdmcreate_modules", 'tdmcreate_modules', 'modules_id', 'modules_name'); } - } - ?> \ No newline at end of file Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php 2012-04-21 14:35:22 UTC (rev 9370) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php 2012-04-22 18:56:55 UTC (rev 9371) @@ -48,6 +48,7 @@ $this->initVar("tables_submitter",XOBJ_DTYPE_INT,null,false, 1); $this->initVar("tables_created",XOBJ_DTYPE_INT,null,false, 1); $this->initVar("tables_online",XOBJ_DTYPE_INT,null,false, 1); + $this->initVar("tables_submenu",XOBJ_DTYPE_INT,null,false, 1); $this->initVar("tables_search",XOBJ_DTYPE_INT,null,false, 1); $this->initVar("tables_coms",XOBJ_DTYPE_INT,null,false, 1); } @@ -686,13 +687,18 @@ $form->addElement(new XoopsFormText(_AM_TDMCREATE_TABLES_NB_CHAMPS, 'tables_nb_champs', 10, 25, $this->getVar('tables_nb_champs')), true); $select_blocs = $this->isNew() ? 0 : $this->getVar('tables_blocs'); - $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_BLOCS, 'tables_blocs', $select_blocs, _YES, _NO)); + $select_blocs_radio = new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_BLOCS, 'tables_blocs', $select_blocs, _YES, _NO); + $select_blocs_radio->setDescription(_AM_TDMCREATE_TABLES_BLOCS_DESC); + $form->addElement($select_blocs_radio); $select_display_admin = $this->isNew() ? 0 : $this->getVar('tables_display_admin'); $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_DISPLAY_ADMIN, 'tables_display_admin', $select_display_admin, _YES, _NO)); $select_display_user = $this->isNew() ? 0 : $this->getVar('tables_display_user'); $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_DISPLAY_USER, 'tables_display_user', $select_display_user, _YES, _NO)); + + $select_display_sumenu = $this->isNew() ? 0 : $this->getVar('tables_display_sumenu'); + $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_TABLES_DISPLAY_SUMENU, 'tables_display_sumenu', $select_display_sumenu, _YES, _NO)); $form->addElement(new XoopsFormLabel(_AM_TDMCREATE_FORM_INFO_TABLE,_AM_TDMCREATE_FORM_INFO_TABLE_FIELD)); $select_submitter = $this->isNew() ? 0 : $this->getVar('tables_submitter'); @@ -728,6 +734,7 @@ } $imgtray = new XoopsFormElementTray(_AM_TDMCREATE_TABLES_IMAGE,'<br />'); + $imgtray->setDescription(_AM_TDMCREATE_TABLES_IMAGE_DESC); if(is_dir(XOOPS_ROOT_PATH . "/Frameworks/moduleclasses/icons/32")){ $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, "./Frameworks/moduleclasses/icons/32"); }else{ Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_xoopsversion.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_xoopsversion.php 2012-04-21 14:35:22 UTC (rev 9370) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_xoopsversion.php 2012-04-22 18:56:55 UTC (rev 9371) @@ -19,7 +19,7 @@ */ include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php'; -function const_xoopsversion($modules, $modules_name, $tables_arr, $tables_module_table, $tables_blocks, $tables_search) +function const_xoopsversion($modules, $modules_name, $tables_arr, $tables_module_table, $tables_blocks, $table_submenu, $tables_search, $tables_coms) { $language = '_MI_'.strtoupper($modules_name).''; $file = "xoops_version.php"; @@ -102,11 +102,23 @@ '.$modv.'[\'onInstall\'] = "include/install.php"; //'.$modv.'[\'onUpdate\'] = "include/update.php"; '; - if ( $modules->getVar("modules_display_user") == 1 ) { $text .= '// Menu '.$modv.'[\'hasMain\'] = 1; -'; +'; + if ( $modules->getVar("modules_display_submenu") == 1 && $table_submenu == 1) { + $sm = 1; + $modvsm = $modv.'[\'sub\']'; + foreach (array_keys($tables_arr) as $i) + { + $t_name = $tables_arr[$i]->getVar("tables_name"); + $text .= ' +'.$modvsm.'[$i][\'name\'] = _MI_'.strtoupper($modules_name).'_SMNAME'.$sm.'; +'.$modvsm.'[$i][\'url\'] = "'.strtolower($t_name).'.php"; +'; $sm++; + } + unset($sm); + } } if ( $modules->getVar("modules_active_search") == 1 && $tables_search == 1 ) { @@ -116,6 +128,20 @@ '.$modv.'[\'search\'][\'func\'] = "'.strtolower($modules_name).'_search"; '; } +if ( $modules->getVar("modules_active_coms") == 1 && $tables_coms == 1 ) { +$modvcms = $modv.'[\'comments\']'; +$text .= '// Comments +'.$modvcms.'[\'hasComments\'] = 1; +'.$modvcms.'[\'itemName\'] = "aid"; +'.$modvcms.'[\'pageName\'] = "'.strtolower($modules_name).'_single.php"; +'.$modvcms.'[\'extraParams\'] = array(\'cid\'); +// Comment callback functions +'.$modvcms.'[\'callbackFile\'] = "include/comment_functions.php"; +'.$modvcms.'[\'callback\'][\'approve\'] = "'.strtolower($modules_name).'_com_approve"; +'.$modvcms.'[\'callback\'][\'update\'] = "'.strtolower($modules_name).'_com_update"; +'; +} + $modvt = ''.$modv.'[\'templates\'][$i]'; $text .='// Templates $i = 1; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php 2012-04-21 14:35:22 UTC (rev 9370) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php 2012-04-22 18:56:55 UTC (rev 9371) @@ -27,6 +27,7 @@ define("_AM_TDMCREATE_ADMIN_UPDATE", "Update"); define("_AM_TDMCREATE_ADMIN_NUMMODULES", "Quantity Units"); define("_AM_TDMCREATE_THEREARE_NUMMODULES", "There are <span class='red bold'>%s</span> modules stored in the Database"); +define("_AM_TDMCREATE_THEREARE_NUMTABLES", "There are <span class='red bold'>%s</span> tables stored in the Database"); define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_ELEMENTS", "Forms: Elements"); define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_DISPLAY_ADMIN", "Page: Show admin"); @@ -92,6 +93,9 @@ define("_AM_TDMCREATE_MODULES_DISPLAY_USER", "User Visible hand"); define("_AM_TDMCREATE_MODULES_ACTIVE_SEARCH", "Enable research"); define("_AM_TDMCREATE_MODULES_ACTIVE_COMMENTS", "Enable comments"); +// v1.38 +define("_AM_TDMCREATE_MODULES_DISPLAY_SUBMENU", "Visible Submenu"); +define("_AM_TDMCREATE_MODULES_ACTIVE_NOTIFY", "Active Notifications"); //Tables.php //Form1 @@ -101,9 +105,11 @@ define("_AM_TDMCREATE_TABLES_NAME", "Name of the table <br> <i>(The name of the module will automatically be added to the prefix)</i> <br> Example: 'nome_modulo'_'table'_"); define("_AM_TDMCREATE_TABLES_NB_CHAMPS", "Number of fields in this table <br> <i>in this version of the module, you can not add new fields after this form <br> properly calculates what you need</i>"); define("_AM_TDMCREATE_TABLES_IMAGE", "Table Logo"); -define("_AM_TDMCREATE_TABLES_BLOCS", "Create a new block for this table (blocks: random, latest, today)"); +define("_AM_TDMCREATE_TABLES_BLOCS", "Create a new block for this table"); +define("_AM_TDMCREATE_TABLES_BLOCS_DESC", "(blocs: random, latest, today)"); define("_AM_TDMCREATE_TABLES_DISPLAY_ADMIN", "Use the side view of TAB Admin"); define("_AM_TDMCREATE_TABLES_DISPLAY_USER", "Use the side view of TAB Member"); +define("_AM_TDMCREATE_TABLES_DISPLAY_SUMENU", "Use view TAB Submenu"); define("_AM_TDMCREATE_TABLES_SUBMITTER", "Add champ submitter?"); define("_AM_TDMCREATE_TABLES_CREATED", "Add champ date created?"); define("_AM_TDMCREATE_TABLES_ONLINE", "Add champ online?"); @@ -111,6 +117,8 @@ define("_AM_TDMCREATE_TABLES_EXIST", "The name specified for this table is already in use"); define("_AM_TDMCREATE_TABLES_COMS", "Enable the search in this table <br> <i>the module can manage for the moment, the coms on a table <br> Coms option will be disabled if you Confirmed</i>"); define("_AM_TDMCREATE_TABLES_TOPIC_ADD", "Add the table to the category"); +// v1.38 +define("_AM_TDMCREATE_TABLES_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>."); //Form2 define("_AM_TDMCREATE_TABLES_CHAMPS_ADD", "Enter the fields"); define("_AM_TDMCREATE_TABLES_CHAMPS_EDIT", "Edit your field"); Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/italian/admin.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/italian/admin.php 2012-04-21 14:35:22 UTC (rev 9370) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/italian/admin.php 2012-04-22 18:56:55 UTC (rev 9371) @@ -27,6 +27,7 @@ define("_AM_TDMCREATE_ADMIN_UPDATE", "Aggiorna"); define("_AM_TDMCREATE_ADMIN_NUMMODULES", "Quantità Moduli"); define("_AM_TDMCREATE_THEREARE_NUMMODULES","Ci sono <span class='red bold'>%s</span> Moduli salvati nel Database"); +define("_AM_TDMCREATE_THEREARE_NUMTABLES","Ci sono <span class='red bold'>%s</span> Tabelle salvate nel Database"); define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_ELEMENTS","Form : Elementi"); define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_DISPLAY_ADMIN","Pagina : Visualizza admin"); @@ -90,6 +91,9 @@ define("_AM_TDMCREATE_MODULES_DISPLAY_USER", "Visibile lato Utente"); define("_AM_TDMCREATE_MODULES_ACTIVE_SEARCH", "Abilita la ricerca"); define("_AM_TDMCREATE_MODULES_ACTIVE_COMMENTS", "Abilita i commenti"); +// v1.38 +define("_AM_TDMCREATE_MODULES_DISPLAY_SUBMENU", "Visibile Submenu"); +define("_AM_TDMCREATE_MODULES_ACTIVE_NOTIFY", "Attiva le Notifiche"); //Tables.php //Form1 @@ -99,9 +103,11 @@ define("_AM_TDMCREATE_TABLES_NAME", "Nome della tabella <br> <i>(il nome del modulo verrà automaticamente aggiunto al prefisso)</i> <br> Esempio: 'nome_modulo'_'table'_"); define("_AM_TDMCREATE_TABLES_NB_CHAMPS", "Numero di campi in questa tabella <br> <i>in questa versione del modulo, non è possibile aggiungere nuovi campi dopo questo form<br> calcola in modo corretto ciò di cui hai bisogno</i>"); define("_AM_TDMCREATE_TABLES_IMAGE", "Logo tabella"); -define("_AM_TDMCREATE_TABLES_BLOCS", "Crea un nuovo blocco per questa tabella (blocchi: casuali, recenti, oggi)"); +define("_AM_TDMCREATE_TABLES_BLOCS", "Crea un nuovo blocco per questa tabella"); +define("_AM_TDMCREATE_TABLES_BLOCS_DESC", "(blocchi: casuali, recenti, oggi)"); define("_AM_TDMCREATE_TABLES_DISPLAY_ADMIN", "Usa vista TAB lato Admin"); define("_AM_TDMCREATE_TABLES_DISPLAY_USER", "Usa vista TAB lato Utente"); +define("_AM_TDMCREATE_TABLES_DISPLAY_SUMENU", "Usa vista TAB Submenu"); define("_AM_TDMCREATE_TABLES_SUBMITTER", "Aggiungere campo utente che invia?"); define("_AM_TDMCREATE_TABLES_CREATED", "Aggiungere campo data creazione?"); define("_AM_TDMCREATE_TABLES_ONLINE", "Aggiungere campo online?"); @@ -109,6 +115,8 @@ define("_AM_TDMCREATE_TABLES_EXIST", "Il nome specificato per questa tabella è già in uso"); define("_AM_TDMCREATE_TABLES_COMS","Enable the search in this table <br><i>the module can manage for the moment, the coms on a table<br>Coms option will be disabled if you confirmed</i>"); define("_AM_TDMCREATE_TABLES_TOPIC_ADD", "Aggiungi la tabella per la categoria"); +// v1.38 +define("_AM_TDMCREATE_TABLES_IMAGE_DESC", "<span class='red bold'>Attenzione</span>: Se tu volessi scegliere una nuova immagine, è preferibile nominarla con il nome del modulo prima ed a seguire col nome dell'immagine in modo da non sovrascrivere eventuali immagini con lo stesso nome, nella cartella <span class='bold'>Frameworks/moduleclasses/moduleadmin/icons/32/</span>. Altrimenti un'altra soluzione, sarebbe quella di inserire le immagini del modulo, in una nuova cartella che viene creata, con la creazione del modulo stesso - <span class='bold'>images/32</span>."); //Form2 define("_AM_TDMCREATE_TABLES_CHAMPS_ADD", "Inserisci i campi"); define("_AM_TDMCREATE_TABLES_CHAMPS_EDIT", "Modifica il tuo campo"); Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/update language 1.37 to 1.38.txt =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/update language 1.37 to 1.38.txt 2012-04-21 14:35:22 UTC (rev 9370) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/update language 1.37 to 1.38.txt 2012-04-22 18:56:55 UTC (rev 9371) @@ -51,6 +51,15 @@ //deleted define("_AM_TDMCREATE_TABLES_TOPICS", "Add Topic"); +// New Module +define("_AM_TDMCREATE_MODULES_ACTIVE_SUBMENU", "Visible Submenu"); +define("_AM_TDMCREATE_MODULES_ACTIVE_NOTIFY", "Active Notifications"); + +// New Table +define("_AM_TDMCREATE_TABLES_DISPLAY_SUMENU", "Use view TAB Submenu"); +define("_AM_TDMCREATE_TABLES_IMAGE_DESC", "<span class='red'></span>"); +define("_AM_TDMCREATE_TABLES_BLOCS_DESC", "(blocs: random, latest, today)"); + // Filemanager.php //Nav define('_AM_TDMCREATE_FILEMANAGER_NAV_MANAGER','File Manager'); Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/sql/mysql.sql =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/sql/mysql.sql 2012-04-21 14:35:22 UTC (rev 9370) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/sql/mysql.sql 2012-04-22 18:56:55 UTC (rev 9371) @@ -21,11 +21,13 @@ `modules_module_website_url` varchar(255) default NULL, `modules_module_website_name` varchar(255) default NULL, `modules_release` varchar(11) NOT NULL default '00-00-0000', - `modules_module_status` varchar(255) default NULL, - `modules_display_menu` tinyint(1) NOT NULL default '1', + `modules_module_status` varchar(255) default NULL, `modules_display_admin` tinyint(1) NOT NULL default '1', `modules_display_user` tinyint(1) NOT NULL default '1', + `modules_display_submenu` tinyint(1) NOT NULL default '1', `modules_active_search` tinyint(1) NOT NULL default '1', + `modules_active_coms` tinyint(1) NOT NULL default '1', + `modules_active_notify` tinyint(1) NOT NULL default '1', PRIMARY KEY (`modules_id`) ) ENGINE=MyISAM; @@ -45,6 +47,7 @@ `tables_submitter` tinyint(1) NOT NULL default '0', `tables_created` tinyint(1) NOT NULL default '0', `tables_online` tinyint(1) NOT NULL default '0', + `tables_submenu` tinyint(1) NOT NULL default '0', `tables_search` tinyint(1) NOT NULL default '0', `tables_coms` tinyint(1) NOT NULL default '0', PRIMARY KEY (`tables_id`) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-04-27 13:41:21
|
Revision: 9386 http://xoops.svn.sourceforge.net/xoops/?rev=9386&view=rev Author: txmodxoops Date: 2012-04-27 13:41:09 +0000 (Fri, 27 Apr 2012) Log Message: ----------- Updated Added jquery ui controls added js file Modified Paths: -------------- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/admin_header.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php Added Paths: ----------- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/js/ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/js/index.html XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/js/jqinit.js Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/admin_header.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/admin_header.php 2012-04-27 01:02:47 UTC (rev 9385) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/admin_header.php 2012-04-27 13:41:09 UTC (rev 9386) @@ -59,4 +59,8 @@ //Load languages xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); -xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); \ No newline at end of file +xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); +// Define Stylesheet +$sysjquistyle = XOOPS_URL . '/modules/system/css/ui/' . xoops_getModuleOption('jquery_theme', 'system') . '/ui.all.css'; +// Define scripts +$js = 'modules/TDMCreate/js/jqinit.js'; \ No newline at end of file Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php 2012-04-27 01:02:47 UTC (rev 9385) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php 2012-04-27 13:41:09 UTC (rev 9386) @@ -19,9 +19,15 @@ */ include 'admin_header.php'; xoops_cp_header(); -$indexAdmin = new ModuleAdmin(); -echo $indexAdmin->addNavigation('building.php'); +// Define Stylesheet +$xoTheme->addStylesheet( $sysjquistyle ); +// Define scripts +$xoTheme->addScript( $js ); + $op = TDMCreate_CleanVars($_REQUEST, 'op', 'default', 'string'); +$buildAdmin = new ModuleAdmin(); +echo $buildAdmin->addNavigation('building.php'); + switch ($op) { case "creation": $mods =& $modulesHandler->get($_REQUEST['modules_name']); Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php 2012-04-27 01:02:47 UTC (rev 9385) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php 2012-04-27 13:41:09 UTC (rev 9386) @@ -2,10 +2,8 @@ /** * **************************************************************************** * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS - * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Licence GPL Copyright (c) (http://www.xoops.org) * - * Cette licence, contient des limitations!!! - * * 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. @@ -14,22 +12,20 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * @license TDM GPL license - * @author TDM TEAM DEV MODULE + * @author TDM TEAM DEV MODULE * + * Version : 1.38 Thu 2012/04/12 14:04:25 : Timgno Exp $ * **************************************************************************** */ -include '../../../include/cp_header.php'; -include_once("../include/functions.php"); -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/class/tdmcreate_modules.php'; include 'admin_header.php'; xoops_cp_header(); +// Define Stylesheet +$xoTheme->addStylesheet( $sysjquistyle ); +// Define scripts +$xoTheme->addScript( $js ); -if (isset($_REQUEST['op'])) { - $op = $_REQUEST['op']; -} else { - @$op = 'default'; -} - +$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'modules_list', 'string' ); +$modulesAdmin = new ModuleAdmin(); switch ($op) { case "modules_save": if (!$GLOBALS['xoopsSecurity']->check()) { @@ -92,22 +88,21 @@ } break; - case "modules_create": - $modcreate_admin = new ModuleAdmin(); - echo $modcreate_admin->addNavigation('modules.php'); - $modcreate_admin->addItemButton(_AM_TDMCREATE_MODULES_LIST, 'modules.php?op=modules_list', 'list'); - echo $modcreate_admin->renderButton(); + case "modules_create": + echo $modulesAdmin->addNavigation('modules.php'); + $modulesAdmin->addItemButton(_AM_TDMCREATE_MODULES_LIST, 'modules.php?op=modules_list', 'list'); + echo $modulesAdmin->renderButton(); $obj =& $modulesHandler->create(); $form = $obj->getForm(); break; case "modules_edit": - $obj =& $modulesHandler->get($_REQUEST['modules_id']); - $form = $obj->getForm(); + $obj =& $modulesHandler->get($_REQUEST['modules_id']); + $form = $obj->getForm(); break; case "modules_delete": $obj =& $modulesHandler->get($_REQUEST['modules_id']); - if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) + if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); @@ -124,10 +119,9 @@ break; case "modules_list": default: - $modcreate_admin = new ModuleAdmin(); - echo $modcreate_admin->addNavigation('modules.php'); - $modcreate_admin->addItemButton(_AM_TDMCREATE_MODULES_NEW, 'modules.php?op=modules_create', 'add'); - echo $modcreate_admin->renderButton(); + echo $modulesAdmin->addNavigation('modules.php'); + $modulesAdmin->addItemButton(_AM_TDMCREATE_MODULES_NEW, 'modules.php?op=modules_create', 'add'); + echo $modulesAdmin->renderButton(); $criteria = new CriteriaCompo(); $criteria->setSort('modules_name'); @@ -136,42 +130,55 @@ $numrows_modules = $modulesHandler->getCount(); if ( $numrows_modules > 0 ) - { - echo '<table width="100%" cellspacing="1" class="outer">'; - echo '<tr class="center">'; - echo '<th width="20%">'._AM_TDMCREATE_NAME.'</th>'; - echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>'; - echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>'; - echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_USER.'</th>'; - echo '<th width="10%">'._AM_TDMCREATE_BLOCS.'</th>'; - echo '<th width="10%">'._AM_TDMCREATE_NB_CHAMPS.'</th>'; - echo '<th width="10%">'._AM_TDMCREATE_FORMACTION.'</th>'; - echo '</tr>'; - $class = 'odd'; - foreach (array_keys($modules_arr) as $i) - { - $modules_id = $modules_arr[$i]->getVar('modules_id'); - $modules_name = $modules_arr[$i]->getVar('modules_name'); - $modules_image = $modules_arr[$i]->getVar('modules_image'); - //$modules_blocks = $modules_arr[$i]->getVar('modules_blocs'); - $modules_display_admin = $modules_arr[$i]->getVar('modules_display_admin'); - $modules_display_user = $modules_arr[$i]->getVar('modules_display_user'); - $display_admin = ($modules_display_admin == 1) ? _YES : _NO; - $display_user = ($modules_display_user == 1) ? _YES : _NO; - echo '<tr class="odd center">'; - echo '<td><b>'.$modules_name.'</b></td>'; - echo '<td><img src="../images/uploads/modules/'.$modules_image.'" height="30px"></td>'; - echo '<td>'.$display_admin.'</td>'; - echo '<td>'.$display_user.'</td>'; - echo '<td> </td>'; - echo '<td> </td>'; - echo '<td>'; - echo '<a href="modules.php?op=modules_edit&modules_id='.$modules_id.'"><img src='. $pathImageIcon ."/edit.png alt="._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="modules.php?op=modules_delete&modules_id='.$modules_id.'"><img src='. $pathImageIcon ."/delete.png alt="._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>'; - echo '</td>'; - echo '</tr>'; - } - echo '</table><br><br>'; - } + { + echo '<table width="100%" cellspacing="1" class="outer">'; + echo '<tr class="center">'; + echo '<th width="20%">'._AM_TDMCREATE_NAME.'</th>'; + echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>'; + echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>'; + echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_USER.'</th>'; + echo '<th width="10%">'._AM_TDMCREATE_BLOCS.'</th>'; + echo '<th width="10%">'._AM_TDMCREATE_NB_CHAMPS.'</th>'; + echo '<th width="10%">'._AM_TDMCREATE_FORMACTION.'</th>'; + echo '</tr>'; + $class = 'odd'; + foreach (array_keys($modules_arr) as $i) + { + $modules_id = $modules_arr[$i]->getVar('modules_id'); + $modules_name = $modules_arr[$i]->getVar('modules_name'); + $modules_image = $modules_arr[$i]->getVar('modules_image'); + //$modules_blocks = $modules_arr[$i]->getVar('modules_blocs'); + $modules_display_admin = $modules_arr[$i]->getVar('modules_display_admin'); + $modules_display_user = $modules_arr[$i]->getVar('modules_display_user'); + $display_admin = ($modules_display_admin == 1) ? _YES : _NO; + $display_user = ($modules_display_user == 1) ? _YES : _NO; + echo '<tr class="odd center">'; + echo '<td><b>'.$modules_name.'</b></td>'; + echo '<td><img src="../images/uploads/modules/'.$modules_image.'" height="30px"></td>'; + echo '<td>'.$display_admin.'</td>'; + echo '<td>'.$display_user.'</td>'; + echo '<td> </td>'; + echo '<td> </td>'; + echo '<td>'; + echo '<a href="modules.php?op=modules_edit&modules_id='.$modules_id.'"><img src='. $pathImageIcon ."/edit.png alt="._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="modules.php?op=modules_delete&modules_id='.$modules_id.'"><img src='. $pathImageIcon ."/delete.png alt="._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>'; + echo '</td>'; + echo '</tr>'; + } + echo '</table><br><br>'; + } else { + echo '<table width="100%" cellspacing="1" class="outer">'; + echo '<tr class="center">'; + echo '<th width="20%">'._AM_TDMCREATE_NAME.'</th>'; + echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>'; + echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>'; + echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_USER.'</th>'; + echo '<th width="10%">'._AM_TDMCREATE_BLOCS.'</th>'; + echo '<th width="10%">'._AM_TDMCREATE_NB_CHAMPS.'</th>'; + echo '<th width="10%">'._AM_TDMCREATE_FORMACTION.'</th>'; + echo '</tr>'; + echo '<tr><td class="errorMsg" colspan="7">Empty!</td></tr>'; + echo '</table><br><br>'; + } break; } include "admin_footer.php"; \ No newline at end of file Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-04-27 01:02:47 UTC (rev 9385) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-04-27 13:41:09 UTC (rev 9386) @@ -2,10 +2,8 @@ /** * **************************************************************************** * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS - * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Licence GPL Copyright (c) (http://www.xoops.org) * - * Cette licence, contient des limitations!!! - * * 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. @@ -16,18 +14,18 @@ * @license TDM GPL license * @author TDM TEAM DEV MODULE * + * Version : 1.38 Thu 2012/04/12 14:04:25 : Timgno Exp $ * **************************************************************************** */ include 'admin_header.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/class/tdmcreate_tables.php'; xoops_cp_header(); +// Define Stylesheet +$xoTheme->addStylesheet( $sysjquistyle ); +// Define scripts +$xoTheme->addScript( $js ); -if (isset($_REQUEST['op'])) { - $op = $_REQUEST['op']; -} else { - @$op = 'default'; -} - +$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'tables_list', 'string' ); +$tablesAdmin = new ModuleAdmin(); switch ($op) { case "tables_save": @@ -341,12 +339,10 @@ break; case "tables_champs": - - $tabcreate_admin = new ModuleAdmin(); - echo $tabcreate_admin->addNavigation('tables.php'); - $tabcreate_admin->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php?op=tables_list', 'list'); - $tabcreate_admin->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=tables_champs', 'add'); - echo $tabcreate_admin->renderButton(); + echo $tablesAdmin->addNavigation('tables.php'); + $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php?op=tables_list', 'list'); + $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=tables_champs', 'add'); + echo $tablesAdmin->renderButton(); //Champs existe deja ? $criteria = new CriteriaCompo(); @@ -407,27 +403,21 @@ } break; - case "tables_create": - - $tabcreate_admin = new ModuleAdmin(); - echo $tabcreate_admin->addNavigation('tables.php'); - $tabcreate_admin->addItemButton(_AM_TDMCREATE_TABLES_TOPICS, 'tables.php?op=topics_create', 'add'); - $tabcreate_admin->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php?op=tables_list', 'list'); - - echo $tabcreate_admin->renderButton(); + case "tables_create": + echo $tablesAdmin->addNavigation('tables.php'); + $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_TOPICS, 'tables.php?op=topics_create', 'add'); + $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php?op=tables_list', 'list'); + echo $tablesAdmin->renderButton(); $obj =& $tablesHandler->create(); $form = $obj->getFormTable(); break; case "topics_create": - - $tabtopics_admin = new ModuleAdmin(); - echo $tabtopics_admin->addNavigation('tables.php'); - $tabtopics_admin->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=tables_create', 'add'); - $tabtopics_admin->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php?op=tables_list', 'list'); - - echo $tabtopics_admin->renderButton(); + echo $tablesAdmin->addNavigation('tables.php'); + $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=tables_create', 'add'); + $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php?op=tables_list', 'list'); + echo $tablesAdmin->renderButton(); $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix("tdmcreate_tables")." WHERE tables_name = 'topic'"); list( $topic ) = $xoopsDB->fetchRow($result); @@ -438,14 +428,11 @@ break; case "tables_list": - default: - - $tablist_admin = new ModuleAdmin(); - echo $tablist_admin->addNavigation('tables.php'); - $tablist_admin->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=tables_create', 'add'); - $tablist_admin->addItemButton(_AM_TDMCREATE_TABLES_TOPICS, 'tables.php?op=topics_create', 'add'); - - echo $tablist_admin->renderButton(); + default: + echo $tablesAdmin->addNavigation('tables.php'); + $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=tables_create', 'add'); + $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_TOPICS, 'tables.php?op=topics_create', 'add'); + echo $tablesAdmin->renderButton(); //Retirer les tables inutiles $sql = "SELECT tables_id FROM ".$xoopsDB->prefix("tdmcreate_tables")." WHERE tables_modules = 0"; @@ -537,8 +524,21 @@ } } } - echo '</table>'; - } + echo '</table><br /><br />'; + } else { + echo '<table width="100%" cellspacing="1" class="outer">'; + echo '<tr>'; + echo '<th align="center" width="10%">'._AM_TDMCREATE_NAME.'</th>'; + echo '<th align="center" width="10%">'._AM_TDMCREATE_IMAGE.'</th>'; + echo '<th align="center" width="8%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>'; + echo '<th align="center" width="8%">'._AM_TDMCREATE_DISPLAY_USER.'</th>'; + echo '<th align="center" width="5%">'._AM_TDMCREATE_BLOCS.'</th>'; + echo '<th align="center" width="8%">'._AM_TDMCREATE_NB_CHAMPS.'</th>'; + echo '<th align="center" width="5%">'._AM_TDMCREATE_FORMACTION.'</th>'; + echo '</tr>'; + echo '<tr><td class="errorMsg" colspan="7">Empty!</td></tr>'; + echo '</table><br /><br />'; + } break; } include "admin_footer.php"; \ No newline at end of file Added: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/js/index.html =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/js/index.html (rev 0) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/js/index.html 2012-04-27 13:41:09 UTC (rev 9386) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/js/jqinit.js =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/js/jqinit.js (rev 0) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/js/jqinit.js 2012-04-27 13:41:09 UTC (rev 9386) @@ -0,0 +1,24 @@ +/** + * **************************************************************************** + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.xoops.org) + * + * 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. + * + * @license TDM GPL license + * @author TDM TEAM DEV MODULE + * + * Version : 1.38 Thu 2012/04/12 14:04:25 : Timgno Exp $ + * **************************************************************************** + */ +$(document).ready(function(){ + $( "button, input:button, input:submit, input:file, input:reset" ).css("color","inherit").button(); + $( "checkbox" ).css("color","#fff").button(); + $( "radio" ).css("color","#fff").buttonset(); + $( ".toolbar" ).css("color","#000").buttonset(); +}); \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-04-30 13:33:38
|
Revision: 9415 http://xoops.svn.sourceforge.net/xoops/?rev=9415&view=rev Author: txmodxoops Date: 2012-04-30 13:33:32 +0000 (Mon, 30 Apr 2012) Log Message: ----------- Added pagenav Redirect if there aren't modules Modified Paths: -------------- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/italian/admin.php Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php 2012-04-30 13:32:38 UTC (rev 9414) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php 2012-04-30 13:33:32 UTC (rev 9415) @@ -204,7 +204,13 @@ case "default": default: - + $mod_arr = $modulesHandler->getall(); + $numrowsmod = count( $mod_arr ); + // Redirect if there aren't modules + if ( $numrowsmod == 0 ) { + redirect_header('modules.php?op=modules_create', 3, _AM_TDMCREATE_REDIRECT_NOMODULES ); + } + include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php"); $action = $_SERVER['REQUEST_URI']; @@ -212,20 +218,7 @@ $mods_select = new XoopsFormSelect(_AM_TDMCREATE_CONST_MODULES, 'modules_name', 'modules_name'); $mods_select->addOptionArray($modulesHandler->getList()); - $form->addElement($mods_select, true); - - /*$modules_name = xoops_getModuleHandler('tdmcreate_modules', 'TDMCreate'); - $criteria = new CriteriaCompo(new Criteria('modules_name', $modules_name)); - $criteria->setSort('tables_name'); - $criteria->setOrder('ASC'); - $tbls_name_arr = $tablesHandler->getAll($criteria); - foreach (array_keys($tbls_name_arr) as $i) - { - $tbls_option_name = $tbls_name_arr[$i]->getVar('tables_name'); - } - $tbls_select = new XoopsFormSelect(_AM_TDMCREATE_CONST_TABLES, 'tables_name', 'tables_name'); - $tbls_select->addOptionArray($tablesHandler->getList($criteria)); // $tbls_option_name - $form->addElement($tbls_select, false);*/ + $form->addElement($mods_select, true); $form->addElement(new XoopsFormHidden('op', 'creation')); $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php 2012-04-30 13:32:38 UTC (rev 9414) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php 2012-04-30 13:33:32 UTC (rev 9415) @@ -93,8 +93,8 @@ $modulesAdmin->addItemButton(_AM_TDMCREATE_MODULES_LIST, 'modules.php?op=modules_list', 'list'); echo $modulesAdmin->renderButton(); - $obj =& $modulesHandler->create(); - $form = $obj->getForm(); + $obj =& $modulesHandler->create(); + $form = $obj->getForm(); break; case "modules_edit": $obj =& $modulesHandler->get($_REQUEST['modules_id']); @@ -124,11 +124,31 @@ echo $modulesAdmin->renderButton(); $criteria = new CriteriaCompo(); - $criteria->setSort('modules_name'); - $criteria->setOrder('ASC'); - $modules_arr = $modulesHandler->getall($criteria); + $criteria->setSort('modules_id ASC, modules_name'); + $criteria->setOrder('ASC'); $numrows_modules = $modulesHandler->getCount(); - + if (isset($_REQUEST['limit'])) { + $criteria->setLimit($_REQUEST['limit']); + $limit = $_REQUEST['limit']; + } else { + $criteria->setLimit($GLOBALS['xoopsModuleConfig']['adminperpage']); + $limit = $GLOBALS['xoopsModuleConfig']['adminperpage']; + } + if (isset($_REQUEST['start'])) { + $criteria->setStart($_REQUEST['start']); + $start = $_REQUEST['start']; + } else { + $criteria->setStart(0); + $start = 0; + } + $modules_arr = $modulesHandler->getall($criteria); + if ( $numrows > $limit ) { + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + $pagenav = new XoopsPageNav($numrows_modules, $limit, $start, 'start', 'op=list&limit=' . $limit); + $pagenav = $pagenav->renderNav(4); + } else { + $pagenav = ''; + } if ( $numrows_modules > 0 ) { echo '<table width="100%" cellspacing="1" class="outer">'; @@ -165,6 +185,7 @@ echo '</tr>'; } echo '</table><br><br>'; + echo "<div class='center'>".$pagenav."</div>"; } else { echo '<table width="100%" cellspacing="1" class="outer">'; echo '<tr class="center">'; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-04-30 13:32:38 UTC (rev 9414) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-04-30 13:33:32 UTC (rev 9415) @@ -433,6 +433,13 @@ $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=tables_create', 'add'); $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_TOPICS, 'tables.php?op=topics_create', 'add'); echo $tablesAdmin->renderButton(); + + $mod_arr = $modulesHandler->getall(); + $numrowsmod = count( $mod_arr ); + // Redirect if there aren't modules + if ( $numrowsmod == 0 ) { + redirect_header('modules.php?op=modules_create', 2, _AM_TDMCREATE_REDIRECT_NOMODULES ); + } //Retirer les tables inutiles $sql = "SELECT tables_id FROM ".$xoopsDB->prefix("tdmcreate_tables")." WHERE tables_modules = 0"; @@ -441,13 +448,34 @@ { $sql_del = "DELETE FROM ".$xoopsDB->prefix("tdmcreate_tables")." WHERE tables_id = ".$myrow['tables_id'].""; $xoopsDB->queryF($sql_del); - } - - $criteria = new CriteriaCompo(); - $criteria->setSort('modules_name'); - $criteria->setOrder('ASC'); + } + + $criteria = new CriteriaCompo(); + $criteria->setSort('modules_id ASC, modules_name'); + $criteria->setOrder('ASC'); + $numrows_modules = $modulesHandler->getCount(); + if (isset($_REQUEST['limit'])) { + $criteria->setLimit($_REQUEST['limit']); + $limit = $_REQUEST['limit']; + } else { + $criteria->setLimit($GLOBALS['xoopsModuleConfig']['adminperpage']); + $limit = $GLOBALS['xoopsModuleConfig']['adminperpage']; + } + if (isset($_REQUEST['start'])) { + $criteria->setStart($_REQUEST['start']); + $start = $_REQUEST['start']; + } else { + $criteria->setStart(0); + $start = 0; + } $modules_arr = $modulesHandler->getall($criteria); - $numrows_modules = $modulesHandler->getCount(); + if ( $numrows > $limit ) { + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + $pagenav = new XoopsPageNav($numrows_modules, $limit, $start, 'start', 'op=list&limit=' . $limit); + $pagenav = $pagenav->renderNav(4); + } else { + $pagenav = ''; + } if ( $numrows_modules > 0 ) { @@ -525,6 +553,7 @@ } } echo '</table><br /><br />'; + echo "<div class='center'>".$pagenav."</div>"; } else { echo '<table width="100%" cellspacing="1" class="outer">'; echo '<tr>'; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php 2012-04-30 13:32:38 UTC (rev 9414) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php 2012-04-30 13:33:32 UTC (rev 9415) @@ -193,7 +193,6 @@ define("_AM_TDMCREATE_EDITOR", "Editor:"); //------------ new additions: Ver. 1.15 ----------------------- - define("_AM_TDMCREATE_ABOUT_WEBSITE_FORUM", "Forum Web Site"); //------------ new additions: Ver. 1.37 ----------------------- @@ -202,4 +201,7 @@ define("_AM_TDMCREATE_TABLES_LIST", "Tables List"); define("_AM_TDMCREATE_TABLES_NEW", "New Table"); define("_AM_TDMCREATE_TABLES_TOPICS", "New Topics"); + +//------------ new additions: Ver. 1.38 ----------------------- +define("_AM_TDMCREATE_REDIRECT_NOMODULES", "No module created, must create at least one before"); ?> \ No newline at end of file Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/italian/admin.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/italian/admin.php 2012-04-30 13:32:38 UTC (rev 9414) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/italian/admin.php 2012-04-30 13:33:32 UTC (rev 9415) @@ -198,4 +198,7 @@ define("_AM_TDMCREATE_TABLES_LIST", "Lista Tabelle"); define("_AM_TDMCREATE_TABLES_NEW", "Nuova Tabella"); define("_AM_TDMCREATE_TABLES_TOPICS", "Nuovo Topics"); + +//------------ new additions: Ver. 1.38 ----------------------- +define("_AM_TDMCREATE_REDIRECT_NOMODULES", "Nessun modulo creato, è necessario crearne almeno uno prima"); ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-05-08 08:19:23
|
Revision: 9456 http://xoops.svn.sourceforge.net/xoops/?rev=9456&view=rev Author: txmodxoops Date: 2012-05-08 08:19:13 +0000 (Tue, 08 May 2012) Log Message: ----------- Updated Fixed Bugs Added comments and notification creation files Modified Paths: -------------- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php Added Paths: ----------- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_comments_functions.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_notification.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_user_comments.php Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-05-08 08:12:27 UTC (rev 9455) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-05-08 08:19:13 UTC (rev 9456) @@ -546,7 +546,7 @@ echo '<td>'.$blocs.'</td>'; echo '<td>'.$nb_champs.'</td>'; echo '<td>'; - echo '<a href="tables.php?op=edit_tables&tables_id='.$tables_id.'"><img src='. $pathImageIcon ."/edit.png alt="._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="tables.php?op=edit_champs&tables_id='.$tables_id.'"><img src='. $pathImageIcon ."/fields.png alt="._AM_TDMCREATE_FORMCHAMPS.'" title="'._AM_TDMCREATE_FORMCHAMPS.'"></a> <a href="tables.php?op=delete_tables&tables_id='.$tables_id.'"><img src='. $pathImageIcon ."/delete.png alt="._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>'; + echo '<a href="tables.php?op=edit_tables&tables_id='.$tables_id.'"><img src='. $pathImageIcon ."/edit.png alt="._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="tables.php?op=edit_champs&tables_id='.$tables_id.'"><img src='. $pathImageIcon ."/inserttable.png alt="._AM_TDMCREATE_FORMCHAMPS.'" title="'._AM_TDMCREATE_FORMCHAMPS.'"></a> <a href="tables.php?op=delete_tables&tables_id='.$tables_id.'"><img src='. $pathImageIcon ."/delete.png alt="._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>'; echo '</td>'; echo '</tr>'; } Added: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_comments_functions.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_comments_functions.php (rev 0) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_comments_functions.php 2012-05-08 08:19:13 UTC (rev 9456) @@ -0,0 +1,46 @@ +<?php +/** + * **************************************************************************** + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.xoops.org) + * + * 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. + * + * @license TDM GPL license + * @author TDM TEAM DEV MODULE + * + * Version : 1.38 Thu 2012/04/12 14:04:25 : Timgno Exp $ + * **************************************************************************** + */ +include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_entete.php'; +include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php'; + +function const_include_functions($modules, $modules_name, $table_module_table) +{ + $file = "comment_functions.php"; + $path_file = TDM_CREATE_MURL."/".$modules_name."/include/".$file; + $en_tete = const_entete($modules, 0); + $text = '<?php'.$en_tete.' +// comment callback functions +function '.$modules_name.'_com_update($link_id, $total_num) +{ + $db =& Database::getInstance(); + $sql = \'UPDATE \'.$db->prefix(\''.$table_module_table.'\').\' SET comments = \'.$total_num.\' WHERE aid = \'.$link_id; + $db->query($sql); +} + +function '.$modules_name.'_com_approve(&$comment) +{ + // notification mail here +} +?>'; +createFile($path_file, $text, + _AM_TDMCREATE_CONST_OK_INCLUDES, + _AM_TDMCREATE_CONST_NOTOK_INCLUDES, $file); +} +?> \ No newline at end of file Added: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_notification.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_notification.php (rev 0) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_notification.php 2012-05-08 08:19:13 UTC (rev 9456) @@ -0,0 +1,84 @@ +<?php +/** + * **************************************************************************** + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.xoops.org) + * + * 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. + * + * @license TDM GPL license + * @author TDM TEAM DEV MODULE + * + * Version : 1.38 Thu 2012/04/12 14:04:25 : Timgno Exp $ + * **************************************************************************** + */ +include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_entete.php'; +include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php'; + +function const_include_notification($modules, $modules_name, $table_name, $table_module_table) +{ + $file = "notification.inc.php"; + $path_file = TDM_CREATE_MURL."/".$modules_name."/include/".$file; + $en_tete = const_entete($modules, 0); + $text = '<?php'.$en_tete.' +// comment callback functions +function '.$modules_name.'_notify_iteminfo($category, $item_id) + { + global $xoopsModule, $xoopsModuleConfig, $xoopsConfig; + + if (empty($xoopsModule) || $xoopsModule->getVar(\'dirname\') != \''.$modules_name.'\') + { + $module_handler =& xoops_gethandler(\'module\'); + $module =& $module_handler->getByDirname(\''.$modules_name.'\'); + $config_handler =& xoops_gethandler(\'config\'); + $config =& $config_handler->getConfigsByCat(0,$module->getVar(\'mid\')); + } + else + { + $module =& $xoopsModule; + $config =& $xoopsModuleConfig; + } + + xoops_loadLanguage(\'main\', \''.$modules_name.'\'); + + if ($category==\'global\') + { + $item[\'name\'] = \'\'; + $item[\'url\'] = \'\'; + return $item; + } + + global $xoopsDB; + if ($category==\'category\') + { + // Assume we have a valid category id + $sql = \'SELECT '.$table_name.'_title FROM \' . $xoopsDB->prefix(\''.$modules_name.'_cat\') . \' WHERE '.$table_name.'_cid = \'.$item_id; + $result = $xoopsDB->query($sql); // TODO: error check + $result_array = $xoopsDB->fetchArray($result); + $item[\'name\'] = $result_array[\''.$table_name.'_title\']; + $item[\'url\'] = XOOPS_URL . \'/modules/\' . $module->getVar(\'dirname\') . \'/cat_view.php?'.$table_name.'_cid=\' . $item_id; + return $item; + } + + if ($category==\''.$table_name.'\') + { + // Assume we have a valid link id + $sql = \'SELECT '.$table_name.'_cid, '.$table_name.'_title FROM \'.$xoopsDB->prefix(\''.$table_module_table.'\') . \' WHERE '.$table_name.'_lid = \' . $item_id; + $result = $xoopsDB->query($sql); // TODO: error check + $result_array = $xoopsDB->fetchArray($result); + $item[\'name\'] = $result_array[\'title\']; + $item[\'url\'] = XOOPS_URL . \'/modules/\' . $module->getVar(\'dirname\') . \'/'.$modules_name.'_visit.php?'.$table_name.'_cid=\' . $result_array[\''.$table_name.'_cid\'] . \'&'.$table_name.'_lid=\' . $item_id; + return $item; + } + } +?>'; +createFile($path_file, $text, + _AM_TDMCREATE_CONST_OK_INCLUDES, + _AM_TDMCREATE_CONST_NOTOK_INCLUDES, $file); +} +?> \ No newline at end of file Added: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_user_comments.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_user_comments.php (rev 0) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_user_comments.php 2012-05-08 08:19:13 UTC (rev 9456) @@ -0,0 +1,116 @@ +<?php +/** + * **************************************************************************** + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.xoops.org) + * + * 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. + * + * @license TDM GPL license + * @author TDM TEAM DEV MODULE + * + * Version : 1.38 Thu 2012/04/12 14:04:25 : Timgno Exp $ + * **************************************************************************** + */ +include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php'; + +function const_user_comments($modules, $modules_name, $tables_name, $tables_module_table, $tables_champs, $tables_parametres) +{ + $file = "comment_edit.php"; + $path_file = TDM_CREATE_MURL."/".$modules_name."/".$file; + $en_tete = const_entete($modules, 0); + + ////Copie des fichiers coms + //comment_edit.php + $text = '<?php'.$en_tete.' +include \'../../mainfile.php\'; +include XOOPS_ROOT_PATH.\'/include/comment_edit.php\'; +?>'; +createFile($path_file, $text, + _AM_TDMCREATE_CONST_OK_COMS, + _AM_TDMCREATE_CONST_NOTOK_COMS, $file); + + + $file = "comment_delete.php"; + $path_file = TDM_CREATE_MURL."/".$modules_name."/".$file; + $en_tete = const_entete($modules, 0); + //comment_delete.php + $text = '<?php'.$en_tete.' +include \'../../mainfile.php\'; +include XOOPS_ROOT_PATH.\'/include/comment_delete.php\'; +?>'; +createFile($path_file, $text, + _AM_TDMCREATE_CONST_OK_COMS, + _AM_TDMCREATE_CONST_NOTOK_COMS, $file); + + $file = "comment_post.php"; + $path_file = TDM_CREATE_MURL."/".$modules_name."/".$file; + $en_tete = const_entete($modules, 0); + //comment_post.php + $text = '<?php'.$en_tete.' +include \'../../mainfile.php\'; +include XOOPS_ROOT_PATH.\'/include/comment_post.php\'; +?>'; +createFile($path_file, $text, + _AM_TDMCREATE_CONST_OK_COMS, + _AM_TDMCREATE_CONST_NOTOK_COMS, $file); + + $file = "comment_reply.php"; + $path_file = TDM_CREATE_MURL."/".$modules_name."/".$file; + $en_tete = const_entete($modules, 0); + //comment_reply.php + $text = '<?php'.$en_tete.' +include \'../../mainfile.php\'; +include XOOPS_ROOT_PATH.\'/include/comment_reply.php\'; +?>'; +createFile($path_file, $text, + _AM_TDMCREATE_CONST_OK_COMS, + _AM_TDMCREATE_CONST_NOTOK_COMS, $file); + + + $file = "comment_new.php"; + $path_file = TDM_CREATE_MURL."/".$modules_name."/".$file; + $en_tete = const_entete($modules, 0); + + //Champs + $champs_total = explode("|", $tables_champs); + $nb_champs = count($champs_total); + //print_r($champs_total); + //Parametres + $parametres_total = explode("|", $tables_parametres); + + //Recuperation des parametres affichage dans le formulaire + for($j=0; $j<$nb_champs; $j++) + { + $champs = explode(":", $champs_total[$j]); + //Afficher dans les elements du formulaire et choisir le type + if( $j != 0 ) + { + $parametres1 = explode(":", $parametres_total[$j-1]); + if ( $parametres1[4] == 1 ) + { + $champs_param_main_field = $champs[0]; + } + } + } + $text = '<?php'.$en_tete.' +include "../../mainfile.php"; +include_once XOOPS_ROOT_PATH."/modules/'.$modules_name.'/class/'.$tables_name.'.php"; +$com_itemid = isset($_REQUEST["com_itemid"]) ? intval($_REQUEST["com_itemid"]) : 0; +if ($com_itemid > 0) { + $'.$tables_name.'Handler =& xoops_getModuleHandler("'.$tables_module_table.'", "'.$tables_name.'"); + $'.$tables_name.' = $'.$tables_name.'handler->get($com_itemid); + $com_replytitle = $'.$tables_name.'->getVar("'.$champs_param_main_field.'"); + include XOOPS_ROOT_PATH."/include/comment_new.php"; +} +?>'; +createFile($path_file, $text, + _AM_TDMCREATE_CONST_OK_COMS, + _AM_TDMCREATE_CONST_NOTOK_COMS, $file); +} +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-05-19 08:14:20
|
Revision: 9544 http://xoops.svn.sourceforge.net/xoops/?rev=9544&view=rev Author: txmodxoops Date: 2012-05-19 08:14:11 +0000 (Sat, 19 May 2012) Log Message: ----------- Updated Pleace! reinstall or create a new index in database for modules and tables Modified Paths: -------------- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/admin_footer.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/admin_header.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_modules.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_header.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_entete.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_header.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_configs.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_search.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_js_jquery.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_modinfo_language.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_templates_footer.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_xoopsversion.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/images/uploads/modules/default_slogo.png XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/italian/admin.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/update language 1.37 to 1.38.txt XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/sql/mysql.sql XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/xoops_version.php Added Paths: ----------- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/docs/license.txt Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/admin_footer.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/admin_footer.php 2012-05-17 19:02:58 UTC (rev 9543) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/admin_footer.php 2012-05-19 08:14:11 UTC (rev 9544) @@ -18,9 +18,12 @@ * Version : 1.38 Thu 2012/04/12 14:04:25 : Timgno Exp $ * **************************************************************************** */ -global $pathImageAdmin; - -echo "<div align=\"center\"><a href=\"http://www.xoops.org\" target=\"_blank\"><img src=" . $pathImageAdmin.'/xoopsmicrobutton.gif'.' '." alt='XOOPS' title='XOOPS'></a></div>"; -echo "<div class='center small italic pad5'><strong>" . $xoopsModule->getVar("name") . "</strong> is maintained by the <a class='tooltip' rel='external' href='http://www.xoops.org/' title='Visit XOOPS Community'>XOOPS Community</a></div>"; - +echo "<div class='center'><a href='http://www.xoops.org' target='_blank'> + <img src='".$GLOBALS['pathImageAdmin']."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a> + </div>"; +echo "<div class='center pad5'> + <span class='bold'>".$GLOBALS['xoopsModule']->getVar('name')."</span> + <span class='small italic'> "._AM_TDMCREATE_MAINTAINEDBY." + <a href='http://www.xoops.org' title='Visit Xoops Community' class='tooltip' rel='external'>Xoops Community</a></span> + </div>"; xoops_cp_footer(); \ No newline at end of file Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/admin_header.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/admin_header.php 2012-05-17 19:02:58 UTC (rev 9543) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/admin_header.php 2012-05-19 08:14:11 UTC (rev 9544) @@ -18,36 +18,25 @@ * **************************************************************************** */ include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; -include_once XOOPS_ROOT_PATH . '/include/cp_functions.php'; -include_once("../include/functions.php"); +include_once XOOPS_ROOT_PATH . '/include/cp_header.php'; +include_once '../include/functions.php'; include_once 'includes.php'; -if ( file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))){ - include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'); - //return true; -}else{ - echo xoops_error("Error: You don't use the Frameworks \"admin module\". Please install this Frameworks"); - //return false; -} +$thisDirname = $GLOBALS['xoopsModule']->getVar('dirname'); //load class $modulesHandler =& xoops_getModuleHandler('tdmcreate_modules', 'TDMCreate'); $tablesHandler =& xoops_getModuleHandler('tdmcreate_tables', 'TDMCreate'); -$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); -$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); -$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); +$pathImageIcon = XOOPS_URL .'/'. $GLOBALS['xoopsModule']->getInfo('icons16'); +$pathImageAdmin = XOOPS_URL .'/'. $GLOBALS['xoopsModule']->getInfo('icons32'); +$pathModuleAdmin = $GLOBALS['xoopsModule']->getInfo('dirmoduleadmin'); $myts =& MyTextSanitizer::getInstance(); - -if ($xoopsUser) { - $moduleperm_handler =& xoops_gethandler('groupperm'); - if (!$moduleperm_handler->checkRight('module_admin', $xoopsModule->getVar( 'mid' ), $xoopsUser->getGroups())) { - redirect_header(XOOPS_URL, 1, _NOPERM); - exit(); - } -} else { - redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); - exit(); +// Locad admin menu class +if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){ + include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'); +}else{ + redirect_header("../../../admin.php", 5, _AM_TDMCREATE_MODULEADMIN_MISSING, false); } if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { @@ -57,9 +46,9 @@ $xoopsTpl->assign('pathImageIcon', $pathImageIcon); $xoopsTpl->assign('pathImageAdmin', $pathImageAdmin); //Load languages -xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); -xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); -xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('admin', $thisDirname); +xoops_loadLanguage('modinfo', $thisDirname); +xoops_loadLanguage('main', $thisDirname); // Define Stylesheet $sysjquistyle = XOOPS_URL . '/modules/system/css/ui/' . xoops_getModuleOption('jquery_theme', 'system') . '/ui.all.css'; // Define scripts Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php 2012-05-17 19:02:58 UTC (rev 9543) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php 2012-05-19 08:14:11 UTC (rev 9544) @@ -189,7 +189,7 @@ //Creation of admin file about.php const_admin_about($mods, $mods_name); //Creation of admin file index.php - const_admin_index($mods, $mods_name, $tbls_arr, $tbls_online, $tbls_pending); + const_admin_index($mods, $mods_name, $tbls_arr); } /************************************************/ /*User*/ Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php 2012-05-17 19:02:58 UTC (rev 9543) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php 2012-05-19 08:14:11 UTC (rev 9544) @@ -40,8 +40,8 @@ //Image include_once XOOPS_ROOT_PATH.'/class/uploader.php'; $uploaddir = XOOPS_ROOT_PATH . "/modules/".$xoopsModule->dirname()."/images/uploads/modules/"; - $uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null); - + $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']['mimetypes'], + $GLOBALS['xoopsModuleConfig']['maxsize'], null, null); if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']) ; $name_img = $_REQUEST['modules_name'].'_slogo.'.$extension; @@ -54,39 +54,49 @@ $obj->setVar('modules_image', $uploader->getSavedFileName()); } } else { - $obj->setVar('modules_image', $_REQUEST['modules_image']); + $obj->setVar('modules_image', $_POST['modules_image']); } - $obj->setVar('modules_name', $_REQUEST['modules_name']); - $obj->setVar('modules_version', $_REQUEST['modules_version']); - $obj->setVar('modules_description', $_REQUEST['modules_description']); - $obj->setVar('modules_author', $_REQUEST['modules_author']); - $obj->setVar('modules_author_mail', $_REQUEST['modules_author_mail']); - $obj->setVar('modules_author_website_url', $_REQUEST['modules_author_website_url']); - $obj->setVar('modules_author_website_name', $_REQUEST['modules_author_website_name']); - $obj->setVar('modules_credits', $_REQUEST['modules_credits']); + $obj->setVar('modules_name', $_POST['modules_name']); + $obj->setVar('modules_version', $_POST['modules_version']); + $obj->setVar('modules_description', $_POST['modules_description']); + $obj->setVar('modules_author', $_POST['modules_author']); + $obj->setVar('modules_author_mail', $_POST['modules_author_mail']); + $obj->setVar('modules_author_website_url', $_POST['modules_author_website_url']); + $obj->setVar('modules_author_website_name', $_POST['modules_author_website_name']); + $obj->setVar('modules_credits', $_POST['modules_credits']); $obj->setVar('modules_license', $_REQUEST['modules_license']); - $obj->setVar('modules_release_info', $_REQUEST['modules_release_info']); - $obj->setVar('modules_release_file', $_REQUEST['modules_release_file']); + $obj->setVar('modules_release_info', $_POST['modules_release_info']); + $obj->setVar('modules_release_file', $_POST['modules_release_file']); $obj->setVar('modules_manual', $_REQUEST['modules_manual']); - $obj->setVar('modules_manual_file', $_REQUEST['modules_manual_file']); - $obj->setVar('modules_demo_site_url', $_REQUEST['modules_demo_site_url']); - $obj->setVar('modules_demo_site_name', $_REQUEST['modules_demo_site_name']); - $obj->setVar('modules_forum_site_url', $_REQUEST['modules_forum_site_url']); - $obj->setVar('modules_forum_site_name', $_REQUEST['modules_forum_site_name']); - $obj->setVar('modules_module_website_url', $_REQUEST['modules_module_website_url']); - $obj->setVar('modules_module_website_name', $_REQUEST['modules_module_website_name']); - $obj->setVar('modules_release', $_REQUEST['modules_release']); - $obj->setVar('modules_module_status', $_REQUEST['modules_module_status']); - $obj->setVar('modules_display_admin', $_REQUEST['modules_display_admin']); - $obj->setVar('modules_display_user', $_REQUEST['modules_display_user']); - $obj->setVar('modules_active_search', $_REQUEST['modules_active_search']); - $obj->setVar('modules_active_comments', $_REQUEST['modules_active_comments']); + $obj->setVar('modules_manual_file', $_POST['modules_manual_file']); + $obj->setVar('modules_demo_site_url', $_POST['modules_demo_site_url']); + $obj->setVar('modules_demo_site_name', $_POST['modules_demo_site_name']); + $obj->setVar('modules_forum_site_url', $_POST['modules_forum_site_url']); + $obj->setVar('modules_forum_site_name', $_POST['modules_forum_site_name']); + $obj->setVar('modules_module_website_url', $_POST['modules_module_website_url']); + $obj->setVar('modules_module_website_name', $_POST['modules_module_website_name']); + $obj->setVar('modules_release', $_POST['modules_release']); + $obj->setVar('modules_module_status', $_POST['modules_module_status']); + $verif_display_admin = ($_REQUEST['modules_display_admin'] == 1) ? "1" : "0"; + $obj->setVar('modules_display_admin', $verif_display_admin); + $verif_display_user = ($_REQUEST['modules_display_user'] == 1) ? "1" : "0"; + $obj->setVar('modules_display_user', $verif_display_user); + $verif_display_submenu = ($_REQUEST['modules_display_submenu'] == 1) ? "1" : "0"; + $obj->setVar('modules_display_submenu', $verif_display_submenu); + $verif_active_search = ($_REQUEST['modules_active_search'] == 1) ? "1" : "0"; + $obj->setVar('modules_active_search', $verif_active_search); + $verif_active_coms = ($_REQUEST['modules_active_coms'] == 1) ? "1" : "0"; + $obj->setVar('modules_active_coms', $verif_active_coms); + $verif_active_notify = ($_REQUEST['modules_active_notify'] == 1) ? "1" : "0"; + $obj->setVar('modules_active_notify', $verif_active_notify); if ($modulesHandler->insert($obj)) { - redirect_header('modules.php?op=default', 2, _AM_TDMCREATE_FORMOK); + redirect_header('modules.php?op=default', 2, _AM_TDMCREATE_FORMOK); + } else { + redirect_header('modules.php?op=default', 2, _AM_TDMCREATE_NOTINSERTED); } - break; + break; case "modules_create": echo $modulesAdmin->addNavigation('modules.php'); @@ -101,21 +111,21 @@ $form = $obj->getForm(); break; case "modules_delete": - $obj =& $modulesHandler->get($_REQUEST['modules_id']); + $obj =& $modulesHandler->get($_REQUEST['modules_id']); if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) - { - if (!$GLOBALS['xoopsSecurity']->check()) { - redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); - } - if ($modulesHandler->delete($obj)) { - $xoopsDB->queryF("DELETE FROM ".$xoopsDB->prefix("tdmcreate_modules")." WHERE modules_id = ".$_REQUEST['modules_id']); - redirect_header('modules.php', 3, _AM_TDMCREATE_FORMDELOK); - } else { - echo $obj->getHtmlErrors(); - } - } else { - xoops_confirm(array('ok' => 1, 'modules_id' => $_REQUEST['modules_id'], 'op' => 'modules_delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('modules_name'))); - } + { + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + } + if ($modulesHandler->delete($obj)) { + $xoopsDB->queryF("DELETE FROM ".$xoopsDB->prefix("tdmcreate_modules")." WHERE modules_id = ".$_REQUEST['modules_id']); + redirect_header('modules.php', 3, _AM_TDMCREATE_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array('ok' => 1, 'modules_id' => $_REQUEST['modules_id'], 'op' => 'modules_delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('modules_name'))); + } break; case "modules_list": default: @@ -142,7 +152,7 @@ $start = 0; } $modules_arr = $modulesHandler->getall($criteria); - if ( $numrows > $limit ) { + if ( $numrows_modules > $limit ) { include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; $pagenav = new XoopsPageNav($numrows_modules, $limit, $start, 'start', 'op=list&limit=' . $limit); $pagenav = $pagenav->renderNav(4); @@ -180,7 +190,7 @@ echo '<td> </td>'; echo '<td> </td>'; echo '<td>'; - echo '<a href="modules.php?op=modules_edit&modules_id='.$modules_id.'"><img src='. $pathImageIcon ."/edit.png alt="._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="modules.php?op=modules_delete&modules_id='.$modules_id.'"><img src='. $pathImageIcon ."/delete.png alt="._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>'; + echo '<a href="modules.php?op=modules_edit&modules_id='.$modules_id.'"><img src="'. $pathImageIcon .'/edit.png" alt="'._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="modules.php?op=modules_delete&modules_id='.$modules_id.'"><img src="'. $pathImageIcon .'/delete.png" alt="'._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>'; echo '</td>'; echo '</tr>'; } Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-05-17 19:02:58 UTC (rev 9543) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-05-19 08:14:11 UTC (rev 9544) @@ -155,7 +155,7 @@ if ($tablesHandler->insert($obj)) { - redirect_header('tables.php?op=default', 2, _AM_TDMCREATE_FORMOK); + redirect_header('tables.php?op=tables_list', 2, _AM_TDMCREATE_FORMOK); } break; @@ -225,7 +225,7 @@ $obj->setVar('tables_nb_champs', $_REQUEST['tables_nb_champs']); if ($tablesHandler->insert($obj)) { - redirect_header('tables.php?op=default', 2, _AM_TDMCREATE_FORMOK); + redirect_header('tables.php?op=tables_list', 2, _AM_TDMCREATE_FORMOK); } break; @@ -268,8 +268,8 @@ //Image include_once XOOPS_ROOT_PATH.'/class/uploader.php'; $uploaddir = XOOPS_ROOT_PATH . "/modules/".$xoopsModule->dirname()."/images/uploads/modules/"; - $uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null); - + $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']['mimetypes'], + $GLOBALS['xoopsModuleConfig']['maxsize'], null, null); if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']); $name_img = $_REQUEST['modules_name'].'_slogo.'.$extension; @@ -282,34 +282,42 @@ $obj->setVar('modules_image', $uploader->getSavedFileName()); } } else { - $obj->setVar('modules_image', $_REQUEST['modules_image']); + $obj->setVar('modules_image', $_POST['modules_image']); } - $obj->setVar('modules_name', $_REQUEST['modules_name']); - $obj->setVar('modules_version', $_REQUEST['modules_version']); - $obj->setVar('modules_description', $_REQUEST['modules_description']); - $obj->setVar('modules_author', $_REQUEST['modules_author']); - $obj->setVar('modules_author_email', $_REQUEST['modules_author_email']); - $obj->setVar('modules_author_website_url', $_REQUEST['modules_author_website_url']); - $obj->setVar('modules_author_website_name', $_REQUEST['modules_author_website_name']); - $obj->setVar('modules_credits', $_REQUEST['modules_credits']); + $obj->setVar('modules_name', $_POST['modules_name']); + $obj->setVar('modules_version', $_POST['modules_version']); + $obj->setVar('modules_description', $_POST['modules_description']); + $obj->setVar('modules_author', $_POST['modules_author']); + $obj->setVar('modules_author_email', $_POST['modules_author_email']); + $obj->setVar('modules_author_website_url', $_POST['modules_author_website_url']); + $obj->setVar('modules_author_website_name', $_POST['modules_author_website_name']); + $obj->setVar('modules_credits', $_POST['modules_credits']); $obj->setVar('modules_license', $_REQUEST['modules_license']); - $obj->setVar('modules_release_info', $_REQUEST['modules_release_info']); - $obj->setVar('modules_release_file', $_REQUEST['modules_release_file']); + $obj->setVar('modules_release_info', $_POST['modules_release_info']); + $obj->setVar('modules_release_file', $_POST['modules_release_file']); $obj->setVar('modules_manual', $_REQUEST['modules_manual']); - $obj->setVar('modules_manual_file', $_REQUEST['modules_manual_file']); - $obj->setVar('modules_demo_site_url', $_REQUEST['modules_demo_site_url']); - $obj->setVar('modules_demo_site_name', $_REQUEST['modules_demo_site_name']); - $obj->setVar('modules_forum_site_url', $_REQUEST['modules_forum_site_url']); - $obj->setVar('modules_forum_site_name', $_REQUEST['modules_forum_site_name']); - $obj->setVar('modules_module_website_url', $_REQUEST['modules_module_website_url']); - $obj->setVar('modules_module_website_name', $_REQUEST['modules_module_website_name']); - $obj->setVar('modules_release', $_REQUEST['modules_release']); - $obj->setVar('modules_module_status', $_REQUEST['modules_module_status']); - $obj->setVar('modules_display_menu', $_REQUEST['modules_display_menu']); - $obj->setVar('modules_display_admin', $_REQUEST['modules_display_admin']); - $obj->setVar('modules_display_user', $_REQUEST['modules_display_user']); - $obj->setVar('modules_active_search', $_REQUEST['modules_active_search']); + $obj->setVar('modules_manual_file', $_POST['modules_manual_file']); + $obj->setVar('modules_demo_site_url', $_POST['modules_demo_site_url']); + $obj->setVar('modules_demo_site_name', $_POST['modules_demo_site_name']); + $obj->setVar('modules_forum_site_url', $_POST['modules_forum_site_url']); + $obj->setVar('modules_forum_site_name', $_POST['modules_forum_site_name']); + $obj->setVar('modules_module_website_url', $_POST['modules_module_website_url']); + $obj->setVar('modules_module_website_name', $_POST['modules_module_website_name']); + $obj->setVar('modules_release', $_POST['modules_release']); + $obj->setVar('modules_module_status', $_POST['modules_module_status']); + $verif_display_admin = ($_REQUEST['modules_display_admin'] == 1) ? "1" : "0"; + $obj->setVar('modules_display_admin', $verif_display_admin); + $verif_display_user = ($_REQUEST['modules_display_user'] == 1) ? "1" : "0"; + $obj->setVar('modules_display_user', $verif_display_user); + $verif_display_submenu = ($_REQUEST['modules_display_submenu'] == 1) ? "1" : "0"; + $obj->setVar('modules_display_submenu', $verif_display_submenu); + $verif_active_search = ($_REQUEST['modules_active_search'] == 1) ? "1" : "0"; + $obj->setVar('modules_active_search', $verif_active_search); + $verif_active_coms = ($_REQUEST['modules_active_coms'] == 1) ? "1" : "0"; + $obj->setVar('modules_active_coms', $verif_active_coms); + $verif_active_notify = ($_REQUEST['modules_active_notify'] == 1) ? "1" : "0"; + $obj->setVar('modules_active_notify', $verif_active_notify); if ($modulesHandler->insert($obj)) { redirect_header('tables.php?op=default', 2, _AM_TDMCREATE_FORMOK); @@ -374,10 +382,10 @@ if(!is_dir($pathImageAdmin) && isset($pathImageAdmin)){ $uploaddir = $pathImageAdmin; }else{ - $uploaddir = XOOPS_ROOT_PATH . "/modules/".$xoopsModule->dirname()."/modules/".$modules_name."/images/32/"; - } - $uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null); - + $uploaddir = XOOPS_ROOT_PATH . "/modules/".$xoopsModule->dirname()."/images/uploads/tables/"; + } + $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']['mimetypes'], + $GLOBALS['xoopsModuleConfig']['maxsize'], null, null); if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']) ; $name_img = $_REQUEST['tables_name'].'.'.$extension; @@ -438,10 +446,10 @@ $numrowsmod = count( $mod_arr ); // Redirect if there aren't modules if ( $numrowsmod == 0 ) { - redirect_header('modules.php?op=modules_create', 2, _AM_TDMCREATE_REDIRECT_NOMODULES ); + redirect_header('modules.php?op=modules_create', 2, _AM_TDMCREATE_NOTMODULES ); } - //Retirer les tables inutiles + //Remove unnecessary tables $sql = "SELECT tables_id FROM ".$xoopsDB->prefix("tdmcreate_tables")." WHERE tables_modules = 0"; $result = $xoopsDB->queryF($sql); while ( $myrow = $xoopsDB->fetchArray($result) ) @@ -469,7 +477,7 @@ $start = 0; } $modules_arr = $modulesHandler->getall($criteria); - if ( $numrows > $limit ) { + if ( $numrows_modules > $limit ) { include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; $pagenav = new XoopsPageNav($numrows_modules, $limit, $start, 'start', 'op=list&limit=' . $limit); $pagenav = $pagenav->renderNav(4); @@ -547,8 +555,7 @@ echo '<td>'.$nb_champs.'</td>'; echo '<td>'; echo '<a href="tables.php?op=edit_tables&tables_id='.$tables_id.'"><img src='. $pathImageIcon ."/edit.png alt="._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="tables.php?op=edit_champs&tables_id='.$tables_id.'"><img src='. $pathImageIcon ."/inserttable.png alt="._AM_TDMCREATE_FORMCHAMPS.'" title="'._AM_TDMCREATE_FORMCHAMPS.'"></a> <a href="tables.php?op=delete_tables&tables_id='.$tables_id.'"><img src='. $pathImageIcon ."/delete.png alt="._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>'; - echo '</td>'; - echo '</tr>'; + echo '</td></tr>'; } } } Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_modules.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_modules.php 2012-05-17 19:02:58 UTC (rev 9543) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_modules.php 2012-05-19 08:14:11 UTC (rev 9544) @@ -2,10 +2,8 @@ /** * **************************************************************************** * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS - * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Licence GPL Copyright (c) (http://www.xoops.org) * - * Cette licence, contient des limitations!!! - * * 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. @@ -16,17 +14,13 @@ * @license TDM GPL license * @author TDM TEAM DEV MODULE * + * Version : 1.38 Thu 2012/04/12 14:04:25 : Timgno Exp $ * **************************************************************************** */ - if (!defined("XOOPS_ROOT_PATH")) { die("XOOPS root path not defined"); } -if (!class_exists('XoopsPersistableObjectHandler')) { - include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/class/object.php'; -} - class tdmcreate_modules extends XoopsObject { @@ -34,35 +28,35 @@ function __construct() { $this->XoopsObject(); - $this->initVar("modules_id",XOBJ_DTYPE_INT,null,false,5); - $this->initVar("modules_name",XOBJ_DTYPE_TXTBOX,null,false); - $this->initVar("modules_version",XOBJ_DTYPE_TXTBOX,null,false); - $this->initVar("modules_description",XOBJ_DTYPE_TXTAREA, null, false); - $this->initVar("modules_author",XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar("modules_author_mail",XOBJ_DTYPE_TXTBOX,null,false); - $this->initVar("modules_author_website_url",XOBJ_DTYPE_TXTBOX,null,false); - $this->initVar("modules_author_website_name",XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar("modules_credits",XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar("modules_license",XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar("modules_release_info",XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar("modules_release_file",XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar("modules_manual",XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar("modules_manual_file",XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar("modules_id",XOBJ_DTYPE_INT, 0,false,5); + $this->initVar("modules_name",XOBJ_DTYPE_TXTBOX, 'Module Name',false); + $this->initVar("modules_version",XOBJ_DTYPE_TXTBOX, '1.00',false); + $this->initVar("modules_description",XOBJ_DTYPE_TXTAREA, 'Description of the module', false); + $this->initVar("modules_author",XOBJ_DTYPE_TXTBOX, 'TXMod Xoops (Timgno)', false); + $this->initVar("modules_author_mail",XOBJ_DTYPE_TXTBOX, 'su...@tx...',false); + $this->initVar("modules_author_website_url",XOBJ_DTYPE_TXTBOX, 'http://www.txmodxoops.org',false); + $this->initVar("modules_author_website_name",XOBJ_DTYPE_TXTBOX, 'TXMod Xoops (Timgno)', false); + $this->initVar("modules_credits",XOBJ_DTYPE_TXTBOX, 'Timgno', false); + $this->initVar("modules_license",XOBJ_DTYPE_TXTBOX, 'GNU GPL see License', false); + $this->initVar("modules_release_info",XOBJ_DTYPE_TXTBOX, 'Beta 1 15/04/2012', false); + $this->initVar("modules_release_file",XOBJ_DTYPE_TXTBOX, 'changelog.txt', false); + $this->initVar("modules_manual",XOBJ_DTYPE_TXTBOX, 'Manual', false); + $this->initVar("modules_manual_file",XOBJ_DTYPE_TXTBOX, 'install.txt', false); $this->initVar("modules_image",XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar("modules_demo_site_url",XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar("modules_demo_site_name",XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar("modules_forum_site_url",XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar("modules_forum_site_name",XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar("modules_module_website_url",XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar("modules_module_website_name",XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar("modules_release",XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar("modules_module_status",XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar("modules_demo_site_url",XOBJ_DTYPE_TXTBOX, 'http://www.txmodxoops.org/modules/', false); + $this->initVar("modules_demo_site_name",XOBJ_DTYPE_TXTBOX, 'Module TXMod Xoops', false); + $this->initVar("modules_forum_site_url",XOBJ_DTYPE_TXTBOX, 'http://www.txmodxoops.org/modules/newbb', false); + $this->initVar("modules_forum_site_name",XOBJ_DTYPE_TXTBOX, 'TXMod Xoops Community', false); + $this->initVar("modules_module_website_url",XOBJ_DTYPE_TXTBOX, 'http://www.txmodxoops.org/', false); + $this->initVar("modules_module_website_name",XOBJ_DTYPE_TXTBOX, 'TXMod Xoops', false); + $this->initVar("modules_release",XOBJ_DTYPE_TXTBOX, '15/04/2012', false); + $this->initVar("modules_module_status",XOBJ_DTYPE_TXTBOX, 'Beta 1', false); $this->initVar("modules_display_admin",XOBJ_DTYPE_INT, null, false, 1); $this->initVar("modules_display_user",XOBJ_DTYPE_INT, null, false, 1); $this->initVar("modules_display_submenu",XOBJ_DTYPE_INT, null, false, 1); $this->initVar("modules_active_search",XOBJ_DTYPE_INT, null, false, 1); $this->initVar("modules_active_coms",XOBJ_DTYPE_INT, null, false, 1); - $this->initVar("modules_active_notify",XOBJ_DTYPE_INT, null, false, 1); + $this->initVar("modules_active_notify",XOBJ_DTYPE_INT, null, false, 1); } function tdmcreate_modules() @@ -90,7 +84,7 @@ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_VERSION, 'modules_version', 50, 255, $this->getVar('modules_version')), true); // Name description $editor_configs=array(); - $editor_configs["name"] ="modules_description"; + $editor_configs["name"] = "modules_description"; $editor_configs["value"] = $this->getVar('modules_description', 'e'); $editor_configs["rows"] = 5; $editor_configs["cols"] = 100; @@ -104,33 +98,33 @@ // Options $options_tray = new XoopsFormElementTray(_OPTIONS,'<br />'); // Display Admin - $modules_display_admin = $this->isNew() ? 0 : $this->getVar('modules_display_admin'); - $check_display_admin = new XoopsFormCheckBox('', 'modules_display_admin', $modules_display_admin); + $mdisplay_admin = $this->isNew() ? 0 : $this->getVar('modules_display_admin'); + $check_display_admin = new XoopsFormCheckBox('', 'modules_display_admin', $mdisplay_admin); $check_display_admin->addOption( 1, _AM_TDMCREATE_MODULES_DISPLAY_ADMIN ); $options_tray->addElement($check_display_admin); // Display Admin - $modules_display_user = $this->isNew() ? 0 : $this->getVar('modules_display_user'); - $check_display_user = new XoopsFormCheckBox('', 'modules_display_user', $modules_display_user); + $mdisplay_user = $this->isNew() ? 0 : $this->getVar('modules_display_user'); + $check_display_user = new XoopsFormCheckBox('', 'modules_display_user', $mdisplay_user); $check_display_user->addOption( 1, _AM_TDMCREATE_MODULES_DISPLAY_USER ); $options_tray->addElement($check_display_user); // Display Submenu - $modules_display_submenu = $this->isNew() ? 0 : $this->getVar('modules_display_submenu'); - $check_display_submenu = new XoopsFormCheckBox('', 'modules_display_submenu', $modules_display_submenu); + $mdisplay_submenu = $this->isNew() ? 0 : $this->getVar('modules_display_submenu'); + $check_display_submenu = new XoopsFormCheckBox('', 'modules_display_submenu', $mdisplay_submenu); $check_display_submenu->addOption( 1, _AM_TDMCREATE_MODULES_DISPLAY_SUBMENU ); $options_tray->addElement($check_display_submenu); // Active Search - $modules_active_search = $this->isNew() ? 0 : $this->getVar('modules_active_search'); - $check_display_search = new XoopsFormCheckBox('', 'modules_active_search', $modules_active_search); + $mactive_search = $this->isNew() ? 0 : $this->getVar('modules_active_search'); + $check_display_search = new XoopsFormCheckBox('', 'modules_active_search', $mactive_search); $check_display_search->addOption( 1, _AM_TDMCREATE_MODULES_ACTIVE_SEARCH ); $options_tray->addElement($check_display_search); // Active Comments - $modules_active_comments = $this->isNew() ? 0 : $this->getVar('modules_active_coms'); - $check_active_comments = new XoopsFormCheckBox('', 'modules_active_coms', $modules_active_comments); + $mactive_comments = $this->isNew() ? 0 : $this->getVar('modules_active_coms'); + $check_active_comments = new XoopsFormCheckBox('', 'modules_active_coms', $mactive_comments); $check_active_comments->addOption( 1, _AM_TDMCREATE_MODULES_ACTIVE_COMMENTS ); $options_tray->addElement($check_active_comments); // Active Notify - $modules_active_notify = $this->isNew() ? 0 : $this->getVar('modules_active_notify'); - $check_active_notify = new XoopsFormCheckBox('', 'modules_active_notify', $modules_active_notify); + $mactive_notify = $this->isNew() ? 0 : $this->getVar('modules_active_notify'); + $check_active_notify = new XoopsFormCheckBox('', 'modules_active_notify', $mactive_notify); $check_active_notify->addOption( 1, _AM_TDMCREATE_MODULES_ACTIVE_NOTIFY ); $options_tray->addElement($check_active_notify); $form->addElement($options_tray); @@ -174,7 +168,7 @@ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_STATUS, 'modules_module_status', 50, 255, $this->getVar('modules_module_status')), false); $form->addElement(new XoopsFormHidden('op', 'modules_save')); - $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); + $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); $form->display(); return $form; } Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php 2012-05-17 19:02:58 UTC (rev 9543) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/class/tdmcreate_tables.php 2012-05-19 08:14:11 UTC (rev 9544) @@ -2,10 +2,8 @@ /** * **************************************************************************** * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS - * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Licence GPL Copyright (c) (http://www.xoops.org) * - * Cette licence, contient des limitations!!! - * * 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. @@ -16,20 +14,15 @@ * @license TDM GPL license * @author TDM TEAM DEV MODULE * + * Version : 1.38 Thu 2012/04/12 14:04:25 : Timgno Exp $ * **************************************************************************** */ - if (!defined("XOOPS_ROOT_PATH")) { die("XOOPS root path not defined"); } -if (!class_exists('XoopsPersistableObjectHandler')) { - include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/class/object.php'; -} - class tdmcreate_tables extends XoopsObject { - //Constructor function __construct() { @@ -751,7 +744,7 @@ $imgtray -> addElement( new XoopsFormLabel( '', "<br /><img src='" . XOOPS_URL . "/" . $uploadirectory . "/" . $tables_img . "' name='image3' id='image3' alt='' />" ) ); $fileseltray= new XoopsFormElementTray('','<br />'); - $fileseltray->addElement(new XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD , 'attachedfile', 104857600),false); + $fileseltray->addElement(new XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD , 'attachedfile', $GLOBALS['xoopsModuleConfig']['maxsize']),false); $fileseltray->addElement(new XoopsFormLabel(''), false); $imgtray->addElement($fileseltray); $form->addElement($imgtray); Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_header.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_header.php 2012-05-17 19:02:58 UTC (rev 9543) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_header.php 2012-05-19 08:14:11 UTC (rev 9544) @@ -19,87 +19,60 @@ */ include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_entete.php'; include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php'; - function const_admin_header($modules, $modules_name, $tables_arr) { - $language = '_AM_'.strtoupper($modules_name).'_'; - $myts =& MyTextSanitizer::getInstance(); + $language = '_AM_'.strtoupper($modules_name).'_'; $file = "admin_header.php"; $path_file = TDM_CREATE_MURL."/".$modules_name."/admin/".$file; $en_tete = const_entete($modules, 0); - - $text = '<?php'.$en_tete.' + + $text = '<?php'.$en_tete.' include_once dirname(dirname(dirname(dirname(__FILE__)))) . \'/mainfile.php\'; -include_once XOOPS_ROOT_PATH . \'/include/cp_functions.php\'; +include_once XOOPS_ROOT_PATH . \'/include/cp_header.php\'; include_once \'../include/config.php\'; include_once \'../include/functions.php\'; -$pathDir = $GLOBALS[\'xoops\']->path(\'/Frameworks/moduleclasses/moduleadmin\'); -$globlang = $GLOBALS[\'xoopsConfig\'][\'language\']; +$thisDirname = $GLOBALS[\'xoopsModule\']->getVar(\'dirname\'); -if ( file_exists($pathDir.\'/language/\'.$globlang.\'/main.php\')){ - include_once $pathDir.\'/language/\'.$globlang.\'/main.php\'; -} else { - include_once $pathDir.\'/language/english/main.php\'; -} - -if ( file_exists($pathDir.\'/moduleadmin.php\')){ - include_once $pathDir.\'/moduleadmin.php\'; - //return true; +$pathImageIcon = XOOPS_URL .\'/\'. $GLOBALS[\'xoopsModule\']->getInfo(\'icons16\'); +$pathImageAdmin = XOOPS_URL .\'/\'. $GLOBALS[\'xoopsModule\']->getInfo(\'icons32\'); +$pathModuleAdmin = $GLOBALS[\'xoopsModule\']->getInfo(\'dirmoduleadmin\'); + +$myts =& MyTextSanitizer::getInstance(); +// Locad admin menu class +if ( file_exists($GLOBALS[\'xoops\']->path($pathModuleAdmin.\'/moduleadmin.php\'))){ + include_once $GLOBALS[\'xoops\']->path($pathModuleAdmin.\'/moduleadmin.php\'); }else{ - xoops_cp_header(); - echo xoops_error('.$language.'NOFRAMEWORKS); - xoops_cp_footer(); - //return false; + redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false); } - -$dirname = basename(dirname(dirname( __FILE__ ) )); -$module_handler =& xoops_gethandler(\'module\'); -$xoopsModule = & $module_handler->getByDirname($dirname); -$moduleInfo =& $module_handler->get($xoopsModule->getVar(\'mid\')); -$pathImageIcon = XOOPS_URL .\'/\'. $moduleInfo->getInfo(\'icons16\'); -$pathImageAdmin = XOOPS_URL .\'/\'. $moduleInfo->getInfo(\'icons32\'); - +//load class '; foreach (array_keys($tables_arr) as $i) { - $t_name = $tables_arr[$i]->getVar("tables_name"); -$text .= '$'.$t_name.'Handler=& xoops_getModuleHandler(\''.$modules_name.'_'.$t_name.'\', $dirname); + $t_name = $tables_arr[$i]->getVar('tables_name'); +$text .= '$'.$t_name.'Handler=& xoops_getModuleHandler(\''.$modules_name.'\'_\''.$t_name.', $thisDirname); '; } -$text .=<<<'EOD' +$text .= ' $myts =& MyTextSanitizer::getInstance(); -if ($xoopsUser) { - $moduleperm_handler =& xoops_gethandler('groupperm'); - if (!$moduleperm_handler->checkRight('module_admin', $xoopsModule->getVar( 'mid' ), $xoopsUser->getGroups())) { - redirect_header(XOOPS_URL, 1, _NOPERM); - exit(); - } -} else { - redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); - exit(); -} - if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { include_once(XOOPS_ROOT_PATH."/class/template.php"); $xoopsTpl = new XoopsTpl(); } -$xoopsTpl->assign('pathImageIcon', $pathImageIcon); -$xoopsTpl->assign('pathImageAdmin', $pathImageAdmin); +$xoopsTpl->assign(\'pathImageIcon\', $pathImageIcon); +$xoopsTpl->assign(\'pathImageAdmin\', $pathImageAdmin); //xoops_cp_header(); //Load languages -xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); -xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); -xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); - -EOD; +xoops_loadLanguage(\'admin\', $thisDirname); +xoops_loadLanguage(\'modinfo\', $thisDirname); +xoops_loadLanguage(\'main\', $thisDirname); +'; createFile($path_file, $text, _AM_TDMCREATE_CONST_OK_ADMINS, _AM_TDMCREATE_CONST_NOTOK_ADMINS, $file); } - -?> +?> \ No newline at end of file Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_entete.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_entete.php 2012-05-17 19:02:58 UTC (rev 9543) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_entete.php 2012-05-19 08:14:11 UTC (rev 9544) @@ -49,6 +49,7 @@ * --------------------------------------------------------------------------- * @copyright '.$modules_author.' ( '.$modules_author_website_url.' ) * @license '.$modules_license.' + * @since 2.5.0 * @package '.$modules_name.' * @author '.$modules_author.' ( '.$modules_author_mail.' ) * Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_header.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_header.php 2012-05-17 19:02:58 UTC (rev 9543) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_header.php 2012-05-19 08:14:11 UTC (rev 9544) @@ -52,6 +52,7 @@ * --------------------------------------------------------------------------- * @copyright '.$modules_author.' ( '.$modules_author_website_url.' ) * @license '.$modules_license.' + * @since 2.5.0 * @package '.$modules_name.' * @author '.$modules_author.' ( '.$modules_author_mail.' ) * Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_configs.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_configs.php 2012-05-17 19:02:58 UTC (rev 9543) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_configs.php 2012-05-19 08:14:11 UTC (rev 9544) @@ -27,13 +27,17 @@ $en_tete = const_entete($modules, 0); $text = '<?php'.$en_tete.' if( ! defined( \'XOOPS_ROOT_PATH\' ) ) exit ; -define("'.strtoupper($modules_name).'_PATH", XOOPS_ROOT_PATH."/modules/'.$modules_name.'"); -define("'.strtoupper($modules_name).'_URL", XOOPS_URL."/modules/'.$modules_name.'"); - +if (!defined(\''.strtoupper($modules_name).'_MODULE_PATH\')) { +define("'.strtoupper($modules_name).'_DIRNAME", "'.strtolower($modules_name).'"); +define("'.strtoupper($modules_name).'_PATH", XOOPS_ROOT_PATH."/modules/".'.strtoupper($modules_name).'_DIRNAME); +define("'.strtoupper($modules_name).'_URL", XOOPS_URL."/modules/".'.strtoupper($modules_name).'_DIRNAME); +define("'.strtoupper($modules_name).'_ADMIN", '.strtoupper($modules_name).'_URL . "/admin/index.php"); +define("'.strtoupper($modules_name).'_AUTHOR_LOGOIMG", '.strtoupper($modules_name).'_URL . "/images/'.str_replace(" ", "", strtolower($modules_a_w_name)).'_logo.png"); +} // module information -$mod_img = '.strtoupper($modules_name).'_URL."/images/'.str_replace(" ", "", strtolower($modules_a_w_name)).'_logo.png"; +$mod_admin = "<a href=\'".'.strtoupper($modules_name).'_ADMIN."\'>".'.$language.'_ADMIN."</a>"; $mod_copyright = "<a href=\''.$modules_a_w_url.'\' title=\''.$modules_a_w_name.'\' target=\'_blank\'> - <img src=\'".$mod_img."\' alt=\''.$modules_a_w_name.'\' /></a>"; + <img src=\'".'.strtoupper($modules_name).'_AUTHOR_LOGOIMG."\' alt=\''.$modules_a_w_name.'\' /></a>"; ?>'; createFile($path_file, $text, _AM_TDMCREATE_CONST_OK_INCLUDES, Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_search.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_search.php 2012-05-17 19:02:58 UTC (rev 9543) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_include_search.php 2012-05-19 08:14:11 UTC (rev 9544) @@ -39,6 +39,7 @@ //Parametres $parametres_total = explode("|", $tables_parametres); $k = 0; + $champs_param_search_field = array(); //Recuperation des parametres affichage dans le formulaire for($j=0; $j<$nb_champs; $j++) { Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_js_jquery.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_js_jquery.php 2012-05-17 19:02:58 UTC (rev 9543) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_js_jquery.php 2012-05-19 08:14:11 UTC (rev 9544) @@ -27,8 +27,8 @@ $text = $en_tete.' $(document).ready(function(){ $( "button, input:button, input:submit, input:file, input:reset" ).css("color","inherit").button(); - $( ".check" ).css("color","#fff").button(); - $( ".radio" ).css("color","#fff").buttonset(); + $( "input[type=\'checkbox\']" ).css("color","#fff").button(); + $( "input[type=\'radio\']" ).css("color","#fff").buttonset(); $( ".toolbar" ).css("color","#000").buttonset(); }); '; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_modinfo_language.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_modinfo_language.php 2012-05-17 19:02:58 UTC (rev 9543) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_modinfo_language.php 2012-05-19 08:14:11 UTC (rev 9544) @@ -38,8 +38,8 @@ $text = '<?php'.$en_tete.' // Admin -define("'.$language.'NAME","'. $modules_name .'"); -define("'.$language.'DESC","'. $modules_desc .'"); +define("'.$language.'NAME","'. UcFirstAndToLower($modules_name) .'"); +define("'.$language.'DESC","'. UcFirstAndToLower($modules_desc) .'"); //Menu define("'.$language.'ADMENU'.$menu.'","Dashboard"); @@ -47,7 +47,9 @@ foreach (array_keys($tables_arr) as $i) { $menu++; - $text .= 'define("'.$language.'ADMENU'.$menu.'","'.UcFirstAndToLower($tables_arr[$i]->getVar("tables_name")).'"); + $t_name_desc = UcFirstAndToLower($tables_arr[$i]->getVar("tables_name")); + $t_name_desc = str_replace("_", " ", $t_name_desc); + $text .= 'define("'.$language.'ADMENU'.$menu.'","'.$t_name_desc.'"); '; } if ( $topic == 1 ) { @@ -105,16 +107,17 @@ $text .=' //Config define("'.$language.'EDITOR","Editor"); +define("'.$language.'EDITOR_DESC","Choose an Editor"); define("'.$language.'KEYWORDS","Keywords"); -define("'.$language.'KEYWORDS_DESC","Insert here the keywords (separate by comma)"); +define("'.$language.'KEYWORDS_DESC","Insert here the keywords for index page (separated by comma)"); define("'.$language.'ADMINPERPAGE", "Admin per page"); define("'.$language.'ADMINPERPAGE_DESC", "Specifies how many items you want to display per page in the list."); define("'.$language.'ADVERTISE","Code of advertise"); -define("'.$language.'ADVERTISE_DESC","Ensert here the code of advertisement"); -define("'.$language.'SOCIALACTIVE","View Socialnetworks?"); -define("'.$language.'SOCIALACTIVE_DESC","If you want to see the buttons of socialnetworks, click on Yes"); -define("'.$language.'SOCIALCODE","Code of socialnetworks"); -define("'.$language.'SOCIALCODE_DESC","Ensert here the code of socialnetworks"); +define("'.$language.'ADVERTISE_DESC","Insert here the code of advertisement"); +define("'.$language.'BARSOCIALS_ACTIVE","View barsocials"); +define("'.$language.'BARSOCIALS_ACTIVE_DESC","If you want to see the barsocials, click on Yes"); +define("'.$language.'FBCOMMENTS_ACTIVE","View Social Comments?"); +define("'.$language.'FBCOMMENTS_ACTIVE_DESC","If you want to see the Social Comments, click on Yes"); ?>'; createFile($path_file, $text, _AM_TDMCREATE_CONST_OK_LANGUAGES, Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_templates_footer.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_templates_footer.php 2012-05-17 19:02:58 UTC (rev 9543) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_templates_footer.php 2012-05-19 08:14:11 UTC (rev 9544) @@ -19,21 +19,21 @@ */ include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_entete.php'; include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php'; - function const_templates_footer($modules, $modules_name, $tables_module_table) { $language = '_MA_'.strtoupper($modules_name).'_'; - $template_file = ''.$modules_name.'_footer.html'; + $template_file = $modules_name.'_footer.html'; $template_path_file = TDM_CREATE_MURL."/".$modules_name."/templates/".$template_file; $en_tete = const_entete($modules, 0); - - $text = '<{if $adv != \'\'}> -<div class="center"><{$adv}></div> + +$text = '<{if $barsocials_active != 0}> + <{include file="db:system_barsocials.html"}> <{/if}> -<{if $social_active != 0}> -<div class="center"><{$social_code}></div> +<{if $fbcomments_active != 0}> + <{include file="db:system_fbcomments.html"}> <{/if}> <div class="left"><{$copyright}></div> +<br /> '; if($tables_module_table != null){ $text .= '<{if $pagenav != \'\'}> @@ -41,9 +41,13 @@ <{/if}> <br />'; } -$text .= '<{if $xoops_isadmin}> - <div class="center bold"><a href="<{$'.strtolower($modules_name).'_url}>/admin/"><{$smarty.const.'.$language.'ADMIN}></a></div> +$text .= ' +<{if $adv != \'\' && !$xoops_isadmin}> +<div class="center"><{$adv}></div> <{/if}> +<{if $xoops_isadmin}> + <div class="center bold"><{$admin}></div> +<{/if}> '; createFile($template_path_file, $text, _AM_TDMCREATE_CONST_OK_TEMPLATES, Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_xoopsversion.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_xoopsversion.php 2012-05-17 19:02:58 UTC (rev 9543) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_xoopsversion.php 2012-05-19 08:14:11 UTC (rev 9544) @@ -44,7 +44,7 @@ '.$modv.'[\'license\'] = "'.$modules->getVar("modules_license").'"; '.$modv.'[\'help\'] = \'page=help\'; '.$modv.'[\'license\'] = \'GNU GPL 2.0 see Licence\'; -'.$modv.'[\'license_url\'] = "www.gnu.org/licenses/gpl-2.0.html/"; +'.$modv.'[\'license_url\'] = "www.gnu.org/licenses/gpl.html"; '.$modv.'[\'release_info\'] = "'.$modules->getVar("modules_release_info").'"; '.$modv.'[\'release_file\'] = XOOPS_URL."/modules/{$dirname}/docs/'.$modules->getVar("modules_release_file").'"; @@ -59,7 +59,7 @@ '.$modv.'[\'image\'] = "images/'.$modules->getVar("modules_image").'"; '.$modv.'[\'dirname\'] = "{$dirname}"; -'.$modv.'[\'dirmoduleadmin\'] = "Frameworks/moduleclasses"; +'.$modv.'[\'dirmoduleadmin\'] = "Frameworks/moduleclasses/moduleadmin"; '.$modv.'[\'icons16\'] = "Frameworks/moduleclasses/icons/16"; '.$modv.'[\'icons32\'] = "Frameworks/moduleclasses/icons/32"; //About @@ -299,6 +299,20 @@ '.$modvc.'[\'formtype\'] = "textbox"; '.$modvc.'[\'valuetype\'] = "text"; '.$modvc.'[\'default\'] = \'15\'; +$i++; +'.$modvc.'[\'name\'] = "barsocials_active"; +'.$modvc.'[\'title\'] = "'.$language.'_BARSOCIALS_ACTIVE"; +'.$modvc.'[\'description\'] = "'.$language.'_BARSOCIALS_ACTIVE_DESC"; +'.$modvc.'[\'formtype\'] = "yesno"; +'.$modvc.'[\'aluetype\'] = "int"; +'.$modvc.'[\'default\'] = 0; +$i++; +'.$modvc.'[\'name\'] = "fbcomments_active"; +'.$modvc.'[\'title\'] = "'.$language.'_FBCOMMENTS_ACTIVE"; +'.$modvc.'[\'description\'] = "'.$language.'_FBCOMMENTS_ACTIVE_DESC"; +'.$modvc.'[\'formtype\'] = "yesno"; +'.$modvc.'[\'aluetype\'] = "int"; +'.$modvc.'[\'default\'] = 0; $i++; '.$modvc.'[\'name\'] = "advertise"; '.$modvc.'[\'title\'] = "'.$language.'_ADVERTISE"; @@ -306,22 +320,7 @@ '.$modvc.'[\'formtype\'] = "textarea"; '.$modvc.'[\'valuetype\'] = "text"; '.$modvc.'[\'default\'] = ""; -$i++; -'.$modvc.'[\'name\'] = "social_active"; -'.$modvc.'[\'title\'] = "'.$language.'_SOCIALACTIVE"; -'.$modvc.'[\'description\'] = "'.$language.'_SOCIALACTIVE_DESC"; -'.$modvc.'[\'formtype\'] = "yesno"; -'.$modvc.'[\'aluetype\'] = "int"; -'.$modvc.'[\'default\'] = 0; -$i++; -'.$modvc.'[\'name\'] = "social_code"; -'.$modvc.'[\'title\'] = "'.$language.'_SOCIALCODE"; -'.$modvc.'[\'description\'] = "'.$language.'_SOCIALCODE_DESC"; -'.$modvc.'[\'formtype\'] = "textarea"; -'.$modvc.'[\'valuetype\'] = "text"; -'.$modvc.'[\'default\'] = ""; unset($i); - ?>'; createFile($path_file, $text, _AM_TDMCREATE_CONST_OK_ROOTS, Added: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/docs/license.txt =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/docs/license.txt (rev 0) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/docs/license.txt 2012-05-19 08:14:11 UTC (rev 9544) @@ -0,0 +1,66 @@ +End User License Agreement for Xoops Modules + +IMPORTANT NOTICE Read and understand this License +Agreement carefully before installing and using this Software. +It contains extremely important information. + +BY USING THIS SOFTWARE IN ANY WAY YOU ACKNOWLEDGE +THAT YOU HAVE READ, UNDERSTAND AND AGREE TO THE +TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO +THESE TERMS, DO NOT USE THIS SOFTWARE IN ANY WAY, +AND PROMPTLY RETURN IT OR DELETE ANY COPIES OF +THIS SOFTWARE IN YOUR POSSESSION. + +LICENSE GRANT the copyright holder grants you a non-exclusive +license to use this software, and any associated documentation +("The Software"), as indicated herein. + +You may install and use the Software on two computers for your use +only. + +RESTRICTIONS You MAY NOT: (a) sell or distribute this Software +package without prior written approval (b) cause or permit reverse +engineering, disassembly, decompilation or alteration of this +Software; (c) remove any product identification, copyright notices, +or other notices or proprietary restrictions from this Software; + +TERM: This License is effective until terminated. You may terminate +it at any time by destroying the Software, together with all copies +thereof. This License will also terminate if you fail to comply with any +term or condition of this Agreement. Upon such termination, you +agree to destroy the Software, together with all copies thereof. + +COPYRIGHT/OWNERSHIP This Software and its source +code are proprietary products of Pablo Software Solutions +and are protected by copyright, trade secret and other intellectual +property laws. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT +HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +This software was created to be free of defects and is designed to +function on PC computers only. While this software has been tested +and proven to run accurately, in the unlikely event of any user or +computer incompatibility issues, the end user assumes complete +liability of usage. This software contains no adware, scumware or +spyware. The maker of this software does not support any +questionable forms of use where this software could be misused in +any way. + +http://www.txmodxoops.org +http://www.xoops.org Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/images/uploads/modules/default_slogo.png =================================================================== (Binary files differ) Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php 2012-05-17 19:02:58 UTC (rev 9543) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php 2012-05-19 08:14:11 UTC (rev 9544) @@ -26,8 +26,8 @@ define("_AM_TDMCREATE_ADMIN_PREFERENCES", "Preferences"); define("_AM_TDMCREATE_ADMIN_UPDATE", "Update"); define("_AM_TDMCREATE_ADMIN_NUMMODULES", "Quantity Units"); -define("_AM_TDMCREATE_THEREARE_NUMMODULES", "There are <span class='red bold'>%s</span> modules stored in the Database"); -define("_AM_TDMCREATE_THEREARE_NUMTABLES", "There are <span class='red bold'>%s</span> tables stored in the Database"); +define("_AM_TDMCREATE_THEREARE_NUMMODULES", "- <span class='red bold'>%s</span> modules stored in the Database"); +define("_AM_TDMCREATE_THEREARE_NUMTABLES", "- <span class='red bold'>%s</span> tables stored in the Database"); define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_ELEMENTS", "Forms: Elements"); define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_DISPLAY_ADMIN", "Page: Show admin"); @@ -93,9 +93,6 @@ define("_AM_TDMCREATE_MODULES_DISPLAY_USER", "User Visible hand"); define("_AM_TDMCREATE_MODULES_ACTIVE_SEARCH", "Enable research"); define("_AM_TDMCREATE_MODULES_ACTIVE_COMMENTS", "Enable comments"); -// v1.38 -define("_AM_TDMCREATE_MODULES_DISPLAY_SUBMENU", "Visible Submenu"); -define("_AM_TDMCREATE_MODULES_ACTIVE_NOTIFY", "Active Notifications"); //Tables.php //Form1 @@ -136,36 +133,36 @@ define("_AM_TDMCREATE_CONST_TAB... [truncated message content] |
From: <txm...@us...> - 2012-05-19 10:22:12
|
Revision: 9549 http://xoops.svn.sourceforge.net/xoops/?rev=9549&view=rev Author: txmodxoops Date: 2012-05-19 10:22:05 +0000 (Sat, 19 May 2012) Log Message: ----------- Updated Modified Paths: -------------- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/admin_footer.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/admin_header.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/menu.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_footer.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_header.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_menu.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_pages.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/update language 1.37 to 1.38.txt Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/admin_footer.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/admin_footer.php 2012-05-19 10:21:57 UTC (rev 9548) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/admin_footer.php 2012-05-19 10:22:05 UTC (rev 9549) @@ -19,7 +19,7 @@ * **************************************************************************** */ echo "<div class='center'><a href='http://www.xoops.org' target='_blank'> - <img src='".$GLOBALS['pathImageAdmin']."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a> + <img src='".$GLOBALS['pathIcon32']."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a> </div>"; echo "<div class='center pad5'> <span class='bold'>".$GLOBALS['xoopsModule']->getVar('name')."</span> Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/admin_header.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/admin_header.php 2012-05-19 10:21:57 UTC (rev 9548) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/admin_header.php 2012-05-19 10:22:05 UTC (rev 9549) @@ -27,8 +27,8 @@ $modulesHandler =& xoops_getModuleHandler('tdmcreate_modules', 'TDMCreate'); $tablesHandler =& xoops_getModuleHandler('tdmcreate_tables', 'TDMCreate'); -$pathImageIcon = XOOPS_URL .'/'. $GLOBALS['xoopsModule']->getInfo('icons16'); -$pathImageAdmin = XOOPS_URL .'/'. $GLOBALS['xoopsModule']->getInfo('icons32'); +$pathIcon16 = XOOPS_URL .'/'. $GLOBALS['xoopsModule']->getInfo('icons16'); +$pathIcon32 = XOOPS_URL .'/'. $GLOBALS['xoopsModule']->getInfo('icons32'); $pathModuleAdmin = $GLOBALS['xoopsModule']->getInfo('dirmoduleadmin'); $myts =& MyTextSanitizer::getInstance(); @@ -43,8 +43,8 @@ include_once(XOOPS_ROOT_PATH."/class/template.php"); $xoopsTpl = new XoopsTpl(); } -$xoopsTpl->assign('pathImageIcon', $pathImageIcon); -$xoopsTpl->assign('pathImageAdmin', $pathImageAdmin); +$xoopsTpl->assign('pathIcon16', $pathIcon16); +$xoopsTpl->assign('pathIcon32', $pathIcon32); //Load languages xoops_loadLanguage('admin', $thisDirname); xoops_loadLanguage('modinfo', $thisDirname); Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/menu.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/menu.php 2012-05-19 10:21:57 UTC (rev 9548) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/menu.php 2012-05-19 10:22:05 UTC (rev 9549) @@ -17,29 +17,20 @@ * Version : 1.38 Thu 2012/04/12 14:04:25 : Timgno Exp $ * **************************************************************************** */ -$module_handler =& xoops_gethandler('module'); -$xoopsModule =& XoopsModule::getByDirname('TDMCreate'); -$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); -//$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); -$pathImageAdmin = $moduleInfo->getInfo('icons32'); -$adminmenu = array(); -$i = 1; +$pathIcon32 = $GLOBALS['xoopsModule']->getInfo('icons32'); +$adminmenu = array(); $i = 1; $adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_INDEX; $adminmenu[$i]["link"] = 'admin/index.php'; -$adminmenu[$i]["icon"] = 'images/32/dashboard.png'; -$i++; +$adminmenu[$i]["icon"] = 'images/32/dashboard.png'; $i++; $adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_MODULES; $adminmenu[$i]["link"] = 'admin/modules.php'; -$adminmenu[$i]["icon"] = 'images/32/addmodule.png'; -$i++; +$adminmenu[$i]["icon"] = 'images/32/addmodule.png'; $i++; $adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_TABLES; $adminmenu[$i]["link"] = 'admin/tables.php'; -$adminmenu[$i]["icon"] = 'images/32/addtable.png'; -$i++; +$adminmenu[$i]["icon"] = 'images/32/addtable.png'; $i++; $adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_CONST; $adminmenu[$i]["link"] = 'admin/building.php'; -$adminmenu[$i]["icon"] = 'images/32/builder.png'; -$i++; +$adminmenu[$i]["icon"] = 'images/32/builder.png'; $i++; $adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_ABOUT; $adminmenu[$i]["link"] = 'admin/about.php'; -$adminmenu[$i]["icon"] = '../../'.$pathImageAdmin.'/about.png'; +$adminmenu[$i]["icon"] = '../../'.$pathIcon32.'/about.png'; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php 2012-05-19 10:21:57 UTC (rev 9548) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php 2012-05-19 10:22:05 UTC (rev 9549) @@ -27,7 +27,7 @@ $op = TDMCreate_CleanVars( $_REQUEST, 'op', 'modules_list', 'string' ); $modulesAdmin = new ModuleAdmin(); switch ($op) { - case "modules_save": + case "modules_save": if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); } @@ -94,23 +94,23 @@ if ($modulesHandler->insert($obj)) { redirect_header('modules.php?op=default', 2, _AM_TDMCREATE_FORMOK); } else { - redirect_header('modules.php?op=default', 2, _AM_TDMCREATE_NOTINSERTED); + redirect_header('modules.php?op=modules_create', 2, _AM_TDMCREATE_NOTINSERTED); } break; - case "modules_create": + case "modules_create": echo $modulesAdmin->addNavigation('modules.php'); $modulesAdmin->addItemButton(_AM_TDMCREATE_MODULES_LIST, 'modules.php?op=modules_list', 'list'); echo $modulesAdmin->renderButton(); $obj =& $modulesHandler->create(); $form = $obj->getForm(); - break; - case "modules_edit": + break; + case "modules_edit": $obj =& $modulesHandler->get($_REQUEST['modules_id']); $form = $obj->getForm(); - break; - case "modules_delete": + break; + case "modules_delete": $obj =& $modulesHandler->get($_REQUEST['modules_id']); if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { @@ -126,9 +126,9 @@ } else { xoops_confirm(array('ok' => 1, 'modules_id' => $_REQUEST['modules_id'], 'op' => 'modules_delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('modules_name'))); } - break; - case "modules_list": - default: + break; + case "modules_list": + default: echo $modulesAdmin->addNavigation('modules.php'); $modulesAdmin->addItemButton(_AM_TDMCREATE_MODULES_NEW, 'modules.php?op=modules_create', 'add'); echo $modulesAdmin->renderButton(); @@ -190,7 +190,7 @@ echo '<td> </td>'; echo '<td> </td>'; echo '<td>'; - echo '<a href="modules.php?op=modules_edit&modules_id='.$modules_id.'"><img src="'. $pathImageIcon .'/edit.png" alt="'._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="modules.php?op=modules_delete&modules_id='.$modules_id.'"><img src="'. $pathImageIcon .'/delete.png" alt="'._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>'; + echo '<a href="modules.php?op=modules_edit&modules_id='.$modules_id.'"><img src="'. $pathIcon16 .'/edit.png" alt="'._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="modules.php?op=modules_delete&modules_id='.$modules_id.'"><img src="'. $pathIcon16 .'/delete.png" alt="'._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>'; echo '</td>'; echo '</tr>'; } @@ -210,6 +210,6 @@ echo '<tr><td class="errorMsg" colspan="7">Empty!</td></tr>'; echo '</table><br><br>'; } - break; + break; } include "admin_footer.php"; \ No newline at end of file Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-05-19 10:21:57 UTC (rev 9548) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-05-19 10:22:05 UTC (rev 9549) @@ -60,8 +60,8 @@ //Image include_once XOOPS_ROOT_PATH.'/class/uploader.php'; - if(is_dir($pathImageAdmin)){ - $uploaddir = $pathImageAdmin; + if(is_dir($pathIcon32)){ + $uploaddir = $pathIcon32; }else{ $uploaddir = XOOPS_ROOT_PATH . "/modules/".$xoopsModule->dirname()."/images/uploads/tables/"; } @@ -187,12 +187,13 @@ //Image include_once XOOPS_ROOT_PATH.'/class/uploader.php'; - if(is_dir($pathImageAdmin) && isset($pathImageAdmin)){ - $uploaddir = $pathImageAdmin; + if(is_dir($pathIcon32) && isset($pathIcon32)){ + $uploaddir = $pathIcon32; } else { $uploaddir = XOOPS_ROOT_PATH . "/modules/".$xoopsModule->dirname()."/modules/".$modules_name."/images/32/"; } - $uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null); + $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']['mimetypes'], + $GLOBALS['xoopsModuleConfig']['maxsize'], null, null); if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']) ; $name_img = $_REQUEST['tables_name'].'.'.$extension; @@ -352,12 +353,13 @@ $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=tables_champs', 'add'); echo $tablesAdmin->renderButton(); - //Champs existe deja ? + //Fields already exists? $criteria = new CriteriaCompo(); - $criteria->add(new Criteria('tables_name', $_REQUEST['tables_name'])); + $criteria->add(new Criteria('tables_modules', $_REQUEST['tables_modules']), 'AND'); + $criteria->add(new Criteria('tables_name', $_REQUEST['tables_name']), 'AND'); $nb_tables1 = $tablesHandler->getCount($criteria); - if ( $nb_tables1 < 1 ) + if ( $nb_tables1 == 1 ) { if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header('tables.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); @@ -379,8 +381,8 @@ //Image include_once XOOPS_ROOT_PATH.'/class/uploader.php'; - if(!is_dir($pathImageAdmin) && isset($pathImageAdmin)){ - $uploaddir = $pathImageAdmin; + if(!is_dir($pathIcon32) && isset($pathIcon32)){ + $uploaddir = $pathIcon32; }else{ $uploaddir = XOOPS_ROOT_PATH . "/modules/".$xoopsModule->dirname()."/images/uploads/tables/"; } @@ -515,7 +517,7 @@ echo '<td> </td>'; echo '<td> </td>'; echo '<td>'; - echo '<a href="tables.php?op=edit_modules&modules_id='.$modules_id.'"><img src='. $pathImageIcon ."/edit.png alt="._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="tables.php?op=delete_modules&modules_id='.$modules_id.'"><img src='. $pathImageIcon ."/delete.png alt="._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>'; + echo '<a href="tables.php?op=edit_modules&modules_id='.$modules_id.'"><img src='. $pathIcon16 ."/edit.png alt="._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="tables.php?op=delete_modules&modules_id='.$modules_id.'"><img src='. $pathIcon16 ."/delete.png alt="._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>'; echo '</td>'; echo '</tr>'; @@ -544,8 +546,8 @@ $blocs = ($tables_blocks == 1) ? _YES : _NO; echo '<tr class="even center">'; echo '<td class="left"> <b>- '.$tables_name.'</b></a></td>'; - if(!is_dir($pathImageAdmin)){ - echo '<td><img src="'.$pathImageAdmin.'/'.$tables_img.'" height="30px"></td>'; + if(!is_dir($pathIcon32)){ + echo '<td><img src="'.$pathIcon32.'/'.$tables_img.'" height="30px"></td>'; }else{ echo '<td><img src="../images/uploads/tables/'.$tables_img.'" height="30px"></td>'; } @@ -554,7 +556,7 @@ echo '<td>'.$blocs.'</td>'; echo '<td>'.$nb_champs.'</td>'; echo '<td>'; - echo '<a href="tables.php?op=edit_tables&tables_id='.$tables_id.'"><img src='. $pathImageIcon ."/edit.png alt="._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="tables.php?op=edit_champs&tables_id='.$tables_id.'"><img src='. $pathImageIcon ."/inserttable.png alt="._AM_TDMCREATE_FORMCHAMPS.'" title="'._AM_TDMCREATE_FORMCHAMPS.'"></a> <a href="tables.php?op=delete_tables&tables_id='.$tables_id.'"><img src='. $pathImageIcon ."/delete.png alt="._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>'; + echo '<a href="tables.php?op=edit_tables&tables_id='.$tables_id.'"><img src='. $pathIcon16 ."/edit.png alt="._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="tables.php?op=edit_champs&tables_id='.$tables_id.'"><img src='. $pathIcon16 ."/inserttable.png alt="._AM_TDMCREATE_FORMCHAMPS.'" title="'._AM_TDMCREATE_FORMCHAMPS.'"></a> <a href="tables.php?op=delete_tables&tables_id='.$tables_id.'"><img src='. $pathIcon16 ."/delete.png alt="._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>'; echo '</td></tr>'; } } Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_footer.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_footer.php 2012-05-19 10:21:57 UTC (rev 9548) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_footer.php 2012-05-19 10:22:05 UTC (rev 9549) @@ -19,22 +19,22 @@ */ include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_entete.php'; include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php'; - function const_admin_footer($modules, $modules_name, $tables_arr) { $language = '_AM_'.strtoupper($modules_name).'_'; $myts =& MyTextSanitizer::getInstance(); $file = "admin_footer.php"; $path_file = TDM_CREATE_MURL."/".$modules_name."/admin/".$file; - $en_tete = const_entete($modules, 0); - + $en_tete = const_entete($modules, 0); $text = '<?php'.$en_tete.' -global $pathImageAdmin; -echo "<div align=\'center\'><a href=\'http://www.xoops.org\' target=\'_blank\'> - <img src=\'".$pathImageAdmin."/xoopsmicrobutton.gif\' alt=\'XOOPS\' title=\'XOOPS\'></a></div>"; -echo "<div class=\'center small italic pad5\'> - <strong>" . $xoopsModule->getVar(\'name\') . "</strong> ".'.$language.'MAINTAINEDBY." - <a href=\''.$modules->getVar("modules_forum_site_url").'\' title=\'Visit '.$modules->getVar("modules_forum_site_name").'\' class=\'tooltip\' rel=\'external\'>'.$modules->getVar("modules_forum_site_name").'</a></div>"; +echo "<div class=\'center\'><a href=\'http://www.xoops.org\' target=\'_blank\'> + <img src=\'".$GLOBALS[\'pathIcon32\']."/xoopsmicrobutton.gif\' alt=\'XOOPS\' title=\'XOOPS\'></a> + </div>"; +echo "<div class=\'center pad5\'> + <span class=\'bold\'>".$GLOBALS[\'xoopsModule\']->getVar(\'name\')."</span> + <span class=\'small italic\'> "._AM_TDMCREATE_MAINTAINEDBY." + <a href=\''.$modules->getVar("modules_forum_site_url").'\' title=\'Visit '.$modules->getVar("modules_forum_site_name").'\' class=\'tooltip\' rel=\'external\'>'.$modules->getVar("modules_forum_site_name").'</a></span> + </div>"; xoops_cp_footer(); '; createFile($path_file, $text, Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_header.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_header.php 2012-05-19 10:21:57 UTC (rev 9548) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_header.php 2012-05-19 10:22:05 UTC (rev 9549) @@ -34,8 +34,8 @@ $thisDirname = $GLOBALS[\'xoopsModule\']->getVar(\'dirname\'); -$pathImageIcon = XOOPS_URL .\'/\'. $GLOBALS[\'xoopsModule\']->getInfo(\'icons16\'); -$pathImageAdmin = XOOPS_URL .\'/\'. $GLOBALS[\'xoopsModule\']->getInfo(\'icons32\'); +$pathIcon16 = XOOPS_URL .\'/\'. $GLOBALS[\'xoopsModule\']->getInfo(\'icons16\'); +$pathIcon32 = XOOPS_URL .\'/\'. $GLOBALS[\'xoopsModule\']->getInfo(\'icons32\'); $pathModuleAdmin = $GLOBALS[\'xoopsModule\']->getInfo(\'dirmoduleadmin\'); $myts =& MyTextSanitizer::getInstance(); @@ -61,8 +61,8 @@ $xoopsTpl = new XoopsTpl(); } -$xoopsTpl->assign(\'pathImageIcon\', $pathImageIcon); -$xoopsTpl->assign(\'pathImageAdmin\', $pathImageAdmin); +$xoopsTpl->assign(\'pathIcon16\', $pathIcon16); +$xoopsTpl->assign(\'pathIcon32\', $pathIcon32); //xoops_cp_header(); //Load languages Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_menu.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_menu.php 2012-05-19 10:21:57 UTC (rev 9548) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_menu.php 2012-05-19 10:22:05 UTC (rev 9549) @@ -29,18 +29,11 @@ $en_tete = const_entete($modules, 0); $menu = 1; $text = '<?php'.$en_tete.' -$dirname = basename( dirname( dirname( __FILE__ ) ) ) ; -$module_handler =& xoops_gethandler("module"); -$xoopsModule =& XoopsModule::getByDirname($dirname); -$moduleInfo =& $module_handler->get($xoopsModule->getVar("mid")); -$pathImageAdmin = $moduleInfo->getInfo("icons32"); - -$adminmenu = array(); -$i = 1; +$pathIcon32 = $GLOBALS[\'xoopsModule\']->getInfo("icons32"); +$adminmenu = array(); $i = 1; $adminmenu[$i]["title"] = '.$language.$menu.'; $adminmenu[$i]["link"] = "admin/index.php"; -$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/home.png"; -$i++;'.PHP_EOL; +$adminmenu[$i]["icon"] = "../../".$pathIcon32."/dashboard.png"; $i++;'.PHP_EOL; $menu++; foreach (array_keys($tables_arr) as $i) { @@ -49,8 +42,7 @@ $text .= '$adminmenu[$i]["title"] = '.$language.$menu.'; $adminmenu[$i]["link"] = "admin/'.$tables_arr[$i]->getVar("tables_name").'.php"; -$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/'.$tables_arr[$i]->getVar("tables_img").'"; -$i++;'.PHP_EOL; +$adminmenu[$i]["icon"] = "../../".$pathIcon32."/'.$tables_arr[$i]->getVar("tables_img").'"; $i++;'.PHP_EOL; $menu++; } $tables_module_table = $tables_arr[$i]->getVar("tables_module_table"); @@ -62,14 +54,12 @@ $menu++; $text .= '$adminmenu[$i]["title"] = '.$language.$menu.'; $adminmenu[$i]["link"] = "admin/permissions.php"; -$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/permissions.png"; -$i++;'.PHP_EOL; +$adminmenu[$i]["icon"] = "../../".$pathIcon32."/permissions.png"; $i++;'.PHP_EOL; } $menu++; $text .= '$adminmenu[$i]["title"] = '.$language.$menu.'; $adminmenu[$i]["link"] = "admin/about.php"; -$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/about.png"; -unset( $i ); +$adminmenu[$i]["icon"] = "../../".$pathIcon32."/about.png"; unset( $i ); ?>'; unset( $menu ); createFile($path_file, $text, Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_pages.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_pages.php 2012-05-19 10:21:57 UTC (rev 9548) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/const/const_admin_pages.php 2012-05-19 10:22:05 UTC (rev 9549) @@ -29,7 +29,6 @@ $text = '<?php'.$en_tete.' include "admin_header.php"; xoops_cp_header(); -global $pathImageIcon; // We recovered the value of the argument op in the URL$ $op = '.$modules_name.'_CleanVars($_REQUEST, \'op\', \'list\', \'string\'); '; @@ -117,8 +116,8 @@ $text .= $champs_data.' echo "<td class=\'center width5\'> - <a href=\''.$tables_name.'.php?op=edit_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathImageIcon."/edit.png alt=\'"._EDIT."\' title=\'"._EDIT."\'></a> - <a href=\''.$tables_name.'.php?op=delete_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathImageIcon."/delete.png alt=\'"._DELETE."\' title=\'"._DELETE."\'></a> + <a href=\''.$tables_name.'.php?op=edit_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathIcon16."/edit.png alt=\'"._EDIT."\' title=\'"._EDIT."\'></a> + <a href=\''.$tables_name.'.php?op=delete_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathIcon16."/delete.png alt=\'"._DELETE."\' title=\'"._DELETE."\'></a> </td>"; echo "</tr>"; }'; @@ -132,8 +131,8 @@ $text .= $champs_data.' echo "<td class=\'center width5\'> - <a href=\''.$tables_name.'.php?op=edit_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathImageIcon."/edit.png alt=\'"._EDIT."\' title=\'"._EDIT."\'></a> - <a href=\''.$tables_name.'.php?op=delete_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathImageIcon."/delete.png alt=\'"._DELETE."\' title=\'"._DELETE."\'></a> + <a href=\''.$tables_name.'.php?op=edit_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathIcon16."/edit.png alt=\'"._EDIT."\' title=\'"._EDIT."\'></a> + <a href=\''.$tables_name.'.php?op=delete_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathIcon16."/delete.png alt=\'"._DELETE."\' title=\'"._DELETE."\'></a> </td>"; echo "</tr>";'; } @@ -157,7 +156,7 @@ //Function that enables display child categories function '.$modules_name.'_display_children($topic_id = 0, $topic_arr, $prefix = "", $order = "", &$class) { - global $pathImageIcon; + global $pathIcon16; $topicHandler =& xoops_getModuleHandler("'.$tables_module_table.'", "'.$modules_name.'"); $prefix = $prefix."<img src=\'".XOOPS_URL."/modules/'.$modules_name.'/images/deco/arrow.gif\'>"; foreach (array_keys($topic_arr) as $i) @@ -173,8 +172,8 @@ $text .= $champs_data.' echo "<td class=\'center\' width=\'10%\'> - <a href=\''.$tables_name.'.php?op=edit_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathImageIcon."/edit.png alt=\'"._EDIT."\' title=\'"._EDIT."\'></a> - <a href=\''.$tables_name.'.php?op=delete_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathImageIcon."/delete.png alt=\'"._DELETE."\' title=\'"._DELETE."\'></a> + <a href=\''.$tables_name.'.php?op=edit_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathIcon16."/edit.png alt=\'"._EDIT."\' title=\'"._EDIT."\'></a> + <a href=\''.$tables_name.'.php?op=delete_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathIcon16."/delete.png alt=\'"._DELETE."\' title=\'"._DELETE."\'></a> </td> </tr>"; $class = ($class == "even") ? "odd" : "even"; @@ -220,8 +219,8 @@ $text .= ''.$champs_data.' echo "<td class=\'center width5\'> - <a href=\''.$tables_name.'.php?op=edit_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathImageIcon."/edit.png alt=\'"._EDIT."\' title=\'"._EDIT."\'></a> - <a href=\''.$tables_name.'.php?op=delete_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathImageIcon."/delete.png alt=\'"._DELETE."\' title=\'"._DELETE."\'></a> + <a href=\''.$tables_name.'.php?op=edit_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathIcon16."/edit.png alt=\'"._EDIT."\' title=\'"._EDIT."\'></a> + <a href=\''.$tables_name.'.php?op=delete_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathIcon16."/delete.png alt=\'"._DELETE."\' title=\'"._DELETE."\'></a> </td> </tr>"; $class = ($class == "even") ? "odd" : "even"; @@ -247,8 +246,8 @@ $text .= $champs_data.' echo "<td class=\'center width5\'> - <a href=\''.$tables_name.'.php?op=edit_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathImageIcon."/edit.png alt=\'"._EDIT."\' title=\'"._EDIT."\'></a> - <a href=\''.$tables_name.'.php?op=delete_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathImageIcon."/delete.png alt=\'"._DELETE."\' title=\'"._DELETE."\'></a> + <a href=\''.$tables_name.'.php?op=edit_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathIcon16."/edit.png alt=\'"._EDIT."\' title=\'"._EDIT."\'></a> + <a href=\''.$tables_name.'.php?op=delete_'.$tables_name.'&'.$champs_id.'=".$i."\'><img src=".$pathIcon16."/delete.png alt=\'"._DELETE."\' title=\'"._DELETE."\'></a> </td>"; echo "</tr>";'; } Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/update language 1.37 to 1.38.txt =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/update language 1.37 to 1.38.txt 2012-05-19 10:21:57 UTC (rev 9548) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/update language 1.37 to 1.38.txt 2012-05-19 10:22:05 UTC (rev 9549) @@ -54,6 +54,7 @@ // New Module define("_AM_TDMCREATE_MODULES_ACTIVE_SUBMENU", "Visible Submenu"); define("_AM_TDMCREATE_MODULES_ACTIVE_NOTIFY", "Active Notifications"); +define("_AM_TDMCREATE_NOTINSERTED", "The module is not saved, it is likely that you have used a name that already exists, please change name for a new module"); // New Table define("_AM_TDMCREATE_TABLES_DISPLAY_SUMENU", "Use view TAB Submenu"); @@ -63,8 +64,7 @@ // Filemanager.php // Nav define('_AM_TDMCREATE_FILEMANAGER_NAV_MANAGER','File Manager'); -define('_AM_TDMCREATE_FILEMANAGER_NAV_MAIN','File Manager'); -define("_AM_TDMCREATE_NOTINSERTED", "The module is not saved, it is likely that you have used a name that already exists, please change name for a new module"); +define('_AM_TDMCREATE_FILEMANAGER_NAV_MAIN','File Manager'); //Tips define('_AM_TDMCREATE_FILEMANAGER_NAV_TIPS',' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |