|
From: <txm...@us...> - 2015-06-03 09:42:13
|
Revision: 13077
http://sourceforge.net/p/xoops/svn/13077
Author: txmodxoops
Date: 2015-06-03 09:42:10 +0000 (Wed, 03 Jun 2015)
Log Message:
-----------
Addeds & fix
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateArchitecture.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminObjects.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFormElements.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeCommon.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/settings.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/admin.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/autoload.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/autoload.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/form/TDMCreateFormRaw.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/form/TDMCreateFormTab.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/form/TDMCreateFormTabTray.php
Removed Paths:
-------------
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/TDMCreateAutoload.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateAutoload.php
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/TDMCreateAutoload.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/TDMCreateAutoload.php 2015-06-02 13:47:44 UTC (rev 13076)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/TDMCreateAutoload.php 2015-06-03 09:42:10 UTC (rev 13077)
@@ -1,57 +0,0 @@
-<?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: TDMCreateAutoload.php 12258 2014-01-02 09:33:29Z timgno $
- */
-defined('XOOPS_ROOT_PATH') or die('Restricted access');
-
-/**
- * @since 1.91
- */
-// Autoload Function
-ini_set('display_errors',1);
-error_reporting(E_ALL|E_STRICT);
-
-function application_autoloader($class) {
- $classFilename = $class.'.php';
- $cacheFile = __DIR__ . '/cache/classpaths.cache';
- $pathCache = (file_exists($cacheFile)) ? unserialize(file_get_contents($cacheFile)) : array();
- if (!is_array($pathCache)) { $pathCache = array(); }
-
- if (array_key_exists($class, $pathCache)) {
- /* Load class using path from cache file (if the file still exists) */
- if (file_exists($pathCache[$class])) { require_once $pathCache[$class]; }
-
- } else {
- /* Determine the location of the file within the $class_root and, if found, load and cache it */
- $directories = new RecursiveDirectoryIterator(__DIR__);
- foreach(new RecursiveIteratorIterator($directories) as $file) {
- if ($file->getFilename() == $classFilename) {
- $fullPath = $file->getRealPath();
- $pathCache[$class] = $fullPath;
- require_once $fullPath;
- break;
- }
- }
- }
-
- $serialized_paths = serialize($pathCache);
- if ($serialized_paths != $pathCache) { file_put_contents($cacheFile, serialize($pathCache)); }
-}
-
-spl_autoload_register('application_autoloader');
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/autoload.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/autoload.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/autoload.php 2015-06-03 09:42:10 UTC (rev 13077)
@@ -0,0 +1,56 @@
+<?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: TDMCreateAutoload.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+/**
+ * @since 1.91
+ */
+// Autoload Function
+ini_set('display_errors',1);
+error_reporting(E_ALL|E_STRICT);
+
+function applicationAutoloader($class) {
+ $classFilename = $class.'.php';
+ $cacheFile = __DIR__ . '/cache/classpaths.cache';
+ $pathCache = (file_exists($cacheFile)) ? unserialize(file_get_contents($cacheFile)) : array();
+ if (!is_array($pathCache)) { $pathCache = array(); }
+
+ if (array_key_exists($class, $pathCache)) {
+ /* Load class using path from cache file (if the file still exists) */
+ if (file_exists($pathCache[$class])) { require_once $pathCache[$class]; }
+
+ } else {
+ /* Determine the location of the file within the $class_root and, if found, load and cache it */
+ $directories = new RecursiveDirectoryIterator(__DIR__);
+ foreach(new RecursiveIteratorIterator($directories) as $file) {
+ if ($file->getFilename() == $classFilename) {
+ $fullPath = $file->getRealPath();
+ $pathCache[$class] = $fullPath;
+ require_once $fullPath;
+ break;
+ }
+ }
+ }
+
+ $serialized_paths = serialize($pathCache);
+ if ($serialized_paths != $pathCache) { file_put_contents($cacheFile, serialize($pathCache)); }
+}
+
+spl_autoload_register('applicationAutoloader');
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fields.php 2015-06-02 13:47:44 UTC (rev 13076)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fields.php 2015-06-03 09:42:10 UTC (rev 13077)
@@ -20,7 +20,7 @@
*/
defined('XOOPS_ROOT_PATH') or die('Restricted access');
// Autoloader Classes
-include __DIR__ . '/TDMCreateAutoload.php';
+include __DIR__ . '/autoload.php';
/*
* @Class TDMCreateFields
* @extends XoopsObject
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateArchitecture.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateArchitecture.php 2015-06-02 13:47:44 UTC (rev 13076)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateArchitecture.php 2015-06-03 09:42:10 UTC (rev 13077)
@@ -19,9 +19,7 @@
* @version $Id: TDMCreateArchitecture.php 12258 2014-01-02 09:33:29Z timgno $
*/
defined('XOOPS_ROOT_PATH') or die('Restricted access');
-// Autoloader Classes
-include __DIR__ . '/TDMCreateAutoload.php';
-
+include __DIR__ . '/autoload.php';
/**
* Class TDMCreateArchitecture
*/
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateAutoload.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateAutoload.php 2015-06-02 13:47:44 UTC (rev 13076)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateAutoload.php 2015-06-03 09:42:10 UTC (rev 13077)
@@ -1,57 +0,0 @@
-<?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: TDMCreateAutoload.php 12258 2014-01-02 09:33:29Z timgno $
- */
-defined('XOOPS_ROOT_PATH') or die('Restricted access');
-
-/**
- * @since 1.91
- */
-// Autoload Function
-ini_set('display_errors',1);
-error_reporting(E_ALL|E_STRICT);
-
-function applicationAutoloader($class) {
- $classFilename = $class.'.php';
- $cacheFile = __DIR__ . '/cache/classpaths.cache';
- $pathCache = (file_exists($cacheFile)) ? unserialize(file_get_contents($cacheFile)) : array();
- if (!is_array($pathCache)) { $pathCache = array(); }
-
- if (array_key_exists($class, $pathCache)) {
- /* Load class using path from cache file (if the file still exists) */
- if (file_exists($pathCache[$class])) { require_once $pathCache[$class]; }
-
- } else {
- /* Determine the location of the file within the $class_root and, if found, load and cache it */
- $directories = new RecursiveDirectoryIterator(__DIR__);
- foreach(new RecursiveIteratorIterator($directories) as $file) {
- if ($file->getFilename() == $classFilename) {
- $fullPath = $file->getRealPath();
- $pathCache[$class] = $fullPath;
- require_once $fullPath;
- break;
- }
- }
- }
-
- $serializedPaths = serialize($pathCache);
- if ($serializedPaths != $pathCache) { file_put_contents($cacheFile, serialize($pathCache)); }
-}
-
-spl_autoload_register('applicationAutoloader');
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminObjects.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminObjects.php 2015-06-02 13:47:44 UTC (rev 13076)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminObjects.php 2015-06-03 09:42:10 UTC (rev 13077)
@@ -101,8 +101,7 @@
\${$tableName}Obj->setVar('{$fieldName}', formatUrl(\$_REQUEST['{$fieldName}']));\n
// Set Var {$fieldName}
include_once XOOPS_ROOT_PATH.'/class/uploader.php';
- \$uploaddir = {$stuModuleDirname}_UPLOAD_PATH.'/files/{$tableName}';
- \$uploader = new XoopsMediaUploader(\$uploaddir, \${$moduleDirname}->getConfig('mimetypes'),
+ \$uploader = new XoopsMediaUploader({$stuModuleDirname}_UPLOAD_FILES_PATH . '/{$tableName}', \${$moduleDirname}->getConfig('mimetypes'),
\${$moduleDirname}->getConfig('maxsize'), null, null);
if (\$uploader->fetchMedia(\$_POST['xoops_upload_file'][0])) {
\$uploader->fetchMedia(\$_POST['xoops_upload_file'][0]);
Added: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/autoload.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/autoload.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/autoload.php 2015-06-03 09:42:10 UTC (rev 13077)
@@ -0,0 +1,56 @@
+<?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: TDMCreateAutoload.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+/**
+ * @since 1.91
+ */
+// Autoload Function
+ini_set('display_errors',1);
+error_reporting(E_ALL|E_STRICT);
+
+function applicationAutoloader1($class) {
+ $classFilename = $class.'.php';
+ $cacheFile = __DIR__ . '/cache/classpaths.cache';
+ $pathCache = (file_exists($cacheFile)) ? unserialize(file_get_contents($cacheFile)) : array();
+ if (!is_array($pathCache)) { $pathCache = array(); }
+
+ if (array_key_exists($class, $pathCache)) {
+ /* Load class using path from cache file (if the file still exists) */
+ if (file_exists($pathCache[$class])) { require_once $pathCache[$class]; }
+
+ } else {
+ /* Determine the location of the file within the $class_root and, if found, load and cache it */
+ $directories = new RecursiveDirectoryIterator(__DIR__);
+ foreach(new RecursiveIteratorIterator($directories) as $file) {
+ if ($file->getFilename() == $classFilename) {
+ $fullPath = $file->getRealPath();
+ $pathCache[$class] = $fullPath;
+ require_once $fullPath;
+ break;
+ }
+ }
+ }
+
+ $serialized_paths = serialize($pathCache);
+ if ($serialized_paths != $pathCache) { file_put_contents($cacheFile, serialize($pathCache)); }
+}
+
+spl_autoload_register('applicationAutoloader1');
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFiles.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFiles.php 2015-06-02 13:47:44 UTC (rev 13076)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFiles.php 2015-06-03 09:42:10 UTC (rev 13077)
@@ -361,7 +361,7 @@
/**
* @return string
*/
- private function getValuesInForm($fields)
+ private function getValuesInForm($moduleDirname, $table, $fields)
{
$ret = <<<EOT
/**
@@ -393,9 +393,28 @@
EOT;
break;
default:
- $ret .= <<<EOT
+ if ($fieldElement > 15) {
+ $fieldElements = $this->tdmcreate->getHandler('fieldelements')->get($fieldElement);
+ $fieldElementMid = $fieldElements->getVar('fieldelement_mid');
+ $fieldElementTid = $fieldElements->getVar('fieldelement_tid');
+ $fieldElementName = $fieldElements->getVar('fieldelement_name');
+ $fieldNameDesc = substr($fieldElementName, strrpos($fieldElementName, ':'), strlen($fieldElementName));
+ $topicTableName = str_replace(': ', '', strtolower($fieldNameDesc));
+ $fieldsTopics = $this->getTableFields($fieldElementMid, $fieldElementTid);
+ foreach (array_keys($fieldsTopics) as $f) {
+ $fieldNameTopic = $fieldsTopics[$f]->getVar('field_name');
+ if (1 == $fieldsTopics[$f]->getVar('field_main')) {
+ $fieldMainTopic = $fieldNameTopic;
+ }
+ }
+ $ret .= <<<EOT
+ \$ret['{$rpFieldName}'] = \$this->{$moduleDirname}->getHandler('{$topicTableName}')->get(\$this->getVar('{$fieldName}'))->getVar('{$fieldMainTopic}');\n
+EOT;
+ } else {
+ $ret .= <<<EOT
\$ret['{$rpFieldName}'] = \$this->getVar('{$fieldName}');\n
EOT;
+ }
break;
}
}
@@ -835,7 +854,7 @@
}
$content .= $this->getFootInForm();
}
- $content .= $this->getValuesInForm($fields);
+ $content .= $this->getValuesInForm($moduleDirname, $table, $fields);
$content .= $this->getToArrayInForm();
if(in_array(5, $fieldElementId)) {
$content .= $this->getOptionsCheck($table);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFormElements.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFormElements.php 2015-06-02 13:47:44 UTC (rev 13076)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFormElements.php 2015-06-03 09:42:10 UTC (rev 13077)
@@ -169,12 +169,14 @@
*/
private function getXoopsFormCheckBox($language, $fieldName, $required = 'false')
{
- $ret = <<<EOT
+ $ucfFieldName = $this->tdmcfile->getCamelCase($fieldName, true);
+ $ccFieldName = $this->tdmcfile->getCamelCase($fieldName, false, true);
+ $ret = <<<EOT
// Form Check Box
- \${$fieldName} = \$this->isNew() ? 0 : \$this->getVar('{$fieldName}');
- \$check_{$fieldName} = new XoopsFormCheckBox({$language}, '{$fieldName}', \${$fieldName});
- \$check_{$fieldName}->addOption(1, " ");
- \$form->addElement( \$check_{$fieldName}{$required} );\n
+ \${$ccFieldName} = \$this->isNew() ? 0 : \$this->getVar('{$fieldName}');
+ \$check{$ucfFieldName} = new XoopsFormCheckBox({$language}, '{$fieldName}', \${$ccFieldName});
+ \$check{$ucfFieldName}->addOption(1, " ");
+ \$form->addElement( \$check{$ucfFieldName}{$required} );\n
EOT;
return $ret;
@@ -221,16 +223,16 @@
$stuFieldName = strtoupper($fieldName);
$rpFieldName = $this->tdmcfile->getRightString($fieldName);
$stuSoleName = strtoupper($tableSoleName .'_'. $rpFieldName);
- $ucfFieldName = $this->tdmcfile->getCamelCase($fieldName, true, false);
+ $ucfFieldName = $this->tdmcfile->getCamelCase($fieldName, true);
$ccFieldName = $this->tdmcfile->getCamelCase($fieldName, false, true);
$ret = <<<EOT
// Form Frameworks Image Files
\$get{$ucfFieldName} = \$this->getVar('{$fieldName}');
\${$ccFieldName} = \$get{$ucfFieldName} ? \$get{$ucfFieldName} : 'blank.gif';
- \$imageDirectory = XOOPS_ROOT_PATH . '/Frameworks/moduleclasses/icons/32';
+ \$imageDirectory = '/Frameworks/moduleclasses/icons/32';
\$imageTray = new XoopsFormElementTray({$language}{$stuSoleName},'<br />');
- \$imageSelect = new XoopsFormSelect(\$imageDirectory, '{$fieldName}', \${$ccFieldName}, 5);
- \$imageArray = XoopsLists::getImgListAsArray( \$imageDirectory );
+ \$imageSelect = new XoopsFormSelect(sprintf({$language}FORM_IMAGE_PATH, ".{\$imageDirectory}/"), '{$fieldName}', \${$ccFieldName}, 5);
+ \$imageArray = XoopsLists::getImgListAsArray( XOOPS_ROOT_PATH . \$imageDirectory );
foreach( \$imageArray as \$image1 ) {
\$imageSelect->addOption("{\$image1}", \$image1);
}
@@ -267,7 +269,7 @@
*/
private function getXoopsFormSelectFile($language, $moduleDirname, $fieldName, $fieldElement, $required = 'false')
{
- $ucfFieldName = $this->tdmcfile->getCamelCase($fieldName, true, false);
+ $ucfFieldName = $this->tdmcfile->getCamelCase($fieldName, true);
$ccFieldName = $this->tdmcfile->getCamelCase($fieldName, false, true);
$ret = <<<EOT
// Image Select or Upload
@@ -276,22 +278,21 @@
\$uploadDirectory = '/uploads/{$moduleDirname}/images/shots';
\${$moduleDirname}ShotImage = \${$fieldName} ? \${$fieldName} : 'blank.gif';
//
- \$imgtray = new XoopsFormElementTray({$language}FORM_IMAGE,'<br />');
- \$imagePath = sprintf({$language}_FORM_PATH, \$uploadDirectory );
- \$imageselect = new XoopsFormSelect(\$imagePath, 'selected_image',\${$moduleDirname}ShotImage);
+ \$imageTray = new XoopsFormElementTray({$language}FORM_IMAGE,'<br />');
+ \$imageSelect = new XoopsFormSelect(sprintf({$language}_FORM_PATH, \$uploadDirectory ), 'selected_image',\${$moduleDirname}ShotImage);
\$imageArray = XoopsLists :: getImgListAsArray( XOOPS_ROOT_PATH . \$uploadDirectory );
foreach( \$imageArray as \$image ) {
- \$imageselect->addOption("{\$image}", \$image);
+ \$imageSelect->addOption("{\$image}", \$image);
}
- \$imageselect->setExtra( "onchange='showImgSelected(\"image3\", \"selected_image\", \"" . \$uploadDirectory . "\", \"\", \"" . XOOPS_URL . "\")'" );
- \$imgtray->addElement(\$imageselect,false);
- \$imgtray -> addElement( new XoopsFormLabel( '', "<br /><img src='" . XOOPS_URL . "/" . \$uploadDirectory . "/" . \${$moduleDirname}ShotImage . "' name='image3' id='image3' alt='' />" ) );
+ \$imageSelect->setExtra( "onchange='showImgSelected(\"image3\", \"selected_image\", \"" . \$uploadDirectory . "\", \"\", \"" . XOOPS_URL . "\")'" );
+ \$imageTray->addElement(\$imageSelect,false);
+ \$imageTray -> addElement( new XoopsFormLabel( '', "<br /><img src='" . XOOPS_URL . "/" . \$uploadDirectory . "/" . \${$moduleDirname}ShotImage . "' name='image3' id='image3' alt='' />" ) );
\$fileSelectTray= new XoopsFormElementTray('','<br />');
//if (\$permissionUpload == true) {
\$fileSelectTray->addElement(new XoopsFormFile({$language}_FORMUPLOAD , 'attachedimage', \$this->{$moduleDirname}->getConfig('maxuploadsize')){$required});
//}
- \$imgtray->addElement(\$fileSelectTray);
- \$form->addElement(\$imgtray);
+ \$imageTray->addElement(\$fileSelectTray);
+ \$form->addElement(\$imageTray);
}\n
EOT;
@@ -321,9 +322,9 @@
$ret = <<<EOT
// Form Url Text File
\$formUrlFile = new XoopsFormElementTray({$language}FORM_FILE,'<br /><br />');
- \$formFile = \$this->isNew() ? '{$fieldDefault}' : \$this->getVar('{$fieldName}');
- \$formFormText = new XoopsFormText({$language}FORM_TEXT, '{$fieldName}', 75, 255, \$formFile);
- \$formUrlFile->addElement(\$formFormText{$required} );
+ \$formUrl = \$this->isNew() ? '{$fieldDefault}' : \$this->getVar('{$fieldName}');
+ \$formText = new XoopsFormText({$language}FORM_TEXT, '{$fieldName}', 75, 255, \$formUrl);
+ \$formUrlFile->addElement(\$formText{$required} );
\$formUrlFile->addElement(new XoopsFormFile({$language}FORM_UPLOAD , 'attachedfile', \$this->{$moduleDirname}->getConfig('maxsize')){$required});
\$form->addElement(\$formUrlFile);\n
EOT;
@@ -350,17 +351,16 @@
$stuModuleDirname = strtoupper($moduleDirname);
$stuTableName = strtoupper($tableName);
$stuSoleName = strtoupper($tableSoleName);
- $ucfFieldName = $this->tdmcfile->getCamelCase($fieldName, true, false);
+ $ucfFieldName = $this->tdmcfile->getCamelCase($fieldName, true);
$ccFieldName = $this->tdmcfile->getCamelCase($fieldName, false, true);
$ret = <<<EOT
// Form Upload Image
\$get{$ucfFieldName} = \$this->getVar('{$fieldName}');
\${$ccFieldName} = \$get{$ucfFieldName} ? \$get{$ucfFieldName} : 'blank.gif';
- \$imageDirectory = {$stuModuleDirname}_UPLOAD_PATH . '/images/{$tableName}';
+ \$imageDirectory = '/uploads/{$moduleDirname}/images/{$tableName}';
//
\$imageTray = new XoopsFormElementTray({$language}{$stuSoleName}_IMAGE,'<br />');
- \$imagePath = sprintf({$language}FORM_IMAGE_PATH, ".{\$imageDirectory}/");
- \$imageSelect = new XoopsFormSelect(\$imagePath, '{$fieldName}', \${$ccFieldName}, 5);
+ \$imageSelect = new XoopsFormSelect(sprintf({$language}FORM_IMAGE_PATH, ".{\$imageDirectory}/"), '{$fieldName}', \${$ccFieldName}, 5);
\$imageArray = XoopsLists::getImgListAsArray( XOOPS_ROOT_PATH . \$imageDirectory );
foreach( \$imageArray as \$image ) {
\$imageSelect->addOption("{\$image}", \$image);
@@ -445,12 +445,13 @@
*/
private function getXoopsFormSelectBox($language, $tableName, $fieldName, $required = 'false')
{
- $ret = <<<EOT
+ $ccFieldName = $this->tdmcfile->getCamelCase($fieldName, false, true);
+ $ret = <<<EOT
// Form Select
- \${$fieldName}_select = new XoopsFormSelect({$language}, '{$fieldName}', \$this->getVar('{$fieldName}'));
- \${$fieldName}_select->addOption('Empty');
- \${$fieldName}_select->addOptionArray(\${$tableName}Handler->getList());
- \$form->addElement( \${$fieldName}_select{$required} );\n
+ \${$ccFieldName}Select = new XoopsFormSelect({$language}, '{$fieldName}', \$this->getVar('{$fieldName}'));
+ \${$ccFieldName}Select->addOption('Empty');
+ \${$ccFieldName}Select->addOptionArray(\${$tableName}Handler->getList());
+ \$form->addElement( \${$ccFieldName}Select{$required} );\n
EOT;
return $ret;
@@ -492,10 +493,11 @@
*/
private function getXoopsFormRadioYN($language, $fieldName, $required = 'false')
{
- $ret = <<<EOT
+ $ccFieldName = $this->tdmcfile->getCamelCase($fieldName, false, true);
+ $ret = <<<EOT
// Form Radio Yes/No
- \${$fieldName} = \$this->isNew() ? 0 : \$this->getVar('{$fieldName}');
- \$form->addElement( new XoopsFormRadioYN({$language}, '{$fieldName}', \${$fieldName}){$required} );\n
+ \${$ccFieldName} = \$this->isNew() ? 0 : \$this->getVar('{$fieldName}');
+ \$form->addElement( new XoopsFormRadioYN({$language}, '{$fieldName}', \${$ccFieldName}){$required} );\n
EOT;
return $ret;
@@ -548,12 +550,13 @@
$fElement = $this->tdmcreate->getHandler('fieldelements')->get($fieldElement);
$rpFieldelementName = strtolower(str_replace('Table : ', '', $fElement->getVar('fieldelement_name')));
}
- $ret = <<<EOT
+ $ccFieldName = $this->tdmcfile->getCamelCase($fieldName, false, true);
+ $ret = <<<EOT
// Form Table {$ucfTableName}
\${$rpFieldelementName}Handler =& \$this->{$moduleDirname}->getHandler('{$rpFieldelementName}');
- \${$fieldName}_select = new XoopsFormSelect({$language}, '{$fieldName}', \$this->getVar('{$fieldName}'));
- \${$fieldName}_select->addOptionArray(\${$rpFieldelementName}Handler->getList());
- \$form->addElement( \${$fieldName}_select{$required} );\n
+ \${$ccFieldName}Select = new XoopsFormSelect({$language}, '{$fieldName}', \$this->getVar('{$fieldName}'));
+ \${$ccFieldName}Select->addOptionArray(\${$rpFieldelementName}Handler->getList());
+ \$form->addElement( \${$ccFieldName}Select{$required} );\n
EOT;
return $ret;
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeCommon.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeCommon.php 2015-06-02 13:47:44 UTC (rev 13076)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeCommon.php 2015-06-03 09:42:10 UTC (rev 13077)
@@ -114,6 +114,12 @@
define('{$stuModuleDirname}_UPLOAD_SHOTS_URL', {$stuModuleDirname}_UPLOAD_PATH.'/images/shots');\n
EOT;
}
+ if(in_array(array(11, 12), $fieldElement)) {
+ $ret .= <<<EOT
+ define('{$stuModuleDirname}_UPLOAD_FILES_PATH', {$stuModuleDirname}_UPLOAD_PATH.'/files');
+ define('{$stuModuleDirname}_UPLOAD_FILES_URL', {$stuModuleDirname}_UPLOAD_PATH.'/files');\n
+EOT;
+ }
if(in_array(13, $fieldElement)) {
$ret .= <<<EOT
define('{$stuModuleDirname}_UPLOAD_IMAGE_PATH', {$stuModuleDirname}_UPLOAD_PATH.'/images');
Added: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/form/TDMCreateFormRaw.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/form/TDMCreateFormRaw.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/form/TDMCreateFormRaw.php 2015-06-03 09:42:10 UTC (rev 13077)
@@ -0,0 +1,47 @@
+<?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.
+*/
+/**
+ * TDMCreateFormRaw - raw form element
+ *
+ * This class has special treatment by xoopsforms, it will render the raw
+ * value provided without wrapping in HTML
+ *
+ * @category Xoops\Form\Raw
+ * @package Xoops\Form
+ * @author trabis <tra...@gm...>
+ * @copyright 2012-2014 The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @link http://xoops.org
+ * @since 2.6.0
+*/
+class TDMCreateFormRaw extends XoopsFormElement
+{
+
+ /**
+ * __construct
+ *
+ * @param string $value value
+ */
+ public function __construct($value = '')
+ {
+ $this->setValue($value);
+ }
+
+ /**
+ * render
+ *
+ * @return string render...
[truncated message content] |
|
From: <txm...@us...> - 2015-06-03 12:38:10
|
Revision: 13080
http://sourceforge.net/p/xoops/svn/13080
Author: txmodxoops
Date: 2015-06-03 12:38:08 +0000 (Wed, 03 Jun 2015)
Log Message:
-----------
Added jquery ui tabs
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/admin.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fields.php 2015-06-03 10:51:58 UTC (rev 13079)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fields.php 2015-06-03 12:38:08 UTC (rev 13080)
@@ -8,6 +8,7 @@
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
+
/**
* tdmcreatereate module
*
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/modules.php 2015-06-03 10:51:58 UTC (rev 13079)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/modules.php 2015-06-03 12:38:08 UTC (rev 13080)
@@ -17,7 +17,6 @@
* @package tdmcreate
* @since 2.5.7
* @author TDM TEAM DEV MODULE
- * @version $Id: modules.php 12209 2013-10-23 02:49:09Z beckmi $
* @version $Id: modules.php 13040 2015-04-25 15:12:12Z timgno $
*/
defined('XOOPS_ROOT_PATH') or die('Restricted access');
@@ -185,36 +184,38 @@
//
$form = new XoopsThemeForm($title, 'moduleform', $action, 'post', true);
$form->setExtra('enctype="multipart/form-data"');
+ //
+ $tabTray = new TDMCreateFormTabTray('', 'uniqueid', xoops_getModuleOption('jquery_theme', 'system'));
+ //
+ $tab1 = new TDMCreateFormTab(_AM_TDMCREATE_IMPORTANT, 'important');
//
- $form->insertBreak('<div class="center"><b>' . _AM_TDMCREATE_MODULE_IMPORTANT . '</b></div>', 'head');
- //
$modName = $isNew ? $set['name'] : $this->getVar('mod_name');
$modName = new XoopsFormText(_AM_TDMCREATE_MODULE_NAME, 'mod_name', 50, 255, $modName);
$modName->setDescription(_AM_TDMCREATE_MODULE_NAME_DESC);
- $form->addElement($modName, true);
+ $tab1->addElement($modName, true);
//
$modDirname = $isNew ? $set['dirname'] : $this->getVar('mod_dirname');
$modDirname = new XoopsFormText(_AM_TDMCREATE_MODULE_DIRNAME, 'mod_dirname', 25, 255, $modDirname);
$modDirname->setDescription(_AM_TDMCREATE_MODULE_DIRNAME_DESC);
- $form->addElement($modDirname, true);
+ $tab1->addElement($modDirname, true);
//
$modVersion = $isNew ? $set['version'] : $this->getVar('mod_version');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_VERSION, 'mod_version', 10, 25, $modVersion), true);
+ $tab1->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_VERSION, 'mod_version', 10, 25, $modVersion), true);
//
$modSince = $isNew ? $set['since'] : $this->getVar('mod_since');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_SINCE, 'mod_since', 10, 25, $modSince), true);
+ $tab1->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_SINCE, 'mod_since', 10, 25, $modSince), true);
//
$modMinPhp = $isNew ? $set['min_php'] : $this->getVar('mod_min_php');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_MIN_PHP, 'mod_min_php', 10, 25, $modMinPhp), true);
+ $tab1->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_MIN_PHP, 'mod_min_php', 10, 25, $modMinPhp), true);
//
$modMinXoops = $isNew ? $set['min_xoops'] : $this->getVar('mod_min_xoops');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_MIN_XOOPS, 'mod_min_xoops', 10, 25, $modMinXoops), true);
+ $tab1->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_MIN_XOOPS, 'mod_min_xoops', 10, 25, $modMinXoops), true);
//
$modMinAdmin = $isNew ? $set['min_admin'] : $this->getVar('mod_min_admin');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_MIN_ADMIN, 'mod_min_admin', 10, 25, $modMinAdmin), true);
+ $tab1->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_MIN_ADMIN, 'mod_min_admin', 10, 25, $modMinAdmin), true);
//
$modMinMysql = $isNew ? $set['min_mysql'] : $this->getVar('mod_min_mysql');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_MIN_MYSQL, 'mod_min_mysql', 10, 25, $modMinMysql), true);
+ $tab1->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_MIN_MYSQL, 'mod_min_mysql', 10, 25, $modMinMysql), true);
// Name description
$editor_configs = array();
$editor_configs['name'] = 'mod_description';
@@ -224,12 +225,15 @@
$editor_configs['width'] = '50%';
$editor_configs['height'] = '100px';
$editor_configs['editor'] = $this->tdmcreate->getConfig('tdmcreate_editor');
- $form->addElement(new XoopsFormEditor(_AM_TDMCREATE_MODULE_DESCRIPTION, 'mod_description', $editor_configs), true);
+ $tab1->addElement(new XoopsFormEditor(_AM_TDMCREATE_MODULE_DESCRIPTION, 'mod_description', $editor_configs), true);
// Author
$modAuthor = $isNew ? $set['author'] : $this->getVar('mod_author');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_AUTHOR, 'mod_author', 50, 255, $modAuthor), true);
+ $tab1->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_AUTHOR, 'mod_author', 50, 255, $modAuthor), true);
$modLicense = $isNew ? $set['license'] : $this->getVar('mod_license');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_LICENSE, 'mod_license', 50, 255, $modLicense), true);
+ $tab1->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_LICENSE, 'mod_license', 50, 255, $modLicense), true);
+ $tabTray->addElement($tab1);
+ //
+ $tab2 = new TDMCreateFormTab(_AM_TDMCREATE_OPTIONS_CHECK, 'options_check');
//
$options_tray = new XoopsFormElementTray(_OPTIONS, '<br />');
//
@@ -278,9 +282,12 @@
$check_mod_inroot_copy = new XoopsFormCheckBox(' ', 'mod_inroot_copy', $mod_inroot_copy);
$check_mod_inroot_copy->addOption(1, _AM_TDMCREATE_MODULE_INROOT_MODULES_COPY);
$options_tray->addElement($check_mod_inroot_copy);
+
+ $tab2->addElement($options_tray);
+ $tabTray->addElement($tab2);
+ //
+ $tab3 = new TDMCreateFormTab(_AM_TDMCREATE_CREATE_IMAGE, 'create_image');
//
- $form->addElement($options_tray);
- //
$modImage = $this->getVar('mod_image');
$modImage = $modImage ? $modImage : $set['image'];
//
@@ -300,7 +307,7 @@
$fileseltray->addElement(new XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD, 'attachedfile', $this->tdmcreate->getConfig('maxsize')));
$fileseltray->addElement(new XoopsFormLabel(''));
$imgtray->addElement($fileseltray);
- $form->addElement($imgtray);
+ $tab3->addElement($imgtray);
//---------- START LOGO GENERATOR -----------------
$tables_img = $this->getVar('table_image') ?: 'about.png';
$iconsdir = '/Frameworks/moduleclasses/icons/32';
@@ -324,69 +331,73 @@
$buttonLogoGenerator4 = new XoopsFormButton('', 'button4', _AM_TDMCREATE_MODULE_CREATENEWLOGO, 'button');
$buttonLogoGenerator4->setExtra("onclick='createNewModuleLogo(\"" . TDMC_URL . "\")'");
$createLogoTray->addElement($buttonLogoGenerator4);
- //
- $form->addElement($createLogoTray);
+ //$options_tray $form->addElement();
+ $tab3->addElement($createLogoTray);
+ $tabTray->addElement($tab3);
+ //
+ $tab4 = new TDMCreateFormTab(_AM_TDMCREATE_NOT_IMPORTANT, 'not_important');
//------------ END LOGO GENERATOR --------------------
//
- $form->insertBreak('<div class="center"><b>' . _AM_TDMCREATE_MODULE_NOTIMPORTANT . '</b></div>', 'head');
- //
$modAuthorMail = $isNew ? $set['author_mail'] : $this->getVar('mod_author_mail');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_AUTHOR_MAIL, 'mod_author_mail', 50, 255, $modAuthorMail));
+ $tab4->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_AUTHOR_MAIL, 'mod_author_mail', 50, 255, $modAuthorMail));
//
$modAuthorWebsiteUrl = $isNew ? $set['author_website_url'] : $this->getVar('mod_author_website_url');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_AUTHOR_WEBSITE_URL, 'mod_author_website_url', 50, 255, $modAuthorWebsiteUrl));
+ $tab4->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_AUTHOR_WEBSITE_URL, 'mod_author_website_url', 50, 255, $modAuthorWebsiteUrl));
//
$modAuthorWebsiteName = $isNew ? $set['author_website_name'] : $this->getVar('mod_author_website_name');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_AUTHOR_WEBSITE_NAME, 'mod_author_website_name', 50, 255, $modAuthorWebsiteName));
+ $tab4->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_AUTHOR_WEBSITE_NAME, 'mod_author_website_name', 50, 255, $modAuthorWebsiteName));
//
$modCredits = $isNew ? $set['credits'] : $this->getVar('mod_credits');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_CREDITS, 'mod_credits', 50, 255, $modCredits));
+ $tab4->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_CREDITS, 'mod_credits', 50, 255, $modCredits));
//
$modReleaseInfo = $isNew ? $set['release_info'] : $this->getVar('mod_release_info');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_RELEASE_INFO, 'mod_release_info', 50, 255, $modReleaseInfo));
+ $tab4->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_RELEASE_INFO, 'mod_release_info', 50, 255, $modReleaseInfo));
//
$modReleaseFile = $isNew ? $set['release_file'] : $this->getVar('mod_release_file');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_RELEASE_FILE, 'mod_release_file', 50, 255, $modReleaseFile));
+ $tab4->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_RELEASE_FILE, 'mod_release_file', 50, 255, $modReleaseFile));
//
$modManual = $isNew ? $set['manual'] : $this->getVar('mod_manual');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_MANUAL, 'mod_manual', 50, 255, $modManual));
+ $tab4->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_MANUAL, 'mod_manual', 50, 255, $modManual));
//
$modManualFile = $isNew ? $set['manual_file'] : $this->getVar('mod_manual_file');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_MANUAL_FILE, 'mod_manual_file', 50, 255, $modManualFile));
+ $tab4->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_MANUAL_FILE, 'mod_manual_file', 50, 255, $modManualFile));
//
$modDemoSiteUrl = $isNew ? $set['demo_site_url'] : $this->getVar('mod_demo_site_url');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_DEMO_SITE_URL, 'mod_demo_site_url', 50, 255, $modDemoSiteUrl));
+ $tab4->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_DEMO_SITE_URL, 'mod_demo_site_url', 50, 255, $modDemoSiteUrl));
//
$modDemoSiteName = $isNew ? $set['demo_site_name'] : $this->getVar('mod_demo_site_name');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_DEMO_SITE_NAME, 'mod_demo_site_name', 50, 255, $modDemoSiteName));
+ $tab4->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_DEMO_SITE_NAME, 'mod_demo_site_name', 50, 255, $modDemoSiteName));
//
$modSupportUrl = $isNew ? $set['support_url'] : $this->getVar('mod_support_url');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_SUPPORT_URL, 'mod_support_url', 50, 255, $modSupportUrl));
+ $tab4->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_SUPPORT_URL, 'mod_support_url', 50, 255, $modSupportUrl));
//
$modSupportName = $isNew ? $set['support_name'] : $this->getVar('mod_support_name');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_SUPPORT_NAME, 'mod_support_name', 50, 255, $modSupportName));
+ $tab4->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_SUPPORT_NAME, 'mod_support_name', 50, 255, $modSupportName));
//
$modWebsiteUrl = $isNew ? $set['website_url'] : $this->getVar('mod_website_url');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_WEBSITE_URL, 'mod_website_url', 50, 255, $modWebsiteUrl));
+ $tab4->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_WEBSITE_URL, 'mod_website_url', 50, 255, $modWebsiteUrl));
//
$modWebsiteName = $isNew ? $set['website_name'] : $this->getVar('mod_website_name');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_WEBSITE_NAME, 'mod_website_name', 50, 255, $modWebsiteName));
+ $tab4->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_WEBSITE_NAME, 'mod_website_name', 50, 255, $modWebsiteName));
//
$modRelease = $isNew ? $set['release'] : $this->getVar('mod_release');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_RELEASE, 'mod_release', 50, 255, $modRelease));
+ $tab4->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_RELEASE, 'mod_release', 50, 255, $modRelease));
//
$modStatus = $isNew ? $set['status'] : $this->getVar('mod_status');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_STATUS, 'mod_status', 50, 255, $modStatus));
+ $tab4->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_STATUS, 'mod_status', 50, 255, $modStatus));
//
$modDonations = $isNew ? $set['donations'] : $this->getVar('mod_donations');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_PAYPAL_BUTTON, 'mod_donations', 50, 255, $modDonations));
+ $tab4->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_PAYPAL_BUTTON, 'mod_donations', 50, 255, $modDonations));
//
$modSubversion = $isNew ? $set['subversion'] : $this->getVar('mod_subversion');
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_SUBVERSION, 'mod_subversion', 50, 255, $modSubversion));
+ $tab4->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_SUBVERSION, 'mod_subversion', 50, 255, $modSubversion));
//
- $form->addElement(new XoopsFormHidden('op', 'save'));
- $form->addElement(new XoopsFormButton(_REQUIRED . ' <span class="red bold">*</span>', 'submit', _SUBMIT, 'submit'));
-
+ $buttonTray = new XoopsFormElementTray(_REQUIRED . ' <sup class="red bold">*</sup>', '');
+ $buttonTray->addElement(new XoopsFormHidden('op', 'save'));
+ $buttonTray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
+ $tab4->addElement($buttonTray);
+ $tabTray->addElement($tab4);
+ $form->addElement($tabTray);
return $form;
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/tables.php 2015-06-03 10:51:58 UTC (rev 13079)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/tables.php 2015-06-03 12:38:08 UTC (rev 13080)
@@ -123,214 +123,223 @@
}
$isNew = $this->isNew();
- $table_name = $this->getVar('table_name');
- $table_mid = $this->getVar('table_mid');
+ $tableName = $this->getVar('table_name');
+ $tableMid = $this->getVar('table_mid');
$title = $isNew ? sprintf(_AM_TDMCREATE_TABLE_NEW) : sprintf(_AM_TDMCREATE_TABLE_EDIT);
xoops_load('xoopsformloader');
$form = new XoopsThemeForm($title, 'tableform', $action, 'post', true);
$form->setExtra('enctype="multipart/form-data"');
+ //
+ $tabTray = new TDMCreateFormTabTray('', 'uniqueid', xoops_getModuleOption('jquery_theme', 'system'));
+ //
+ $tab1 = new TDMCreateFormTab(_AM_TDMCREATE_IMPORTANT, 'important');
//
- $modules = $this->tdmcreate->getHandler('modules')->getObjects(null);
- $mods_select = new XoopsFormSelect(_AM_TDMCREATE_TABLE_MODULES, 'table_mid', $table_mid);
- $mods_select->addOption('', _AM_TDMCREATE_TABLE_MODSELOPT);
+ $modules = $this->tdmcreate->getHandler('modules')->getObjects(null);
+ $modulesSelect = new XoopsFormSelect(_AM_TDMCREATE_TABLE_MODULES, 'table_mid', $tableMid);
+ $modulesSelect->addOption('', _AM_TDMCREATE_TABLE_MODSELOPT);
foreach ($modules as $mod) {
- //$mods_select->addOptionArray();
- $mods_select->addOption($mod->getVar('mod_id'), $mod->getVar('mod_name'));
+ //$modulesSelect->addOptionArray();
+ $modulesSelect->addOption($mod->getVar('mod_id'), $mod->getVar('mod_name'));
}
- $form->addElement($mods_select, true);
+ $tab1->addElement($modulesSelect, true);
//
- $table_name_field = new XoopsFormText(_AM_TDMCREATE_TABLE_NAME, 'table_name', 40, 150, $table_name);
- $table_name_field->setDescription(_AM_TDMCREATE_TABLE_NAME_DESC);
- $form->addElement($table_name_field, true);
+ $tableNameText = new XoopsFormText(_AM_TDMCREATE_TABLE_NAME, 'table_name', 40, 150, $tableName);
+ $tableNameText->setDescription(_AM_TDMCREATE_TABLE_NAME_DESC);
+ $tab1->addElement($tableNameText, true);
//
- $table_solename_field = new XoopsFormText(_AM_TDMCREATE_TABLE_SOLENAME, 'table_solename', 40, 150, $this->getVar('table_solename'));
- $table_solename_field->setDescription(_AM_TDMCREATE_TABLE_SOLENAME_DESC);
- $form->addElement($table_solename_field, true);
+ $tableSoleNameText = new XoopsFormText(_AM_TDMCREATE_TABLE_SOLENAME, 'table_solename', 40, 150, $this->getVar('table_solename'));
+ $tableSoleNameText->setDescription(_AM_TDMCREATE_TABLE_SOLENAME_DESC);
+ $tab1->addElement($tableSoleNameText, true);
//
$tablesHandler =& $this->tdmcreate->getHandler('tables');
$criteria = new CriteriaCompo(new Criteria('table_category', 0), 'AND');
- $criteria->add(new Criteria('table_mid', $table_mid), 'AND');
- $criteria->add(new Criteria('table_name', $table_name));
- $table_category = $tablesHandler->getCount($criteria);
+ $criteria->add(new Criteria('table_mid', $tableMid), 'AND');
+ $criteria->add(new Criteria('table_name', $tableName));
+ $tableCategory = $tablesHandler->getCount($criteria);
unset($criteria);
- //if ( ($table_category == 0) || $isNew ) {
- $radio_category = $isNew ? 0 : $this->getVar('table_category');
- $category = new XoopsFormRadioYN(_AM_TDMCREATE_TABLE_CATEGORY, 'table_category', $radio_category);
+ //if ( ($tableCategory == 0) || $isNew ) {
+ $radioCategory = $isNew ? 0 : $this->getVar('table_category');
+ $category = new XoopsFormRadioYN(_AM_TDMCREATE_TABLE_CATEGORY, 'table_category', $radioCategory);
$category->setDescription(_AM_TDMCREATE_TABLE_CATEGORY_DESC);
- $form->addElement($category);
+ $tab1->addElement($category);
//}
//
- $table_fieldname = new XoopsFormText(_AM_TDMCREATE_TABLE_FIELDNAME, 'table_fieldname', 30, 50, $this->getVar('table_fieldname'));
- $table_fieldname->setDescription(_AM_TDMCREATE_TABLE_FIELDNAME_DESC);
- $form->addElement($table_fieldname);
+ $tableFieldname = new XoopsFormText(_AM_TDMCREATE_TABLE_FIELDNAME, 'table_fieldname', 30, 50, $this->getVar('table_fieldname'));
+ $tableFieldname->setDescription(_AM_TDMCREATE_TABLE_FIELDNAME_DESC);
+ $tab1->addElement($tableFieldname);
//
- $table_nbfield = new XoopsFormText(_AM_TDMCREATE_TABLE_NBFIELDS, 'table_nbfields', 10, 25, $this->getVar('table_nbfields'));
- $table_nbfield->setDescription(_AM_TDMCREATE_TABLE_NBFIELDS_DESC);
- $form->addElement($table_nbfield, true);
+ $tableNumbFileds = new XoopsFormText(_AM_TDMCREATE_TABLE_NBFIELDS, 'table_nbfields', 10, 25, $this->getVar('table_nbfields'));
+ $tableNumbFileds->setDescription(_AM_TDMCREATE_TABLE_NBFIELDS_DESC);
+ $tab1->addElement($tableNumbFileds, true);
//
if (!$isNew) {
- $table_order = new XoopsFormText(_AM_TDMCREATE_TABLE_ORDER, 'table_order', 5, 10, $this->getVar('table_order'));
- $table_order->setDescription(_AM_TDMCREATE_TABLE_ORDER_DESC);
- $form->addElement($table_order, true);
+ $tableOrder = new XoopsFormText(_AM_TDMCREATE_TABLE_ORDER, 'table_order', 5, 10, $this->getVar('table_order'));
+ $tableOrder->setDescription(_AM_TDMCREATE_TABLE_ORDER_DESC);
+ $tab1->addElement($tableOrder, true);
}
//
- $get_table_image = $this->getVar('table_image');
- $table_image = $get_table_image ?: 'blank.gif';
- $iconsdir = '/Frameworks/moduleclasses/icons/32';
- $uploads_dir = '/uploads/tdmcreate/images/tables';
- $iconsdirectory = is_dir(XOOPS_ROOT_PATH . $iconsdir) ? $iconsdir : $uploads_dir;
+ $getTableImage = $this->getVar('table_image');
+ $tableImage = $getTableImage ?: 'blank.gif';
+ $icons32Directory = '/Frameworks/moduleclasses/icons/32';
+ $uploadsDirectory = '/uploads/tdmcreate/images/tables';
+ $iconsDirectory = is_dir(XOOPS_ROOT_PATH . $icons32Directory) ? $icons32Directory : $uploadsDirectory;
//
$imgtray1 = new XoopsFormElementTray(_AM_TDMCREATE_TABLE_IMAGE, '<br />');
- $imgpath1 = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, ".{$iconsdirectory}/");
- $imageselect1 = new XoopsFormSelect($imgpath1, 'table_image', $table_image, 10);
- $image_array1 = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . $iconsdirectory);
- foreach ($image_array1 as $image1) {
- $imageselect1->addOption("{$image1}", $image1);
+ $imgpath1 = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, ".{$iconsDirectory}/");
+ $imageSelect1 = new XoopsFormSelect($imgpath1, 'table_image', $tableImage, 10);
+ $imageArray1 = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . $iconsDirectory);
+ foreach ($imageArray1 as $image1) {
+ $imageSelect1->addOption("{$image1}", $image1);
}
- $imageselect1->setExtra("onchange='showImgSelected(\"image1\", \"table_image\", \"" . $iconsdirectory . "\", \"\", \"" . XOOPS_URL . "\")'");
- $imgtray1->addElement($imageselect1, false);
- $imgtray1->addElement(new XoopsFormLabel('', "<br /><img src='" . XOOPS_URL . "/" . $iconsdirectory . "/" . $table_image . "' name='image1' id='image1' alt='' />"));
+ $imageSelect1->setExtra("onchange='showImgSelected(\"image1\", \"table_image\", \"" . $iconsDirectory . "\", \"\", \"" . XOOPS_URL . "\")'");
+ $imgtray1->addElement($imageSelect1, false);
+ $imgtray1->addElement(new XoopsFormLabel('', "<br /><img src='" . XOOPS_URL . "/" . $iconsDirectory . "/" . $tableImage . "' name='image1' id='image1' alt='' />"));
$fileseltray1 = new XoopsFormElementTray('', '<br />');
$fileseltray1->addElement(new XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD, 'attachedfile', $this->tdmcreate->getConfig('maxsize')));
$fileseltray1->addElement(new XoopsFormLabel(''));
$imgtray1->addElement($fileseltray1);
$imgtray1->setDescription(_AM_TDMCREATE_TABLE_IMAGE_DESC);
- $form->addElement($imgtray1);
+ $tab1->addElement($imgtray1);
//
- $table_autoincrement = $this->isNew() ? 1 : $this->getVar('table_autoincrement');
- $check_table_autoincrement = new XoopsFormRadioYN(_AM_TDMCREATE_TABLE_AUTO_INCREMENT, 'table_autoincrement', $table_autoincrement);
- $check_table_autoincrement->setDescription(_AM_TDMCREATE_TABLE_AUTO_INCREMENT_DESC);
- //$check_table_autoincrement->addOption(1, _AM_TDMCREATE_TABLE_AUTO_INCREMENT_OPTION);
- $form->addElement($check_table_autoincrement);
+ $tableAutoincrement = $this->isNew() ? 1 : $this->getVar('table_autoincrement');
+ $checkTableAutoincrement = new XoopsFormRadioYN(_AM_TDMCREATE_TABLE_AUTO_INCREMENT, 'table_autoincrement', $tableAutoincrement);
+ $checkTableAutoincrement->setDescription(_AM_TDMCREATE_TABLE_AUTO_INCREMENT_DESC);
+ $tab1->addElement($checkTableAutoincrement);
+ $tabTray->addElement($tab1);
+ //
+ $tab2 = new TDMCreateFormTab(_AM_TDMCREATE_OPTIONS_CHECK, 'options_check');
//
- $options_tray = new XoopsFormElementTray(_OPTIONS, '<br />');
+ $optionsTray = new XoopsFormElementTray(_OPTIONS, '<br />');
//
- $table_checkbox_all = new XoopsFormCheckBox('', "tablebox", 1);
- $table_checkbox_all->addOption('allbox', _AM_TDMCREATE_TABLE_ALL);
- $table_checkbox_all->setExtra(" onclick='xoopsCheckAll(\"tableform\", \"tablebox\");' ");
- $table_checkbox_all->setClass('xo-checkall');
- $options_tray->addElement($table_checkbox_all);
+ $tableCheckAll = new XoopsFormCheckBox('', "tablebox", 1);
+ $tableCheckAll->addOption('allbox', _AM_TDMCREATE_TABLE_ALL);
+ $tableCheckAll->setExtra(" onclick='xoopsCheckAll(\"tableform\", \"tablebox\");' ");
+ $tableCheckAll->setClass('xo-checkall');
+ $optionsTray->addElement($tableCheckAll);
//
- $table_index = $isNew ? 0 : $this->getVar('table_index');
- $check_table_index = new XoopsFormCheckBox(' ', 'table_index', $table_index);
- $check_table_index->addOption(1, _AM_TDMCREATE_TABLE_INDEX);
- $options_tray->addElement($check_table_index);
+ $tableIndex = $isNew ? 0 : $this->getVar('table_index');
+ $checkTableIndex = new XoopsFormCheckBox(' ', 'table_index', $tableIndex);
+ $checkTableIndex->addOption(1, _AM_TDMCREATE_TABLE_INDEX);
+ $optionsTray->addElement($checkTableIndex);
//
- $table_blocks = $isNew ? 0 : $this->getVar('table_blocks');
- $check_table_blocks = new XoopsFormCheckBox(' ', 'table_blocks', $table_blocks);
- $check_table_blocks->addOption(1, _AM_TDMCREATE_TABLE_BLOCKS);
- $options_tray->addElement($check_table_blocks);
+ $tableBlocks = $isNew ? 0 : $this->getVar('table_blocks');
+ $checkTableBlocks = new XoopsFormCheckBox(' ', 'table_blocks', $tableBlocks);
+ $checkTableBlocks->addOption(1, _AM_TDMCREATE_TABLE_BLOCKS);
+ $optionsTray->addElement($checkTableBlocks);
//
- $table_admin = $isNew ? 0 : $this->getVar('table_admin');
- $check_table_admin = new XoopsFormCheckBox(' ', 'table_admin', $table_admin);
- $check_table_admin->addOption(1, _AM_TDMCREATE_TABLE_ADMIN);
- $options_tray->addElement($check_table_admin);
+ $tableAdmin = $isNew ? 0 : $this->getVar('table_admin');
+ $checkTableAdmin = new XoopsFormCheckBox(' ', 'table_admin', $tableAdmin);
+ $checkTableAdmin->addOption(1, _AM_TDMCREATE_TABLE_ADMIN);
+ $optionsTray->addElement($checkTableAdmin);
//
$table_user = $isNew ? 0 : $this->getVar('table_user');
- $check_table_user = new XoopsFormCheckBox(' ', 'table_user', $table_user);
- $check_table_user->addOption(1, _AM_TDMCREATE_TABLE_USER);
- $options_tray->addElement($check_table_user);
+ $checkTableUser = new XoopsFormCheckBox(' ', 'table_user', $table_user);
+ $checkTableUser->addOption(1, _AM_TDMCREATE_TABLE_USER);
+ $optionsTray->addElement($checkTableUser);
//
- $table_submenu = $isNew ? 0 : $this->getVar('table_submenu');
- $check_table_submenu = new XoopsFormCheckBox(' ', 'table_submenu', $table_submenu);
- $check_table_submenu->addOption(1, _AM_TDMCREATE_TABLE_SUBMENU);
- $options_tray->addElement($check_table_submenu);
+ $tableSubmenu = $isNew ? 0 : $this->getVar('table_submenu');
+ $checkTableSubmenu = new XoopsFormCheckBox(' ', 'table_submenu', $tableSubmenu);
+ $checkTableSubmenu->addOption(1, _AM_TDMCREATE_TABLE_SUBMENU);
+ $optionsTray->addElement($checkTableSubmenu);
//
- $table_submit = $isNew ? 0 : $this->getVar('table_submit');
- $check_table_submit = new XoopsFormCheckBox(' ', 'table_submit', $table_submit);
- $check_table_submit->addOption(1, _AM_TDMCREATE_TABLE_SUBMIT);
- $options_tray->addElement($check_table_submit);
+ $tableSubmit = $isNew ? 0 : $this->getVar('table_submit');
+ $checkTableSubmit = new XoopsFormCheckBox(' ', 'table_submit', $tableSubmit);
+ $checkTableSubmit->addOption(1, _AM_TDMCREATE_TABLE_SUBMIT);
+ $optionsTray->addElement($checkTableSubmit);
//
- $table_tag = $isNew ? 0 : $this->getVar('table_tag');
- $check_table_tag = new XoopsFormCheckBox(' ', 'table_tag', $table_tag);
- $check_table_tag->addOption(1, _AM_TDMCREATE_TABLE_TAG);
- $options_tray->addElement($check_table_tag);
+ $tableTag = $isNew ? 0 : $this->getVar('table_tag');
+ $checkTableTag = new XoopsFormCheckBox(' ', 'table_tag', $tableTag);
+ $checkTableTag->addOption(1, _AM_TDMCREATE_TABLE_TAG);
+ $optionsTray->addElement($checkTableTag);
//
- $table_broken = $isNew ? 0 : $this->getVar('table_broken');
- $check_table_broken = new XoopsFormCheckBox(' ', 'table_broken', $table_broken);
- $check_table_broken->addOption(1, _AM_TDMCREATE_TABLE_BROKEN);
- $options_tray->addElement($check_table_broken);
+ $tableBroken = $isNew ? 0 : $this->getVar('table_broken');
+ $checkTableBroken = new XoopsFormCheckBox(' ', 'table_broken', $tableBroken);
+ $checkTableBroken->addOption(1, _AM_TDMCREATE_TABLE_BROKEN);
+ $optionsTray->addElement($checkTableBroken);
//
$criteria = new CriteriaCompo(new...
[truncated message content] |
|
From: <txm...@us...> - 2015-06-09 17:54:03
|
Revision: 13085
http://sourceforge.net/p/xoops/svn/13085
Author: txmodxoops
Date: 2015-06-09 17:53:59 +0000 (Tue, 09 Jun 2015)
Log Message:
-----------
Added template list
Added more fields in database
Refactoring
Fixed seceral bugs
Updated existing files and renamed
Neede a fresh installation
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/building.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/settings.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/assets/js/sortable.js
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/autoload.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateArchitecture.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateFile.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateHtmlSmartyCodes.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateTableFields.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminMenu.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminObjects.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminPages.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminPermissions.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/blocks/BlocksFiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFormElements.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/css/CssStyles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeCommon.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeFunctions.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeInstall.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageMain.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageModinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/sql/SqlFile.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminPages.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/blocks/TemplatesBlocks.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserBreadcrumbs.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserFooter.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserHeader.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserIndex.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserPages.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserFooter.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserHeader.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserIndex.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserPages.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserXoopsVersion.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/logoGenerator.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/settings.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/include/common.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/admin.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/help/help.html
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/sql/mysql.sql
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/templates/admin/tdmcreate_fields_item.tpl
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/templates/admin/tdmcreate_tables_item.tpl
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserPagesList.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/helper.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/session.php
Removed Paths:
-------------
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/TDMCreateHelper.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/TDMCreateSession.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/building.php 2015-06-09 02:59:11 UTC (rev 13084)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/building.php 2015-06-09 17:53:59 UTC (rev 13085)
@@ -23,11 +23,11 @@
$mid = XoopsRequest::getInt('mod_id');
$moduleObj = $tdmcreate->getHandler('modules')->get($mid);
// Clear cache
-$cacheFile1 = TDMC_CLASSES_PATH . '/cache/classpaths.cache';
-$cacheFile2 = TDMC_CLASSES_PATH . '/files/cache/classpaths.cache';
-if (file_exists($cacheFile1) && file_exists($cacheFile2)) {
- unlink($cacheFile1);
- unlink($cacheFile2);
+if (file_exists($cacheFile1 = TDMC_CLASSES_PATH . '/cache/classpaths.cache') &&
+ file_exists($cacheFile2 = TDMC_CLASSES_PATH . '/files/cache/classpaths.cache')) {
+ if (unlink($cacheFile1) && unlink($cacheFile2)) {
+ redirect_header('building.php?op=build', 5, _AM_TDMCREATE_BUILDING_DELETED_CACHE_FILES);
+ }
}
// Switch option
switch ($op) {
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/fields.php 2015-06-09 02:59:11 UTC (rev 13084)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/fields.php 2015-06-09 17:53:59 UTC (rev 13085)
@@ -129,38 +129,41 @@
$fields = $tdmcreate->getHandler('fields');
$fieldOrder = 1;
// Set Variables
- foreach($_POST['field_id'] as $key => $value)
+ foreach($_POST['field_id'] as $key => $value)
{
if(isset($value)){
$fieldsObj =& $fields->get($value);
} else {
$fieldsObj =& $fields->create();
}
- $order = $fieldsObj->isNew() ? $fieldOrder : XoopsRequest::getInt('field_order');
+ $order = $fieldsObj->isNew() ? $fieldOrder : $_GET['field_order'][$key];
// Set Data
$fieldsObj->setVar( 'field_mid', $fieldMid );
- $fieldsObj->setVar( 'field_tid', $fieldTid );
+ $fieldsObj->setVar( 'field_tid', $fieldTid );
$fieldsObj->setVar( 'field_order', $order );
$fieldsObj->setVar( 'field_name', $_POST['field_name'][$key]);
- $fieldsObj->setVar( 'field_type', $_POST['field_type'][$key]);
+ $fieldsObj->setVar( 'field_type', $_POST['field_type'][$key]);
$fieldsObj->setVar( 'field_value', $_POST['field_value'][$key]);
$fieldsObj->setVar( 'field_attribute', $_POST['field_attribute'][$key]);
- $fieldsObj->setVar( 'field_null', $_POST['field_null'][$key]);
- $fieldsObj->setVar( 'field_default', $_POST['field_default'][$key]);
- $fieldsObj->setVar( 'field_key', $_POST['field_key'][$key]);
- $fieldsObj->setVar( 'field_element', $_POST['field_element'][$key]);
+ $fieldsObj->setVar( 'field_null', $_POST['field_null'][$key]);
+ $fieldsObj->setVar( 'field_default', $_POST['field_default'][$key]);
+ $fieldsObj->setVar( 'field_key', $_POST['field_key'][$key]);
+ $fieldsObj->setVar( 'field_element', $_POST['field_element'][$key]);
$fieldsObj->setVar( 'field_parent', (1 == $_REQUEST['field_parent'][$key]) ? 1 : 0);
+ $fieldsObj->setVar( 'field_admin', (1 == $_REQUEST['field_admin'][$key]) ? 1 : 0);
$fieldsObj->setVar( 'field_inlist', (1 == $_REQUEST['field_inlist'][$key]) ? 1 : 0);
$fieldsObj->setVar( 'field_inform', (1 == $_REQUEST['field_inform'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_admin', (1 == $_REQUEST['field_admin'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_user', (1 == $_REQUEST['field_user'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_block', (1 == $_REQUEST['field_block'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_main', ($key == $_REQUEST['field_main'] ? 1 : 0));
- $fieldsObj->setVar( 'field_search', (1 == $_REQUEST['field_search'][$key]) ? 1 : 0);
+ $fieldsObj->setVar( 'field_user', (1 == $_REQUEST['field_user'][$key]) ? 1 : 0);
+ $fieldsObj->setVar( 'field_thead', (1 == $_REQUEST['field_thead'][$key]) ? 1 : 0);
+ $fieldsObj->setVar( 'field_tbody', (1 == $_REQUEST['field_tbody'][$key]) ? 1 : 0);
+ $fieldsObj->setVar( 'field_tfoot', (1 == $_REQUEST['field_tfoot'][$key]) ? 1 : 0);
+ $fieldsObj->setVar( 'field_block', (1 == $_REQUEST['field_block'][$key]) ? 1 : 0);
+ $fieldsObj->setVar( 'field_main', ($key == $_REQUEST['field_main'] ? 1 : 0));
+ $fieldsObj->setVar( 'field_search', (1 == $_REQUEST['field_search'][$key]) ? 1 : 0);
$fieldsObj->setVar( 'field_required', (1 == $_REQUEST['field_required'][$key]) ? 1 : 0);
// Insert Data
$tdmcreate->getHandler('fields')->insert($fieldsObj);
- $fieldOrder++;
+ ++$fieldOrder;
}
unset($fieldOrder);
// Get table name from field table id
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/modules.php 2015-06-09 02:59:11 UTC (rev 13084)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/modules.php 2015-06-09 17:53:59 UTC (rev 13085)
@@ -131,18 +131,19 @@
'mod_website_url' => $_POST['mod_website_url'],
'mod_website_name' => $_POST['mod_website_name'],
'mod_release' => $_POST['mod_release'],
- 'mod_status' => $_POST['mod_status'],
- 'mod_admin' => ((1 == $_REQUEST['mod_admin']) ? 1 : 0),
- 'mod_user' => ((1 == $_REQUEST['mod_user']) ? 1 : 0),
- 'mod_blocks' => ((1 == $_REQUEST['mod_blocks']) ? 1 : 0),
- 'mod_search' => ((1 == $_REQUEST['mod_search']) ? 1 : 0),
- 'mod_comments' => ((1 == $_REQUEST['mod_comments']) ? 1 : 0),
- 'mod_notifications' => ((1 == $_REQUEST['mod_notifications']) ? 1 : 0),
- 'mod_permissions' => ((1 == $_REQUEST['mod_permissions']) ? 1 : 0),
- 'mod_inroot_copy' => ((1 == $_REQUEST['mod_inroot_copy']) ? 1 : 0),
+ 'mod_status' => $_POST['mod_status'],
'mod_donations' => $_POST['mod_donations'],
'mod_subversion' => $_POST['mod_subversion'])
);
+ $moduleOption = XoopsRequest::getArray('module_option', array());
+ $modulesObj->setVar('mod_admin', in_array('admin', $moduleOption));
+ $modulesObj->setVar('mod_user', in_array('user', $moduleOption));
+ $modulesObj->setVar('mod_blocks', in_array('blocks', $moduleOption));
+ $modulesObj->setVar('mod_search', in_array('search', $moduleOption));
+ $modulesObj->setVar('mod_comments', in_array('comments', $moduleOption));
+ $modulesObj->setVar('mod_notifications', in_array('notifications', $moduleOption));
+ $modulesObj->setVar('mod_permissions', in_array('permissions', $moduleOption));
+ $modulesObj->setVar('mod_inroot_copy', in_array('inroot', $moduleOption));
if ($tdmcreate->getHandler('modules')->insert($modulesObj)) {
if ($modulesObj->isNew()) {
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/settings.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/settings.php 2015-06-09 02:59:11 UTC (rev 13084)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/settings.php 2015-06-09 17:53:59 UTC (rev 13085)
@@ -75,18 +75,19 @@
'set_website_url' => $_POST['set_website_url'],
'set_website_name' => $_POST['set_website_name'],
'set_release' => $_POST['set_release'],
- 'set_status' => $_POST['set_status'],
- 'set_admin' => ((1 == $_REQUEST['set_admin']) ? 1 : 0),
- 'set_user' => ((1 == $_REQUEST['set_user']) ? 1 : 0),
- 'set_blocks' => ((1 == $_REQUEST['set_blocks']) ? 1 : 0),
- 'set_search' => ((1 == $_REQUEST['set_search']) ? 1 : 0),
- 'set_comments' => ((1 == $_REQUEST['set_comments']) ? 1 : 0),
- 'set_notifications' => ((1 == $_REQUEST['set_notifications']) ? 1 : 0),
- 'set_permissions' => ((1 == $_REQUEST['set_permissions']) ? 1 : 0),
- 'set_inroot_copy' => ((1 == $_REQUEST['set_inroot_copy']) ? 1 : 0),
+ 'set_status' => $_POST['set_status'],
'set_donations' => $_POST['set_donations'],
'set_subversion' => $_POST['set_subversion'])
);
+ $settingOption = XoopsRequest::getArray('setting_option', array());
+ $settingsObj->setVar('set_admin', in_array('admin', $settingOption));
+ $settingsObj->setVar('set_user', in_array('user', $settingOption));
+ $settingsObj->setVar('set_blocks', in_array('blocks', $settingOption));
+ $settingsObj->setVar('set_search', in_array('search', $settingOption));
+ $settingsObj->setVar('set_comments', in_array('comments', $settingOption));
+ $settingsObj->setVar('set_notifications', in_array('notifications', $settingOption));
+ $settingsObj->setVar('set_permissions', in_array('permissions', $settingOption));
+ $settingsObj->setVar('set_inroot_copy', in_array('inroot', $settingOption));
if ($tdmcreate->getHandler('settings')->insert($settingsObj)) {
redirect_header('settings.php', 5, sprintf(_AM_TDMCREATE_MODULE_FORM_UPDATED_OK, $_POST['set_name']));
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/tables.php 2015-06-09 02:59:11 UTC (rev 13084)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/tables.php 2015-06-09 17:53:59 UTC (rev 13085)
@@ -133,7 +133,7 @@
$tablesObj =& $tables->create();
}
$tableOrder = XoopsRequest::getInt('table_order');
- $order = $tablesObj->isNew() ? $tableOrder + 1 : $tableOrder;
+ $order = $tablesObj->isNew() ? $tableOrder + 1: $tableOrder;
// Form save tables
$tablesObj->setVars(array(
'table_mid' => $tableMid,
@@ -159,27 +159,28 @@
} else {
$tablesObj->setVar('table_image', $_POST['table_image']);
}
- $tablesObj->setVars(array(
- 'table_autoincrement' => ((1 == $_REQUEST['table_autoincrement']) ? 1 : 0),
- 'table_index' => ((1 == $_REQUEST['table_index']) ? 1 : 0),
- 'table_blocks' => ((1 == $_REQUEST['table_blocks']) ? 1 : 0),
- 'table_admin' => ((1 == $_REQUEST['table_admin']) ? 1 : 0),
- 'table_user' => ((1 == $_REQUEST['table_user']) ? 1 : 0),
- 'table_submenu' => ((1 == $_REQUEST['table_submenu']) ? 1 : 0),
- 'table_submit' => ((1 == $_REQUEST['table_submit']) ? 1 : 0),
- 'table_tag' => ((1 == $_REQUEST['table_tag']) ? 1 : 0),
- 'table_broken' => ((1 == $_REQUEST['table_broken']) ? 1 : 0),
- 'table_search' => ((1 == $_REQUEST['table_search']) ? 1 : 0),
- 'table_comments' => ((1 == $_REQUEST['table_comments']) ? 1 : 0),
- 'table_notifications' => ((1 == $_REQUEST['table_notifications']) ? 1 : 0),
- 'table_permissions' => ((1 == $_REQUEST['table_permissions']) ? 1 : 0),
- 'table_rate' => ((1 == $_REQUEST['table_rate']) ? 1 : 0),
- 'table_print' => ((1 == $_REQUEST['table_print']) ? 1 : 0),
- 'table_pdf' => ((1 == $_REQUEST['table_pdf']) ? 1 : 0),
- 'table_rss' => ((1 == $_REQUEST['table_rss']) ? 1 : 0),
- 'table_single' => ((1 == $_REQUEST['table_single']) ? 1 : 0),
- 'table_visit' => ((1 == $_REQUEST['table_visit']) ? 1 : 0)
- ));
+ $tablesObj->setVar( 'table_autoincrement', (1 == $_REQUEST['table_autoincrement']) ? 1 : 0 );
+ // Options
+ $tableOption = XoopsRequest::getArray('table_option', array());
+ $tablesObj->setVar('table_install', in_array('install', $tableOption));
+ $tablesObj->setVar('table_index', in_array('index', $tableOption));
+ $tablesObj->setVar('table_blocks', in_array('blocks', $tableOption));
+ $tablesObj->setVar('table_admin', in_array('admin', $tableOption));
+ $tablesObj->setVar('table_user', in_array('user', $tableOption));
+ $tablesObj->setVar('table_submenu', in_array('submenu', $tableOption));
+ $tablesObj->setVar('table_submit', in_array('submit', $tableOption));
+ $tablesObj->setVar('table_tag', in_array('tag', $tableOption));
+ $tablesObj->setVar('table_broken', in_array('broken', $tableOption));
+ $tablesObj->setVar('table_search', in_array('search', $tableOption));
+ $tablesObj->setVar('table_comments', in_array('comments', $tableOption));
+ $tablesObj->setVar('table_notifications', in_array('notifications', $tableOption));
+ $tablesObj->setVar('table_permissions', in_array('permissions', $tableOption));
+ $tablesObj->setVar('table_rate', in_array('rate', $tableOption));
+ $tablesObj->setVar('table_print', in_array('print', $tableOption));
+ $tablesObj->setVar('table_pdf', in_array('pdf', $tableOption));
+ $tablesObj->setVar('table_rss', in_array('rss', $tableOption));
+ $tablesObj->setVar('table_single', in_array('single', $tableOption));
+ $tablesObj->setVar('table_visit', in_array('visit', $tableOption));
//
if ($tables->insert($tablesObj)) {
if ($tablesObj->isNew()) {
@@ -251,32 +252,32 @@
if ($modId > 0) {
$modulesObj = $tdmcreate->getHandler('modules')->get($modId);
if (isset($_POST['mod_admin'])) {
- $mod_admin = $modulesObj->getVar('mod_admin');
- $modulesObj->setVar('mod_admin', !$mod_admin);
+ $modAdmin = $modulesObj->getVar('mod_admin');
+ $modulesObj->setVar('mod_admin', !$modAdmin);
}
if (isset($_POST['mod_user'])) {
$mod_user = $modulesObj->getVar('mod_user');
$modulesObj->setVar('mod_user', !$mod_user);
}
if (isset($_POST['mod_blocks'])) {
- $mod_blocks = $modulesObj->getVar('mod_blocks');
- $modulesObj->setVar('mod_blocks', !$mod_blocks);
+ $modBlocks = $modulesObj->getVar('mod_blocks');
+ $modulesObj->setVar('mod_blocks', !$modBlocks);
}
if (isset($_POST['mod_search'])) {
- $mod_search = $modulesObj->getVar('mod_search');
- $modulesObj->setVar('mod_search', !$mod_search);
+ $modSearch = $modulesObj->getVar('mod_search');
+ $modulesObj->setVar('mod_search', !$modSearch);
}
if (isset($_POST['mod_comments'])) {
- $mod_comments = $modulesObj->getVar('mod_comments');
- $modulesObj->setVar('mod_comments', !$mod_comments);
+ $modComments = $modulesObj->getVar('mod_comments');
+ $modulesObj->setVar('mod_comments', !$modComments);
}
if (isset($_POST['mod_notifications'])) {
- $mod_notifications = $modulesObj->getVar('mod_notifications');
- $modulesObj->setVar('mod_notifications', !$mod_notifications);
+ $modNotifications = $modulesObj->getVar('mod_notifications');
+ $modulesObj->setVar('mod_notifications', !$modNotifications);
}
if (isset($_POST['mod_permissions'])) {
- $mod_permissions = $modulesObj->getVar('mod_permissions');
- $modulesObj->setVar('mod_permissions', !$mod_permissions);
+ $modPermissions = $modulesObj->getVar('mod_permissions');
+ $modulesObj->setVar('mod_permissions', !$modPermissions);
}
if ($tdmcreate->getHandler('modules')->insert($modulesObj)) {
redirect_header('modules.php', 3, _AM_TDMCREATE_TOGGLE_SUCCESS);
@@ -288,32 +289,36 @@
if ($tableId > 0) {
$tablesObj = $tdmcreate->getHandler('tables')->get($tableId);
if (isset($_POST['table_admin'])) {
- $table_admin = $tablesObj->getVar('table_admin');
- $tablesObj->setVar('table_admin', !$table_admin);
+ $tableAdmin = $tablesObj->getVar('table_admin');
+ $tablesObj->setVar('table_admin', !$tableAdmin);
}
if (isset($_POST['table_user'])) {
- $table_user = $tablesObj->getVar('table_user');
- $tablesObj->setVar('table_user', !$table_user);
+ $tableUser = $tablesObj->getVar('table_user');
+ $tablesObj->setVar('table_user', !$tableUser);
}
if (isset($_POST['table_blocks'])) {
- $table_blocks = $tablesObj->getVar('table_blocks');
- $tablesObj->setVar('table_blocks', !$table_blocks);
+ $tableBlocks = $tablesObj->getVar('table_blocks');
+ $tablesObj->setVar('table_blocks', !$tableBlocks);
}
+ if (isset($_POST['table_submenu'])) {
+ $tableSubmenu = $tablesObj->getVar('table_submenu');
+ $tablesObj->setVar('table_submenu', !$tableSubmenu);
+ }
if (isset($_POST['table_search'])) {
- $table_search = $tablesObj->getVar('table_search');
- $tablesObj->setVar('table_search', !$table_search);
+ $tableSearch = $tablesObj->getVar('table_search');
+ $tablesObj->setVar('table_search', !$tableSearch);
}
if (isset($_POST['table_comments'])) {
- $table_comments = $tablesObj->getVar('table_comments');
- $tablesObj->setVar('table_comments', !$table_comments);
+ $tableComments = $tablesObj->getVar('table_comments');
+ $tablesObj->setVar('table_comments', !$tableComments);
}
if (isset($_POST['table_notifications'])) {
- $table_notifications = $tablesObj->getVar('table_notifications');
- $tablesObj->setVar('table_notifications', !$table_notifications);
+ $tableNotifications = $tablesObj->getVar('table_notifications');
+ $tablesObj->setVar('table_notifications', !$tableNotifications);
}
if (isset($_POST['table_permissions'])) {
- $table_permissions = $tablesObj->getVar('table_permissions');
- $tablesObj->setVar('table_permissions', !$table_permissions);
+ $tablePermissions = $tablesObj->getVar('table_permissions');
+ $tablesObj->setVar('table_permissions', !$tablePermissions);
}
if ($tdmcreate->getHandler('tables')->insert($tablesObj)) {
redirect_header('tables.php', 3, _AM_TDMCREATE_TOGGLE_SUCCESS);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/assets/js/sortable.js
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/assets/js/sortable.js 2015-06-09 02:59:11 UTC (rev 13084)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/assets/js/sortable.js 2015-06-09 17:53:59 UTC (rev 13085)
@@ -3,7 +3,7 @@
$(document).ready( function(){
/* Call the container items to reorder tables */
$('.table-list').sortable({
- accept: 'tdmc-tables',
+ accept: 'tables',
opacity: 0.6,
handle : '.move',
cursor: 'move',
@@ -19,8 +19,8 @@
}
).disableSelection();
/* Call the container items to reorder fields */
- $('.field-list').sortable({
- accept: 'tdmc-fields',
+ $('.field-list').sortable({
+ accept: 'fields',
opacity: 0.6,
handle : '.move',
cursor: 'move',
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/TDMCreateHelper.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/TDMCreateHelper.php 2015-06-09 02:59:11 UTC (rev 13084)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/TDMCreateHelper.php 2015-06-09 17:53:59 UTC (rev 13085)
@@ -1,220 +0,0 @@
-<?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 trabis <lus...@gm...>
- * @version $Id: TDMCreateHelper.php 12258 2014-04-12 23:45:12Z timgno $
- */
-defined('XOOPS_ROOT_PATH') or die('Restricted access');
-
-/**
- * Class TDMCreateHelper
- */
-class TDMCreateHelper
-{
- /**
- * @var string
- */
- private $dirname;
- /**
- * @var string
- */
- private $module;
- /**
- * @var string
- */
- private $handler;
- /**
- * @var string
- */
- private $config;
- /**
- * @var string
- */
- private $debug;
- /**
- * @var array
- */
- private $debugArray = array();
-
- /*
- * @protected function constructor class
- * @param mixed $debug
- */
- /**
- * @param $debug
- */
- public function __construct($debug)
- {
- $this->debug = $debug;
- $this->dirname = basename(dirname(__DIR__));
- }
-
- /*
- * @static function &getInstance
- * @param mixed $debug
- */
- /**
- * @param bool $debug
- * @return TDMCreateHelper
- */
- public static function &getInstance($debug = false)
- {
- static $instance = false;
- if (!$instance) {
- $instance = new self($debug);
- }
-
- return $instance;
- }
-
- /*
- * @static function getModule
- * @param null
- */
- /**
- * @return string
- */
- public function &getModule()
- {
- if ($this->module == null) {
- $this->initModule();
- }
-
- return $this->module;
- }
-
- /*
- * @static function getConfig
- * @param string $name
- */
- /**
- * @param null $name
- * @return null|string
- */
- public function getConfig($name = null)
- {
- if ($this->config == null) {
- $this->initConfig();
- }
- if (!$name) {
- $this->addLog("Getting all config");
-
- return $this->config;
- }
- if (!isset($this->config[$name])) {
- $this->addLog("ERROR :: CONFIG '{$name}' does not exist");
-
- return null;
- }
- $this->addLog("Getting config '{$name}' : " . $this->config[$name]);
-
- return $this->config[$name];
- }
-
- /*
- * @static function setConfig
- * @param string $name
- * @param mixed $value
- */
- /**
- * @param null $name
- * @param null $value
- * @return mixed
- */
- public function setConfig($name = null, $value = null)
- {
- if ($this->config == null) {
- $this->initConfig();
- }
- $this->config[$name] = $value;
- $this->addLog("Setting config '{$name}' : " . $this->config[$name]);
-
- return $this->config[$name];
- }
-
- /*
- * @static function getHandler
- * @param string $name
- */
- /**
- * @param $name
- * @return mixed
- */
- public function &getHandler($name)
- {
- if (!isset($this->handler[$name . '_handler'])) {
- $this->initHandler($name);
- }
- $this->addLog("Getting handler '{$name}'");
-
- return $this->handler[$name . '_handler'];
- }
-
- /*
- * @static function initModule
- * @param null
- */
- public function initModule()
- {
- global $xoopsModule;
- if (isset($xoopsModule) && is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $this->dirname) {
- $this->module = $xoopsModule;
- } else {
- $hModule = xoops_gethandler('module');
- $this->module...
[truncated message content] |
|
From: <txm...@us...> - 2015-06-10 16:08:37
|
Revision: 13086
http://sourceforge.net/p/xoops/svn/13086
Author: txmodxoops
Date: 2015-06-10 16:08:35 +0000 (Wed, 10 Jun 2015)
Log Message:
-----------
Fix added more files
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fieldelements.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateArchitecture.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeFunctions.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserIndex.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserXoopsVersion.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/logoGenerator.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/include/common.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/admin.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserDisqusComments.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserFacebookComments.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fieldelements.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fieldelements.php 2015-06-09 17:53:59 UTC (rev 13085)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fieldelements.php 2015-06-10 16:08:35 UTC (rev 13086)
@@ -98,4 +98,58 @@
{
parent::__construct($db, 'tdmcreate_fieldelements', 'tdmcreatefieldelements', 'fieldelement_id', 'fieldelement_name');
}
+
+ /**
+ * Get Count Fields
+ */
+ public function getCountFieldElements($start = 0, $limit = 0, $sort = 'fieldelement_id ASC, fieldelement_name', $order = 'ASC')
+ {
+ $criteria = new CriteriaCompo();
+ $criteria->setSort($sort);
+ $criteria->setOrder($order);
+ $criteria->setStart($start);
+ $criteria->setLimit($limit);
+ return parent::getCount($criteria);
+ }
+
+ /**
+ * Get Objects Fields
+ */
+ public function getObjectsFieldElements($start = 0, $limit = 0, $sort = 'fieldelement_id ASC, fieldelement_name', $order = 'ASC')
+ {
+ $criteria = new CriteriaCompo();
+ $criteria->setSort($sort);
+ $criteria->setOrder($order);
+ $criteria->setStart($start);
+ $criteria->setLimit($limit);
+ return parent::getObjects($criteria);
+ }
+
+ /**
+ * Get All Fields
+ */
+ public function getAllFieldElements($start = 0, $limit = 0, $sort = 'fieldelement_id ASC, fieldelement_name', $order = 'ASC')
+ {
+ $criteria = new CriteriaCompo();
+ $criteria->setSort($sort);
+ $criteria->setOrder($order);
+ $criteria->setStart($start);
+ $criteria->setLimit($limit);
+ return parent::getAll($criteria);
+ }
+
+ /**
+ * Get All Fields By Module & Table Id
+ */
+ public function getAllFieldElementsByModuleAndTableId($modId, $tabId, $start = 0, $limit = 0, $sort = 'fieldelement_id ASC, fieldelement_name', $order = 'ASC')
+ {
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('fieldelement_mid', $modId));
+ $criteria->add(new Criteria('fieldelement_tid', $tabId));
+ $criteria->setSort($sort);
+ $criteria->setOrder($order);
+ $criteria->setStart($start);
+ $criteria->setLimit($limit);
+ return parent::getAll($criteria);
+ }
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fields.php 2015-06-09 17:53:59 UTC (rev 13085)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fields.php 2015-06-10 16:08:35 UTC (rev 13086)
@@ -35,6 +35,24 @@
* @var mixed
*/
private $tdmcreate;
+
+ /**
+ * Options
+ */
+ public $options = array(
+ 'parent',
+ 'admin',
+ 'inlist',
+ 'inform',
+ 'user',
+ 'thead',
+ 'tbody',
+ 'tfoot',
+ 'block',
+ 'main',
+ 'search',
+ 'required'
+ );
/*
* @public function constructor class
@@ -46,7 +64,6 @@
public function __construct()
{
$this->tdmcreate = TDMCreateHelper::getInstance();
- $this->tdmcreate = TDMCreateHelper::getInstance();
$this->initVar('field_id', XOBJ_DTYPE_INT);
$this->initVar('field_mid', XOBJ_DTYPE_INT);
$this->initVar('field_tid', XOBJ_DTYPE_INT);
@@ -120,7 +137,7 @@
$form->setExtra('enctype="multipart/form-data"');
// New Object HtmlTable
- $form->addElement(new TDMCreateFormLabel('<table border="0" cellspacing="1" class="outer width100">'));
+ $form->addElement(new TDMCreateFormLabel('<table cellspacing="1" class="outer width100">'));
$form->addElement(new TDMCreateFormLabel('<thead class="center">'));
$form->addElement(new TDMCreateFormLabel('<tr class="head"><th colspan="9">' . $title . '</th></tr>'));
$form->addElement(new TDMCreateFormLabel('<tr class="head width5">'));
@@ -156,8 +173,8 @@
$fieldsForm = TDMCreateFields::getInstance();
$form = $fieldsForm->getHeaderForm($action);
// Get handler tables
- $table_obj = $this->tdmcreate->getHandler('tables'); // Changed by goffy
- $tableAutoincrement = $table_obj->get($fieldTid)->getVar('table_autoincrement'); // Added by goffy
+ $tableObj = $this->tdmcreate->getHandler('tables'); // Changed by goffy
+ $tableAutoincrement = $tableObj->get($fieldTid)->getVar('table_autoincrement'); // Added by goffy
// Loop for fields number
$class = 'even';
for ($i = 1; $i <= $fieldNumb; ++$i) {
@@ -242,11 +259,7 @@
$checkFieldParent = new XoopsFormCheckBox(' ', 'field_parent[' . $i . ']', $field_parent);
$checkFieldParent->addOption(1, _AM_TDMCREATE_FIELD_PARENT);
$parametersTray->addElement($checkFieldParent);
- /*$field_parent = (1 == $tableAutoincrement) ? 2 : 1;
- $checkFieldParent = new TDMCreateFormRadio('', 'field_parent', $field_parent);
- $checkFieldParent->addOption($i, _AM_TDMCREATE_FIELD_PARENT );
- $parametersTray->addElement($checkFieldParent);*/
-
+
$field_admin = 0;
$checkFieldAdmin = new XoopsFormCheckBox(' ', 'field_admin[' . $i . ']', $field_admin);
$checkFieldAdmin->addOption(1, _AM_TDMCREATE_FIELD_ADMIN);
@@ -287,11 +300,6 @@
$checkFieldBlock->addOption(1, _AM_TDMCREATE_FIELD_BLOCK);
$parametersTray->addElement($checkFieldBlock);
- $fieldMain = (1 == $tableAutoincrement) ? 2 : 1;
- $checkFieldMain = new TDMCreateFormRadio('', 'field_main', $fieldMain);
- $checkFieldMain->addOption($i, _AM_TDMCREATE_FIELD_MAINFIELD);
- $parametersTray->addElement($checkFieldMain);
-
$field_search = 0;
$check_field_search = new XoopsFormCheckBox(' ', 'field_search[' . $i . ']', $field_search);
$check_field_search->addOption(1, _AM_TDMCREATE_FIELD_SEARCH);
@@ -301,6 +309,11 @@
$checkFieldRequired = new XoopsFormCheckBox(' ', 'field_required[' . $i . ']', $field_required);
$checkFieldRequired->addOption(1, _AM_TDMCREATE_FIELD_REQUIRED);
$parametersTray->addElement($checkFieldRequired);
+
+ $fieldMain = (1 == $tableAutoincrement) ? 2 : 1;
+ $checkFieldMain = new TDMCreateFormRadio('', 'field_main', $fieldMain);
+ $checkFieldMain->addOption($i, _AM_TDMCREATE_FIELD_MAIN);
+ $parametersTray->addElement($checkFieldMain);
//
$form->addElement(new TDMCreateFormLabel('<td><div class="portlet"><div class="portlet-header">' . _AM_TDMCREATE_FIELD_PARAMETERS_LIST . '</div><div class="portlet-content">' . $parametersTray->render() . '</div></div></td></tr>'));
}
@@ -392,6 +405,15 @@
$fieldElementsSelect->addOptionArray($this->tdmcreate->getHandler('fieldelements')->getList($criteriaTable));
unset($criteriaElement, $criteriaTable);
$parametersTray->addElement($fieldElementsSelect);
+
+ // Options
+ /*$moduleOption = $this->getOptions();
+ $checkbox = new XoopsFormCheckbox(' ', 'fields_option[' . $id . ']', $moduleOption, '<br />');
+ $checkbox->setDescription(_AM_TDMCREATE_OPTIONS_DESC);
+ foreach ($this->options as $option) {
+ $checkbox->addOption($option, self::getDefinedLanguage('_AM_TDMCREATE_FIELD_' . strtoupper($option)));
+ }
+ $parametersTray->addElement($checkbox);*/
$checkFieldParent = new XoopsFormCheckBox(' ', 'field_parent[' . $id . ']', $field->getVar('field_parent'));
$checkFieldParent->addOption(1, _AM_TDMCREATE_FIELD_PARENT);
@@ -428,19 +450,20 @@
$checkFieldBlock = new XoopsFormCheckBox('', 'field_block[' . $id . ']', $field->getVar('field_block'));
$checkFieldBlock->addOption(1, _AM_TDMCREATE_FIELD_BLOCK);
$parametersTray->addElement($checkFieldBlock);
-
- $fieldMain = (1 == $field->getVar('field_main')) ? $id : 1;
- $checkFieldMain = new TDMCreateFormRadio('', 'field_main', $fieldMain);
- $checkFieldMain->addOption($id, _AM_TDMCREATE_FIELD_MAINFIELD);
- $parametersTray->addElement($checkFieldMain);
-
- $check_field_search = new XoopsFormCheckBox(' ', 'field_search[' . $id . ']', $field->getVar('field_search'));
+
+ $check_field_search = new XoopsFormCheckBox(' ', 'field_search[' . $id . ']', $field->getVar('field_search'));
$check_field_search->addOption(1, _AM_TDMCREATE_FIELD_SEARCH);
$parametersTray->addElement($check_field_search);
$checkFieldRequired = new XoopsFormCheckBox(' ', 'field_required[' . $id . ']', $field->getVar('field_required'));
$checkFieldRequired->addOption(1, _AM_TDMCREATE_FIELD_REQUIRED);
$parametersTray->addElement($checkFieldRequired);
+
+ $fieldMain = (1 == $field->getVar('field_main')) ? $id : 1;
+ $checkFieldMain = new TDMCreateFormRadio('', 'field_main', $fieldMain);
+ $checkFieldMain->addOption($id, _AM_TDMCREATE_FIELD_MAIN);
+ $parametersTray->addElement($checkFieldMain);
+ //
$form->addElement(new TDMCreateFormLabel('<td><div class="portlet"><div class="portlet-header">' . _AM_TDMCREATE_FIELD_PARAMETERS_LIST . '</div><div class="portlet-content">' . $parametersTray->render() . '</div></div></td></tr>'));
}
}
@@ -504,6 +527,75 @@
return $ret;
}
+
+ /**
+ * Get Options
+ */
+ /**
+ * @param $key
+ *
+ * @return string
+ */
+ public function getOptions()
+ {
+ $ret = array();
+ //
+ if ($this->getVar('field_parent') == 1) {
+ array_push($ret, 'parent');
+ }
+ if ($this->getVar('field_admin') == 1) {
+ array_push($ret, 'admin');
+ }
+ if ($this->getVar('field_inlist') == 1) {
+ array_push($ret, 'inlist');
+ }
+ if ($this->getVar('field_inform') == 1) {
+ array_push($ret, 'inform');
+ }
+ if ($this->getVar('field_user') == 1) {
+ array_push($ret, 'user');
+ }
+ if ($this->getVar('field_thead') == 1) {
+ array_push($ret, 'thead');
+ }
+ if ($this->getVar('field_tbody') == 1) {
+ array_push($ret, 'tbody');
+ }
+ if ($this->getVar('field_tfoot') == 1) {
+ array_push($ret, 'tfoot');
+ }
+ if ($this->getVar('field_block') == 1) {
+ array_push($ret, 'block');
+ }
+ if ($this->getVar('field_main') == 1) {
+ array_push($ret, 'main');
+ }
+ if ($this->getVar('field_search') == 1) {
+ array_push($ret, 'search');
+ }
+ if ($this->getVar('field_required') == 1) {
+ array_push($ret, 'required');
+ }
+
+ return $ret;
+ }
+
+ /**
+ * Get Defined Language
+ */
+ /**
+ * @param $lang
+ *
+ * @return string
+ */
+ private static function getDefinedLanguage($lang)
+ {
+ if (defined($lang)) {
+ return constant($lang);
+ }
+
+ return $lang;
+ }
}
/*
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateArchitecture.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateArchitecture.php 2015-06-09 17:53:59 UTC (rev 13085)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateArchitecture.php 2015-06-10 16:08:35 UTC (rev 13086)
@@ -134,12 +134,12 @@
// If file exists
if (!file_exists($logoGifFrom)) {
// Rename file
- $copyFile = TDMC_IMAGE_LOGOS_URL . '/xoopsdevelopmentteam_logo.gif';
+ $copyFile = TDMC_IMAGES_LOGOS_URL . '/xoopsdevelopmentteam_logo.gif';
$copyNewFile = $logoGifFrom;
copy($copyFile, $copyNewFile);
} else {
// Copy file
- $copyFile = TDMC_IMAGE_LOGOS_URL . '/' . $stlModuleAuthor . '_logo.gif';
+ $copyFile = TDMC_IMAGES_LOGOS_URL . '/' . $stlModuleAuthor . '_logo.gif';
$copyNewFile = $logoGifFrom;
copy($copyFile, $copyNewFile);
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeFunctions.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeFunctions.php 2015-06-09 17:53:59 UTC (rev 13085)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeFunctions.php 2015-06-10 16:08:35 UTC (rev 13086)
@@ -414,10 +414,10 @@
$moduleDirname = $module->getVar('mod_dirname');
$tableName = $table->getVar('table_name');
$content = $this->getHeaderFilesComments($module, $filename);
- $content .= $this->getFunctionBlock($moduleDirname);
- if(1 == $table->getVar('table_blocks')) {
- $content .= $this->getFunctionCleanVars($moduleDirname);
+ if(1 == $table->getVar('table_blocks')) {
+ $content .= $this->getFunctionBlock($moduleDirname);
}
+ $content .= $this->getFunctionCleanVars($moduleDirname);
if(1 == $table->getVar('table_permissions')) {
$content .= $this->getFunctionGetMyItemIds($moduleDirname, $tableName);
}
Added: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserDisqusComments.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserDisqusComments.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserDisqusComments.php 2015-06-10 16:08:35 UTC (rev 13086)
@@ -0,0 +1,110 @@
+<?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: TemplatesUserDisqusComments.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+/**
+ * Class TemplatesUserDisqusComments
+ */
+class TemplatesUserDisqusComments extends TDMCreateFile
+{
+ /*
+ * @public function constructor
+ * @param null
+ */
+ /**
+ *
+ */
+ public function __construct()
+ {
+ parent::__construct();
+ $this->tdmcfile = TDMCreateFile::getInstance();
+ }
+
+ /*
+ * @static function &getInstance
+ * @param null
+ */
+ /**
+ * @return TemplatesUserDisqusComments
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+
+ return $instance;
+ }
+
+ /*
+ * @public function write
+ * @param string $module
+ * @param string $filename
+ */
+ /**
+ * @param $module
+ * @param $filename
+ * @return string
+ */
+ public function write($module, $filename)
+ {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ }
+
+ /*
+ * @private function getTemplatesCommentCode
+ * @param null
+ */
+ /**
+ * @param null
+ * @return string
+ */
+ private function getTemplatesCommentCode()
+ {
+ $ret = <<<EOT
+Pleace! Enter here your comments code
+EOT;
+
+ return $ret;
+ }
+
+ /*
+ * @public function renderFile
+ * @param string $filename
+ */
+ /**
+ * @param $filename
+ * @return bool|string
+ */
+ public function renderFile()
+ {
+ $module = $this->getModule();
+ $filename = $this->getFileName();
+ $moduleDirname = $module->getVar('mod_dirname');
+ $content = $this->getTemplatesCommentCode();
+ //
+ $this->tdmcfile->create($moduleDirname, 'templates', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+
+ return $this->tdmcfile->renderFile();
+ }
+}
Added: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserFacebookComments.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserFacebookComments.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserFacebookComments.php 2015-06-10 16:08:35 UTC (rev 13086)
@@ -0,0 +1,110 @@
+<?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: TemplatesUserFacebookComments.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+/**
+ * Class TemplatesUserFacebookComments
+ */
+class TemplatesUserFacebookComments extends TDMCreateFile
+{
+ /*
+ * @public function constructor
+ * @param null
+ */
+ /**
+ *
+ */
+ public function __construct()
+ {
+ parent::__construct();
+ $this->tdmcfile = TDMCreateFile::getInstance();
+ }
+
+ /*
+ * @static function &getInstance
+ * @param null
+ */
+ /**
+ * @return TemplatesUserFacebookComments
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+
+ return $instance;
+ }
+
+ /*
+ * @public function write
+ * @param string $module
+ * @param string $filename
+ */
+ /**
+ * @param $module
+ * @param $filename
+ * @return string
+ */
+ public function write($module, $filename)
+ {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ }
+
+ /*
+ * @private function getTemplatesCommentCode
+ * @param null
+ */
+ /**
+ * @param null
+ * @return string
+ */
+ private function getTemplatesCommentCode()
+ {
+ $ret = <<<EOT
+Pleace! Enter here your comments code
+EOT;
+
+ return $ret;
+ }
+
+ /*
+ * @public function renderFile
+ * @param string $filename
+ */
+ /**
+ * @param $filename
+ * @return bool|string
+ */
+ public function renderFile()
+ {
+ $module = $this->getModule();
+ $filename = $this->getFileName();
+ $moduleDirname = $module->getVar('mod_dirname');
+ $content = $this->getTemplatesCommentCode();
+ //
+ $this->tdmcfile->create($moduleDirname, 'templates', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+
+ return $this->tdmcfile->renderFile();
+ }
+}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserIndex.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserIndex.php 2015-06-09 17:53:59 UTC (rev 13085)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserIndex.php 2015-06-10 16:08:35 UTC (rev 13086)
@@ -137,11 +137,11 @@
if(in_array(1, $fieldParentId)) {
$ret .= <<<EOT
\${$tableName}Count = \${$tableName}Handler->getCount{$ucfTableName}();
-//
-include_once XOOPS_ROOT_PATH . '/class/tree.php';
-\$mytree = new XoopsObjectTree(\${$tableName}All, '{$fieldId}', '{$fieldParent}');
+// If there are {$tableName}
if (\${$tableName}Count > 0) {
\${$tableName}All = \${$tableName}Handler->getAll{$ucfTableName}();
+ include_once XOOPS_ROOT_PATH . '/class/tree.php';
+ \$mytree = new XoopsObjectTree(\${$tableName}All, '{$fieldId}', '{$fieldParent}');
foreach (array_keys(\${$tableName}All) as \${$tableFieldname})
{
\${$tableSoleName} = \${$tableName}All[\${$tableFieldname}]->getValues();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserXoopsVersion.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserXoopsVersion.php 2015-06-09 17:53:59 UTC (rev 13085)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserXoopsVersion.php 2015-06-10 16:08:35 UTC (rev 13086)
@@ -795,11 +795,19 @@
'default' => 0);
\$modversion['config'][] = array(
- 'name' => "fbcomments",
- 'title' => "{$language}FBCOMMENTS",
- 'description' => "{$language}FBCOMMENTS_DESC",
+ 'name' => "facebook_comments",
+ 'title' => "{$language}FACEBOOK_COMMENTS",
+ 'description' => "{$language}FACEBOOK_COMMENTS_DESC",
'formtype' => "yesno",
'valuetype' => "int",
+ 'default' => 0);
+
+\$modversion['config'][] = array(
+ 'name' => "disqus_comments",
+ 'title' => "{$language}DISQUS_COMMENTS",
+ 'description' => "{$language}DISQUS_COMMENTS_DESC",
+ 'formtype' => "yesno",
+ 'valuetype' => "int",
'default' => 0);\n
EOT;
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/logoGenerator.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/logoGenerator.php 2015-06-09 17:53:59 UTC (rev 13085)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/logoGenerator.php 2015-06-10 16:08:35 UTC (rev 13086)
@@ -48,7 +48,7 @@
}
}
}
- if (!file_exists($imageBase = TDMC_IMAGE_LOGOS_PATH . "/empty.png") ||
+ if (!file_exists($imageBase = TDMC_IMAGES_LOGOS_PATH . "/empty.png") ||
!file_exists($font = TDMC_FONTS_PATH . "/VeraBd.ttf") ||
!file_exists($iconFile = XOOPS_ICONS32_PATH . '/' . basename($logoIcon))) {
return false;
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/modules.php 2015-06-09 17:53:59 UTC (rev 13085)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/modules.php 2015-06-10 16:08:35 UTC (rev 13086)
@@ -415,7 +415,7 @@
}
}
}
- if (!file_exists($imageBase = TDMC_IMAGE_LOGOS_PATH . '/empty.png') ||
+ if (!file_exists($imageBase = TDMC_IMAGES_LOGOS_PATH . '/empty.png') ||
!file_exists($font = TDMC_FONTS_PATH . '/VeraBd.ttf') ||
!file_exists($iconFile = XOOPS_ICONS32_PATH . '/' . basename($logoIcon))
) {
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/include/common.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/include/common.php 2015-06-09 17:53:59 UTC (rev 13085)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/include/common.php 2015-06-10 16:08:35 UTC (rev 13086)
@@ -33,8 +33,8 @@
define('TDMC_FONTS_URL', TDMC_URL . '/assets/fonts');
define('TDMC_IMAGE_PATH', TDMC_PATH . '/assets/images');
define('TDMC_IMAGE_URL', TDMC_URL . '/assets/images');
-define('TDMC_IMAGE_LOGOS_PATH', TDMC_PATH . '/assets/images/logos');
-define('TDMC_IMAGE_LOGOS_URL', TDMC_URL . '/assets/images/logos');
+define('TDMC_IMAGES_LOGOS_PATH', TDMC_PATH . '/assets/images/logos');
+define('TDMC_IMAGES_LOGOS_URL', TDMC_URL . '/assets/images/logos');
define('TDMC_ICONS_PATH', TDMC_PATH . '/assets/icons');
define('TDMC_ICONS_URL', TDMC_URL . '/assets/icons');
// Uploads Directories
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/admin.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/admin.php 2015-06-09 17:53:59 UTC (rev 13085)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/admin.php 2015-06-10 16:08:35 UTC (rev 13086)
@@ -248,7 +248,7 @@
define('_AM_TDMCREATE_FIELD_ADMIN', "Admin: In Files");
define('_AM_TDMCREATE_FIELD_USER', "User: In Files");
define('_AM_TDMCREATE_FIELD_BLOCK', "Block: In Files");
-define('_AM_TDMCREATE_FIELD_MAINFIELD', "Table: Main Field");
+define('_AM_TDMCREATE_FIELD_MAIN', "Table: Main Field");
define('_AM_TDMCREATE_FIELD_SEARCH', "Search: Index");
define('_AM_TDMCREATE_FIELD_REQUIRED', "Field: Required");
define('_AM_TDMCREATE_ADMIN_SUBMIT', "Send");
|
|
From: <txm...@us...> - 2015-06-12 21:33:11
|
Revision: 13087
http://sourceforge.net/p/xoops/svn/13087
Author: txmodxoops
Date: 2015-06-12 21:33:08 +0000 (Fri, 12 Jun 2015)
Log Message:
-----------
Added morefiles.php and more for extra custom files
Updated
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/menu.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fieldattributes.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateArchitecture.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminPages.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFormElements.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageAdmin.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminPages.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/admin.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/sql/mysql.sql
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/xoops_version.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/morefiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/assets/icons/32/files.png
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserMoreFiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/morefiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/templates/admin/tdmcreate_morefiles.tpl
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/menu.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/menu.php 2015-06-10 16:08:35 UTC (rev 13086)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/menu.php 2015-06-12 21:33:08 UTC (rev 13087)
@@ -45,10 +45,14 @@
$adminmenu[$i]['icon'] = 'assets/icons/32/fields.png';
$i++;
$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU6;
+$adminmenu[$i]['link'] = 'admin/morefiles.php';
+$adminmenu[$i]['icon'] = 'assets/icons/32/files.png';
+$i++;
+$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU7;
$adminmenu[$i]['link'] = 'admin/building.php';
$adminmenu[$i]['icon'] = 'assets/icons/32/builder.png';
$i++;
-$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU7;
+$adminmenu[$i]['title'] = _MI_TDMCREATE_ABOUT;
$adminmenu[$i]['link'] = 'admin/about.php';
$adminmenu[$i]['icon'] = $sysPathIcon32 . '/about.png';
unset($i);
Added: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/morefiles.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/morefiles.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/morefiles.php 2015-06-12 21:33:08 UTC (rev 13087)
@@ -0,0 +1,140 @@
+<?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.5
+ * @author Txmod Xoops <su...@tx...>
+ * @version $Id: 1.59 morefiles.php 11297 2013-03-24 10:58:10Z timgno $
+ */
+include __DIR__ . '/header.php';
+// Recovered value of argument op in the URL $
+$op = XoopsRequest::getString('op', 'list');
+//
+$fileId = XoopsRequest::getInt('file_id');
+//
+switch ($op) {
+ case 'list':
+ default:
+ $start = XoopsRequest::getInt('start', 0);
+ $limit = XoopsRequest::getInt('limit', $tdmcreate->getConfig('morefiles_adminpager'));
+ // Define main template
+ $templateMain = 'tdmcreate_morefiles.tpl';
+ $GLOBALS['xoTheme']->addScript('modules/tdmcreate/assets/js/functions.js');
+ $GLOBALS['xoTheme']->addStylesheet('modules/tdmcreate/assets/css/admin/style.css');
+ $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('morefiles.php'));
+ $adminMenu->addItemButton(_AM_TDMCREATE_ADD_MORE_FILE, 'morefiles.php?op=new', 'add');
+ $GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
+ $GLOBALS['xoopsTpl']->assign('tdmc_url', TDMC_URL);
+ $GLOBALS['xoopsTpl']->assign('tdmc_upload_imgfile_url', TDMC_UPLOAD_IMGMOD_URL);
+ $GLOBALS['xoopsTpl']->assign('modPathIcon16', $modPathIcon16);
+ $GLOBALS['xoopsTpl']->assign('sysPathIcon32', $sysPathIcon32);
+ $modulesCount = $tdmcreate->getHandler('modules')->getCountModules();
+ // Redirect if there aren't modules
+ if (0 == $modulesCount) {
+ redirect_header('modules.php?op=new', 2, _AM_TDMCREATE_NOT_MODULES);
+ }
+ $morefilesCount = $tdmcreate->getHandler('morefiles')->getCountMoreFiles();
+ $morefilesAll = $tdmcreate->getHandler('morefiles')->getAllMoreFiles($start, $limit);
+ // Display morefiles list
+ if ($morefilesCount > 0) {
+ foreach (array_keys($morefilesAll) as $i) {
+ $files = $morefilesAll[$i]->getValues();
+ $GLOBALS['xoopsTpl']->append('files_list', $files);
+ unset($files);
+ }
+ if ($morefilesCount > $limit) {
+ include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
+ $pagenav = new XoopsPageNav($morefilesCount, $limit, $start, 'start', 'op=list&limit=' . $limit);
+ $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4));
+ }
+ } else {
+ $GLOBALS['xoopsTpl']->assign('error', _AM_TDMCREATE_THEREARENT_MODULES);
+ }
+ break;
+
+ case 'new':
+ // Define main template
+ $templateMain = 'tdmcreate_morefiles.tpl';
+ $GLOBALS['xoTheme']->addScript('modules/tdmcreate/assets/js/functions.js');
+ $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('morefiles.php'));
+ $adminMenu->addItemButton(_AM_TDMCREATE_MORE_FILES_LIST, 'morefiles.php', 'list');
+ $GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
+
+ $morefilesObj =& $tdmcreate->getHandler('morefiles')->create();
+ $form = $morefilesObj->getForm();
+ $GLOBALS['xoopsTpl']->assign('form', $form->render());
+ break;
+
+ case 'save':
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('morefiles.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if (isset($fileId)) {
+ $morefilesObj =& $tdmcreate->getHandler('morefiles')->get($fileId);
+ } else {
+ $morefilesObj =& $tdmcreate->getHandler('morefiles')->create();
+ }
+ // Form file save
+ $morefilesObj->setVars(array(
+ 'file_mid' => $_POST['file_mid'],
+ 'file_name' => $_POST['file_name'],
+ 'file_extension' => $_POST['file_extension'],
+ 'file_infolder' => $_POST['file_infolder']));
+
+ if ($tdmcreate->getHandler('morefiles')->insert($morefilesObj)) {
+ if ($morefilesObj->isNew()) {
+ redirect_header('morefiles.php', 5, sprintf(_AM_TDMCREATE_FILE_FORM_CREATED_OK, $_POST['file_name']));
+ } else {
+ redirect_header('morefiles.php', 5, sprintf(_AM_TDMCREATE_FILE_FORM_UPDATED_OK, $_POST['file_name']));
+ }
+ }
+
+ $GLOBALS['xoopsTpl']->assign('error', $morefilesObj->getHtmlErrors());
+ $form =& $morefilesObj->getForm();
+ $GLOBALS['xoopsTpl']->assign('form', $form->render());
+ break;
+
+ case 'edit':
+ // Define main template
+ $templateMain = 'tdmcreate_morefiles.tpl';
+ $GLOBALS['xoTheme']->addScript('modules/tdmcreate/assets/js/functions.js');
+ $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('morefiles.php'));
+ $adminMenu->addItemButton(_AM_TDMCREATE_ADD_MODULE, 'morefiles.php?op=new', 'add');
+ $adminMenu->addItemButton(_AM_TDMCREATE_MORE_FILES_LIST, 'morefiles.php', 'list');
+ $GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
+
+ $morefilesObj = $tdmcreate->getHandler('morefiles')->get($fileId);
+ $form = $morefilesObj->getForm();
+ $GLOBALS['xoopsTpl']->assign('form', $form->render());
+ break;
+
+ case 'delete':
+ $morefilesObj =& $tdmcreate->getHandler('morefiles')->get($fileId);
+ if (isset($_REQUEST['ok']) && 1 == $_REQUEST['ok']) {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('morefiles.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if ($tdmcreate->getHandler('morefiles')->delete($morefilesObj)) {
+ redirect_header('morefiles.php', 3, _AM_TDMCREATE_FORM_DELETED_OK);
+ } else {
+ $GLOBALS['xoopsTpl']->assign('error', $morefilesObj->getHtmlErrors());
+ }
+ } else {
+ xoops_confirm(array('ok' => 1, 'file_id' => $fileId, 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORM_SURE_DELETE, $morefilesObj->getVar('file_name')));
+ }
+ break;
+}
+
+include __DIR__ . '/footer.php';
Added: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/assets/icons/32/files.png
===================================================================
(Binary files differ)
Index: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/assets/icons/32/files.png
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/assets/icons/32/files.png 2015-06-10 16:08:35 UTC (rev 13086)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/assets/icons/32/files.png 2015-06-12 21:33:08 UTC (rev 13087)
Property changes on: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/assets/icons/32/files.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fieldattributes.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fieldattributes.php 2015-06-10 16:08:35 UTC (rev 13086)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fieldattributes.php 2015-06-12 21:33:08 UTC (rev 13087)
@@ -14,9 +14,9 @@
* @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.5
- * @author Txmod Xoops <su...@tx...>
- * @version $Id: 1.91 fieldattributes.php 11297 2014-05-14 10:58:10Z timgno $
+ * @since 2.5.7
+ * @author Txmod Xoops <web...@tx...> - <http://www.txmodxoops.org/>
+ * @version $Id: 1.91 fieldattributes.php 13027 2015-02-14 12:18:10Z timgno $
*/
defined('XOOPS_ROOT_PATH') or die('Restricted access');
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fields.php 2015-06-10 16:08:35 UTC (rev 13086)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fields.php 2015-06-12 21:33:08 UTC (rev 13087)
@@ -15,8 +15,8 @@
* @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
+ * @since 2.5.7
+ * @author Txmod Xoops <web...@tx...> - <http://www.txmodxoops.org/>
* @version $Id: 1.91 fields.php 12258 2014-01-02 09:33:29Z timgno $
*/
defined('XOOPS_ROOT_PATH') or die('Restricted access');
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateArchitecture.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateArchitecture.php 2015-06-10 16:08:35 UTC (rev 13086)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateArchitecture.php 2015-06-12 21:33:08 UTC (rev 13087)
@@ -93,15 +93,15 @@
}
//
$indexFile = XOOPS_UPLOAD_PATH . '/index.html';
- $cache1 = TDMC_CLASSES_PATH . '/cache';
- $cache2 = TDMC_CLASSES_PATH . '/files/cache';
$stlModuleAuthor = str_replace(' ', '', strtolower($module->getVar('mod_author')));
$this->structure->setModuleName($module->getVar('mod_dirname'));
$uploadPath = $this->structure->getUploadPath();
// Creation of "module" folder in the Directory repository
$this->structure->makeDir($uploadPath . '/' . $this->structure->getModuleName());
- // Copied of index.html file in "root module" folder
- //$this->structure->copyFile('', $indexFile, 'index.html');
+ if (1 != $module->getVar('mod_user')) {
+ // Copied of index.html file in "root module" folder
+ $this->structure->copyFile('', $indexFile, 'index.html');
+ }
if (1 == $module->getVar('mod_admin')) {
// Creation of "admin" folder and index.html file
$this->structure->makeDirAndCopyFile('admin', $indexFile, 'index.html');
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminPages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminPages.php 2015-06-10 16:08:35 UTC (rev 13086)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminPages.php 2015-06-12 21:33:08 UTC (rev 13087)
@@ -82,12 +82,13 @@
{
$ucfModuleDirname = ucfirst($moduleDirname);
$ucfTableName = ucfirst($tableName);
+ $ccFieldId = $this->tdmcfile->getCamelCase($fieldId, false, true);
$ret = <<<EOT
include __DIR__ . '/header.php';
//It recovered the value of argument op in URL$
\$op = XoopsRequest::getString('op', 'list');
// Request {$fieldId}
-\${$fieldId} = XoopsRequest::getInt('{$fieldId}');
+\${$ccFieldId} = XoopsRequest::getInt('{$fieldId}');
// Switch options
switch (\$op)
{\n
@@ -200,13 +201,14 @@
*/
private function getAdminPagesSave($moduleDirname, $tableName, $language, $fields, $fieldId, $fieldMain)
{
- $ret = <<<EOT
+ $ccFieldId = $this->tdmcfile->getCamelCase($fieldId, false, true);
+ $ret = <<<EOT
case 'save':
if ( !\$GLOBALS['xoopsSecurity']->check() ) {
redirect_header('{$tableName}.php', 3, implode(',', \$GLOBALS['xoopsSecurity']->getErrors()));
}
- if (isset(\${$fieldId})) {
- \${$tableName}Obj =& \${$tableName}Handler->get(\${$fieldId});
+ if (isset(\${$ccFieldId})) {
+ \${$tableName}Obj =& \${$tableName}Handler->get(\${$ccFieldId});
} else {
\${$tableName}Obj =& \${$tableName}Handler->create();
}
@@ -277,6 +279,7 @@
$stuTableName = strtoupper($tableName);
$stuTableSoleName = strtoupper($tableSoleName);
$stuTableFieldname = strtoupper($tableFieldname);
+ $ccFieldId = $this->tdmcfile->getCamelCase($fieldId, false, true);
$ret = <<<EOT
case 'edit':
\$templateMain = '{$moduleDirname}_admin_{$tableName}.tpl';
@@ -285,7 +288,7 @@
\$GLOBALS['xoopsTpl']->assign('navigation', \$adminMenu->addNavigation('{$tableName}.php'));
\$GLOBALS['xoopsTpl']->assign('buttons', \$adminMenu->renderButton());
// Get Form
- \${$tableName}Obj = \${$tableName}Handler->get(\${$fieldId});
+ \${$tableName}Obj = \${$tableName}Handler->get(\${$ccFieldId});
\$form = \${$tableName}Obj->getForm();
\$GLOBALS['xoopsTpl']->assign('form', \$form->render());
break;\n
@@ -304,9 +307,10 @@
*/
private function getAdminPagesDelete($tableName, $language, $fieldId, $fieldMain)
{
- $ret = <<<EOT
+ $ccFieldId = $this->tdmcfile->getCamelCase($fieldId, false, true);
+ $ret = <<<EOT
case 'delete':
- \${$tableName}Obj =& \${$tableName}Handler->get(\${$fieldId});
+ \${$tableName}Obj =& \${$tableName}Handler->get(\${$ccFieldId});
if (isset(\$_REQUEST['ok']) && 1 == \$_REQUEST['ok']) {
if ( !\$GLOBALS['xoopsSecurity']->check() ) {
redirect_header('{$tableName}.php', 3, implode(', ', \$GLOBALS['xoopsSecurity']->getErrors()));
@@ -314,10 +318,10 @@
if (\${$tableName}Handler->delete(\${$tableName}Obj)) {
redirect_header('{$tableName}.php', 3, {$language}FORM_DELETE_OK);
} else {
- echo \${$tableName}Obj->getHtmlErrors();
+ \$GLOBALS['xoopsTpl']->assign('error', \${$tableName}Obj->getHtmlErrors());
}
} else {
- xoops_confirm(array('ok' => 1, '{$fieldId}' => \${$fieldId}, 'op' => 'delete'), \$_SERVER['REQUEST_URI'], sprintf({$language}FORM_SURE_DELETE, \${$tableName}Obj->getVar('{$fieldMain}')));
+ xoops_confirm(array('ok' => 1, '{$fieldId}' => \${$ccFieldId}, 'op' => 'delete'), \$_SERVER['REQUEST_URI'], sprintf({$language}FORM_SURE_DELETE, \${$tableName}Obj->getVar('{$fieldMain}')));
}
break;\n
EOT;
@@ -336,17 +340,17 @@
private function getAdminPagesUpdate($moduleDirname, $tableName, $fieldId, $fieldName)
{
$stuModuleName = strtoupper($moduleDirname);
+ $ccFieldId = $this->tdmcfile->getCamelCase($fieldId, false, true);
$ret = <<<EOT
case 'update':
- if (isset(\${$fieldId})) {
- \${$tableName}Obj =& \${$tableName}Handler->get(\${$fieldId});
+ if (isset(\${$ccFieldId})) {
+ \${$tableName}Obj =& \${$tableName}Handler->get(\${$ccFieldId});
}
- \${$tableName}Obj->setVar("\${$fieldName}", \$_POST["\${$fieldName}"]);
-
+ \${$tableName}Obj->setVar('{$fieldName}', \$_POST['{$fieldName}']);
if (\${$tableName}Handler->insert(\${$tableName}Obj)) {
- redirect_header("\${$tableName}.php", 3, _AM_{$stuModuleName}_FORM_OK);
+ redirect_header('{$tableName}.php', 3, _AM_{$stuModuleName}_FORM_OK);
}
- echo \${$tableName}Obj->getHtmlErrors();
+ \$GLOBALS['xoopsTpl']->assign('error', \${$tableName}Obj->getHtmlErrors());
break;\n
EOT;
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFiles.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFiles.php 2015-06-10 16:08:35 UTC (rev 13086)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFiles.php 2015-06-12 21:33:08 UTC (rev 13087)
@@ -658,7 +658,7 @@
public function &getInsertId()
{
return \$this->db->getInsertId();
- }\n\n
+ }\n\n
EOT;
return $ret;
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFormElements.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFormElements.php 2015-06-10 16:08:35 UTC (rev 13086)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFormElements.php 2015-06-12 21:33:08 UTC (rev 13087)
@@ -617,7 +617,34 @@
return $ret;
}
+
+ /*
+ * @private function getXoopsFormTag
+ * @param string $moduleDirname
+ * @param string $fieldId
+ * @param string $required
+ */
+ /**
+ * @param $moduleDirname
+ * @param $fieldId
+ * @param string $required
+ * @return string
+ */
+ private function getXoopsFormTag($moduleDirname, $fieldId, $required = 'false')
+ {
+ $ret = <<<EOT
+ // Use tag module
+ \$dirTag = is_dir(XOOPS_ROOT_PATH . '/modules/tag') ? true : false;
+ if ((\$this->{$moduleDirname}->getConfig('usetag') == 1) && \$dirTag){
+ \$tagId = \$this->isNew() ? 0 : \$this->getVar('{$fieldId}');
+ include_once XOOPS_ROOT_PATH.'/modules/tag/include/formtag.php';
+ \$form->addElement(new XoopsFormTag('tag', 60, 255, \$tagId, 0){$required});
+ }\n
+EOT;
+ return $ret;
+ }
+
/*
* @public function renderElements
* @param null
@@ -707,7 +734,11 @@
$ret .= $this->getXoopsFormTextDateSelect($language, $moduleDirname, $fieldName, $required);
break;
default:
- // If we want to hide XoopsFormHidden() or field id
+ // If we use tag module
+ if (1 == $table->getVar('table_tag')) {
+ $ret .= $this->getXoopsFormTag($moduleDirname, $fieldId, $required);
+ }
+ // If we want to hide XoopsFormHidden() or field id
if ((0 == $f) && (1 == $table->getVar('table_autoincrement'))) {
$ret .= $this->getXoopsFormHidden($fieldName);
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageAdmin.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageAdmin.php 2015-06-10 16:08:35 UTC (rev 13086)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageAdmin.php 2015-06-12 21:33:08 UTC (rev 13087)
@@ -174,7 +174,7 @@
$fieldNameDesc = substr($fieldElementName, strrpos($fieldElementName, ':'), strlen($fieldElementName));
$fieldNameDesc = str_replace(': ', '', $fieldNameDesc);
} else {
- $fieldNameDesc = ucfirst($rpFieldName);
+ $fieldNameDesc = strstr($rpFieldName, '_') ? str_replace('_', ' ', ucfirst($rpFieldName)) : ucfirst($rpFieldName);
}
//
$ret .= $this->defines->getDefine($language, $tableSoleName . '_' . $rpFieldName, $fieldNameDesc);
@@ -259,6 +259,7 @@
public function render()
{
$module = $this->getModule();
+ $table = $this->getTable();
$tables = $this->getTables();
$filename = $this->getFileName();
$moduleDirname = $module->getVar('mod_dirname');
@@ -267,9 +268,11 @@
if (is_array($tables)) {
$content .= $this->getLanguageAdminIndex($language, $tables);
$content .= $this->getLanguageAdminPages($language, $tables);
- $content .= $this->getLanguageAdminClass($language, $tables);
- $content .= $this->getLanguageAdminPermissions($language);
+ $content .= $this->getLanguageAdminClass($language, $tables);
}
+ if (1 == $table->getVar('table_permissions')) {
+ $content .= $this->getLanguageAdminPermissions($language);
+ }
$content .= $this->getLanguageAdminFoot($language);
//
$this->tdmcfile->create($moduleDirname, 'language/english', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminPages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminPages.php 2015-06-10 16:08:35 UTC (rev 13086)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminPages.php 2015-06-12 21:33:08 UTC (rev 13087)
@@ -298,7 +298,7 @@
$moduleDirname = $module->getVar('mod_dirname');
$tableFieldname = $table->getVar('table_fieldname');
$language = $this->getLanguage($moduleDirname, 'AM');
- $fields = $this->getTableFields($table->getVar('table_mid'), $table->getVar('table_id'));
+ $fields = $this->getTableFields($table->getVar('table_mid'), $table->getVar('table_id'), 'field_order ASC');
$content = $this->getTemplatesAdminPagesHeader($moduleDirname, $table, $fields, $language);
// Verify if table_fieldname is not empty
if (!empty($tableFieldname)) {
Added: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserMoreFiles.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserMoreFiles.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserMoreFiles.php 2015-06-12 21:33:08 UTC (rev 13087)
@@ -0,0 +1,122 @@
+<?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: TemplatesUserMoreFiles.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+/**
+ * Class TemplatesUserMoreFiles
+ */
+class TemplatesUserMoreFiles extends TDMCreateFile
+{
+ //
+ private $folder;
+ //
+ private $extension;
+ /*
+ * @public function constructor
+ * @param null
+ */
+ /**
+ *
+ */
+ public function __construct()
+ {
+ parent::__construct();
+ $this->tdmcfile = TDMCreateFile::getInstance();
+ }
+
+ /*
+ * @static function &getInstance
+ * @param null
+ */
+ /**
+ * @return TemplatesUserMoreFiles
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+
+ return $instance;
+ }
+
+ /*
+ * @public function write
+ * @param string $module
+ * @param string $filename
+ */
+ /**
+ * @param $module
+ * @param $filename
+ * @return string
+ */
+ public function write($module, $folder = '', $filename, $extension)
+ {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ if($folder != ''){
+ $this->folder = 'templates/'.$folder;
+ } else {
+ $this->folder = 'templates';
+ }
+ $this->extension = $extension;
+ }
+
+ /*
+ * @private function getTemplatesUserMoreFile
+ * @param null
+ */
+ /**
+ * @param null
+ * @return string
+ */
+ private function getTemplatesUserMoreFile()
+ {
+ $ret = <<<EOT
+<div class="panel">
+ Pleace! Enter here your template code here
+</div>
+EOT;
+
+ return $ret;
+ }
+
+ /*
+ * @public function renderFile
+ * @param string $filename
+ */
+ /**
+ * @param $filename
+ * @return bool|string
+ */
+ public function renderFile()
+ {
+ $module = $this->getModule();
+ $filename = $this->getFileName();
+ $moduleDirname = $module->getVar('mod_dirname');
+ $content = $this->getTemplatesUserMoreFile();
+ //
+ $this->tdmcfile->create($moduleDirname, $this->folder, $filename . '.' . $this->extension, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+
+ return $this->tdmcfile->renderFile();
+ }
+}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/modules.php 2015-06-10 16:08:35 UTC (rev 13086)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/modules.php 2015-06-12 21:33:08 UTC (rev 13087)
@@ -16,8 +16,8 @@
* @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
* @package tdmcreate
* @since 2.5.7
- * @author TDM TEAM DEV MODULE
- * @version $Id: modules.php 13040 2015-04-25 15:12:12Z timgno $
+ * @author Txmod Xoops <web...@tx...> - <http://www.txmodxoops.org/>
+ * @version ...
[truncated message content] |
|
From: <txm...@us...> - 2015-06-13 14:20:15
|
Revision: 13088
http://sourceforge.net/p/xoops/svn/13088
Author: txmodxoops
Date: 2015-06-13 14:20:13 +0000 (Sat, 13 Jun 2015)
Log Message:
-----------
Fix
Refacoring More Files
Updated
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/assets/css/admin/style.css
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateArchitecture.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateTableFields.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminMenu.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageModinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminPages.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserIndex.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateMoreFiles.php
Removed Paths:
-------------
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/TDMCreateHtmlSmartyCodes.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserMoreFiles.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/assets/css/admin/style.css
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/assets/css/admin/style.css 2015-06-12 21:33:08 UTC (rev 13087)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/assets/css/admin/style.css 2015-06-13 14:20:13 UTC (rev 13088)
@@ -95,6 +95,14 @@
min-width: 80px;
}
+tr.files td {
+ margin: 0;
+ padding: 5px;
+ border-bottom: 1px solid #ccc;
+ background-color:rgba(100,110,80,0.3);
+ 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; }*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateArchitecture.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateArchitecture.php 2015-06-12 21:33:08 UTC (rev 13087)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateArchitecture.php 2015-06-13 14:20:13 UTC (rev 13088)
@@ -216,10 +216,11 @@
$moduleDirname = $module->getVar('mod_dirname');
$icon32 = 'assets/icons/32';
$tables = $this->tdmcfile->getTableTables($modId);
+ $files = $this->tdmcfile->getTableMoreFiles($modId);
$ret = array();
//
$table = array();
- foreach (array_keys($tables) as $t) {
+ foreach(array_keys($tables) as $t) {
$tableMid = $tables[$t]->getVar('table_mid');
$tableId = $tables[$t]->getVar('table_id');
$tableName = $tables[$t]->getVar('table_name');
@@ -283,7 +284,17 @@
$userTemplatesPagesList->write($module, $table);
$ret[] = $userTemplatesPagesList->renderFile($moduleDirname . '_' . $tableName . '_list' . '.tpl');
}
- }
+
+ }
+ foreach(array_keys($files) as $t) {
+ $fileName = $files[$t]->getVar('file_name');
+ $fileExtension = $files[$t]->getVar('file_extension');
+ $fileInfolder = $files[$t]->getVar('file_infolder');
+ // More File
+ $moreFiles = TDMCreateMoreFiles::getInstance();
+ $moreFiles->write($module, $fileName, $fileInfolder, $fileExtension);
+ $ret[] = $moreFiles->render();
+ }
// Language Modinfo File
$languageModinfo = LanguageModinfo::getInstance();
$languageModinfo->write($module, $table, $tables, 'modinfo.php');
Added: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateMoreFiles.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateMoreFiles.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateMoreFiles.php 2015-06-13 14:20:13 UTC (rev 13088)
@@ -0,0 +1,251 @@
+<?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: TDMCreateMoreFiles.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+/**
+ * Class TDMCreateMoreFiles
+ */
+class TDMCreateMoreFiles extends TDMCreateFile
+{
+ //
+ private $folder;
+ //
+ private $extension;
+ /*
+ * @public function constructor
+ * @param null
+ */
+ /**
+ *
+ */
+ public function __construct()
+ {
+ parent::__construct();
+ $this->tdmcfile = TDMCreateFile::getInstance();
+ }
+
+ /*
+ * @static function &getInstance
+ * @param null
+ */
+ /**
+ * @return TDMCreateMoreFiles
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+
+ return $instance;
+ }
+
+ /*
+ * @public function write
+ * @param string $module
+ * @param string $filename
+ */
+ /**
+ * @param $module
+ * @param $filename
+ * @return string
+ */
+ public function write($module, $filename, $folder, $extension)
+ {
+ $this->setModule($module);
+ $this->extension = $extension;
+ $this->setFileName($filename . '.' . $extension);
+ if(strstr($folder, 'user')){
+ $this->folder = '/';
+ } else {
+ $this->folder = $folder;
+ }
+ }
+
+ /*
+ * @private function getMoreFilesFilePhp
+ * @param $header
+ */
+ /**
+ * @param $header
+ * @return string
+ */
+ private function getMoreFilesFilePhp($header)
+ {
+ $ret = <<<EOT
+<?php
+{$header}\n
+EOT;
+
+ return $ret;
+ }
+
+ /*
+ * @private function getMoreFilesFileTpl
+ * @param $header
+ */
+ /**
+ * @param $header
+ * @return string
+ */
+ private function getMoreFilesFileTpl()
+ {
+ $ret = <<<EOT
+<div class="panel">
+ Pleace! put your template code here
+</div>\n
+EOT;
+
+ return $ret;
+ }
+
+ /*
+ * @private function getMoreFilesFileHtml
+ * @param $header
+ */
+ /**
+ * @param $header
+ * @return string
+ */
+ private function getMoreFilesFileHtml()
+ {
+ $ret = <<<EOT
+<div class="panel">
+ Pleace! put your Html code here
+</div>\n
+EOT;
+
+ return $ret;
+ }
+
+ /*
+ * @private function getMoreFilesFileText
+ * @param null
+ */
+ /**
+ * @param null
+ * @return string
+ */
+ private function getMoreFilesFileText()
+ {
+ $ret = <<<EOT
+Pleace! put your text code here\n
+EOT;
+
+ return $ret;
+ }
+
+ /*
+ * @private function getMoreFilesFileSql
+ * @param null
+ */
+ /**
+ * @param null
+ * @return string
+ */
+ private function getMoreFilesFileSql()
+ {
+ $ret = <<<EOT
+Pleace! put your sql code here\n
+EOT;
+
+ return $ret;
+ }
+
+ /*
+ * @private function getMoreFilesFileCss
+ * @param $header
+ */
+ /**
+ * @param $header
+ * @return string
+ */
+ private function getMoreFilesFileCss($header)
+ {
+ $ret = <<<EOT
+@charset "UTF-8";
+{$header}\n\nPleace! put your sql code here\n
+EOT;
+
+ return $ret;
+ }
+
+ /*
+ * @private function getMoreFilesFileDefault
+ * @param null
+ */
+ /**
+ * @param null
+ * @return string
+ */
+ private function getMoreFilesFileDefault()
+ {
+ $ret = <<<EOT
+\n
+EOT;
+
+ return $ret;
+ }
+
+ /*
+ * @public function renderFile
+ * @param string $filename
+ */
+ /**
+ * @param $filename
+ * @return bool|string
+ */
+ public function renderFile()
+ {
+ $module = $this->getModule();
+ $filename = $this->getFileName();
+ $moduleDirname = $module->getVar('mod_dirname');
+ $header = $this->getHeaderFilesComments($module, $filename, 0);
+ switch($this->extension) {
+ case 'php':
+ $content = $this->getMoreFilesFilePhp($header);
+ break;
+ case 'tpl':
+ $content = $this->getMoreFilesFileTpl();
+ break;
+ case 'html':
+ $content = $this->getMoreFilesFileHtml();
+ break;
+ case 'text':
+ $content = $this->getMoreFilesFileText();
+ break;
+ case 'sql':
+ $content = $this->getMoreFilesFileSql();
+ break;
+ case 'css':
+ $content = $this->getMoreFilesFileCss($header);
+ break;
+ default:
+ $content = $this->getMoreFilesFileDefault();
+ break;
+ }
+
+ //
+ $this->tdmcfile->create($moduleDirname, $this->folder, $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+
+ return $this->tdmcfile->renderFile();
+ }
+}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateTableFields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateTableFields.php 2015-06-12 21:33:08 UTC (rev 13087)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateTableFields.php 2015-06-13 14:20:13 UTC (rev 13088)
@@ -108,4 +108,21 @@
return $fieldElements;
}
+
+ /**
+ * @public function getTableMoreFiles
+ * @param $mId
+ * @return mixed
+ */
+ public function getTableMoreFiles($mId, $sort = 'file_id ASC, file_name', $order = 'ASC')
+ {
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('file_mid', $mId)); // $mId = module Id
+ $criteria->setSort($sort);
+ $criteria->setOrder($order);
+ $morefiles = $this->tdmcreate->getHandler('morefiles')->getObjects($criteria);
+ unset($criteria);
+
+ return $morefiles;
+ }
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminMenu.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminMenu.php 2015-06-12 21:33:08 UTC (rev 13087)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminMenu.php 2015-06-13 14:20:13 UTC (rev 13088)
@@ -170,7 +170,7 @@
$content = $this->getHeaderFilesComments($module, $filename);
$content .= $this->getAdminMenuHeader();
$content .= $this->getAdminMenuDashboard($language, $menu);
- $tables = $this->getTableTables($module->getVar('mod_id'), 'table_order ASC, table_name');
+ $tables = $this->getTableTables($module->getVar('mod_id'), 'table_order');
foreach (array_keys($tables) as $t) {
$tablePermissions = $tables[$t]->getVar('table_permissions');
if (1 == $tables[$t]->getVar('table_admin')) {
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageModinfo.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageModinfo.php 2015-06-12 21:33:08 UTC (rev 13087)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageModinfo.php 2015-06-13 14:20:13 UTC (rev 13088)
@@ -106,7 +106,7 @@
*/
private function getLanguageMenu($module, $language, $table)
{
- $tables = $this->getTableTables($module->getVar('mod_id'), 'table_order ASC, table_name');
+ $tables = $this->getTableTables($module->getVar('mod_id'), 'table_order');
$menu = 1;
$ret = $this->defines->getAboveHeadDefines('Admin Menu');
$ret .= $this->defines->getDefine($language, "ADMENU{$menu}", "Dashboard");
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/TDMCreateHtmlSmartyCodes.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/TDMCreateHtmlSmartyCodes.php 2015-06-12 21:33:08 UTC (rev 13087)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/TDMCreateHtmlSmartyCodes.php 2015-06-13 14:20:13 UTC (rev 13088)
@@ -1,489 +0,0 @@
-<?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: htmlsmartycodes.php 12258 2014-01-02 09:33:29Z timgno $
- */
-defined('XOOPS_ROOT_PATH') or die('Restricted access');
-
-/**
- * Class TDMCreateHtmlSmartyCodes
- */
-class TDMCreateHtmlSmartyCodes extends TDMCreateFile
-{
- /*
- * @public function constructor
- * @param null
- */
- /**
- *
- */
- public function __construct()
- {
- parent::__construct();
- }
-
- /*
- * @static function &getInstance
- * @param null
- */
- /**
- * @return TDMCreateHtmlSmartyCodes
- */
- public static function &getInstance()
- {
- static $instance = false;
- if (!$instance) {
- $instance = new self();
- }
-
- return $instance;
- }
-
- /*
- * @public function getHtmlDiv
- * @param string $class
- * @param string $content
- */
- /**
- * @param string $class
- * @param string $content
- * @return string
- */
- public function getHtmlDiv($class = 'bnone', $content = '')
- {
- $ret = <<<EOT
- <div class='{$class}'>
- {$content}
- </div>
-EOT;
-
- return $ret;
- }
-
- /*
- * @public function getHtmlSpan
- * @param string $class
- * @param string $content
- */
- /**
- * @param string $class
- * @param string $content
- * @return string
- */
- public function getHtmlSpan($class = 'bnone', $content = '')
- {
- $ret = <<<EOT
- <span class='{$class}'>
- {$content}
- </span>
-EOT;
-
- return $ret;
- }
-
- /*
- * @public function getHtmlParagraph
- * @param string $class
- * @param string $content
- */
- /**
- * @param string $class
- * @param string $content
- * @return string
- */
- public function getHtmlParagraph($class = 'bnone', $content = '')
- {
- $ret = <<<EOT
- <p class='{$class}'>
- {$content}
- </p>
-EOT;
-
- return $ret;
- }
-
- /*
- * @public function getHtmlAnchor
- * @param string $class
- * @param string $url
- * @param string $target
- * @param string $content
- */
- /**
- * @param string $class
- * @param string $url
- * @param string $target
- * @param string $content
- * @return string
- */
- public function getHtmlAnchor($class = 'bnone', $url = 'http://', $target = '_top', $content = '')
- {
- $ret = <<<EOT
- <a class='{$class}' href='{$url}' target='{$target}'>
- {$content}
- </a>
-EOT;
-
- return $ret;
- }
-
- /*
- * @public function getHtmlImage
- * @param string $class
- * @param string $src
- * @param string $alt
- */
- /**
- * @param string $class
- * @param string $src
- * @param string $alt
- * @return string
- */
- public function getHtmlImage($class = 'bnone', $src = 'blank.gif', $alt = 'blank.gif')
- {
- $ret = <<<EOT
- <img class='{$class}' src='{$src}' alt='{$alt}' />
-EOT;
-
- return $ret;
- }
-
- /*
- * @public function getHtmlTable
- * @param string $class
- * @param string $content
- */
- /**
- * @param string $class
- * @param string $content
- * @return string
- */
- public function getHtmlTable($class = 'bnone', $content = '')
- {
- $ret = <<<EOT
- <table class='{$class}'>
- {$content}
- </table>
-EOT;
-
- return $ret;
- }
-
- /*
- * @public function getHtmlTableThead
- * @param string $class
- * @param string $content
- */
- /**
- * @param string $class
- * @param string $content
- * @return string
- */
- public function getHtmlTableThead($class = 'bnone', $content = '')
- {
- $ret = <<<EOT
- <thead class='{$class}'>
- {$content}
- </thead>
-EOT;
-
- return $ret;
- }
-
- /*
- * @public function getHtmlTableTbody
- * @param string $class
- * @param string $content
- */
- /**
- * @param string $class
- * @param string $content
- * @return string
- */
- public function getHtmlTableTbody($class = 'bnone', $content = '')
- {
- $ret = <<<EOT
- <tbody class='{$class}'>
- {$content}
- </tbody>
-EOT;
-
- return $ret;
- }
-
- /*
- * @public function getHtmlTableTfoot
- * @param string $class
- * @param string $content
- */
- /**
- * @param string $class
- * @param string $content
- * @return string
- */
- public function getHtmlTableTfoot($class = 'bnone', $content = '')
- {
- $ret = <<<EOT
- <tfoot class='{$class}'>
- {$content}
- </tfoot>
-EOT;
-
- return $ret;
- }
-
- /*
- * @public function getHtmlTableHead
- * @param string $class
- * @param string $content
- */
- /**
- * @param string $class
- * @param string $content
- * @return string
- */
- public function getHtmlTableHead($class = 'bnone', $content = '')
- {
- $ret = <<<EOT
- <th class='{$class}'>{$content}</th>
-EOT;
-
- return $ret;
- }
-
- /*
- * @public function getHtmlTableRow
- * @param string $class
- * @param string $content
- */
- /**
- * @param string $class
- * @param string $content
- * @return string
- */
- public function getHtmlTableRow($class = 'bnone', $content = '')
- {
- $ret = <<<EOT
- <tr class='{$class}'>
- {$content}
- </tr>
-EOT;
-
- return $ret;
- }
-
- /*
- * @public function getHtmlTableData
- * @param string $class
- * @param string $content
- */
- /**
- * @param string $class
- * @param string $content
- * @return string
- */
- public function getHtmlTableData($class = 'bnone', $content = '')
- {
- $ret = <<<EOT
- <td class='{$class}'>{$content}</td>
-EOT;
-
- return $ret;
- }
-
- /*
- * @public function getSmartyConst
- * @param string $language
- * @param mixed $fieldName
- */
- /**
- * @param $language
- * @param $fieldName
- * @return string
- */
- public function getSmartyConst($language, $fieldName)
- {
- $ret = <<<EOT
- <{\$smarty.const.{$language}{$fieldName}}>
-EOT;
-
- return $ret;
- }
-
- /*
- * @public function getSmartyTableFieldNameEmptyData
- * @param string $tableName
- * @param string $fieldName
- */
- /**
- * @param string $tableName
- * @param string $fieldName
- * @return string
- */
- public function getSmartyTableFieldNameEmptyData($tableName = '', $fieldName = '')
- {
- $ret = <<<EOT
- <{\${$tableName}.{$fieldName}}>
-EOT;
-
- return $ret;
- }
-
- /*
- * @public function getSmartyTableField
- * @param string $tableFieldname
- * @param string $fieldName
- */
- /**
- * @param string $tableFieldname
- * @param string $fieldName
- * @return string
- */
- public function getSmartyTableFieldData($tableFieldname = '', $fieldName = '')
- {
- $ret = <<<EOT
- <{\${$tableFieldname}.{$fieldName}}>
-EOT;
-
- return $ret;
- }
-
- /*
- * @public function getSmartyIncludeFile
- * @param string $name
- */
- /**
- * @param $moduleDirname
- * @param string $tableName
- * @return string
- */
- public function getSmartyIncludeFile($moduleDirname, $tableName = 'header')
- {
- $ret = <<<EOT
- <{include file='db:{$moduleDirname}_{$tableName}.html'}>
-EOT;
-
- return $ret;
- }
-
- /*
- * @public function getSmartyConditions
- * @param string $condition
- * @param string $operator
- * @param string $type
- * @param string $content_if
- * @param mixed $content_else
- */
- /**
- * @param string $condition
- * @param string $operator
- * @param string $type
- * @param string $content_if
- * @param bool $content_else
- * @return string
- */
- public function getSmartyConditions($condition = '', $operator = '==', $type = '1', $content_if = '', $content_else = false)
- {
- if (!$content_else) {
- $ret = <<<EOT
- <{if ${$condition} {$operator} {$type}'}>
- {$content_if}
- <{/if}>
-EOT;
- } else {
- $ret = <<<EOT
- <{if ${$condition} {$operator} {$type}'}>
- {$content_if}
- <{else}>
- {$content_else}
- <{/if}>
-EOT;
- }
-
- return $ret;
- }
-
- /*
- * @public function getSmartyForeach
- * @param string $item
- * @param string $from
- * @param string $content
- */
- /**
- * @param string $item
- * @param string $from
- * @param string $content
- * @return string
- */
- public function getSmartyForeach($item = 'item', $from = 'from', $content = 'content')
- {
- $ret = <<<EOT
- <{foreach item={$item} from=${$from}}>
- {$content}
- <{/foreach}>
-EOT;
-
- return $ret;
- }
-
- /*
- * @public function getSmartyForeachQuery
- * @param string $item
- * @param string $from
- * @param string $content
- */
- /**
- * @param string $item
- * @param string $from
- * @param string $content
- * @return string
- */
- public function getSmartyForeachQuery($item = 'item', $from = 'from', $content = 'content')
- {
- $ret = <<<EOT
- <{foreachq item={$item} from=${$from}}>
- {$content}
- <{/foreachq}>
-EOT;
-
- return $ret;
- }
-
- /*
- * @public function getSmartySection
- * @param string $name
- * @param string $loop
- * @param string $content
- */
- /**
- * @param string $name
- * @param string $loop
- * @param string $content
- * @return string
- */
- public function getSmartySection($name = 'name', $loop = 'loop', $content = 'content')
- {
- $ret = <<<EOT
- <{section name={$name} loop=${$loop}}>
- {$content}
- <{/section}>
-EOT;
-
- return $ret;
- }
-}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminPages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminPages.php 2015-06-12 21:33:08 UTC (rev 13087)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminPages.php 2015-06-13 14:20:13 UTC (rev 13088)
@@ -298,7 +298,7 @@
$moduleDirname = $module->getVar('mod_dirname');
$tableFieldname = $table->getVar('table_fieldname');
$language = $this->getLanguage($moduleDirname, 'AM');
- $fields = $this->getTableFields($table->getVar('table_mid'), $table->getVar('table_id'), 'field_order ASC');
+ $fields = $this->getTableFields($table->getVar('table_mid'), $table->getVar('table_id'), 'field_order');
$content = $this->getTemplatesAdminPagesHeader($moduleDirname, $table, $fields, $language);
// Verify if table_fieldname is not empty
if (!empty($tableFieldname)) {
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserIndex.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserIndex.php 2015-06-12 21:33:08 UTC (rev 13087)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserIndex.php 2015-06-13 14:20:13 UTC (rev 13088)
@@ -110,7 +110,7 @@
<ul class="menu">
<li><a href="<{\${$moduleDirname}_url}>"><{\$smarty.const.{$language}INDEX}></a></li>\n
EOT;
- $tables = $this->getTableTables($module->getVar('mod_id'), 'table_order ASC');
+ $tables = $this->getTableTables($module->getVar('mod_id'), 'table_order');
foreach (array_keys($tables) as $i) {
$tableName = $tables[$i]->getVar('table_name');
$stuTableName = strtoupper($tableName);
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserMoreFiles.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserMoreFiles.php 2015-06-12 21:33:08 UTC (rev 13087)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserMoreFiles.php 2015-06-13 14:20:13 UTC (rev 13088)
@@ -1,122 +0,0 @@
-<?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: TemplatesUserMoreFiles.php 12258 2014-01-02 09:33:29Z timgno $
- */
-defined('XOOPS_ROOT_PATH') or die('Restricted access');
-
-/**
- * Class TemplatesUserMoreFiles
- */
-class TemplatesUserMoreFiles extends TDMCreateFile
-{
- //
- private $folder;
- //
- private $extension;
- /*
- * @public function constructor
- * @param null
- */
- /**
- *
- */
- public function __construct()
- {
- parent::__construct();
- $this->tdmcfile = TDMCreateFile::getInstance();
- }
-
- /*
- * @static function &getInstance
- * @param null
- */
- /**
- * @return TemplatesUserMoreFiles
- */
- public static function &getInstance()
- {
- static $instance = false;
- if (!$instance) {
- $instance = new self();
- }
-
- return $instance;
- }
-
- /*
- * @public function write
- * @param string $module
- * @param string $filename
- */
- /**
- * @param $module
- * @param $filename
- * @return string
- */
- public function write($module, $folder = '', $filename, $extension)
- {
- $this->setModule($module);
- $this->setFileName($filename);
- if($folder != ''){
- $this->folder = 'templates/'.$folder;
- } else {
- $this->folder = 'templates';
- }
- $this->extension = $extension;
- }
-
- /*
- * @private function getTemplatesUserMoreFile
- * @param null
- */
- /**
- * @param null
- * @return string
- */
- private function getTemplatesUserMoreFile()
- {
- $ret = <<<EOT
-<div class="panel">
- Pleace! Enter here your template code here
-</div>
-EOT;
-
- return $ret;
- }
-
- /*
- * @public function renderFile
- * @param string $filename
- */
- /**
- * @param $filename
- * @return bool|string
- */
- public function renderFile()
- {
- $module = $this->getModule();
- $filename = $this->getFileName();
- $moduleDirname = $module->getVar('mod_dirname');
- $content = $this->getTemplatesUserMoreFile();
- //
- $this->tdmcfile->create($moduleDirname, $this->folder, $filename . '.' . $this->extension, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
-
- return $this->tdmcfile->renderFile();
- }
-}
|
|
From: <txm...@us...> - 2015-06-13 22:09:39
|
Revision: 13089
http://sourceforge.net/p/xoops/svn/13089
Author: txmodxoops
Date: 2015-06-13 22:09:36 +0000 (Sat, 13 Jun 2015)
Log Message:
-----------
Merged modifies (With Goffy)
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/index.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/admin.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/xoops_version.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/fields.php 2015-06-13 14:20:13 UTC (rev 13088)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/fields.php 2015-06-13 22:09:36 UTC (rev 13089)
@@ -172,7 +172,7 @@
// Set field elements
if ($fieldsObj->isNew()) {
// Fields Elements Handler
- $fieldelementObj =& $tdmcreate->getHandler('fieldelements')->create();
+ /*$fieldelementObj =& $tdmcreate->getHandler('fieldelements')->create();
$fieldelementObj->setVar( 'fieldelement_mid', $fieldMid );
$fieldelementObj->setVar( 'fieldelement_tid', $fieldTid );
$fieldelementObj->setVar( 'fieldelement_name', 'Table : '.ucfirst($tableName) );
@@ -180,7 +180,7 @@
// Insert new field element id for table name
if (!$tdmcreate->getHandler('fieldelements')->insert($fieldelementObj) ) {
$GLOBALS['xoopsTpl']->assign('error', $fieldelementObj->getHtmlErrors() . ' Field element');
- }
+ }*/
redirect_header('fields.php', 2, sprintf(_AM_TDMCREATE_FIELDS_FORM_SAVED_OK, $tableName));
} else {
// Needed code from table name by field_tid
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/index.php 2015-06-13 14:20:13 UTC (rev 13088)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/index.php 2015-06-13 22:09:36 UTC (rev 13089)
@@ -19,16 +19,17 @@
* @version $Id: index.php 11084 2013-02-23 15:44:20Z timgno $
*/
include __DIR__ . '/header.php';
-$criteria = new CriteriaCompo();
-$count_modules = $tdmcreate->getHandler('modules')->getCount($criteria);
-$count_tables = $tdmcreate->getHandler('tables')->getCount($criteria);
-$count_fields = $tdmcreate->getHandler('fields')->getCount($criteria);
+$countModules = $tdmcreate->getHandler('modules')->getCount();
+$countTables = $tdmcreate->getHandler('tables')->getCount();
+$countFields = $tdmcreate->getHandler('fields')->getCount();
+$countFiles = $tdmcreate->getHandler('morefiles')->getCount();
unset($criteria);
$templateMain = 'tdmcreate_index.tpl';
$adminMenu->addInfoBox(_AM_TDMCREATE_ADMIN_NUMMODULES);
-$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' . _AM_TDMCREATE_THEREARE_NUMMODULES . '</label>', $count_modules, 'Green');
-$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' . _AM_TDMCREATE_THEREARE_NUMTABLES . '</label>', $count_tables, 'Orange');
-$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' . _AM_TDMCREATE_THEREARE_NUMFIELDS . '</label>', $count_fields, 'Gray');
+$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' . _AM_TDMCREATE_THEREARE_NUMMODULES . '</label>', $countModules, 'Green');
+$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' . _AM_TDMCREATE_THEREARE_NUMTABLES . '</label>', $countTables, 'Orange');
+$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' . _AM_TDMCREATE_THEREARE_NUMFIELDS . '</label>', $countFields, 'Gray');
+$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' . _AM_TDMCREATE_THEREARE_NUMFILES . '</label>', $countFiles, 'Red');
// Upload Folders
$folder = array(
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/tables.php 2015-06-13 14:20:13 UTC (rev 13088)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/tables.php 2015-06-13 22:09:36 UTC (rev 13089)
@@ -22,7 +22,7 @@
// Recovered value of arguments op in the URL $
$op = XoopsRequest::getString('op', 'list');
//
-$mod_id = XoopsRequest::getInt('mod_id');
+$modId = XoopsRequest::getInt('mod_id');
// Request vars
$tableId = XoopsRequest::getInt('table_id');
$tableMid = XoopsRequest::getInt('table_mid');
@@ -186,6 +186,16 @@
if ($tablesObj->isNew()) {
$tableTid = $GLOBALS['xoopsDB']->getInsertId();
$tableAction = '&field_mid=' . $tableMid . '&field_tid=' . $tableTid . '&field_numb=' . $tableNumbFields . '&field_name=' . $tableFieldname;
+ // Fields Elements Handler
+ $fieldelementObj =& $tdmcreate->getHandler('fieldelements')->create();
+ $fieldelementObj->setVar( 'fieldelement_mid', $tableMid );
+ $fieldelementObj->setVar( 'fieldelement_tid', $tableTid );
+ $fieldelementObj->setVar( 'fieldelement_name', 'Table : '.ucfirst($_POST['table_name']) );
+ $fieldelementObj->setVar( 'fieldelement_value', 'XoopsFormTables-'.ucfirst($_POST['table_name']) );
+ // Insert new field element id for table name
+ if (!$tdmcreate->getHandler('fieldelements')->insert($fieldelementObj) ) {
+ $GLOBALS['xoopsTpl']->assign('error', $fieldelementObj->getHtmlErrors() . ' Field element');
+ }
redirect_header('fields.php?op=new' . $tableAction, 5, sprintf(_AM_TDMCREATE_TABLE_FORM_CREATED_OK, $_POST['table_name']));
} else {
redirect_header('tables.php', 5, sprintf(_AM_TDMCREATE_TABLE_FORM_UPDATED_OK, $_POST['table_name']));
@@ -238,9 +248,18 @@
redirect_header('tables.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
if ($tdmcreate->getHandler('tables')->delete($tablesObj)) {
+ // Delete items in table fieldelements - idea by goffy
+ $fieldelements = $tdmcreate->getHandler('fieldelements')->getAllFieldElementsByModuleAndTableId($tableMid, $tableId);
+ foreach (array_keys($fieldelements) as $fe) {
+ $fieldelementsObj =& $tdmcreate->getHandler('fieldelements')->get($fieldelements[$fe]->getVar('fieldelement_id'));
+ if (!$tdmcreate->getHandler('fieldelements')->delete($fieldelementsObj)) {
+ $GLOBALS['xoopsTpl']->assign('error', $fieldelementsObj->getHtmlErrors());
+ }
+ unset($fieldelementsObj);
+ }
redirect_header('tables.php', 3, _AM_TDMCREATE_FORMDELOK);
} else {
- echo $tablesObj->getHtmlErrors();
+ $GLOBALS['xoopsTpl']->assign('error', $tablesObj->getHtmlErrors());
}
} else {
xoops_confirm(array('ok' => 1, 'table_id' => $tableId, 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $tablesObj->getVar('table_name')));
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/admin.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/admin.php 2015-06-13 14:20:13 UTC (rev 13088)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/admin.php 2015-06-13 22:09:36 UTC (rev 13089)
@@ -30,6 +30,7 @@
define('_AM_TDMCREATE_THEREARE_NUMMODULES', "There are <span class='red bold'>%s</span> modules stored in the Database");
define('_AM_TDMCREATE_THEREARE_NUMTABLES', "There are <span class='red bold'>%s</span> tables stored in the Database");
define('_AM_TDMCREATE_THEREARE_NUMFIELDS', "There are <span class='red bold'>%s</span> fields stored in the Database");
+define('_AM_TDMCREATE_THEREARE_NUMFILES', "There are <span class='red bold'>%s</span> more files stored in the Database");
// General
define('_AM_TDMCREATE_FORMOK', "Successfully saved");
define('_AM_TDMCREATE_FORMDELOK', "Successfully deleted");
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/modinfo.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/modinfo.php 2015-06-13 14:20:13 UTC (rev 13088)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/modinfo.php 2015-06-13 22:09:36 UTC (rev 13089)
@@ -89,3 +89,4 @@
define('_MI_TDMCREATE_CONFIG_MODULES_ADMINPAGER', "Modules adminpager");
define('_MI_TDMCREATE_CONFIG_TABLES_ADMINPAGER', "Tables adminpager");
define('_MI_TDMCREATE_CONFIG_FIELDS_ADMINPAGER', "Fields adminpager");
+define('_MI_TDMCREATE_CONFIG_MOREFILES_ADMINPAGER', "More Files adminpager");
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/xoops_version.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/xoops_version.php 2015-06-13 14:20:13 UTC (rev 13088)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/xoops_version.php 2015-06-13 22:09:36 UTC (rev 13089)
@@ -27,7 +27,7 @@
$modversion['author'] = "Xoops TDM";
$modversion['author_website_url'] = "http://www.xoops.org/";
$modversion['author_website_name'] = "Xoops Team Developers Module";
-$modversion['credits'] = "Mamba(Xoops), Timgno(Txmod Xoops)";
+$modversion['credits'] = "Mamba(Xoops), Timgno(Txmod Xoops), Goffy(German Xoops)";
$modversion['help'] = "page=help";
$modversion['license'] = "GNU GPL 2.0 or later";
$modversion['license_url'] = "www.gnu.org/licenses/gpl-2.0.html/";
|
|
From: <txm...@us...> - 2015-07-03 12:44:49
|
Revision: 13095
http://sourceforge.net/p/xoops/svn/13095
Author: txmodxoops
Date: 2015-07-03 12:44:44 +0000 (Fri, 03 Jul 2015)
Log Message:
-----------
Fixed small bugs
Refactoring
Updated
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/about.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/building.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/footer.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/header.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/index.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/menu.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/morefiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/settings.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/assets/css/admin/style.css
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/assets/js/functions.js
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/SplClassLoader.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/autoload.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/building.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fieldattributes.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fieldelements.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fieldkey.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fieldnull.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fieldtype.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateAbstract.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateArchitecture.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateFile.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateHtmlSmartyCodes.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateMoreFiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateStructure.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateTableFields.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminAbout.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminFooter.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminHeader.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminIndex.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminMenu.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminObjects.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminPages.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminPermissions.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminPhpCode.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/blocks/BlocksFiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFormElements.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassHelper.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/css/CssStyles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/docs/DocsChangelog.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/docs/DocsFiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeCommentFunctions.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeComments.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeCommon.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeFunctions.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeInstall.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeJquery.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeNotifications.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeSearch.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeUpdate.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageAdmin.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageBlocks.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageDefines.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageHelp.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageMailTpl.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageMain.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageModinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/sql/SqlFile.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminAbout.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminFooter.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminHeader.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminIndex.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminPages.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminPermissions.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/blocks/TemplatesBlocks.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserBreadcrumbs.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserBroken.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserDisqusComments.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserFacebookComments.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserFooter.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserHeader.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserIndex.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserPages.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserPagesList.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserPdf.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserPrint.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserRate.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserRss.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserSearch.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserSingle.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserSubmit.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserBroken.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserFooter.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserHeader.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserIndex.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserListTag.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserNotificationUpdate.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserObjects.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserPages.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserPdf.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserPrint.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserRate.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserRss.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserSearch.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserSingle.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserSubmit.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserViewTag.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserVisit.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserXoopsVersion.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/form/TDMCreateFormRadio.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/form/TDMCreateFormRaw.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/form/TDMCreateFormTab.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/form/TDMCreateFormTabTray.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/form/TDMCreateThemeForm.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/helper.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/html/TDMCreateFormLabel.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/logoGenerator.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/morefiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/session.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/settings.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/include/common.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/include/functions.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/include/install.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/include/update.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/admin.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/sql/mysql.sql
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/templates/admin/tdmcreate_settings.tpl
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/templates/admin/tdmcreate_tables.tpl
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/xoops_version.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreatePhpCode.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserCategories.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserCategoriesList.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserMoreFiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/lang.diff
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/about.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/about.php 2015-07-01 10:38:11 UTC (rev 13094)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/about.php 2015-07-03 12:44:44 UTC (rev 13095)
@@ -1,4 +1,5 @@
<?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
@@ -9,19 +10,21 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
- * tdmcreate module
+ * 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: about.php 11084 2013-02-23 15:44:20Z timgno $
*/
-include __DIR__ . '/header.php';
+include __DIR__.'/header.php';
$templateMain = 'tdmcreate_about.tpl';
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('about.php'));
-$about = $adminMenu->renderAbout('7LFE862PGJN88', false);
+$about = $adminMenu->renderAbout('7LFE862PGJN88', false);
$aboutRes = TDMCreate_MakeDonationForm($about);
$GLOBALS['xoopsTpl']->assign('about', $aboutRes);
-include __DIR__ . '/footer.php';
+include __DIR__.'/footer.php';
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/building.php 2015-07-01 10:38:11 UTC (rev 13094)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/building.php 2015-07-03 12:44:44 UTC (rev 13095)
@@ -1,4 +1,5 @@
<?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
@@ -9,26 +10,29 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
- * tdmcreate module
+ * 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: building.php 12258 2014-01-02 09:33:29Z timgno $
*/
-include __DIR__ . '/header.php';
-$op = XoopsRequest::getString('op', 'default');
-$mid = XoopsRequest::getInt('mod_id');
+include __DIR__.'/header.php';
+$op = XoopsRequest::getString('op', 'default');
+$mid = XoopsRequest::getInt('mod_id');
$moduleObj = $tdmcreate->getHandler('modules')->get($mid);
+$cachePath = XOOPS_VAR_PATH.'/caches/tdmcreate_cache';
// Clear cache
-if (file_exists($cacheFile1 = TDMC_CLASSES_PATH . '/cache/classpaths.cache') &&
- file_exists($cacheFile2 = TDMC_CLASSES_PATH . '/files/cache/classpaths.cache')) {
- if (unlink($cacheFile1) && unlink($cacheFile2)) {
- redirect_header('building.php?op=build', 5, _AM_TDMCREATE_BUILDING_DELETED_CACHE_FILES);
- }
+if (file_exists($cache = $cachePath.'/classpaths.cache')) {
+ unlink($cache);
}
+if (!file_exists($indexFile = $cachePath.'/index.html')) {
+ copy('index.html', $indexFile);
+}
// Switch option
switch ($op) {
case 'build':
@@ -37,8 +41,8 @@
// Get var module dirname
$moduleDirname = $moduleObj->getVar('mod_dirname');
// Directories for copy from to
- $fromDir = TDMC_UPLOAD_REPOSITORY_PATH . '/' . strtolower($moduleDirname);
- $toDir = XOOPS_ROOT_PATH . '/modules/' . strtolower($moduleDirname);
+ $fromDir = TDMC_UPLOAD_REPOSITORY_PATH.'/'.strtolower($moduleDirname);
+ $toDir = XOOPS_ROOT_PATH.'/modules/'.strtolower($moduleDirname);
if (isset($moduleDirname)) {
// Clear this module if it's in repository
if (is_dir($fromDir)) {
@@ -50,11 +54,11 @@
}
}
// Structure
- include_once TDMC_CLASSES_PATH . '/files/TDMCreateArchitecture.php';
+ include_once TDMC_CLASSES_PATH.'/files/TDMCreateArchitecture.php';
$handler = TDMCreateArchitecture::getInstance();
// Creation of the structure of folders and files
- $base_architecture = $handler->createBaseFoldersFiles($moduleObj);
- if (false !== $base_architecture) {
+ $baseArchitecture = $handler->createBaseFoldersFiles($moduleObj);
+ if (false !== $baseArchitecture) {
$GLOBALS['xoopsTpl']->assign('base_architecture', true);
} else {
$GLOBALS['xoopsTpl']->assign('base_architecture', false);
@@ -65,8 +69,8 @@
foreach ($files as $file) {
if ($file) {
$build['list'] = $file;
- }
- $GLOBALS['xoopsTpl']->append('builds', $build);
+ $GLOBALS['xoopsTpl']->append('builds', $build);
+ }
}
unset($build);
// Directory to saved all files
@@ -87,10 +91,10 @@
redirect_header('modules.php?op=new', 2, _AM_TDMCREATE_NOTMODULES);
}
unset($nbModules);
- include_once TDMC_PATH . '/class/building.php';
+ include_once TDMC_PATH.'/class/building.php';
$handler = TDMCreateBuilding::getInstance();
- $form = $handler->getForm();
+ $form = $handler->getForm();
$GLOBALS['xoopsTpl']->assign('form', $form->render());
break;
}
-include __DIR__ . '/footer.php';
+include __DIR__.'/footer.php';
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/fields.php 2015-07-01 10:38:11 UTC (rev 13094)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/fields.php 2015-07-03 12:44:44 UTC (rev 13095)
@@ -1,4 +1,5 @@
-<?php
+<?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
@@ -9,16 +10,18 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
- * tdmcreate module
+ * 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 fields.php 12258 2014-01-02 09:33:29Z timgno $
*/
-include __DIR__ . '/header.php';
+include __DIR__.'/header.php';
// Recovered value of arguments op in the URL $
$op = XoopsRequest::getString('op', 'list');
// Get fields Variables
@@ -27,187 +30,167 @@
$fieldNumb = XoopsRequest::getInt('field_numb');
$fieldName = XoopsRequest::getString('field_name', '');
// switch op
-switch ($op)
-{
- case 'list':
+switch ($op) {
+ case 'list':
default:
$start = XoopsRequest::getInt('start', 0);
- $limit = XoopsRequest::getInt('limit', $tdmcreate->getConfig('tables_adminpager'));
- // Define main template
- $templateMain = 'tdmcreate_fields.tpl';
- $GLOBALS['xoTheme']->addStylesheet( 'modules/tdmcreate/assets/css/admin/style.css' );
- $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js');
- $GLOBALS['xoTheme']->addScript('modules/tdmcreate/assets/js/functions.js');
- $GLOBALS['xoTheme']->addScript('modules/tdmcreate/assets/js/sortable.js');
- $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php'));
- $adminMenu->addItemButton(_AM_TDMCREATE_ADD_TABLE, 'tables.php?op=new', 'add');
- $GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
- $GLOBALS['xoopsTpl']->assign('tdmc_url', TDMC_URL);
- $GLOBALS['xoopsTpl']->assign('tdmc_icons_url', TDMC_ICONS_URL);
- $GLOBALS['xoopsTpl']->assign('tdmc_upload_url', TDMC_UPLOAD_URL);
- $GLOBALS['xoopsTpl']->assign('tdmc_upload_imgtab_url', TDMC_UPLOAD_IMGTAB_URL);
- $GLOBALS['xoopsTpl']->assign('modPathIcon16', $modPathIcon16);
- $GLOBALS['xoopsTpl']->assign('sysPathIcon32', $sysPathIcon32);
- // Redirect if there aren't modules
- $modulesCount = $tdmcreate->getHandler('modules')->getCountModules();
- if ( $modulesCount == 0 ) {
- redirect_header('modules.php?op=new', 2, _AM_TDMCREATE_NOTMODULES );
- }
- unset($modulesCount);
- // Redirect if there aren't tables
- $tablesCount = $tdmcreate->getHandler('tables')->getCountTables();
- if ($tablesCount == 0) {
- redirect_header('tables.php?op=new', 2, _AM_TDMCREATE_NOTTABLES );
- }
- // Get the list of tables
- $tablesAll = $tdmcreate->getHandler('tables')->getAllTables($start, $limit);
- if ($tablesCount > 0)
- {
- $tlid = 1;
- foreach (array_keys($tablesAll) as $tid)
- {
- // Display tables list
- $table = $tablesAll[$tid]->getValues();
- $talid = array('lid' => $tlid);
- $table = array_merge($table, $talid);
+ $limit = XoopsRequest::getInt('limit', $tdmcreate->getConfig('tables_adminpager'));
+ // Define main template
+ $templateMain = 'tdmcreate_fields.tpl';
+ $GLOBALS['xoTheme']->addStylesheet('modules/tdmcreate/assets/css/admin/style.css');
+ $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js');
+ $GLOBALS['xoTheme']->addScript('modules/tdmcreate/assets/js/functions.js');
+ $GLOBALS['xoTheme']->addScript('modules/tdmcreate/assets/js/sortable.js');
+ $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php'));
+ $adminMenu->addItemButton(_AM_TDMCREATE_ADD_TABLE, 'tables.php?op=new', 'add');
+ $GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
+ $GLOBALS['xoopsTpl']->assign('modPathIcon16', TDMC_URL.'/'.$modPathIcon16);
+ // Redirect if there aren't modules
+ $modulesCount = $tdmcreate->getHandler('modules')->getCountModules();
+ if ($modulesCount == 0) {
+ redirect_header('modules.php?op=new', 2, _AM_TDMCREATE_NOTMODULES);
+ }
+ unset($modulesCount);
+ // Redirect if there aren't tables
+ $tablesCount = $tdmcreate->getHandler('tables')->getCountTables();
+ if ($tablesCount == 0) {
+ redirect_header('tables.php?op=new', 2, _AM_TDMCREATE_NOTTABLES);
+ }
+ // Get the list of tables
+ $tablesAll = $tdmcreate->getHandler('tables')->getAllTables($start, $limit);
+ if ($tablesCount > 0) {
+ $tlid = 1;
+ foreach (array_keys($tablesAll) as $tid) {
+ // Display tables list
+ $table = $tablesAll[$tid]->getValues();
+ $talid = array('lid' => $tlid);
+ $table = array_merge($table, $talid);
// Get the list of fields
- $fieldsCount = $tdmcreate->getHandler('fields')->getCountFields();
- $fieldsAll = $tdmcreate->getHandler('fields')->getAllFieldsByModuleAndTableId($table['mid'], $tid);
- // Display fields list
- $fields = array();
- $lid = 1;
- if ( $fieldsCount > 0 )
- {
- foreach (array_keys($fieldsAll) as $fid)
- {
- $field = $fieldsAll[$fid]->getValues();
- $falid = array('lid' => $lid);
- $fields[] = array_merge($field, $falid);
- unset($field);
- ++$lid;
- }
- }
- ++$tlid;
- unset($lid);
- $table['fields'] = $fields;
- $GLOBALS['xoopsTpl']->append('tables_list', $table);
- unset($table);
- }
- unset($tlid);
- unset($fields);
- if ( $tablesCount > $limit ) {
- include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
- $pagenav = new XoopsPageNav($tablesCount, $limit, $start, 'start', 'op=list&limit=' . $limit);
- $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4));
- }
- } else {
- $GLOBALS['xoopsTpl']->assign('error', _AM_TDMCREATE_THEREARENT_FIELDS);
- }
- break;
-
- case 'new':
- // Define main template
- $templateMain = 'tdmcreate_fields.tpl';
- $GLOBALS['xoTheme']->addStylesheet( 'modules/tdmcreate/assets/css/admin/style.css' );
- $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');
- $GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
- // Form Add
- $fieldsObj =& $tdmcreate->getHandler('fields')->create();
- $form = $fieldsObj->getFormNew($fieldMid, $fieldTid, $fieldNumb, $fieldName);
- $GLOBALS['xoopsTpl']->assign('form', $form->render());
- break;
-
- case 'save':
- //
- if ( !$GLOBALS['xoopsSecurity']->check() ) {
+ $fieldsCount = $tdmcreate->getHandler('fields')->getCountFields();
+ $fieldsAll = $tdmcreate->getHandler('fields')->getAllFieldsByModuleAndTableId($table['mid'], $tid);
+ // Display fields list
+ $fields = array();
+ $lid = 1;
+ if ($fieldsCount > 0) {
+ foreach (array_keys($fieldsAll) as $fid) {
+ $field = $fieldsAll[$fid]->getValues();
+ $falid = array('lid' => $lid);
+ $fields[] = array_merge($field, $falid);
+ unset($field);
+ ++$lid;
+ }
+ }
+ ++$tlid;
+ unset($lid);
+ $table['fields'] = $fields;
+ $GLOBALS['xoopsTpl']->append('tables_list', $table);
+ unset($table);
+ }
+ unset($tlid);
+ unset($fields);
+ if ($tablesCount > $limit) {
+ include_once XOOPS_ROOT_PATH.'/class/pagenav.php';
+ $pagenav = new XoopsPageNav($tablesCount, $limit, $start, 'start', 'op=list&limit='.$limit);
+ $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4));
+ }
+ } else {
+ $GLOBALS['xoopsTpl']->assign('error', _AM_TDMCREATE_THEREARENT_FIELDS);
+ }
+ break;
+
+ case 'new':
+ // Define main template
+ $templateMain = 'tdmcreate_fields.tpl';
+ $GLOBALS['xoTheme']->addStylesheet('modules/tdmcreate/assets/css/admin/style.css');
+ $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');
+ $GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
+ // Form Add
+ $fieldsObj = &$tdmcreate->getHandler('fields')->create();
+ $form = $fieldsObj->getFormNew($fieldMid, $fieldTid, $fieldNumb, $fieldName);
+ $GLOBALS['xoopsTpl']->assign('form', $form->render());
+ break;
+
+ case 'save':
+ //
+ if (!$GLOBALS['xoopsSecurity']->check()) {
redirect_header('fields.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
- }
- $fieldId = XoopsRequest::getInt('field_id');
- // Fields Handler
- $fields = $tdmcreate->getHandler('fields');
- $fieldOrder = 1;
- // Set Variables
- foreach($_POST['field_id'] as $key => $value)
- {
- if(isset($value)){
- $fieldsObj =& $fields->get($value);
- } else {
- $fieldsObj =& $fields->create();
- }
- $order = $fieldsObj->isNew() ? $fieldOrder : $_GET['field_order'][$key];
- // Set Data
- $fieldsObj->setVar( 'field_mid', $fieldMid );
- $fieldsObj->setVar( 'field_tid', $fieldTid );
- $fieldsObj->setVar( 'field_order', $order );
- $fieldsObj->setVar( 'field_name', $_POST['field_name'][$key]);
- $fieldsObj->setVar( 'field_type', $_POST['field_type'][$key]);
- $fieldsObj->setVar( 'field_value', $_POST['field_value'][$key]);
- $fieldsObj->setVar( 'field_attribute', $_POST['field_attribute'][$key]);
- $fieldsObj->setVar( 'field_null', $_POST['field_null'][$key]);
- $fieldsObj->setVar( 'field_default', $_POST['field_default'][$key]);
- $fieldsObj->setVar( 'field_key', $_POST['field_key'][$key]);
- $fieldsObj->setVar( 'field_element', $_POST['field_element'][$key]);
- $fieldsObj->setVar( 'field_parent', (1 == $_REQUEST['field_parent'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_admin', (1 == $_REQUEST['field_admin'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_inlist', (1 == $_REQUEST['field_inlist'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_inform', (1 == $_REQUEST['field_inform'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_user', (1 == $_REQUEST['field_user'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_thead', (1 == $_REQUEST['field_thead'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_tbody', (1 == $_REQUEST['field_tbody'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_tfoot', (1 == $_REQUEST['field_tfoot'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_block', (1 == $_REQUEST['field_block'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_main', ($key == $_REQUEST['field_main'] ? 1 : 0));
- $fieldsObj->setVar( 'field_search', (1 == $_REQUEST['field_search'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_required', (1 == $_REQUEST['field_required'][$key])...
[truncated message content] |