Changeset 850 for trunk/Modules/FrontPage/FrontPage.php
- Timestamp:
- Jan 17, 2016, 8:15:03 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note:
See TracChangeset
for help on using the changeset viewer.