|
From: <txm...@us...> - 2014-06-23 23:53:21
|
Revision: 12637
http://sourceforge.net/p/xoops/svn/12637
Author: txmodxoops
Date: 2014-06-23 23:53:16 +0000 (Mon, 23 Jun 2014)
Log Message:
-----------
- Is't necessary to uninstall and then reinstall
- The templates have changed names
- Fixed bugs
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/about.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/formelements.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/common.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/about.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/xoopsversion.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/about.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/about.php 2014-06-23 09:56:37 UTC (rev 12636)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/about.php 2014-06-23 23:53:16 UTC (rev 12637)
@@ -19,7 +19,7 @@
* @version $Id: about.php 11084 2013-02-23 15:44:20Z timgno $
*/
include 'header.php';
-$template_main = 'about.tpl';
+$template_main = 'tdmcreate_about.tpl';
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('about.php'));
$GLOBALS['xoopsTpl']->assign('about', $adminMenu->renderAbout('6KJ7RW5DR3VTJ', false));
include 'footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php 2014-06-23 09:56:37 UTC (rev 12636)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php 2014-06-23 23:53:16 UTC (rev 12637)
@@ -25,7 +25,7 @@
//
switch ($op) {
case 'build':
- $template_main = 'building.tpl';
+ $template_main = 'tdmcreate_building.tpl';
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('building.php'));
// Get var module name
$mod_name = $moduleObj->getVar('mod_name');
@@ -74,7 +74,7 @@
case 'default':
default:
- $template_main = 'building.tpl';
+ $template_main = 'tdmcreate_building.tpl';
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('building.php'));
// Redirect if there aren't modules
$nb_modules = $tdmcreate->getHandler('modules')->getCount();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-06-23 09:56:37 UTC (rev 12636)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-06-23 23:53:16 UTC (rev 12637)
@@ -38,7 +38,7 @@
$start = XoopsRequest::getInt('start', 0);
$limit = XoopsRequest::getInt('limit', $tdmcreate->getConfig('tables_adminpager'));
// Define main template
- $template_main = 'fields.tpl';
+ $template_main = 'tdmcreate_fields.tpl';
$GLOBALS['xoTheme']->addStylesheet( 'modules/TDMCreate/assets/css/admin/style.css' );
$GLOBALS['xoTheme']->addScript('modules/TDMCreate/assets/js/functions.js');
$GLOBALS['xoTheme']->addScript('modules/TDMCreate/assets/js/fields.js');
@@ -134,7 +134,7 @@
case 'new':
// Define main template
- $template_main = 'fields.tpl';
+ $template_main = 'tdmcreate_fields.tpl';
$GLOBALS['xoTheme']->addStylesheet( 'modules/TDMCreate/assets/css/admin/style.css' );
$GLOBALS['xoTheme']->addScript('modules/TDMCreate/assets/js/fields.js');
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php'));
@@ -157,7 +157,7 @@
if ( !$GLOBALS['xoopsSecurity']->check() ) {
redirect_header('fields.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
- $field_id = TDMCreate_CleanVars($_REQUEST, 'field_id');
+ $field_id = XoopsRequest::getInt('field_id');
// Fields Handler
$fields = $tdmcreate->getHandler('fields');
// Set Variables
@@ -224,7 +224,7 @@
case 'edit':
// Define main template
- $template_main = 'fields.tpl';
+ $template_main = 'tdmcreate_fields.tpl';
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php'));
$adminMenu->addItemButton(_AM_TDMCREATE_ADD_TABLE, 'tables.php?op=new', 'add');
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php', 'list');
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/index.php 2014-06-23 09:56:37 UTC (rev 12636)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/index.php 2014-06-23 23:53:16 UTC (rev 12637)
@@ -24,7 +24,7 @@
$count_tables = $tdmcreate->getHandler('tables')->getCount($criteria);
$count_fields = $tdmcreate->getHandler('fields')->getCount($criteria);
unset($criteria);
-$template_main = 'index.tpl';
+$template_main = 'tdmcreate_index.tpl';
$adminMenu->addInfoBox(_AM_TDMCREATE_ADMIN_NUMMODULES) ;
$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' ._AM_TDMCREATE_THEREARE_NUMMODULES. '</label>', $count_modules, 'Green') ;
$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' ._AM_TDMCREATE_THEREARE_NUMTABLES. '</label>', $count_tables, 'Orange');
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-06-23 09:56:37 UTC (rev 12636)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-06-23 23:53:16 UTC (rev 12637)
@@ -31,7 +31,7 @@
$start = XoopsRequest::getInt('start', 0);
$limit = XoopsRequest::getInt('limit', $tdmcreate->getConfig('modules_adminpager'));
// Define main template
- $template_main = 'modules.tpl';
+ $template_main = 'tdmcreate_modules.tpl';
$GLOBALS['xoTheme']->addScript('modules/TDMCreate/assets/js/functions.js');
$GLOBALS['xoTheme']->addStylesheet( 'modules/TDMCreate/assets/css/admin/style.css' );
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('modules.php'));
@@ -81,7 +81,7 @@
case 'new':
// Define main template
- $template_main = 'modules.tpl';
+ $template_main = 'tdmcreate_modules.tpl';
$GLOBALS['xoTheme']->addScript('modules/TDMCreate/assets/js/functions.js');
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('modules.php'));
$adminMenu->addItemButton(_AM_TDMCREATE_MODULES_LIST, 'modules.php', 'list');
@@ -169,7 +169,7 @@
case 'edit':
// Define main template
- $template_main = 'modules.tpl';
+ $template_main = 'tdmcreate_modules.tpl';
$GLOBALS['xoTheme']->addScript('modules/TDMCreate/assets/js/functions.js');
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('modules.php'));
$adminMenu->addItemButton(_AM_TDMCREATE_ADD_MODULE, 'modules.php?op=new', 'add');
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-06-23 09:56:37 UTC (rev 12636)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-06-23 23:53:16 UTC (rev 12637)
@@ -40,7 +40,7 @@
$start = XoopsRequest::getInt('start', 0);
$limit = XoopsRequest::getInt('limit', $tdmcreate->getConfig('modules_adminpager'));
// Define main template
- $template_main = 'tables.tpl';
+ $template_main = 'tdmcreate_tables.tpl';
$GLOBALS['xoTheme']->addStylesheet( 'modules/TDMCreate/assets/css/admin/style.css' );
$GLOBALS['xoTheme']->addScript('modules/TDMCreate/assets/js/functions.js');
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('tables.php'));
@@ -134,7 +134,7 @@
case 'new':
// Define main template
- $template_main = 'tables.tpl';
+ $template_main = 'tdmcreate_tables.tpl';
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('tables.php'));
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php', 'list');
$GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
@@ -215,7 +215,7 @@
case 'edit':
// Define main template
- $template_main = 'tables.tpl';
+ $template_main = 'tdmcreate_tables.tpl';
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('tables.php'));
$adminMenu->addItemButton(_AM_TDMCREATE_ADD_TABLE, 'tables.php?op=new', 'add');
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php?op=list', 'list');
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-06-23 09:56:37 UTC (rev 12636)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-06-23 23:53:16 UTC (rev 12637)
@@ -81,8 +81,8 @@
*/
public function createBaseFoldersFiles( $module )
{
- // Module Id
- $mod_id = $module->getVar('mod_id');
+ // Module
+ $mod_id = $module->getVar('mod_id');
// Id of tables
$criteria_tables = new CriteriaCompo();
$criteria_tables->add(new Criteria('table_mid', $mod_id));
@@ -186,8 +186,10 @@
*/
public function createFilesToBuilding( $module )
{
- // Module Id
- $mod_id = $module->getVar('mod_id');
+ // Module
+ $mod_id = $module->getVar('mod_id');
+ $mod_name = $module->getVar('mod_name');
+ $stl_mod_name = strtolower($mod_name);
// Id of tables
$criteria_tables = new CriteriaCompo();
$criteria_tables->add(new Criteria('table_mid', $mod_id));
@@ -219,7 +221,7 @@
// Admin Templates File
$adminTemplatesPages = TemplatesAdminPages::getInstance();
$adminTemplatesPages->write($module, $table);
- $ret[] = $adminTemplatesPages->renderFile('admin_'.$table_name.'.tpl');
+ $ret[] = $adminTemplatesPages->renderFile($stl_mod_name.'_'.$table_name.'.tpl');
}
// Creation of blocks
if ( $table_blocks == 1) {
@@ -230,7 +232,7 @@
// Templates Blocks Files
$templatesFiles = TemplatesBlocks::getInstance();
$templatesFiles->write($module, $table);
- $ret[] = $templatesFiles->renderFile('block_'.$table_name.'.tpl');
+ $ret[] = $templatesFiles->renderFile($stl_mod_name.'_block_'.$table_name.'.tpl');
}
// Blocks Templates File
/*$blocksTemplates = BlocksTemplates::getInstance();
@@ -252,7 +254,7 @@
// User Templates File
$userTemplatesPages = TemplatesUserPages::getInstance();
$userTemplatesPages->write($module, $table);
- $ret[] = $userTemplatesPages->renderFile('user_'.$table_name.'.tpl');
+ $ret[] = $userTemplatesPages->renderFile($stl_mod_name.'_'.$table_name.'.tpl');
}
/*var_dump($table_name); */
}
@@ -302,19 +304,19 @@
$ret[] = $languageAdmin->render();
// Templates Index File
$adminTemplatesAbout = TemplatesAdminAbout::getInstance();
- $adminTemplatesAbout->write($module, 'admin_about.tpl');
+ $adminTemplatesAbout->write($module, $stl_mod_name.'_about.tpl');
$ret[] = $adminTemplatesAbout->render();
// Templates Index File
$adminTemplatesIndex = TemplatesAdminIndex::getInstance();
- $adminTemplatesIndex->write($module, 'admin_index.tpl');
+ $adminTemplatesIndex->write($module, $stl_mod_name.'_index.tpl');
$ret[] = $adminTemplatesIndex->render();
// Templates Footer File
$adminTemplatesFooter = TemplatesAdminFooter::getInstance();
- $adminTemplatesFooter->write($module, 'admin_footer.tpl');
+ $adminTemplatesFooter->write($module, $stl_mod_name.'_footer.tpl');
$ret[] = $adminTemplatesFooter->render();
// Templates Header File
$adminTemplatesHeader = TemplatesAdminHeader::getInstance();
- $adminTemplatesHeader->write($module, 'admin_header.tpl');
+ $adminTemplatesHeader->write($module, $stl_mod_name.'_header.tpl');
$ret[] = $adminTemplatesHeader->render();
}
// Creation of notifications files
@@ -369,15 +371,15 @@
if ( ($table_user == 1)){
// Templates Index File
$userTemplatesIndex = TemplatesUserIndex::getInstance();
- $userTemplatesIndex->write($module, 'user_index.tpl');
+ $userTemplatesIndex->write($module, $stl_mod_name.'_index.tpl');
$ret[] = $userTemplatesIndex->render();
// Templates Footer File
$userTemplatesFooter = TemplatesUserFooter::getInstance();
- $userTemplatesFooter->write($module, $table, 'user_footer.tpl');
+ $userTemplatesFooter->write($module, $table, $stl_mod_name.'_footer.tpl');
$ret[] = $userTemplatesFooter->render();
// Templates Header File
$userTemplatesHeader = TemplatesUserHeader::getInstance();
- $userTemplatesHeader->write($module, $tables, 'user_header.tpl');
+ $userTemplatesHeader->write($module, $tables, $stl_mod_name.'_header.tpl');
$ret[] = $userTemplatesHeader->render();
// User Footer File
$userFooter = UserFooter::getInstance();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/formelements.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/formelements.php 2014-06-23 09:56:37 UTC (rev 12636)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/formelements.php 2014-06-23 23:53:16 UTC (rev 12637)
@@ -145,6 +145,7 @@
/*
* @public function getXoopsFormUploadImage
* @param string $language
+ * @param string $table_name
* @param string $field_name
* @param string $required
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/common.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/common.php 2014-06-23 09:56:37 UTC (rev 12636)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/common.php 2014-06-23 23:53:16 UTC (rev 12637)
@@ -63,7 +63,7 @@
$awn = str_replace(" ", "", strtolower($mod_a_w_name));
$ret = <<<EOT
-if( ! defined( "XOOPS_ROOT_PATH" ) ) exit ;
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
if (!defined('{$stu_mn}_MODULE_PATH')) {
define('{$stu_mn}_DIRNAME', '{$stl_mn}');
define('{$stu_mn}_PATH', XOOPS_ROOT_PATH.'/modules/'.{$stu_mn}_DIRNAME);
@@ -77,8 +77,8 @@
if(is_dir({$stu_mn}_IMAGE_PATH) && file_exists(\$local_logo)) {
\$logo = \$local_logo;
} else {
- \$pathIcon32 = \$xoopsModule->getInfo('icons32');
- \$logo = \$pathIcon32.'/xoopsmicrobutton.gif';
+ \$sysPathIcon32 = \$GLOBALS['xoopsModule']->getInfo('icons32');
+ \$logo = \$sysPathIcon32.'/xoopsmicrobutton.gif';
}
define('{$stu_mn}_AUTHOR_LOGOIMG', \$logo);
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/modinfo.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/modinfo.php 2014-06-23 09:56:37 UTC (rev 12636)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/modinfo.php 2014-06-23 23:53:16 UTC (rev 12637)
@@ -50,10 +50,10 @@
* @param string $filename
*/
public function write($module, $table, $tables, $filename) {
- $this->setModule($module);
- $this->setFileName($filename);
+ $this->setModule($module);
$this->setTable($table);
$this->setTables($tables);
+ $this->setFileName($filename);
}
/*
* @public function getMain
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/about.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/about.php 2014-06-23 09:56:37 UTC (rev 12636)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/about.php 2014-06-23 23:53:16 UTC (rev 12637)
@@ -61,11 +61,11 @@
$module_name = strtolower($module->getVar('mod_name'));
$content = <<<EOT
<!-- Header -->
-<{includeq file="db:admin_header.tpl"}>
+<{includeq file="db:{$module_name}_header.tpl"}>
<!-- About Page -->
<div class="top"><{\$about}></div>
<!-- Footer -->
-<{includeq file="db:admin_footer.tpl"}>
+<{includeq file="db:{$module_name}_footer.tpl"}>
EOT;
$this->tdmcfile->create($module_name, 'templates/admin', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
return $this->tdmcfile->renderFile();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/index.php 2014-06-23 09:56:37 UTC (rev 12636)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/index.php 2014-06-23 23:53:16 UTC (rev 12637)
@@ -61,11 +61,11 @@
$module_name = strtolower($module->getVar('mod_name'));
$content = <<<EOT
<!-- Header -->
-<{includeq file="db:admin_header.tpl"}>
+<{includeq file="db:{$module_name}_header.tpl"}>
<!-- Index Page -->
<div class="top"><{\$index}></div>
<!-- Footer -->
-<{includeq file="db:admin_footer.tpl"}>
+<{includeq file="db:{$module_name}_footer.tpl"}>
EOT;
$this->tdmcfile->create($module_name, 'templates/admin', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
return $this->tdmcfile->renderFile();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/pages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/pages.php 2014-06-23 09:56:37 UTC (rev 12636)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/pages.php 2014-06-23 23:53:16 UTC (rev 12637)
@@ -66,7 +66,7 @@
$stu_module_name = strtoupper($module_name);
$language = $this->getLanguage($module_name, 'AM');
$content = <<<EOT
-<{include file="db:admin_header.tpl"}>
+<{include file="db:{$stl_mod_name}_header.tpl"}>
<{if {$table_name}_list}>
<table class="outer {$table_name} width100">
<thead>
@@ -138,7 +138,7 @@
<{/if}>
<br />
<!-- Footer -->
-<{include file="db:admin_footer.tpl"}>
+<{include file="db:{$stl_mod_name}_footer.tpl"}>
EOT;
$this->tdmcfile->create($module_name, 'templates/admin', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
return $this->tdmcfile->renderFile();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/footer.php 2014-06-23 09:56:37 UTC (rev 12636)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/footer.php 2014-06-23 23:53:16 UTC (rev 12637)
@@ -70,24 +70,24 @@
\n<{if \$fbcomments != 0}>
<{include file="db:system_fbcomments.html"}>
<{/if}>
-\n<div class="left"><{\$copyright}></div>
+<div class="left"><{\$copyright}></div>\n
EOT;
if( $table->getVar('table_name') != null ) {
$content .= <<<EOT
-\n<{if \$pagenav != ''}>
+<{if \$pagenav != ''}>
<div class="right"><{\$pagenav}></div>
<{/if}>
-<br />
+<br />\n
EOT;
}
$content .= <<<EOT
-\n<{if \$xoops_isadmin}>
- <div class="center bold"><a href="<{\$admin}>"><{\$smarty.const.{$language}ADMIN}></a></div>
-<{/if}>
+<{if \$xoops_isadmin}>
+ <div class="center bold"><a href="<{\$admin}>"><{\$smarty.const.{$language}ADMIN}></a></div><br />
+<{/if}>\n
EOT;
- if ( ($module->getVar('mod_comments') != 0) && ($table->getVar('table_comments') != 0) ) {
+ if ( ($module->getVar('mod_comments') == 1) && ($table->getVar('table_comments') == 1) ) {
$content .= <<<EOT
-\n<div class="pad2 marg2">
+<div class="pad2 marg2">
<{if \$comment_mode == "flat"}>
<{include file="db:system_comments_flat.html"}>
<{elseif \$comment_mode == "thread"}>
@@ -95,12 +95,13 @@
<{elseif \$comment_mode == "nest"}>
<{include file="db:system_comments_nest.html"}>
<{/if}>
-</div>
+</div>\n
+<br />\n
EOT;
}
- if ( ($module->getVar('mod_notifications') != 0) && ($table->getVar('table_notifications') != 0) ) {
+ if ( ($module->getVar('mod_notifications') == 1) && ($table->getVar('table_notifications') == 1) ) {
$content .= <<<EOT
-\n<{include file='db:system_notification_select.html'}>
+<{include file='db:system_notification_select.html'}>
EOT;
}
$this->tdmcfile->create($module_name, 'templates', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/index.php 2014-06-23 09:56:37 UTC (rev 12636)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/index.php 2014-06-23 23:53:16 UTC (rev 12637)
@@ -58,10 +58,10 @@
public function render() {
$module = $this->getModule();
$filename = $this->getFileName();
- $module_name = $module->getVar('mod_name');
+ $module_name = strtolower($module->getVar('mod_name'));
$language = $this->getLanguage($module_name, 'MA');
$content = <<<EOT
-<{include file="db:user_header.tpl"}>
+<{include file="db:{$module_name}_header.tpl"}>
<table class="outer {$module_name}">
<tbody>
<tr class="left">
@@ -69,7 +69,7 @@
</tr>
</tbody>
</table>
-<{include file="db:user_footer.tpl"}>
+<{include file="db:{$module_name}_footer.tpl"}>
EOT;
$this->tdmcfile->create($module_name, 'templates', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
return $this->tdmcfile->renderFile();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/pages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/pages.php 2014-06-23 09:56:37 UTC (rev 12636)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/pages.php 2014-06-23 23:53:16 UTC (rev 12637)
@@ -66,7 +66,7 @@
//$filename = $this->getFileName();
$language = $this->getLanguage($module_name, 'MA');
$content = <<<EOT
-<{include file="db:user_header.tpl"}>
+<{include file="db:{$stl_mod_name}_header.tpl"}>
<table class="{$module_name}">
<thead class="outer">
<tr class="head">\n
@@ -123,7 +123,7 @@
</table>\n
EOT;
$content .= <<<EOT
-<{include file="db:user_footer.tpl"}>
+<{include file="db:{$stl_mod_name}_footer.tpl"}>
EOT;
$this->tdmcfile->create($module_name, 'templates', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
return $this->tdmcfile->renderFile();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/footer.php 2014-06-23 09:56:37 UTC (rev 12636)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/footer.php 2014-06-23 23:53:16 UTC (rev 12637)
@@ -62,6 +62,7 @@
$filename = $this->getFileName();
$content = $this->getHeaderFilesComments($module, $filename);
$content .= <<<EOT
+\$GLOBALS['xoopsTpl']->assign('sysPathIcon32', \$sysPathIcon32);
\$GLOBALS['xoopsTpl']->assign('{$stl_mod_name}_url', {$stu_mod_name}_URL);
\$GLOBALS['xoopsTpl']->assign('adv', xoops_getModuleOption('advertise', \$dirname));
//
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/header.php 2014-06-23 09:56:37 UTC (rev 12636)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/header.php 2014-06-23 23:53:16 UTC (rev 12637)
@@ -69,7 +69,14 @@
\$myts =& MyTextSanitizer::getInstance();
\$style = {$stu_mod_name}_URL . '/assets/css/style.css';
if(file_exists(\$style)) { return true; }
-
+//
+\$sysPathIcon16 = \$GLOBALS['xoopsModule']->getInfo('sysicons16');
+\$sysPathIcon32 = \$GLOBALS['xoopsModule']->getInfo('sysicons32');
+\$pathModuleAdmin = \$GLOBALS['xoopsModule']->getInfo('dirmoduleadmin');
+//
+\$modPathIcon16 = \$xoopsModule->getInfo('modicons16');
+\$modPathIcon32 = \$xoopsModule->getInfo('modicons32');
+//
xoops_loadLanguage('modinfo', \$dirname);
xoops_loadLanguage('main', \$dirname);
EOT;
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/xoopsversion.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/xoopsversion.php 2014-06-23 09:56:37 UTC (rev 12636)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/xoopsversion.php 2014-06-23 23:53:16 UTC (rev 12637)
@@ -261,18 +261,18 @@
$tables = $this->getTables();
$ret = <<<EOT
// Templates Admin
-\$modversion['templates'][] = array('file' => 'admin_about.tpl', 'description' => '', 'type' => 'admin');
-\$modversion['templates'][] = array('file' => 'admin_header.tpl', 'description' => '', 'type' => 'admin');
-\$modversion['templates'][] = array('file' => 'admin_index.tpl', 'description' => '', 'type' => 'admin');\n
+\$modversion['templates'][] = array('file' => '{$stl_mod_name}_about.tpl', 'description' => '', 'type' => 'admin');
+\$modversion['templates'][] = array('file' => '{$stl_mod_name}_header.tpl', 'description' => '', 'type' => 'admin');
+\$modversion['templates'][] = array('file' => '{$stl_mod_name}_index.tpl', 'description' => '', 'type' => 'admin');\n
EOT;
foreach (array_keys($tables) as $t)
{
$ret .= <<<EOT
-\$modversion['templates'][] = array('file' => 'admin_{$tables[$t]->getVar('table_name')}.tpl', 'description' => '', 'type' => 'admin');\n
+\$modversion['templates'][] = array('file' => '{$stl_mod_name}_{$tables[$t]->getVar('table_name')}.tpl', 'description' => '', 'type' => 'admin');\n
EOT;
}
$ret .= <<<EOT
-\$modversion['templates'][] = array('file' => 'admin_footer.tpl', 'description' => '', 'type' => 'admin');\n
+\$modversion['templates'][] = array('file' => '{$stl_mod_name}_footer.tpl', 'description' => '', 'type' => 'admin');\n
EOT;
return $ret;
}
@@ -286,17 +286,17 @@
$tables = $this->getTables();
$ret = <<<EOT
// Templates User
-\$modversion['templates'][] = array('file' => 'user_header.tpl', 'description' => '');
-\$modversion['templates'][] = array('file' => 'user_index.tpl', 'description' => '');\n
+\$modversion['templates'][] = array('file' => '{$stl_mod_name}_header.tpl', 'description' => '');
+\$modversion['templates'][] = array('file' => '{$stl_mod_name}_index.tpl', 'description' => '');\n
EOT;
foreach (array_keys($tables) as $t)
{
$ret .= <<<EOT
-\$modversion['templates'][] = array('file' => 'user_{$tables[$t]->getVar('table_name')}.tpl', 'description' => '');\n
+\$modversion['templates'][] = array('file' => '{$stl_mod_name}_{$tables[$t]->getVar('table_name')}.tpl', 'description' => '');\n
EOT;
}
$ret .= <<<EOT
-\$modversion['templates'][] = array('file' => 'user_footer.tpl', 'description' => '');\n
+\$modversion['templates'][] = array('file' => '{$stl_mod_name}_footer.tpl', 'description' => '');\n
EOT;
return $ret;
}
@@ -350,7 +350,7 @@
'show_func' => "b_{$stl_mod_name}_{$table_name}_show",
'edit_func' => "b_{$stl_mod_name}_{$table_name}_edit",
'options' => "{$tables[$i]->getVar('table_fieldname')}|5|25|0",
- 'template' => "'block_{$table_name}.tpl");\n\n
+ 'template' => "'{$stl_mod_name}_block_{$table_name}.tpl");\n\n
EOT;
$this->setKeywords($table_name);
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php 2014-06-23 09:56:37 UTC (rev 12636)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php 2014-06-23 23:53:16 UTC (rev 12637)
@@ -68,14 +68,14 @@
$modversion['adminindex'] = "admin/index.php";
$modversion['adminmenu'] = "admin/menu.php";
// Templates admin
-$modversion['templates'][] = array( 'file' => 'about.tpl', 'description' => '', 'type' => 'admin' );
-$modversion['templates'][] = array( 'file' => 'building.tpl', 'description' => '', 'type' => 'admin' );
-$modversion['templates'][] = array( 'file' => 'fields.tpl', 'description' => '', 'type' => 'admin' );
-$modversion['templates'][] = array( 'file' => 'footer.tpl', 'description' => '', 'type' => 'admin' );
-$modversion['templates'][] = array( 'file' => 'header.tpl', 'description' => '', 'type' => 'admin' );
-$modversion['templates'][] = array( 'file' => 'index.tpl', 'description' => '', 'type' => 'admin' );
-$modversion['templates'][] = array( 'file' => 'modules.tpl', 'description' => '', 'type' => 'admin' );
-$modversion['templates'][] = array( 'file' => 'tables.tpl', 'description' => '', 'type' => 'admin' );
+$modversion['templates'][] = array( 'file' => 'tdmcreate_about.tpl', 'description' => '', 'type' => 'admin' );
+$modversion['templates'][] = array( 'file' => 'tdmcreate_building.tpl', 'description' => '', 'type' => 'admin' );
+$modversion['templates'][] = array( 'file' => 'tdmcreate_fields.tpl', 'description' => '', 'type' => 'admin' );
+$modversion['templates'][] = array( 'file' => 'tdmcreate_footer.tpl', 'description' => '', 'type' => 'admin' );
+$modversion['templates'][] = array( 'file' => 'tdmcreate_header.tpl', 'description' => '', 'type' => 'admin' );
+$modversion['templates'][] = array( 'file' => 'tdmcreate_index.tpl', 'description' => '', 'type' => 'admin' );
+$modversion['templates'][] = array( 'file' => 'tdmcreate_modules.tpl', 'description' => '', 'type' => 'admin' );
+$modversion['templates'][] = array( 'file' => 'tdmcreate_tables.tpl', 'description' => '', 'type' => 'admin' );
// Mysql file
$modversion['sqlfile']['mysql'] = "sql/mysql.sql";
// Tables
@@ -413,5 +413,5 @@
$modversion['config'][$i]['description'] = "";
$modversion['config'][$i]['formtype'] = "textbox";
$modversion['config'][$i]['valuetype'] = "text";
-$modversion['config'][$i]['default'] = '12585';
+$modversion['config'][$i]['default'] = '12636';
unset($i);
\ No newline at end of file
|