64 $this->AutoMarkup =
get_package(
'page::page_parts' ,
'last' , __FILE__ );
65 $this->CachedMultyFS =
get_package(
'cached_multy_fs' ,
'last' , __FILE__ );
66 $this->Database =
get_package(
'database' ,
'last' , __FILE__ );
67 $this->PageComposer =
get_package(
'page::page_composer' ,
'last' , __FILE__ );
68 $this->Security =
get_package(
'security' ,
'last' , __FILE__ );
70 $this->String =
get_package(
'string' ,
'last' , __FILE__ );
100 if( $this->Security->get_gp(
'feed' ,
'set' ) === false )
105 $Feed = $this->Security->get_gp(
'feed' ,
'command' );
107 $FeedScript = $this->CachedMultyFS->get_data( __FILE__ ,
"$Feed.sql" );
108 $FeedScript = $this->AutoMarkup->compile_string( $FeedScript );
112 $Result = $this->Database->query( $FeedScript );
114 return( $this->Database->fetch_results( $Result ) );
116 catch( Exception $e )
144 private function compile_records( &$Records )
148 $FeedXml = $this->CachedMultyFS->get_template( __FILE__ ,
'rss20_feed.tpl' );
150 foreach( $Records as $Record )
152 $FeedItem = $this->CachedMultyFS->get_template( __FILE__ ,
'rss20_item.tpl' );
154 $FeedItem = $this->String->print_record( $FeedItem , $Record );
156 $FeedXml = str_replace(
'{items}' , $FeedItem.
'{items}' , $FeedXml );
161 catch( Exception $e )
193 $FeedXml = $this->compile_records( $Records );
195 $FeedXml = str_replace(
'{last_build_date}' , date(
'r' ) , $FeedXml );
196 $FeedXml = str_replace(
'{package_path}' ,
_get_package_path(
'rss' ,
'2.0.0' ) , $FeedXml );
198 $this->Settings->load_file( dirname( __FILE__ ).
'/conf/cf_default' );
199 $FeedXml = $this->String->print_record( $FeedXml , $this->Settings->get_raw_settings() );
201 $FeedXml = $this->AutoMarkup->compile_string( $FeedXml );
205 catch( Exception $e )
235 if( $Records ===
false )
242 $Feed = $this->Security->get( $Feed ,
'unsafe_string' );
244 header(
"Content-Type: application/rss+xml" );
248 catch( Exception $e )
284 $Type =
$Settings->get_setting(
'type' ,
'small' );
286 $Code = $this->CachedMultyFS->get_template( __FILE__ , $Type.
'_rss_button.tpl' );
288 $Code = $this->String->print_record( $Code ,
$Settings );
294 catch( Exception $e )