From 28db819c64498490680047c84f4b306f51e499ac Mon Sep 17 00:00:00 2001 From: ggoffy Date: Sun, 8 Aug 2021 19:17:59 +0200 Subject: [PATCH] added smarty defaults --- docs/changelog.txt | 2 +- .../blocks/publisher_category_items_sel.tpl | 4 +- templates/blocks/publisher_date_to_date.tpl | 4 +- templates/blocks/publisher_items_columns.tpl | 10 +-- templates/blocks/publisher_items_menu.tpl | 4 +- templates/blocks/publisher_items_new.tpl | 18 ++--- .../blocks/publisher_items_random_item.tpl | 16 ++--- templates/blocks/publisher_items_recent.tpl | 24 +++---- templates/blocks/publisher_items_spot.tpl | 26 ++++---- templates/blocks/publisher_latest_news.tpl | 56 ++++++++-------- templates/publisher_addfile.tpl | 6 +- templates/publisher_archive.tpl | 34 +++++----- templates/publisher_author_items.tpl | 26 ++++---- templates/publisher_categories_table.tpl | 36 +++++----- templates/publisher_display_full.tpl | 14 ++-- templates/publisher_display_list.tpl | 32 ++++----- templates/publisher_display_summary.tpl | 40 +++++------ templates/publisher_display_wfsection.tpl | 42 ++++++------ templates/publisher_footer.tpl | 4 +- templates/publisher_header.tpl | 4 +- templates/publisher_item.tpl | 66 +++++++++---------- templates/publisher_like.tpl | 10 +-- templates/publisher_print.tpl | 14 ++-- templates/publisher_search.tpl | 4 +- templates/publisher_singleitem.tpl | 20 +++--- templates/publisher_singleitem_block.tpl | 14 ++-- templates/publisher_submit.tpl | 2 +- templates/publisher_vote.tpl | 10 +-- .../blocks/publisher_category_items_sel.tpl | 4 +- .../blocks/publisher_items_columns.tpl | 12 ++-- .../publisher/blocks/publisher_items_menu.tpl | 4 +- .../publisher/blocks/publisher_items_new.tpl | 18 ++--- .../blocks/publisher_items_random_item.tpl | 16 ++--- .../blocks/publisher_items_recent.tpl | 24 +++---- .../publisher/blocks/publisher_items_spot.tpl | 30 ++++----- .../blocks/publisher_latest_news.tpl | 56 ++++++++-------- .../publisher/publisher_archive.tpl | 22 +++---- .../publisher/publisher_author_items.tpl | 26 ++++---- .../publisher/publisher_categories_table.tpl | 4 +- .../publisher/publisher_display_full.tpl | 2 +- .../publisher/publisher_display_list.tpl | 24 +++---- .../publisher/publisher_display_summary.tpl | 38 +++++------ .../publisher/publisher_display_wfsection.tpl | 24 +++---- .../bootstrap3/publisher/publisher_header.tpl | 2 +- .../publisher_item(title_bottom).tpl | 62 ++++++++--------- .../bootstrap3/publisher/publisher_item.tpl | 60 ++++++++--------- .../bootstrap3/publisher/publisher_search.tpl | 4 +- .../publisher/publisher_singleitem.tpl | 22 +++---- .../publisher/publisher_singleitem_block.tpl | 18 ++--- .../blocks/publisher_category_items_sel.tpl | 4 +- .../blocks/publisher_items_columns.tpl | 12 ++-- .../publisher/blocks/publisher_items_menu.tpl | 4 +- .../publisher/blocks/publisher_items_new.tpl | 18 ++--- .../blocks/publisher_items_random_item.tpl | 16 ++--- .../blocks/publisher_items_recent.tpl | 18 ++--- .../publisher/blocks/publisher_items_spot.tpl | 28 ++++---- .../blocks/publisher_latest_news.tpl | 54 +++++++-------- .../publisher/publisher_archive.tpl | 22 +++---- .../publisher/publisher_author_items.tpl | 26 ++++---- .../publisher/publisher_categories_table.tpl | 4 +- .../publisher/publisher_display_full.tpl | 24 +++---- .../publisher/publisher_display_list.tpl | 20 +++--- .../publisher/publisher_display_summary.tpl | 38 +++++------ .../publisher/publisher_display_wfsection.tpl | 20 +++--- .../bootstrap4/publisher/publisher_footer.tpl | 4 +- .../bootstrap4/publisher/publisher_header.tpl | 2 +- .../bootstrap4/publisher/publisher_item.tpl | 62 ++++++++--------- .../bootstrap4/publisher/publisher_search.tpl | 4 +- .../publisher/publisher_singleitem.tpl | 4 +- .../publisher/publisher_singleitem_block.tpl | 18 ++--- 70 files changed, 708 insertions(+), 708 deletions(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index 29aff5e4..8c631131 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -2,7 +2,7 @@
- added votetype column in update (goffy) - added rating selection in item form (mamba) - +- added smarty defaults (goffy)
1.08 Alpha 3 [2021-01-01]
Dev: XOOPS 2.5.11, PHP 7.4.13, PHP 8.0
diff --git a/templates/blocks/publisher_category_items_sel.tpl b/templates/blocks/publisher_category_items_sel.tpl index c1bc2a69..363d62a9 100644 --- a/templates/blocks/publisher_category_items_sel.tpl +++ b/templates/blocks/publisher_category_items_sel.tpl @@ -1,11 +1,11 @@
- <{foreach item=category from=$block.categories}> + <{foreach item=category from=$block.categories|default:false}> diff --git a/templates/blocks/publisher_date_to_date.tpl b/templates/blocks/publisher_date_to_date.tpl index 28149528..54ad0074 100644 --- a/templates/blocks/publisher_date_to_date.tpl +++ b/templates/blocks/publisher_date_to_date.tpl @@ -1,8 +1,8 @@
-

<{$block.lang_articles_from_to}>

+

<{$block.lang_articles_from_to|default:''}>

    - <{foreach item=item from=$block.items}> + <{foreach item=item from=$block.items|default:false}>
  • <{$item.itemlink}>
  • <{/foreach}>
diff --git a/templates/blocks/publisher_items_columns.tpl b/templates/blocks/publisher_items_columns.tpl index 49afa949..2892c6b1 100644 --- a/templates/blocks/publisher_items_columns.tpl +++ b/templates/blocks/publisher_items_columns.tpl @@ -1,4 +1,4 @@ -<{if $block.template == 'normal'}> +<{if $block.template|default:'' == 'normal'}>
<{section name=i loop=$block.columns}>
@@ -13,13 +13,13 @@ <{if $block.display_datemainitem == '1'}><{$item.date}> <{/if}>

- <{if $item.item_image != ''}> + <{if $item.item_image|default:'' != ''}> <{$item.item_cleantitle}> <{/if}> <{$item.item_summary}>

- <{if $item.subitem}> + <{if $item.subitem|default:false}> <{$smarty.const._MB_PUBLISHER_MORE}>
<{/if}> -<{if $block.template == 'extended'}> +<{if $block.template|default:'' == 'extended'}>
<{section name=i loop=$block.columns}>
@@ -46,7 +46,7 @@ <{if $block.display_datemainitem == '1'}><{$item.date}> <{/if}>
- <{if $item.item_image != ''}> + <{if $item.item_image|default:'' != ''}> <{$item.item_cleantitle}> <{/if}>

<{$item.item_summary}>

diff --git a/templates/blocks/publisher_items_menu.tpl b/templates/blocks/publisher_items_menu.tpl index 270c6633..6f2f246b 100644 --- a/templates/blocks/publisher_items_menu.tpl +++ b/templates/blocks/publisher_items_menu.tpl @@ -2,10 +2,10 @@
diff --git a/templates/blocks/publisher_items_new.tpl b/templates/blocks/publisher_items_new.tpl index 02928e6f..d53b8331 100644 --- a/templates/blocks/publisher_items_new.tpl +++ b/templates/blocks/publisher_items_new.tpl @@ -1,26 +1,26 @@
<{$category.name}>
<{foreach item=newitems from=$block.newitems|default:null}> "> - <{if $newitems.image}> + <{if $newitems.image|default:false}> <{/if}> diff --git a/templates/blocks/publisher_items_random_item.tpl b/templates/blocks/publisher_items_random_item.tpl index 2bb75c79..e0f7ebba 100644 --- a/templates/blocks/publisher_items_random_item.tpl +++ b/templates/blocks/publisher_items_random_item.tpl @@ -1,18 +1,18 @@ <{foreach item=items from=$block.items}> - <{if $block.display_item_image == '1'}> + <{if $block.display_item_image|default:false == '1'}> <{$block.alt}>
<{/if}> <{$block.titlelink}>
- <{if $block.display_summary == '1'}><{$block.content}>
<{/if}> + <{if $block.display_summary|default:false == '1'}><{$block.content}>
<{/if}> - <{if $block.display_categorylink == '1'}> <{$block.lang_category}> : <{$block.categorylink}> |<{/if}> - <{if $block.display_poster == '1'}> <{$block.lang_poster}> <{$block.poster}> | <{/if}> - <{if $block.display_date == '1'}> <{$block.date}> | <{/if}> - <{if $block.display_hits == '1'}> <{$block.hits}> <{$block.lang_hits}> | <{/if}> - <{if $block.display_comment == '1' && $block.cancomment && $block.comment != -1}> <{$block.comment}> <{/if}> + <{if $block.display_categorylink|default:false == '1'}> <{$block.lang_category}> : <{$block.categorylink}> |<{/if}> + <{if $block.display_poster|default:false == '1'}> <{$block.lang_poster}> <{$block.poster}> | <{/if}> + <{if $block.display_date|default:false == '1'}> <{$block.date}> | <{/if}> + <{if $block.display_hits|default:false == '1'}> <{$block.hits}> <{$block.lang_hits}> | <{/if}> + <{if $block.display_comment|default:'' == '1' && $block.cancomment|default:false && $block.comment|default:0 != -1}> <{$block.comment}> <{/if}> - <{if $block.display_lang_fullitem == '1'}> + <{if $block.display_lang_fullitem|default:'' == '1'}>
<{$block.lang_fullitem}>
diff --git a/templates/blocks/publisher_items_recent.tpl b/templates/blocks/publisher_items_recent.tpl index 33488a4f..96b3e1ea 100644 --- a/templates/blocks/publisher_items_recent.tpl +++ b/templates/blocks/publisher_items_recent.tpl @@ -1,32 +1,32 @@
<{$newitems.alt}> <{$newitems.link}> - <{if $block.show_order == '1'}> + <{if $block.show_order|default:'' == '1'}> (<{$newitems.new}>) <{/if}>
- <{if $block.show_summary == '1'}><{$newitems.summary}><{/if}> + <{if $block.show_summary|default:'' == '1'}><{$newitems.summary}><{/if}>
- <{if $block.show_poster == '1'}><{$newitems.lang_poster}> <{$newitems.poster}> |<{/if}> - <{if $block.show_date == '1'}> <{$newitems.date}> <{/if}> - <{if $block.show_category == '1'}> | <{$newitems.lang_category}> : <{$newitems.categorylink}> <{/if}> - <{if $block.show_hits == '1'}>| <{$newitems.hits}> <{$newitems.lang_hits}> |<{/if}> - <{if $block.show_comment == '1' && $newitems.cancomment && $newitems.comment != -1}><{$newitems.comment}> |<{/if}> - <{if $block.show_rating == '1'}><{$newitems.rating}><{/if}> + <{if $block.show_poster|default:'' == '1'}><{$newitems.lang_poster}> <{$newitems.poster}> |<{/if}> + <{if $block.show_date|default:'' == '1'}> <{$newitems.date}> <{/if}> + <{if $block.show_category|default:'' == '1'}> | <{$newitems.lang_category}> : <{$newitems.categorylink}> <{/if}> + <{if $block.show_hits|default:'' == '1'}>| <{$newitems.hits}> <{$newitems.lang_hits}> |<{/if}> + <{if $block.show_comment|default:false == '1' && $newitems.cancomment|default:false && $newitems.comment|default:0 != -1}><{$newitems.comment}> |<{/if}> + <{if $block.show_rating|default:'' == '1'}><{$newitems.rating}><{/if}>
-<{if $block.show_category == '1'}> <{/if}> -<{if $block.show_date == '1'}> <{/if}> -<{if $block.show_poster == '1'}> <{/if}> +<{if $block.show_category|default:'' == '1'}> <{/if}> +<{if $block.show_date|default:'' == '1'}> <{/if}> +<{if $block.show_poster|default:'' == '1'}> <{/if}> - <{foreach item=item from=$block.items}> + <{foreach item=item from=$block.items|default:false}> "> - <{if $block.show_category == '1'}><{/if}> - <{if $block.show_poster == '1'}><{/if}> - <{if $block.show_date == '1'}><{/if}> + <{if $block.show_category|default:'' == '1'}><{/if}> + <{if $block.show_poster|default:'' == '1'}><{/if}> + <{if $block.show_date|default:'' == '1'}><{/if}> <{/foreach}>
<{$block.lang_title}><{$block.lang_category}><{$block.lang_date}><{$block.lang_poster}><{$block.lang_category}><{$block.lang_date}><{$block.lang_poster}>
- <{if $block.show_image == '1'}> + <{if $block.show_image|default:'' == '1'}> <{$item.alt}>
<{/if}> <{$item.itemlink}> - <{if $block.show_summary == '1'}>
<{$item.summary}><{/if}>
+ <{if $block.show_summary|default:'' == '1'}>
<{$item.summary}><{/if}>
- <{if $block.show_hits == '1'}><{$item.hits}><{/if}> - <{if $block.show_comment == '1' && $item.cancomment && $item.comment != -1}> | <{$item.comment}><{/if}> + <{if $block.show_hits|default:'' == '1'}><{$item.hits}><{/if}> + <{if $block.show_comment|default:'' == '1' && $item.cancomment|default:false && $item.comment|default:0 != -1}> | <{$item.comment}><{/if}>
<{$item.categorylink}><{$item.poster}><{$item.date}><{$item.categorylink}><{$item.poster}><{$item.date}>
- <{if $block.show_morelink == '1'}> + <{if $block.show_morelink|default:'' == '1'}>
<{$block.lang_visitItem}>
diff --git a/templates/blocks/publisher_items_spot.tpl b/templates/blocks/publisher_items_spot.tpl index 1cda6699..743425e9 100644 --- a/templates/blocks/publisher_items_spot.tpl +++ b/templates/blocks/publisher_items_spot.tpl @@ -1,5 +1,5 @@ -<{if $block.display_cat_image}> -<{if $block.category && $block.category.image_path != ''}> +<{if $block.display_cat_image|default:false}> +<{if $block.category|default:false && $block.category.image_path|default:'' != ''}>
<{$block.category.name}> @@ -8,26 +8,26 @@ <{/if}> <{/if}> -<{if $block.display_type=='block'}> - <{foreach item=item from=$block.items}> +<{if $block.display_type|default:'' == block'}> + <{foreach item=item from=$block.items|default:false}> <{include file="db:publisher_singleitem_block.tpl" item=$item}> <{/foreach}> <{else}> <{foreach item=item from=$block.items name=spotlight}> - <{if $item.summary != ''}> + <{if $item.summary|default:'''}>
- <{if $item.showline}> + <{if $item.showline|default:false}>
<{/if}> - <{if $block.truncate}> - <{if $block.display_readmore}> + <{if $block.truncate|default:false}> + <{if $block.display_readmore|default:false}>
<{$block.lang_readmore}>
<{/if}> diff --git a/templates/blocks/publisher_latest_news.tpl b/templates/blocks/publisher_latest_news.tpl index 6fe48e1b..62d957e9 100644 --- a/templates/blocks/publisher_latest_news.tpl +++ b/templates/blocks/publisher_latest_news.tpl @@ -1,42 +1,42 @@ -<{if $block.template == 'normal'}> - <{if $block.latestnews_scroll }> +<{if $block.template|default:'' == 'normal'}> + <{if $block.latestnews_scroll|default:false}> <{/if}> <{section name=i loop=$block.columns}>
    <{foreach item=item from=$block.columns[i]}>
  • <{$item.title}>
    - <{if $item.display_item_image}> - <{if $item.item_image != ''}> + <{if $item.display_item_image|default:false}> + <{if $item.item_image|default:'' != ''}> <{$item.alt}>
    <{else}> <{$item.alt}> <{/if}> <{/if}> - <{if $item.display_summary}> + <{if $item.display_summary|default:false}> <{$item.text}>
    <{/if}> <{$item.more}>

    - <{if $item.topic_title}> + <{if $item.topic_title|default:false}> <{$block.lang_category}> : <{$item.topic_title}> | <{/if}> - <{if $item.poster}> + <{if $item.poster|default:false}> <{$block.lang_poster}> <{$item.poster}> | <{/if}> - <{if $item.posttime}> + <{if $item.posttime|default:false}> <{$item.posttime}> | <{/if}> - <{if $item.read }> + <{if $item.read|default:false}> <{$item.read}> <{$block.lang_reads}> | <{/if}> - <{if $item.comment && $item.cancomment && $item.comment != -1}> + <{if $item.comment|default:false && $item.cancomment|default:false && $item.comment|default:0 != -1}> <{$item.comment}> <{/if}> @@ -46,18 +46,18 @@ <{/section}>
    <{$block.topiclink}><{$block.morelink}><{$block.archivelink}><{$block.submitlink}> - <{if $block.latestnews_scroll }> + <{if $block.latestnews_scroll|default:false}>
<{/if}> <{/if}> -<{if $block.template == 'extended'}> +<{if $block.template|default:'' == 'extended'}> <{php}> $GLOBALS['xoTheme']->addStylesheet(PUBLISHER_URL . '/assets/css/publisher.css'); <{/php}> - <{if $block.latestnews_scroll }> + <{if $block.latestnews_scroll|default:false}> <{/if}> @@ -71,25 +71,25 @@
- <{if $item.topic_title}> + <{if $item.topic_title|default:false}> <{$block.lang_category}> : <{$item.topic_title}> | <{/if}> - <{if $item.poster}> + <{if $item.poster|default:false}> <{$block.lang_poster}> <{$item.poster}> | <{/if}> - <{if $item.posttime}> + <{if $item.posttime|default:false}> <{$item.posttime}> | <{/if}> - <{if $item.read }> + <{if $item.read|default:false}> <{$item.read}> <{$block.lang_reads}> | <{/if}> - <{if $item.comment && $item.cancomment && $item.comment != -1}> + <{if $item.comment|default:false && $item.cancomment|default:false && $item.comment|default:0 != -1}> <{$item.comment}> <{/if}>
- <{if $item.display_item_image}> - <{if $item.item_image != ''}> + <{if $item.display_item_image|default:false}> + <{if $item.item_image|default:'' != ''}> <{$item.alt}> <{else}> <{$item.alt}> @@ -100,9 +100,9 @@ - <{if $block.letters != 0}> + <{if $block.letters|default:0 != 0}>
- <{if $item.display_summary}> + <{if $item.display_summary|default:false}> <{$item.text}>
<{/if}> <{$item.more}> @@ -112,7 +112,7 @@
<{$item.print}><{$item.pdf}><{$item.email}> - <{if $item.display_adminlink}> <{$item.admin}> + <{if $item.display_adminlink|default:false}> <{$item.admin}> <{/if}>
@@ -121,11 +121,11 @@ <{/section}>
- <{if $block.latestnews_scroll }>
<{/if}> + <{if $block.latestnews_scroll|default:false}><{/if}>

<{$block.morelink}><{$block.archivelink}><{$block.submitlink}>
<{/if}> -<{if $block.template == 'ticker'}> +<{if $block.template|default:'' == 'ticker'}> <{section name=i loop=$block.columns}> @@ -137,7 +137,7 @@ <{/if}> -<{if $block.template == 'slider1'}> +<{if $block.template|default:'' == 'slider1'}> <{php}>$GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/jquery.js'); $GLOBALS['xoTheme']->addStylesheet(PUBLISHER_URL . '/assets/css/jquery.popeye.css'); @@ -229,7 +229,7 @@ <{/if}> -<{if $block.template == 'slider2'}> +<{if $block.template|default:'' == 'slider2'}> <{php}>$GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/jquery.js'); $GLOBALS['xoTheme']->addStylesheet(PUBLISHER_URL . '/assets/css/jquery.popeye.css'); diff --git a/templates/publisher_addfile.tpl b/templates/publisher_addfile.tpl index 4e7dc6bf..c4a0b74e 100644 --- a/templates/publisher_addfile.tpl +++ b/templates/publisher_addfile.tpl @@ -10,10 +10,10 @@ <{foreach item=element from=$form.elements}> - <{if $element.hidden !== true}> + <{if $element.hidden|default:false !== true}> <{$element.caption}> <{if $element.required}> *<{/if}> - <{if $element.description}> + <{if $element.descriptiondefault:''}>
<{$element.description}>
<{/if}> @@ -26,6 +26,6 @@ -<{if $isAdmin == 1}> +<{if $isAdmin|default:0 == 1}> <{/if}> diff --git a/templates/publisher_archive.tpl b/templates/publisher_archive.tpl index c165a869..0017f9fe 100644 --- a/templates/publisher_archive.tpl +++ b/templates/publisher_archive.tpl @@ -17,23 +17,23 @@ <{/foreach}> -<{if $show_articles === true}> +<{if $show_articles|default:false === true}> - <{if $showcategory == 1}> + <{if $showcategory|default:0 == 1}> <{/if}> - <{if $showposter == 1}> + <{if $showposter|default:0 == 1}> <{/if}> - <{if $showhits == 1}> + <{if $showhits|default:0 == 1}> <{/if}> - <{if $showdate == 1}> + <{if $showdate|default:0 == 1}> <{/if}> - <{if $showpdfbutton == 1 OR $showprintlink == 1 OR $showemaillink == 1}> + <{if $showpdfbutton|default:0 == 1 OR $showprintlink|default:0 == 1 OR $showemaillink|default:0 == 1}> <{/if}> @@ -42,38 +42,38 @@ <{foreach item=story from=$stories}> "> - <{if $showcategory == 1}> + <{if $showcategory|default:0 == 1}> <{/if}> - <{if $showposter == 1}> + <{if $showposter|default:0 == 1}> <{/if}> - <{if $showhits == 1}> + <{if $showhits|default:0 == 1}> <{/if}> - <{if $showdate == 1}> + <{if $showdate|default:0 == 1}> <{/if}> - <{if $showpdfbutton == 1 OR $showprintlink == 1 OR $showemaillink == 1}> + <{if $showpdfbutton|default:0 == 1 OR $showprintlink|default:0 == 1 OR $showemaillink|default:0 == 1}> diff --git a/templates/publisher_author_items.tpl b/templates/publisher_author_items.tpl index a9e2a0a7..bb883b61 100644 --- a/templates/publisher_author_items.tpl +++ b/templates/publisher_author_items.tpl @@ -2,7 +2,7 @@


