|
From: <txm...@us...> - 2013-05-10 14:49:23
|
Revision: 11525
http://sourceforge.net/p/xoops/svn/11525
Author: txmodxoops
Date: 2013-05-10 14:49:13 +0000 (Fri, 10 May 2013)
Log Message:
-----------
Updated
Is needed reinstallation for test
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/building.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/class/tdmcreate_modules.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/class/tdmcreate_tables.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_admin_pages.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_class.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_header.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_include_comments.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_include_search.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_xoopsversion.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/include/functions_const.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/english/modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/sql/mysql.sql
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/xoops_version.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/building.php 2013-05-10 10:40:40 UTC (rev 11524)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/building.php 2013-05-10 14:49:13 UTC (rev 11525)
@@ -104,7 +104,7 @@
}
// Creation of classes
if ( $table_admin == 1 || $table_user == 1) {
- const_class($modules, $mod_name, $table_name, $table_fieldname, $category, $table_fields, $table_parameters, $category);
+ const_class($modules, $mod_name, $table_name, $table_fieldname, $table_fields, $table_parameters, $category);
}
// Creation of permissions
if ( $table_category == 1) {
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/modules.php 2013-05-10 10:40:40 UTC (rev 11524)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/modules.php 2013-05-10 14:49:13 UTC (rev 11525)
@@ -55,6 +55,10 @@
//remove all spaces from the new name
$obj->setVar('mod_name', preg_replace('/\s+/', '', $_POST['mod_name']));
$obj->setVar('mod_version', $_POST['mod_version']);
+ $obj->setVar('mod_min_php', $_POST['mod_min_php']);
+ $obj->setVar('mod_min_xoops', $_POST['mod_min_xoops']);
+ $obj->setVar('mod_min_admin', $_POST['mod_min_admin']);
+ $obj->setVar('mod_min_db', $_POST['mod_min_db']);
$obj->setVar('mod_description', $_POST['mod_description']);
$obj->setVar('mod_author', $_POST['mod_author']);
$obj->setVar('mod_author_mail', $_POST['mod_author_mail']);
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/tables.php 2013-05-10 10:40:40 UTC (rev 11524)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/tables.php 2013-05-10 14:49:13 UTC (rev 11525)
@@ -146,7 +146,7 @@
}
if ( isset($_REQUEST['table_online']) ) {
if ( $_REQUEST['table_online'] == 1 ) {
- $table_fields .= '|'.strtolower($_REQUEST['table_fieldname']).'_online:tinyint:1: unsigned:NOT NULL:0:'; $table_parameters .= '|XoopsFormCheckBox:1:1:1:0:0:1';
+ $table_fields .= '|'.strtolower($_REQUEST['table_fieldname']).'_online:tinyint:1:unsigned:NOT NULL:0:'; $table_parameters .= '|XoopsFormCheckBox:1:1:1:0:0:1';
}
} else {
$table_fields .= '';
@@ -396,14 +396,14 @@
{
echo '<table width="100%" cellspacing="1" class="outer">';
echo '<tr>';
- echo '<th align="center" width="1%">'._AM_TDMCREATE_ID.'</th>';
- echo '<th align="center" width="10%">'._AM_TDMCREATE_NAME.'</th>';
- echo '<th align="center" width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
- echo '<th align="center" width="10%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
- echo '<th align="center" width="10%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
- echo '<th align="center" width="10%">'._AM_TDMCREATE_BLOCKS.'</th>';
- echo '<th align="center" width="10%">'._AM_TDMCREATE_NB_FIELDS.'</th>';
- echo '<th align="center" width="1%">'._AM_TDMCREATE_FORMACTION.'</th>';
+ echo '<th class="center width1">'._AM_TDMCREATE_ID.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_NAME.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_IMAGE.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_BLOCKS.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_NB_FIELDS.'</th>';
+ echo '<th class="center width5">'._AM_TDMCREATE_FORMACTION.'</th>';
echo '</tr>';
$class = 'odd';
foreach (array_keys($mod_arr) as $i)
@@ -460,14 +460,14 @@
} else {
echo '<table width="100%" cellspacing="1" class="outer">';
echo '<tr class="center">';
- echo '<th width="1%">'._AM_TDMCREATE_ID.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_NAME.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
- echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
- echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_BLOCKS.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_NB_FIELDS.'</th>';
- echo '<th width="1%">'._AM_TDMCREATE_FORMACTION.'</th>';
+ echo '<th class="center width1">'._AM_TDMCREATE_ID.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_NAME.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_IMAGE.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_BLOCKS.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_NB_FIELDS.'</th>';
+ echo '<th class="center width5">'._AM_TDMCREATE_FORMACTION.'</th>';
echo '<tr><td class="errorMsg" colspan="8">No modules</td></tr>';
echo '</tr></table><br><br>';
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/class/tdmcreate_modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/class/tdmcreate_modules.php 2013-05-10 10:40:40 UTC (rev 11524)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/class/tdmcreate_modules.php 2013-05-10 14:49:13 UTC (rev 11525)
@@ -33,6 +33,10 @@
$this->initVar('mod_id',XOBJ_DTYPE_INT, 0,false,5);
$this->initVar('mod_name',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['name'],false);
$this->initVar('mod_version',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['version'],false);
+ $this->initVar('mod_min_php',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_php'],false);
+ $this->initVar('mod_min_xoops',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_xoops'],false);
+ $this->initVar('mod_min_admin',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_admin'],false);
+ $this->initVar('mod_min_db',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_db'],false);
$this->initVar('mod_description',XOBJ_DTYPE_TXTAREA, $GLOBALS['xoopsModuleConfig']['description'], false);
$this->initVar('mod_author',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['author'], false);
$this->initVar('mod_author_mail',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['author_email'],false);
@@ -78,7 +82,11 @@
$form->insertBreak('<div class="center"><b>'._AM_TDMCREATE_MODULES_IMPORTANT.'</b></div>','head');
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_NAME, 'mod_name', 50, 255, $this->getVar('mod_name')), true);
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_VERSION, 'mod_version', 50, 255, $this->getVar('mod_version')), true);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_VERSION, 'mod_version', 10, 25, $this->getVar('mod_version')), true);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MIN_PHP, 'mod_min_php', 10, 25, $this->getVar('mod_min_php')), true);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MIN_XOOPS, 'mod_min_xoops', 10, 25, $this->getVar('mod_min_xoops')), true);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MIN_ADMIN, 'mod_min_admin', 10, 25, $this->getVar('mod_min_admin')), true);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MIN_DB, 'mod_min_db', 10, 25, $this->getVar('mod_min_db')), true);
// Name description
$editor_configs=array();
$editor_configs['name'] = 'mod_description';
@@ -232,7 +240,7 @@
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_RELEASE, 'mod_release', 50, 255, $this->getVar('mod_release')));
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_STATUS, 'mod_status', 50, 255, $this->getVar('mod_status')));
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_PAYPAL_BUTTON, 'mod_donations', 50, 255, $this->getVar('mod_donations')));
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_SUBVERSION, 'mod_subversion', 50, 255, $this->getVar('mod_subversion')));
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_SUBVERSION, 'mod_subversion', 20, 25, $this->getVar('mod_subversion')));
$form->addElement(new XoopsFormHidden('op', 'save'));
$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/class/tdmcreate_tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/class/tdmcreate_tables.php 2013-05-10 10:40:40 UTC (rev 11524)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/class/tdmcreate_tables.php 2013-05-10 14:49:13 UTC (rev 11525)
@@ -137,7 +137,7 @@
</SELECT></td>
<td align='center'>";
if ( $i != 0 ) {
- echo "<table border='0' style='border-color:#666666'; width='100%' cellspacing='1' class='outer'>
+ echo "<table border='0' style='border-color:#555'; width='100%' cellspacing='1' class='outer'>
<tr>
<td align='left' class='head' width='95%'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_ELEMENTS."</td>
<td align='right' class='even' width='5%'>
@@ -191,34 +191,25 @@
<td align='right' class='even'><INPUT type='checkbox' size='4' name='fields_param_list[".$i."]' checked></td>
</tr>
";
- //Afficher la case blocks
- if ( $table_blocks == 1 )
- {
- //Pour l'affichage dans les blocks
- $checked_blocks = ( $i == 1 || $i == 2 ) ? "checked" : "";
- echo "<tr>
- <td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_BLOC."</td>
- <td align='right' class='even'><INPUT type='checkbox' size='4' name='fields_param_blocks[".$i."]' ".$checked_blocks."></td>
- </tr>";
- }
+ //Pour l'affichage dans les blocks
+ $checked_blocks = ( $i == 1 || $i == 2 ) ? "checked" : "";
+ echo "<tr>
+ <td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_BLOCK."</td>
+ <td align='right' class='even'><INPUT type='checkbox' size='4' name='fields_param_blocks[".$i."]' ".$checked_blocks."></td>
+ </tr>";
$checked_main_field = ( $i == 1 ) ? "checked" : "";
echo "
<tr>
<td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_MAIN_FIELD."</td>
<td align='right' class='even'><INPUT type='radio' value='".$i."' name='fields_param_main_field' ".$checked_main_field."></td>
- </tr>";
-
- //Afficher la case search
- if ( $table_search == 1 )
- {
- echo "
- <tr>
- <td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_SEARCH."</td>
- <td align='right' class='even'><INPUT type='checkbox' size='4' name='param_search_field[".$i."]' checked></td>
- </tr>";
- }
+ </tr>";
echo "
<tr>
+ <td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_SEARCH."</td>
+ <td align='right' class='even'><INPUT type='checkbox' size='4' name='param_search_field[".$i."]' checked></td>
+ </tr>";
+ echo "
+ <tr>
<td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_REQUIRED."</td>
<td align='right' class='even'><INPUT type='checkbox' size='4' name='param_required_field[".$i."]' checked></td>
</tr>
@@ -648,21 +639,17 @@
}
echo "</td>
</tr>
- ";
- //Afficher la case blocks
- if ( $table_blocks == 1 )
- {
- echo "<tr>
- <td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_BLOC."</td>
- <td align='right' class='even'>";
- if ( $param_display_blocks[$i] == 1 ) {
- echo "<INPUT type='checkbox' size='4' name='fields_param_blocks[".$i."]' checked>";
- } else {
- echo "<INPUT type='checkbox' size='4' name='fields_param_blocks[".$i."]'>";
- }
- echo "</td>
- </tr>";
+ ";
+ echo "<tr>
+ <td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_BLOCK."</td>
+ <td align='right' class='even'>";
+ if ( $param_display_blocks[$i] == 1 ) {
+ echo "<INPUT type='checkbox' size='4' name='fields_param_blocks[".$i."]' checked>";
+ } else {
+ echo "<INPUT type='checkbox' size='4' name='fields_param_blocks[".$i."]'>";
}
+ echo "</td>
+ </tr>";
echo "
<tr>
<td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_MAIN_FIELD."</td>
@@ -673,10 +660,7 @@
echo "<INPUT type='radio' value='".$i."' name='fields_param_main_field'>";
}
echo "</td>
- </tr>";
- //Afficher la case recherche
- if ( $table_search == 1 )
- {
+ </tr>";
echo "
<tr>
<td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_SEARCH.",</td>
@@ -687,8 +671,7 @@
echo "<INPUT type='checkbox' size='4' name='param_search_field[".$i."]'>";
}
echo "</td>
- </tr>";
- }
+ </tr>";
echo "
<tr>
<td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_REQUIRED."</td>
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_admin_pages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_admin_pages.php 2013-05-10 10:40:40 UTC (rev 11524)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_admin_pages.php 2013-05-10 14:49:13 UTC (rev 11525)
@@ -50,34 +50,34 @@
$fields1 = explode(':', $fields_total[$i]);
$fields[$i] = $fields1[0];
//Afficher dans l'admin
- if( $i == 0 ) {
- $fpa[$i] = '0';
- $fpa[$i] = '0';
- $fpu[$i] = '0';
- $fpf[$i] = '0';
- $fpl[$i] = '0';
- $fpb[$i] = '0';
- $fpm[$i] = '0';
- $fps[$i] = '0';
- $fpr[$i] = '0';
- } else {
- $param = explode(':', $parameters_total[$i-1]);
- $fpt[$i] = $param[0]; // fpt = fields parameters type
- $fpa[$i] = $param[1]; // fpa = fields parameters admin
- $fpu[$i] = $param[2]; // fpu = fields parameters user
- $fpf[$i] = $param[3]; // fpf = fields parameters form
- $fpl[$i] = $param[4]; // fpl = fields parameters list
- $fpb[$i] = $param[5]; // fpb = fields parameters block
- $fps[$i] = $param[7]; // fps = fields parameters search
- $fpr[$i] = $param[8]; // fpr = fields parameters required field
- if ( $param[6] == 1 ) {
- $fpm = $fields[0]; // fpm = fields parameters main field
- }
- }
+ if( $i == 0 ) {
+ $fpe[$i] = $fields[0];
+ $fpa[$i] = '0';
+ $fpu[$i] = '0';
+ $fpf[$i] = '0';
+ $fpl[$i] = '0';
+ $fpb[$i] = '0';
+ $fpm[$i] = '0';
+ $fps[$i] = '0';
+ $fpr[$i] = '0';
+ } else {
+ $param = explode(':', $parameters_total[$i-1]);
+ $fpe[$i] = $param[0]; // fpe = fields parameters element
+ $fpa[$i] = $param[1]; // fpa = fields parameters admin
+ $fpu[$i] = $param[2]; // fpu = fields parameters user
+ $fpf[$i] = $param[3]; // fpf = fields parameters form
+ $fpl[$i] = $param[4]; // fpl = fields parameters list
+ $fpb[$i] = $param[5]; // fpb = fields parameters block
+ if ( $param[6] == 1 ) {
+ $fpm[$i] = $fields[0]; // fpm = fields parameters main field
+ }
+ $fps[$i] = $param[7]; // fps = fields parameters search
+ $fpr[$i] = $param[8]; // fpr = fields parameters required field
+ }
}
$field_id = $fields[0];
-$fields_name = $fields[1];
+$field_name = $fields[1];
$text .= '
echo $adminMenu->addNavigation(\''.$table_name.'.php\');
@@ -93,7 +93,7 @@
$numrows = $'.$table_name.'Handler->getCount();
$'.$table_name.'_arr = $'.$table_name.'Handler->getAll($criteria);
';
- $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpu, $fpb, $fps, $fpt, $language, '', 0);
+ $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpe, $fpa, $fpu, $fpf, $fpl, $fpb, $fps, $language, '', 0);
if ( $table_category != 1 )
{
$text .='
@@ -113,7 +113,7 @@
echo "<tr class=\'".$class."\'>";
$class = ($class == "even") ? "odd" : "even";
';
- $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpu, $fpb, $fps, $fpt, $language, '', 1);
+ $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpe, $fpa, $fpu, $fpf, $fpl, $fpb, $fps, $language, '', 1);
$text .= $fields_data.'
echo "<td class=\'center width5\'>
@@ -148,7 +148,7 @@
$cat_weight = $categories_arr[$i]->getVar(\'cat_weight\');
echo "<tr class=\'".$class."\'>";
';
- $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpu, $fpb, $fps, $fpt, $language, '', 1);
+ $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpe, $fpa, $fpu, $fpf, $fpl, $fpb, $fps, $language, '', 1);
$text .= ''.$fields_data.'
echo "<td class=\'center width5\'>
@@ -175,7 +175,7 @@
{
echo "<table width=\'100%\' cellspacing=\'1\' class=\'outer\'>
<tr>';
- $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpu, $fpb, $fps, $fpt, $language, '', 0);
+ $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpe, $fpa, $fpu, $fpf, $fpl, $fpb, $fps, $language, '', 0);
$text .= $fcn.'
<th class=\'center width5\'>".'.$language.'_FORMACTION."</th>
</tr>";
@@ -191,7 +191,7 @@
$category_weight = $'.$table_name.'_arr[$i]->getVar(\''.$table_fieldname.'_weight\');
echo "<tr class=\'".$class."\'>";
';
- $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpu, $fpb, $fps, $fpt, $language, 1, 1);
+ $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpe, $fpa, $fpu, $fpf, $fpl, $fpb, $fps, $language, 1, 1);
$text .= ''.$fields_data.'
echo "<td class=\'center width5\'>
@@ -217,7 +217,7 @@
} else {
echo "<table width=\'100%\' cellspacing=\'1\' class=\'outer\'>
<tr>';
- $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpu, $fpb, $fps, $fpt, $language, '', 0);
+ $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpe, $fpa, $fpu, $fpf, $fpl, $fpb, $fps, $language, '', 0);
$text .= $fcn.'
<th class=\'center width5\'>".'.$language.'_FORMACTION."</th>
</tr>
@@ -250,7 +250,7 @@
';
- $fields_save = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpu, $fpb, $fps, $fpt, $language, '', 2);
+ $fields_save = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpe, $fpa, $fpu, $fpf, $fpl, $fpb, $fps, $language, '', 2);
$text .= ''.$fields_save.'
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_class.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_class.php 2013-05-10 10:40:40 UTC (rev 11524)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_class.php 2013-05-10 14:49:13 UTC (rev 11525)
@@ -19,12 +19,12 @@
* @version $Id: const_class.php 11084 2013-02-23 15:44:20Z timgno $
*/
include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php';
-function const_class($modules, $mod_name, $table_name, $table_fieldname, $table_category, $table_fields, $table_parameters, $category)
+function const_class($modules, $mod_name, $table_name, $table_fieldname, $table_fields, $table_parameters, $category)
{
$language = '_AM_'.strtoupper($mod_name).'_';
$file = $mod_name.'_'.$table_name. '.php';
$path_file = TDM_CREATE_MURL.'/'.$mod_name.'/class/'.$file;
- $constructor = const_fields($mod_name, $table_name, $table_fieldname, $table_category, $table_fields, $language, 0, 0, 0, 0);
+ $constructor = const_fields($mod_name, $table_name, $table_fieldname, $table_fields, $language, 0, 0, 0);
//fields
$fields_total = explode('|', $table_fields);
$nb_fields = count($fields_total);
@@ -39,23 +39,24 @@
//Afficher dans les elements du formulaire et choisir le type
if( $i == 0 ) {
$fpaif = $fields[0]; // fpaif = fields parameters auto_increment field
- $fpt[$i] = '0';
+ $fpe[$i] = '0';
$fpa[$i] = '0';
$fpu[$i] = '0';
$fpf[$i] = '0';
- $fpl[$i] = '0';
- $fpr[$i] = '0';
+ $fpl[$i] = '0';
+ $fpr[$i] = '0';
+ $fpmf[$i] = '0';
} else {
$param = explode(':', $parameters_total[$i-1]);
//print_r($param);
- $fpt[$i] = $param[0]; // fpt = fields parameters types
- $fpa[$i] = $param[1]; // fpdf = fields parameters display form
- $fpu[$i] = $param[2]; // fpdf = fields parameters display form
- $fpf[$i] = $param[3]; // fpdf = fields parameters display form
- $fpl[$i] = $param[4]; // fpdf = fields parameters display form
- $fpr[$i] = $param[8]; // fprf = fields parameters required field
+ $fpe[$i] = $param[0]; // fpe = fields parameters elements
+ $fpa[$i] = $param[1]; // fpa = fields parameters display admin
+ $fpu[$i] = $param[2]; // fpu = fields parameters display user
+ $fpf[$i] = $param[3]; // fpf = fields parameters display form
+ $fpl[$i] = $param[4]; // fpl = fields parameters display list
+ $fpr[$i] = $param[8]; // fpr = fields parameters required field
if ( $param[6] == 1 ) {
- $fpmf = $fields[0]; // fpmf = fields parameters main field
+ $fpmf[$i] = $fields[0]; // fpmf = fields parameters main field
}
}
}
@@ -90,7 +91,7 @@
$form->setExtra(\'enctype="multipart/form-data"\');
';
- $text .= const_fields($mod_name, $table_name, $table_fieldname, $table_category, $table_fields, $language, $fpt, $fpr, 1);
+ $text .= const_fields($mod_name, $table_name, $table_fieldname, $table_fields, $language, $fpe, $fpr, 1);
if( $category == 1) {
$up_mod_name = strtoupper($mod_name);
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_header.php 2013-05-10 10:40:40 UTC (rev 11524)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_header.php 2013-05-10 14:49:13 UTC (rev 11525)
@@ -23,6 +23,7 @@
$text = '';
$mod_name = $module->getVar('mod_name');
$mod_version = $module->getVar('mod_version');
+$mod_min_xoops = $module->getVar('mod_min_xoops');
$mod_revision = $module->getVar('mod_revision');
$mod_author = $module->getVar('mod_author');
$mod_credits = $module->getVar('mod_credits');
@@ -49,11 +50,10 @@
* @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
* @license '.$mod_license.'
* @package '.$mod_name.'
- * @since 2.5.x
+ * @since '.$mod_min_xoops.'
* @author '.$mod_author.' <'.$mod_a_m.'> - <'.$mod_a_w_url.'>
* @version $Id: '.$mod_version.' '.$filename.' '.$mod_subversion.' '.$date.'Z '.$mod_credits.' $
*/
';
return $text;
-}
-?>
\ No newline at end of file
+}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_include_comments.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_include_comments.php 2013-05-10 10:40:40 UTC (rev 11524)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_include_comments.php 2013-05-10 14:49:13 UTC (rev 11525)
@@ -77,12 +77,13 @@
{
$fields = explode(':', $fields_total[$j]);
//Afficher dans les elements du formulaire et choisir le type
- if( $j != 0 )
- {
+ if( $j == 0 ) {
+ $fpmf = 0;
+ } else {
$parameters1 = explode(':', $parameters_total[$j-1]);
if ( $parameters1[4] == 1 )
{
- $fields_param_main_field = $fields[0];
+ $fpmf = $fields[0];
}
}
}
@@ -96,7 +97,7 @@
if ($com_itemid > 0) {
$'.$table_name.'Handler =& xoops_getModuleHandler(\''.$table_name.'\', \''.$mod_name.'\');
$'.$table_name.' = $'.$table_name.'handler->get($com_itemid);
- $com_replytitle = $'.$table_name.'->getVar(\''.$fields_param_main_field.'\');
+ $com_replytitle = $'.$table_name.'->getVar(\''.$fpmf.'\');
include XOOPS_ROOT_PATH.\'/include/comment_new.php\';
}
?>';
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_include_search.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_include_search.php 2013-05-10 10:40:40 UTC (rev 11524)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_include_search.php 2013-05-10 14:49:13 UTC (rev 11525)
@@ -32,20 +32,23 @@
}
//fields
- $fields_total = explode("|", $table_fields);
+ $fields_total = explode('|', $table_fields);
$nb_fields = count($fields_total);
//print_r($fields_total);
//parameters
- $parameters_total = explode("|", $table_parameters);
+ $parameters_total = explode('|', $table_parameters);
$k = 0;
//Recuperation des parameters affichage dans le formulaire
for($j=0; $j<$nb_fields; $j++)
{
- $fields = explode(":", $fields_total[$j]);
+ $fields = explode(':', $fields_total[$j]);
+
//Afficher dans les elements du formulaire et choisir le type
- if( $j != 0 )
- {
- $param = explode(":", $parameters_total[$j-1]);
+ if( $j == 0 ) {
+ $fpsf[$k] = 0;
+ $fpmf = 0;
+ } else {
+ $param = explode(':', $parameters_total[$j-1]);
if ( $param[7] == 1 )
{
$fpsf[$k] = $fields[0];
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_xoopsversion.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_xoopsversion.php 2013-05-10 10:40:40 UTC (rev 11524)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_xoopsversion.php 2013-05-10 14:49:13 UTC (rev 11525)
@@ -49,10 +49,12 @@
$modversion[\'manual\'] = "'.$modules->getVar("mod_manual").'";
$modversion[\'manual_file\'] = XOOPS_URL."/modules/{$dirname}/docs/'.$modules->getVar("mod_manual_file").'";
-$modversion[\'min_php\'] = "5.2";
-$modversion[\'min_xoops\'] = "2.5.5";
-$modversion[\'min_admin\']= "1.1";
-$modversion[\'min_db\']= array(\'mysql\'=>\'5.0.7\', \'mysqli\'=>\'5.0.7\');
+$modversion[\'min_php\'] = "'.$modules->getVar("mod_min_php").'";
+$modversion[\'min_xoops\'] = "'.$modules->getVar("mod_min_xoops").'";
+$modversion[\'min_admin\']= "'.$modules->getVar("mod_min_admin").'";';
+$min_db = $modules->getVar('mod_min_db');
+$text = '
+$modversion[\'min_db\']= array(\'mysql\'=>\''.$min_db.'\', \'mysqli\'=>\''.$min_db.'\');
$modversion[\'image\'] = "images/'.strtolower($modules->getVar("mod_image")).'";
$modversion[\'dirname\'] = "{$dirname}";
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/include/functions_const.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/include/functions_const.php 2013-05-10 10:40:40 UTC (rev 11524)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/include/functions_const.php 2013-05-10 14:49:13 UTC (rev 11525)
@@ -27,12 +27,12 @@
include_once TDM_CREATE_URL.'/const/const_header.php';
-function const_fields($mod_name, $table_name, $table_fieldname, $table_category, $table_fields, $lng, $fpt = 0, $fprf = 0, $option = 0)
+function const_fields($mod_name, $table_name, $table_fieldname, $table_fields, $lng, $fpe = 0, $fpr = 0, $option = 0)
{
// fpdf = fields_param_display_form
$text = '';
// Counts the number of fields
- $fields = explode("|", $table_fields);
+ $fields = explode('|', $table_fields);
$nb_fields = count($fields);
// Retrieve the data
if ( $option == 0 )
@@ -40,32 +40,32 @@
// Creation of the constructor
for ($i = 0; $i < $nb_fields; $i++)
{
- $struct = explode(":", $fields[$i]);
- if ( $struct[1] == 'int' || $struct[1] == 'tinyint' || $struct[1] == 'mediumint' || $struct[1] == 'smallint' ) {
+ $struct = explode(':', $fields[$i]);
+ if ( $struct[0] == 'int' || $struct[0] == 'tinyint' || $struct[0] == 'mediumint' || $struct[0] == 'smallint' ) {
$text .= '
$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_INT, null, false, '.$struct[2].');';
- } elseif ( $struct[1] == 'char' || $struct[1] == 'varchar' ) {
+ } elseif ( $struct[0] == 'char' || $struct[0] == 'varchar' ) {
$text .= '
$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_TXTBOX, null, false, '.$struct[2].');';
- } elseif ( $struct[1] == 'text' || $struct[1] == 'tinytext' || $struct[1] == 'mediumtext' || $struct[1] == 'longtext' ) {
+ } elseif ( $struct[0] == 'text' || $struct[0] == 'tinytext' || $struct[0] == 'mediumtext' || $struct[0] == 'longtext' ) {
$text .= '
$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_TXTAREA, null, false);';
- } elseif ( $struct[1] == 'float' ) {
+ } elseif ( $struct[0] == 'float' ) {
$text .= '
$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_FLOAT, null, false);';
- } elseif ( $struct[1] == 'decimal' || $struct[1] == 'double' ) {
+ } elseif ( $struct[0] == 'decimal' || $struct[0] == 'double' ) {
$text .= '
$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_DECIMAL, null, false);';
- } elseif ( $struct[1] == 'enum' ) {
+ } elseif ( $struct[0] == 'enum' ) {
$text .= '
$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_ENUM, null, false);';
- } elseif ( $struct[1] == 'email' ) {
+ } elseif ( $struct[0] == 'email' ) {
$text .= '
$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_EMAIL, null, false, '.$struct[2].');';
- } elseif ( $struct[1] == 'url' ) {
+ } elseif ( $struct[0] == 'url' ) {
$text .= '
$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_URL, null, false, '.$struct[2].');';
- } elseif ( $struct[1] == 'date' || $struct[1] == 'datetime' || $struct[1] == 'timestamp' || $struct[1] == 'time' || $struct[1] == 'year' ) {
+ } elseif ( $struct[0] == 'date' || $struct[0] == 'datetime' || $struct[0] == 'timestamp' || $struct[0] == 'time' || $struct[0] == 'year' ) {
$text .= '
$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_LTIME, null, false);';
}/* elseif ( $struct[1] == 'other' ) {
@@ -80,7 +80,7 @@
if ( $i != 0 ) {
$struct = explode(':', $fields[$i]);
$lng_form = $lng.strtoupper($struct[0]);
- $text .= form_elements($i, $mod_name, $table_name, $table_fieldname, $table_category, $fpt = 0, $fprf = 0, $lng_form, $struct[0]);
+ $text .= form_elements($i, $mod_name, $table_name, $table_fieldname, $struct[3], $struct[4], $fpe = 0, $fpr = 0, $lng_form, $struct[0]);
}
}
} else if ( $option == 2 ) {
@@ -103,38 +103,38 @@
if ( $struct[0] != ' ' )
{
//If as text, (not value)
- if ( $struct[1] == 'text' || $struct[1] == 'date' || $struct[1] == 'timestamp' ) {
- $type = $struct[1];
+ if ( $struct[0] == 'text' || $struct[0] == 'date' || $struct[0] == 'timestamp' ) {
+ $type = $struct[0];
} else {
- $type = $struct[1].' ('.$struct[2].')';
+ $type = $struct[0].' ('.$struct[2].')';
}
//If as empty is default not string(not value), if as text not default, if as numeric default is 0 or 0.0000
//echo $struct[5]." struct[5] --------------- </br>";
if ( $struct[5] =='' ) {
$default = "default ''";
//echo " default 1 </br>";
- } elseif ( $struct[1] == 'text' || $struct[1] == 'tinytext' || $struct[1] == 'mediumtext' || $struct[1] == 'longtext' ) {
+ } elseif ( $struct[0] == 'text' || $struct[0] == 'tinytext' || $struct[0] == 'mediumtext' || $struct[0] == 'longtext' ) {
$default = "";
// echo " default 2 </br>";
- } elseif ( $struct[1] == 'int' || $struct[1] == 'tinyint' || $struct[1] == 'mediumint' || $struct[1] == 'smallint') {
+ } elseif ( $struct[0] == 'int' || $struct[0] == 'tinyint' || $struct[0] == 'mediumint' || $struct[0] == 'smallint') {
$default = "default '0'";
//echo " default 3 </br>";
- } elseif ( $struct[1] == 'decimal' || $struct[1] == 'double' || $struct[1] == 'float' ) {
+ } elseif ( $struct[0] == 'decimal' || $struct[0] == 'double' || $struct[0] == 'float' ) {
$default = "default '0.0000'";
// echo " default 4 </br>";
- } elseif ( $struct[1] == 'date' ) {
+ } elseif ( $struct[0] == 'date' ) {
// echo " default 5 </br>";
$default = "default '0000-00-00'";
- } elseif ( $struct[1] == 'datetime' || $struct[1] == 'timestamp') {
+ } elseif ( $struct[0] == 'datetime' || $struct[0] == 'timestamp') {
$default = "default '0000-00-00 00:00:00'";
//echo " default 6 </br>";
- } elseif ( $struct[1] == 'time' ) {
+ } elseif ( $struct[0] == 'time' ) {
$default = "default '00:00:00'";
// echo " default 7 </br>";
- } elseif ( $struct[1] == 'year' ) {
+ } elseif ( $struct[0] == 'year' ) {
$default = "default '0000'";
//echo " default 8 </br>";
- } elseif ( $struct[1] == 'other' ) {
+ } elseif ( $struct[0] == 'other' ) {
$default = "default '".$struct[5]."'";
//echo " default 9 </br>";
} else {
@@ -200,7 +200,7 @@
}
//
-function const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $fields_id, $nb_fields, $fields, $fpt, $fpa, $fpu, $fpf, $fpl, $fpb, $fps, $lng, $prefix = '', $option = 0)
+function const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $fields_id, $nb_fields, $fields, $fpe, $fpa, $fpu, $fpf, $fpl, $fpb, $fps, $lng, $prefix = '', $option = 0)
{
$text = '';
@@ -209,7 +209,7 @@
for($i = 0; $i < $nb_fields; $i++)
{
if ( $i != 0 ) {
- if ( $fpda[$i] == 1 ) { // fields_param_display_admin
+ if ( $fpa[$i] == 1 ) { // fields_param_display_admin
$text .= '
<th class=\'center\'>".'.$lng.'_'.strtoupper($fields[$i]).'."</th>';
}
@@ -239,41 +239,41 @@
';
}
- } else if ( $fpt[$i] == 'XoopsFormUploadImage' ) {
+ } else if ( $fpe[$i] == 'XoopsFormUploadImage' ) {
$text .= '$'.$table_fieldname.'_image = $'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\');
$image = '.strtoupper($mod_name).'_UPLOAD_URL."/images/'.$table_name.'/".$'.$table_fieldname.'_image;
echo "<td class=\'center\'><img src=\'".$image."\' height=\'30px\' alt=\''.$fields[$i].'\'></td>";
';
- } else if ( $fpt[$i] == 'XoopsFormUploadFile' )
+ } else if ( $fpe[$i] == 'XoopsFormUploadFile' )
{
$text .= 'echo "<td class=\'center\'>".$'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\')."</td>";
';
- } else if ( $fpt[$i] == 'XoopsFormColorPicker' )
+ } else if ( $fpe[$i] == 'XoopsFormColorPicker' )
{
$text .= 'echo "<td class=\'center\'><span style=\'background-color:".$'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\')."\'> </span> -> ".$'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\')."</td>";
';
- } else if ( $fpt[$i] == 'XoopsFormTextDateSelect' )
+ } else if ( $fpe[$i] == 'XoopsFormTextDateSelect' )
{
$text .= 'echo "<td class=\'center\'>".formatTimeStamp($'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\'),"S")."</td>";
';
- } else if ( $fpt[$i] == 'XoopsFormCategory' )
+ } else if ( $fpe[$i] == 'XoopsFormCategory' )
{
$text .= '$'.$table_fieldname.'1 = $categoriesHandler->get($'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\'));
$'.$table_fieldname.'_categories1 = $'.$table_fieldname.'1->getVar(\''.$table_fieldname.'_title\');
echo "<td class=\'center\'>".$'.$table_fieldname.'_categories1."</td>";
';
- } else if ( $fpt[$i] == 'XoopsFormSelectUser' )
+ } else if ( $fpe[$i] == 'XoopsFormSelectUser' )
{
$text .= 'echo "<td class=\'center\'>".XoopsUser::getUnameFromId($'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\'),"S")."</td>";
';
- } else if ( $fpt[$i] == 'XoopsFormText' || $fpt[$i] == 'XoopsFormDhtmlTextArea' || $fpt[$i] == 'XoopsFormTextArea' ) {
+ } else if ( $fpe[$i] == 'XoopsFormText' || $fpe[$i] == 'XoopsFormDhtmlTextArea' || $fpe[$i] == 'XoopsFormTextArea' ) {
$text .= 'echo "<td class=\'center\'>".strip_tags($'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\'))."</td>";
';
- } else if ( $fpt[$i] == 'XoopsFormCheckBox' || $fpt[$i] == 'XoopsFormRadioYN' ) {
+ } else if ( $fpe[$i] == 'XoopsFormCheckBox' || $fpe[$i] == 'XoopsFormRadioYN' ) {
$text .= 'echo "<td class=\'center\'>".( ($'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\') == 1 ) ? _YES : _NO)."</td>";
';
} else {
- $data = explode("-", $fpt[$i]);
+ $data = explode("-", $fpe[$i]);
// Handler select table
$tablesHandler =& xoops_getModuleHandler('TDMCreate_tables', 'TDMCreate');
$criteria = new CriteriaCompo();
@@ -296,7 +296,9 @@
$fields_select1 = explode(':', $fields_total_select[$l]);
$fields_select[$l] = $fields_select1[0];
// Show in admin
- if( $l != 0 ) {
+ if( $l == 0 ) {
+ $fpmf = '0';
+ } else {
$parameters_select = explode(':', $parameters_total_select[$l-1]);
if ( $parameters_select[6] == 1 ) {
$fpmf = $fields_select1[0];
@@ -304,9 +306,9 @@
}
}
$text .= '
- $'.$data[1].' =& $'.$data[1].'Handler->get($'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\'));
- $'.$table_name.'_'.$data[1].' = $'.$data[1].'->getVar(\''.$fpmf.'\');
- echo "<td class=\'center\'>".$'.$table_name.'_'.$data[1].'."</td>";
+ $'.$data[0].' =& $'.$data[0].'Handler->get($'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\'));
+ $'.$table_name.'_'.$data[0].' = $'.$data[0].'->getVar(\''.$fpmf.'\');
+ echo "<td class=\'center\'>".$'.$table_name.'_'.$data[0].'."</td>";
';
}
}
@@ -318,14 +320,14 @@
{
if ( $i != 0 )
{
- if ( $fpt[$i] == 'XoopsFormTextDateSelect' )
+ if ( $fpe[$i] == 'XoopsFormTextDateSelect' )
{
$text .= '
$obj->setVar(\''.$fields[$i].'\', strtotime($_REQUEST[\''.$fields[$i].'\']));';
- } else if ( $fpt[$i] == 'XoopsFormCheckBox' || $fpt[$i] == 'XoopsFormRadioYN' ) {
+ } else if ( $fpe[$i] == 'XoopsFormCheckBox' || $fpe[$i] == 'XoopsFormRadioYN' ) {
$text .= '
$obj->setVar(\''.$fields[$i].'\', (($_REQUEST[\''.$fields[$i].'\'] == 1) ? \'1\' : \'0\'));';
- } else if ( $fpt[$i] == 'XoopsFormUploadImage' ) {
+ } else if ( $fpe[$i] == 'XoopsFormUploadImage' ) {
$text .= '
include_once XOOPS_ROOT_PATH.\'/class/uploader.php\';
@@ -345,7 +347,7 @@
$obj->setVar(\''.$fields[$i].'\', $_REQUEST[\''.$fields[$i].'\']);
}
';
- } else if ( $fpt[$i] == 'XoopsFormUploadFile' ) {
+ } else if ( $fpe[$i] == 'XoopsFormUploadFile' ) {
$text .= '
include_once XOOPS_ROOT_PATH.\'/class/uploader.php\';
$uploaddir = XOOPS_UPLOAD_PATH.\'/'.$mod_name.'/files/'.$table_name.'/\';
@@ -372,25 +374,25 @@
return $text;
}
-function form_elements($i, $mod_name, $table_name, $table_fieldname, $table_category, $fpt, $fprf, $lng_form, $struct0)
+function form_elements($i, $mod_name, $table_name, $table_fieldname, $size, $maxlength, $fpe, $fpr, $lng_form, $struct0)
{
$lng = '_AM_'.strtoupper($mod_name).'_';
- $required_field = ( $fprf[$i] == 1) ? 'true' : 'false';
+ $required = ( $fpr[$i] == 1) ? 'true' : 'false';
$text = '';
- switch ($fpt[$i])
+ switch ($fpe[$i])
{
case "0":
break;
case "XoopsFormText":
$text .= '// '.ucfirst($struct0).'
- $form->addElement(new XoopsFormText('.$lng_form.', \''.$struct0.'\', 50, 255, $this->getVar(\''.$struct0.'\')), '.$required_field.');
+ $form->addElement(new XoopsFormText('.$lng_form.', \''.$struct0.'\', '.$size.', '.$maxlength.', $this->getVar(\''.$struct0.'\')), '.$required.');
';
break;
case "XoopsFormTextArea":
$text .= '// '.ucfirst($struct0).'
- $form->addElement(new XoopsFormTextArea('.$lng_form.', \''.$struct0.'\', $this->getVar(\''.$struct0.'\'), 4, 47), '.$required_field.');
+ $form->addElement(new XoopsFormTextArea('.$lng_form.', \''.$struct0.'\', $this->getVar(\''.$struct0.'\'), '.$size.', '.$maxlength.'), '.$required.');
';
break;
@@ -448,19 +450,19 @@
case "XoopsFormUploadFile":
$text .= '// '.ucfirst($struct0).'
- $form->addElement(new XoopsFormFile('.$lng_form.', \''.$struct0.'\', $xoopsModuleConfig[\'maxsize\']), '.$required_field.');
+ $form->addElement(new XoopsFormFile('.$lng_form.', \''.$struct0.'\', $xoopsModuleConfig[\'maxsize\']), '.$required.');
';
break;
case "XoopsFormColorPicker":
$text .= '// '.ucfirst($struct0).'
- $form->addElement(new XoopsFormColorPicker('.$lng_form.', \''.$struct0.'\', $this->getVar(\''.$struct0.'\')), '.$required_field.');
+ $form->addElement(new XoopsFormColorPicker('.$lng_form.', \''.$struct0.'\', $this->getVar(\''.$struct0.'\')), '.$required.');
';
break;
case "XoopsFormSelectUser":
$text .= '// '.ucfirst($struct0).'
- $form->addElement(new XoopsFormSelectUser('.$lng_form.', \''.$struct0.'\', false, $this->getVar(\''.$struct0.'\'), 1, false), '.$required_field.');
+ $form->addElement(new XoopsFormSelectUser('.$lng_form.', \''.$struct0.'\', false, $this->getVar(\''.$struct0.'\'), 1, false), '.$required.');
';
break;
@@ -481,7 +483,7 @@
case "XoopsFormRadioYN":
$text .= '// '.ucfirst($struct0).'
$'.$struct0.' = $this->isNew() ? 0 : $this->getVar(\''.$struct0.'\');
- $form->addElement(new XoopsFormRadioYN('.$lng_form.', \''.$struct0.'\', $'.$struct0.'), '.$required_field.');
+ $form->addElement(new XoopsFormRadioYN('.$lng_form.', \''.$struct0.'\', $'.$struct0.'), '.$required.');
';
break;
@@ -493,12 +495,12 @@
case "default":
default:
- $data = explode('-', $fpt[$i]);
+ $data = explode('-', $fpe[$i]);
$text .= '// '.ucfirst($struct0).'
- $'.$data[1].'Handler =& xoops_getModuleHandler(\''.$mod_name.'_'.$data[1].'\', \''.$mod_name.'\');
- $'.$data[1].'_id_select = new XoopsFormSelect('.$lng_form.', \''.$struct0.'\', $this->getVar(\''.$struct0.'\'));
- $'.$data[1].'_id_select->addOptionArray($'.$data[1].'Handler->getList());
- $form->addElement($'.$data[1].'_id_select, true);
+ $'.$data[0].'Handler =& xoops_getModuleHandler(\''.$mod_name.'_'.$data[0].'\', \''.$mod_name.'\');
+ $'.$data[0].'_id_select = new XoopsFormSelect('.$lng_form.', \''.$struct0.'\', $this->getVar(\''.$struct0.'\'));
+ $'.$data[0].'_id_select->addOptionArray($'.$data[0].'Handler->getList());
+ $form->addElement($'.$data[0].'_id_select, true);
';
break;
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/english/admin.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/english/admin.php 2013-05-10 10:40:40 UTC (rev 11524)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/english/admin.php 2013-05-10 14:49:13 UTC (rev 11525)
@@ -36,7 +36,7 @@
define('_AM_TDMCREATE_TABLES_FIELDS_MORE_DISPLAY_USER', "Page: View User");
define('_AM_TDMCREATE_TABLES_FIELDS_MORE_DISPLAY_FORM', "Page: View in Form");
define('_AM_TDMCREATE_TABLES_FIELDS_MORE_DISPLAY_LIST', "Page: View in List");
-define('_AM_TDMCREATE_TABLES_FIELDS_MORE_BLOC', "Block: View");
+define('_AM_TDMCREATE_TABLES_FIELDS_MORE_BLOCK', "Block: View");
define('_AM_TDMCREATE_TABLES_FIELDS_MORE_MAIN_FIELD', "Table: Main Field");
define('_AM_TDMCREATE_TABLES_FIELDS_MORE_SEARCH', "Search: Index");
define('_AM_TDMCREATE_TABLES_FIELDS_MORE_REQUIRED', "Forms: Required field");
@@ -93,7 +93,7 @@
define('_AM_TDMCREATE_MODULES_RELEASE', "Release");
define('_AM_TDMCREATE_MODULES_STATUS', "Status");
define('_AM_TDMCREATE_MODULES_DISPLAY_ADMIN', "Visible in Admin");
-define('_AM_TDMCREATE_MODULES_DISPLAY_USER', "Visible in User side");
+define('_AM_TDMCREATE_MODULES_DISPLAY_USER', "Visible in Front");
define('_AM_TDMCREATE_MODULES_ACTIVE_SEARCH', "Enable search");
define('_AM_TDMCREATE_MODULES_ACTIVE_COMMENTS', "Enable comments");
define('_AM_TDMCREATE_MODULES_ACTIVE_NOTIFICATIONS', "Enable notifications");
@@ -108,12 +108,12 @@
define('_AM_TDMCREATE_TABLES_FIELDNAME', "Prefix of the field <br> <i>(The prefix name will automatically be added)</i> <br> Example: 'fieldname'_ (optional)");
define('_AM_TDMCREATE_TABLES_NB_FIELDS', "Number of fields in this table <br> <i>in this version of the module, you can not add new fields after this form <br> properly calculates what you need</i>");
define('_AM_TDMCREATE_TABLES_IMAGE', "Table Icon");
-define('_AM_TDMCREATE_TABLES_BLOCKS', "Create a new block for this table (blocks: random, latest, today)");
-define('_AM_TDMCREATE_TABLES_DISPLAY_ADMIN', "Visible in Admin View");
-define('_AM_TDMCREATE_TABLES_DISPLAY_USER', "Visible in User View");
+define('_AM_TDMCREATE_TABLES_BLOCKS', "Create block for this table...?");
+define('_AM_TDMCREATE_TABLES_DISPLAY_ADMIN', "Visible in Admin View...?");
+define('_AM_TDMCREATE_TABLES_DISPLAY_USER', "Visible in User View...?");
define('_AM_TDMCREATE_TABLES_SUBMITTER', "Add submitter");
define('_AM_TDMCREATE_TABLES_DATE_CREATED', "Add date created");
-define('_AM_TDMCREATE_TABLES_ONLINE', "Add online");
+define('_AM_TDMCREATE_TABLES_ONLINE', "Show Table Online...?");
define('_AM_TDMCREATE_TABLES_SEARCH', "Active research for this table <br> <i>the form for the moment, is able to handle the search on the table <br> If you confirm the search option will be disabled</i>");
define('_AM_TDMCREATE_TABLES_EXIST', "The name specified for this table is already in use");
define('_AM_TDMCREATE_TABLES_COMMENTS', "Enable the search in this table <br> <i>the module can manage for the moment, the coms on a table <br> Coms option will be disabled if you Confirmed</i>");
@@ -204,9 +204,11 @@
define('_AM_TDMCREATE_TABLES_NEW_CATEGORY', "New Category");
//1.38
-define('_AM_TDMCREATE_TABLES_STATUS', "Show Table Status");
-define('_AM_TDMCREATE_TABLES_WAITING', "Show Table Waiting");
+define('_AM_TDMCREATE_TABLES_STATUS', "Show Table Status...?");
+define('_AM_TDMCREATE_TABLES_WAITING', "Show Table Waiting...?");
//1.39
-//define('_AM_TDMCREATE_TABLES_STATUS', "Show Table Status");
-//define('_AM_TDMCREATE_TABLES_WAITING', "Show Table Waiting");
\ No newline at end of file
+define('_AM_TDMCREATE_MODULES_MIN_PHP', "Minimum Php");
+define('_AM_TDMCREATE_MODULES_MIN_XOOPS', "Minimum Xoops");
+define('_AM_TDMCREATE_MODULES_MIN_ADMIN', "Minimum Admin");
+define('_AM_TDMCREATE_MODULES_MIN_DB', "Minimum Database");
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/english/modinfo.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/english/modinfo.php 2013-05-10 10:40:40 UTC (rev 11524)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/english/modinfo.php 2013-05-10 14:49:13 UTC (rev 11525)
@@ -69,4 +69,8 @@
define('_MI_TDMCREATE_BREAK_GENERAL', "General preferences");
define('_MI_TDMCREATE_BREAK_REQUIRED', "Module required");
define('_MI_TDMCREATE_BREAK_OPTIONAL', "Module optional");
-define('_MI_TDMCREATE_ADMINPAGER', "Admin per page");
\ No newline at end of file
+define('_MI_TDMCREATE_ADMINPAGER', "Admin per page");
+define('_MI_TDMCREATE_MODULE_MIN_PHP', "Minimum Php");
+define('_MI_TDMCREATE_MODULE_MIN_XOOPS', "Minimum Xoops");
+define('_MI_TDMCREATE_MODULE_MIN_ADMIN', "Minimum Admin");
+define('_MI_TDMCREATE_MODULE_MIN_DB', "Minimum Database");
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/sql/mysql.sql
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/sql/mysql.sql 2013-05-10 10:40:40 UTC (rev 11524)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/sql/mysql.sql 2013-05-10 14:49:13 UTC (rev 11525)
@@ -1,7 +1,11 @@
CREATE TABLE `tdmcreate_modules` (
`mod_id` int(5) unsigned NOT NULL auto_increment,
- `mod_name` varchar(255) NOT NULL,
- `mod_version` varchar(5) NOT NULL,
+ `mod_name` varchar(255) NOT NULL default '',
+ `mod_version` 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_db` varchar(5) NOT NULL default '',
`mod_description` text,
`mod_author` varchar(255) NOT NULL default '',
`mod_author_mail` varchar(255) NOT NULL default '',
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/xoops_version.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/xoops_version.php 2013-05-10 10:40:40 UTC (rev 11524)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/xoops_version.php 2013-05-10 14:49:13 UTC (rev 11525)
@@ -132,6 +132,34 @@
$modversion['config'][$i]['valuetype'] = "text";
$modversion['config'][$i]['default'] = '1.0';
$i++;
+$modversion['config'][$i]['name'] = "min_php";
+$modversion['config'][$i]['title'] = "_MI_TDMCREATE_MODULE_MIN_PHP";
+$modversion['config'][$i]['description'] = "";
+$modversion['config'][$i]['formtype'] = "textbox";
+$modversion['config'][$i]['valuetype'] = "text";
+$modversion['config'][$i]['default'] = '5.3';
+$i++;
+$modversion['config'][$i]['name'] = "min_xoops";
+$modversion['config'][$i]['title'] = "_MI_TDMCREATE_MODULE_MIN_XOOPS";
+$modversion['config'][$i]['description'] = "";
+$modversion['config'][$i]['formtype'] = "textbox";
+$modversion['config'][$i]['valuetype'] = "text";
+$modversion['config'][$i]['default'] = '2.5.5';
+$i++;
+$modversion['config'][$i]['name'] = "min_admin";
+$modversion['config'][$i]['title'] = "_MI_TDMCREATE_MODULE_MIN_ADMIN";
+$modversion['config'][$i]['description'] = "";
+$modversion['config'][$i]['formtype'] = "textbox";
+$modversion['config'][$i]['valuetype'] = "text";
+$modversion['config'][$i]['default'] = '1.1';
+$i++;
+$modversion['config'][$i]['name'] = "min_db";
+$modversion['config'][$i]['title'] = "_MI_TDMCREATE_MODULE_MIN_DB";
+$modversion['config'][$i]['description'] = "";
+$modversion['config'][$i]['formtype'] = "textbox";
+$modversion['config'][$i]['valuetype'] = "text";
+$modversion['config'][$i]['default'] = '5.0.7';
+$i++;
$modversion['config'][$i]['name'] = "description";
$modversion['config'][$i]['title'] = "_MI_TDMCREATE_MODULE_DESCRIPTION";
$modversion['config'][$i]['description'] = "";
@@ -326,5 +354,5 @@
$modversion['config'][$i]['description'] = "";
$modversion['config'][$i]['formtype'] = "textbox";
$modversion['config'][$i]['valuetype'] = "text";
-$modversion['config'][$i]['default'] = '000000';
+$modversion['config'][$i]['default'] = '11520';
unset($i);
\ No newline at end of file
|