Can someone show me how to call the files from the default theme folder before overwriting them with the theme files in question - Or point me to where Icy Phoenix does it?
Thanks... :P
How To Call Files From The Default Folder?
Subject: Re: How To Call Files From The Default Folder?
Hey,
I'm not sure what you mean. IP should by default look in the default/ folder if it can't find it in your custom template folder.
I'm not sure what you mean. IP should by default look in the default/ folder if it can't find it in your custom template folder.
Subject: Re: How To Call Files From The Default Folder?
Yeah! Well my senility is taking over and I assumed that MG would have made it more complicated than it needs to be.... :twisted:
So! without being code "specific" something like this should suffice?
:mricy: :mrgreen: :mrblue: :mrorange: :mrviolet: :mryellow:
So! without being code "specific" something like this should suffice?
$dir = 'templates/';
$something = 'default';
if(exist($dir/$something)) {$template = '$something && $template';}
if(!exists($dir/$something)){echo 'Youv\'e deleted the Default theme STUPID';}
$something = 'default';
if(exist($dir/$something)) {$template = '$something && $template';}
if(!exists($dir/$something)){echo 'Youv\'e deleted the Default theme STUPID';}
:mricy: :mrgreen: :mrblue: :mrorange: :mrviolet: :mryellow:
Subject: Re: How To Call Files From The Default Folder?
The code used for Icy Phoenix is much more complex, because template system uses cache.
Anyway you can do something like this (taken from my plugins code) to assign a path:
Anyway you can do something like this (taken from my plugins code) to assign a path:
/*
* Get template file: check if template file exists and set the correct path to template file
*/
function get_tpl_file($tpl_base_path, $tpl_file)
{
global $theme;
$tpl_path = $tpl_base_path . 'default/' . $tpl_file;
$tpl_temp_file = $tpl_base_path . $theme['template_name'] . '/' . $tpl_file;
if (@file_exists($tpl_temp_file))
{
$tpl_path = $tpl_temp_file;
}
return $tpl_path;
}
* Get template file: check if template file exists and set the correct path to template file
*/
function get_tpl_file($tpl_base_path, $tpl_file)
{
global $theme;
$tpl_path = $tpl_base_path . 'default/' . $tpl_file;
$tpl_temp_file = $tpl_base_path . $theme['template_name'] . '/' . $tpl_file;
if (@file_exists($tpl_temp_file))
{
$tpl_path = $tpl_temp_file;
}
return $tpl_path;
}
Subject: Re: How To Call Files From The Default Folder?
Thanks Luca,
So does this games thing.. :?
Now I'm about to start bumbling and bungling my way through this. :mryellow:
I doubt my ability to get it to work - But at least it'll keep me out of the pubs for a while... :LOL:
Quote:
Thanks Luca,
So does this games thing.. :?
Now I'm about to start bumbling and bungling my way through this. :mryellow:
I doubt my ability to get it to work - But at least it'll keep me out of the pubs for a while... :LOL:
Page 1 of 1
You cannot post new topicsYou cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events
This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by Icy Phoenix based on phpBB
Generation Time: 0.3587s (PHP: 5% SQL: 95%)
SQL queries: 11 - Debug Off - GZIP Enabled