|
From: <txm...@us...> - 2014-07-28 20:17:59
|
Revision: 12733
http://sourceforge.net/p/xoops/svn/12733
Author: txmodxoops
Date: 2014-07-28 20:17:51 +0000 (Mon, 28 Jul 2014)
Log Message:
-----------
- Updated
- Default language is english
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/architecture.php
XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/admin.php
XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/blocks.php
XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/help.php
XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/mail.php
XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/main.php
XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/structure.php
XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/user/xoopsversion.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/architecture.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/architecture.php 2014-07-28 17:13:26 UTC (rev 12732)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/architecture.php 2014-07-28 20:17:51 UTC (rev 12733)
@@ -31,16 +31,8 @@
/*
* @var mixed
*/
- private $structure = null;
+ private $structure = null;
/*
- * @var mixed
- */
- private $path = null;
- /*
- * @var mixed
- */
- private $uploadPath = null;
- /*
* @public function constructor class
* @param null
*/
@@ -166,13 +158,15 @@
$this->structure->makeDirAndCopyFile('language', $indexFile, 'index.html');
// Creation of 'default english' folder
if($language != 'english' ) {
- // Creation of "english" folder and index.html file
- $this->structure->makeDirAndCopyFile('language/english', $indexFile, 'index.html');
+ // Creation of "language/local_language" folder and index.html file
+ $this->structure->makeDirAndCopyFile('language/'.$language, $indexFile, 'index.html');
+ // Creation of "language/local_language/help" folder and index.html file
+ $this->structure->makeDirAndCopyFile('language/'.$language. '/help', $indexFile, 'index.html');
}
- // Creation of "language/local_language" folder and index.html file
- $this->structure->makeDirAndCopyFile('language/'.$language, $indexFile, 'index.html');
- // Creation of "language/local_language/help" folder and index.html file
- $this->structure->makeDirAndCopyFile('language/'.$language. '/help', $indexFile, 'index.html');
+ // Creation of "english" folder and index.html file
+ $this->structure->makeDirAndCopyFile('language/english', $indexFile, 'index.html');
+ // Creation of "language/english/help" folder and index.html file
+ $this->structure->makeDirAndCopyFile('language/english/help', $indexFile, 'index.html');
if( $module->getVar('mod_admin') == 1 ) {
// Creation of "templates" folder and index.html file
$this->structure->makeDirAndCopyFile('templates', $indexFile, 'index.html');
@@ -191,8 +185,12 @@
$this->structure->makeDirAndCopyFile('sql', $indexFile, 'index.html');
}
if( $table->getVar('table_notifications') == 1 ) {
- // Creation of "mail_template" folder and index.html file
- $this->structure->makeDirAndCopyFile('language/'.$language.'/mail_template', $indexFile, 'index.html');
+ // Creation of "language/english/mail_template" folder and index.html file
+ $this->structure->makeDirAndCopyFile('language/english/mail_template', $indexFile, 'index.html');
+ if($language != 'english' ) {
+ // Creation of "language/local_language/mail_template" folder and index.html file
+ $this->structure->makeDirAndCopyFile('language/'.$language.'/mail_template', $indexFile, 'index.html');
+ }
}
}
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/admin.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/admin.php 2014-07-28 17:13:26 UTC (rev 12732)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/admin.php 2014-07-28 20:17:51 UTC (rev 12733)
@@ -232,7 +232,7 @@
}
$content .= $this->getLanguageAdminFoot($language);
//
- $this->tdmcfile->create($moduleDirname, 'language/'.$GLOBALS['xoopsConfig']['language'], $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+ $this->tdmcfile->create($moduleDirname, 'language/english', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
return $this->tdmcfile->renderFile();
}
}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/blocks.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/blocks.php 2014-07-28 17:13:26 UTC (rev 12732)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/blocks.php 2014-07-28 20:17:51 UTC (rev 12733)
@@ -114,7 +114,7 @@
$content .= $this->getLanguageBlock($module, $language);
$content .= $this->getLanguageFooter();
//
- $this->tdmcfile->create($moduleDirname, 'language/'.$GLOBALS['xoopsConfig']['language'], $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+ $this->tdmcfile->create($moduleDirname, 'language/english', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
return $this->tdmcfile->renderFile();
}
}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/help.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/help.php 2014-07-28 17:13:26 UTC (rev 12732)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/help.php 2014-07-28 20:17:51 UTC (rev 12733)
@@ -59,6 +59,7 @@
$filename = $this->getFileName();
$moduleName = $module->getVar('mod_name');
$moduleDirname = $module->getVar('mod_dirname');
+ $language = $GLOBALS['xoopsConfig']['language'];
$content = <<<EOT
<div id="help-template" class="outer">
<h1 class="head">Help:
@@ -88,7 +89,10 @@
<!-- -----Help Content ---------- -->
</div>
EOT;
- $this->tdmcfile->create($moduleDirname, 'language/'.$GLOBALS['xoopsConfig']['language'].'/help', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+ if($language != 'english' ) {
+ $this->tdmcfile->create($moduleDirname, 'language/'.$language.'/help', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+ }
+ $this->tdmcfile->create($moduleDirname, 'language/english/help', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
return $this->tdmcfile->renderFile();
}
}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/mail.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/mail.php 2014-07-28 17:13:26 UTC (rev 12732)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/mail.php 2014-07-28 20:17:51 UTC (rev 12733)
@@ -80,7 +80,7 @@
webmaster
{X_ADMINMAIL}
EOT;
- $this->tdmcfile->create($moduleDirname, 'language/'.$GLOBALS['xoopsConfig']['language'].'/mail_template', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+ $this->tdmcfile->create($moduleDirname, 'language/english/mail_template', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
return $this->tdmcfile->renderFile();
}
}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/main.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/main.php 2014-07-28 17:13:26 UTC (rev 12732)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/main.php 2014-07-28 20:17:51 UTC (rev 12733)
@@ -122,7 +122,7 @@
$content .= $this->geLanguagetMain($module, $language);
$content .= $this->geLanguagetMainFooter($language);
//
- $this->tdmcfile->create($moduleDirname, 'language/'.$GLOBALS['xoopsConfig']['language'], $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+ $this->tdmcfile->create($moduleDirname, 'language/english', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
return $this->tdmcfile->renderFile();
}
}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/modinfo.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/modinfo.php 2014-07-28 17:13:26 UTC (rev 12732)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/language/modinfo.php 2014-07-28 20:17:51 UTC (rev 12733)
@@ -303,7 +303,7 @@
}
$content .= $this->getLanguageFooter();
//
- $this->tdmcfile->create($moduleDirname, 'language/'.$GLOBALS['xoopsConfig']['language'], $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+ $this->tdmcfile->create($moduleDirname, 'language/english', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
return $this->tdmcfile->renderFile();
}
}
\ 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-07-28 17:13:26 UTC (rev 12732)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/structure.php 2014-07-28 20:17:51 UTC (rev 12733)
@@ -41,11 +41,11 @@
/*
* @var string
*/
- private $path = null;
+ protected $path = null;
/*
* @var mixed
*/
- //private $uploadPath = null;
+ protected $uploadPath = null;
/*
* @var string
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/user/xoopsversion.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/user/xoopsversion.php 2014-07-28 17:13:26 UTC (rev 12732)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/files/user/xoopsversion.php 2014-07-28 20:17:51 UTC (rev 12733)
@@ -93,12 +93,13 @@
*/
private function getXoopsVersionHeader($module, $table, $language)
{
- $date = date('Y/m/d');
+ //$dateString = preg_replace('/[^0-9]/', '/', _DBDATESTRING);
+ $date = date(_DBDATESTRING); // _DBDATESTRING
$ret = <<<EOT
defined('XOOPS_ROOT_PATH') or die('Restricted access');
//
\$dirname = basename( dirname( __FILE__ ) ) ;
-// ---------------------- Informations ---------------------- //
+// ------------------- Informations ------------------- //
\$modversion = array(
'name' => {$language}NAME,
'version' => {$module->getVar('mod_version')},
@@ -148,16 +149,14 @@
'adminindex' => "admin/index.php",
'adminmenu' => "admin/menu.php",\n
EOT;
- if (is_object($table)) {
- if ( $table->getVar('table_user') == 1 ) {
+ if ( $module->getVar('mod_user') == 1 ) {
$ret .= <<<EOT
- // Menu
+ // Main things
'hasMain' => 1,\n
EOT;
- }
} else {
$ret .= <<<EOT
- // Menu
+ // Main things
'hasMain' => 0,\n
EOT;
}
@@ -189,7 +188,7 @@
$ret = '';
if ( !empty($tableName) ) {
$ret .= <<<EOT
-// ---------------------- Mysql ---------------------- //
+// ------------------- Mysql ------------------- //
\$modversion['sqlfile']['mysql'] = "sql/mysql.sql";
// Tables\n
EOT;
@@ -212,7 +211,7 @@
private function getXoopsVersionSearch($moduleDirname)
{
$ret = <<<EOT
-// ---------------------- Search ---------------------- //
+// ------------------- Search ------------------- //
\$modversion['hasSearch'] = 1;
\$modversion['search']['file'] = "include/search.inc.php";
\$modversion['search']['func'] = "{$moduleDirname}_search";\n
@@ -226,7 +225,7 @@
private function getXoopsVersionComments($moduleDirname)
{
$ret = <<<EOT
-// ---------------------- Comments ---------------------- //
+// ------------------- Comments ------------------- //
\$modversion['comments']['pageName'] = "comments.php";
\$modversion['comments']['itemName'] = "com_id";
// Comment callback functions
@@ -244,7 +243,7 @@
{
$tables = $this->getTables();
$ret = <<<EOT
-// ---------------------- Templates ---------------------- //
+// ------------------- Templates ------------------- //
// Admin
\$modversion['templates'][] = array('file' => '{$moduleDirname}_admin_about.tpl', 'description' => '', 'type' => 'admin');
\$modversion['templates'][] = array('file' => '{$moduleDirname}_admin_header.tpl', 'description' => '', 'type' => 'admin');
@@ -297,7 +296,7 @@
private function getXoopsVersionSubmenu($language)
{
$ret = <<<EOT
-// ---------------------- Submenu ---------------------- //\n
+// ------------------- Submenu ------------------- //\n
EOT;
$tables = $this->getTables();
$i = 1;
@@ -325,7 +324,7 @@
{
$tables = $this->getTables();
$ret = <<<EOT
-// ---------------------- Blocks ---------------------- //\n
+// ------------------- Blocks ------------------- //\n
EOT;
foreach (array_keys($tables) as $i) {
$tableName = $tables[$i]->getVar('table_name');
@@ -703,9 +702,7 @@
}
if ($table->getVar('table_blocks') == 1) {
$content .= $this->getXoopsVersionBlocks($moduleDirname, $language);
- }
-
-
+ }
}
$content .= $this->getXoopsVersionConfig($module, $table, $language);
if (is_object($table)) {
|