The whole skinning process for a Cheats Database Client website is fairly simple, and usually you will just need to modify the core.html file. However there may be some circumstances where you may want to modify the core scripts that little bit further. This article will describe what each template file is for and what placeholders they contain, it is then down to you to experiment and find the correct combination when editing these files.
Global placeholders are placeholders that you can place in any of your template files and they will automatically be replaced with some content.
See the table below for a detailed explanation of these global placeholders.
|
Placeholder |
Template |
What does it do? |
Special |
|
[[PLATFORMS]] |
Misc/platforms.html |
This prints a list of all the platforms you have selected for this website |
This is only available when you have more than one platform selected for your website |
|
[[ALPHABET]] |
Platform/letter.html |
This prints out the alphabet when you have a single platform selected for your website |
This is only available when you have one platform selected for your website |
|
[[POPULARCHEATS]] |
Misc/popular_cheats.html |
This outputs a list of the popular cheats |
|
|
[[LATESTCHEATS]] |
Misc/latest_cheats.html |
This outputs a list of the latest cheats |
|
|
[[TEMPLATEURL]] |
n/a |
Gives you the URL to the template directory, this is created so you can dynamically load images without having to explicitly define a path, allowing the template name to be changed. |
|
/game/cheat_main.html
This is the container for cheats for a game
|
Placeholder |
What does it do? |
|
[[TITLE]] |
Ouputs the cheat title |
|
[[DESCRIPTION]] |
Outputs the cheat description (if available) |
|
[[CHEAT_PARTS]] |
Outputs the cheat parts from /game/cheat_part_container.html (if available) |
/game/cheat_part_container.html
This is the container for cheat parts for the cheat container
|
Placeholder |
What does it do? |
|
[[PARTS]] |
Outputs the cheat parts built using the cheat_part.html |
/game/cheat_part.html
Cheat parts (usually) have two parts, usually like “code” and “effect” so these need to be side by side in a table or something similar.
|
Placeholder |
What does it do? |
|
[[PART1]] |
Outputs the part1 from a cheat part |
|
[[PART2]] |
Outputs the part2 from a cheat part |
/game/game_container.html
This is the container that is loaded when a game is loaded
|
Placeholder |
What does it do? |
|
[[NAME]] |
Outputs the game name |
|
[[HITS]] |
Outputs the number of hits a game has had |
|
[[PLATFORM_URL]] |
Outputs the platform URL |
|
[[PLATFORM]] |
Outputs the platform |
|
[[CHEATS]] |
Ouputs the output from /game/cheat_main.html |
/misc/latest_cheats.html
This is looped through to provide the global “latest cheats” output
|
Placeholder |
What does it do? |
|
[[URL]] |
Outputs the game URL |
|
[[NAME]] |
Outputs the game name |
|
[[TIMESTAMP]] |
Outputs the last update time |
/game/platforms.html
This is looped through to provide the global “platforms” output
|
Placeholder |
What does it do? |
|
[[URL]] |
Outputs the platform URL |
|
[[NAME]] |
Outputs the platform name |
/misc/popular_cheats.html
This is looped through to provide the global “popular cheats” output
|
Placeholder |
What does it do? |
|
[[URL]] |
Outputs the game URL |
|
[[NAME]] |
Outputs the game name |
|
[[HITS]] |
Outputs the total hits a game has had |
/platform/letter.html
This is looped through to provide the letters for a platform
|
Placeholder |
What does it do? |
|
[[URL]] |
Outputs the URL for viewing a letter |
|
[[LETTER]] |
Outputs the letter |
/misc/platform_container.html
This holds the platform title, alphabet list and the relevant games for a given platform
|
Placeholder |
What does it do? |
|
[[TITLE]] |
Outputs the title e.g Letter A for Platform |
|
[[ALPHABET]] |
Outputs the alphabet for filtering |
|
[[GAMES]] |
Outputs either the top games (no letter selected) or the games matching whichever letter you selected |
/platform/platform_game.html
When a letter is selected this is looped through to provide output for the games
|
Placeholder |
What does it do? |
|
[[URL]] |
Outputs the URL for viewing a game |
|
[[NAME]] |
Outputs the game name |
/platform/platform_top_game.html
This is looped through when no letter is selected for a platform and shows the top games for a given platform
|
Placeholder |
What does it do? |
|
[[URL]] |
Outputs the URL for viewing a game |
|
[[NAME]] |
Outputs the game name |
|
[[HITS]] |
Outputs the total hits for the game |
/search/container.html
This is the container for the search results and search box
|
Placeholder |
What does it do? |
|
[[SEARCH_BOX]] |
Outputs the output from search/search-box.html |
|
[[RESULTS]] |
Outputs the results from a search |
/search/no-results.html
No placeholders for this template, this simple outputs that no results were found to match your search
/search/result.html
This is looped through to generate search results for a search when results are available
|
Placeholder |
What does it do? |
|
[[URL]] |
Outputs the URL for viewing a game |
|
[[NAME]] |
Outputs the game name |
|
[[PLATFORM]] |
Outputs the game platform |
/search/search-box.html
No placeholders for this template, this simply outputs the search box used for searching.
