Creating your own template

GameCP uses the Smartys template engine. It is easy to create and customize GamecP using a little bit of html and css and some time you can easily make a simple change or an advanced re-designed, many users already have.


Watch a video on youtube about this


Contents

Creating a new 'theme'

  • Locate the template folder (includes/template)
  • Copy the 'x' template to a new name - ie: 'mytemplate'
  • Locate the template files you want to change. These files reside in the "default/smarty" folder.
  • Copy the folder(s) and file(s) to your new template, 'mytemplate'

Example

  • Copy 'default/smarty/headers'
  • To 'mytemplate/smarty/headers'

Change GameCP Settings

  • Login to GameCP
  • Goto Settings
  • Change the theme to your new theme
  • Save Settings


Editing templates

Now that you have your own theme you can start editing the template files (.tpl)

GameCP uses the Smarty template system.

You can use commands like {php}{/php} and {literal}{/literal} along with hundreds of other php based commands.

Locate a .tpl file

  • Open it in a text editor like notepad, pico or vi
  • Modify the code you want changed
  • Save changes


See your changes

Any time a .tpl file is changed your templates cache must be erased. We cache templates to help reduce server load.

  • Navigate to your compiled templates:
includes\cache\
  • Erase the folder(s) inside

View your changes from your control panel.





(wiki tools)
Personal tools
Views
Actions




Need help? Chat with us!