|
From: <txm...@us...> - 2014-06-22 09:58:04
|
Revision: 12631
http://sourceforge.net/p/xoops/svn/12631
Author: txmodxoops
Date: 2014-06-22 09:57:53 +0000 (Sun, 22 Jun 2014)
Log Message:
-----------
- Fixed bugs
- Updated
- Work in progress
Modified Paths:
--------------
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/css/styles.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/admin.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/footer.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/header.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/header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/submit.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/xoopsversion.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-06-22 09:29:57 UTC (rev 12630)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-06-22 09:57:53 UTC (rev 12631)
@@ -148,20 +148,22 @@
if ( !$GLOBALS['xoopsSecurity']->check() ) {
redirect_header('tables.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
- if (isset($table_id)) {
- $obj =& $tdmcreate->getHandler('tables')->get($table_id);
- } else {
- $obj =& $tdmcreate->getHandler('tables')->create();
- }
+ $tables =& $tdmcreate->getHandler('tables');
// Checking if table name exist
- $table_name_search = $tdmcreate->getHandler('tables')->getObjects(null);
+ $table_name_search = $tables->getObjects(null);
foreach (array_keys($table_name_search) as $t)
{
if( ($table_name_search[$t]->getVar('table_name') === $_POST['table_name']) &&
- ($table_name_search[$t]->getVar('table_mid') === $table_mid)) {
+ ($table_name_search[$t]->getVar('table_mid') === $table_mid) &&
+ ($table_name_search[$t]->getVar('table_id') === $table_id)) {
redirect_header('tables.php?op=new', 10, sprintf(_AM_TDMCREATE_ERROR_TABLE_NAME_EXIST, $_POST['table_name']));
- }
- }
+ }
+ }
+ if (isset($table_id)) {
+ $obj =& $tables->get($table_id);
+ } else {
+ $obj =& $tables->create();
+ }
// Form save tables
$obj->setVars(array('table_mid' => $table_mid,
'table_name' => $_POST['table_name'],
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-22 09:29:57 UTC (rev 12630)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-06-22 09:57:53 UTC (rev 12631)
@@ -219,7 +219,7 @@
// Admin Templates File
$adminTemplatesPages = TemplatesAdminPages::getInstance();
$adminTemplatesPages->write($module, $table);
- $ret[] = $adminTemplatesPages->renderFile($table_name.'.tpl');
+ $ret[] = $adminTemplatesPages->renderFile('admin_'.$table_name.'.tpl');
}
// Creation of blocks
if ( $table_blocks == 1) {
@@ -230,7 +230,7 @@
// Templates Blocks Files
$templatesFiles = TemplatesBlocks::getInstance();
$templatesFiles->write($module, $table);
- $ret[] = $templatesFiles->renderFile($table_name.'.tpl');
+ $ret[] = $templatesFiles->renderFile('block_'.$table_name.'.tpl');
}
// Blocks Templates File
/*$blocksTemplates = BlocksTemplates::getInstance();
@@ -252,7 +252,7 @@
// User Templates File
$userTemplatesPages = TemplatesUserPages::getInstance();
$userTemplatesPages->write($module, $table);
- $ret[] = $userTemplatesPages->renderFile($table_name.'.tpl');
+ $ret[] = $userTemplatesPages->renderFile('user_'.$table_name.'.tpl');
}
/*var_dump($table_name); */
}
@@ -302,19 +302,19 @@
$ret[] = $languageAdmin->render();
// Templates Index File
$adminTemplatesAbout = TemplatesAdminAbout::getInstance();
- $adminTemplatesAbout->write($module, 'about.tpl');
+ $adminTemplatesAbout->write($module, 'admin_about.tpl');
$ret[] = $adminTemplatesAbout->render();
// Templates Index File
$adminTemplatesIndex = TemplatesAdminIndex::getInstance();
- $adminTemplatesIndex->write($module, 'index.tpl');
+ $adminTemplatesIndex->write($module, 'admin_index.tpl');
$ret[] = $adminTemplatesIndex->render();
// Templates Footer File
$adminTemplatesFooter = TemplatesAdminFooter::getInstance();
- $adminTemplatesFooter->write($module, 'footer.tpl');
+ $adminTemplatesFooter->write($module, 'admin_footer.tpl');
$ret[] = $adminTemplatesFooter->render();
// Templates Header File
$adminTemplatesHeader = TemplatesAdminHeader::getInstance();
- $adminTemplatesHeader->write($module, 'header.tpl');
+ $adminTemplatesHeader->write($module, 'admin_header.tpl');
$ret[] = $adminTemplatesHeader->render();
}
// Creation of notifications files
@@ -369,15 +369,15 @@
if ( ($table_user == 1)){
// Templates Index File
$userTemplatesIndex = TemplatesUserIndex::getInstance();
- $userTemplatesIndex->write($module, 'index.tpl');
+ $userTemplatesIndex->write($module, 'user_index.tpl');
$ret[] = $userTemplatesIndex->render();
// Templates Footer File
$userTemplatesFooter = TemplatesUserFooter::getInstance();
- $userTemplatesFooter->write($module, $table, 'footer.tpl');
+ $userTemplatesFooter->write($module, $table, 'user_footer.tpl');
$ret[] = $userTemplatesFooter->render();
// Templates Header File
$userTemplatesHeader = TemplatesUserHeader::getInstance();
- $userTemplatesHeader->write($module, $tables, 'header.tpl');
+ $userTemplatesHeader->write($module, $tables, 'user_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-22 09:29:57 UTC (rev 12630)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/formelements.php 2014-06-22 09:57:53 UTC (rev 12631)
@@ -138,7 +138,7 @@
*/
public function getXoopsFormUploadFile($language, $field_name, $required = 'false') {
$ret = <<<EOT
- \$form->addElement(new XoopsFormUploadFile({$language}, '{$field_name}', \$xoopsModuleConfig['maxsize']){$required});\n
+ \$form->addElement(new XoopsFormUploadFile({$language}, '{$field_name}', \$GLOBALS['xoopsModuleConfig']['maxsize']){$required});\n
EOT;
return $ret;
}
@@ -148,9 +148,40 @@
* @param string $field_name
* @param string $required
*/
- public function getXoopsFormUploadImage($language, $field_name, $required = 'false') {
+ public function getXoopsFormUploadImage($language, $table_name, $field_name, $required = 'false') {
+ $stu_field_name = strtoupper($field_name);
$ret = <<<EOT
- \$form->addElement(new XoopsFormUploadImage({$language}, '{$field_name}', \$xoopsModuleConfig['maxsize']){$required});\n
+ //\$form->addElement(new XoopsFormUploadImage({$language}, '{$field_name}', \$GLOBALS['xoopsModuleConfig']['maxsize']){$required});
+ \$get_{$field_name} = \$this->getVar('{$field_name}');
+ \${$field_name} = \$get_{$field_name} ? \$get_{$field_name} : 'blank.gif';
+ \$iconsdir = '/Frameworks/moduleclasses/icons/32';
+ \$uploads_dir = '/uploads/'.\$GLOBALS['xoopsModule']->dirname().'/images/{$table_name}';
+ if(is_dir(XOOPS_ROOT_PATH . \$iconsdir)){
+ \$iconsdirectory = \$iconsdir;
+ }else{
+ \$iconsdirectory = \$uploads_dir;
+ }
+ //
+ \$imgtray1 = new XoopsFormElementTray({$language}{$stu_field_name},'<br />');
+ if(is_dir(XOOPS_ROOT_PATH . \$iconsdir)) {
+ \$imgpath = sprintf({$language}FORMIMAGE_PATH, ".{\$iconsdir}/");
+ }else{
+ \$imgpath = sprintf({$language}FORMIMAGE_PATH, \$uploads_dir);
+ }
+ \$imgpath1 = sprintf({$language}FORMIMAGE_PATH, ".{\$iconsdirectory}/");
+ \$imageselect1 = new XoopsFormSelect(\$imgpath1, '{$field_name}', \${$field_name}, 10);
+ \$image_array1 = XoopsLists::getImgListAsArray( XOOPS_ROOT_PATH . \$iconsdirectory );
+ foreach( \$image_array1 as \$image1 ) {
+ \$imageselect1->addOption("{\$image1}", \$image1);
+ }
+ \$imageselect1->setExtra( "onchange='showImgSelected(\"image1\", \"{$field_name}\", \"".\$iconsdirectory."\", \"\", \"".XOOPS_URL."\")'" );
+ \$imgtray1->addElement(\$imageselect1, false);
+ \$imgtray1->addElement( new XoopsFormLabel( '', "<br /><img src='".XOOPS_URL."/".\$iconsdirectory."/".\${$field_name}."' name='image1' id='image1' alt='' />" ) );
+ \$fileseltray1 = new XoopsFormElementTray('','<br />');
+ \$fileseltray1->addElement(new XoopsFormFile({$language}FORMUPLOAD , 'attachedfile', \$GLOBALS['xoopsModuleConfig']['maxsize']));
+ \$fileseltray1->addElement(new XoopsFormLabel(''));
+ \$imgtray1->addElement(\$fileseltray1);
+ \$form->addElement(\$imgtray1{$required});\n
EOT;
return $ret;
}
@@ -327,7 +358,7 @@
$ret .= $this->getXoopsFormColorPicker($language, $field_name, $required);
break;
case 9:
- $ret .= $this->getXoopsFormUploadImage($language, $field_name, $required);
+ $ret .= $this->getXoopsFormUploadImage($language_funct, $table_name, $field_name, $required);
break;
case 10:
$ret .= $this->getXoopsFormUploadFile($language, $field_name, $required);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/css/styles.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/css/styles.php 2014-06-22 09:29:57 UTC (rev 12630)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/css/styles.php 2014-06-22 09:57:53 UTC (rev 12631)
@@ -61,17 +61,28 @@
$module_name = strtolower($module->getVar('mod_name'));
//$content = $this->getHeaderFilesComments($module, $filename);
$content = <<<EOT
-table {
+table.{$module_name} {
margin: 0;
+ padding: 2px;
+ border: 1px solid #ccc;
+ width: 100%;
}
-table.{$module_name} {
+thead {
+ margin: 0;
padding: 2px;
- border: 1px solid #ccc;
}
-td.fields {
- font: Verdana, Tahoma;
+tbody {
+ margin: 0;
+ padding: 2px;
+}
+
+tr {
+ font-family: Verdana, Tahoma;
+}
+
+td {
font-size: 12px;
font-weight: normal;
}
@@ -80,12 +91,14 @@
color: #555;
background-color: #eee;
border: 1px solid #ccc;
+ width: 100%;
}
-ul.fields > li {
+ul.menu > li {
display: inline;
- list-style-type: none;
- list-style-image: none;
+ width: 100%;
+ text-align: center;
+ list-style-type: none;
}
EOT;
$this->tdmcfile->create($module_name, 'assets/css', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/admin.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/admin.php 2014-06-22 09:29:57 UTC (rev 12630)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/admin.php 2014-06-22 09:57:53 UTC (rev 12631)
@@ -98,6 +98,13 @@
EOT;
}
$ret .= <<<EOT
+// Save/Delete
+define('{$language}FORMOK', "Successfully saved");
+define('{$language}FORMDELOK', "Successfully deleted");
+define('{$language}FORMSUREDEL', "Are you sure to delete: <b><span style='color : Red'>%s </span></b>");
+define('{$language}FORMSURERENEW', "Are you sure to update: <b><span style='color : Red'>%s </span></b>");\n
+EOT;
+ $ret .= <<<EOT
// Buttons\n
EOT;
foreach (array_keys($tables) as $t)
@@ -142,7 +149,7 @@
$stu_table_name = strtoupper($table_name);
$ucf_table_name = ucfirst($table_name);
$ret .= <<<EOT
-// {$ucf_table_name} add
+// {$ucf_table_name} add/edit
define('{$language}{$stu_table_name}_ADD', "Add {$table_name}");
define('{$language}{$stu_table_name}_EDIT', "Edit {$table_name}");
// Elements of {$ucf_table_name}\n
@@ -157,8 +164,16 @@
define('{$language}{$stu_field_name}', "{$field_name_desc}");\n
EOT;
}
- }
+ }
$ret .= <<<EOT
+// General
+define('{$language}FORMUPLOAD', "Upload file");
+define('{$language}FORMIMAGE_PATH', "Files in %s ");
+define('{$language}FORMACTION', "Action");
+define('{$language}FORMEDIT', "Modification");
+define('{$language}FORMDEL', "Clear");\n
+EOT;
+ $ret .= <<<EOT
// Permissions
define('{$language}PERMISSIONS_APPROVE', "Permissions to approve");
define('{$language}PERMISSIONS_SUBMIT', "Permissions to submit");
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-22 09:29:57 UTC (rev 12630)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/about.php 2014-06-22 09:57:53 UTC (rev 12631)
@@ -61,11 +61,11 @@
$module_name = strtolower($module->getVar('mod_name'));
$content = <<<EOT
<!-- Header -->
-<{includeq file="db:header.tpl"}>
+<{includeq file="db:admin_header.tpl"}>
<!-- About Page -->
<div class="top"><{\$about}></div>
<!-- Footer -->
-<{includeq file="db:footer.tpl"}>
+<{includeq file="db:admin_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/footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/footer.php 2014-06-22 09:29:57 UTC (rev 12630)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/footer.php 2014-06-22 09:57:53 UTC (rev 12631)
@@ -66,7 +66,7 @@
<div class='center'>
<a href='http://www.xoops.org' title='Visit XOOPS' target='_blank'><img src='<{xoModuleIcons32 xoopsmicrobutton.gif}>' alt='XOOPS' /></a>
</div>
-<div class='center smallsmall italic pad5'><strong>{$module_name}</strong> <{{$language}MAINTAINEDBY}>
+<div class='center smallsmall italic pad5'><strong>{$module_name}</strong> <{\$smarty.const.{$language}MAINTAINEDBY}>
<a href='{$support_url}' title='Visit {$support_name}' class='tooltip' rel='external'>{$support_name}</a>
</div>
EOT;
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-22 09:29:57 UTC (rev 12630)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/index.php 2014-06-22 09:57:53 UTC (rev 12631)
@@ -61,11 +61,11 @@
$module_name = strtolower($module->getVar('mod_name'));
$content = <<<EOT
<!-- Header -->
-<{includeq file="db:header.tpl"}>
+<{includeq file="db:admin_header.tpl"}>
<!-- Index Page -->
<div class="top"><{\$index}></div>
<!-- Footer -->
-<{includeq file="db:footer.tpl"}>
+<{includeq file="db:admin_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-22 09:29:57 UTC (rev 12630)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/pages.php 2014-06-22 09:57:53 UTC (rev 12631)
@@ -66,7 +66,7 @@
$stu_module_name = strtoupper($module_name);
$language = $this->getLanguage($module_name, 'MA');
$content = <<<EOT
-<{include file="db:header.tpl"}>
+<{include file="db:admin_header.tpl"}>
<div class="outer">
<table class="{$table_name} width100">
<thead>
@@ -123,7 +123,7 @@
<div class="center">None</div>
<br />
</div>
-<{include file="db:footer.tpl"}>
+<{include file="db:admin_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/header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/header.php 2014-06-22 09:29:57 UTC (rev 12630)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/header.php 2014-06-22 09:57:53 UTC (rev 12631)
@@ -73,7 +73,7 @@
<div class="center"><{\$adv}></div>
<{/if}>
</div>
-<table class="outer {$module_name}" cellspacing="2" cellpadding="2">
+<table class="{$module_name}">
<thead>
<tr class="center" colspan="2">
<th><{\$smarty.const.{$language}TITLE}> - <{\$smarty.const.{$language}DESC}></th>
@@ -82,26 +82,24 @@
<tbody>
<tr class="center">
<td class="center bold pad5">
- <ul class="menu center fields">
- <li><a href="<{\${$module_name}_url}>"><{\$smarty.const.{$language}INDEX}></a></li>\n
+ <ul class="menu">
+ <li><a href="<{\${$module_name}_url}>"><{\$smarty.const.{$language}INDEX}></a></li>\n
EOT;
foreach (array_keys($tables) as $i)
{
$table_name = $tables[$i]->getVar('table_name');
$stu_table_name = strtoupper($table_name);
$content .= <<<EOT
- <li> | </li>
- <li><a href="<{\${$module_name}_url}>/{$table_name}.php"><{\$smarty.const.{$language}{$stu_table_name}}></a></li>\n
+ <li> | </li>
+ <li><a href="<{\${$module_name}_url}>/{$table_name}.php"><{\$smarty.const.{$language}{$stu_table_name}}></a></li>
EOT;
}
$content .= <<<EOT
- </ul>
+ \n</ul>
</td>
</tr>
<{if \$adv != ''}>
- <tr class="center"><td class="center bold pad5"><{\$adv}></td></tr>
- <{else}>
- <tr class="center"><td class="center bold pad5"> </td></tr>
+ <tr class="center"><td class="center bold pad5"><{\$adv}></td></tr>
<{/if}>
</tbody>
</table>
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-22 09:29:57 UTC (rev 12630)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/index.php 2014-06-22 09:57:53 UTC (rev 12631)
@@ -61,7 +61,7 @@
$module_name = $module->getVar('mod_name');
$language = $this->getLanguage($module_name, 'MA');
$content = <<<EOT
-<{include file="db:header.tpl"}>
+<{include file="db:user_header.tpl"}>
<table class="outer {$module_name}">
<tbody>
<tr class="left">
@@ -69,7 +69,7 @@
</tr>
</tbody>
</table>
-<{include file="db:footer.tpl"}>
+<{include file="db:user_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-22 09:29:57 UTC (rev 12630)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/pages.php 2014-06-22 09:57:53 UTC (rev 12631)
@@ -66,9 +66,9 @@
//$filename = $this->getFileName();
$language = $this->getLanguage($module_name, 'MA');
$content = <<<EOT
-<{include file="db:header.tpl"}>
+<{include file="db:user_header.tpl"}>
<div class="outer">
- <table class="{$table_name}" cellpadding="0" cellspacing="0" width="100%">
+ <table class="{$module_name}">
<tr class="head">\n
EOT;
$fields = $this->getTableFields($table->getVar('table_id'));
@@ -118,10 +118,10 @@
<div class="outer">
<div class="center">None</div>
<br />
-</div>
+</div>\n
EOT;
$content .= <<<EOT
-<{include file="db:footer.tpl"}>
+<{include file="db:user_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/header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/header.php 2014-06-22 09:29:57 UTC (rev 12630)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/header.php 2014-06-22 09:57:53 UTC (rev 12631)
@@ -67,7 +67,7 @@
include_once \$pathname . '/include/common.php';
include_once \$pathname . '/include/functions.php';
\$myts =& MyTextSanitizer::getInstance();
-\$style = {$stu_mod_name}_URL . '/css/style.css';
+\$style = {$stu_mod_name}_URL . '/assets/css/style.css';
if(file_exists(\$style)) { return true; }
xoops_loadLanguage('modinfo', \$dirname);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/index.php 2014-06-22 09:29:57 UTC (rev 12630)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/index.php 2014-06-22 09:57:53 UTC (rev 12631)
@@ -64,7 +64,7 @@
$content = $this->getHeaderFilesComments($module, $filename);
$content .= <<<EOT
\ninclude_once 'header.php';
-\$xoopsOption['template_main'] = 'index.tpl';
+\$xoopsOption['template_main'] = 'user_index.tpl';
include_once XOOPS_ROOT_PATH.'/header.php';
// Define Stylesheet
\$xoTheme->addStylesheet( \$style );
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/pages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/pages.php 2014-06-22 09:29:57 UTC (rev 12630)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/pages.php 2014-06-22 09:57:53 UTC (rev 12631)
@@ -129,7 +129,7 @@
$content = $this->getHeaderFilesComments($module, $filename);
$content .= <<<EOT
\ninclude_once 'header.php';
-\$xoopsOption['template_main'] = '{$table_name}.tpl';
+\$xoopsOption['template_main'] = 'user_{$table_name}.tpl';
include_once XOOPS_ROOT_PATH . '/header.php';
\$start = {$stl_mod_name}_CleanVars( \$_REQUEST, 'start', 0);
\$limit = xoops_getModuleOption('userpager', \$dirname);
@@ -182,7 +182,7 @@
unset(\${$table_fieldname});
}
// Display Navigation
- if (\${$stl_table_name}_count > \$limit}) {
+ if (\${$stl_table_name}_count > \$limit) {
include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
\$nav = new XoopsPageNav(\${$stl_table_name}_count, \$limit, \$start, 'start');
\$GLOBALS['xoopsTpl']->assign('pagenav', \$nav->renderNav(4));
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/submit.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/submit.php 2014-06-22 09:29:57 UTC (rev 12630)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/submit.php 2014-06-22 09:57:53 UTC (rev 12631)
@@ -62,7 +62,7 @@
include_once 'header.php';
\$op = downloads_CleanVars(\$_REQUEST, 'op', 'form', 'string');
// Template
-\$xoopsOption['template_main'] = 'submit.tpl';
+\$xoopsOption['template_main'] = 'user_submit.tpl';
include_once XOOPS_ROOT_PATH.'/header.php';
\$xoTheme->addStylesheet( XOOPS_URL . '/modules/' . \$xoopsModule->getVar('dirname', 'n') . '/css/style.css', null );
//On recupere la valeur de l'argument op dans l'URL$
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-22 09:29:57 UTC (rev 12630)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/xoopsversion.php 2014-06-22 09:57:53 UTC (rev 12631)
@@ -261,17 +261,17 @@
$tables = $this->getTables();
$ret = <<<EOT
// Templates Admin
-\$modversion['templates'][] = array('file' => 'header.tpl', 'description' => '', 'type' => 'admin');
-\$modversion['templates'][] = array('file' => 'index.tpl', 'description' => '', 'type' => 'admin');\n
+\$modversion['templates'][] = array('file' => 'admin_header.tpl', 'description' => '', 'type' => 'admin');
+\$modversion['templates'][] = array('file' => 'admin_index.tpl', 'description' => '', 'type' => 'admin');\n
EOT;
foreach (array_keys($tables) as $t)
{
$ret .= <<<EOT
-\$modversion['templates'][] = array('file' => '{$tables[$t]->getVar('table_name')}.tpl', 'description' => '', 'type' => 'admin');\n
+\$modversion['templates'][] = array('file' => 'admin_{$tables[$t]->getVar('table_name')}.tpl', 'description' => '', 'type' => 'admin');\n
EOT;
}
$ret .= <<<EOT
-\$modversion['templates'][] = array('file' => 'footer.tpl', 'description' => '', 'type' => 'admin');\n
+\$modversion['templates'][] = array('file' => 'admin_footer.tpl', 'description' => '', 'type' => 'admin');\n
EOT;
return $ret;
}
@@ -285,17 +285,17 @@
$tables = $this->getTables();
$ret = <<<EOT
// Templates User
-\$modversion['templates'][] = array('file' => 'header.tpl', 'description' => '');
-\$modversion['templates'][] = array('file' => 'index.tpl', 'description' => '');\n
+\$modversion['templates'][] = array('file' => 'user_header.tpl', 'description' => '');
+\$modversion['templates'][] = array('file' => 'user_index.tpl', 'description' => '');\n
EOT;
foreach (array_keys($tables) as $t)
{
$ret .= <<<EOT
-\$modversion['templates'][] = array('file' => '{$tables[$t]->getVar('table_name')}.tpl', 'description' => '');\n
+\$modversion['templates'][] = array('file' => 'user_{$tables[$t]->getVar('table_name')}.tpl', 'description' => '');\n
EOT;
}
$ret .= <<<EOT
-\$modversion['templates'][] = array('file' => 'footer.tpl', 'description' => '');\n
+\$modversion['templates'][] = array('file' => 'user_footer.tpl', 'description' => '');\n
EOT;
return $ret;
}
@@ -323,7 +323,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' => "{$table_name}.tpl");\n\n
+ 'template' => "'block_{$table_name}.tpl");\n\n
EOT;
$this->setKeywords($table_name);
}
@@ -617,33 +617,28 @@
$filename = $this->getFileName();
$module_name = $module->getVar('mod_name');
$language = $this->getLanguage($module_name, 'MI');
- $content = $this->getHeaderFilesComments($module, $filename);
- if(is_object($table)) {
- $content .= $this->getXoopsVersionHeader($module, $table, $language);
- $content .= $this->getXoopsVersionMySQL($module_name, $table);
- if ($table->getVar('table_search') == 1) {
- $content .= $this->getXoopsVersionSearch($module);
- }
- if ($table->getVar('table_comments') == 1) {
- $content .= $this->getXoopsVersionComments($module);
- }
- if($table->getVar('table_admin') == 1) {
- $content .= $this->getXoopsVersionTemplatesAdmin($module_name);
- }
- if($table->getVar('table_user') == 1) {
- $content .= $this->getXoopsVersionTemplatesUser($module_name);
- }
- if ($table->getVar('table_blocks') == 1) {
- $content .= $this->getXoopsVersionBlocks($module_name, $language);
- }
- $content .= $this->getXoopsVersionConfig($module, $table, $language);
- if ($table->getVar('table_notifications') == 1) {
- $content .= $this->getXoopsVersionNotifications($module, $language, $filename);
- }
- } else {
- $table = null;
- $content .= $this->getXoopsVersionHeader($module, $table, $language);
+ $content = $this->getHeaderFilesComments($module, $filename);
+ $content .= $this->getXoopsVersionHeader($module, $table, $language);
+ $content .= $this->getXoopsVersionMySQL($module_name, $table);
+ if ($table->getVar('table_search') == 1) {
+ $content .= $this->getXoopsVersionSearch($module);
}
+ if ($table->getVar('table_comments') == 1) {
+ $content .= $this->getXoopsVersionComments($module);
+ }
+ if($table->getVar('table_admin') == 1) {
+ $content .= $this->getXoopsVersionTemplatesAdmin($module_name);
+ }
+ if($table->getVar('table_user') == 1) {
+ $content .= $this->getXoopsVersionTemplatesUser($module_name);
+ }
+ if ($table->getVar('table_blocks') == 1) {
+ $content .= $this->getXoopsVersionBlocks($module_name, $language);
+ }
+ $content .= $this->getXoopsVersionConfig($module, $table, $language);
+ if ($table->getVar('table_notifications') == 1) {
+ $content .= $this->getXoopsVersionNotifications($module, $language, $filename);
+ }
$this->tdmcfile->create($module_name, '/', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
return $this->tdmcfile->renderFile();
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php 2014-06-22 09:29:57 UTC (rev 12630)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php 2014-06-22 09:57:53 UTC (rev 12631)
@@ -40,7 +40,7 @@
define('_AM_TDMCREATE_TABLES_FIELDS_MORE_SEARCH', "Search: Index");
define('_AM_TDMCREATE_TABLES_FIELDS_MORE_REQUIRED', "Forms: Required field");
-//General
+// General
define('_AM_TDMCREATE_FORMOK', "Successfully saved");
define('_AM_TDMCREATE_FORMDELOK', "Successfully deleted");
define('_AM_TDMCREATE_FORMSUREDEL', "Are you sure to delete: <b><span style='color : Red'>%s </span></b>");
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php 2014-06-22 09:29:57 UTC (rev 12630)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php 2014-06-22 09:57:53 UTC (rev 12631)
@@ -189,7 +189,7 @@
$modversion['config'][$i]['description'] = "";
$modversion['config'][$i]['formtype'] = "textbox";
$modversion['config'][$i]['valuetype'] = "text";
-$modversion['config'][$i]['default'] = '2.5.5';
+$modversion['config'][$i]['default'] = '2.5.7';
$i++;
$modversion['config'][$i]['name'] = "min_admin";
$modversion['config'][$i]['title'] = "_MI_TDMCREATE_MODULE_MIN_ADMIN";
|