Take This:
And Put it into a file called inc\templatedefn.php
So that way instead of the above in EVERY SINGLE FILE... we just have:
at the end of the file
This is mainly directed towards HoF and the other Dev Staff
This also makes it alot easier for people who want to add elements to their pages
PHP:
// **********************************************************************
// Begin Template Definition
// **********************************************************************
//Define our current theme
$file = $themeurl;
// Do the template changes and echo the ready template
$template = file_get_contents($file);
$template = replace(':ARTICLETITLE:',$article_title,$template);
$template = replace(':ARTICLECONTENT:',$article_content,$template);
$template = replace(':ARTICLEDATE:',$article_date,$template);
$template = replace(':BROWSERTITLE:',$browsertitle,$template);
$template = replace(':SITENAME:',$sitename,$template);
//Define our links
if($cancp == "yes"){
//Admins see a custom set of links here...
$links = getadmlinks();
}
else{
$links = getlinks();
}
$template = replace(':LINKSBAR:',$links,$template);
//Get the content for the side bar...
$sidebar = getsidebar();
$template = replace(':SIDEFEED:',$sidebar,$template);
//Get the ad content...
$template = replace(':ADS:',$ads,$template);
//Get the slogan info
$template = replace(':SLOGAN:',$slogan,$template);
echo $template;
// **********************************************************************
// End Template Definition
// **********************************************************************
So that way instead of the above in EVERY SINGLE FILE... we just have:
PHP:
include('inc\tempdefn.php');
This is mainly directed towards HoF and the other Dev Staff
This also makes it alot easier for people who want to add elements to their pages