From: <txm...@us...> - 2015-05-25 21:36:03
|
Revision: 13068 http://sourceforge.net/p/xoops/svn/13068 Author: txmodxoops Date: 2015-05-25 21:36:01 +0000 (Mon, 25 May 2015) Log Message: ----------- - Fix url logo - Fix language groups - Fix array file notifications Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/TDMCreateArchitecture.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/language/LanguageModinfo.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/user/UserXoopsVersion.php Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/TDMCreateArchitecture.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/TDMCreateArchitecture.php 2015-05-25 20:22:35 UTC (rev 13067) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/TDMCreateArchitecture.php 2015-05-25 21:36:01 UTC (rev 13068) @@ -116,17 +116,17 @@ $this->structure->makeDirAndCopyFile('class', $indexFile, 'index.html'); // Creation of "assets" folder and index.html file $this->structure->makeDirAndCopyFile('assets', $indexFile, 'index.html'); - // Creation of "css" folder and index.html file + // Creation of "assets/css" folder and index.html file $this->structure->makeDirAndCopyFile('assets/css', $indexFile, 'index.html'); - // Creation of "icons" folder and index.html file + // Creation of "assets/icons" folder and index.html file $this->structure->makeDirAndCopyFile('assets/icons', $indexFile, 'index.html'); - // Creation of "images/icons/16" folder and index.html file + // Creation of "assets/icons/16" folder and index.html file $this->structure->makeDirAndCopyFile('assets/icons/16', $indexFile, 'index.html'); - // Creation of "images/icons/32" folder and index.html file + // Creation of "assets/icons/32" folder and index.html file $this->structure->makeDirAndCopyFile('assets/icons/32', $indexFile, 'index.html'); - // Creation of "images" folder and index.html file + // Creation of "assets/images" folder and index.html file $this->structure->makeDirAndCopyFile('assets/images', $indexFile, 'index.html'); - // Creation of "images" folder and index.html file + // Creation of "assets/js" folder and index.html file $this->structure->makeDirAndCopyFile('assets/js', $indexFile, 'index.html'); //Copy the logo of the module $modImage = str_replace(' ', '', strtolower($module->getVar('mod_image'))); @@ -136,12 +136,12 @@ // If file exists if (!file_exists($logoGifFrom)) { // Rename file - $copyFile = TDMC_IMAGE_LOGOS_PATH . '/xoopsdevelopmentteam_logo.gif'; + $copyFile = TDMC_IMAGE_LOGOS_URL . '/xoopsdevelopmentteam_logo.gif'; $copyNewFile = $logoGifFrom; copy($copyFile, $copyNewFile); } else { // Copy file - $copyFile = TDMC_IMAGE_LOGOS_PATH . '/' . $stlModuleAuthor . '_logo.gif'; + $copyFile = TDMC_IMAGE_LOGOS_URL . '/' . $stlModuleAuthor . '_logo.gif'; $copyNewFile = $logoGifFrom; copy($copyFile, $copyNewFile); } Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/language/LanguageModinfo.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/language/LanguageModinfo.php 2015-05-25 20:22:35 UTC (rev 13067) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/language/LanguageModinfo.php 2015-05-25 21:36:01 UTC (rev 13068) @@ -138,8 +138,8 @@ private function getLanguageAdmin($language) { $ret = $this->defines->getAboveHeadDefines('Admin Nav'); - $ret .= $this->defines->getDefine($language, "ADMINPAGER", "Admin pager"); - $ret .= $this->defines->getDefine($language, "ADMINPAGER_DESC", "Admin per page list"); + $ret .= $this->defines->getDefine($language, "ADMIN_PAGER", "Admin pager"); + $ret .= $this->defines->getDefine($language, "ADMIN_PAGER_DESC", "Admin per page list"); return $ret; } @@ -206,8 +206,8 @@ private function getLanguageUser($language) { $ret = $this->defines->getAboveDefines('User'); - $ret .= $this->defines->getDefine($language, "USERPAGER", "User pager"); - $ret .= $this->defines->getDefine($language, "USERPAGER_DESC", "User per page list"); + $ret .= $this->defines->getDefine($language, "USER_PAGER", "User pager"); + $ret .= $this->defines->getDefine($language, "USER_PAGER_DESC", "User per page list"); return $ret; } @@ -232,6 +232,12 @@ $ret .= $this->defines->getDefine($language, "KEYWORDS", "Keywords"); $ret .= $this->defines->getDefine($language, "KEYWORDS_DESC", "Insert here the keywords (separate by comma)"); if (is_object($table)) { + /*if ($table->getVar('table_permissions') != 0) { + $ret .= $this->defines->getDefine($language, "GROUPS", "Groups"); + $ret .= $this->defines->getDefine($language, "GROUPS_DESC", "Groups to have permissions"); + $ret .= $this->defines->getDefine($language, "ADMIN_GROUPS", "Admin Groups"); + $ret .= $this->defines->getDefine($language, "ADMIN_GROUPS_DESC", "Admin Groups to have permissions access"); + }*/ if ($table->getVar('table_image') != '') { $ret .= $this->defines->getDefine($language, "MAXSIZE", "Max size"); $ret .= $this->defines->getDefine($language, "MAXSIZE_DESC", "Set a number of max size uploads file in byte"); @@ -310,20 +316,20 @@ } /* - * @private function getLanguagePermissions + * @private function getLanguagePermissionsGroups * @param string $language */ /** * @param $language * @return string */ - private function getLanguagePermissions($language) + private function getLanguagePermissionsGroups($language) { $ret = $this->defines->getAboveDefines('Permissions Groups'); $ret .= $this->defines->getDefine($language, "GROUPS", "Groups access"); $ret .= $this->defines->getDefine($language, "GROUPS_DESC", "Select general access permission for groups."); - $ret .= $this->defines->getDefine($language, "ADMINGROUPS", "Admin Group Permissions"); - $ret .= $this->defines->getDefine($language, "ADMINGROUPS_DESC", "Which groups have access to tools and permissions page"); + $ret .= $this->defines->getDefine($language, "ADMIN_GROUPS", "Admin Group Permissions"); + $ret .= $this->defines->getDefine($language, "ADMIN_GROUPS_DESC", "Which groups have access to tools and permissions page"); return $ret; } @@ -378,7 +384,7 @@ $content .= $this->getLanguageNotifications($language); } if (1 == $table->getVar('table_permissions')) { - $content .= $this->getLanguagePermissions($language); + $content .= $this->getLanguagePermissionsGroups($language); } } $content .= $this->getLanguageFooter(); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/user/UserXoopsVersion.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/user/UserXoopsVersion.php 2015-05-25 20:22:35 UTC (rev 13067) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/user/UserXoopsVersion.php 2015-05-25 21:36:01 UTC (rev 13068) @@ -496,7 +496,7 @@ } } } - if (1 == $module->getVar('mod_permissions') && 1 == $table->getVar('table_permissions')) { + if (1 == $table->getVar('table_permissions')) { $ret .= <<<EOT // Get groups \$memberHandler =& xoops_gethandler('member'); @@ -523,8 +523,8 @@ } \$modversion['config'][] = array( 'name' => "admin_groups", - 'title' => "{$language}ADMINGROUPS", - 'description' => "{$language}ADMINGROUPS_DESC", + 'title' => "{$language}ADMIN_GROUPS", + 'description' => "{$language}ADMIN_GROUPS_DESC", 'formtype' => "select_multi", 'valuetype' => "array", 'options' => \$admin_groups, @@ -576,8 +576,8 @@ $ret .= <<<EOT \$modversion['config'][] = array( 'name' => "adminpager", - 'title' => "{$language}ADMINPAGER", - 'description' => "{$language}ADMINPAGER_DESC", + 'title' => "{$language}ADMIN_PAGER", + 'description' => "{$language}ADMIN_PAGER_DESC", 'formtype' => "textbox", 'valuetype' => "int", 'default' => 10);\n\n @@ -587,8 +587,8 @@ $ret .= <<<EOT \$modversion['config'][] = array( 'name' => "userpager", - 'title' => "{$language}USERPAGER", - 'description' => "{$language}USERPAGER_DESC", + 'title' => "{$language}USER_PAGER", + 'description' => "{$language}USER_PAGER_DESC", 'formtype' => "textbox", 'valuetype' => "int", 'default' => 10);\n\n @@ -644,12 +644,12 @@ * @param $typeOfNotify */ /** - * @param $language + * @param $language * @param $type - * @param $tableName - * @param $notifyFile - * @param $item - * @param $typeOfNotify + * @param $tableName + * @param $notifyFile + * @param $item + * @param $typeOfNotify * @return string */ private function getTypeNotifications($language, $type = 'category', $tableName, $notifyFile, $item, $typeOfNotify) @@ -699,7 +699,7 @@ */ private function getXoopsVersionNotifications($moduleDirname, $tables, $language, $filename) { - $notifyFiles = array(); + $notifyFiles = ''; $single = 'single'; foreach (array_keys($tables) as $t) { $tableId = $tables[$t]->getVar('table_id'); @@ -713,7 +713,7 @@ if ($t <= count($tableName)) { /*$notifyFiles[] = "'" . $tableName . ".php', "; } else {*/ - $notifyFiles[] = "'" . $tableName . ".php'"; + $notifyFiles = "'" . $tableName . ".php'"; } } if (1 == $tables[$t]->getVar('table_single')) { @@ -779,6 +779,7 @@ private function getXoopsVersionNotificationCodeShort($language, $type, $name, $title, $from) { $title = strtoupper($title); + $from = explode(', ', $from); $from = implode(', ', $from); $ret = <<<EOT \$modversion['notification']['{$type}'][] = array( |