<{$lang_articles}><{$lang_category}><{$lang_author}><{$lang_views}><{$lang_date}><{$lang_actions}>
- <{if $showmainimage == 1}> + <{if $showmainimage|default:0 == 1}> <{$story.cleantitle}>
<{/if}>   <{$story.title}> - <{if $showsummary == 1}>
+ <{if $showsummary|default:0 == 1}>
  <{$story.summary}> <{/if}> - <{if $showcomment == 1 && $story.cancomment && $story.comment != -1}> + <{if $showcomment|default:0 == 1 && $story.cancomment|default:false && $story.comment|default:0 != -1}>
  <{$story.comment}> <{/if}>
<{$story.category}><{$story.author}><{$story.counter}><{$story.date}> - <{if $showpdfbutton == 1}> + <{if $showpdfbutton|default:0 == 1}> <{$lang_pdf}> <{/if}> - <{if $showprintlink == 1}> + <{if $showprintlink|default:0 == 1}> <{$lang_printer}> <{/if}> - <{if $showemaillink == 1}> + <{if $showemaillink|default:0 == 1}> "> <{/if}>
- <{if $total_items == 0}> + <{if $total_items|default:false == 0}> @@ -10,7 +10,7 @@ <{foreach item=category from=$categories}> - <{if $permRating && $displayrating}> + <{if $permRating|default:false && $displayrating|default:false}> - <{if $displayhits}> + <{if $displayhits|default:false}> <{/if}> - <{if $permRating && $displayrating}> + <{if $permRating|default:false && $displayrating|default:false}> <{/if}> - <{foreach item=item from=$category.items}> + <{foreach item=item from=$category.items|default:false}> - <{if $displayhits}> + <{if $displayhits|default:false}> <{/if}> - <{if $permRating && $displayrating}> + <{if $permRating|default:false && $displayrating|default:false}> <{/if}> <{/foreach}> - <{if $displayhits}> + <{if $displayhits|default:false}> <{/if}> - <{if $permRating && $displayrating}> + <{if $permRating|default:false && $displayrating|default:false}> <{/if}> - <{if $permRating && $displayrating}> + <{if $permRating|default:false && $displayrating|default:false}>
<{$smarty.const._MD_PUBLISHER_NO_AUTHOR_ITEMS}>
<{else}> @@ -23,47 +23,47 @@
<{$smarty.const._CO_PUBLISHER_DATESUB}>  <{$smarty.const._CO_PUBLISHER_TITLE}><{$smarty.const._MD_PUBLISHER_HITS}>   <{$smarty.const._MD_PUBLISHER_VOTE_RATING}>
<{$item.published}> - <{if $displaymainimage}> + <{if $displaymainimage|default:false}> <{$item.cleantitle}> <{/if}>   <{$item.link}> - <{if $displaysummary}> + <{if $displaysummary|default:false}>
  <{$item.summary}> <{/if}> - <{if $displaycomment && $item.cancomment && $item.comment != -1}> + <{if $displaycomment|default:false && $item.cancomment|default:false && $item.comment|default:0 != -1}>
  <{$item.comment}> <{/if}>
