Changeset 850 for trunk/Modules
- Timestamp:
- Jan 17, 2016, 8:15:03 PM (9 years ago)
- Location:
- trunk/Modules
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Dictionary/Dictionary.php
r846 r850 274 274 $TableColumns = array( 275 275 array('Name' => 'Original', 'Title' => T('English')), 276 array('Name' => 'Translated', 'Title' => $LanguageName),276 array('Name' => 'Translated', 'Title' => T($LanguageName)), 277 277 ); 278 278 if(!is_numeric($_SESSION['language'])) $TableColumns[] = array('Name' => 'LangName', 'Title' => T('Language')); -
trunk/Modules/Download/Download.php
r843 r850 19 19 $this->System->RegisterMenuItem(array( 20 20 'Title' => T('Download'), 21 'Hint' => T('List of czech todownload'),21 'Hint' => T('List of files for download'), 22 22 'Link' => $this->System->Link('/download/'), 23 23 'Permission' => LICENCE_ANONYMOUS, … … 79 79 function ShowDownload() 80 80 { 81 $Output = '<h3>'.T('Download czech').'</h3><br />';81 $Output = '<h3>'.T('Download files').'</h3><br />'; 82 82 83 83 $Output .= T('Additional files: modified wow.exe, fonts to game, translated interface aowow and more can be found on page'). -
trunk/Modules/Forum/Forum.php
r846 r850 35 35 'Icon' => '', 36 36 ), 17); 37 } 38 39 function ShowBox() 40 { 41 $Parser = new HTML_BBCodeParser2(array('filters' => array('Basic', 'Extended', 42 'Images', 'Links', 'Lists', 'Email'))); 43 $Count = 20; 44 $Output = '<strong><a href="'.$this->System->Link('/forum/').'">'.T('Last forum posts').':</a></strong>'; 45 46 $Query = 'SELECT `ForumText`.`Text`, `ForumText`.`Date`, `User`.`Name` AS `UserName`, '. 47 '`User`.`Id` AS `UserId`, `ForumText`.`Thread` '. 48 'FROM `ForumText` '. 49 'JOIN `User` ON `User`.`Id` = `ForumText`.`User` '. 50 'ORDER BY `Date` DESC LIMIT '.$Count; 51 $DbResult = $this->Database->query($Query); 52 $Output .= '<table class="MiniTable"><tr><th>'.T('Date').'</th><th>'.T('User').'</th><th>'.T('Post').'</th></tr>'; 53 while($DbRow = $DbResult->fetch_assoc()) 54 { 55 $Output .= '<tr>'. 56 '<td><a href="'.$this->System->Link('/forum/?Thread='.$DbRow['Thread']).'">'.HumanDate($DbRow['Date']).'</a></td>'. 57 '<td><a href="'.$this->System->Link('/user/?user='.$DbRow['UserId']).'">'.$DbRow['UserName'].'</a></td>'. 58 '<td>'.$Parser->qparse($DbRow['Text']).'</td>'. 59 '</tr>'; 60 } 61 $Output .= '</table>'; 62 return($Output); 37 63 } 38 64 } … … 73 99 { 74 100 $Output = ''; 75 76 101 $Text = $_POST['text']; 77 78 102 $DbResult = $this->System->Database->query('UPDATE `ForumText` SET `Text`="'.$_POST['text'].'" WHERE `User` = '.$this->System->User->Id.' AND `ID` = '.$_GET['Edit']); 79 80 103 $Output .= ShowMessage(T('Text edited.')); 81 82 83 104 return ($Output); 84 105 } … … 178 199 $Output .= $PageList['Output']; 179 200 $Output .= '<div class="shoutbox">'; 180 $DbResult = $this->System->Database->query('SELECT * FROM `ForumText` 201 $DbResult = $this->System->Database->query('SELECT * FROM `ForumText` WHERE `Thread` = '. 181 202 ($_GET['Thread']*1).' '.$SearchQuery.' ORDER BY `ID` DESC '.$PageList['SQLLimit']); 182 203 while($Line = $DbResult->fetch_assoc()) { 183 204 if ($this->System->User->Id == $Line['User']) 184 $edit = '<a href="?Edit='.$Line['ID'].'"> editovat</a>';205 $edit = '<a href="?Edit='.$Line['ID'].'">'.T('edit').'</a>'; 185 206 else $edit = ''; 186 207 $Output .= '<div><span style="float:right;">'.$edit.' ('.HumanDate($Line['Date']). … … 197 218 if($this->System->User->Licence(LICENCE_USER)) 198 219 { 199 200 201 202 220 $Output .= '<form action="?Thread='.$_GET['Thread'].'" method="post">'. 221 '<fieldset><legend>'.T('New Forum Message').'</legend>'. 222 T('User').': '; 223 if($this->System->User->Licence(LICENCE_USER)) $Output .= '<b>'.$this->System->User->Name.'</b><br />'; 203 224 else $Output .= '<input type="text" name="user" /><br />'; 204 205 '<textarea onkeydown="ResizeTextArea(this)" name="text" cols="80"></textarea> <br/>'.206 '<input type="hidden" name="a" value="add2"/>'.207 '<input type="submit" value="'.T('Send').'" /><br /></fieldset>'.208 '</form>';225 $Output .= T('Message text').': ('.T('You can use').' <a href="http://www.bbcode.org/reference.php">'.T('BB code').'</a>)<br/>'. 226 '<textarea onkeydown="ResizeTextArea(this)" name="text" cols="80"></textarea> <br/>'. 227 '<input type="hidden" name="a" value="add2"/>'. 228 '<input type="submit" value="'.T('Send').'" /><br /></fieldset>'. 229 '</form>'; 209 230 } else $Output .= ShowMessage(T('You have to be registered for adding message.'), MESSAGE_CRITICAL); 210 231 return($Output); -
trunk/Modules/FrontPage/FrontPage.php
r848 r850 11 11 $this->License = 'GNU/GPL'; 12 12 $this->Description = 'Main welcome page'; 13 $this->Dependencies = array('News', 'User', 'ShoutBox', 'Translation'); 13 $this->Dependencies = array('News', 'User', 'ShoutBox', 'Translation', 'Log', 14 'Forum'); 14 15 } 15 16 … … 79 80 if(isset($Message)) $Output .= ShowMessage($Message, $MessageType); 80 81 81 $Output .= ' <br />'.82 '<table class="Home"><tr><td colspan=" 3">'.$this->ShowWelcome().82 $Output .= ''. 83 '<table class="Home"><tr><td colspan="2">'.$this->ShowWelcome(). 83 84 '</td></tr>'; 84 $Output .= '<tr><td colspan="3"><h3><a href="'.$this->System->Link('/download/').'">'.T('Download Czech File').'</a></h3></td></tr>';85 $Output .= '<tr><td colspan="3"><h3><a href="'.$this->System->Link('/download/').'">'.T('Download files').'</a></h3></td></tr>'; 85 86 86 $Output .= '<tr><td class="SideBox">'.$this->ShowLastTranslated().'</td>'. 87 '<td class="news-box">'.$this->System->ModuleManager->Modules['News']->ShowBox().'</td>'. 88 '<td class="SideBox">'.$this->System->ModuleManager->Modules['ShoutBox']->ShowBox().'</td>'. 89 '</tr></table>'; 87 $Output .= '<tr>'. 88 '<td class="news-box">'.$this->System->ModuleManager->Modules['News']->ShowBox().'</td>'. 89 '<td class="SideBox">'.$this->System->ModuleManager->Modules['ShoutBox']->ShowBox().'</td>'. 90 '</tr></table>'. 91 '<table class="Home"><tr>'. 92 '<td class="news-box">'.$this->System->ModuleManager->Modules['Forum']->ShowBox().'</td>'. 93 '<td class="SideBox">'.$this->System->ModuleManager->Modules['Translation']->ShowBox().'</td>'. 94 '</tr></table>'; 90 95 return($Output); 91 }92 93 function ShowLastTranslated()94 {95 $Count = 40;96 $Output = '<strong>'.T('Last translated').':</strong>';97 98 $GroupListQuery = 'SELECT `Group`.* FROM `Group`';99 $Query = '';100 $UnionItems = array();101 $DbResult = $this->Database->query($GroupListQuery);102 if($DbResult->num_rows > 0)103 {104 while($DbRow = $DbResult->fetch_assoc())105 {106 $UnionItems[] = 'SELECT `T`.`ID`, `T`.`Take`, `T`.`User`, `T`.`ModifyTime`, `T`.`Group`, `T`.`GroupName` '.107 'FROM (SELECT `T`.`User`, `T`.`ID`, `T`.`ModifyTime`, '.108 $DbRow['Id'].' AS `Group`, "'.addslashes($DbRow['Name']).'" AS `GroupName`, `T`.`Take` FROM `'.109 $DbRow['TablePrefix'].'` AS `T`'.110 ' WHERE (`T`.`Complete` = 1) AND (`T`.`Language` != '.$this->System->Config['OriginalLanguage'].') ORDER BY `T`.`ModifyTime` DESC LIMIT '.111 $Count.') AS `T`';112 }113 $Query = 'SELECT `TT`.*, `User`.`Name` AS `UserName`, `User`.`Id` AS `UserId` '.114 ' FROM ('.implode(' UNION ', $UnionItems).') AS `TT`'.115 ' JOIN `User` ON `User`.`Id` = `TT`.`User`'.116 ' ORDER BY `ModifyTime` DESC LIMIT '.$Count;117 $DbResult = $this->Database->query($Query);118 $Output .= '<table class="MiniTable"><tr><th>'.T('Date').'</th><th>'.T('Who').'</th><th>'.T('New').'</th><th>'.T('Source').'</th><th>'.T('Group').'</th></tr>';119 while($DbRow = $DbResult->fetch_assoc())120 {121 $Output .= '<tr><td>'.HumanDate($DbRow['ModifyTime']).'</td>'.122 '<td><a href="'.$this->System->Link('/user/?user='.$DbRow['UserId']).'">'.$DbRow['UserName'].'</a></td>'.123 '<td><a href="'.$this->System->Link('/form.php?group='.$DbRow['Group'].'&ID='.$DbRow['ID']).'">'.$DbRow['ID'].'</a></td>'.124 '<td><a href="'.$this->System->Link('/form.php?group='.$DbRow['Group'].'&ID='.$DbRow['Take']).'">'.$DbRow['Take'].'</a></td>'.125 '<td><a href="'.$this->System->Link('/TranslationList.php?group='.$DbRow['Group'].'&action=filter').'">'.T($DbRow['GroupName']).'</a></td></tr>';126 }127 $Output .= '</table>';128 }129 return($Output);130 96 } 131 97 … … 160 126 // Echo text even if it is hidden because of caching by external searching engines 161 127 return('<div style="'.$HideWelcome.'">'. 162 163 164 165 166 167 168 169 170 171 172 128 '<div id="bannertitle">'.$this->System->Config['Web']['Title'].'</div>'. 129 T('Open web system for translation texts from game World of Warcraft (WoW).<br/>'. 130 '<ul>'. 131 '<li>The project is operated as open and professes princips of freedom and openness. That is why texts are free to download.</li>'. 132 '<li>The project serve for team translation. Anybody can contribute by translating texts and made link public e.g. banner at own web.</li>'. 133 '<li>The project is not focused only to one server but allows collectively translation to people from various servers. Translators can translate in teams by name of own server and export texts only from selected translators.</li>'. 134 '<li>Translated texts can be freely downloaded in various forms like XML, SQL, Addon and Lua. So translated texts can be simply imported to own free server or used in other projects.</li>'. 135 '<li>Aim of the project is to translate all game texts. Not just texts of quests.</li>'. 136 '<li>Thanks for sophisticated system of selectable exports you can download any part of translation, even just quests. And so exclude translation of items, creatures and others.</li>'. 137 '<li>Texts can be translated to multiple languages, e.g. Czech and Slovak.</li>'. 138 '</ul>').'</div>'.$Action); 173 139 } 174 140 } -
trunk/Modules/News/News.php
r839 r850 29 29 function ShowBox() 30 30 { 31 $Output = '<strong><a href="'.$this->System->Link('/news/').'">'.T('News').':</a></strong><div class="NewsBox">'; 31 $Count = 6; 32 $Output = '<strong><a href="'.$this->System->Link('/news/').'">'.T('News').':</a></strong>'. 33 '<div class="NewsBox">'; 32 34 $DbResult = $this->Database->query('SELECT `News`.`Time`, `User`.`Name`, `News`.`Text`,`News`.`Title`, `News`.`Id` '. 33 ' FROM `News` JOIN `User` ON `User`.`ID` = `News`.`User` ORDER BY `Time` DESC LIMIT 10');35 ' FROM `News` JOIN `User` ON `User`.`ID` = `News`.`User` ORDER BY `Time` DESC LIMIT '.$Count); 34 36 while($DbRow = $DbResult->fetch_assoc()) 35 37 { -
trunk/Modules/Translation/Translation.php
r846 r850 49 49 'Icon' => '', 50 50 )); 51 /*52 51 if(array_key_exists('Search', $this->System->ModuleManager->Modules)) 53 52 { … … 68 67 } 69 68 } 70 */71 69 } 72 70 … … 96 94 return($Output); 97 95 } 96 97 function ShowBox() 98 { 99 $Count = 40; 100 $Output = '<strong>'.T('Last translated').':</strong>'; 101 102 $GroupListQuery = 'SELECT `Group`.* FROM `Group`'; 103 $Query = ''; 104 $UnionItems = array(); 105 $DbResult = $this->Database->query($GroupListQuery); 106 if($DbResult->num_rows > 0) 107 { 108 while($DbRow = $DbResult->fetch_assoc()) 109 { 110 $UnionItems[] = 'SELECT `T`.`ID`, `T`.`Take`, `T`.`User`, `T`.`ModifyTime`, `T`.`Group`, `T`.`GroupName` '. 111 'FROM (SELECT `T`.`User`, `T`.`ID`, `T`.`ModifyTime`, '. 112 $DbRow['Id'].' AS `Group`, "'.addslashes($DbRow['Name']).'" AS `GroupName`, `T`.`Take` FROM `'. 113 $DbRow['TablePrefix'].'` AS `T`'. 114 ' WHERE (`T`.`Complete` = 1) AND (`T`.`Language` != '.$this->System->Config['OriginalLanguage'].') ORDER BY `T`.`ModifyTime` DESC LIMIT '. 115 $Count.') AS `T`'; 116 } 117 $Query = 'SELECT `TT`.*, `User`.`Name` AS `UserName`, `User`.`Id` AS `UserId` '. 118 ' FROM ('.implode(' UNION ', $UnionItems).') AS `TT`'. 119 ' JOIN `User` ON `User`.`Id` = `TT`.`User`'. 120 ' ORDER BY `ModifyTime` DESC LIMIT '.$Count; 121 $DbResult = $this->Database->query($Query); 122 $Output .= '<table class="MiniTable"><tr><th>'.T('Date').'</th><th>'.T('Who').'</th><th>'.T('New').'</th><th>'.T('Source').'</th><th>'.T('Group').'</th></tr>'; 123 while($DbRow = $DbResult->fetch_assoc()) 124 { 125 $Output .= '<tr><td>'.HumanDate($DbRow['ModifyTime']).'</td>'. 126 '<td><a href="'.$this->System->Link('/user/?user='.$DbRow['UserId']).'">'.$DbRow['UserName'].'</a></td>'. 127 '<td><a href="'.$this->System->Link('/form.php?group='.$DbRow['Group'].'&ID='.$DbRow['ID']).'">'.$DbRow['ID'].'</a></td>'. 128 '<td><a href="'.$this->System->Link('/form.php?group='.$DbRow['Group'].'&ID='.$DbRow['Take']).'">'.$DbRow['Take'].'</a></td>'. 129 '<td><a href="'.$this->System->Link('/TranslationList.php?group='.$DbRow['Group'].'&action=filter').'">'.T($DbRow['GroupName']).'</a></td></tr>'; 130 } 131 $Output .= '</table>'; 132 } 133 return($Output); 134 } 98 135 } -
trunk/Modules/User/Profile.php
r846 r850 122 122 $parser = new HTML_BBCodeParser2(array('filters' => array('Basic','Extended','Images','Links','Lists','Email'))); 123 123 $Count = 20; 124 $Output = '<strong>'.T('La stest forum posts:').'</strong>';124 $Output = '<strong>'.T('Latest forum posts:').'</strong>'; 125 125 126 126 $Output .= '<div class="shoutbox">';
Note:
See TracChangeset
for help on using the changeset viewer.