From: <txm...@us...> - 2012-02-02 13:45:35
|
Revision: 8870 http://xoops.svn.sourceforge.net/xoops/?rev=8870&view=rev Author: txmodxoops Date: 2012-02-02 13:45:24 +0000 (Thu, 02 Feb 2012) Log Message: ----------- fixed minor bugs Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/about.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/menu.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_modules.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/xoops_version.php Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/about.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/about.php 2012-02-02 12:32:01 UTC (rev 8869) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/about.php 2012-02-02 13:45:24 UTC (rev 8870) @@ -44,6 +44,6 @@ $aboutAdmin = new ModuleAdmin(); echo $aboutAdmin->addNavigation("about.php"); -echo $aboutAdmin->renderabout($GLOBALS['xoopsModuleConfig']['id_paypal'], false); +echo $aboutAdmin->renderabout('6KJ7RW5DR3VTJ', false); include "admin_footer.php"; \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/menu.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/menu.php 2012-02-02 12:32:01 UTC (rev 8869) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/menu.php 2012-02-02 13:45:24 UTC (rev 8870) @@ -68,7 +68,7 @@ $i++; $adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU5; //$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU5_DESC -$adminmenu[$i]["link"] = 'admin/const.php'; +$adminmenu[$i]["link"] = 'admin/building.php'; $adminmenu[$i]["icon"] = '../../'.$pathImageAdmin.'/builder.png'; $i++; $adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU6; Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-02-02 12:32:01 UTC (rev 8869) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-02-02 13:45:24 UTC (rev 8870) @@ -79,7 +79,7 @@ if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile1"]['name']) ; - $name_img = 'topic.'.$extension; + $name_img = $_GET['tables_name'].'.'.$extension; $uploader->setTargetFileName($name_img); $uploader->fetchMedia($_POST['xoops_upload_file'][0]); if (!$uploader->upload()) { Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_modules.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_modules.php 2012-02-02 12:32:01 UTC (rev 8869) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_modules.php 2012-02-02 13:45:24 UTC (rev 8870) @@ -95,7 +95,7 @@ $editor_configs["cols"] = 100; $editor_configs["width"] = "100%"; $editor_configs["height"] = "100px"; - $editor_configs["editor"] = $GLOBALS['xoopsModuleConfig']['TDMCreate_editor']; + $editor_configs["editor"] = $GLOBALS['xoopsModuleConfig']['tdmcreate_editor']; $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); @@ -106,8 +106,7 @@ $modules_active_search = $this->isNew() ? '1' : $this->getVar('modules_active_search'); $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_ACTIVE_SEARCH, 'modules_active_search', $modules_active_search, _YES, _NO)); - $modules_image = $this->getVar('modules_image') ? $this->getVar('modules_image') : 'blank.gif'; - + $modules_image = $this->getVar('modules_image') ? $this->getVar('modules_image') : 'blank.gif'; $uploadirectory = "/modules/".$xoopsModule->dirname()."/images/uploads/modules"; $imgtray = new XoopsFormElementTray(_AM_TDMCREATE_MODULES_IMAGE,'<br />'); $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, "./modules/".$xoopsModule->dirname()."/images/uploads/modules"); Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/xoops_version.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/xoops_version.php 2012-02-02 12:32:01 UTC (rev 8869) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/xoops_version.php 2012-02-02 13:45:24 UTC (rev 8870) @@ -53,14 +53,16 @@ $modversion['license'] = 'GNU GPL 2.0'; $modversion['license_url'] = "www.gnu.org/licenses/gpl-2.0.html/"; -$modversion['release_info'] = "Beta 1 18/12/2011"; +$modversion['release_info'] = "Beta 2 30/01/2012"; $modversion['release_file'] = XOOPS_URL."/modules/".$dirname."/docs/changelog.txt"; -$modversion['release_date'] = "2011/12/18"; +$modversion['release_date'] = "2012/01/30"; $modversion['manual'] = "Install Manual"; $modversion['manual_file'] = XOOPS_URL."/modules/".$dirname."/docs/install.txt"; $modversion['min_php'] = "5.2"; $modversion['min_xoops'] = "2.5"; +$modversion['min_admin']= "1.1"; +$modversion['min_db']= array('mysql'=> "5.0.7", 'mysqli'=> "5.0.7"); $modversion['image'] = "images/{$dirname}_slogo.png"; $modversion['dirname'] = "$dirname"; @@ -75,8 +77,8 @@ $modversion['forum_site_name'] = "Xoops Community"; $modversion['module_website_url'] = "http://www.xoops.org/"; $modversion['module_website_name'] = "Xoops"; -$modversion['release'] = "18-12-2011"; -$modversion['module_status'] = "Beta 1"; +$modversion['release'] = "30/01/2012"; +$modversion['module_status'] = "Beta 2"; // Admin things $modversion['hasAdmin'] = 1; @@ -97,6 +99,8 @@ $modversion["onInstall"] = "include/install.php"; //$modversion["onUpdate"] = "include/update.php"; +$modversion['hasMain'] = 0; + $modversion['templates'][] = array( 'file' => 'tdmcreate_filemanager.html', 'description' => '', 'type' => 'admin' ); // Config @@ -117,13 +121,5 @@ $modversion['config'][$i]['formtype'] = 'textbox'; $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 15; -$i++; -$modversion["config"][$i]["name"] = "id_paypal"; -$modversion["config"][$i]["title"] = "_MI_TDMCREATE_IDPAYPAL"; -$modversion["config"][$i]["description"] = "_MI_TDMCREATE_IDPAYPAL_DESC"; -$modversion["config"][$i]["formtype"] = "textbox"; -$modversion["config"][$i]["valuetype"] = "text"; -$modversion["config"][$i]["default"] = '6KJ7RW5DR3VTJ'; unset($i); - ?> \ 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: <be...@us...> - 2012-04-11 07:03:57
|
Revision: 9299 http://xoops.svn.sourceforge.net/xoops/?rev=9299&view=rev Author: beckmi Date: 2012-04-11 07:03:43 +0000 (Wed, 11 Apr 2012) Log Message: ----------- Updating TDMCreate to 1.38 RC Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/about.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/admin_footer.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/admin_header.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/includes.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/index.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/menu.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/modules.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/constArchitecture.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_modules.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_about.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_footer.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_header.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_help.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_index.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_menu.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_pages.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_permissions.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_architecture.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_blocks.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_blocks_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_blocks_templates.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_class.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_entete.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_help_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_coms.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_configs.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_functions.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_install.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_search.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_languages.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_main_header.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_main_index.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_main_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_modinfo_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_sql.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates_admin_about.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates_admin_help.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates_footer.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates_header.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates_index.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates_pages.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_user_header.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_user_index.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_user_pages.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_xoopsversion.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/docs/changelog.txt XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/icons/off.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/icons/on.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions_const.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/arabic/help/help.html XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/arabic/modinfo.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/bulgarian/help/help.html XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/bulgarian/modinfo.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/admin.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/help/help.html XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/modinfo.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/french/admin.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/french/help/help.html XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/french/modinfo.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/admin.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/help/help.html XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/modinfo.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/update language 1.37 to 1.38.txt XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/sql/mysql.sql XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/xoops_version.php Added Paths: ----------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_css_style.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_header.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_jquery.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/deco/ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/deco/arrow.gif XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/deco/index.html XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/deco/loading.gif XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/deco/off.gif XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/deco/off.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/deco/on.gif XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/deco/on.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/loading.gif XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/logo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/update language 1.1 to 1.37.txt XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/update language 1.38 to 1.39.txt Removed Paths: ------------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/filesmanager.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/jquery.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/languages.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_languages.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_about_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/TDMLogo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/Test1Logo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/ams_slogo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/blank.gif XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/feedsLogo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/gearthLogo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/gearth_slogo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/gviewLogo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/imprintLogo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/mytubeLogo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/partadsLogo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/passgenLogo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/radiostreamLogo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/videostreamLogo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/xcvLogo.txt XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/xnews_slogo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/xsitemapLogo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/ads.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/blank.gif XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/broken.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/cat.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/contact.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/feed.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/links.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/param.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/plugin.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/radio.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/shoutbox.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/topic.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/video.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/jq.init.js XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/js/ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/arabic/help.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/templates/admin/tdmcreate_filemanager.html Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/about.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/about.php 2012-04-11 04:13:25 UTC (rev 9298) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/about.php 2012-04-11 07:03:43 UTC (rev 9299) @@ -1,49 +1,29 @@ <?php /** - * **************************************************************************** - * - 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) - * **************************************************************************** - * TDMCREATE - MODULE FOR XOOPS - * Copyright (c) 2007 - 2011 - * TXMod Xoops (http://www.txmodxoops.org) + * TDMCreate module * - * 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 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. * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting - * source code which is considered copyrighted (c) material of the - * original comment or credit authors. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * ------------------------------------------------------------------------ - * - * @copyright TXMod Xoops (http://www.txmodxoops.org) - * @license GPL see LICENSE - * @package TDMCreate - * @since 2.5.0 - * @author Mage, Mamba - * @author TXMod Xoops (in...@tx...) - * - * Version : 1.38 Sat 2011/10/22 9:52:18 : Timgno Exp $ - * **************************************************************************** - */ + * @copyright The XOOPS Project (http://www.xoops.org) + * @license GNU GPL (http://www.gnu.org/licenses/gpl-2.0.html/) + * @package TDMCreate + * @since 2.5.0 + * @author Mage, Mamba + * @version $Id $ + **/ -include "admin_header.php"; +include '../../../include/cp_header.php'; +include 'admin_header.php'; xoops_cp_header(); $aboutAdmin = new ModuleAdmin(); -echo $aboutAdmin->addNavigation("about.php"); +echo $aboutAdmin->addNavigation('about.php'); echo $aboutAdmin->renderabout('6KJ7RW5DR3VTJ', false); -include "admin_footer.php"; \ No newline at end of file +include 'admin_footer.php'; \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/admin_footer.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/admin_footer.php 2012-04-11 04:13:25 UTC (rev 9298) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/admin_footer.php 2012-04-11 07:03:43 UTC (rev 9299) @@ -1,46 +1,24 @@ <?php /** - * **************************************************************************** - * - 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) - * **************************************************************************** - * TDMCREATE - MODULE FOR XOOPS - * Copyright (c) 2007 - 2011 - * TXMod Xoops (http://www.txmodxoops.org) + * XoopsPoll module * - * 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 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. * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting - * source code which is considered copyrighted (c) material of the - * original comment or credit authors. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * ------------------------------------------------------------------------ - * - * @copyright TXMod Xoops (http://www.txmodxoops.org) - * @license GPL see LICENSE - * @package TDMCreate - * @author Mamba (www.xoops.org) - * @author TXMod Xoops (in...@tx...) - * - * Version : 1.38 Sat 2011/10/22 9:52:18 : 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 smallsmall italic pad5'> - <strong>" . $xoopsModule->getVar('name') . "</strong> "._AM_TDMCREATE_MAINTAINEDBY." - <a href='http://www.xoops.org/modules/newbb/' title='Visit Xoops Community' class='tooltip' rel='external'>Xoops Community</a></div>"; -xoops_cp_footer(); + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package XoopsPoll + * @since 2.5.0 + * @author Mamba (www.xoops.org) + * @version $Id $ +**/ +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 smallsmall 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>"; + +xoops_cp_footer(); \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/admin_header.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/admin_header.php 2012-04-11 04:13:25 UTC (rev 9298) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/admin_header.php 2012-04-11 07:03:43 UTC (rev 9299) @@ -1,73 +1,40 @@ -<?php +<?php /** - * **************************************************************************** - * - 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) - * **************************************************************************** - * TDMCREATE - MODULE FOR XOOPS - * Copyright (c) 2007 - 2011 - * TXMod Xoops (http://www.txmodxoops.org) + * Marquee module * - * 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 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. * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting - * source code which is considered copyrighted (c) material of the - * original comment or credit authors. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * ------------------------------------------------------------------------ - * - * @copyright TXMod Xoops (http://www.txmodxoops.org) - * @license GPL see LICENSE - * @package TDMCreate - * @author TXMod Xoops (in...@tx...) - * - * Version : 1.38 Sat 2011/10/22 9:52:18 : Timgno Exp $ - * **************************************************************************** - */ - + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Marquee + * @since 2.5.0 + * @author XOOPS Module Team + * @version $Id $ +**/ 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("../include/functions.php"); include_once 'includes.php'; -$pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin'); -$globlang = $GLOBALS['xoopsConfig']['language']; - -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'; +if ( file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))){ + include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'); //return true; }else{ - xoops_cp_header(); - echo xoops_error(_AM_ERROR_NOFRAMEWORKS); - xoops_cp_footer(); + echo xoops_error("Error: You don't use the Frameworks \"admin module\". Please install this Frameworks"); //return false; } -$dirname = basename(dirname(dirname( __FILE__ ) )); -$module_handler =& xoops_gethandler('module'); -$xoopsModule = & $module_handler->getByDirname($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'); -$modulesHandler=& xoops_getModuleHandler('TDMCreate_modules', $dirname); -$tablesHandler=& xoops_getModuleHandler('TDMCreate_tables', $dirname); -$languagesHandler=& xoops_getModuleHandler('TDMCreate_languages', $dirname); $myts =& MyTextSanitizer::getInstance(); @@ -94,4 +61,4 @@ //Load languages xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); -xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-11 04:13:25 UTC (rev 9298) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-11 07:03:43 UTC (rev 9299) @@ -3,8 +3,9 @@ * **************************************************************************** * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Revision Copyright (c) (http://www.txmodxoops.org) * - * Cette licence, contient des limitations!!! + * This license contains restrictions!!! * * 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 @@ -15,180 +16,195 @@ * * @license TDM GPL license * @author TDM TEAM DEV MODULE + * @author TXMod Xoops (in...@tx...) * + * Version : 1.39 Tue 2012/02/14 16:20:18 : Timgno Exp $ * **************************************************************************** */ - include 'admin_header.php'; xoops_cp_header(); $indexAdmin = new ModuleAdmin(); -echo $indexAdmin->addNavigation('const.php'); +echo $indexAdmin->addNavigation('building.php'); $op = TDMCreate_CleanVars($_REQUEST, 'op', 'default', 'string'); -$modPath = XOOPS_ROOT_PATH.'/modules/TDMCreate'; - switch ($op) { case "creation": - $modules =& $modulesHandler->get($_REQUEST['modules_name']); - $modules_name = $modules->getVar('modules_name'); - $modules_desc = $modules->getVar('modules_description'); - $modules_author_website_name = $modules->getVar('modules_author_website_name'); - $modules_author_website_url = $modules->getVar('modules_author_website_url'); - $modules_image = $modules->getVar('modules_image'); - //Effacer repertoire du nouveau module s'il existe - clearDir($modPath.'/modules/'.$modules_name); + $mods =& $modsHandler->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_image = $mods->getVar('modules_image'); + $mods_display_admin = $mods->getVar('modules_display_admin'); + $mods_display_user = $mods->getVar('modules_display_user'); + //Remove the new module directory if it exists + //clearDir($modPath.'/modules/'.$modules_fname); //Nom des tables et combien de tables $criteria = new CriteriaCompo(); $criteria->add(new Criteria('tables_modules', $_REQUEST['modules_name'])); - $nb_tables = $tablesHandler->getCount($criteria); - $tables_arr = $tablesHandler->getall($criteria); + $nb_tables = $tblsHandler->getCount($criteria); + $tbls_arr = $tblsHandler->getall($criteria); //Debut - echo '<table width="100%" cellspacing="1" class="outer">'; + echo '<table width="100%" cellspacing="1" style="background: #fff;"> + <tr class="marg2"> + <td class="ui-corner-all">'; /************************************************/ /*Structure*/ /************************************************/ //Creation de l'architecture - const_architecture($modules_name, $modules_image); + const_architecture($mods_name, $mods_image); //Creation du changelog.txt - const_changelog($modules, $modules_name); - //Creation de admin index.php - const_admin_index($modules, $modules_name, $tables_arr); - //const_class_admin($modules, $modules_name); - - foreach (array_keys($tables_arr) as $i) + const_changelog($mods, $mods_name); + + // Files cicles + foreach (array_keys($tbls_arr) as $i) { //Variables - $tables_id = $tables_arr[$i]->getVar('tables_id'); - $tables_name = $tables_arr[$i]->getVar('tables_name'); - $tables_module_table = $tables_arr[$i]->getVar('tables_module_table'); - $tables_img = $tables_arr[$i]->getVar('tables_img'); - $tables_champs = $tables_arr[$i]->getVar('tables_champs'); - $tables_parametres = $tables_arr[$i]->getVar('tables_parametres'); - $tables_blocks = $tables_arr[$i]->getVar('tables_blocks'); - $tables_display_admin = $tables_arr[$i]->getVar('tables_display_admin'); - $tables_display_user = $tables_arr[$i]->getVar('tables_display_user'); - $tables_search = $tables_arr[$i]->getVar('tables_search'); - $tables_coms = $tables_arr[$i]->getVar('tables_coms'); + $tbls_id = $tbls_arr[$i]->getVar('tables_id'); + $tbls_name = $tbls_arr[$i]->getVar('tables_name'); + $tbls_module_table = $tbls_arr[$i]->getVar('tables_module_table'); + $tbls_img = $tbls_arr[$i]->getVar('tables_img'); + $tbls_champs = $tbls_arr[$i]->getVar('tables_champs'); + $tbls_parametres = $tbls_arr[$i]->getVar('tables_parametres'); + $tbls_blocks = $tbls_arr[$i]->getVar('tables_blocks'); + $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_search = $tbls_arr[$i]->getVar('tables_search'); + $tbls_coms = $tbls_arr[$i]->getVar('tables_coms'); //Fabrication //Copie of images tables - $tables_img1 = $modPath."/images/uploads/tables/".$tables_img; - if (file_exists($tables_img1)) { - copy($tables_img1, $modPath."/modules/".$modules_name."/images/deco/".$tables_img); + $tbls_img1 = $modPath."/images/uploads/tables/".$tbls_img; + if (file_exists($tbls_img1)) { + copy($tbls_img1, $modPath."/modules/".$mods_name."/images/deco/".$tbls_img); } //Creation des classes - const_class($modules, $modules_name, $tables_module_table, $tables_name, $tables_champs, $tables_parametres); + const_class($mods, $mods_name, $tbls_module_table, $tbls_name, $tbls_champs, $tbls_parametres); //Creation of pages admin - if ( $tables_display_admin == 1 ) { - const_admin_pages($modules, $modules_name, $tables_id, $tables_module_table, $tables_name, $tables_img, $tables_champs, $tables_parametres); + 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); } //Creation of pages and templates user - if ( $tables_display_user == 1 && $tables_module_table != null ) { - //const_user_pages($modules, $modules_name, $tables_id, $tables_module_table, $tables_name, $champs_param_display_user, $champs_param_type, $tables_img, $tables_champs, $tables_parametres); - } - //Creation de search - if ( $tables_search == 1 ) { - const_include_search($modules, $modules_name, $tables_name, $tables_module_table, $tables_champs, $tables_parametres, $tables_img); + if ( $mods_display_user == 1 ) { + const_user_pages($mods, $mods_name, $tbls_name, $tbls_champs, $tbls_champs, $tbls_parametres); + // Creation of templates pages + const_templates_pages($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres); + } + //Creation of search + if ( $tbls_search == 1 ) { + const_include_search($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres, $tbls_img); } - //Creation des coms - if ( $tables_coms == 1 ) { - const_include_coms($modules, $modules_name, $tables_name, $tables_module_table, $tables_champs, $tables_parametres, $tables_img); + //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($modules_name, $tables_module_table, $tables_name, $tables_champs); - - $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix("tdmcreate_tables")." WHERE tables_name = 'topic'"); + 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 des blocs - if ( $tables_blocks == 1 ) { - const_blocks($modules, $modules_name, $tables_module_table, $tables_name, $tables_champs, $tables_parametres, $topic); - //Creation du template des blocks - const_blocks_templates($modules, $modules_name, $tables_name, $tables_module_table, $tables_champs, $tables_parametres); + //Creation of the blocks + if ( $tbls_blocks != 1 ) { + const_blocks($mods, $mods_name, $tbls_module_table, $tbls_name, $tbls_champs, $tbls_parametres, $topic); + //Creation of template blocks + const_blocks_templates($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres); } } //Variables - $tables_id = $tablesHandler->getVar('tables_id'); - $tables_name = $tablesHandler->getVar('tables_name'); - $tables_module_table = $tablesHandler->getVar('tables_module_table'); - $tables_img = $tablesHandler->getVar('tables_img'); - $tables_champs = $tablesHandler->getVar('tables_champs'); - $tables_parametres = $tablesHandler->getVar('tables_parametres'); - $tables_blocks = $tablesHandler->getVar('tables_blocks'); - $tables_display_admin = $tablesHandler->getVar('tables_display_admin'); - $tables_display_user = $tablesHandler->getVar('tables_display_user'); - $tables_search = $tablesHandler->getVar('tables_search'); - $tables_coms = $tablesHandler->getVar('tables_coms'); - //Creation de xoopsversion.php - /*Mettre xoops version vers la fin pour integrer les bloc, etc*/ - const_xoopsversion($modules, $modules_name, $tables_blocks, $tables_arr, $tables_module_table, $tables_parametres); - // Creation of template index - const_templates_index($modules, $modules_name, $tables_name, $tables_module_table, $tables_champs, $tables_parametres); - // Creation of template header - const_templates_header($modules, $modules_name); - // Creation of template footer - const_templates_footer($modules, $modules_name, $tables_module_table); - // Creation of template admin about - const_templates_admin_about($modules, $modules_name); - // Creation of template admin help - const_templates_admin_help($modules, $modules_name); - //Creation du fichier permissions + $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'); + //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); + if($mods_display_user == 1){ + // 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); + // Creation of template footer + const_templates_footer($mods, $mods_name, $tbls_module_table); + } + //Creation of the file permissions $topic = 0; - if ( $topic == 1 || $tables_module_table != null) { // - const_admin_permissions($modules, $modules_name, $tables_arr, $topic); + if ( $topic == 1 || $tbls_module_table != null) { // + const_admin_permissions($mods, $mods_name, $tbls_name, $topic); } //Include + const_include_jquery($mods, $mods_name); //Configs - const_include_configs($modules, $modules_name, $modules_author_website_name, $modules_author_website_url); + const_include_configs($mods, $mods_name, $mods_author_website_name, $mods_author_website_url); //Style - //const_css_admin($modules, $modules_name); - //const_include_style($modules, $modules_name); + const_css_admin($mods, $mods_name); + const_css_style($mods, $mods_name); //Functions - const_include_functions($modules, $modules_name); - //Creation du fichier install pour l'uploads - const_include_install($modules, $modules_name, $tables_arr); + const_include_functions($mods, $mods_name); + //Creation of the install file for uploads + const_include_install($mods, $mods_name, $tbls_arr); //Language /////////////////////////////////////////////////////////////////////// - //Creation du language main.php - const_main_language($modules, $modules_name, $modules_desc); - //Creation du language modinfo.php - const_modinfo_language($modules, $modules_name, $modules_desc); - //Creation du language admin.php - const_admin_language($modules, $modules_name, $modules_desc); - //Creation du language blocks.php - const_blocks_language($modules, $modules_name); - //Creation du language help.php - const_help_language($modules, $modules_name); - /////////////////////////////////////////////////////////////////////// - //Creation de la class menu - //const_class_menu($modules, $modules_name); - + //Creation of language main.php + const_main_language($mods, $mods_name, $mods_desc); + //Creation of language modinfo.php + const_modinfo_language($mods, $mods_name, $tbls_arr, $mods_desc); + //Creation of language admin.php + const_admin_language($mods, $mods_name, $mods_desc, $tbls_name, $tbls_arr, $tbls_pending); + //Creation of language blocks.php + const_blocks_language($mods, $mods_name); + //Creation of language help.php + const_help_language($mods, $mods_name, $mods_desc); + //Creation of language + //const_language($mods, $mods_name); + /////////////////////////////////////////////////////////////////////// /************************************************/ /*Admin*/ /************************************************/ - //Creation de admin header.php - const_admin_header($modules, $modules_name, $tables_arr); - //Creation de admin footer.php - const_admin_footer($modules, $modules_name, $tables_arr); - //Creation de admin menu.php - const_admin_menu($modules, $modules_name, $tables_arr, $topic); - //Creation de admin about.php - //$menu++; - const_admin_about($modules, $modules_name); + if ( $mods_display_admin == 1 ) { + //Creation of admin file admin_header.php + const_admin_header($mods, $mods_name, $tbls_arr); + //Creation of admin file admin_footer.php + const_admin_footer($mods, $mods_name, $tbls_arr); + //Creation of admin file menu.php + const_admin_menu($mods, $mods_name, $tbls_arr, $topic); + //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); + } /************************************************/ - /*Admin*/ + /*User*/ /************************************************/ - if ( $tables_display_user == 1 && $tables_module_table != null ) { - const_user_header($modules, $modules_name, $tables_id, $tables_module_table, $tables_name); - const_user_index($modules, $modules_name, $tables_id, $tables_module_table, $tables_name, $tables_champs, $tables_parametres); + if ( $mods_display_user == 1 ) { + const_user_header($mods, $mods_name, $tbls_arr, $tbls_name, $tbls_module_table); + const_user_index($mods, $mods_name); } - echo '</table>'; + echo '</td></tr></table>'; break; @@ -200,19 +216,22 @@ $form = new XoopsThemeForm(_AM_TDMCREATE_ADMIN_CONST, 'form_creation', $action, 'post', true); - $modules_select = new XoopsFormSelect(_AM_TDMCREATE_CONST_MODULES, 'modules_name', 'modules_name'); - $modules_select->addOptionArray($modulesHandler->getList()); - $form->addElement($modules_select, true); - - /*foreach (array_keys($tables_arr) as $i) + $mods_select = new XoopsFormSelect(_AM_TDMCREATE_CONST_MODULES, 'modules_name', 'modules_name', 10); + $mods_select->addOptionArray($modsHandler->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 = $tblsHandler->getAll($criteria); + foreach (array_keys($tbls_name_arr) as $i) { - //Variables - $tables_name = $tables_arr[$i]->getVar('tables_name'); - }*/ - $tables_name = $tablesHandler->getVar('tables_name'); - $tables_select = new XoopsFormSelect(_AM_TDMCREATE_CONST_TABLES, 'tables_name', $tables_name, 4); - $tables_select->addOptionArray($tablesHandler->getList()); - $form->addElement($tables_select, false); + $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); $form->addElement(new XoopsFormHidden('op', 'creation')); $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); Deleted: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/filesmanager.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/filesmanager.php 2012-04-11 04:13:25 UTC (rev 9298) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/filesmanager.php 2012-04-11 07:03:43 UTC (rev 9299) @@ -1,256 +0,0 @@ -<?php -/** - * **************************************************************************** - * - 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) - * **************************************************************************** - * TDMCREATE - MODULE FOR XOOPS - * Copyright (c) 2007 - 2011 - * TXMod Xoops (http://www.txmodxoops.org) - * - * 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 - * original comment or credit authors. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * ------------------------------------------------------------------------ - * - * @copyright TXMod Xoops (http://www.txmodxoops.org) - * @license GPL see LICENSE - * @package TDMCreate - * @author TXMod Xoops (in...@tx...) - * - * Version : 1.38 Sat 2011/10/22 9:52:18 : Timgno Exp $ - * **************************************************************************** - */ -include 'admin_header.php'; -// Get Action type -$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' ); -// Define main template -$xoopsOption['template_main'] = 'tdmcreate_filemanager.html'; -// Call Header -xoops_cp_header(); - -$xoTheme->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js'); -$xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js'); -$xoTheme->addScript('modules/system/js/jquery.easing.js'); -$xoTheme->addScript('modules/TDMCreate/js/jqueryFileTree.js'); -$xoTheme->addScript('modules/TDMCreate/js/filemanager.js'); -// Define Stylesheet -$xoTheme->addStylesheet( XOOPS_URL . '/modules/system/css/admin.css'); -$xoTheme->addStylesheet( XOOPS_URL . '/modules/system/css/code_mirror/docs.css'); -$xoTheme->addStylesheet( XOOPS_URL . '/modules/system/css/ui/' . xoops_getModuleOption('jquery_theme', 'system') . '/ui.all.css'); - -xoops_load('XoopsFile'); -XoopsFile::load('file'); - -switch ($op) { - default: - $nbcolonnes_file = 4; - $width = 100/$nbcolonnes_file; - $root = XOOPS_ROOT_PATH.'/modules/TDMCreate/modules/'; - $url_file = XOOPS_URL.'/modules/TDMCreate/modules/'; - $xoopsTpl->assign('width', $width); - - if( file_exists($root) ) - { - $files = scandir($root); - natcasesort($files); - if( count($files) > 2 ) - { - $count_file = 1; - $file_arr = array(); - $edit = false; - // All files - foreach( $files as $file ) - { - if (!preg_match('#.back#', $file)) - { - if( file_exists($root . $file) && $file != '.' && $file != '..' && !is_dir($root . $file) ) - { - $folder = XoopsFile::getHandler('file', $root.$file); - $extension_verif = $folder->ext(); - - switch ( $extension_verif ) { - case 'ico': case 'png': case 'gif': case 'jpg': case 'jpeg': - $extension_verif = 'picture'; - break; - case 'html': case 'htm': - $extension_verif = 'html'; - $edit = true; - break; - case 'zip': case 'rar': case 'tar': case 'gz': - $extension_verif = 'rar'; - $edit = true; - $unzip = '<img class="cursorpointer" src="./images/icons/untar.png" onclick=\'filemanager_unzip_file("'.$path_file . $file.'", "'.$path_file.'", "'.$file.'");\' width="16" alt="edit" /> '; - break; - case 'css': - $extension_verif = 'css'; - $edit = true; - break; - case 'avi': case 'mov': case 'real': case 'flv': case 'swf': - $extension_verif = 'movie'; - break; - case 'log': - $extension_verif = 'log'; - $edit = true; - break; - case 'php': - $extension_verif = 'php'; - $edit = true; - break; - case 'info': case 'htaccess': - $extension_verif = 'info'; - break; - case 'sql': - $extension_verif = 'sql'; - $edit = true; - break; - default: - $extension_verif = 'file'; - $edit = true; - break; - } - - //Edit ? - $file_arr['edit'] = $edit; - //File - $file_arr['path_file'] = $root.$file; - $file_arr['path'] = $root; - //Chmod - $file_arr['chmod'] = substr($folder->perms(), 1); - - $file_arr['chmod'] = modify_chmod($file_arr['chmod'], $file_arr['path_file'], $count_file); - - if($extension_verif == 'picture') { - list($width, $height) = getimagesize($root . $file); - if($height > 60){ - $file_arr['img'] = '<img src="'.$url_file.$file.'" height="47" title="" alt="" />'; - } else { - $file_arr['img'] = '<img src="'.$url_file.$file.'" title="" alt="" />'; - } - } else { - $file_arr['img'] = '<img src="'.XOOPS_URL.'/modules/system/images/mimetypes/'.$extension_verif.'_48.png" title="" alt="" />'; - } - $file_arr['extension'] = $extension_verif; - $file_arr['file'] = htmlentities($file); - $count_file++; - $file_arr['newline'] = ($count_file % $nbcolonnes_file == 1) ? true : false; - $xoopsTpl->assign('newline', $file_arr['newline']); - $xoopsTpl->append('files', $file_arr); - } - $edit = false; - } - } - } - } - break; - - //save - case 'filemanager_save': - //Save the file or restore file - if(isset($_REQUEST['path_file'])) - { - //save file - $copy_file = $_REQUEST['path_file']; - copy($copy_file, $_REQUEST['path'].$_REQUEST['file'].'.back'); - //Save modif - if(isset($_REQUEST['filemanager'])) - { - $open = fopen("".$_REQUEST['path_file']."","w+"); - if(!fwrite($open, utf8_encode(stripslashes($_REQUEST['filemanager'])))) - { - redirect_header("filemanager.php", 2, _AM_TDMCREATE_FILEMANAGER_ERROR); - } - fclose($open); - } - redirect_header("filemanager.php", 2, _AM_TDMCREATE_DBUPDATED); - } else { - //restore - $old_file = $_REQUEST['path_file'].'.back'; - //echo $old_file; - $new_file = $_REQUEST['path_file']; - //echo $new_file; - if(file_exists($old_file)) - { - if(unlink($new_file)) - { - if(rename($old_file, $new_file)) - { - redirect_header("filemanager.php", 2, _AM_TDMCREATE_DBUPDATED); - }else{ - redirect_header("filemanager.php", 2, _AM_TDMCREATE_FILEMANAGER_RESTORE_ERROR_FILE_RENAME); - } - }else{ - redirect_header("filemanager.php", 2, _AM_TDMCREATE_FILEMANAGER_RESTORE_ERROR_FILE_DELETE); - } - }else{ - redirect_header("filemanager.php", 2, _AM_TDMCREATE_FILEMANAGER_RESTORE_ERROR_FILE_EXISTS); - } - } - break; - - case 'filemanager_upload_save': - if($_REQUEST['path'] != '') { - $path = trim($_REQUEST['path']); - } else { - $path = XOOPS_ROOT_PATH.'/'; - } - include_once XOOPS_ROOT_PATH . '/class/uploader.php'; - $mimetypes = include $GLOBALS['xoops']->path('include/mimetypes.inc.php'); - $uploader = new XoopsMediaUploader( $path, $mimetypes, 500000); - if ($uploader->fetchMedia('upload_file')) { - - if (!$uploader->upload()) { - $err[] = $uploader->getErrors(); - } - } - if ( isset($err) ) { - foreach ( $err as $line ){ - echo $line; - } - } - redirect_header("filemanager.php", 2, _AM_TDMCREATE_FILEMANAGER_UPLOAD_FILE); - break; - - case 'filemanager_add_dir_save': - $path = TDMCreate_CleanVars ( $_REQUEST, 'path', XOOPS_ROOT_PATH . '/modules/TDMCreate/modules/', 'string' ); - - xoops_load('XoopsFile'); - XoopsFile::load('folder'); - $folder = XoopsFile::getHandler('folder'); - if ($folder->create ($path . $_REQUEST['dir_name'], 0777)) { - $indexFile = XOOPS_ROOT_PATH."/modules/TDMCreate/index.html"; - copy($indexFile, $path.$_REQUEST['dir_name']."/index.html"); - redirect_header( 'filemanager.php', 2, _AM_TDMCREATE_FILEMANAGER_DIR_SUCCESS ); - } else { - redirect_header( 'filemanager.php', 2, _AM_TDMCREATE_FILEMANAGER_DIR_ERROR ); - } - break; - - case 'filemanager_add_file_save': - $path = TDMCreate_CleanVars ( $_REQUEST, 'path', XOOPS_ROOT_PATH . '/', 'string' ); - if ( $path == '' ) $path = XOOPS_ROOT_PATH . '/modules/TDMCreate/modules/'; - $open = fopen($path . $_REQUEST['file_name'],"w+"); - fclose($open); - redirect_header( 'filemanager.php', 2, _AM_TDMCREATE_FILEMANAGER_FILE_SUCCESS ); - //if ($file->create ($path . $_REQUEST['file_name'])) { - // redirect_header( 'filemanager.php', 2, _AM_TDMCREATE_FILEMANAGER_DIR_SUCCESS ); - //} else { - // redirect_header( 'filemanager.php', 2, _AM_TDMCREATE_FILEMANAGER_DIR_ERROR ); - //} - break; -} -include "admin_footer.php"; \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/includes.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/includes.php 2012-04-11 04:13:25 UTC (rev 9298) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/includes.php 2012-04-11 07:03:43 UTC (rev 9299) @@ -21,38 +21,46 @@ include '../../../include/cp_header.php'; include_once("../include/functions.php"); -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_architecture.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_xoopsversion.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_changelog.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_include_search.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_include_coms.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_include_configs.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_include_functions.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_include_install.php'; -//include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_include_style.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_sql.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_blocks.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_blocks_templates.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_class.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_admin_header.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_admin_footer.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_admin_menu.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_admin_index.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_admin_pages.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_admin_about.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_admin_permissions.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_admin_language.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_modinfo_language.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_help_language.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_blocks_language.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_main_language.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_user_header.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_user_index.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_user_pages.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_templates_header.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_templates_index.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_templates_footer.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_templates_admin_about.php'; -include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_templates_admin_help.php'; +$modPath = XOOPS_ROOT_PATH.'/modules/TDMCreate'; +$cPath = $modPath.'/const'; +include_once $cPath.'/const_architecture.php'; +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'; +//include_once $cPath.'/const_include_style.php'; +include_once $cPath.'/const_sql.php'; +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_class_menu.php'; + +include_once $cPath.'/const_admin_header.php'; +include_once $cPath.'/const_admin_footer.php'; +include_once $cPath.'/const_admin_menu.php'; +include_once $cPath.'/const_admin_index.php'; +include_once $cPath.'/const_admin_pages.php'; +include_once $cPath.'/const_admin_about.php'; +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'; +include_once $cPath.'/const_user_header.php'; +include_once $cPath.'/const_user_index.php'; +include_once $cPath.'/const_user_pages.php'; +include_once $cPath.'/const_templates_header.php'; +include_once $cPath.'/const_templates_index.php'; +include_once $cPath.'/const_templates_pages.php'; +include_once $cPath.'/const_templates_footer.php'; +include_once $cPath.'/const_templates_admin_about.php'; +include_once $cPath.'/const_templates_admin_help.php'; + ?> \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/index.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/index.php 2012-04-11 04:13:25 UTC (rev 9298) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/index.php 2012-04-11 07:03:43 UTC (rev 9299) @@ -1,63 +1,46 @@ -<?php +<?php /** * **************************************************************************** - * - 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) - * **************************************************************************** - * TDMCREATE - MODULE FOR XOOPS - * Copyright (c) 2007 - 2011 - * TXMod Xoops (http://www.txmodxoops.org) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) * - * 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. + * 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. + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * @license TDM GPL license + * @author TDM TEAM DEV MODULE * - * --------------------------... [truncated message content] |
From: <txm...@us...> - 2012-04-12 15:01:06
|
Revision: 9305 http://xoops.svn.sourceforge.net/xoops/?rev=9305&view=rev Author: txmodxoops Date: 2012-04-12 15:00:52 +0000 (Thu, 12 Apr 2012) Log Message: ----------- Updated to Final Release Fixed all code Deleted unused code Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/about.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/admin_footer.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/admin_header.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/includes.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/menu.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_modules.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_about.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_footer.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_header.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_help.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_index.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_menu.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_pages.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_permissions.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_architecture.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_blocks.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_blocks_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_blocks_templates.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_changelog.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_class.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_css_admin.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_css_style.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_entete.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_help_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_coms.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_configs.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_functions.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_install.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_search.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_languages.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_main_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_modinfo_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_sql.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates_admin_about.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates_admin_help.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates_footer.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates_header.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates_index.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates_pages.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_user_header.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_user_index.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_user_pages.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_xoopsversion.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/docs/changelog.txt XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/docs/install.txt XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/docs/lang_diff.txt XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/docs/readme.txt XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/comment_delete.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/comment_edit.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/comment_new.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/comment_post.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/comment_reply.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions_const.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/install.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/update.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/arabic/admin.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/arabic/modinfo.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/bulgarian/admin.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/bulgarian/help.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/bulgarian/modinfo.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/admin.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/help.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/modinfo.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/french/admin.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/french/help.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/french/modinfo.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/admin.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/help.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/modinfo.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/xoops_version.php Added Paths: ----------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_js_jquery.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/default_slogo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/blank.gif Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/about.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/about.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/about.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -1,6 +1,8 @@ <?php /** - * TDMCreate module + * **************************************************************************** + * - 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 @@ -9,21 +11,15 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * @copyright The XOOPS Project (http://www.xoops.org) - * @license GNU GPL (http://www.gnu.org/licenses/gpl-2.0.html/) - * @package TDMCreate - * @since 2.5.0 - * @author Mage, Mamba - * @version $Id $ - **/ - -include '../../../include/cp_header.php'; + * @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'; xoops_cp_header(); - $aboutAdmin = new ModuleAdmin(); - echo $aboutAdmin->addNavigation('about.php'); echo $aboutAdmin->renderabout('6KJ7RW5DR3VTJ', false); - include 'admin_footer.php'; \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/admin_footer.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/admin_footer.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/admin_footer.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -1,6 +1,8 @@ <?php /** - * XoopsPoll module + * **************************************************************************** + * - 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 @@ -9,16 +11,16 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @package XoopsPoll - * @since 2.5.0 - * @author Mamba (www.xoops.org) - * @version $Id $ -**/ + * @license TDM GPL license + * @author TDM TEAM DEV MODULE + * @author Mamba (www.xoops.org) + * + * 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 smallsmall 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 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>"; xoops_cp_footer(); \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/admin_header.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/admin_header.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/admin_header.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -1,6 +1,8 @@ <?php /** - * Marquee module + * **************************************************************************** + * - 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 @@ -9,25 +11,24 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @package Marquee - * @since 2.5.0 - * @author XOOPS Module Team - * @version $Id $ -**/ + * @license TDM GPL license + * @author TDM TEAM DEV MODULE + * + * Version : 1.38 Thu 2012/04/12 14:04:25 : Timgno Exp $ + * **************************************************************************** + */ 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 '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; - } + 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; +} //load class $modulesHandler =& xoops_getModuleHandler('tdmcreate_modules', 'TDMCreate'); $tablesHandler =& xoops_getModuleHandler('tdmcreate_tables', 'TDMCreate'); @@ -53,11 +54,8 @@ include_once(XOOPS_ROOT_PATH."/class/template.php"); $xoopsTpl = new XoopsTpl(); } - $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")); Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -2,11 +2,8 @@ /** * **************************************************************************** * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS - * - Licence GPL Copyright (c) (http://www.tdmxoops.net) - * - Revision Copyright (c) (http://www.txmodxoops.org) + * - Licence GPL Copyright (c) (http://www.xoops.org) * - * This license contains restrictions!!! - * * 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,9 +13,8 @@ * * @license TDM GPL license * @author TDM TEAM DEV MODULE - * @author TXMod Xoops (in...@tx...) * - * Version : 1.39 Tue 2012/02/14 16:20:18 : Timgno Exp $ + * Version : 1.38 Thu 2012/04/12 14:04:25 : Timgno Exp $ * **************************************************************************** */ include 'admin_header.php'; @@ -41,7 +37,7 @@ $mods_display_admin = $mods->getVar('modules_display_admin'); $mods_display_user = $mods->getVar('modules_display_user'); //Remove the new module directory if it exists - //clearDir($modPath.'/modules/'.$modules_fname); + clearDir($modPath.'/modules/'.$modules_fname); //Nom des tables et combien de tables $criteria = new CriteriaCompo(); @@ -157,7 +153,7 @@ } //Include - const_include_jquery($mods, $mods_name); + const_js_jquery($mods, $mods_name); //Configs const_include_configs($mods, $mods_name, $mods_author_website_name, $mods_author_website_url); //Style Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/includes.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/includes.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/includes.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -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,6 +14,7 @@ * @license TDM GPL license * @author TDM TEAM DEV MODULE * + * Version : 1.38 Thu 2012/04/12 14:04:25 : Timgno Exp $ * **************************************************************************** */ include '../../../include/cp_header.php'; @@ -32,13 +31,13 @@ include_once $cPath.'/const_include_configs.php'; include_once $cPath.'/const_include_functions.php'; include_once $cPath.'/const_include_install.php'; -//include_once $cPath.'/const_include_style.php'; +include_once $cPath.'/const_css_style.php'; include_once $cPath.'/const_sql.php'; 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_class_menu.php'; +include_once $cPath.'/const_js_jquery.php'; include_once $cPath.'/const_admin_header.php'; include_once $cPath.'/const_admin_footer.php'; Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/menu.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/menu.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/menu.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -17,9 +17,7 @@ * @author TDM TEAM DEV MODULE * * **************************************************************************** - */ - - + */ $module_handler =& xoops_gethandler('module'); $xoopsModule =& XoopsModule::getByDirname('TDMCreate'); $moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_modules.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_modules.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_modules.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -108,11 +108,11 @@ $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)); - $modules_image = $this->getVar('modules_image') ? $this->getVar('modules_image') : 'blank.gif'; + $modules_image = $this->getVar('modules_image') ? $this->getVar('modules_image') : 'default_slogo.png'; $uploadirectory = "/modules/".$xoopsModule->dirname()."/images/uploads/modules"; $imgtray = new XoopsFormElementTray(_AM_TDMCREATE_MODULES_IMAGE,'<br />'); - $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, "./modules/".$xoopsModule->dirname()."/images/uploads/modules"); + $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, "./modules/".$xoopsModule->dirname()."/images/uploads/modules/"); $imageselect= new XoopsFormSelect($imgpath, 'modules_image', $modules_image); $modules_image_array = XoopsLists :: getImgListAsArray( XOOPS_ROOT_PATH.$uploadirectory ); foreach( $modules_image_array as $image ) { Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_about.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_about.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_about.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -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,6 +14,7 @@ * @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'; Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_footer.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_footer.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_footer.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -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,6 +14,7 @@ * @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'; @@ -23,8 +22,7 @@ function const_admin_footer($modules, $modules_name, $tables_arr) { - $language = '_AM_'.strtoupper($modules_name).'_'; - $language1 = '_MI_'.strtoupper($modules_name).'_ADMIN_'; + $language = '_AM_'.strtoupper($modules_name).'_'; $myts =& MyTextSanitizer::getInstance(); $file = "admin_footer.php"; $path_file = TDM_CREATE_MURL."/".$modules_name."/admin/".$file; @@ -34,13 +32,12 @@ 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 smallsmall italic pad5\'> +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>"; xoops_cp_footer(); '; - createFile($path_file, $text, _AM_TDMCREATE_CONST_OK_ADMINS, _AM_TDMCREATE_CONST_NOTOK_ADMINS, $file); -} +} \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_header.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_header.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_header.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -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,6 +14,7 @@ * @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'; @@ -23,48 +22,45 @@ function const_admin_header($modules, $modules_name, $tables_arr) { - global $tables_name; $language = '_AM_'.strtoupper($modules_name).'_'; - $language1 = '_MI_'.strtoupper($modules_name).'_ADMIN_'; $myts =& MyTextSanitizer::getInstance(); $file = "admin_header.php"; $path_file = TDM_CREATE_MURL."/".$modules_name."/admin/".$file; $en_tete = const_entete($modules, 0); - $text = '<?php'.$en_tete. -<<<'EOD' + $text = '<?php'.$en_tete.' +include_once dirname(dirname(dirname(dirname(__FILE__)))) . \'/mainfile.php\'; +include_once XOOPS_ROOT_PATH . \'/include/cp_functions.php\'; +include_once \'../include/config.php\'; +include_once \'../include/functions.php\'; -include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; -include_once XOOPS_ROOT_PATH . '/include/cp_functions.php'; -include_once '../include/functions.php'; +$pathDir = $GLOBALS[\'xoops\']->path(\'/Frameworks/moduleclasses/moduleadmin\'); +$globlang = $GLOBALS[\'xoopsConfig\'][\'language\']; -$pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin'); -$globlang = $GLOBALS['xoopsConfig']['language']; - -if ( file_exists($pathDir.'/language/'.$globlang.'/main.php')){ - include_once $pathDir.'/language/'.$globlang.'/main.php'; +if ( file_exists($pathDir.\'/language/\'.$globlang.\'/main.php\')){ + include_once $pathDir.\'/language/\'.$globlang.\'/main.php\'; } else { - include_once $pathDir.'/language/english/main.php'; + include_once $pathDir.\'/language/english/main.php\'; } -if ( file_exists($pathDir.'/moduleadmin.php')){ - include_once $pathDir.'/moduleadmin.php'; +if ( file_exists($pathDir.\'/moduleadmin.php\')){ + include_once $pathDir.\'/moduleadmin.php\'; //return true; }else{ xoops_cp_header(); - echo xoops_error(_AM_ERROR_NOFRAMEWORKS); + echo xoops_error('.$language.'NOFRAMEWORKS); xoops_cp_footer(); //return false; } $dirname = basename(dirname(dirname( __FILE__ ) )); -$module_handler =& xoops_gethandler('module'); +$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'); +$moduleInfo =& $module_handler->get($xoopsModule->getVar(\'mid\')); +$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo(\'icons16\'); +$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo(\'icons32\'); -EOD; +'; foreach (array_keys($tables_arr) as $i) { Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_help.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_help.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_help.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -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,6 +14,7 @@ * @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'; @@ -38,11 +37,9 @@ $xoopsTpl->display("db: admin/" . $xoopsModule->getVar("dirname") . "_admin_help.html"); include "footer.php"; -?>'; - +?>'; createFile($path_file, $text, _AM_TDMCREATE_CONST_OK_ADMINS, _AM_TDMCREATE_CONST_NOTOK_ADMINS, $file); } - -?> +?> \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_index.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_index.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_index.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -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,6 +14,7 @@ * @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'; @@ -24,8 +23,7 @@ function const_admin_index($modules, $modules_name, $tables_arr) { $language = '_AM_'.strtoupper($modules_name).'_'; - $language1 = '_AM_'.strtoupper($modules_name).'_ADMIN_'; - $language2 = '_AM_'.strtoupper($modules_name).'_THEREARE_'; + $language1 = '_AM_'.strtoupper($modules_name).'_THEREARE_'; $myts =& MyTextSanitizer::getInstance(); $file = "index.php"; $path_file = TDM_CREATE_MURL."/".$modules_name."/admin/".$file; @@ -34,40 +32,42 @@ $text = '<?php'.$en_tete.' include "admin_header.php"; xoops_cp_header(); - $indexAdmin = new ModuleAdmin(); '; foreach (array_keys($tables_arr) as $i) { + $t_name = $tables_arr[$i]->getVar("tables_name"); $text .= ' //count "total" - $count_'.$tables_arr[$i]->getVar("tables_name").' = $'.$tables_arr[$i]->getVar("tables_name").'Handler->getCount(); + $count_'.$t_name.' = $'.$t_name.'Handler->getCount(); //count "online" $criteria = new CriteriaCompo(); - $criteria->add(new Criteria("'.$tables_arr[$i]->getVar("tables_name").'_online", 1)); - $'.$tables_arr[$i]->getVar("tables_name").'_online = $'.$tables_arr[$i]->getVar("tables_name").'Handler->getCount($criteria); - $criteria->add(new Criteria("'.$tables_arr[$i]->getVar("tables_name").'_pending", 1)); - $'.$tables_arr[$i]->getVar("tables_name").'_pending = $'.$tables_arr[$i]->getVar("tables_name").'Handler->getCount($criteria); + $criteria->add(new Criteria("'.$t_name.'_online", 1)); + $'.$t_name.'_online = $'.$t_name.'Handler->getCount($criteria); + $criteria->add(new Criteria("'.$t_name.'_pending", 1)); + $'.$t_name.'_pending = $'.$t_name.'Handler->getCount($criteria); '; } - + $text .= ' + + '; foreach (array_keys($tables_arr) as $i) { + $t_name = $tables_arr[$i]->getVar("tables_name"); $text .= ' - $indexAdmin->addInfoBox('.$language.strtoupper($tables_arr[$i]->getVar("tables_name")).'); - $indexAdmin->addInfoBoxLine('.$language.strtoupper($tables_arr[$i]->getVar("tables_name")).','.$language2.strtoupper($tables_arr[$i]->getVar("tables_name")).', $count_'.$tables_arr[$i]->getVar("tables_name").'); - $indexAdmin->addInfoBoxLine('.$language.strtoupper($tables_arr[$i]->getVar("tables_name")).','.$language2.strtoupper($tables_arr[$i]->getVar("tables_name")).'_ONLINE, $'.$tables_arr[$i]->getVar("tables_name").'_online); - $indexAdmin->addInfoBoxLine('.$language.strtoupper($tables_arr[$i]->getVar("tables_name")).','.$language2.strtoupper($tables_arr[$i]->getVar("tables_name")).'_PENDING, $'.$tables_arr[$i]->getVar("tables_name").'_pending); + $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, ); '; } $text .= ' echo $indexAdmin->addNavigation("index.php") ; echo $indexAdmin->renderIndex(); - include "admin_footer.php"; ?>'; createFile($path_file, $text, _AM_TDMCREATE_CONST_OK_ADMINS, _AM_TDMCREATE_CONST_NOTOK_ADMINS, $file); } -?> +?> \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_language.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_language.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_language.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -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,6 +14,7 @@ * @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'; @@ -48,7 +47,6 @@ 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.'"); - '; } $text .= ' @@ -101,7 +99,7 @@ foreach (array_keys($tables_arr) as $i) { $language1 = $language.strtoupper($tables_arr[$i]->getVar("tables_name")).'_'; -$text .= ' + $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"); @@ -113,7 +111,7 @@ define("'.$language.'PERMISSIONS_VIEW","Permissions to view"); define("'.$language.'PERMISSIONS_SUBMIT","Permissions to submit"); //Error NoFrameworks -define("_AM_ERROR_NOFRAMEWORKS","Error: You don't use the Frameworks \"admin module\". Please install this Frameworks"); +define("'.$language.'NOFRAMEWORKS","Error: You don't use the Frameworks \"admin module\". Please install this Frameworks"); define("'.$language.'MAINTAINEDBY", "is maintained by the"); ?>'; createFile($path_file, $text, Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_menu.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_menu.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_menu.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -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,6 +14,7 @@ * @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'; @@ -23,8 +22,7 @@ function const_admin_menu($modules, $modules_name, $tables_arr, $topic) { - global $xoopsModule, $xoopsConfig; - + global $xoopsModule, $xoopsConfig; $language = '_MI_'.strtoupper($modules_name).'_ADMENU'; $file = "menu.php"; $path_file = TDM_CREATE_MURL."/".$modules_name."/admin/".$file; Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_pages.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_pages.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_pages.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -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,6 +14,7 @@ * @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'; @@ -85,6 +84,7 @@ $criteria->setLimit($limit); $'.$tables_name.'_arr = $'.$tables_name.'Handler->getall($criteria); if ( $numrows > $limit ) { + include_once XOOPS_ROOT_PATH . "/class/pagenav.php"; $pagenav = new XoopsPageNav($numrows, $limit, $start, \'start\', \'op=list\'); $pagenav = $pagenav->renderNav(4); } else { Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_permissions.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_permissions.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_permissions.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -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,6 +14,7 @@ * @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'; @@ -23,7 +22,6 @@ function const_admin_permissions($modules, $modules_name, $tables_arr) { - $language_manager = '_AM_'.strtoupper($modules_name).'_ADMIN_'; $language = '_AM_'.strtoupper($modules_name).'_PERMISSIONS_'; $myts =& MyTextSanitizer::getInstance(); $file = "permissions.php"; @@ -41,15 +39,12 @@ } xoops_cp_header(); +$permissions_admin = new ModuleAdmin(); +echo $permissions_admin->addNavigation("permissions.php"); - $permissions_admin = new ModuleAdmin(); - echo $permissions_admin->addNavigation("permissions.php"); - -global $xoopsDB; - - $permtoset= isset($_POST["permtoset"]) ? intval($_POST["permtoset"]) : 1; - $selected=array("","",""); - $selected[$permtoset-1]=" selected"; +$permtoset= isset($_POST["permtoset"]) ? intval($_POST["permtoset"]) : 1; +$selected=array("","",""); +$selected[$permtoset-1]=" selected"; echo " <form method=\"post\" name=\"fselperm\" action=\"permissions.php\"> @@ -58,6 +53,7 @@ <td> <select name=\"permtoset\" onChange=\"javascript: document.fselperm.submit()\"> <option value=\"1\"".$selected[0].">".'.$language.'ACCESS."</option> + <option value=\"2\"".$selected[1].">".'.$language.'VIEW."</option> <option value=\"2\"".$selected[1].">".'.$language.'SUBMIT."</option> </select> </td> @@ -66,39 +62,41 @@ </form>"; $module_id = $xoopsModule->getVar("mid"); +switch($permtoset) +{ + case 1: + $title_of_form = '.$language.'ACCESS; + $perm_name = "'.$modules_name.'_access"; + $perm_desc = ""; + break; + case 2: + $title_of_form = '.$language.'VIEW; + $perm_name = "'.$modules_name.'_view"; + $perm_desc = ""; + break; + case 3: + $title_of_form = '.$language.'SUBMIT; + $perm_name = "'.$modules_name.'_submit"; + $perm_desc = ""; + break; +} - switch($permtoset) - { - case 1: - $title_of_form = '.$language.'ACCESS; - $perm_name = "'.$modules_name.'_access"; - $perm_desc = ""; - break; - case 2: - $title_of_form = '.$language.'SUBMIT; - $perm_name = "'.$modules_name.'_submit"; - $perm_desc = ""; - break; - } - - $permform = new XoopsGroupPermForm($title_of_form, $module_id, $perm_name, $perm_desc, "admin/permissions.php"); - $xt = new XoopsTopic( $xoopsDB -> prefix("'.$modules_name.'_topic") ); - $alltopics =& $xt->getTopicsList(); - - foreach ($alltopics as $topic_id => $topic) - { - $permform->addItem($topic_id, $topic["title"], $topic["pid"]); - } - echo $permform->render(); - echo "<br /><br /><br /><br />\n"; - unset ($permform); +$permform = new XoopsGroupPermForm($title_of_form, $module_id, $perm_name, $perm_desc, "admin/permissions.php"); +$xt = new XoopsTopic( $GLOBALS[\'xoopsDB\'] -> prefix("'.$modules_name.'_topic") ); +$alltopics =& $xt->getTopicsList(); +foreach ($alltopics as $topic_id => $topic) +{ + $permform->addItem($topic_id, $topic["title"], $topic["pid"]); +} +echo $permform->render(); +echo "<br /><br /><br /><br />\n"; +unset ($permform); + include("admin_footer.php"); -?>'; - +?>'; createFile($path_file, $text, _AM_TDMCREATE_CONST_OK_ADMINS, _AM_TDMCREATE_CONST_NOTOK_ADMINS, $file); } - -?> +?> \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_architecture.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_architecture.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_architecture.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -2,11 +2,8 @@ /** * **************************************************************************** * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS - * - Licence GPL Copyright (c) (http://www.tdmxoops.net) - * - Revision Copyright (c) (http://www.txmodxoops.org) + * - Licence GPL Copyright (c) (http://www.xoops.org) * - * This license contains restrictions!!! - * * 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,9 +13,8 @@ * * @license TDM GPL license * @author TDM TEAM DEV MODULE - * @author TXMod Xoops (in...@tx...) * - * Version : 1.37 Mon 2011/08/12 19:22:12 : Timgno Exp $ + * Version : 1.38 Thu 2012/04/12 14:04:25 : Timgno Exp $ * **************************************************************************** */ include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/class/constArchitecture.php'; @@ -52,7 +48,9 @@ // Creation of "css" folder and index.html file echo $css_index = $classArch->makeDirAndCopyFile('css', $indexFile, 'index.html'); // Creation of "images" folder and index.html file - echo $images_index = $classArch->makeDirAndCopyFile('images', $indexFile, 'index.html'); + echo $images_index = $classArch->makeDirAndCopyFile('images', $indexFile, 'index.html'); + // Creation of "js" folder and index.html file + echo $images_index = $classArch->makeDirAndCopyFile('js', $indexFile, 'index.html'); //Copy the logo of the module echo $logo_image = $classArch->CopyFile('images', $fimages."/uploads/modules/".$modules_image, $modules_image); // Creation of "images/menu" folder and index.html file Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_blocks.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_blocks.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_blocks.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -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,6 +14,7 @@ * @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'; @@ -50,35 +49,34 @@ '; if ( $topic == 1 ) { $text .= 'if (!(count($options) == 1 && $options[0] == 0)) { -$criteria->add(new Criteria("'.$tables_name.'_topic", block_addCatSelect($options),"IN")); +$criteria->add(new Criteria("'.$tables_name.'_topic", '.$modules_name.'_block_addCatSelect($options),"IN")); } '; } $text .= ' switch ($type_block) { - // pour le bloc: '.$tables_name.' recents + // For the block: '.$tables_name.' recents case "recent": $criteria->add(new Criteria("'.$tables_name.'_online", 1)); - $criteria->setSort("'.$tables_name.'_date_created"); + $criteria->setSort("'.$tables_name.'_created"); $criteria->setOrder("DESC"); break; - // pour le bloc: '.$tables_name.' du jour + // For the block: '.$tables_name.' of today case "day": $criteria->add(new Criteria("'.$tables_name.'_online", 1)); - $criteria->add(new Criteria("'.$tables_name.'_date_created", strtotime(date("Y/m/d")), ">=")); - $criteria->add(new Criteria("'.$tables_name.'_date_created", strtotime(date("Y/m/d"))+86400, "<=")); - $criteria->setSort("'.$tables_name.'_date_created"); + $criteria->add(new Criteria("'.$tables_name.'_created", strtotime(date("Y/m/d")), ">=")); + $criteria->add(new Criteria("'.$tables_name.'_created", strtotime(date("Y/m/d"))+86400, "<=")); + $criteria->setSort("'.$tables_name.'_created"); $criteria->setOrder("ASC"); break; - // pour le bloc: '.$tables_name.' aléatoires + // For the block: '.$tables_name.' random case "random": $criteria->add(new Criteria("'.$tables_name.'_online", 1)); $criteria->setSort("RAND()"); break; } - $criteria->setLimit($nb_'.$tables_name.'); $'.$tables_name.'_arr = $'.$tables_name.'Handler->getall($criteria);'; @@ -144,13 +142,10 @@ $form .= "</select>"; return $form; -} - +} ?>'; - createFile($path_file, $text, _AM_TDMCREATE_CONST_OK_BLOCKS, _AM_TDMCREATE_CONST_NOTOK_BLOCKS, $file); } - -?> +?> \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_blocks_language.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_blocks_language.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_blocks_language.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -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,6 +14,7 @@ * @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'; @@ -33,7 +32,6 @@ $text = '<?php'.$en_tete.' '; - foreach (array_keys($tables_arr) as $i) { //Champs @@ -43,10 +41,10 @@ $tables_blocks = $tables_arr[$i]->getVar('tables_blocs'); $language1 = $language.strtoupper($tables_arr[$i]->getVar("tables_name")).'_'; if ( $tables_blocks == 1 ) { - $text .= 'define("'.$language1.'DISPLAY","Afficher"); -define("'.$language1.'TITLELENGTH","Longueur du titre"); -define("'.$language1.'CATTODISPLAY","Sélectionner les catégories à affichées"); -define("'.$language1.'ALLCAT","Toutes les catégories"); + $text .= 'define("'.$language1.'DISPLAY","Display"); +define("'.$language1.'TITLELENGTH","Leinght of title"); +define("'.$language1.'CATTODISPLAY","Select the categories to display"); +define("'.$language1.'ALLCAT","All categories"); '; } @@ -66,12 +64,9 @@ } $text .= ' - -?>'; - +?>'; createFile($path_file, $text, _AM_TDMCREATE_CONST_OK_LANGUAGES, _AM_TDMCREATE_CONST_NOTOK_LANGUAGES, $file); } - -?> +?> \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_blocks_templates.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_blocks_templates.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_blocks_templates.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -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,6 +14,7 @@ * @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'; Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_changelog.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_changelog.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_changelog.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -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,6 +14,7 @@ * @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/class/tdmcreate_modules.php'; Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_class.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_class.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_class.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -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,6 +14,7 @@ * @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'; @@ -95,11 +94,9 @@ $form = new XoopsThemeForm($title, "form", $action, "post", true); $form->setExtra(\'enctype="multipart/form-data"\'); - '; + '; + $text .= $form.' - $text .= ''.$form.''; - - $text .= ' $form->addElement(new XoopsFormHidden("op", "save_'.$tables_name.'")); $form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit")); return $form; Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_css_admin.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_css_admin.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_css_admin.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -225,10 +225,8 @@ .txtchangelog { height:350px; overflow:auto;} '; - createFile($path_file, $text, _AM_TDMCREATE_CONST_OK_CSS, _AM_TDMCREATE_CONST_NOTOK_CSS, $file); } - -?> +?> \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_css_style.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_css_style.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_css_style.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -23,7 +23,6 @@ */ include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_header.php'; include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php'; - function const_css_style($modules, $modules_name) { $file = "style.css"; @@ -31,9 +30,17 @@ $on_header_coms = const_header($modules, 0); $text = '@charset "UTF-8";'. $on_header_coms.' + +.box-header { + margin: 2px; + padding: 5px; + background-color: #ccc; + width: 100%; + height: 50px; +} '; createFile($path_file, $text, _AM_TDMCREATE_CONST_OK_CSS, _AM_TDMCREATE_CONST_NOTOK_CSS, $file); } -?> +?> \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_entete.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_entete.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_entete.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -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,8 +12,9 @@ * 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 $ * **************************************************************************** */ function const_entete($modules) Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_help_language.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_help_language.php 2012-04-11 23:28:49 UTC (rev 9304) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_help_language.php 2012-04-12 15:00:52 UTC (rev 9305) @@ -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,6 +14,7 @@ * @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'; @@ -48,17 +47,15 @@ No special... [truncated message content] |
From: <txm...@us...> - 2012-04-12 18:30:17
|
Revision: 9310 http://xoops.svn.sourceforge.net/xoops/?rev=9310&view=rev Author: txmodxoops Date: 2012-04-12 18:30:10 +0000 (Thu, 12 Apr 2012) Log Message: ----------- Fixed all bugs Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/includes.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/modules.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_header.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_modinfo_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_user_index.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions.php Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-12 17:34:05 UTC (rev 9309) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-12 18:30:10 UTC (rev 9310) @@ -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/branches/timgno/modules/TDMCreate/admin/includes.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/includes.php 2012-04-12 17:34:05 UTC (rev 9309) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/includes.php 2012-04-12 18:30:10 UTC (rev 9310) @@ -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/branches/timgno/modules/TDMCreate/admin/modules.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/modules.php 2012-04-12 17:34:05 UTC (rev 9309) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/modules.php 2012-04-12 18:30:10 UTC (rev 9310) @@ -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/branches/timgno/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-04-12 17:34:05 UTC (rev 9309) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-04-12 18:30:10 UTC (rev 9310) @@ -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/branches/timgno/modules/TDMCreate/const/const_admin_header.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_header.php 2012-04-12 17:34:05 UTC (rev 9309) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_header.php 2012-04-12 18:30:10 UTC (rev 9310) @@ -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/branches/timgno/modules/TDMCreate/const/const_modinfo_language.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_modinfo_language.php 2012-04-12 17:34:05 UTC (rev 9309) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_modinfo_language.php 2012-04-12 18:30:10 UTC (rev 9310) @@ -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/branches/timgno/modules/TDMCreate/const/const_user_index.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_user_index.php 2012-04-12 17:34:05 UTC (rev 9309) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_user_index.php 2012-04-12 18:30:10 UTC (rev 9310) @@ -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/branches/timgno/modules/TDMCreate/include/functions.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions.php 2012-04-12 17:34:05 UTC (rev 9309) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions.php 2012-04-12 18:30:10 UTC (rev 9310) @@ -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:07:37
|
Revision: 9313 http://xoops.svn.sourceforge.net/xoops/?rev=9313&view=rev Author: txmodxoops Date: 2012-04-13 10:07:27 +0000 (Fri, 13 Apr 2012) Log Message: ----------- Fixed all bugs Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_coms.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_user_pages.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions_const.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/admin.php Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-12 21:25:34 UTC (rev 9312) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-13 10:07:27 UTC (rev 9313) @@ -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/branches/timgno/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-04-12 21:25:34 UTC (rev 9312) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-04-13 10:07:27 UTC (rev 9313) @@ -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/branches/timgno/modules/TDMCreate/const/const_include_coms.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_coms.php 2012-04-12 21:25:34 UTC (rev 9312) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_coms.php 2012-04-13 10:07:27 UTC (rev 9313) @@ -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/branches/timgno/modules/TDMCreate/const/const_user_pages.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_user_pages.php 2012-04-12 21:25:34 UTC (rev 9312) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_user_pages.php 2012-04-13 10:07:27 UTC (rev 9313) @@ -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/branches/timgno/modules/TDMCreate/include/functions_const.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions_const.php 2012-04-12 21:25:34 UTC (rev 9312) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions_const.php 2012-04-13 10:07:27 UTC (rev 9313) @@ -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/branches/timgno/modules/TDMCreate/language/english/admin.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/admin.php 2012-04-12 21:25:34 UTC (rev 9312) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/admin.php 2012-04-13 10:07:27 UTC (rev 9313) @@ -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:54
|
Revision: 9317 http://xoops.svn.sourceforge.net/xoops/?rev=9317&view=rev Author: txmodxoops Date: 2012-04-13 14:29:43 +0000 (Fri, 13 Apr 2012) Log Message: ----------- Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_index.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_pages.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_configs.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_modinfo_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_user_pages.php Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-13 14:28:56 UTC (rev 9316) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-13 14:29:43 UTC (rev 9317) @@ -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/branches/timgno/modules/TDMCreate/const/const_admin_index.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_index.php 2012-04-13 14:28:56 UTC (rev 9316) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_index.php 2012-04-13 14:29:43 UTC (rev 9317) @@ -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/branches/timgno/modules/TDMCreate/const/const_admin_language.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_language.php 2012-04-13 14:28:56 UTC (rev 9316) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_language.php 2012-04-13 14:29:43 UTC (rev 9317) @@ -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/branches/timgno/modules/TDMCreate/const/const_admin_pages.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_pages.php 2012-04-13 14:28:56 UTC (rev 9316) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_pages.php 2012-04-13 14:29:43 UTC (rev 9317) @@ -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/branches/timgno/modules/TDMCreate/const/const_include_configs.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_configs.php 2012-04-13 14:28:56 UTC (rev 9316) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_configs.php 2012-04-13 14:29:43 UTC (rev 9317) @@ -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/branches/timgno/modules/TDMCreate/const/const_modinfo_language.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_modinfo_language.php 2012-04-13 14:28:56 UTC (rev 9316) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_modinfo_language.php 2012-04-13 14:29:43 UTC (rev 9317) @@ -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/branches/timgno/modules/TDMCreate/const/const_user_pages.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_user_pages.php 2012-04-13 14:28:56 UTC (rev 9316) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_user_pages.php 2012-04-13 14:29:43 UTC (rev 9317) @@ -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:27:17
|
Revision: 9333 http://xoops.svn.sourceforge.net/xoops/?rev=9333&view=rev Author: txmodxoops Date: 2012-04-15 15:27:10 +0000 (Sun, 15 Apr 2012) Log Message: ----------- Updated and fixed Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_header.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_pages.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_class.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_header.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_configs.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_functions.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates_header.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates_pages.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_user_pages.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_xoopsversion.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions_const.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/admin.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/admin.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/sql/mysql.sql Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-15 15:26:28 UTC (rev 9332) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-15 15:27:10 UTC (rev 9333) @@ -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/branches/timgno/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-04-15 15:26:28 UTC (rev 9332) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-04-15 15:27:10 UTC (rev 9333) @@ -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/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php 2012-04-15 15:26:28 UTC (rev 9332) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php 2012-04-15 15:27:10 UTC (rev 9333) @@ -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/branches/timgno/modules/TDMCreate/const/const_admin_header.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_header.php 2012-04-15 15:26:28 UTC (rev 9332) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_header.php 2012-04-15 15:27:10 UTC (rev 9333) @@ -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/branches/timgno/modules/TDMCreate/const/const_admin_pages.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_pages.php 2012-04-15 15:26:28 UTC (rev 9332) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_pages.php 2012-04-15 15:27:10 UTC (rev 9333) @@ -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/branches/timgno/modules/TDMCreate/const/const_class.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_class.php 2012-04-15 15:26:28 UTC (rev 9332) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_class.php 2012-04-15 15:27:10 UTC (rev 9333) @@ -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/branches/timgno/modules/TDMCreate/const/const_header.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_header.php 2012-04-15 15:26:28 UTC (rev 9332) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_header.php 2012-04-15 15:27:10 UTC (rev 9333) @@ -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/branches/timgno/modules/TDMCreate/const/const_include_configs.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_configs.php 2012-04-15 15:26:28 UTC (rev 9332) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_configs.php 2012-04-15 15:27:10 UTC (rev 9333) @@ -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/branches/timgno/modules/TDMCreate/const/const_include_functions.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_functions.php 2012-04-15 15:26:28 UTC (rev 9332) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_functions.php 2012-04-15 15:27:10 UTC (rev 9333) @@ -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/branches/timgno/modules/TDMCreate/const/const_templates_header.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates_header.php 2012-04-15 15:26:28 UTC (rev 9332) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates_header.php 2012-04-15 15:27:10 UTC (rev 9333) @@ -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/branches/timgno/modules/TDMCreate/const/const_templates_pages.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates_pages.php 2012-04-15 15:26:28 UTC (rev 9332) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates_pages.php 2012-04-15 15:27:10 UTC (rev 9333) @@ -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/branches/timgno/modules/TDMCreate/const/const_user_pages.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_user_pages.php 2012-04-15 15:26:28 UTC (rev 9332) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_user_pages.php 2012-04-15 15:27:10 UTC (rev 9333) @@ -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/branches/timgno/modules/TDMCreate/const/const_xoopsversion.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_xoopsversion.php 2012-04-15 15:26:28 UTC (rev 9332) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_xoopsversion.php 2012-04-15 15:27:10 UTC (rev 9333) @@ -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/branches/timgno/modules/TDMCreate/include/functions_const.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions_const.php 2012-04-15 15:26:28 UTC (rev 9332) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions_const.php 2012-04-15 15:27:10 UTC (rev 9333) @@ -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/branches/timgno/modules/TDMCreate/language/english/admin.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/admin.php 2012-04-15 15:26:28 UTC (rev 9332) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/admin.php 2012-04-15 15:27:10 UTC (rev 9333) @@ -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/branches/timgno/modules/TDMCreate/language/italian/admin.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/admin.php 2012-04-15 15:26:28 UTC (rev 9332) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/admin.php 2012-04-15 15:27:10 UTC (rev 9333) @@ -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/branches/timgno/modules/TDMCreate/sql/mysql.sql =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/sql/mysql.sql 2012-04-15 15:26:28 UTC (rev 9332) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/sql/mysql.sql 2012-04-15 15:27:10 UTC (rev 9333) @@ -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:55:10
|
Revision: 9335 http://xoops.svn.sourceforge.net/xoops/?rev=9335&view=rev Author: txmodxoops Date: 2012-04-15 16:55:04 +0000 (Sun, 15 Apr 2012) Log Message: ----------- Updated Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions_const.php Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-04-15 16:54:23 UTC (rev 9334) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-04-15 16:55:04 UTC (rev 9335) @@ -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/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php 2012-04-15 16:54:23 UTC (rev 9334) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php 2012-04-15 16:55:04 UTC (rev 9335) @@ -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/branches/timgno/modules/TDMCreate/include/functions_const.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions_const.php 2012-04-15 16:54:23 UTC (rev 9334) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions_const.php 2012-04-15 16:55:04 UTC (rev 9335) @@ -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:28:50
|
Revision: 9336 http://xoops.svn.sourceforge.net/xoops/?rev=9336&view=rev Author: txmodxoops Date: 2012-04-15 19:28:43 +0000 (Sun, 15 Apr 2012) Log Message: ----------- Updated for admin language now work Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions_const.php Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-04-15 16:55:04 UTC (rev 9335) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-04-15 19:28:43 UTC (rev 9336) @@ -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/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php 2012-04-15 16:55:04 UTC (rev 9335) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php 2012-04-15 19:28:43 UTC (rev 9336) @@ -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/branches/timgno/modules/TDMCreate/const/const_admin_language.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_language.php 2012-04-15 16:55:04 UTC (rev 9335) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_language.php 2012-04-15 19:28:43 UTC (rev 9336) @@ -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/branches/timgno/modules/TDMCreate/include/functions_const.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions_const.php 2012-04-15 16:55:04 UTC (rev 9335) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions_const.php 2012-04-15 19:28:43 UTC (rev 9336) @@ -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 14:58:25
|
Revision: 9361 http://xoops.svn.sourceforge.net/xoops/?rev=9361&view=rev Author: txmodxoops Date: 2012-04-17 14:58:13 +0000 (Tue, 17 Apr 2012) Log Message: ----------- Updated solved language bugs Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/includes.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_pages.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_architecture.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_class.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_modinfo_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_xoopsversion.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions_const.php Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-17 14:57:39 UTC (rev 9360) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-17 14:58:13 UTC (rev 9361) @@ -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/branches/timgno/modules/TDMCreate/admin/includes.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/includes.php 2012-04-17 14:57:39 UTC (rev 9360) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/includes.php 2012-04-17 14:58:13 UTC (rev 9361) @@ -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/branches/timgno/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-04-17 14:57:39 UTC (rev 9360) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-04-17 14:58:13 UTC (rev 9361) @@ -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/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php 2012-04-17 14:57:39 UTC (rev 9360) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php 2012-04-17 14:58:13 UTC (rev 9361) @@ -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/branches/timgno/modules/TDMCreate/const/const_admin_language.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_language.php 2012-04-17 14:57:39 UTC (rev 9360) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_language.php 2012-04-17 14:58:13 UTC (rev 9361) @@ -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/branches/timgno/modules/TDMCreate/const/const_admin_pages.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_pages.php 2012-04-17 14:57:39 UTC (rev 9360) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_pages.php 2012-04-17 14:58:13 UTC (rev 9361) @@ -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,10 @@ } 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 +344,9 @@ redirect_header("'.$tables_name.'.php", 3, '.$language.'_FORMOK); } echo $obj->getHtmlErrors(); - break; + break;'; + } + $text .= ' } include "admin_footer.php"; ?>'; Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_architecture.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_architecture.php 2012-04-17 14:57:39 UTC (rev 9360) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_architecture.php 2012-04-17 14:58:13 UTC (rev 9361) @@ -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/branches/timgno/modules/TDMCreate/const/const_class.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_class.php 2012-04-17 14:57:39 UTC (rev 9360) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_class.php 2012-04-17 14:58:13 UTC (rev 9361) @@ -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/branches/timgno/modules/TDMCreate/const/const_modinfo_language.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_modinfo_language.php 2012-04-17 14:57:39 UTC (rev 9360) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_modinfo_language.php 2012-04-17 14:58:13 UTC (rev 9361) @@ -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/branches/timgno/modules/TDMCreate/const/const_xoopsversion.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_xoopsversion.php 2012-04-17 14:57:39 UTC (rev 9360) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_xoopsversion.php 2012-04-17 14:58:13 UTC (rev 9361) @@ -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/branches/timgno/modules/TDMCreate/include/functions_const.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions_const.php 2012-04-17 14:57:39 UTC (rev 9360) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/functions_const.php 2012-04-17 14:58:13 UTC (rev 9361) @@ -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:58:36
|
Revision: 9372 http://xoops.svn.sourceforge.net/xoops/?rev=9372&view=rev Author: txmodxoops Date: 2012-04-22 18:58:29 +0000 (Sun, 22 Apr 2012) Log Message: ----------- Updated Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/index.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_modules.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_pages.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_xoopsversion.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/admin.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/admin.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/update language 1.37 to 1.38.txt XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/sql/mysql.sql Property Changed: ---------------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include/ Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-22 18:56:55 UTC (rev 9371) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-22 18:58:29 UTC (rev 9372) @@ -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/branches/timgno/modules/TDMCreate/admin/index.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/index.php 2012-04-22 18:56:55 UTC (rev 9371) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/index.php 2012-04-22 18:58:29 UTC (rev 9372) @@ -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/branches/timgno/modules/TDMCreate/class/tdmcreate_modules.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_modules.php 2012-04-22 18:56:55 UTC (rev 9371) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_modules.php 2012-04-22 18:58:29 UTC (rev 9372) @@ -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/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php 2012-04-22 18:56:55 UTC (rev 9371) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php 2012-04-22 18:58:29 UTC (rev 9372) @@ -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/branches/timgno/modules/TDMCreate/const/const_admin_pages.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_pages.php 2012-04-22 18:56:55 UTC (rev 9371) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_pages.php 2012-04-22 18:58:29 UTC (rev 9372) @@ -332,9 +332,8 @@ 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;'; - if ( $online == 'online') - { - $text .= ' + if ( $online == 'online'){ + $text .= ' case "update_online_'.$tables_name.'": if (isset($_REQUEST["'.$champs_id.'"])) { $obj =& $'.$tables_name.'Handler->get($_REQUEST["'.$champs_id.'"]); Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_xoopsversion.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_xoopsversion.php 2012-04-22 18:56:55 UTC (rev 9371) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_xoopsversion.php 2012-04-22 18:58:29 UTC (rev 9372) @@ -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; Property changes on: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/include ___________________________________________________________________ Added: svn:ignore + comment_delete.php comment_edit.php comment_new.php comment_post.php comment_reply.php Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/admin.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/admin.php 2012-04-22 18:56:55 UTC (rev 9371) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/admin.php 2012-04-22 18:58:29 UTC (rev 9372) @@ -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/branches/timgno/modules/TDMCreate/language/italian/admin.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/admin.php 2012-04-22 18:56:55 UTC (rev 9371) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/admin.php 2012-04-22 18:58:29 UTC (rev 9372) @@ -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/branches/timgno/modules/TDMCreate/language/update language 1.37 to 1.38.txt =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/update language 1.37 to 1.38.txt 2012-04-22 18:56:55 UTC (rev 9371) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/update language 1.37 to 1.38.txt 2012-04-22 18:58:29 UTC (rev 9372) @@ -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/branches/timgno/modules/TDMCreate/sql/mysql.sql =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/sql/mysql.sql 2012-04-22 18:56:55 UTC (rev 9371) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/sql/mysql.sql 2012-04-22 18:58:29 UTC (rev 9372) @@ -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:42:41
|
Revision: 9387 http://xoops.svn.sourceforge.net/xoops/?rev=9387&view=rev Author: txmodxoops Date: 2012-04-27 13:42:32 +0000 (Fri, 27 Apr 2012) Log Message: ----------- Updated Added jquery ui controls added js file Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/admin_header.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/modules.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php Added Paths: ----------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/js/ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/js/index.html XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/js/jqinit.js Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/admin_header.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/admin_header.php 2012-04-27 13:41:09 UTC (rev 9386) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/admin_header.php 2012-04-27 13:42:32 UTC (rev 9387) @@ -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/branches/timgno/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-27 13:41:09 UTC (rev 9386) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-27 13:42:32 UTC (rev 9387) @@ -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/branches/timgno/modules/TDMCreate/admin/modules.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/modules.php 2012-04-27 13:41:09 UTC (rev 9386) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/modules.php 2012-04-27 13:42:32 UTC (rev 9387) @@ -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/branches/timgno/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-04-27 13:41:09 UTC (rev 9386) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-04-27 13:42:32 UTC (rev 9387) @@ -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/branches/timgno/modules/TDMCreate/js/index.html =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/js/index.html (rev 0) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/js/index.html 2012-04-27 13:42:32 UTC (rev 9387) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/js/jqinit.js =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/js/jqinit.js (rev 0) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/js/jqinit.js 2012-04-27 13:42:32 UTC (rev 9387) @@ -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:32:44
|
Revision: 9414 http://xoops.svn.sourceforge.net/xoops/?rev=9414&view=rev Author: txmodxoops Date: 2012-04-30 13:32:38 +0000 (Mon, 30 Apr 2012) Log Message: ----------- Added pagenav Redirect if there aren't modules Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/modules.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/admin.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/admin.php Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-30 11:26:06 UTC (rev 9413) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-30 13:32:38 UTC (rev 9414) @@ -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/branches/timgno/modules/TDMCreate/admin/modules.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/modules.php 2012-04-30 11:26:06 UTC (rev 9413) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/modules.php 2012-04-30 13:32:38 UTC (rev 9414) @@ -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/branches/timgno/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-04-30 11:26:06 UTC (rev 9413) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-04-30 13:32:38 UTC (rev 9414) @@ -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/branches/timgno/modules/TDMCreate/language/english/admin.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/admin.php 2012-04-30 11:26:06 UTC (rev 9413) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/admin.php 2012-04-30 13:32:38 UTC (rev 9414) @@ -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/branches/timgno/modules/TDMCreate/language/italian/admin.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/admin.php 2012-04-30 11:26:06 UTC (rev 9413) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/admin.php 2012-04-30 13:32:38 UTC (rev 9414) @@ -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. |