Icy Phoenix

     
 

How To Call Files From The Default Folder?

How To Call Files From The Default Folder?

Article
Reply with quote    Download Post  
Post How To Call Files From The Default Folder? 
 
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...



 
mort - View user's profile Send private message  
mort [ Sun 09 Nov, 2014 02:09 ]
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us


How To Call Files From The Default Folder?

Comments
Reply with quote    Download Post  
Post 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.



 
Informpro - View user's profile Send private message  
Informpro [ Sun 09 Nov, 2014 16:16 ]
Reply with quote    Download Post  
Post 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....

So! without being code "specific" something like this should suffice?

Code: [Download] [Hide] [Select]
$dir = 'templates/';
$something = 'default';
if(exist($dir/$something)) {$template = '$something && $template';}
if(!exists($dir/$something)){echo 'Youv\'e deleted the Default theme STUPID';}


           



 
mort - View user's profile Send private message  
mort [ Tue 11 Nov, 2014 10:52 ]
Reply with quote    Download Post  
Post 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:

Code: [Download] [Hide] [Select]
    /*
    * 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;
    }




 
Mighty Gorgon - View user's profile Send private message  
Mighty Gorgon [ Sun 16 Nov, 2014 10:33 ]
Reply with quote    Download Post  
Post Re: How To Call Files From The Default Folder? 
 
Quote:
because template system uses cache.


Thanks Luca,

So does this games thing..  

Now I'm about to start bumbling and bungling my way through this.  

I doubt my ability to get it to work - But at least it'll keep me out of the pubs for a while...  



 
mort - View user's profile Send private message  
mort [ Mon 01 Dec, 2014 08:15 ]
Display posts from previous:    

HideWas this topic useful?

Post new topic  Reply to topic  Page 1 of 1
 
 




 


 

  cron