PHP Code:
themes (folder)
jamesbond (folder)
theme.css (file)
header_layout.php (file)
footer_layout.php (file)
images (folder)
banner.jpg (file)
background.png (file)
iconthing.gif (file)
- index.php
PHP Code:
<?php
// get the theme in use
$selected_theme = "jamesbond";
if(is_dir("themes/".$selected_theme."") == true)
{
// if the folders there go ahead and load (no other checks on files)
include("themes/".$selected_theme."/header.php");
echo "main page loads here yay";
include("themes/".$selected_theme."/footer.php");
}
else
{
// maybe put an error message here.
exit;
}
?>
this will give you the basic frame work for a theme's enabled site (thou the user cant change theme ^_^)
if you update header and footer to use $selected_theme you would not need to put a copy in each folder.
Bookmarks