includes/template.php
changeset 767 cba10e1031eb
parent 760 60c132a5bc8e
child 798 ddfc1b554a08
equal deleted inserted replaced
766:d6690840e331 767:cba10e1031eb
   432     $this->initted_to_theme = array(
   432     $this->initted_to_theme = array(
   433         'theme' => $this->theme,
   433         'theme' => $this->theme,
   434         'style' => $this->style
   434         'style' => $this->style
   435       );
   435       );
   436     
   436     
       
   437     require(ENANO_ROOT . "/themes/{$this->theme}/theme.cfg");
       
   438     
   437     if ( $local_page_exists && isset($paths->pages[$local_page]) )
   439     if ( $local_page_exists && isset($paths->pages[$local_page]) )
   438     {
   440     {
   439       $local_cdata =& $paths->pages[$local_page];
   441       $local_cdata =& $paths->pages[$local_page];
   440     }
   442     }
   441     else
   443     else
  1419    * Assigns an array of boolean values to the template. These can be used for <!-- IF ... --> statements.
  1421    * Assigns an array of boolean values to the template. These can be used for <!-- IF ... --> statements.
  1420    * @param $vars array
  1422    * @param $vars array
  1421    * @param $from_internal bool Internal switch, just omit (@todo document)
  1423    * @param $from_internal bool Internal switch, just omit (@todo document)
  1422    */
  1424    */
  1423   
  1425   
  1424   function assign_bool($vars)
  1426   function assign_bool($vars, $from_internal = false)
  1425   {
  1427   {
  1426     foreach ( $vars as $key => $value )
  1428     foreach ( $vars as $key => $value )
  1427     {
  1429     {
  1428       $replace = true;
  1430       $replace = true;
  1429       if ( isset($this->vars_assign_history['bool'][$key]) )
  1431       if ( isset($this->vars_assign_history['bool'][$key]) )
  1742     
  1744     
  1743     $url_regexp = <<<EOF
  1745     $url_regexp = <<<EOF
  1744 (
  1746 (
  1745   (?:https?|ftp|irc):\/\/                            # protocol
  1747   (?:https?|ftp|irc):\/\/                            # protocol
  1746   (?:[^@\s\]"\':]+@)?                                # username (FTP only but whatever)
  1748   (?:[^@\s\]"\':]+@)?                                # username (FTP only but whatever)
  1747   (?:(?:(?:[a-z0-9-]+\.)*)[a-z0-9\[\]:]+)           # hostname
  1749   (?:(?:(?:[a-z0-9-]+\.)*)[a-z0-9\[\]:]+)            # hostname
  1748   (?::[0-9]+)?                                       # port number
  1750   (?::[0-9]+)?                                       # port number
  1749   (?:\/[A-z0-9_%\|~`!\!@#\$\^&?=\*\(\):;\.,\/-]*)?   # path
  1751   (?:\/[A-z0-9_%\|~`!\!@#\$\^&?=\*\(\):;\.,\/-]*)?   # path
  1750 )
  1752 )
  1751 EOF;
  1753 EOF;
  1752 
  1754