Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wrong inclusion of Template functions.php
#1
Hi,

if I interpreted the intention of the last lines in /root/index.php right you want to offer a possibility for Theme Builders to include their "own" functions in order to enhance the template - that is very cool !!

In order to profit from the functions.php within the template directory, this include has to be called before the template files...

My suggestion for index.php is:

Code:
// include the functions.php page if it exists within the theme
    if ( file_exists("theme/".$TEMPLATE."/functions.php") ) {
        include("theme/".$TEMPLATE."/functions.php");    
    }    
    
    // include the template and template file set within theme.php and each page
    if ( (!file_exists("theme/".$TEMPLATE."/".$template_file)) || ($template_file == '') ) { $template_file = "template.php"; }
    include("theme/".$TEMPLATE."/".$template_file);

On my install it works perfect !
Reply
#2
Same thing: http://get-simple.info/forum/viewtopic.php?id=159
Reply




Users browsing this thread: 1 Guest(s)