<{$item.hits}>   <{$item.rating}>

<{$smarty.const._MD_PUBLISHER_TOTAL_ITEMS}><{$category.count_items}>

<{$smarty.const._MD_PUBLISHER_TOTAL_HITS}><{$category.count_hits}>
 
<{else}> diff --git a/templates/publisher_categories_table.tpl b/templates/publisher_categories_table.tpl index 05dd2e9d..3c9813c4 100644 --- a/templates/publisher_categories_table.tpl +++ b/templates/publisher_categories_table.tpl @@ -1,11 +1,11 @@ -
<{$navbar}>
+
<{$navbar|default:''}>
- <{if $displayarticlescount}> + <{if $displayarticlescount|default:false}> <{/if}> - <{if $displaylastitem == 1}> + <{if $displaylastitem|default:0 == 1}> <{/if}> @@ -14,21 +14,21 @@ <{foreach item=category from=$categories}> - <{if $displayarticlescount}> + <{if $displayarticlescount|default:false}> <{/if}> - <{if $displaylastitem == 1}> + <{if $displaylastitem|default:0 == 1}> <{/if}> - <{if $category.subcats}> + <{if $category.subcats|default:false}> <{foreach item=subcat from=$category.subcats}> - <{if $displayarticlescount}> + <{if $displayarticlescount|default:false}> <{/if}> - <{if $displaylastitem == 1}> + <{if $displaylastitem|default:0 == 1}> <{/if}> @@ -87,4 +87,4 @@ <{/if}> <{/foreach}>
<{$smarty.const._CO_PUBLISHER_CATEGORY}><{$smarty.const._MD_PUBLISHER_ITEMS}><{$smarty.const._MD_PUBLISHER_LAST_SMARTITEM}>
- <{if $category.image_path}> - <{if $isAdmin == 1}> + <{if $category.image_path|default:''}> + <{if $isAdmin|default:0 == 1}> <{$lang_editcategory|default:false}>  <{else}> <{$category.name}>  <{/if}> <{else}> - <{if $isAdmin == 1}> + <{if $isAdmin|default:0 == 1}> <{$lang_editcategory|default:false}>  <{else}> <{$category.name}>  <{/if}> <{/if}> - <{if $selected_category == $category.categoryid}> + <{if $selected_category|default:0 == $category.categoryid|default:0}> <{$category.name}> <{else}> <{$category.categorylink}> @@ -37,22 +37,22 @@
<{$category.description}>
- <{if $category.total != 0}> <{$category.total}> <{/if}> + <{if $category.total|default:0 != 0}> <{$category.total}> <{/if}> <{$category.last_title_link|default:''}>
- <{if $subcat.image_path}> - <{if $isAdmin == 1}> + <{if $subcat.image_path|default:false}> + <{if $isAdmin|default:0 == 1}> <{$lang_editcategory|default:false}>  <{$subcat.categorylink}> @@ -61,7 +61,7 @@  <{$subcat.categorylink}> <{/if}> <{else}> - <{if $isAdmin == 1}> + <{if $isAdmin|default:0 == 1}> <{$lang_editcategory|default:false}> @@ -70,16 +70,16 @@ <{$lang_editcategory|default:false}>  <{$subcat.categorylink}> <{/if}> - <{if $displaysubcatdsc == 1}> + <{if $displaysubcatdsc|default:0 == 1}> <{$subcat.description}> <{/if}> <{/if}>
<{$subcat.total}><{$subcat.last_title_link|default:''}>
-
<{$navbar}>
+
<{$navbar|default:''}>
diff --git a/templates/publisher_display_full.tpl b/templates/publisher_display_full.tpl index f024a959..210e4ec4 100644 --- a/templates/publisher_display_full.tpl +++ b/templates/publisher_display_full.tpl @@ -2,9 +2,9 @@ -<{if $indexpage|default:false || $category.subcats || ($category && $display_category_summary)}> +<{if $indexpage|default:false || $category.subcats|default:false || ($category|default:false && $display_category_summary|default:false)}> - <{if $collapsable_heading == 1}> + <{if $collapsable_heading|default:0 == 1}> <{/if}>
<{/if}> <{if $items|default:''}> - <{if $collapsable_heading == 1}> + <{if $collapsable_heading|default:0 == 1}>
@@ -35,13 +35,13 @@
<{$smarty.const._MD_PUBLISHER_ITEMS_INFO}> <{/if}> -
<{$navbar}>
+
<{$navbar|default:''}>
<{foreach item=item from=$items}> <{include file="db:publisher_singleitem.tpl" item=$item}> <{/foreach}> -
<{$navbar}>
- <{if $collapsable_heading == 1}> +
<{$navbar|default:''}>
+ <{if $collapsable_heading|default:0 == 1}>
<{/if}> <{/if}> diff --git a/templates/publisher_display_list.tpl b/templates/publisher_display_list.tpl index 1cfcc179..628bd5dd 100644 --- a/templates/publisher_display_list.tpl +++ b/templates/publisher_display_list.tpl @@ -3,7 +3,7 @@

