64 $this->CachedMultyFS =
get_package(
'cached_multy_fs' ,
'last' , __FILE__ );
65 $this->CategoryAlgorithms =
get_package(
'category::category_algorithms' ,
'last' , __FILE__ );
66 $this->ContentAccess =
get_package(
'content::content_access' ,
'last' , __FILE__ );
67 $this->ContentAlgorithms =
get_package(
'content::content_algorithms' ,
'last' , __FILE__ );
68 $this->ContentView =
get_package(
'content::content_view' ,
'last' , __FILE__ );
69 $this->load_content_packages();
70 $this->Security =
get_package(
'security' ,
'last' , __FILE__ );
71 $this->String =
get_package(
'string' ,
'last' , __FILE__ );
101 private function get_articles( &$Settings )
105 $CategoryNames = $Settings->get_setting(
'category' );
107 $CategoryIds = $this->CategoryAlgorithms->get_category_ids( $CategoryNames );
109 return( $this->ContentAccess->select_content_by_category( $CategoryIds ) );
111 catch( Exception $e )
143 $Articles = $this->get_articles( $Settings );
145 $Code =
'{lang:no_articles_were_found}';
147 if( isset( $Articles[ 0 ] ) )
149 $TemplateName = $Settings->get_setting(
'template' ,
'content_link.tpl' );
152 foreach( $Articles as $Item )
154 $Code .= $this->CachedMultyFS->get_template( __FILE__ , $TemplateName );
155 $Code = $this->String->print_record( $Code , $Item );
161 catch( Exception $e )
193 $ContentId = $Settings->get_setting(
'content_id' );
194 $Settings->set_setting(
'content_view' , 1 );
195 $this->Security->set_g(
'content_id' , $ContentId );
197 $Code = $this->ContentView->view( $Settings );
201 catch( Exception $e )
233 $ContentId = $Settings->get_setting(
'content_id' );
234 $Code = $this->CachedMultyFS->get_template( __FILE__ ,
'print_content_url.tpl' );
235 $Code = str_replace(
'{content_id}' , $ContentId , $Code );
239 catch( Exception $e )