bsimser / ezrpg

A modular text based web game engine written in PHP
MIT License
1 stars 1 forks source link

Improved template system #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Request for different coloured default themes.

Same design etc, just different css files.

Move css files to templates folder.
Separate all template files into their own folder to support multiple themes.
Allow player/admin to select different templates.

If a tpl file cannot be found, look for it in the default template folder.

Original issue reported on code.google.com by zeg...@gmail.com on 6 Jul 2009 at 7:03

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Add wrapper to the smarty class.

Replace display function to check if template file exists in current theme 
folder, or 
else display from the default theme folder.

Original comment by zeg...@gmail.com on 7 Jul 2009 at 6:23

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I started work on a template system (inspired by Wordpress).  This remodeling 
should 
help and create a new system of shared style templates, within the ezRPG 
community.

Phase I: Personalized Templates (finished)

I created a separate folder for personalized templates.  The personalized 
templates 
folder can contain more than one type of template, giving the owner increased 
flexibility in styling and calling templates.  The template can be chosen from 
the 
xPanel backend, but can be easily adjusted to call from a php file for 
day/night 
template or from a player style switcher, to be saved to the players table.  
Game 
owners can easily share templates on your site, because it will be encapsulated 
in 
its own folder, without having to change existing templates.

Phase II Compartmentalized Includes (working)

I've encapsulating sidebar items (menu links, player info, health bars, 
ads?,...) in 
seperate php files, so they can be called from a simple include statement/s  
(which 
I will make dynamic, based upon backend settings).  I've created a includes 
folder 
(I might call it addins, easing the sharing of developing "addins" on your 
site, for 
the same reason as the templates above).  I've also created an xPanel 
navigation 
page that allows you to set up your navigation menu from a GUI on the backend.  
This 
GUI saves to headers and links tables.  This will allow you to place the links 
menu 
anywhere you want.  I've build a createlinks php file that generates a menu 
from the 
headers and links tables.  It will also allow for the menu to be horizontal or 
vertical, based on user settings, which will be covered in the next phase.

Phase III Owner Layout Choosing (in development)
The owner can choose one of 30 site layout types, based off of Matthew Taylor's 
layouts (http://matthewjamestaylor.com/blog/perfect-full-page.htm) from the 
xPanel 
backend.  The main stylesheet will only set the main divs, based off a database 
setting.  The main stylesheet will then call for the personalized template, 
again 
based off a database setting in Phase I.  There will be ten main layout types.  
They 
can choose fluid width, 1024x960 or 800x600, of those ten types, giving you 30 
options.  
I've also adjusted the div calls as such:

header.php/private_header.php
  -Header 
  -Horizontal Menu (if layout.css is chosen, without Hor Menu, will be dead div. No 
harm, no foul.) 
Content pages
footer.php/private_footer.php
  -Sidebar1 (if layout.css is chosen, without Sidebar 1, will be dead div. No harm, 
no foul) 
  -Sidebar2 (if layout.css is chosen, without Sidebar 2, will be dead div. No harm, 
no foul) 
  -Footer

The main stylesheet will call as such
   -Main Layout (include statement from database table `settings`, written by 
backend main layout setting.)
   -Owner Template (include statement from database table `settings`, written by the 
backend template setting and mentioned in Phase I.)

Let me know if I'm wasting my time, with this, but I see you getting a bigger 
base 
of programmers and users, if you ease the styling/sharing process.  

I can be contacted at optimus_woo@bellsouth.net.  I'll send you some 
screenshots of 
what I have so far, if you want them.

Original comment by bogatab...@gmail.com on 21 Oct 2009 at 3:49

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Accomplished all the above with your version 0.2.  I'll throw the download link 
on 
your site, when I've developed some decent addins and themes.

Original comment by bogatab...@gmail.com on 30 Oct 2009 at 4:41

GoogleCodeExporter commented 9 years ago
Will come in a future release but is low priority.

Original comment by zeg...@gmail.com on 17 Mar 2010 at 1:09