Add view classes for articles, banners, languages, menu, newsletter, containers, shop categories, clients, payment methods, products, and search
- Created `Articles` class for rendering article views including full articles, miniature lists, and news sections. - Added `Banners` class for handling banner displays. - Introduced `Languages` class for rendering language options. - Implemented `Menu` class for rendering page and menu structures. - Developed `Newsletter` class for newsletter rendering. - Created `Scontainers` class for rendering specific containers. - Added `ShopCategory` class for managing shop category views and pagination. - Implemented `ShopClient` class for client-related views including address management and login forms. - Created `ShopPaymentMethod` class for displaying payment methods in the basket. - Added `ShopProduct` class for generating product URLs. - Introduced `ShopSearch` class for rendering a simple search form. - Added `.htaccess` file in the plugins directory to enhance security by restricting access to sensitive files and directories.
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<? global $lang;?>
|
||||
<div class="col-12 col-md-6 ">
|
||||
<div class="article-entry">
|
||||
<? $this -> article['language']['seo_link'] ? $url = $this -> article['language']['seo_link'] : $url = 'a-' . $this -> article['id'] . '-' . \S::seo( $this -> article['language']['title'] );?>
|
||||
<? $this -> article['language']['seo_link'] ? $url = $this -> article['language']['seo_link'] : $url = 'a-' . $this -> article['id'] . '-' . \Shared\Helpers\Helpers::seo( $this -> article['language']['title'] );?>
|
||||
<div class="blog-image">
|
||||
<a href="/<?= $url;?>" title="<?= $this -> article['language']['title'];?>" <? if ( $this -> article['language']['noindex'] ):?>rel="nofollow"<? endif;?>> <img src="<?= \front\factory\Articles::get_image( $this -> article );?>" alt="<?= $this -> article['language']['title'];?>"></a>
|
||||
<a href="/<?= $url;?>" title="<?= $this -> article['language']['title'];?>" <? if ( $this -> article['language']['noindex'] ):?>rel="nofollow"<? endif;?>> <img src="<?= \front\Views\Articles::getImage( $this -> article );?>" alt="<?= $this -> article['language']['title'];?>"></a>
|
||||
</div>
|
||||
<h3 class="article-title">
|
||||
<a href="/<? if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language() ) echo \S::get_session( 'current-lang' ) . '/';?><?= $url;?>" title="<?= $this -> article['language']['title'];?>" <? if ( $this -> article['language']['noindex'] ):?>rel="nofollow"<? endif;?>><?= $this -> article['language']['title'];?></a>
|
||||
<a href="/<? if ( \Shared\Helpers\Helpers::get_session( 'current-lang' ) != ( new \Domain\Languages\LanguagesRepository( $GLOBALS['mdb'] ) )->defaultLanguage() ) echo \Shared\Helpers\Helpers::get_session( 'current-lang' ) . '/';?><?= $url;?>" title="<?= $this -> article['language']['title'];?>" <? if ( $this -> article['language']['noindex'] ):?>rel="nofollow"<? endif;?>><?= $this -> article['language']['title'];?></a>
|
||||
</h3>
|
||||
<div class="date-add"><?= date( 'd.m.Y', strtotime( $this -> article['date_add'] ) );?></div>
|
||||
<div class="entry">
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<? global $lang;?>
|
||||
<?
|
||||
$text = $this -> article['language']['text'];
|
||||
$text = \front\factory\Articles::generateHeadersIds( $text );
|
||||
$text = \front\Views\Articles::generateHeadersIds( $text );
|
||||
?>
|
||||
<div class="article">
|
||||
<?
|
||||
$this -> article['language']['seo_link'] ? $url = $this -> article['language']['seo_link'] : $url = 'a-' . $this -> article['id'] . '-' . \S::seo( $this -> article['language']['title'] );
|
||||
$this -> article['language']['seo_link'] ? $url = $this -> article['language']['seo_link'] : $url = 'a-' . $this -> article['id'] . '-' . \Shared\Helpers\Helpers::seo( $this -> article['language']['title'] );
|
||||
|
||||
if ( $this -> article['show_title'] )
|
||||
echo '<h3 class="article-title">' . $this -> article['language']['title'] . '</h3>';
|
||||
@@ -46,16 +46,16 @@ $text = \front\factory\Articles::generateHeadersIds( $text );
|
||||
<? if ( $this -> article['language']['table_of_contents'] ):?>
|
||||
<div class="table-of-contents">
|
||||
<div class="title">
|
||||
<?= \S::lang( 'spis-tresci' );?>
|
||||
<?= \Shared\Helpers\Helpers::lang( 'spis-tresci' );?>
|
||||
</div>
|
||||
<?= $this -> article['language']['table_of_contents'];?>
|
||||
</div>
|
||||
<? else:?>
|
||||
<div class="table-of-contents">
|
||||
<div class="title">
|
||||
<?= \S::lang( 'spis-tresci' );?>
|
||||
<?= \Shared\Helpers\Helpers::lang( 'spis-tresci' );?>
|
||||
</div>
|
||||
<?= \front\factory\Articles::generateTableOfContents( $text );?>
|
||||
<?= \front\Views\Articles::generateTableOfContents( $text );?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? endif;?>
|
||||
@@ -67,7 +67,11 @@ $text = \front\factory\Articles::generateHeadersIds( $text );
|
||||
{
|
||||
$article_tmp = explode( ':', $article_tmp );
|
||||
if ( $article_tmp[1] != $this -> article['id'] )
|
||||
$text = str_replace( '[ARTYKUL:' . $article_tmp[1] . ']', \front\view\Articles::article_full( $article_tmp[1], $lang_id ), $text );
|
||||
{
|
||||
$nestedArticleRepo = new \Domain\Article\ArticleRepository( $GLOBALS['mdb'] );
|
||||
$nestedArticle = $nestedArticleRepo->articleDetailsFrontend( (int)$article_tmp[1], $lang_id );
|
||||
$text = str_replace( '[ARTYKUL:' . $article_tmp[1] . ']', $nestedArticle ? \front\Views\Articles::fullArticle( $nestedArticle ) : '', $text );
|
||||
}
|
||||
else
|
||||
$text = str_replace( '[ARTYKUL:' . $article_tmp[1] . ']', '', $text );
|
||||
}
|
||||
@@ -76,7 +80,7 @@ $text = \front\factory\Articles::generateHeadersIds( $text );
|
||||
if ( strpos( $this -> article['language']['text'], '[GALERIA]' ) !== false )
|
||||
{
|
||||
if ( is_array( $this -> article['images'] ) ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> article = $this -> article;
|
||||
$tpl -> images = $this -> article['images'];
|
||||
$gallery = $tpl -> render( 'articles/article-gallery' );
|
||||
@@ -88,7 +92,7 @@ $text = \front\factory\Articles::generateHeadersIds( $text );
|
||||
if ( strpos( $this -> article['language']['text'], '[ZALACZNIKI]' ) !== false )
|
||||
{
|
||||
if ( is_array( $this -> article['files'] ) ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> article = $this -> article;
|
||||
$tpl -> files = $this -> article['files'];
|
||||
$files = $tpl -> render( 'articles/article-files' );
|
||||
@@ -117,7 +121,7 @@ $text = \front\factory\Articles::generateHeadersIds( $text );
|
||||
$images[] = $image;
|
||||
}
|
||||
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> images = $images;
|
||||
$tpl -> article_id = $this -> article['id'];
|
||||
$tpl -> i = $i;
|
||||
@@ -157,14 +161,14 @@ $text = \front\factory\Articles::generateHeadersIds( $text );
|
||||
</div>
|
||||
<?
|
||||
if ( is_array( $this -> article['images'] ) and strpos( $this -> article['language']['text'], '[GALERIA]' ) === false ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> article = $this -> article;
|
||||
$tpl -> images = $this -> article['images'];
|
||||
echo $tpl -> render( 'articles/article-gallery' );
|
||||
endif;
|
||||
|
||||
if ( is_array( $this -> article['files'] ) and strpos( $this -> article['language']['text'], '[ZALACZNIKI]' ) === false ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> article = $this -> article;
|
||||
$tpl -> files = $this -> article['files'];
|
||||
echo $tpl -> render( 'articles/article-files' );
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<div class="gallery <? if ( $this -> article['pixieset'] ):?>pixieset<? endif;?>">
|
||||
<? if ( $this -> article['pixieset'] ):?>
|
||||
<div class="buttons">
|
||||
<a id="gallery-download-<?= $this -> article['id'];?>" class="btn btn-success"><?= \S::lang( 'pobierz-wszystkie' );?></a>
|
||||
<a id="gallery-download-<?= $this -> article['id'];?>" class="btn btn-success"><?= \Shared\Helpers\Helpers::lang( 'pobierz-wszystkie' );?></a>
|
||||
<? if ( $this -> article['pixieset'] == 2 ):?>
|
||||
<a id="gallery-favorite-submit-<?= $this -> article['id'];?>" class="btn btn-info"><?= \S::lang( 'zatwierdz-wybrane-fotografie' );?></a>
|
||||
<a id="gallery-favorite-submit-<?= $this -> article['id'];?>" class="btn btn-info"><?= \Shared\Helpers\Helpers::lang( 'zatwierdz-wybrane-fotografie' );?></a>
|
||||
<? endif;?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
@@ -35,7 +35,7 @@
|
||||
<? endif;?>
|
||||
<? if ( $this -> article['pixieset'] ):?>
|
||||
<div class="pixieset-image-big">
|
||||
<a href="#" class="close" title="<?= \S::lang( 'zamknij' );?>">
|
||||
<a href="#" class="close" title="<?= \Shared\Helpers\Helpers::lang( 'zamknij' );?>">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
<div class="buttons">
|
||||
@@ -187,13 +187,13 @@
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
button.addClass( 'disabled' ).html( '<?= \S::lang( 'zaczekaj-trwa-tworzenie-pliku' );?>' );
|
||||
button.addClass( 'disabled' ).html( '<?= \Shared\Helpers\Helpers::lang( 'zaczekaj-trwa-tworzenie-pliku' );?>' );
|
||||
},
|
||||
success: function( response )
|
||||
{
|
||||
data = jQuery.parseJSON( response );
|
||||
window.location = '/' + data.url;
|
||||
button.removeClass( 'disabled' ).html( '<?= \S::lang( 'pobierz-wszystkie' );?>' );
|
||||
button.removeClass( 'disabled' ).html( '<?= \Shared\Helpers\Helpers::lang( 'pobierz-wszystkie' );?>' );
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -226,8 +226,8 @@
|
||||
{
|
||||
$.alert(
|
||||
{
|
||||
title: '<?= ucfirst( \S::lang( 'informacja' ) );?>',
|
||||
content: '<?= \S::lang( 'lista-wybranych-zdjec-zostala-zatwierdzona' );?>',
|
||||
title: '<?= ucfirst( \Shared\Helpers\Helpers::lang( 'informacja' ) );?>',
|
||||
content: '<?= \Shared\Helpers\Helpers::lang( 'lista-wybranych-zdjec-zostala-zatwierdzona' );?>',
|
||||
type: 'orange',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-close',
|
||||
@@ -240,7 +240,7 @@
|
||||
{
|
||||
confirm:
|
||||
{
|
||||
text: '<?= \S::lang( 'zamknij' );?>',
|
||||
text: '<?= \Shared\Helpers\Helpers::lang( 'zamknij' );?>',
|
||||
btnClass: 'btn-blue',
|
||||
keys: ['enter'],
|
||||
action: function() {}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<? global $lang;?>
|
||||
<div class="article-miniature">
|
||||
<?
|
||||
$this -> article['language']['seo_link'] ? $url = $this -> article['language']['seo_link'] : $url = 'a-' . $this -> article['id'] . '-' . \S::seo( $this -> article['language']['title'] );
|
||||
$this -> article['language']['seo_link'] ? $url = $this -> article['language']['seo_link'] : $url = 'a-' . $this -> article['id'] . '-' . \Shared\Helpers\Helpers::seo( $this -> article['language']['title'] );
|
||||
|
||||
?>
|
||||
<h3 class="article-title">
|
||||
@@ -15,7 +15,7 @@
|
||||
if ( $this -> article['show_date_modify'] )
|
||||
echo '<div class="date-add">' . $lang['data-modyfikacji'] . ': ' . $this -> article['date_modify'] . '</div>';
|
||||
|
||||
if ( $img = \front\factory\Articles::get_image( $this -> article ) ):
|
||||
if ( $img = \front\Views\Articles::getImage( $this -> article ) ):
|
||||
?>
|
||||
<a href="./<?= $url;?>" title="<?= $this -> article['language']['title'];?>" <? if ( $this -> article['language']['noindex'] ):?>rel="nofollow"<? endif;?>>
|
||||
<div style="background: url( '/libraries/thumb.php?img=<?= $img;?>&w=250&h=250' ) no-repeat center;"></div>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<? global $lang;?>
|
||||
<?
|
||||
$text = $this -> article['language']['text'];
|
||||
$text = \front\factory\Articles::generateHeadersIds( $text );
|
||||
$text = \front\Views\Articles::generateHeadersIds( $text );
|
||||
?>
|
||||
<div class="article">
|
||||
<?
|
||||
$this -> article['language']['seo_link'] ? $url = $this -> article['language']['seo_link'] : $url = 'a-' . $this -> article['id'] . '-' . \S::seo( $this -> article['language']['title'] );
|
||||
$this -> article['language']['seo_link'] ? $url = $this -> article['language']['seo_link'] : $url = 'a-' . $this -> article['id'] . '-' . \Shared\Helpers\Helpers::seo( $this -> article['language']['title'] );
|
||||
|
||||
if ( $this -> article['show_title'] )
|
||||
echo '<h2 class="article-title">' . $this -> article['language']['title'] . '</h2>';
|
||||
@@ -23,16 +23,16 @@ $text = \front\factory\Articles::generateHeadersIds( $text );
|
||||
<? if ( $this -> article['language']['table_of_contents'] ):?>
|
||||
<div class="table-of-contents">
|
||||
<div class="title">
|
||||
<?= \S::lang( 'spis-tresci' );?>
|
||||
<?= \Shared\Helpers\Helpers::lang( 'spis-tresci' );?>
|
||||
</div>
|
||||
<?= $this -> article['language']['table_of_contents'];?>
|
||||
</div>
|
||||
<? else:?>
|
||||
<div class="table-of-contents">
|
||||
<div class="title">
|
||||
<?= \S::lang( 'spis-tresci' );?>
|
||||
<?= \Shared\Helpers\Helpers::lang( 'spis-tresci' );?>
|
||||
</div>
|
||||
<?= \front\factory\Articles::generateTableOfContents( $text );?>
|
||||
<?= \front\Views\Articles::generateTableOfContents( $text );?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? endif;?>
|
||||
@@ -89,7 +89,7 @@ $text = \front\factory\Articles::generateHeadersIds( $text );
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<div class="title"><?= ucfirst( \S::lang( 'podziel-sie-z-innymi' ) );?></div>
|
||||
<div class="title"><?= ucfirst( \Shared\Helpers\Helpers::lang( 'podziel-sie-z-innymi' ) );?></div>
|
||||
<div class="content">
|
||||
<a class="fb" href="http://www.facebook.com/sharer.php?u=http://www.<?= $_SERVER['SERVER_NAME'];?>/<?= $url;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" title="facebook" target="_blank" rel="nofollow">
|
||||
<img src="/images/system/logo-facebook.jpg" alt="facebook" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="row">
|
||||
<? if ( is_array( $this -> articles ) ): foreach ( $this -> articles as $article ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl = new \Shared\Tpl\Tpl;
|
||||
$tpl -> page_id = $this -> page_id;
|
||||
$tpl -> article = $article;
|
||||
echo $tpl -> render( 'articles/article-entry' );
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<ul class="news-list">
|
||||
<? if ( \S::is_array_fix( $this -> articles ) ): foreach ( $this -> articles as $article ):?>
|
||||
<? $article['language']['seo_link'] ? $url = $article['language']['seo_link'] : $url = 'a-' . $article['id'] . '-' . \S::seo( $article['language']['title'] );?>
|
||||
<? if ( \Shared\Helpers\Helpers::is_array_fix( $this -> articles ) ): foreach ( $this -> articles as $article ):?>
|
||||
<? $article['language']['seo_link'] ? $url = $article['language']['seo_link'] : $url = 'a-' . $article['id'] . '-' . \Shared\Helpers\Helpers::seo( $article['language']['title'] );?>
|
||||
<li>
|
||||
<a href="/<? if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language( \S::get_domain( $_SERVER['HTTP_HOST'] ) ) ) echo \S::get_session( 'current-lang' ) . '/';?><?= $url;?>" title="<?= $article['language']['title'];?>" <? if ( $article['language']['noindex'] ):?>rel="nofollow"<? endif;?>><i class="far fa-file-alt"></i><?= $article['language']['title'];?></a>
|
||||
<a href="/<? if ( \Shared\Helpers\Helpers::get_session( 'current-lang' ) != ( new \Domain\Languages\LanguagesRepository( $GLOBALS['mdb'] ) )->defaultLanguage() ) echo \Shared\Helpers\Helpers::get_session( 'current-lang' ) . '/';?><?= $url;?>" title="<?= $article['language']['title'];?>" <? if ( $article['language']['noindex'] ):?>rel="nofollow"<? endif;?>><i class="far fa-file-alt"></i><?= $article['language']['title'];?></a>
|
||||
<div class="date-add"><?= date( 'd.m.Y', strtotime( $article['date_add'] ) );?></div>
|
||||
</li>
|
||||
<? endforeach; endif;?>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<? foreach ( $this -> articles as $article ):?>
|
||||
<div class="col-12 col-lg-6 col-xl-3">
|
||||
<div class="article-list">
|
||||
<? $article['language']['seo_link'] ? $url = $article['language']['seo_link'] : $url = 'a-' . $article['id'] . '-' . \S::seo( $article['language']['title'] );?>
|
||||
<? $article['language']['seo_link'] ? $url = $article['language']['seo_link'] : $url = 'a-' . $article['id'] . '-' . \Shared\Helpers\Helpers::seo( $article['language']['title'] );?>
|
||||
<a href="/<?= $url;?>" title="<?= $article['language']['title'];?>" <? if ( $article['language']['noindex'] ):?>rel="nofollow"<? endif;?>>
|
||||
<div class="blog-image">
|
||||
<img src="<?= \front\factory\Articles::get_image( $article );?>" alt="<?= $article['language']['title'];?>">
|
||||
<img src="<?= \front\Views\Articles::getImage( $article );?>" alt="<?= $article['language']['title'];?>">
|
||||
<div class="date-add"><?= date( 'd.m.y', strtotime( $article['date_add'] ) );?></div>
|
||||
</div>
|
||||
<h3 class="article-title"><?= $article['language']['title'];?></h3>
|
||||
|
||||
Reference in New Issue
Block a user