|
From: <txm...@us...> - 2014-03-17 00:21:22
|
Revision: 12387
http://sourceforge.net/p/xoops/svn/12387
Author: txmodxoops
Date: 2014-03-17 00:21:17 +0000 (Mon, 17 Mar 2014)
Log Message:
-----------
Updated
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/structure.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/install.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_building.html
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/empty.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/logos/empty.png
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php 2014-03-16 19:46:29 UTC (rev 12386)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php 2014-03-17 00:21:17 UTC (rev 12387)
@@ -32,14 +32,14 @@
$template_main = 'tdmcreate_building.html';
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('building.php'));
// Clear repertory of new module if there are
- TDMCreate_clearDir(TDMC_PATH.'/modules/'.strtolower($modules->getVar('mod_name')));
+ TDMCreate_clearDir(TDMC_UPLOAD_MODULE_PATH . '/' . strtolower($modules->getVar('mod_name')));
// Debut
/************************************************/
/*Structure*/
/************************************************/
include_once TDMC_PATH . '/class/files/architecture.php';
- $handler = new TDMCreateArchitecture();
- $handler->getPath( TDMC_PATH );
+ $handler = TDMCreateArchitecture::getInstance();
+ $handler->getUploadPath( TDMC_UPLOAD_MODULE_PATH );
$handler->getArchitectureFiles( $modules );
// Creation of the structure of folders and files
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-03-16 19:46:29 UTC (rev 12386)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-03-17 00:21:17 UTC (rev 12387)
@@ -29,6 +29,14 @@
*/
public $structure = null;
/*
+ * @var mixed
+ */
+ public $path = null;
+ /*
+ * @var mixed
+ */
+ public $upload_path = null;
+ /*
* @public function constructor class
* @param null
*/
@@ -54,79 +62,86 @@
public function getPath($path) {
$this->path = $path;
}
+ /*
+ * @public function getUploadPath
+ * @param string $path
+ */
+ public function getUploadPath($path) {
+ $this->upload_path = $path;
+ }
/*
* @public function getArchitectureFiles
* @param string $module
*/
public function getArchitectureFiles( $module )
{
- $indexFile = $this->path.'/index.html';
- $fdocs = $this->path.'/docs';
- $fimages = $this->path.'/images';
+ $indexFile = $this->upload_path.'/index.html';
+ $fdocs = $this->upload_path.'/docs';
+ $fimages = $this->upload_path.'/images';
//Creation of the Directory of modules
- $targetDirectory = $this->path.'/modules/'.strtolower($module->getVar('mod_name'));
+ $targetDirectory = $this->upload_path.'/'. str_replace(' ', '', strtolower($module->getVar('mod_name')));
// Creation of "module" folder
$this->structure->getPath($targetDirectory);
// Creation of "module" folder
$this->structure->makeDir($targetDirectory);
// Creation of "admin" folder and index.html file
- $this->structure->makeDirAndCopyFile('admin/', $indexFile, 'index.html');
+ $this->structure->makeDirAndCopyFile('admin', $indexFile, 'index.html');
// Creation of "blocks" folder and index.html file
- $this->structure->makeDirAndCopyFile('blocks/', $indexFile, 'index.html');
+ $this->structure->makeDirAndCopyFile('blocks', $indexFile, 'index.html');
// Creation of "class" folder and index.html file
- $this->structure->makeDirAndCopyFile('class/', $indexFile, 'index.html');
+ $this->structure->makeDirAndCopyFile('class', $indexFile, 'index.html');
// Creation of "css" folder and index.html file
- $this->structure->makeDirAndCopyFile('css/', $indexFile, 'index.html');
+ $this->structure->makeDirAndCopyFile('css', $indexFile, 'index.html');
// Creation of "images" folder and index.html file
- $this->structure->makeDirAndCopyFile('images/', $indexFile, 'index.html');
+ $this->structure->makeDirAndCopyFile('images', $indexFile, 'index.html');
//Copy the logo of the module
$mod_image = str_replace(' ', '', strtolower($module->getVar('mod_image')));
- $this->structure->copyFile('images/', $fimages.'/uploads/modules/'.$mod_image, $mod_image);
+ $this->structure->copyFile('images', $fimages.'/modules/'.$mod_image, $mod_image);
// Creation of 'images/icons' folder and index.html file - Added in Version 1.15
- $this->structure->makeDirAndCopyFile('images/icons/', $indexFile, 'index.html');
+ $this->structure->makeDirAndCopyFile('images/icons', $indexFile, 'index.html');
// Creation of "images/icons/16" folder and index.html file
- $this->structure->makeDirAndCopyFile('images/icons/16/', $indexFile, 'index.html');
+ $this->structure->makeDirAndCopyFile('images/icons/16', $indexFile, 'index.html');
// Creation of "images/icons/32" folder and index.html file
- $this->structure->makeDirAndCopyFile('images/icons/32/', $indexFile, 'index.html');
+ $this->structure->makeDirAndCopyFile('images/icons/32', $indexFile, 'index.html');
// Creation of 'on.png' file
- $this->structure->copyFile('images/icons/16/', $fimages.'/icons/16/on.png', 'on.png');
+ $this->structure->copyFile('images/icons/16', $fimages.'/icons/16/on.png', 'on.png');
// Creation of 'off.png' file
- $this->structure->copyFile('images/icons/16/', $fimages.'/icons/16/off.png', 'off.png');
+ $this->structure->copyFile('images/icons/16', $fimages.'/icons/16/off.png', 'off.png');
// Creation of 'arrow.gif' file
- $this->structure->copyFile('images/icons/16/', $fimages.'/icons/16/arrow.gif', 'arrow.gif');
+ $this->structure->copyFile('images/icons/16', $fimages.'/icons/16/arrow.gif', 'arrow.gif');
// Creation of 'txmodxoops_logo.png' file
- $this->structure->copyFile('images/', $fimages.'/txmodxoops_logo.png', 'txmodxoops_logo.png');
+ $this->structure->copyFile('images', $fimages.'/txmodxoops_logo.png', 'txmodxoops_logo.png');
// Creation of 'docs' folder and index.html file
- $this->structure->makeDirAndCopyFile('docs/', $indexFile, 'index.html');
+ $this->structure->makeDirAndCopyFile('docs', $indexFile, 'index.html');
// Creation of 'credits.txt' file
- $this->structure->copyFile('docs/', $fdocs.'/credits.txt', 'credits.txt');
+ $this->structure->copyFile('docs', $fdocs.'/credits.txt', 'credits.txt');
// Creation of 'install.txt' file
- $this->structure->copyFile('docs/', $fdocs.'/install.txt', 'install.txt');
+ $this->structure->copyFile('docs', $fdocs.'/install.txt', 'install.txt');
// Creation of 'lang_diff.txt' file
- $this->structure->copyFile('docs/', $fdocs.'/lang_diff.txt', 'lang_diff.txt');
+ $this->structure->copyFile('docs', $fdocs.'/lang_diff.txt', 'lang_diff.txt');
// Creation of 'license.txt' file
- $this->structure->copyFile('docs/', $fdocs.'/license.txt', 'license.txt');
+ $this->structure->copyFile('docs', $fdocs.'/license.txt', 'license.txt');
// Creation of 'readme.txt' file
- $this->structure->copyFile('docs/', $fdocs.'/readme.txt', 'readme.txt');
+ $this->structure->copyFile('docs', $fdocs.'/readme.txt', 'readme.txt');
// Creation of "include" folder and index.html file
- $this->structure->makeDirAndCopyFile('include/', $indexFile, 'index.html');
+ $this->structure->makeDirAndCopyFile('include', $indexFile, 'index.html');
// Creation of "language" folder and index.html file
- $this->structure->makeDirAndCopyFile('language/', $indexFile, 'index.html');
+ $this->structure->makeDirAndCopyFile('language', $indexFile, 'index.html');
// Creation of "language/local_language" folder and index.html file
- $this->structure->makeDirAndCopyFile('language/'.$GLOBALS['xoopsConfig']['language']. '/', $indexFile, 'index.html');
+ $this->structure->makeDirAndCopyFile('language/'.$GLOBALS['xoopsConfig']['language'], $indexFile, 'index.html');
// Creation of "language/local_language/help" folder and index.html file
- $this->structure->makeDirAndCopyFile('language/'.$GLOBALS['xoopsConfig']['language']. '/help/', $indexFile, 'index.html');
+ $this->structure->makeDirAndCopyFile('language/'.$GLOBALS['xoopsConfig']['language']. '/help', $indexFile, 'index.html');
// Creation of "templates" folder and index.html file
- $this->structure->makeDirAndCopyFile('templates/', $indexFile, 'index.html');
+ $this->structure->makeDirAndCopyFile('templates', $indexFile, 'index.html');
// Creation of "templates/admin" folder and index.html file
- $this->structure->makeDirAndCopyFile('templates/admin/', $indexFile, 'index.html');
+ $this->structure->makeDirAndCopyFile('templates/admin', $indexFile, 'index.html');
// Creation of "templates/blocks" folder and index.html file
- $this->structure->makeDirAndCopyFile('templates/blocks/', $indexFile, 'index.html');
+ $this->structure->makeDirAndCopyFile('templates/blocks', $indexFile, 'index.html');
// Creation of "sql" folder and index.html file
- $this->structure->makeDirAndCopyFile('sql/', $indexFile, 'index.html');
+ $this->structure->makeDirAndCopyFile('sql', $indexFile, 'index.html');
}
}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/structure.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/structure.php 2014-03-16 19:46:29 UTC (rev 12386)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/structure.php 2014-03-17 00:21:17 UTC (rev 12387)
@@ -147,7 +147,7 @@
$this->from_file = $from_file;
$this->to_file = $to_file;
$dname = $this->folderPath($folder_name);
- $fname = $this->folderPath($folder_name) . $this->to_file;
+ $fname = $this->folderPath($folder_name) . DIRECTORY_SEPARATOR . $this->to_file;
$this->getCopy($dname, $fname);
}
/*
@@ -157,8 +157,8 @@
*/
public function getCopy($dname, $fname)
{
- if(is_dir($fname)) {
- chmod($fname, 0777);
+ if(is_dir($dname)) {
+ chmod($dname, 0777);
copy($this->from_file, $fname);
} else {
$this->makeDir($dname);
@@ -204,7 +204,7 @@
$this->setErrors("({$file}) is a folder or not exist");
continue;
}
- if (($ret = $file_nameHandler->delete()) == false) {
+ if (($ret = $fileHandler->delete()) == false) {
$this->setErrors("Cannot delete ({$file})");
continue;
}
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/empty.png
===================================================================
(Binary files differ)
Index: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/empty.png
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/empty.png 2014-03-16 19:46:29 UTC (rev 12386)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/empty.png 2014-03-17 00:21:17 UTC (rev 12387)
Property changes on: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/empty.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/logos/empty.png
===================================================================
(Binary files differ)
Index: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/logos/empty.png
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/logos/empty.png 2014-03-16 19:46:29 UTC (rev 12386)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/logos/empty.png 2014-03-17 00:21:17 UTC (rev 12387)
Property changes on: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/logos/empty.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php 2014-03-16 19:46:29 UTC (rev 12386)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php 2014-03-17 00:21:17 UTC (rev 12387)
@@ -22,9 +22,13 @@
die('XOOPS root path not defined');
}
$dirname = $GLOBALS['xoopsModule']->getVar('dirname');
-define('TDMC_PATH', XOOPS_ROOT_PATH."/modules/" . $dirname );
-define('TDMC_URL', XOOPS_URL."/modules/" . $dirname );
-define('TDMC_UPLOAD_PATH', XOOPS_UPLOAD_PATH . "/" . $dirname );
-define('TDMC_UPLOAD_URL', XOOPS_UPLOAD_URL . "/" . $dirname );
-define('TDM_CREATE_URL', XOOPS_ROOT_PATH . '/modules/TDMCreate');
+define('TDMC_PATH', XOOPS_ROOT_PATH . '/modules/' . $dirname );
+define('TDMC_URL', XOOPS_URL . '/modules/' . $dirname );
+define('TDMC_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . $dirname );
+define('TDMC_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . $dirname );
+define('TDMC_UPLOAD_MODULE_PATH', TDMC_UPLOAD_PATH . '/modules/' );
+define('TDMC_UPLOAD_MODULE_URL', TDMC_UPLOAD_URL . '/modules/' );
+define('TDMC_UPLOAD_TABLE_PATH', TDMC_UPLOAD_PATH . '/tables/' );
+define('TDMC_UPLOAD_TABLE_URL', TDMC_UPLOAD_URL . '/tables/' );
+define('TDM_CREATE_URL', XOOPS_ROOT_PATH . '/modules/' . $dirname );
define('TDM_CREATE_MURL', TDM_CREATE_URL . '/modules');
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/install.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/install.php 2014-03-16 19:46:29 UTC (rev 12386)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/install.php 2014-03-17 00:21:17 UTC (rev 12387)
@@ -1,22 +1,60 @@
<?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 By TDM - TEAM DEV MODULE FOR XOOPS
- * - Licence GPL Copyright (c) (http://www.tdmxoops.net)
+ * tdmcreate module
*
- * Cette licence, contient des limitations!!!
- *
- * 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.
- *
- * @license TDM GPL license
- * @author TDM TEAM DEV 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: functions.php 11084 2013-02-23 15:44:20Z timgno $
*/
-?>
\ No newline at end of file
+$indexFile = XOOPS_UPLOAD_PATH.'/index.html';
+$blankFile = XOOPS_UPLOAD_PATH.'/blank.gif';
+
+// Making of "uploads" folder
+$tdmcreate = XOOPS_UPLOAD_PATH.'/tdmcreate';
+if(!is_dir($tdmcreate))
+ mkdir($tdmcreate, 0777);
+ chmod($tdmcreate, 0777);
+copy($indexFile, $tdmcreate.'/index.html');
+
+// Making of images uploads folder
+$modules = $tdmcreate.'/modules';
+if(!is_dir($modules))
+ mkdir($modules, 0777);
+ chmod($modules, 0777);
+copy($indexFile, $modules.'/index.html');
+
+// Making of images uploads folder
+$images = $tdmcreate.'/images';
+if(!is_dir($images))
+ mkdir($images, 0777);
+ chmod($images, 0777);
+copy($indexFile, $images.'/index.html');
+
+// Making of "modules" images folder
+$modules = $images.'/modules';
+if(!is_dir($modules))
+ mkdir($modules, 0777);
+ chmod($modules, 0777);
+copy($indexFile, $modules.'/index.html');
+copy($blankFile, $modules.'/blank.gif');
+
+// Making of "tables" images folder
+$tables = $images.'/tables';
+if(!is_dir($tables))
+ mkdir($tables, 0777);
+ chmod($tables, 0777);
+copy($indexFile, $tables.'/index.html');
+copy($blankFile, $tables.'/blank.gif');
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_building.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_building.html 2014-03-16 19:46:29 UTC (rev 12386)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_building.html 2014-03-17 00:21:17 UTC (rev 12387)
@@ -12,6 +12,16 @@
</tr>
</thead>
<tbody>
+ <tr class="even">
+ <td style="padding-left: 30px;"><{$list.file}></td>
+ <{if $architecture_created}>
+ <td class="center"><img src="<{xoModuleIcons16 on.png}>" alt="" /></td>
+ <td> </td>
+ <{else}>
+ <td> </td>
+ <td class="center"><img src="<{xoModuleIcons16 off.png}>" alt="" /></td>
+ <{/if}>
+ <tr>
<!-- <{foreach item=list from=$build_list}> -->
<tr class="<{cycle values='odd, even'}>">
<td class="center" colspan="3"><{$build_list}></td>
|