ver. 0.285: Tpl → Shared\Tpl namespace, CurlServer removal, thumb.php fix
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@ class Articles
|
||||
*/
|
||||
public static function fullArticle( $article )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl->article = $article;
|
||||
return $tpl->render( 'articles/article' );
|
||||
}
|
||||
@@ -22,14 +22,14 @@ class Articles
|
||||
|
||||
if ( is_array( $articles ) ) foreach ( $articles as $article )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl->article = $article;
|
||||
$out .= $tpl->render( 'articles/article-miniature' );
|
||||
}
|
||||
|
||||
if ( $ls > 1 )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl->ls = $ls;
|
||||
$tpl->bs = $bs ? $bs : 1;
|
||||
$tpl->page = $page;
|
||||
@@ -44,14 +44,14 @@ class Articles
|
||||
*/
|
||||
public static function entryArticlesList( $articles, $ls, $bs, $page )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl->page_id = $page['id'];
|
||||
$tpl->articles = $articles;
|
||||
$out = $tpl->render( 'articles/articles-entries' );
|
||||
|
||||
if ( $ls > 1 )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl->ls = $ls;
|
||||
$tpl->bs = $bs ? $bs : 1;
|
||||
$tpl->page = $page;
|
||||
@@ -70,14 +70,14 @@ class Articles
|
||||
|
||||
if ( is_array( $articles ) ) foreach ( $articles as $article )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl->article = $article;
|
||||
$out .= $tpl->render( 'articles/article-full' );
|
||||
}
|
||||
|
||||
if ( $ls > 1 )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl->ls = $ls;
|
||||
$tpl->bs = $bs ? $bs : 1;
|
||||
$tpl->page = $page;
|
||||
@@ -92,7 +92,7 @@ class Articles
|
||||
*/
|
||||
public static function news( $page_id, $articles )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl->page_id = $page_id;
|
||||
$tpl->articles = $articles;
|
||||
return $tpl->render( 'articles/news' );
|
||||
@@ -103,7 +103,7 @@ class Articles
|
||||
*/
|
||||
public static function newsList( $articles )
|
||||
{
|
||||
return \Tpl::view( 'articles/news-list', [
|
||||
return \Shared\Tpl\Tpl::view( 'articles/news-list', [
|
||||
'articles' => $articles
|
||||
] );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user