[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/summary/view/ -> summaryrssview.class.php (source)

   1  <?php
   2  
   3      lt_include( PLOG_CLASS_PATH."class/summary/view/summarycachedview.class.php" );
   4      lt_include( PLOG_CLASS_PATH."class/template/templateservice.class.php" );
   5      lt_include( PLOG_CLASS_PATH."class/locale/locales.class.php" );
   6      lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
   7  
   8      class SummaryRssView extends SummaryCachedView
   9      {
  10  
  11          var $_profile;
  12  
  13          function SummaryRssView( $profile, $data = Array())
  14          {
  15              if( $profile == "" || $profile == "blogs_" ) {
  16                  $config =& Config::getConfig();
  17                  $profile .= $config->getValue( "default_rss_profile", "rss090" );
  18              }
  19              $this->SummaryCachedView( $profile, $data );            
  20                  
  21              $this->_profile = $profile;
  22              
  23              $this->setContentType( "text/xml" );
  24          }
  25          
  26          function generateTemplate()
  27          {
  28              $templateService = new TemplateService();
  29              $this->_template = $templateService->customTemplate( $this->_templateName, "summary/rss", true );
  30              
  31              // by default, these compiled files would be saved and cached to tmp/summary/rss but that's too
  32              // many folders so we'll overwrite the default settings set by TemplateService::customTemplate()
  33              // and save the files to tmp/summary/ with the other summary pages
  34              $config =& Config::getConfig();
  35              $templateTmpFolder = $config->getValue( "temp_folder" ).'/summary';
  36              $this->_template->cache_dir = $templateTmpFolder;
  37              $this->_template->compile_dir = $templateTmpFolder;
  38  
  39                  // set the summary custom time
  40              lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
  41              $config =& Config::getConfig();
  42                  // set the summary cache lifetime, or zero if none
  43              $summaryTemplateLifetime = $config->getValue( "summary_template_cache_lifetime", 0 );
  44              if( $summaryTemplateLifetime > 0 ) {
  45                  $this->_template->cache_lifetime = $summaryTemplateLifetime;
  46              }
  47          }        
  48  
  49          function sendUncachedOutput()
  50          {
  51              //$templateService = new TemplateService();
  52              //$template = $templateService->Template( $this->_profile, "summary/rss" );           
  53  
  54              $config =& Config::getConfig();
  55              $this->_locale =& Locales::getLocale( $config->getValue("default_locale" ));
  56              $this->_params->setValue( "version", new Version());
  57              $this->_params->setValue( "locale", $this->_locale );
  58              $this->_params->setValue( "serviceName", $config->getValue( "summary_service_name" ));
  59              $this->_template->assign( $this->_params->getAsArray());
  60              print $this->_template->fetch( $this->_viewId );
  61          }
  62      }
  63  ?>


Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics