home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / CMS / drupal-6.0.exe / drupal-6.0 / themes / engines / phptemplate / phptemplate.engine
Encoding:
Text File  |  2007-10-02  |  814 b   |  28 lines

  1. <?php
  2. // $Id: phptemplate.engine,v 1.69 2007/10/02 16:19:23 dries Exp $
  3.  
  4. /**
  5.  * @file
  6.  * Handles integration of templates written in pure php with the Drupal theme system.
  7.  */
  8.  
  9. function phptemplate_init($template) {
  10.   $file = dirname($template->filename) .'/template.php';
  11.   if (file_exists($file)) {
  12.     include_once "./$file";
  13.   }
  14. }
  15.  
  16. /**
  17.  * Implementation of hook_theme to tell Drupal what templates the engine
  18.  * and the current theme use. The $existing argument will contain hooks
  19.  * pre-defined by Drupal so that we can use that information if
  20.  * we need to.
  21.  */
  22. function phptemplate_theme($existing, $type, $theme, $path) {
  23.   $templates = drupal_find_theme_functions($existing, array('phptemplate', $theme));
  24.   $templates += drupal_find_theme_templates($existing, '.tpl.php', $path);
  25.   return $templates;
  26. }
  27.  
  28.