[TUTO] Empty structure of 2 files required for mod creation

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

    • [TUTO] Empty structure of 2 files required for mod creation

      Hello everyone, here is a tutorial that lets you know the creation of primordial file is mandatory to create mod is new page on 2moons

      To start you must create the php file in includes / pages / game like this (v1.8 to 2.0)
      Name : ShowNamePage.class.php

      PHP Source Code

      1. <?php
      2. class ShowNamePage extends AbstractGamePage
      3. {
      4. public static $requireModule = 0;
      5. function __construct()
      6. {
      7. parent::__construct();
      8. }
      9. function show()
      10. {
      11. global $USER, $LNG, $PLANET;
      12. $db = Database::get();
      13. $config = Config::get();
      14. $this->assign(array(
      15. ));
      16. $this->display('page.name.default.tpl');
      17. }
      18. }
      Display All
      Once the php page create we have to do the file to make the view to the user


      link : styles/templates/game/
      name : page.name.default.tpl

      Smarty-Template

      1. {block name="title" prepend}{$LNG.lm_name}{/block}
      2. {block name="content"}
      3. content page
      4. {/block}
      Here you know all about the required file to create new page is start creating mod