Changeset 636


Ignore:
Timestamp:
Dec 11, 2013, 12:15:15 PM (10 years ago)
Author:
chronos
Message:
  • Added: Pages should have set title which is used in HTML header to show title in web browser title bar.
Location:
trunk
Files:
29 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/ClientVersion/ClientVersion.php

    r622 r636  
    3131        function Show()
    3232        {               
     33                $this->Title = T('Game version');
    3334    $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM `ClientVersion`');
    3435    $DbRow = $DbResult->fetch_row();
  • trunk/Modules/Dictionary/Dictionary.php

    r626 r636  
    311311        global $LanguageList;
    312312       
     313        $this->Title = T('Dictionary');
     314       
    313315$LanguageList = GetLanguageList();
    314316
  • trunk/Modules/Export/Page.php

    r609 r636  
    728728        function Show()
    729729  {
     730        $this->Title = T('Export');
    730731    if(array_key_exists('Action', $_GET))
    731732    {
  • trunk/Modules/FrontPage/FrontPage.php

    r622 r636  
    7272        global $Message, $MessageType;
    7373       
     74        $this->Title = T('Home');
    7475        $this->System->ModuleManager->Modules['FrontPage']->HandleLoginForm();
    7576        $Output = '';
  • trunk/Modules/Import/Manage.php

    r609 r636  
    9595        function Show()
    9696        {
     97                $this->Title = T('Import');
    9798    $Output = '';
    9899    if($this->System->User->Licence(LICENCE_ADMIN))
  • trunk/Modules/Log/Log.php

    r625 r636  
    126126    global $TranslationTree;
    127127   
     128    $this->Title = T('System log');
    128129    $Output = '';
    129130    if(array_key_exists('type', $_GET)) $_SESSION['type'] = $_GET['type'] * 1;
  • trunk/Modules/News/News.php

    r622 r636  
    6565        function Show()
    6666        {
     67                $this->Title = T('News');
    6768                if(array_key_exists('a', $_POST)) $Action = $_POST['a'];
    6869                  else if(array_key_exists('a', $_GET)) $Action = $_GET['a'];
  • trunk/Modules/Referrer/Referrer.php

    r622 r636  
    196196  function Show()
    197197  {
     198        $this->Title = T('Banners');
    198199    if(array_key_exists('action', $_GET))
    199200    {
  • trunk/Modules/Search/Search.php

    r626 r636  
    3939        function Show()
    4040        {
     41                $this->Title = T('Search');
    4142                if(array_key_exists('text', $_GET)) $Search = $_GET['text'];
    4243                else if(array_key_exists('text', $_POST)) $Search = $_POST['text'];
  • trunk/Modules/Server/Server.php

    r609 r636  
    3232        function Show()
    3333        {
     34                $this->Title = T('Servers');
    3435    $Output = '<p>V tomto seznamu jsou uvedeny jen servery, které skutečně hráčům nabízejí počeštěnou hru v praxi. Rozlišuje se, zda češtinu nabízí na straně klienta, serveru nebo obojí. Pojem "český server" zde tedy neznamená, že jej provozují češi, ale že lze hrát česky.</p>';
    3536    $Output .= '<h3>Seznam českých serverů</h3>';
  • trunk/Modules/ShoutBox/ShoutBox.php

    r626 r636  
    4444        function Show()
    4545        {
     46                $this->Title = T('Shoutbox');
    4647                if(array_key_exists('a', $_POST)) $Action = $_POST['a'];
    4748                  else if(array_key_exists('a', $_GET)) $Action = $_GET['a'];
  • trunk/Modules/Team/Team.php

    r626 r636  
    3636        function ShowTeamList()
    3737        {
     38                $this->Title = T('Teams');
    3839                $Output = '<h3>'.T('List of translating teams').'</h3>';
    3940                $Output .= 'Týmy jsou seskupení překladatelů, kteří se hlásí k něčemu společnému jako např. WoW serveru, způsobu překladu, ke stejnému hernímu spolku, aj. Být členem týmu samo o sobě nemá žádný zásadní důsledek a spíše to může pomoci se lépe orientovat mezi překladateli někomu, kdo sestavuje export.<br/>';
  • trunk/Modules/Translation/Form.php

    r633 r636  
    5353        function Show()
    5454        {
     55                $this->Title = T('Translation');
    5556                $Action = '';
    5657    if(array_key_exists('action', $_GET)) $Action = $_GET['action'];
  • trunk/Modules/Translation/Progress.php

    r584 r636  
    6666  function Show()
    6767  {
     68        $this->Title = T('Progress');
    6869$LanguageList = GetLanguageList();
    6970
  • trunk/Modules/Translation/TranslationList.php

    r609 r636  
    245245                global $TranslationTree;
    246246       
    247                 $Output = $Filter['Output'];
     247          $Output = $Filter['Output'];
    248248       
    249249                $Output .= '<table class="BaseTable"><tr><th>Skupina</th><th>Počet</th></tr>';
     
    434434        function Show()
    435435        {
     436                $this->Title = T('Translation groups');
    436437                $Action = GetParameter('action', '');
    437438                if($Action == 'filter') $Output = $this->ShowMenu();
  • trunk/Modules/User/Options.php

    r578 r636  
    7474                                if($NewPass == $NewPass2)
    7575                                {
    76                                         $DbResult = $System->Database->query('SELECT `Pass`, '.$this->System->User->CryptPasswordSQL('"'.$OldPass.'"', '`Salt`').' AS `Hash` FROM `User` WHERE `ID`= '.$this->System->User->Id);
     76                                        $DbResult = $this->System->Database->query('SELECT `Pass`, '.$this->System->User->CryptPasswordSQL('"'.$OldPass.'"', '`Salt`').' AS `Hash` FROM `User` WHERE `ID`= '.$this->System->User->Id);
    7777                                        $DbRow = $DbResult->fetch_assoc();
    7878                                        if($DbRow['Hash'] == $DbRow['Pass'])
     
    9797        function Show()
    9898        {
     99                $this->Title = T('User settings');
    99100                $Output = '';
    100101                if($this->System->User->Licence(LICENCE_USER))
  • trunk/Modules/User/Profile.php

    r609 r636  
    172172        function Show()
    173173        {
     174                $this->Title = T('User profile');
    174175                $Output = $this->SendMail();
    175176                if(array_key_exists('user', $_GET))
  • trunk/Modules/User/Registration.php

    r618 r636  
    7676                global $Config;
    7777       
     78          $this->Title = T('User registration');
    7879                $Output = '';
    7980                if(array_key_exists('user', $_POST))
  • trunk/Modules/User/UserList.php

    r626 r636  
    77        function Show()
    88        {
     9                $this->Title = T('Translators');
    910                ImgLevelUpdate();
    1011       
  • trunk/admin/index.php

    r632 r636  
    55include_once('../img_level.php');
    66
     7class PageAdmin extends Page
     8{
    79function ShowMenu()
    810{
     
    5759  global $System;
    5860 
     61  $this->Title = T('Testing');
    5962  $Output = '<a href="'.$System->Link('/admin/?action=phpinfo').'">PHP info</a><br/>'.
    6063  '<small>PHP informace</small><br/><br/>'.
     
    6770  return($Output);
    6871}
     72
    6973function Uncomplete()
    7074{
     
    171175}
    172176
    173 $Output = '';
    174 if($User->Licence(LICENCE_ADMIN))
    175 {
    176   if(array_key_exists('action', $_GET))
     177  function Show()
    177178  {
    178     if($_GET['action'] == 'img_level') $Output .= ImgLevelShow();
    179     else if($_GET['action'] == 'error') $Output .= TestError(12, 'test');
    180     else if($_GET['action'] == 'exception') $Output .= TestException(12, 'test');
    181     else if($_GET['action'] == 'sqlerror') $Output .= TestSQLError('SELECT dads FROM sdas');
    182     else if($_GET['action'] == 'testing') $Output .= Testing();
    183     else if($_GET['action'] == 'phpinfo') $Output .= ShowPHPInfo();
    184     else if($_GET['action'] == 'locale') $Output .= ShowLocale();
    185     else if($_GET['action'] == 'uncomplete') $Output .= Uncomplete();
    186     else if($_GET['action'] == 'dbcstructure') $Output .= DbcStructure();
    187     else $Output .= ShowMenu();
    188   } else $Output .= ShowMenu(); 
    189 } else $Output .= ShowMessage(T('Access denied'), MESSAGE_CRITICAL);
    190      
    191 ShowPage($Output);
     179          $this->Title = T('Administration');
     180    $Output = '';
     181    if($this->System->User->Licence(LICENCE_ADMIN))
     182    {
     183      if(array_key_exists('action', $_GET))
     184      {
     185        if($_GET['action'] == 'img_level') $Output .= $this->ImgLevelShow();
     186        else if($_GET['action'] == 'error') $Output .= $this->TestError(12, 'test');
     187        else if($_GET['action'] == 'exception') $Output .= $this->TestException(12, 'test');
     188        else if($_GET['action'] == 'sqlerror') $Output .= $this->TestSQLError('SELECT dads FROM sdas');
     189        else if($_GET['action'] == 'testing') $Output .= $this->Testing();
     190        else if($_GET['action'] == 'phpinfo') $Output .= $this->ShowPHPInfo();
     191        else if($_GET['action'] == 'locale') $Output .= $this->ShowLocale();
     192        else if($_GET['action'] == 'uncomplete') $Output .= $this->Uncomplete();
     193        else if($_GET['action'] == 'dbcstructure') $Output .= $this->DbcStructure();
     194        else $Output .= $this->ShowMenu();
     195      } else $Output .= $this->ShowMenu(); 
     196    } else $Output .= ShowMessage(T('Access denied'), MESSAGE_CRITICAL);
     197    return($Output);
     198  }
     199}     
     200$Page = new PageAdmin($System);
     201ShowPageClass($Page);
  • trunk/download.php

    r632 r636  
    44include('includes/global.php');
    55
     6
     7class PageDownload extends Page
     8{
     9        function Show()
     10        {
     11    $this->Title = T('Download');               
    612$Output = '<h3>Doplňky pro klienta</h3>'.
    713  '<strong><a href="download/WowLua/wowpatcher.exe">wowpatcher</a></strong> - Nástroj příkazové řádky, který hledá a upravuje dle binárního vzoru obsah Wow.exe pro podporu překládání souborů GlueStrings.lua a GlobalStrings.lua. '.
     
    4147  '<a href="download/DBCtoCSV.exe">DBCtoCSV</a> - nástroj pro převod souborů DBC na CSV<br />'.
    4248  '<a href="download/ClientDBExtractor.exe">ClientDBExtractor.exe</a> - nástroj pro exportování dbc z klienta (funguje i na verze větší než 3.3.5a)<br />';
    43 
    44 ShowPage($Output);     
     49  return($Output);
     50        }
     51}
     52 
     53$Page = new PageDownload($System);
     54ShowPageClass($Page);     
  • trunk/includes/Page.php

    r586 r636  
    66  var $Database;
    77  var $RawPage;
     8  var $Title;
    89 
    910  function __construct($System)
  • trunk/includes/Version.php

    r633 r636  
    66// and system will need database update.
    77
    8 $Revision = 633; // Subversion revision
     8$Revision = 636; // Subversion revision
    99$DatabaseRevision = 610; // Database structure revision
    10 $ReleaseTime = '2013-12-08';
     10$ReleaseTime = '2013-12-11';
  • trunk/includes/global.php

    r632 r636  
    5151}
    5252
     53function ShowPageClass($Page)
     54{
     55        global $TempPageContent, $System;
     56
     57  $System->Pages['temporary-page'] = get_class($Page);
     58        $_SERVER['REDIRECT_QUERY_STRING'] = 'temporary-page';
     59  $System->PathItems = ProcessURL();
     60        $System->ShowPage();
     61}
     62
    5363function ShowPage($Content)
    5464{
    5565        global $TempPageContent, $System;
    5666
    57         $TempPage = new TempPage($System);
    58         $System->Pages['temporary-page'] = 'TempPage';
     67  $TempPage = new TempPage($System);
     68  $System->Pages['temporary-page'] = 'TempPage';
    5969        $_SERVER['REDIRECT_QUERY_STRING'] = 'temporary-page';
    6070        $TempPageContent = $Content;
    61         $System->PathItems = ProcessURL();
     71  $System->PathItems = ProcessURL();
    6272        $System->ShowPage();
    6373}
  • trunk/includes/system.php

    r630 r636  
    231231  function ShowPage()
    232232  {
     233        $Output = '';
    233234    /* @var $Page Page */
    234235    $ClassName = $this->SearchPage($this->PathItems, $this->Pages);
     
    237238      $Page = new $ClassName($this);
    238239      $Output = $Page->GetOutput();
    239       if($Page->RawPage == false) $Output = $this->BaseView->ShowPage($Output);
    240       echo($Output);
    241     } else echo($this->BaseView->ShowPage($this->PageNotFound()));
     240      $this->BaseView->Title = $Page->Title;
     241      if($Page->RawPage == false) $Output = $this->BaseView->ShowPage($Output);     
     242    } else {
     243        $Output = $this->PageNotFound();
     244        $this->BaseView->Title = T('Page not found');
     245        $Output = $this->BaseView->ShowPage($Output);
     246    }
     247    echo($Output);
    242248  }
    243249}
     
    245251class BaseView extends View
    246252{
     253        var $Title;     
     254       
    247255        function ShowTopBar()
    248256        {
     
    387395                '<link rel="shortcut icon" href="'.$this->System->Link('/images/favicon.ico').'" />';
    388396                $Output .= $this->System->ModuleManager->Modules['News']->ShowRSSHeader();
    389                 $Output .= '<title>'.$this->System->Config['Web']['Title'].'</title>'.
     397                $Title = $this->System->Config['Web']['Title'];
     398                if($this->Title != '') $Title = $this->Title.' - '.$Title;
     399                $Output .= '<title>'.$Title.'</title>'.
    390400                '</head><body>';
    391401       
  • trunk/info.php

    r577 r636  
    44include('includes/global.php');
    55
    6 $Output = '<h2>Informace a pokyny pro překladatele:</h2>'.
     6class PageInfo extends Page
     7{
     8  function Show()
     9  {
     10        $this->Title = T('Information for translators');
     11        $Output = '<h2>Informace a pokyny pro překladatele:</h2>'.
    712  '<ul>'.
    813  '<li>Texty překládejte <strong>včetně diakritiky</strong> (háčků a čárek). Ta bude v případě potřeby odstraněna při exportování. </li>'.
     
    3338  '</ul><br />'.
    3439  '<br />';
    35 
    36 ShowPage($Output);     
     40  return($Output);
     41  }
     42
     43$Page = new PageInfo($System);
     44ShowPageClass($Page);     
  • trunk/locale/cs.php

    r626 r636  
    9494      'AoWoW' => 'AoWoW',
    9595      'Translation group "%s"' => 'Překladová skupina "%s"',
     96      'Export' => 'Export',
     97      'Import' => 'Import',
     98      'System log' => 'Systémový záznam',
     99      'Banners' => 'Bannery',
     100      'Translation' => 'Překlad',
     101      'Progress' => 'Průběh',
     102      'Translation groups' => 'Překladové skupiny',
     103      'User settings' => 'Nastavení uživatele',
     104      'User profile' => 'Profil uživatele',
     105      'User registration' => 'Registrace uživatele',
     106      'Testing' => 'Testování',
     107      'Download' => 'Stahování',
     108      'Page not found' => 'Stránka nenalezena',
     109      'Information for translators' => 'Informace pro překladatele',
    96110    );
    97111  }
  • trunk/locale/en.php

    r626 r636  
    9494      'AoWoW' => '',
    9595      'Translation group "%s"' => '',
     96      'Export' => '',
     97      'Import' => '',
     98      'System log' => '',
     99      'Banners' => '',
     100      'Translation' => '',
     101      'Progress' => '',
     102      'Translation groups' => '',
     103      'User settings' => '',
     104      'User profile' => '',
     105      'User registration' => '',
     106      'Testing' => '',
     107      'Download' => '',
     108      'Page not found' => '',
     109      'Information for translators' => '',
    96110    );
    97111  }
  • trunk/promotion.php

    r577 r636  
    44include('includes/global.php');
    55
    6 $Output = '<br>Zde naleznete prezentaci překladu ve hře. Můžete se podívat jak může vypadat i vaše hra. Pokud se vám to líbí, zkuste si češtinu nainstalovat i do svého klienta a lépe také i pomoci projektu, sami to nepřeložíme.<br/><br/>'.
     6class PagePromotion extends Page
     7{
     8        function Show()
     9        {
     10                $this->Title = T('Promotion');
     11    $Output = '<br>Zde naleznete prezentaci překladu ve hře. Můžete se podívat jak může vypadat i vaše hra. Pokud se vám to líbí, zkuste si češtinu nainstalovat i do svého klienta a lépe také i pomoci projektu, sami to nepřeložíme.<br/><br/>'.
    712
    813'<h3>Upravený klient</h3><br/>'.
     
    1520'<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/6EhBFv59syk&hl=en_GB&fs=1&hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/6EhBFv59syk&hl=en_GB&fs=1&hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><br/>'.
    1621'<img src="images/promotion.bmp" width="800" alt="addon-obr">';
     22    return($Output);
     23        }
     24}
    1725 
    18 ShowPage($Output);     
     26$Page = new PagePromotion($System);
     27ShowPageClass($Page);     
Note: See TracChangeset for help on using the changeset viewer.