<{$lang_category_summary}>

<{$category.description}>
-<{if $category && $displaylastitem == 1 && $items}> +<{if $category|default:false && $displaylastitem|default:0 == 1 && $items|default:false}>
<{$smarty.const._MD_PUBLISHER_LAST_SMARTITEM}> : <{$category.last_title_link}>
@@ -15,15 +15,15 @@ <{include file='db:publisher_categories_table.tpl'}>
<{/if}> -<{if $items}> - <{if $collapsable_heading == 1}> +<{if $items|default:false}> + <{if $collapsable_heading|default:0 == 1}>
 <{$lang_items_title}>
<{else}> - <{if $subcats}> + <{if $subcats|default:false}>
<{$lang_items_title}>
<{/if}> <{/if}> @@ -35,34 +35,34 @@
<{$item.titlelink}>
- <{if $show_subtitle && $item.subtitle}> + <{if $show_subtitle|default:false && $item.subtitle|default:false}> <{$item.subtitle}>
<{/if}> - <{if $display_category == 1}> <{$smarty.const._MD_PUBLISHER_CATEGORY}> : <{$item.category}> | <{/if}> - <{if $display_poster == 1}> <{$smarty.const._MD_PUBLISHER_POSTER}> <{$item.who}><{/if}> - <{if $display_date_col == 1}> | <{$item.datesub}> <{/if}> <{if $display_hits_col == 1}> | + <{if $display_category|default:0 == 1}> <{$smarty.const._MD_PUBLISHER_CATEGORY}> : <{$item.category}> | <{/if}> + <{if $display_poster|default:0 == 1}> <{$smarty.const._MD_PUBLISHER_POSTER}> <{$item.who}><{/if}> + <{if $display_date_col|default:0 == 1}> | <{$item.datesub}> <{/if}> <{if $display_hits_col|default:0 == 1}> | <{$item.counter}> <{$smarty.const._MD_PUBLISHER_TOTALHITS}> <{/if}> - <{if $display_commentlink == 1 && $item.cancomment && $item.comments != -1}> | <{$item.comments}><{/if}> + <{if $display_commentlink|default:0 == 1 && $item.cancomment|default:false && $item.comments|default:0 != -1}> | <{$item.comments}><{/if}>
- <{if $display_mainimage == 1}> - <{if $item.image_path!=''}> + <{if $display_mainimage|default:0 == 1}> + <{if $item.image_path|default:'' != ''}> <{$item.title}> <{else}> <{$item.title}> <{/if}> <{/if}> - <{if $display_summary == 1}><{$item.summary}>
<{/if}> + <{if $display_summary|default:0 == 1}><{$item.summary}>
<{/if}>
- <{if $display_readmore == 1}> + <{if $display_readmore|default:0 == 1}>
@@ -73,13 +73,13 @@ -
<{$navbar}>
- <{if $collapsable_heading == 1}> +
<{$navbar|default:''}>
+ <{if $collapsable_heading|default:0 == 1}>
<{/if}> <{/if}> -<{if !$subcats && !$items}> +<{if $subcats|default:0 == 0 && $items|default:0 == 0}>
<{$smarty.const._MD_PUBLISHER_EMPTY}>
<{/if}> diff --git a/templates/publisher_display_summary.tpl b/templates/publisher_display_summary.tpl index 5866557f..1e5c7bed 100644 --- a/templates/publisher_display_summary.tpl +++ b/templates/publisher_display_summary.tpl @@ -6,7 +6,7 @@ <{if $indexpage || $category.subcats || ($category && $display_category_summary)}> - <{if $collapsable_heading == 1}> + <{if $collapsable_heading|default:0 == 1}>
 <{$lang_category_summary}> @@ -18,14 +18,14 @@ <{include file='db:publisher_categories_table.tpl'}> - <{if $collapsable_heading == 1}> + <{if $collapsable_heading|default:0 == 1}>
