includes/template.php
changeset 345 4ccdfeee9a11
parent 335 67bd3121a12e
child 349 fdaf9070566c
equal deleted inserted replaced
344:be6c5fdd9203 345:4ccdfeee9a11
    78       $this->default_style = $list[0];
    78       $this->default_style = $list[0];
    79     }
    79     }
    80     
    80     
    81     $this->style_list = $list;
    81     $this->style_list = $list;
    82     
    82     
    83   }
       
    84   function template()
       
    85   {
       
    86     $this->__construct();
       
    87   }
    83   }
    88   function sidebar_widget($t, $h)
    84   function sidebar_widget($t, $h)
    89   {
    85   {
    90     global $db, $session, $paths, $template, $plugins; // Common objects
    86     global $db, $session, $paths, $template, $plugins; // Common objects
    91     if(!defined('ENANO_TEMPLATE_LOADED'))
    87     if(!defined('ENANO_TEMPLATE_LOADED'))
  1775     if ( !$q )
  1771     if ( !$q )
  1776       $db->_die();
  1772       $db->_die();
  1777     $messages = array();
  1773     $messages = array();
  1778     while ( $row = $db->fetchrow() )
  1774     while ( $row = $db->fetchrow() )
  1779     {
  1775     {
  1780       $messages[] = '<a href="' . makeUrlNS('Special', 'PrivateMessages/View/' . $row['message_id']) . '" title="Sent ' . date('F d, Y h:i a', $row['date']) . ' by ' . $row['message_from'] . '">' . $row['subject'] . '</a>';
  1776       $messages[] = '<a href="' . makeUrlNS('Special', 'PrivateMessages/View/' . $row['message_id']) . '" title="Sent ' . enano_date('F d, Y h:i a', $row['date']) . ' by ' . $row['message_from'] . '">' . $row['subject'] . '</a>';
  1781     }
  1777     }
  1782     $ob .= implode(",\n    " , $messages)."\n";
  1778     $ob .= implode(",\n    " , $messages)."\n";
  1783     $ob .= '</div>'."\n";
  1779     $ob .= '</div>'."\n";
  1784     return $ob;
  1780     return $ob;
  1785   }
  1781   }
  1808     $this->tpl_code = $text;
  1804     $this->tpl_code = $text;
  1809     $this->tpl_strings = $template->tpl_strings;
  1805     $this->tpl_strings = $template->tpl_strings;
  1810     $this->tpl_bool = $template->tpl_bool;
  1806     $this->tpl_bool = $template->tpl_bool;
  1811   }
  1807   }
  1812   /**
  1808   /**
  1813    * PHP 4 constructor.
  1809    * PHP 4 constructor. Deprecated in 1.1.x.
  1814    */
  1810    */
       
  1811   /*
  1815   function templateIndividual($text)
  1812   function templateIndividual($text)
  1816   {
  1813   {
  1817     $this->__construct($text);
  1814     $this->__construct($text);
  1818   }
  1815   }
       
  1816   */
  1819   /**
  1817   /**
  1820    * Assigns an array of string values to the template. Strings can be accessed from the template by inserting {KEY_NAME} in the template file.
  1818    * Assigns an array of string values to the template. Strings can be accessed from the template by inserting {KEY_NAME} in the template file.
  1821    * @param $vars array
  1819    * @param $vars array
  1822    */
  1820    */
  1823   function assign_vars($vars)
  1821   function assign_vars($vars)