
Originally Posted by
holthelper
good for you. still doesnt justify using a free template as a base template for your CMS
LOL you got to be kidding me. you dont need to define <li> with another file. its html tag that it already knows... *cough*means list*cough*
could just use a include or require. you dont really need a fuction to do that. its just added work to make a fuction to do the same work as other forms. i can see it if you need to use it to do many things than ya but for thoughs simple things idk why you whould do that.
not hard... $SITE_TITLE = "blah blah" or $SITE_TITLE = $blah_blah
you can make veribles in the config file and that would make it dynamic...
as for the layout - did you make the images? no - did you add a "flow" to the images? no - did you add features to the layout? yes - you just added things to it to make it somewhat "yours"
all i say is if you want to be "cool" (which im saying im not for i know im not cool) make your own images/flow and add your own features. basicaly your doing half the work and talking credit for the whole thing
My base template is not a free template, I made it on my own. Only TechJunkie and BluePigment are taken. <-- Read that
I did not mean define the "<li>" LITERALLY. It loads it from the navigation class. Check out the navigation class.
Code:
function show() {
$this->query = $this->sql->query("SELECT * FROM `cms_navigation` ORDER BY `order` ASC");
while ($this->data = $this->sql->fetch_array($this->query)) {
$this->getInfo();
if (strstr($_SERVER['REQUEST_URI'], $this->PHP)) {
if ($this->ACCESS == 0 || $this->ACCESS == 1 && LOGGEDIN || $this->ACCESS == 2 && LOGGEDIN_TYPE == 'ADMIN') {
if ('/' . SITE_DIR . $this->URL == $_SERVER['REQUEST_URI']) {
if (file_exists('templates/' . TEMPLATE_DIR . '/navigation_selected.php')) {
require('templates/' . TEMPLATE_DIR . '/navigation_selected.php');
} else {
require('templates/default/navigation_selected.php');
}
} else {
if (file_exists('templates/' . TEMPLATE_DIR . '/navigation.php')) {
require('templates/' . TEMPLATE_DIR . '/navigation.php');
} else {
require('templates/default/navigation.php');
}
}
}
}
}
}
What this does is includes the custom navigation file and if it doesn't exist, loads default. You need to create a new file that defines the new template to use instead of the default one.
I dynamically define site constants through the mysql table `cms_settings`. Btw, it's define (const name, const value, [bool case_sens.]) not $const = value.
The classes shorten down the code greatly. Example:
I want to get the user's information, i can do this instead:
$user->get('id', 23);
Instead of:
$query = mysql_query("SELECT * FROM `accounts` WHERE `id` = '23'");
$data = mysql_fetch_array($query);
$user->NAME // Returns the name
$data['name'] // Returns the name
It's much easier to use the user class than repeating those lines above every single time you need to use them.
If you're talking about my default template then:
as for the layout - did you make the images? Yes
did you add a "flow" to the images? What does this have to do about it?
did you add features to the layout? yes
I did not take credit for the templates, the 2 i took still has credits in them. I don't take credit for what's not mine.
Go actually look at the files and figure out what I mean about the templating system and classes before you go and post about it.
& Thanks for all the comments :P