<{/if}>
<{/if}> -<{if $items}> - <{if $collapsable_heading == 1}> +<{if $items|default:false}> + <{if $collapsable_heading|default:0 == 1}>
@@ -34,16 +34,16 @@
<{$smarty.const._MD_PUBLISHER_ITEMS_INFO}> <{/if}> -
<{$navbar}>
+
<{$navbar|default:''}>
- <{if $display_date_col == 1}> + <{if $display_date_col|default:0 == 1}> - <{/if}> <{if $display_hits_col == 1}> + <{/if}> <{if $display_hits_col|default:0 == 1}> <{/if}> - <{if $display_poster == 1}> + <{if $display_poster|default:0 == 1}> <{/if}> @@ -51,43 +51,43 @@ <{foreach item=item from=$items}> - <{if $display_date_col == 1}> + <{if $display_date_col|default:0 == 1}> <{/if}> - <{if $display_hits_col == 1}> + <{if $display_hits_col|default:0 == 1}> <{/if}> - <{if $display_poster == 1}> + <{if $display_poster|default:0 == 1}> @@ -96,8 +96,8 @@ <{/foreach}>
<{$smarty.const._CO_PUBLISHER_TITLE}><{$smarty.const._MD_PUBLISHER_DATESUB}><{$smarty.const._MD_PUBLISHER_HITS}><{$smarty.const._MD_PUBLISHER_AUTHOR}>
- <{if $display_mainimage == 1}> - <{if $item.image_path!=''}> + <{if $display_mainimage|default:0 == 1}> + <{if $item.image_path|default:'' != ''}> <{$item.title}> <{else}> <{$item.title}> <{/if}> <{/if}> <{$item.titlelink}> - <{if $show_subtitle && $item.subtitle}> + <{if $show_subtitle|default:false && $item.subtitle|default:false}>
<{$item.subtitle}> <{/if}>
- <{if $display_summary == 1}> + <{if $display_summary|default:0 == 1}> <{$item.summary}>
<{/if}> - <{if $display_readmore == 1}> + <{if $display_readmore|default:0 == 1}> <{$smarty.const._MD_PUBLISHER_READMORE}>
<{/if}> - <{if $display_category == 1}> <{$item.category}> | <{/if}> - <{if $display_commentlink == 1 && $item.cancomment && $item.comments != -1}><{$item.comments}><{/if}> + <{if $display_category|default:0 == 1}> <{$item.category}> | <{/if}> + <{if $display_commentlink|default:0 == 1 && $item.cancomment|default:false && $item.comments|default:0 != -1}><{$item.comments}><{/if}>
<{$item.datesub}>
<{$item.counter}>
<{$item.who}>
-
<{$navbar}>
- <{if $collapsable_heading == 1}> +
<{$navbar|default:''}>
+ <{if $collapsable_heading|default:0 == 1}>
<{/if}> <{/if}> diff --git a/templates/publisher_display_wfsection.tpl b/templates/publisher_display_wfsection.tpl index d10e182d..de7d0375 100644 --- a/templates/publisher_display_wfsection.tpl +++ b/templates/publisher_display_wfsection.tpl @@ -1,6 +1,6 @@ <{include file='db:publisher_header.tpl'}> - -<{if $indexpage}> +<{if $indexpage|default:false}>
<{foreach item=category from=$categories}>
<{$category.categorylink}>
- <{if $category.image_path}> + <{if $category.image_path|default:''}> <{$category.name}> <{/if}> <{$category.description}>
- <{if $category.subcats}> + <{if $category.subcats|default:false}>
<{$category.lang_subcategories}>
<{foreach name=loop item=subcat from=$category.subcats}> <{$subcat.categorylink}><{if $smarty.foreach.loop.iteration < $category.subcatscount}> -<{/if}> <{/foreach}> @@ -37,7 +37,7 @@ <{foreach item=category from=$categories}>
- <{if $category.image_path}> + <{if $category.image_path|default:''}> <{$category.name}> <{/if}> <{$category.description}>
@@ -45,7 +45,7 @@ <{$category.header}>
- <{if $category.subcats}> + <{if $category.subcats|default:false}>
<{$category.lang_subcategories}>
<{foreach name=loop item=subcat from=$category.subcats}> <{$subcat.categorylink}><{if $smarty.foreach.loop.iteration < $category.subcatscount}> -<{/if}> <{/foreach}> @@ -56,12 +56,12 @@
<{/if}> -
- <{if $items}> - <{if $collapsable_heading == 1}> + <{if $items|default:false}> + <{if $collapsable_heading|default:0 == 1}>
 <{$lang_items_title}> @@ -69,13 +69,13 @@
