Customize/smarty
From GameCPWiki
Contents |
[edit]
Overview
Here is a basic overview on how to edit GameCP's templates.
Youtube video - http://www.youtube.com/watch?v=t2emZ6hdX-g
GameCP uses the Smartys template engine, its very good, solid, robust and has plenty of features to make any programmer happy.
[edit]
Creating a new 'theme'
- Locate the templates folder
- Copy the 'fresh' template to a new name - ie: 'mytemplate'
- Copy any 'smarty' folders+files from the default template to your mytemplate/smarty folder
- if you modify the header.tpl - copy the file to your template, dont modify the `default` folder items
[edit]
Editing templates
Replace 'default' with your templates name otherwise changes will be re-set when you upgrade!
- Locate your GameCP install.
- Locate the templates:
template\default\smarty
- In here you will see many directorys, these describe what the templates will be used for:
troubletickets navigation managemaps managefiles login
I* f you don't see the files you want to edit copy them over! they are in
template\default\smarty
- Copy the full folder then erase any files you don't modify.
- Locate a .tpl file and open in in a text editor
[edit]
See your changes
Navigate to your compiled templates:
includes\smarty\templates_c
Erase the files inside.
View your changes from your control panel.
[edit]
Change GameCP Settings
- Login to GameCP
- Goto Settings
- Change the theme to your new theme
- Save Settings

