|
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 $Id: 1.91 modules.php 13040 2015-04-25 15:12:12Z timgno $
*/
defined('XOOPS_ROOT_PATH') or die('Restricted access');
include __DIR__ . '/autoload.php';
Added: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/morefiles.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/morefiles.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/morefiles.php 2015-06-12 21:33:08 UTC (rev 13087)
@@ -0,0 +1,261 @@
+<?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.
+ */
+
+/**
+ * morefiles class
+ *
+ * @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.7
+ * @author Txmod Xoops <web...@tx...> - <http://www.txmodxoops.org/>
+ * @version $Id: morefiles.php 13080 2015-06-12 10:12:32Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+include __DIR__ . '/autoload.php';
+/*
+* @Class TDMCreateMoreFiles
+* @extends XoopsObject
+*/
+
+/**
+ * Class TDMCreateMoreFiles
+ */
+class TDMCreateMoreFiles extends XoopsObject
+{
+ /**
+ * Tdmcreate
+ *
+ * @var mixed
+ */
+ private $tdmcreate;
+
+ /**
+ * Settings
+ *
+ * @var mixed
+ */
+ private $settings;
+
+ /*
+ * @public function constructor class
+ * @param null
+ */
+ /**
+ *
+ */
+ public function __construct()
+ {
+ $this->tdmcreate = TDMCreateHelper::getInstance();
+ //
+ $this->initVar('file_id', XOBJ_DTYPE_INT);
+ $this->initVar('file_mid', XOBJ_DTYPE_INT);
+ $this->initVar('file_name', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('file_extension', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('file_infolder', XOBJ_DTYPE_TXTBOX);
+ }
+
+ /**
+ * @param string $method
+ * @param array $args
+ *
+ * @return mixed
+ */
+ public function __call($method, $args)
+ {
+ $arg = isset($args[0]) ? $args[0] : null;
+
+ return $this->getVar($method, $arg);
+ }
+
+ /*
+ * @static function &getInstance
+ * @param null
+ */
+ /**
+ * @return TDMCreateMoreFiles
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+
+ return $instance;
+ }
+
+ /*
+ * @public function getForm
+ * @param mixed $action
+ */
+ /**
+ * @param bool $action
+ * @return XoopsThemeForm
+ */
+ public function getForm($action = false)
+ {
+ //
+ if ($action === false) {
+ $action = $_SERVER['REQUEST_URI'];
+ }
+ //
+ $isNew = $this->isNew();
+ $title = $isNew ? sprintf(_AM_TDMCREATE_MORE_FILES_NEW) : sprintf(_AM_TDMCREATE_MORE_FILES_EDIT);
+ //
+ xoops_load('XoopsFormLoader');
+ //
+ $form = new XoopsThemeForm($title, 'morefilesform', $action, 'post', true);
+ $form->setExtra('enctype="multipart/form-data"');
+ //
+ $modules = $this->tdmcreate->getHandler('modules')->getObjects(null);
+ $modulesSelect = new XoopsFormSelect(_AM_TDMCREATE_MORE_FILES_MODULES, 'file_mid', $this->getVar('file_mid'));
+ $modulesSelect->addOption('', _AM_TDMCREATE_MORE_FILES_MODULE_SELECT);
+ foreach ($modules as $mod) {
+ //$modulesSelect->addOptionArray();
+ $modulesSelect->addOption($mod->getVar('mod_id'), $mod->getVar('mod_name'));
+ }
+ $form->addElement($modulesSelect, true);
+ //
+ $modName = new XoopsFormText(_AM_TDMCREATE_MORE_FILES_NAME, 'file_name', 50, 255, $this->getVar('file_name'));
+ $modName->setDescription(_AM_TDMCREATE_MORE_FILES_NAME_DESC);
+ $form->addElement($modName, true);
+ //
+ $fileEstension = new XoopsFormText(_AM_TDMCREATE_MORE_FILES_EXTENSION, 'file_extension', 50, 255, $this->getVar('file_extension'));
+ $fileEstension->setDescription(_AM_TDMCREATE_MORE_FILES_EXTENSION_DESC);
+ $form->addElement($fileEstension, true);
+ //
+ $fileInfolder = new XoopsFormText(_AM_TDMCREATE_MORE_FILES_INFOLDER, 'file_infolder', 50, 255, $this->getVar('file_infolder'));
+ $fileInfolder->setDescription(_AM_TDMCREATE_MORE_FILES_INFOLDER_DESC);
+ $form->addElement($fileInfolder, true);
+ //
+ $form->addElement(new XoopsFormHidden('op', 'save'));
+ $form->addElement(new XoopsFormButton(_REQUIRED . ' <sup class="red bold">*</sup>', 'submit', _SUBMIT, 'submit'));
+
+ return $form;
+ }
+
+ /**
+ * Get Values
+ */
+ public function getValues($keys = null, $format = null, $maxDepth = null)
+ {
+ $ret = parent::getValues($keys, $format, $maxDepth);
+ // Values
+ $ret['id'] = $this->getVar('file_id');
+ $ret['mid'] = $this->tdmcreate->getHandler('modules')->get($this->getVar('file_mid'))->getVar('mod_name');
+ $ret['name'] = $this->getVar('file_name');
+ $ret['extension'] = $this->getVar('file_extension');
+ $ret['infolder'] = $this->getVar('file_infolder');
+
+ return $ret;
+ }
+}
+
+/*
+* @Class TDMCreateMoreFilesHandler
+* @extends XoopsPersistableObjectHandler
+*/
+
+/**
+ * Class TDMCreateMoreFilesHandler
+ */
+class TDMCreateMoreFilesHandler extends XoopsPersistableObjectHandler
+{
+ /*
+ * @public function constructor class
+ * @param mixed $db
+ */
+ /**
+ * @param null|object $db
+ */
+ public function __construct(&$db)
+ {
+ parent::__construct($db, 'tdmcreate_morefiles', 'tdmcreatemorefiles', 'file_id', 'file_name');
+ }
+
+ /**
+ * @param bool $isNew
+ *
+ * @return object
+ */
+ public function &create($isNew = true)
+ {
+ return parent::create($isNew);
+ }
+
+ /**
+ * retrieve a field
+ *
+ * @param int $i field id
+ * @param null $fields
+ * @return mixed reference to the <a href='psi_element://TDMCreateFields'>TDMCreateFields</a> object
+ * object
+ */
+ public function &get($i = null, $fields = null)
+ {
+ return parent::get($i, $fields);
+ }
+
+ /**
+ * get inserted id
+ *
+ * @param null
+ * @return integer reference to the {@link TDMCreateTables} object
+ */
+ public function &getInsertId()
+ {
+ return $this->db->getInsertId();
+ }
+
+ /**
+ * insert a new field in the database
+ *
+ * @param object $field reference to the {@link TDMCreateFields} object
+ * @param bool $force
+ *
+ * @return bool FALSE if failed, TRUE if already present and unchanged or successful
+ */
+ public function &insert(&$field, $force = false)
+ {
+ if (!parent::insert($field, $force)) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Get Count Modules
+ */
+ public function getCountMoreFiles($start = 0, $limit = 0, $sort = 'file_id ASC, file_name', $order = 'ASC')
+ {
+ $criteria = new CriteriaCompo();
+ $criteria->setSort($sort);
+ $criteria->setOrder($order);
+ $criteria->setStart($start);
+ $criteria->setLimit($limit);
+ return parent::getCount($criteria);
+ }
+
+ /**
+ * Get All Modules
+ */
+ public function getAllMoreFiles($start = 0, $limit = 0, $sort = 'file_id ASC, file_name', $order = 'ASC')
+ {
+ $criteria = new CriteriaCompo();
+ $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/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/tables.php 2015-06-10 16:08:35 UTC (rev 13086)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/tables.php 2015-06-12 21:33:08 UTC (rev 13087)
@@ -16,7 +16,7 @@
* @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
* @package tdmcreate
* @since 2.5.7
- * @author Txmod Xoops <su...@tx...>
+ * @author Txmod Xoops <web...@tx...> - <http://www.txmodxoops.org/>
* @version $Id: 1.91 tables.php 11297 2013-03-24 10:58:10Z timgno $
*/
defined('XOOPS_ROOT_PATH') or die('Restricted access');
@@ -153,7 +153,7 @@
$tableMid = $this->getVar('table_mid');
$title = $isNew ? sprintf(_AM_TDMCREATE_TABLE_NEW) : sprintf(_AM_TDMCREATE_TABLE_EDIT);
- xoops_load('xoopsformloader');
+ xoops_load('XoopsFormLoader');
$form = new XoopsThemeForm($title, 'tableform', $action, 'post', true);
$form->setExtra('enctype="multipart/form-data"');
//
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-10 16:08:35 UTC (rev 13086)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/admin.php 2015-06-12 21:33:08 UTC (rev 13087)
@@ -202,13 +202,13 @@
define('_AM_TDMCREATE_TABLE_AUTO_INCREMENT_DESC', "Check this option if table have the Auto Increment ID");
// v1.59
define('_AM_TDMCREATE_TABLE_EXIST', "The name specified for this table is already in use");
-define('_AM_TDMCREATE_TABLE_BLOCKS', "Add in Block file");
+define('_AM_TDMCREATE_TABLE_BLOCKS', "Add in Block Files");
define('_AM_TDMCREATE_TABLE_BLOCKS_DESC', "(blocks: random, latest, today)");
-define('_AM_TDMCREATE_TABLE_ADMIN', "Add in Admin Panel");
-define('_AM_TDMCREATE_TABLE_USER', "Add in User Side");
+define('_AM_TDMCREATE_TABLE_ADMIN', "Add in Admin Files");
+define('_AM_TDMCREATE_TABLE_USER', "Add in User Files");
define('_AM_TDMCREATE_TABLE_SUBMENU', "Add in Submenu");
-define('_AM_TDMCREATE_TABLE_SEARCH', "Add in Search file");
-define('_AM_TDMCREATE_TABLE_COMMENTS', "Add in Comments file");
+define('_AM_TDMCREATE_TABLE_SEARCH', "Add in Search Files");
+define('_AM_TDMCREATE_TABLE_COMMENTS', "Add in Comments Files");
// Added in version 1.39
define('_AM_TDMCREATE_TABLE_NOTIFICATIONS', "Add in Notifications file");
define('_AM_TDMCREATE_TABLE_PERMISSIONS', "Add in Permissions file");
@@ -371,10 +371,33 @@
//
define('_AM_TDMCREATE_BUILDING_DIRECTORY', "Files created in the directory <span class='bold'>uploads/tdmcreate/repository/</span> of the module <span class='bold green'>%s</span>");
define('_AM_TDMCREATE_FIELD_PARAMETERS_LIST', "<b>Parameters List</b>");
-// v1.91
+// Added in version v1.91
define('_AM_TDMCREATE_ABOUT_MAKE_DONATION', "Make a Donation to support this module");
define('_AM_TDMCREATE_IMPORTANT', "Main Settings");
define('_AM_TDMCREATE_OPTIONS_CHECK', "Options Settings");
define('_AM_TDMCREATE_CREATE_IMAGE', "Create Image Logo");
define('_AM_TDMCREATE_NOT_IMPORTANT', "Secondary Settings");
-define('_AM_TDMCREATE_BUILDING_DELETED_CACHE_FILES', "Cache Files Are Deleted Succefully");
\ No newline at end of file
+define('_AM_TDMCREATE_BUILDING_DELETED_CACHE_FILES', "Cache Files Are Deleted Succefully");
+// Admin More Files
+define('_AM_TDMCREATE_ADD_MORE_FILE', "Add More File");
+define('_AM_TDMCREATE_MORE_FILES_LIST', "More Files List");
+define('_AM_TDMCREATE_FILE_FORM_CREATED_OK', "The file <b class='green'>%s</b> is successfully created");
+define('_AM_TDMCREATE_FILE_FORM_UPDATED_OK', "The file <b class='green'>%s</b> is successfully updated");
+// Class More Files
+define('_AM_TDMCREATE_MORE_FILES_NEW', "New More File");
+define('_AM_TDMCREATE_MORE_FILES_EDIT', "Edit More File");
+define('_AM_TDMCREATE_MORE_FILES_MODULES', "Choose a module");
+define('_AM_TDMCREATE_MORE_FILES_MODULE_SELECT', "Select a Module");
+define('_AM_TDMCREATE_MORE_FILES_NAME', "File Name");
+define('_AM_TDMCREATE_MORE_FILES_NAME_DESC', "Create file name without extension");
+define('_AM_TDMCREATE_MORE_FILES_EXTENSION', "Extension File");
+define('_AM_TDMCREATE_MORE_FILES_EXTENSION_DESC', "Create extension of this file without dot");
+define('_AM_TDMCREATE_MORE_FILES_INFOLDER', "File in the folder");
+define('_AM_TDMCREATE_MORE_FILES_INFOLDER_DESC', "Insert this file in a folder (Type: admin, user, class, include, templates, ...)");
+// Template More Files
+define('_AM_TDMCREATE_FILE_ID', "Id");
+define('_AM_TDMCREATE_FILE_NAME_LIST', "File Name");
+define('_AM_TDMCREATE_FILE_MID_LIST', "Module Name");
+define('_AM_TDMCREATE_FILE_EXTENSION_LIST', "Extension Type");
+define('_AM_TDMCREATE_FILE_INFOLDER_LIST', "In Folder");
+define('_AM_TDMCREATE_FORM_ACTION', "Action");
\ No newline at end of file
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-10 16:08:35 UTC (rev 13086)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/modinfo.php 2015-06-12 21:33:08 UTC (rev 13087)
@@ -27,8 +27,9 @@
define('_MI_TDMCREATE_ADMENU3', "Modules");
define('_MI_TDMCREATE_ADMENU4', "Tables");
define('_MI_TDMCREATE_ADMENU5', "Fields");
-define('_MI_TDMCREATE_ADMENU6', "Building");
-define('_MI_TDMCREATE_ADMENU7', "About");
+define('_MI_TDMCREATE_ADMENU6', "More Files");
+define('_MI_TDMCREATE_ADMENU7', "Building");
+define('_MI_TDMCREATE_ABOUT', "About");
// 1.37
define('_MI_TDMCREATE_CONFIG_EDITOR', "Editor");
define('_MI_TDMCREATE_CONFIG_EDITOR_DESC', "Select an editor for the description");
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/sql/mysql.sql
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/sql/mysql.sql 2015-06-10 16:08:35 UTC (rev 13086)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/sql/mysql.sql 2015-06-12 21:33:08 UTC (rev 13087)
@@ -316,3 +316,16 @@
(13, 0, 0, 'UploadImage', 'XoopsFormUploadImage'),
(14, 0, 0, 'UploadFile', 'XoopsFormUploadFile'),
(15, 0, 0, 'TextDateSelect', 'XoopsFormTextDateSelect');
+
+#
+# Table structure for table `tdmcreate_morefiles` 5
+#
+
+CREATE TABLE `tdmcreate_morefiles` (
+ `file_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT,
+ `file_mid` INT(5) UNSIGNED NOT NULL DEFAULT '0',
+ `file_name` VARCHAR(100) NOT NULL DEFAULT '',
+ `file_extension` VARCHAR(5) NOT NULL DEFAULT '.php',
+ `file_infolder` VARCHAR(50) NOT NULL DEFAULT '',
+ PRIMARY KEY (`file_id`)
+)ENGINE =InnoDB;
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/templates/admin/tdmcreate_morefiles.tpl
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/templates/admin/tdmcreate_morefiles.tpl (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/templates/admin/tdmcreate_morefiles.tpl 2015-06-12 21:33:08 UTC (rev 13087)
@@ -0,0 +1,47 @@
+<!-- Header -->
+<{includeq file="db:tdmcreate_header.tpl"}>
+<!-- Display files list -->
+<{if $files_list}>
+ <table class='outer width100'>
+ <tr>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_FILE_ID}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_FILE_MID_LIST}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_FILE_NAME_LIST}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_FILE_EXTENSION_LIST}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_FILE_INFOLDER_LIST}></th>
+ <th class='center width5'><{$smarty.const._AM_TDMCREATE_FORM_ACTION}></th>
+ </tr>
+ <{foreach item=file from=$files_list key=file_id}>
+ <tr id="file<{$file.id}>" class="files">
+ <td class='center bold width5'><{$file.id}></td>
+ <td class='center bold'><{$file.mid}></td>
+ <td class='center bold green'><{$file.name}></td>
+ <td class='center'><{$file.extension}></td>
+ <td class='center'><{$file.infolder}></td>
+ <td class='xo-actions txtcenter width5'>
+ <a href="morefiles.php?op=edit&file_id=<{$file.id}>" title="<{$smarty.const._EDIT}>">
+ <img src="<{xoModuleIcons16 edit.png}>" alt="<{$smarty.const._EDIT}>" />
+ </a>
+ <a href="morefiles.php?op=delete&file_id=<{$file.id}>" title="<{$smarty.const._DELETE}>">
+ <img src="<{xoModuleIcons16 delete.png}>" alt="<{$smarty.const._DELETE}>" />
+ </a>
+ </td>
+ </tr>
+ <{/foreach}>
+ </table><br /><br />
+ <!-- Display files navigation -->
+ <div class="clear"> </div>
+ <{if $pagenav}><div class="xo-pagenav floatright"><{$pagenav}></div><div class="clear spacer"></div><{/if}>
+<{else}> <!-- Display file images on edit page -->
+ <!-- Display file form (add,edit) -->
+ <{if $form}>
+ <div class="spacer"><{$form}></div>
+ <{/if}>
+<{/if}>
+<{if $error}>
+<div class="errorMsg">
+ <strong><{$error}></strong>
+</div>
+<{/if}>
+<!-- Footer -->
+<{includeq file="db:tdmcreate_footer.tpl"}>
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/xoops_version.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/xoops_version.php 2015-06-10 16:08:35 UTC (rev 13086)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/xoops_version.php 2015-06-12 21:33:08 UTC (rev 13087)
@@ -79,19 +79,23 @@
$modversion['templates'][] = array( 'file' => 'tdmcreate_tables.tpl', 'description' => '', 'type' => 'admin' );
$modversion['templates'][] = array( 'file' => 'tdmcreate_tables_item.tpl', 'description' => '', 'type' => 'admin' );
$modversion['templates'][] = array( 'file' => 'tdmcreate_settings.tpl', 'description' => '', 'type' => 'admin' );
+$modversion['templates'][] = array( 'file' => 'tdmcreate_morefiles.tpl', 'description' => '', 'type' => 'admin' );
// Mysql file
$modversion['sqlfile']['mysql'] = "sql/mysql.sql";
// Tables
-$modversion['tables'][1] = "tdmcreate_settings";
-$modversion['tables'][2] = "tdmcreate_modules";
-$modversion['tables'][3] = "tdmcreate_tables";
-$modversion['tables'][4] = "tdmcreate_fields";
-$modversion['tables'][5] = "tdmcreate_languages";
-$modversion['tables'][6] = "tdmcreate_fieldtype";
-$modversion['tables'][7] = "tdmcreate_fieldattributes";
-$modversion['tables'][8] = "tdmcreate_fieldnull";
-$modversion['tables'][9] = "tdmcreate_fieldkey";
-$modversion['tables'][10] = "tdmcreate_fieldelements";
+$i = 1;
+$modversion['tables'][$i] = "tdmcreate_settings";
+$modversion['tables'][$i] = "tdmcreate_modules";
+$modversion['tables'][$i] = "tdmcreate_tables";
+$modversion['tables'][$i] = "tdmcreate_fields";
+$modversion['tables'][$i] = "tdmcreate_languages";
+$modversion['tables'][$i] = "tdmcreate_fieldtype";
+$modversion['tables'][$i] = "tdmcreate_fieldattributes";
+$modversion['tables'][$i] = "tdmcreate_fieldnull";
+$modversion['tables'][$i] = "tdmcreate_fieldkey";
+$modversion['tables'][$i] = "tdmcreate_fieldelements";
+$modversion['tables'][$i] = "tdmcreate_morefiles";
+unset($i);
// Scripts to run upon installation or update
$modversion['onInstall'] = "include/install.php";
$modversion['onUpdate'] = "include/update.php";
@@ -153,6 +157,13 @@
$modversion['config'][$i]['valuetype'] = "int";
$modversion['config'][$i]['default'] = 10;
$i++;
+$modversion['config'][$i]['name'] = "morefiles_adminpager";
+$modversion['config'][$i]['title'] = "_MI_TDMCREATE_CONFIG_MOREFILES_ADMINPAGER";
+$modversion['config'][$i]['description'] = "_MI_TDMCREATE_CONFIG_";
+$modversion['config'][$i]['formtype'] = "textbox";
+$modversion['config'][$i]['valuetype'] = "int";
+$modversion['config'][$i]['default'] = 10;
+$i++;
$modversion['config'][$i]['name'] = "break" . $i;
$modversion['config'][$i]['title'] = "_MI_TDMCREATE_CONFIG_BREAK_REQUIRED";
$modversion['config'][$i]['description'] = "_MI_TDMCREATE_CONFIG_";
|