|
From: <txm...@us...> - 2014-06-01 22:20:04
|
Revision: 12556
http://sourceforge.net/p/xoops/svn/12556
Author: txmodxoops
Date: 2014-06-01 22:19:51 +0000 (Sun, 01 Jun 2014)
Log Message:
-----------
Updated
Work in progress
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/css/admin/style.css
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/js/fields.js
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_xoopsversion.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/sql/mysql.sql
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/fields.tpl
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_notification_update.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_objects.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-05-28 22:48:37 UTC (rev 12555)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-06-01 22:19:51 UTC (rev 12556)
@@ -141,6 +141,8 @@
case 'new':
// Define main template
$template_main = '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'));
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php', 'list');
$adminMenu->addItemButton(_AM_TDMCREATE_FIELDS_LIST, 'fields.php', 'list');
@@ -180,8 +182,8 @@
$fieldsObj->setVar( 'field_attribute', (isset($_POST['field_attribute'][$i]) ? $_POST['field_attribute'][$i] : '') );
$fieldsObj->setVar( 'field_null', (isset($_POST['field_null'][$i]) ? $_POST['field_null'][$i] : '') );
$fieldsObj->setVar( 'field_default', (isset($_POST['field_default'][$i]) ? $_POST['field_default'][$i] : '') );
- $fieldsObj->setVar( 'field_key', (isset($_POST['field_key'][$i]) ? $_POST['field_key'][$i] : '') );
- $fieldsObj->setVar( 'field_element', (isset($_POST['field_element'][$i]) ? $_POST['field_element'][$i] : '') );
+ $fieldsObj->setVar( 'field_key', (isset($_POST['field_key'][$i]) ? $_POST['field_key'][$i] : '') );
+ $fieldsObj->setVar( 'field_element', (isset($_POST['field_element'][$i]) ? $_POST['field_element'][$i] : '') );
$fieldsObj->setVar( 'field_parent', (($i == isset($_REQUEST['field_parent'])) ? '1' : '0') );
$fieldsObj->setVar( 'field_inlist', ((isset($_REQUEST['field_inlist'][$i]) == 1) ? '1' : '0') );
$fieldsObj->setVar( 'field_inform', ((isset($_REQUEST['field_inform'][$i]) == 1) ? '1' : '0') );
@@ -218,6 +220,8 @@
case 'edit':
// Define main template
$template_main = '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'));
$adminMenu->addItemButton(_AM_TDMCREATE_ADD_TABLE, 'tables.php?op=new', 'add');
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php', 'list');
@@ -264,51 +268,43 @@
break;
case 'display':
- if (isset($_GET['field_tid'])) {
+ $fieldsObj =& $tdmcreate->getHandler('fields')->get($field_id);
+ if (isset($_GET['field_tid'])) {
if (isset($_GET['field_parent'])) {
$fld_parent = intval($_GET['field_parent']);
- $field_parent = ($fld_parent == 1) ? 0 : 1;
- $fieldsObj =& $tdmcreate->getHandler('fields')->get($field_id);
+ $field_parent = ($fld_parent == 1) ? 0 : 1;
$fieldsObj->setVar('field_parent', $field_parent);
} elseif (isset($_GET['field_inlist'])) {
$fld_inlist = intval($_GET['field_inlist']);
- $field_inlist = ($fld_inlist == 1) ? 0 : 1;
- $fieldsObj =& $tdmcreate->getHandler('fields')->get($field_id);
+ $field_inlist = ($fld_inlist == 1) ? 0 : 1;
$fieldsObj->setVar('field_inlist', $field_inlist);
} elseif (isset($_GET['field_inform'])) {
$fld_inform = intval($_GET['field_inform']);
- $field_inform = ($fld_inform == 1) ? 0 : 1;
- $fieldsObj =& $tdmcreate->getHandler('fields')->get($field_id);
+ $field_inform = ($fld_inform == 1) ? 0 : 1;
$fieldsObj->setVar('field_inform', $field_inform);
} elseif (isset($_GET['field_admin'])) {
$fld_admin = intval($_GET['field_admin']);
- $field_admin = ($fld_admin == 1) ? 0 : 1;
- $fieldsObj =& $tdmcreate->getHandler('fields')->get($field_id);
+ $field_admin = ($fld_admin == 1) ? 0 : 1;
$fieldsObj->setVar('field_admin', $field_admin);
} elseif (isset($_GET['field_user'])) {
$fld_user = intval($_GET['field_user']);
- $field_user = ($fld_user == 1) ? 0 : 1;
- $fieldsObj =& $tdmcreate->getHandler('fields')->get($field_id);
+ $field_user = ($fld_user == 1) ? 0 : 1;
$fieldsObj->setVar('field_user', $field_user);
} elseif (isset($_GET['field_block'])) {
$fld_block = intval($_GET['field_block']);
- $field_block = ($fld_block == 1) ? 0 : 1;
- $fieldsObj =& $tdmcreate->getHandler('fields')->get($field_id);
+ $field_block = ($fld_block == 1) ? 0 : 1;
$fieldsObj->setVar('field_block', $field_block);
} elseif (isset($_GET['field_main'])) {
$fld_main = intval($_GET['field_main']);
- $field_main = ($fld_main == 1) ? 0 : 1;
- $fieldsObj =& $tdmcreate->getHandler('fields')->get($field_id);
+ $field_main = ($fld_main == 1) ? 0 : 1;
$fieldsObj->setVar('field_main', $field_main);
} elseif (isset($_GET['field_search'])) {
$fld_search = intval($_GET['field_search']);
- $field_search = ($fld_search == 1) ? 0 : 1;
- $fieldsObj =& $tdmcreate->getHandler('fields')->get($field_id);
+ $field_search = ($fld_search == 1) ? 0 : 1;
$fieldsObj->setVar('field_search', $field_search);
} elseif (isset($_GET['field_required'])) {
$fld_required = intval($_GET['field_required']);
- $field_required = ($fld_required == 1) ? 0 : 1;
- $fieldsObj =& $tdmcreate->getHandler('fields')->get($field_id);
+ $field_required = ($fld_required == 1) ? 0 : 1;
$fieldsObj->setVar('field_required', $field_required);
}
if ($tdmcreate->getHandler('fields')->insert($fieldsObj, true)) {
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/css/admin/style.css
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/css/admin/style.css 2014-05-28 22:48:37 UTC (rev 12555)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/css/admin/style.css 2014-06-01 22:19:51 UTC (rev 12556)
@@ -21,6 +21,11 @@
table { margin: 0; padding: 0; }
+/* Sortable tables */
+tbody tr.sortable td img.move {
+ cursor: move;
+}
+
tr.modules td {
margin: 0;
padding: 5px;
@@ -47,8 +52,8 @@
vertical-align: middle;
}
-/*#show_rows { margin: 0; padding: 0; width: 60%; }*/
-#sortable tr { margin: 0 3px 3px 3px; padding: 0.4em; padding-left: 1.5em; font-size: 1.1em; height: 16px; }
+/*#show_rows { margin: 0; padding: 0; width: 60%; }
+#sortable tr { margin: 0 3px 3px 3px; padding: 0.4em; padding-left: 1.5em; font-size: 1.1em; height: 16px; }*/
.toggleChild {
display: none;
@@ -75,9 +80,40 @@
vertical-align: middle;
}
-.move { cursor: move; }
.width6{ width: 6%; }
.bred {background-color:rgba(255,0,0,0.3); padding: 5px; border-bottom: 1px solid #ccc;} / * red */
.bgreen {background-color:rgba(0,255,0,0.3); padding: 5px; border-bottom: 1px solid #ccc;} / * green */
-.bblue {background-color:rgba(0,0,255,0.3); padding: 5px; border-bottom: 1px solid #ccc;} / * blue */
\ No newline at end of file
+.bblue {background-color:rgba(0,0,255,0.3); padding: 5px; border-bottom: 1px solid #ccc;} / * blue */
+
+/* ---- fields parameters ---- */
+.column {
+ width: 170px;
+ float: left;
+ padding-bottom: 100px;
+}
+.portlet {
+ margin: 0 0.1em 1em 0;
+ padding: 0 0.3em;
+}
+.portlet-header {
+ padding: 0.2em 0.3em;
+ margin-bottom: 0.5em;
+ position: relative;
+ background-color:rgba(255,0,0,0.3);
+ border: 2px solid #bbb;
+}
+.portlet-toggle {
+ position: absolute;
+ top: 50%;
+ right: 0;
+ margin-top: -8px;
+}
+.portlet-content {
+ padding: 0.4em;
+}
+.portlet-placeholder {
+ border: 1px dotted black;
+ margin: 0 0.1em 1em 0;
+ height: 50px;
+}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/js/fields.js
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/js/fields.js 2014-05-28 22:48:37 UTC (rev 12555)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/js/fields.js 2014-06-01 22:19:51 UTC (rev 12556)
@@ -1,7 +1,7 @@
// Jquery function for side fields
$(document).ready( function() {
// Controls Drag & Drop
- $('#sortable tbody tr.sort').sortable({
+ $('tbody tr.sortable td:nth-child(1) img').sortable({
update: function(event, ui) {
var list = $(this).sortable( 'serialize');
$.post( 'fields.php?op=order', list );
@@ -13,6 +13,18 @@
$.post( 'fields.php?op=order', list );
}
}
- ).disableSelection();
+ );
+ $('tr.sortable').disableSelection();
+ $( ".portlet" )
+ .addClass( "ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" )
+ .find( ".portlet-header" )
+ .addClass( "ui-widget-header ui-corner-all" )
+ .prepend( "<span class='ui-icon ui-icon-minusthick portlet-toggle'></span>");
+
+ $( ".portlet-toggle" ).click(function() {
+ var icon = $( this );
+ icon.toggleClass( "ui-icon-minusthick ui-icon-plusthick" );
+ icon.closest( ".portlet" ).find( ".portlet-content" ).toggle();
+ });
}
-);
\ No newline at end of file
+);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-05-28 22:48:37 UTC (rev 12555)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-06-01 22:19:51 UTC (rev 12556)
@@ -181,7 +181,9 @@
$form->addElement(new TDMCreateFormLabel('<td> </td></tr>'));
} else {
// Box header row
- $parameters_tray = new XoopsFormElementTray('', '<br />');
+ $parameters_tray = new XoopsFormElementTray('', '<br />');
+ /*$parameters_header = new TDMCreateFormLabel('<div class="portlet"><div class="portlet-header">Images</div></div>')
+ $parameters_tray->addElement($parameters_header); */
// Field Elements
$criteria_element = new CriteriaCompo();
$criteria_element->add(new Criteria('fieldelement_tid', 0));
@@ -237,8 +239,7 @@
$check_field_required = new XoopsFormCheckBox(' ', 'field_required['.$i.']', $field_required);
$check_field_required->addOption(1, _AM_TDMCREATE_FIELD_REQUIRED);
$parameters_tray->addElement($check_field_required);
-
- $form->addElement(new TDMCreateFormLabel('<td>'.$parameters_tray->render().'</td></tr>'));
+ $form->addElement(new TDMCreateFormLabel('<td><div class="portlet"><div class="portlet-header">'._AM_TDMCREATE_FIELD_PARAMETERS_LIST.'</div><div class="portlet-content">'.$parameters_tray->render().'</div></div></td></tr>'));
}
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-05-28 22:48:37 UTC (rev 12555)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-06-01 22:19:51 UTC (rev 12556)
@@ -81,6 +81,22 @@
*/
public function createBaseFoldersFiles( $module )
{
+ // Module Id
+ $mod_id = $module->getVar('mod_id');
+ // Id of tables
+ $criteria_tables = new CriteriaCompo();
+ $criteria_tables->add(new Criteria('table_mid', $mod_id));
+ $tables = $this->tdmcreate->getHandler('tables')->getObjects($criteria_tables);
+ unset($criteria_tables);
+ //
+ foreach (array_keys($tables) as $t)
+ {
+ $table_name = $tables[$t]->getVar('table_name');
+ $table_admin = $tables[$t]->getVar('table_admin');
+ $table_user = $tables[$t]->getVar('table_user');
+ $table_block = $tables[$t]->getVar('table_block');
+ }
+ //
$indexFile = $this->path.'/index.html';
$docs_folder = $this->path.'/docs';
// Creation of the Directory in repository
@@ -93,12 +109,18 @@
$this->structure->makeDir($targetDirectory);
// Copied of index.html file in "root module" folder
$this->structure->copyFile('', $indexFile, 'index.html');
- // Creation of "admin" folder and index.html file
- $this->structure->makeDirAndCopyFile('admin', $indexFile, 'index.html');
- // Creation of "blocks" folder and index.html file
- $this->structure->makeDirAndCopyFile('blocks', $indexFile, 'index.html');
- // Creation of "class" folder and index.html file
- $this->structure->makeDirAndCopyFile('class', $indexFile, 'index.html');
+ if ( $table_admin == 1) {
+ // Creation of "admin" folder and index.html file
+ $this->structure->makeDirAndCopyFile('admin', $indexFile, 'index.html');
+ }
+ if ( $table_block == 1) {
+ // Creation of "blocks" folder and index.html file
+ $this->structure->makeDirAndCopyFile('blocks', $indexFile, 'index.html');
+ }
+ if ( $table_name != null) {
+ // Creation of "class" folder and index.html file
+ $this->structure->makeDirAndCopyFile('class', $indexFile, 'index.html');
+ }
// Creation of "assets" folder and index.html file
$this->structure->makeDirAndCopyFile('assets', $indexFile, 'index.html');
// Creation of "css" folder and index.html file
@@ -138,14 +160,22 @@
$this->structure->makeDirAndCopyFile('language/'.$GLOBALS['xoopsConfig']['language'], $indexFile, 'index.html');
// Creation of "language/local_language/help" folder and index.html file
$this->structure->makeDirAndCopyFile('language/'.$GLOBALS['xoopsConfig']['language']. '/help', $indexFile, 'index.html');
- // Creation of "templates" folder and index.html file
- $this->structure->makeDirAndCopyFile('templates', $indexFile, 'index.html');
- // Creation of "templates/admin" folder and index.html file
- $this->structure->makeDirAndCopyFile('templates/admin', $indexFile, 'index.html');
- // Creation of "templates/blocks" folder and index.html file
- $this->structure->makeDirAndCopyFile('templates/blocks', $indexFile, 'index.html');
- // Creation of "sql" folder and index.html file
- $this->structure->makeDirAndCopyFile('sql', $indexFile, 'index.html');
+ if (( $table_user == 1) || ( $table_admin == 1 )) {
+ // Creation of "templates" folder and index.html file
+ $this->structure->makeDirAndCopyFile('templates', $indexFile, 'index.html');
+ }
+ if ( $table_admin == 1 ) {
+ // Creation of "templates/admin" folder and index.html file
+ $this->structure->makeDirAndCopyFile('templates/admin', $indexFile, 'index.html');
+ }
+ if ( $table_block == 1 ) {
+ // Creation of "templates/blocks" folder and index.html file
+ $this->structure->makeDirAndCopyFile('templates/blocks', $indexFile, 'index.html');
+ }
+ if ( $table_name != null ) {
+ // Creation of "sql" folder and index.html file
+ $this->structure->makeDirAndCopyFile('sql', $indexFile, 'index.html');
+ }
}
/*
@@ -247,7 +277,7 @@
$ret[] = $includeComments->getCommentsNew($module, 'comment_new');
}
// Creation of notifications files
- if ( $table_notifications == 1) {
+ if ( $table_notifications == 1 ) {
// Include Notifications File
$includeNotifications = IncludeNotifications::getInstance($module, $table, $fields, 'notifications.php');
$ret[] = $includeNotifications->render();
@@ -288,7 +318,7 @@
$userPages = UserPages::getInstance($module, $table, $fields);
$ret[] = $userPages->renderFile($table_name.'.php');
// User Templates File
- $userTemplates = UserTemplates::getInstance($module, $table, $fields);
+ $userTemplates = UserTemplates::getInstance($module, $tables, $fields);
$ret[] = $userTemplates->renderFile($table_name.'.tpl');
}
var_dump($table_name);
@@ -337,6 +367,11 @@
$userIndex = UserIndex::getInstance($module, $table, 'index.php');
$ret[] = $userIndex->render();
}
+ if ( ($table_user == 1) && ($table_notifications == 1)){
+ // User Notification Update File
+ $userNotificationUpdate = UserNotificationUpdate::getInstance($module, 'notification_update.php');
+ $ret[] = $userNotificationUpdate->render();
+ }
// User Xoops Version File
$userXoopsVersion = UserXoopsVersion::getInstance($module, $table, $tables, 'xoops_version.php');
$ret[] = $userXoopsVersion->render();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php 2014-05-28 22:48:37 UTC (rev 12555)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php 2014-06-01 22:19:51 UTC (rev 12556)
@@ -416,7 +416,7 @@
* @package {$package}
* @since {$mod_since}
* @min_xoops {$mod_min_xoops}
- * @author {$mod_author} <{$mod_author_mail}> - <{$mod_author_website_url}>
+ * @author {$mod_author} - Email:<{$mod_author_mail}> - Website:<{$mod_author_website_url}>
* @version \$Id: {$mod_version} {$filename} {$mod_subversion} {$date}Z {$mod_credits} \$
*/\n
EOT;
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql_files.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql_files.php 2014-05-28 22:48:37 UTC (rev 12555)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql_files.php 2014-06-01 22:19:51 UTC (rev 12556)
@@ -276,19 +276,22 @@
}
/*
* @public function getFieldRow
- * @param string $type
- * @param array $struct
+ * @param string $field_name
+ * @param string $field_type_value
+ * @param array $field_attribute
+ * @param string $field_null
* @param string $field_default
+ * @param string $autoincrement
*/
- public function getFieldRow($field_name, $type, $field_attribute, $field_null, $field_default = '', $autoincrement = '')
+ public function getFieldRow($field_name, $field_type_value, $field_attribute, $field_null, $field_default = '', $autoincrement = '')
{
if(!empty($autoincrement)) {
$ret = <<<SQL
-`{$field_name}` {$type} {$field_attribute} {$field_null} {$field_default} {$autoincrement},\n
+`{$field_name}` {$field_type_value} {$field_attribute} {$field_null} {$field_default} {$autoincrement},\n
SQL;
} else {
$ret = <<<SQL
-`{$field_name}` {$type} {$field_attribute} {$field_null} {$field_default},\n
+`{$field_name}` {$field_type_value} {$field_attribute} {$field_null} {$field_default},\n
SQL;
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_footer.php 2014-05-28 22:48:37 UTC (rev 12555)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_footer.php 2014-06-01 22:19:51 UTC (rev 12556)
@@ -68,7 +68,6 @@
//$fields = $this->getFields();
$filename = $this->getFileName();
$module_name = $module->getVar('mod_name');
- $table_name = $this->table->getVar('table_name');
$language = $this->getLanguage($module_name, 'MA');
//$content = $this->getHeaderFilesComments($module, $filename);
$content = <<<EOT
@@ -80,7 +79,7 @@
<{/if}>
\n<div class="left"><{\$copyright}></div>
EOT;
- if( !empty($table_name) ) {
+ if( $this->table->getVar('table_name') != null ) {
$content .= <<<EOT
\n<{if \$pagenav != ''}>
<div class="right"><{\$pagenav}></div>
@@ -93,7 +92,7 @@
<div class="center bold"><a href="<{\$admin}>"><{\$smarty.const.{$language}ADMIN}></a></div>
<{/if}>
EOT;
- if ( $module->getVar('mod_comments') != 0 && $this->table->getVar('table_comments') != 0 ) {
+ if ( ($module->getVar('mod_comments') != 0) && ($this->table->getVar('table_comments') != 0) ) {
$content .= <<<EOT
\n<div class="pad2 marg2">
<{if \$comment_mode == "flat"}>
@@ -106,7 +105,7 @@
</div>
EOT;
}
- if ( $module->getVar('mod_notifications') != 0 && $this->table->getVar('table_notifications') != 0 ) {
+ if ( ($module->getVar('mod_notifications') != 0) && ($this->table->getVar('table_notifications') != 0) ) {
$content .= <<<EOT
\n<{include file='db:system_notification_select.html'}>
EOT;
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_header.php 2014-05-28 22:48:37 UTC (rev 12555)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_header.php 2014-06-01 22:19:51 UTC (rev 12556)
@@ -67,7 +67,7 @@
//$table = $this->getTable();
//$fields = $this->getFields();
$filename = $this->getFileName();
- $module_name = $module->getVar('mod_name');
+ $module_name = strtolower($module->getVar('mod_name'));
$language = $this->getLanguage($module_name, 'MA');
//$content = $this->getHeaderFilesComments($module, $filename);
$content = <<<EOT
@@ -98,8 +98,8 @@
$table_name = $this->tables[$i]->getVar('table_name');
$stu_table_name = strtoupper($table_name);
$content .= <<<EOT
-\n\t\t\t<li> | </li>
-\n\t\t\t<li><a href="<{\${$module_name}_url}>/{$table_name}.php"><{\$smarty.const.{$language}{$stu_table_name}}></a></li>
+ <li> | </li>
+ <li><a href="<{\${$module_name}_url}>/{$table_name}.php"><{\$smarty.const.{$language}{$stu_table_name}}></a></li>\n
EOT;
}
$content .= <<<EOT
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_index.php 2014-05-28 22:48:37 UTC (rev 12555)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_index.php 2014-06-01 22:19:51 UTC (rev 12556)
@@ -65,15 +65,15 @@
$language = $this->getLanguage($module_name, 'MA');
//$content = $this->getHeaderFilesComments($module, $filename);
$content = <<<EOT
-<{include file="db:{$module_name}_header.html"}>
-<table class="outer {$module_name}" cellspacing="0" cellpadding="0">
+<{include file="db:header.tpl"}>
+<table class="outer {$module_name}">
<tbody>
<tr class="left">
<td class="pad5"><{\$smarty.const.{$language}INDEX_DESC}></td>
</tr>
</tbody>
</table>
-<{include file="db:{$module_name}_footer.html"}>
+<{include file="db: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_index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_index.php 2014-05-28 22:48:37 UTC (rev 12555)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_index.php 2014-06-01 22:19:51 UTC (rev 12556)
@@ -70,7 +70,7 @@
$module_name = $module->getVar('mod_name');
$stl_mod_name = strtolower($module_name);
$stu_mod_name = strtoupper($module_name);
- $language = $this->getLanguage($module_name, 'MA', '_');
+ $language = $this->getLanguage($module_name, 'MA');
$content = $this->getHeaderFilesComments($module, $filename);
$content .= <<<EOT
\ninclude_once 'header.php';
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_notification_update.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_notification_update.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_notification_update.php 2014-06-01 22:19:51 UTC (rev 12556)
@@ -0,0 +1,69 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: 1.91 user_notification_update.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class UserNotificationUpdate extends TDMCreateFile
+{
+ /*
+ * @var string
+ */
+ private $tdmcfile = null;
+
+ /*
+ * @public function constructor
+ * @param string $module
+ * @param string $filename
+ */
+ public function __construct($module, $filename) {
+ $this->tdmcfile = TDMCreateFile::getInstance();
+ $this->setModule($module);
+ $this->setFileName($filename);
+ }
+ /*
+ * @static function &getInstance
+ * @param string $module
+ * @param string $filename
+ */
+ public static function &getInstance($module, $filename)
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self($module, $filename);
+ }
+ return $instance;
+ }
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ $module = $this->getModule();
+ $filename = $this->getFileName();
+ $module_name = strtolower($module->getVar('mod_name'));
+ $content = $this->getHeaderFilesComments($module, $filename);
+ $content .= <<<EOT
+include_once '../../mainfile.php';
+include_once XOOPS_ROOT_PATH.'/include/notification_update.php';
+EOT;
+ $this->tdmcfile->create($module_name, '/', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+ return $this->tdmcfile->renderFile();
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_objects.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_objects.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_objects.php 2014-06-01 22:19:51 UTC (rev 12556)
@@ -0,0 +1,71 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: user_objects.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class UserObjects
+{
+ /*
+ * @static function &getInstance
+ * @param null
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+ return $instance;
+ }
+ /*
+ * @public function getCodeUserHeader
+ * @param string $fieldname
+ */
+ public function getCodeUserHeader($fieldname) {
+ $ret = <<<EOT
+include_once 'header.php';
+\$xoopsOption['template_main'] = '{$fieldname}.tpl';
+include_once XOOPS_ROOT_PATH.'/header.php';\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getCodeUserIndex
+ * @param null
+ */
+ public function getCodeUserIndex() {
+ $ret = <<<EOT
+include_once 'header.php';
+\$xoopsOption['template_main'] = 'index.tpl';
+include_once XOOPS_ROOT_PATH.'/header.php';\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getCodeUserFooter
+ * @param null
+ */
+ public function getCodeUserFooter() {
+ $ret = <<<EOT
+include_once 'footer.php';
+EOT;
+ return $ret;
+ }
+}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_templates.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_templates.php 2014-05-28 22:48:37 UTC (rev 12555)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_templates.php 2014-06-01 22:19:51 UTC (rev 12556)
@@ -29,7 +29,7 @@
/*
* @var string
*/
- private $table = null;
+ private $tables = null;
/*
* @var string
*/
@@ -39,12 +39,12 @@
* @param string $module
* @param string $file_name
*/
- public function __construct($module, $table, $fields) {
+ public function __construct($module, $tables, $fields) {
$this->tdmcfile = TDMCreateFile::getInstance();
$this->setModule($module);
//$this->setTable($table);
//$this->setFileName($filename);
- $this->table = $table;
+ $this->tables = $tables;
$this->fields = $fields;
}
/*
@@ -53,11 +53,11 @@
* @param mixed $table
* @param string $filename
*/
- public static function &getInstance($module, $table, $fields)
+ public static function &getInstance($module, $tables, $fields)
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $table, $fields);
+ $instance = new self($module, $tables, $fields);
}
return $instance;
}
@@ -71,29 +71,34 @@
//$fields = $this->getFields();
//$filename = $this->getFileName();
$module_name = $module->getVar('mod_name');
- $table_name = $this->table->getVar('table_name');
- $table_fieldname = $this->table->getVar('table_fieldname');
+ foreach(array_keys($this->tables) as $t) {
+ $table_name = $this->tables[$t]->getVar('table_name');
+ $table_fieldname = $this->tables[$t]->getVar('table_fieldname');
+ }
$stu_module_name = strtoupper($module_name);
$language = $this->getLanguage($module_name, 'MA');
- $content = $this->getHeaderFilesComments($module, $filename);
- $content .= <<<EOT
+ //$content = $this->getHeaderFilesComments($module, $filename);
+ $content = <<<EOT
<{include file="db:header.tpl"}>
<div class="outer">
- <table class="{$table_name}" cellpadding="0" cellspacing="0" width="100%">
- <tr class="head">
+ <table class="{$table_name} width100">
+ <thead>
+ <tr class="head">\n
EOT;
foreach(array_keys($this->fields) as $f)
{
$field_name = $this->fields[$f]->getVar('field_name');
$lang_fn = $language.strtoupper($field_name);
$content .= <<<EOT
-<th class="center"><{\$smarty.const.{$lang_fn}}></th>
+ <th class="center"><{\$smarty.const.{$lang_fn}}></th>\n
EOT;
}
$content .= <<<EOT
-</tr>
- <{foreach item={$table_fieldname} from=\${$table_name}}>
- <tr class="<{cycle values='odd, even'}>">
+ </tr>
+ </thead>
+ <tbody>
+ <{foreach item={$table_fieldname} from=\${$table_name}}>
+ <tr class="<{cycle values='odd, even'}>">\n
EOT;
foreach(array_keys($this->fields) as $f)
{
@@ -101,21 +106,22 @@
$field_element = $this->fields[$f]->getVar('field_element');
if( $field_element == 9 ) {
$content .= <<<EOT
-<td class="center"><img src="<{\$xoops_url}>/uploads/{$module_name}/images/{$table_name}/<{\${$table_fieldname}.{$field_name}}>" alt="{$table_name}"></td>
+ <td class="center"><img src="<{\$xoops_url}>/uploads/{$module_name}/images/{$table_name}/<{\${$table_fieldname}.{$field_name}}>" alt="{$table_name}"></td>\n
EOT;
} elseif( $field_element == 8 ) {
$content .= <<<EOT
-<td class="center"><span style="background-color: <{\${$table_fieldname}.{$field_name}}>;"> </span></td>
+ <td class="center"><span style="background-color: <{\${$table_fieldname}.{$field_name}}>;"> </span></td>\n
EOT;
} else {
$content .= <<<EOT
-<td class="center"><{\${$table_fieldname}.{$field_name}}></td>
+ <td class="center"><{\${$table_fieldname}.{$field_name}}></td>\n
EOT;
}
}
$content .= <<<EOT
-</tr>
- <{/foreach}>
+ </tr>
+ <{/foreach}>
+ </tbody>
</table>
</div>
<div class="outer">
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-05-28 22:48:37 UTC (rev 12555)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_xoopsversion.php 2014-06-01 22:19:51 UTC (rev 12556)
@@ -280,12 +280,14 @@
{
$stl_mod_name = strtolower($module_name);
$ret = '';
+ $ret .= <<<EOT
+\n//Blocks
+EOT;
foreach (array_keys($this->tables) as $i) {
$table_name = $this->tables[$i]->getVar('table_name');
if ($this->tables[$i]->getVar('table_blocks') == 1) {
$language1 = $language . '_' . strtoupper($table_name);
$ret .= <<<EOT
-\n//Blocks
\n\$modversion['blocks'][] = array(
'file' => "{$table_name}.php",
'name' => {$language1}_BLOCK,
@@ -320,11 +322,11 @@
'formtype' => "select",
'valuetype' => "text",
'options' => array_flip(\$editor_handler->getList()),
- 'default' => "dhtml");
+ 'default' => "dhtml");\n
EOT;
if ( $module->getVar('mod_permissions') == 1 ) {
$ret .= <<<EOT
-\n\n// Get groups
+\n// Get groups
\$member_handler =& xoops_gethandler('member');
\$xoopsgroups = \$member_handler->getGroupList();
foreach (\$xoopsgroups as \$key => \$group) {
@@ -354,24 +356,24 @@
'formtype' => "select_multi",
'valuetype' => "array",
'options' => \$admin_groups,
- 'default' => \$admin_groups);
+ 'default' => \$admin_groups);\n
EOT;
}
$ret .= <<<EOT
-\n\n\$modversion['config'][] = array(
+\n\$modversion['config'][] = array(
'name' => "keywords",
'title' => "{$language}KEYWORDS",
'description' => "{$language}KEYWORDS_DESC",
'formtype' => "textbox",
'valuetype' => "text",
- 'default' => "{$stl_mod_name},
+ 'default' => "{$stl_mod_name},\n
EOT;
$ret .= implode(', ', $this->getKeywords());
$ret .= <<<EOT
");\n
EOT;
unset($this->keywords);
- if ( !empty($table_name) )
+ if ($this->table->getVar('table_name') != '')
{
$ret .= <<<EOT
\n//Uploads : maxsize of image
@@ -393,20 +395,23 @@
'default' => array("image/gif", "image/jpeg", "image/png"),
'options' => array("bmp" => "image/bmp","gif" => "image/gif","pjpeg" => "image/pjpeg",
"jpeg" => "image/jpeg","jpg" => "image/jpg","jpe" => "image/jpe",
- "png" => "image/png"));
+ "png" => "image/png"));\n
EOT;
}
- if ( !empty($table_name) ) {
+ if ($this->table->getVar('table_admin') == 1) {
$ret .= <<<EOT
-\n\n\$modversion['config'][] = array(
+\n\$modversion['config'][] = array(
'name' => "adminpager",
'title' => "{$language}ADMINPAGER",
'description' => "{$language}ADMINPAGER_DESC",
'formtype' => "textbox",
'valuetype' => "int",
- 'default' => 10);
-
-\$modversion['config'][] = array(
+ 'default' => 10);\n
+EOT;
+ }
+ if ($this->table->getVar('table_user') == 1) {
+ $ret .= <<<EOT
+\n\$modversion['config'][] = array(
'name' => "userpager",
'title' => "{$language}USERPAGER",
'description' => "{$language}USERPAGER_DESC",
@@ -438,7 +443,7 @@
'description' => "{$language}FBCOMMENTS_DESC",
'formtype' => "yesno",
'valuetype' => "int",
- 'default' => 0);
+ 'default' => 0);\n
EOT;
return $ret;
}
@@ -455,7 +460,7 @@
if ( $module->getVar('mod_notifications') == 1 )
{
$ret .= <<<EOT
-\n\n// Notifications {$stl_mod_name}
+\n// Notifications {$stl_mod_name}
\$modversion['hasNotification'] = 1;
\$modversion['notification']['lookup_file'] = 'include/notification.inc.php';
\$modversion['notification']['lookup_func'] = '{$stl_mod_name}_notify_iteminfo';
@@ -572,8 +577,7 @@
//$table = $this->getTable();
//$fields = $this->getFields();
$filename = $this->getFileName();
- $module_name = $module->getVar('mod_name');
- $table_name = $this->table->getVar('table_name');
+ $module_name = $module->getVar('mod_name');
$stu_module_name = strtoupper($module_name);
$language = $this->getLanguage($module_name, 'MI');
$content = $this->getHeaderFilesComments($module, $filename);
@@ -589,7 +593,7 @@
if ($this->table->getVar('table_blocks') == 1) {
$content .= $this->getXoopsVersionBlocks($module_name, $language);
}
- $content .= $this->getXoopsVersionConfig($module, $table_name, $language);
+ $content .= $this->getXoopsVersionConfig($module, $language);
if ($this->table->getVar('table_notifications') == 1) {
$content .= $this->getXoopsVersionNotifications($module, $language);
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php 2014-05-28 22:48:37 UTC (rev 12555)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php 2014-06-01 22:19:51 UTC (rev 12556)
@@ -77,5 +77,6 @@
include_once TDMC_PATH . $cf .'user_header.php';
include_once TDMC_PATH . $cf .'user_index.php';
include_once TDMC_PATH . $cf .'user_pages.php';
+include_once TDMC_PATH . $cf .'user_notification_update.php';
include_once TDMC_PATH . $cf .'user_templates.php';
include_once TDMC_PATH . $cf .'user_xoopsversion.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php 2014-05-28 22:48:37 UTC (rev 12555)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php 2014-06-01 22:19:51 UTC (rev 12556)
@@ -370,4 +370,5 @@
define('_AM_TDMCREATE_NOTOK_ARCHITECTURE', "<span class='red'>Problems: Creating the structure of the module (index.html, folders, icons, docs files)</span>");
define('_AM_TDMCREATE_FILE_NOTCREATED', "Problems: Creating file <b class='red'>%s</b> in the <span class='red bold'>%s</span> folder");
//
-define('_AM_TDMCREATE_BUILDING_DIRECTORY', "Files created in the directory <span class='bold'>uploads/tdmcreate/repository/</span> of the module <span class='bold green'>%s</span>");
\ No newline at end of file
+define('_AM_TDMCREATE_BUILDING_DIRECTORY', "Files created in the directory <span class='bold'>uploads/tdmcreate/repository/</span> of the module <span class='bold green'>%s</span>");
+define('_AM_TDMCREATE_FIELD_PARAMETERS_LIST', "<b>Parameters List</b>");
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/sql/mysql.sql
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/sql/mysql.sql 2014-05-28 22:48:37 UTC (rev 12555)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/sql/mysql.sql 2014-06-01 22:19:51 UTC (rev 12556)
@@ -1,32 +1,32 @@
CREATE TABLE `mod_tdmcreate_modules` (
- `mod_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT,
+ `mod_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT,
`mod_name` VARCHAR(255) NOT NULL DEFAULT '',
- `mod_version` VARCHAR(5) NOT NULL DEFAULT '',
- `mod_since` VARCHAR(5) NOT NULL DEFAULT '',
- `mod_min_php` VARCHAR(5) NOT NULL DEFAULT '',
- `mod_min_xoops` VARCHAR(5) NOT NULL DEFAULT '',
- `mod_min_admin` VARCHAR(5) NOT NULL DEFAULT '',
- `mod_min_mysql` VARCHAR(5) NOT NULL DEFAULT '',
+ `mod_version` VARCHAR(5) NOT NULL DEFAULT '1.0',
+ `mod_since` VARCHAR(5) NOT NULL DEFAULT '1.0',
+ `mod_min_php` VARCHAR(5) NOT NULL DEFAULT '5.3',
+ `mod_min_xoops` VARCHAR(5) NOT NULL DEFAULT '2.5.6',
+ `mod_min_admin` VARCHAR(5) NOT NULL DEFAULT '1.1',
+ `mod_min_mysql` VARCHAR(5) NOT NULL DEFAULT '5.0.7',
`mod_description` TEXT,
- `mod_author` VARCHAR(255) NOT NULL DEFAULT '',
- `mod_author_mail` VARCHAR(255) NOT NULL DEFAULT '',
- `mod_author_website_url` VARCHAR(255) NOT NULL DEFAULT '',
+ `mod_author` VARCHAR(255) NOT NULL DEFAULT 'TDM XOOPS',
+ `mod_author_mail` VARCHAR(255) NOT NULL DEFAULT 'in...@em...',
+ `mod_author_website_url` VARCHAR(255) NOT NULL DEFAULT 'http://',
`mod_author_website_name` VARCHAR(255) NOT NULL DEFAULT '',
- `mod_credits` VARCHAR(255) NOT NULL DEFAULT '',
- `mod_license` VARCHAR(255) NOT NULL DEFAULT '',
+ `mod_credits` VARCHAR(255) NOT NULL DEFAULT 'TDM XOOPS',
+ `mod_license` VARCHAR(255) NOT NULL DEFAULT 'GNU',
`mod_release_info` VARCHAR(255) NOT NULL DEFAULT '',
`mod_release_file` VARCHAR(255) NOT NULL DEFAULT '',
`mod_manual` VARCHAR(255) NOT NULL DEFAULT '',
`mod_manual_file` VARCHAR(255) NOT NULL DEFAULT '',
`mod_image` VARCHAR(255) NOT NULL DEFAULT '',
- `mod_demo_site_url` VARCHAR(255) NOT NULL DEFAULT '',
+ `mod_demo_site_url` VARCHAR(255) NOT NULL DEFAULT 'http://',
`mod_demo_site_name` VARCHAR(255) NOT NULL DEFAULT '',
- `mod_support_url` VARCHAR(255) NOT NULL DEFAULT '',
+ `mod_support_url` VARCHAR(255) NOT NULL DEFAULT 'http://',
`mod_support_name` VARCHAR(255) NOT NULL DEFAULT '',
- `mod_website_url` VARCHAR(255) NOT NULL DEFAULT '',
+ `mod_website_url` VARCHAR(255) NOT NULL DEFAULT 'http://',
`mod_website_name` VARCHAR(255) NOT NULL DEFAULT '',
`mod_release` VARCHAR(11) NOT NULL DEFAULT '00-00-0000',
- `mod_status` VARCHAR(150) NOT NULL DEFAULT '',
+ `mod_status` VARCHAR(150) NOT NULL DEFAULT 'Beta 1',
`mod_admin` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
`mod_user` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
`mod_search` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
@@ -34,12 +34,11 @@
`mod_notifications` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
`mod_permissions` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
`mod_inroot_copy` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
- `mod_donations` VARCHAR(50) NOT NULL DEFAULT '',
- `mod_subversion` VARCHAR(10) NOT NULL DEFAULT '',
+ `mod_donations` VARCHAR(50) NOT NULL DEFAULT '6KJ7RW5DR3VTJ',
+ `mod_subversion` VARCHAR(10) NOT NULL DEFAULT '12550',
PRIMARY KEY (`mod_id`),
UNIQUE KEY `mod_name` (`mod_name`)
-)
- ENGINE =MyISAM;
+)ENGINE =MyISAM;
CREATE TABLE `mod_tdmcreate_tables` (
@@ -65,8 +64,7 @@
PRIMARY KEY (`table_id`),
KEY `table_mid` (`table_mid`),
KEY `table_name` (`table_name`)
-)
- ENGINE =MyISAM;
+)ENGINE =MyISAM;
#
# Table structure for table `mod_tdmcreate_fields` 21
@@ -106,12 +104,12 @@
CREATE TABLE `mod_tdmcreate_languages` (
`lng_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT,
`lng_mid` INT(5) UNSIGNED NOT NULL DEFAULT '0',
- `lng_file` VARCHAR(255) NULL DEFAULT '',
- `lng_def` VARCHAR(255) NULL DEFAULT '',
- `lng_desc` VARCHAR(255) NULL DEFAULT '',
- PRIMARY KEY (`lng_id`)
-)
- ENGINE =MyISAM;
+ `lng_file` VARCHAR(255) NULL DEFAULT '',
+ `lng_define` VARCHAR(255) NULL DEFAULT '',
+ `lng_description` VARCHAR(255) NULL DEFAULT '',
+ PRIMARY KEY (`lng_id`),
+ KEY `lng_mid` (`lng_mid`)
+)ENGINE =MyISAM;
#
# Table structure for table `mod_tdmcreate_fieldtype` 2
@@ -121,8 +119,7 @@
`fieldtype_name` VARCHAR(255) NOT NULL DEFAULT '',
`fieldtype_value` VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY (`fieldtype_name`)
-)
- ENGINE =MyISAM;
+)ENGINE =MyISAM;
INSERT INTO `mod_tdmcreate_fieldtype` (`fieldtype_name`, `fieldtype_value`) VALUES
('', ''),
@@ -157,8 +154,7 @@
`fieldattribute_name` VARCHAR(255) NOT NULL DEFAULT '',
`fieldattribute_value` VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY (`fieldattribute_name`)
-)
- ENGINE =MyISAM;
+)ENGINE =MyISAM;
INSERT INTO `mod_tdmcreate_fieldattributes` (`fieldattribute_name`, `fieldattribute_value`) VALUES
('', ''),
@@ -175,8 +171,7 @@
`fieldnull_name` VARCHAR(255) NOT NULL DEFAULT '',
`fieldnull_value` VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY (`fieldnull_name`)
-)
- ENGINE =MyISAM;
+)ENGINE =MyISAM;
INSERT INTO `mod_tdmcreate_fieldnull` (`fieldnull_name`, `fieldnull_value`) VALUES
('NOT NULL', 'NOT NULL'),
@@ -190,8 +185,7 @@
`fieldkey_name` VARCHAR(255) NOT NULL DEFAULT '',
`fieldkey_value` VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY (`fieldkey_name`)
-)
- ENGINE =MyISAM;
+)ENGINE =MyISAM;
INSERT INTO `mod_tdmcreate_fieldkey` (`fieldkey_name`, `fieldkey_value`) VALUES
('', ''),
@@ -211,10 +205,9 @@
`fieldelement_name` VARCHAR(100) NOT NULL DEFAULT '',
`fieldelement_value` VARCHAR(100) NOT NULL DEFAULT '',
PRIMARY KEY (`fieldelement_id`),
- KEY `fieldelement_name` (`fieldelement_name`),
- KEY `fieldelement_value` (`fieldelement_value`)
-)
- ENGINE =MyISAM;
+ KEY `fieldelement_mid` (`fieldelement_mid`),
+ KEY `fieldelement_tid` (`fieldelement_tid`)
+)ENGINE =MyISAM;
INSERT INTO `mod_tdmcreate_fieldelements` (`fieldelement_id`, `fieldelement_mid`, `fieldelement_tid`, `fieldelement_name`, `fieldelement_value`) VALUES
(1, 0, 0, 'Text', 'XoopsFormText'),
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/fields.tpl
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/fields.tpl 2014-05-28 22:48:37 UTC (rev 12555)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/fields.tpl 2014-06-01 22:19:51 UTC (rev 12556)
@@ -6,7 +6,7 @@
</script>
<!-- Display tables list -->
<{if $tables_list}>
- <table id='sortable' class='outer width100'>
+ <table class='outer width100'>
<thead>
<tr>
<th class='center'><{$smarty.const._AM_TDMCREATE_ID_LIST}></th>
@@ -17,11 +17,11 @@
<th class='center'><{$smarty.const._AM_TDMCREATE_INLIST_LIST}></th>
<th class='center'><{$smarty.const._AM_TDMCREATE_INFORM_LIST}></th>
<th class='center'><{$smarty.const._AM_TDMCREATE_ADMIN_LIST}></th>
- <th class='center'><{$smarty.const._AM_TDMCREATE_USER_LIST}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_USER_LIST}></th>
<th class='center'><{$smarty.const._AM_TDMCREATE_BLOCK_LIST}></th>
<th class='center'><{$smarty.const._AM_TDMCREATE_MAIN_LIST}></th>
<th class='center'><{$smarty.const._AM_TDMCREATE_SEARCH_LIST}></th>
- <th class='center'><{$smarty.const._AM_TDMCREATE_REQUIRED_LIST}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_REQUIRED_LIST}></th>
<th class='center width6'><{$smarty.const._AM_TDMCREATE_FORMACTION}></th>
</tr>
</thead>
@@ -56,12 +56,12 @@
</td>
</tr>
<{foreach item=field from=$table.fields}>
- <tr class="<{cycle values='even,odd'}> sort toggleChild">
+ <tr class="<{cycle values='even,odd'}> sortable toggleChild">
<td class='center'>[<{$field.lid}>] <img class="move" src="<{$modPathIcon16}>/drag.png" alt="<{$field.name}>" /></td>
<td class='center'><{$field.name}></td>
<td class='center'><img src="<{$modPathIcon16}>/tables.png" alt="Empty" /></td>
<td class='center'><img src="<{$modPathIcon16}>/tables.png" alt="Empty" /></td>
- <td class='center'><img id="loading_img_parent<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_parent<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_parent: <{if $field.parent && ($field.parent == false)}>0<{else}>1<{/if}> }, 'img_parent<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.parent}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" />
+ <td class='center'><img id="loading_img_parent<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_parent<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_parent: <{if $field.parent}>0<{else}>1<{/if}> }, 'img_parent<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.parent}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" />
</td>
<td class='center'><img id="loading_img_inlist<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_inlist<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_inlist: <{if $field.inlist}>0<{else}>1<{/if}> }, 'img_inlist<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.inlist}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" />
</td>
@@ -73,11 +73,11 @@
</td>
<td class='center'><img id="loading_img_block<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_block<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_block: <{if $field.block}>0<{else}>1<{/if}> }, 'img_block<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.block}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" />
</td>
- <td class='center'><img id="loading_img_main<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_main<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_main: <{if $field.main && ($field.main == false)}>0<{else}>1<{/if}> }, 'img_main<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.main}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" />
+ <td class='center'><img id="loading_img_main<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_main<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_main: <{if $field.main}>0<{else}>1<{/if}> }, 'img_main<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.main}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" />
</td>
<td class='center'><img id="loading_img_search<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_search<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_search: <{if $field.search}>0<{else}>1<{/if}> }, 'img_search<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.search}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" />
</td>
- <td class='center'><img id="loading_img_required<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_required<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_required: <{if $field.required}>0<{else}>1<{/if}> }, 'img_required<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.required}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" />
+ <td class='center'><img id="loading_img_required<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_required<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_required: <{if $field.required}>0<{else}>1<{/if}> }, 'img_required<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.required}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" />
</td>
<td class='center'><img src="<{$modPathIcon16}>/left_right.png" alt="Empty" /></td>
</tr>
|