Add new option in left menu

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

    • Add new option in left menu

      i wanna ask how i add let say new text option of page below simular
      to create new page where i should edit files :)

      Hall of Fame
    • New page should be created as php file on includes/pages/game

      FIlename: Show(YOURPAGENAME)Page.class.php
      Content to run ingame

      Source Code

      1. class Show(YOURPAGENAME)Page extends AbstractGamePage
      2. {
      3. public static $requireModule = 0;
      4. function __construct()
      5. {
      6. parent::__construct();
      7. /* If you want to remove headers etc, like phalanx, news page... */
      8. // $this->setWindow('popup');
      9. $this->initTemplate();
      10. }
      11. function show()
      12. {
      13. // Which vars should be run, $reslist arrays for vars, $resource for specific elements, $PLANET for your planets...
      14. global $LNG, $USER;
      15. $this->display('(TEMPLATENAME).tpl');
      16. }
      17. }
      Display All

      Then you have to create a template file under styles/templates/game. it must match with $this->display file name

      Source Code

      1. {block name="title" prepend}My Page{/block}
      2. {block name="content"}
      3. My HTML/PHP stuff
      4. {/block}
      To add your page ingame button you go to main.navigation.tpl and simply add <li><a href="game.php?page=(YOURPAGENAME)">My Page</a></li> and you're done
      Looking for good VPS to host your game? Use DigitalOcean and get 100$ bonus credit for 2 months!

      Check my mods here -

      I can build any mod. Need my service? Contact me via PM
    • when you create the php that gos in the icludes/game folder and the tpl file the styles/templates/game in the navigation.tpl or were ever you want it you place the hyperlink to the location
    • you mean link to text or sommething else can you show me example where i should put it i wanna write some text there but nothing shows up
    • i placed in left menu dark matter shop now when i click on it it says this
      This page does not exist
      for now i wanna write text inside dark shop page to remove this This page does not exist
      • a1.png

        1.45 MB, 1,366×609, viewed 63 times
      • a2.png

        1.27 MB, 1,366×602, viewed 54 times