Login auf jede Seite?

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Login auf jede Seite?

      Hallo,

      Wie bekomme ich das hin das der Login auf jede Seite ist? ich hab es im Footer Bereich gemacht habe es soweit hinbekomme das nun der Login auf jede Seite ist Jedoch bei Register bzw. im Zusammenhang mit dem Error.page ein Fehler bekomme, wenn ich das mit dem LoginInfo hinzufüge wie ich das bei den anderen Seite gemacht habe geht die Fehler Meldung nicht weg.

      Display Spoiler
      Message: Undefined index: loginInfo
      File: /cache/de^96c07dc1cebd245935020c41fc8af7ac7d04dfe2_1.extends.error.default.tpl.cache.php
      Line: 428
      URL: 127.0.0.1/game/uni1/index.php?page=register
      PHP-Version: 7.0.33
      PHP-API: apache2handler
      2Moons Version: 2.0.git
      Debug Backtrace:
      #0 /cache/de^96c07dc1cebd245935020c41fc8af7ac7d04dfe2_1.extends.error.default.tpl.cache.php(428): errorHandler(8, 'Undefined index...', 'D://xampp7-0-33//...', 428, Array)
      #1 /includes/libs/Smarty/sysplugins/smarty_template_resource_base.php(128): content_5fbd08e0797757_83137466(Object(Smarty_Internal_Template))
      #2 /includes/libs/Smarty/sysplugins/smarty_internal_template.php(341): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template), 'content_5fbd08e...')
      #3 /cache/de^96c07dc1cebd245935020c41fc8af7ac7d04dfe2_1.extends.error.default.tpl.cache.php(510): Smarty_Internal_Template->_subTemplateRender('file:main.foote...', NULL, 'de', 9999, 604800, Array, 0, false, 'f641b8aa7f41089...', 'content_5fbd08e...')
      #4 /includes/libs/Smarty/sysplugins/smarty_template_resource_base.php(128): content_5fbd08e07742a6_11505271(Object(Smarty_Internal_Template))
      #5 /includes/libs/Smarty/sysplugins/smarty_internal_template.php(341): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template), 'content_5fbd08e...')
      #6 /cache/de^96c07dc1cebd245935020c41fc8af7ac7d04dfe2_1.extends.error.default.tpl.cache.php(66): Smarty_Internal_Template->_subTemplateRender('file:layout.lig...', NULL, 'de', 9999, 604800, Array, 2, false, '12a40f831dc3c88...', 'content_5fbd08e...')
      #7 /includes/libs/Smarty/sysplugins/smarty_template_resource_base.php(128): content_5fbd08e07ae3c6_31567536(Object(Smarty_Internal_Template))
      #8 /includes/libs/Smarty/sysplugins/smarty_template_compiled.php(170): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
      #9 /includes/libs/Smarty/sysplugins/smarty_internal_runtime_updatecache.php(89): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
      #10 /includes/libs/Smarty/sysplugins/smarty_template_cached.php(142): Smarty_Internal_Runtime_UpdateCache->updateCache(Object(Smarty_Template_Cached), Object(Smarty_Internal_Template), false)
      #11 /includes/libs/Smarty/sysplugins/smarty_internal_template.php(179): Smarty_Template_Cached->render(Object(Smarty_Internal_Template), false)
      #12 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(199): Smarty_Internal_Template->render(false, 1)
      #13 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(114): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 1)
      #14 /includes/classes/class.template.php(137): Smarty_Internal_TemplateBase->display('extends:layout....')
      #15 /includes/pages/login/AbstractLoginPage.class.php(170): template->display('extends:layout....')
      #16 /includes/pages/login/AbstractLoginPage.class.php(126): AbstractLoginPage->display('error.default.t...')
      #17 /includes/pages/login/ShowRegisterPage.class.php(245): AbstractLoginPage->printMessage('Du hast keinen ...', Array)
      #18 /index.php(57): ShowRegisterPage->send()
      #19 {main}
    • i've added mine from the mainnav. but if you have added anything new like i.e "{$new}" to a page you need to make sure its in the database and you have added it to the pages php file that your accessing it would look some think like this 'new' => $new,
    • Hello,

      i change the ShowErrorPage.class.php

      Before:

      PHP Source Code

      1. class ShowErrorPage extends AbstractGamePage
      2. {
      3. public static $requireModule = 0;
      4. protected $disableEcoSystem = true;
      5. function __construct()
      6. {
      7. parent::__construct();
      8. $this->initTemplate();
      9. }
      10. static function printError($Message, $fullSide = true, $redirect = NULL)
      11. {
      12. $pageObj = new self;
      13. $pageObj->printMessage($Message, $fullSide, $redirect);
      14. }
      15. function show()
      16. {
      17. }
      18. }
      Display All



      After:

      PHP Source Code

      1. class ShowErrorPage extends AbstractGamePage
      2. {
      3. public static $requireModule = 0;
      4. protected $disableEcoSystem = true;
      5. function __construct()
      6. {
      7. parent::__construct();
      8. $this->initTemplate();
      9. }
      10. static function printError($Message, $fullSide = true, $redirect = NULL)
      11. {
      12. $pageObj = new self;
      13. $pageObj->printMessage($Message, $fullSide, $redirect);
      14. }
      15. function show()
      16. {
      17. global $LNG;
      18. $universeSelect = array();
      19. foreach(Universe::availableUniverses() as $uniId)
      20. {
      21. $config = Config::get($uniId);
      22. $universeSelect[$uniId] = $config->uni_name.($config->game_disable == 0 ? $LNG['uni_closed'] : '');
      23. }
      24. $Code = HTTP::_GP('code', 0);
      25. $loginCode = false;
      26. if(isset($LNG['login_error_'.$Code]))
      27. {
      28. $loginCode = $LNG['login_error_'.$Code];
      29. }
      30. $config = Config::get();
      31. $this->assign(array(
      32. 'universeSelect' => $universeSelect,
      33. 'code' => $loginCode,
      34. 'descHeader' => sprintf($LNG['loginWelcome'], $config->game_name),
      35. 'descText' => sprintf($LNG['loginServerDesc'], $config->game_name),
      36. 'gameInformations' => explode("\n", $LNG['gameInformations']),
      37. 'loginInfo' => sprintf($LNG['loginInfo'], '<a href="index.php?page=rules">'.$LNG['menu_rules'].'</a>')
      38. ));
      39. }
      40. }
      Display All

      I still get the error message

      Display Spoiler
      [Message: Undefined index: loginInfo
      File: /cache/de^96c07dc1cebd245935020c41fc8af7ac7d04dfe2_1.extends.error.default.tpl.cache.php
      Line: 428
      URL: 127.0.0.1/game/uni1/index.php?page=register
      PHP-Version: 7.0.33
      PHP-API: apache2handler
      2Moons Version: 2.0.git
      Debug Backtrace:
      #0 /cache/de^96c07dc1cebd245935020c41fc8af7ac7d04dfe2_1.extends.error.default.tpl.cache.php(428): errorHandler(8, 'Undefined index...', 'D://xampp7-0-33//...', 428, Array)
      #1 /includes/libs/Smarty/sysplugins/smarty_template_resource_base.php(128): content_5fbfce3cd7eb92_49683376(Object(Smarty_Internal_Template))
      #2 /includes/libs/Smarty/sysplugins/smarty_internal_template.php(341): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template), 'content_5fbfce3...')
      #3 /cache/de^96c07dc1cebd245935020c41fc8af7ac7d04dfe2_1.extends.error.default.tpl.cache.php(510): Smarty_Internal_Template->_subTemplateRender('file:main.foote...', NULL, 'de', 9999, 604800, Array, 0, false, 'f641b8aa7f41089...', 'content_5fbfce3...')
      #4 /includes/libs/Smarty/sysplugins/smarty_template_resource_base.php(128): content_5fbfce3cd5c2e9_15512960(Object(Smarty_Internal_Template))
      #5 /includes/libs/Smarty/sysplugins/smarty_internal_template.php(341): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template), 'content_5fbfce3...')
      #6 /cache/de^96c07dc1cebd245935020c41fc8af7ac7d04dfe2_1.extends.error.default.tpl.cache.php(66): Smarty_Internal_Template->_subTemplateRender('file:layout.lig...', NULL, 'de', 9999, 604800, Array, 2, false, '12a40f831dc3c88...', 'content_5fbfce3...')
      #7 /includes/libs/Smarty/sysplugins/smarty_template_resource_base.php(128): content_5fbfce3cd96506_64652025(Object(Smarty_Internal_Template))
      #8 /includes/libs/Smarty/sysplugins/smarty_template_compiled.php(170): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
      #9 /includes/libs/Smarty/sysplugins/smarty_internal_runtime_updatecache.php(89): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
      #10 /includes/libs/Smarty/sysplugins/smarty_template_cached.php(142): Smarty_Internal_Runtime_UpdateCache->updateCache(Object(Smarty_Template_Cached), Object(Smarty_Internal_Template), false)
      #11 /includes/libs/Smarty/sysplugins/smarty_internal_template.php(179): Smarty_Template_Cached->render(Object(Smarty_Internal_Template), false)
      #12 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(199): Smarty_Internal_Template->render(false, 1)
      #13 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(114): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 1)
      #14 /includes/classes/class.template.php(137): Smarty_Internal_TemplateBase->display('extends:layout....')
      #15 /includes/pages/login/AbstractLoginPage.class.php(170): template->display('extends:layout....')
      #16 /includes/pages/login/AbstractLoginPage.class.php(126): AbstractLoginPage->display('error.default.t...')
      #17 /includes/pages/login/ShowRegisterPage.class.php(245): AbstractLoginPage->printMessage('Du hast keinen ...', Array)
      #18 /index.php(57): ShowRegisterPage->send()
      #19 {main}/spoiler]

      The post was edited 1 time, last by DerOdin ().

    • Done, problem still remains.

      If I delete the login part of the file it goes.

      can I make an if the option in the file that it should not load the login part? On all sides, it just doesn't work on the error page