<{$smarty.const._MD_PUBLISHER_ITEMS_INFO}> <{/if}> -
<{$navbar}>
+
<{$navbar|default:''}>
<{foreach item=item from=$items}>
- <{if $display_mainimage == 1}> - <{if $item.image_path!=''}> + <{if $display_mainimage|default:0 == 1}> + <{if $item.image_path|default:'' != ''}> <{$item.title}> <{else}> <{$item.title}> @@ -83,19 +83,19 @@ <{/if}>
<{$item.titlelink}>
- <{if $show_subtitle && $item.subtitle}> + <{if $show_subtitle|default:false && $item.subtitle|default:false}> <{$item.subtitle}>
<{/if}> - <{if $display_category == 1}> <{$smarty.const._MD_PUBLISHER_CATEGORY}> : <{$item.category}> | <{/if}> - <{if $display_poster == 1}> <{$smarty.const._MD_PUBLISHER_POSTER}> <{$item.who}><{/if}> - <{if $display_date_col == 1}> | <{$item.datesub}> <{/if}> <{if $display_hits_col == 1}> | + <{if $display_category|default:0 == 1}> <{$smarty.const._MD_PUBLISHER_CATEGORY}> : <{$item.category}> | <{/if}> + <{if $display_poster|default:0 == 1}> <{$smarty.const._MD_PUBLISHER_POSTER}> <{$item.who}><{/if}> + <{if $display_date_col|default:0 == 1}> | <{$item.datesub}> <{/if}> <{if $display_hits_col|default:0 == 1}> | <{$item.counter}> <{$smarty.const._MD_PUBLISHER_TOTALHITS}> <{/if}> - <{if $display_commentlink == 1 && $item.cancomment && $item.comments != -1}> | <{$item.comments}><{/if}> + <{if $display_commentlink|default:0 == 1 && $item.cancomment|default:false && $item.comments|default:0 != -1}> | <{$item.comments}><{/if}>
-<{if $display_summary == 1}> <{$item.summary}>
<{/if}> +<{if $display_summary|default:0 == 1}> <{$item.summary}>
<{/if}>
@@ -103,7 +103,7 @@
- <{if $display_readmore == 1}> + <{if $display_readmore|default:0 == 1}>
<{/if}> @@ -112,10 +112,10 @@ <{/foreach}>
-
<{$navbar}>
+
<{$navbar|default:''}>
<{$press_room_footer}> - <{if $collapsable_heading == 1}> + <{if $collapsable_heading|default:0 == 1}>
<{/if}> <{/if}> diff --git a/templates/publisher_footer.tpl b/templates/publisher_footer.tpl index 80b6e03f..6c4c3ef7 100644 --- a/templates/publisher_footer.tpl +++ b/templates/publisher_footer.tpl @@ -2,11 +2,11 @@ <{$indexfooter}> <{/if}> -<{if $isAdmin == 1}> +<{if $isAdmin|default:0 == 1}> <{/if}> -<{if ($commentatarticlelevel|default:false && $item.cancomment) || $com_rule|default:0 != 0}> +<{if ($commentatarticlelevel|default:false && $item.cancomment|default:false) || $com_rule|default:0 != 0}>
diff --git a/templates/publisher_header.tpl b/templates/publisher_header.tpl index eb060452..b97d02c5 100644 --- a/templates/publisher_header.tpl +++ b/templates/publisher_header.tpl @@ -43,9 +43,9 @@ <{if $publisher_display_breadcrumb|default:false}> - <{if $module_home || $categoryPath}> + <{if $module_home|default:false || $categoryPath|default:false}>