Skip to content

Commit

Permalink
added smarty defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
ggoffy committed Aug 8, 2021
1 parent 5595ea5 commit 28db819
Show file tree
Hide file tree
Showing 70 changed files with 708 additions and 708 deletions.
2 changes: 1 addition & 1 deletion docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<hr>
- added votetype column in update (goffy)
- added rating selection in item form (mamba)

- added smarty defaults (goffy)

<h5>1.08 Alpha 3 [2021-01-01]</h5> Dev: XOOPS 2.5.11, PHP 7.4.13, PHP 8.0
<hr>
Expand Down
4 changes: 2 additions & 2 deletions templates/blocks/publisher_category_items_sel.tpl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<form name="publisher_category_items_sel" action="javascript:void(0)">
<table>
<{foreach item=category from=$block.categories}>
<{foreach item=category from=$block.categories|default:false}>
<tr>
<td style="padding-right: 5px;" align="right" valign="top">
<strong><{$category.name}></strong> <br>
<select style="width: 140px;" name="publisher_category_item_link" title="publisher_category_item_link" onchange="location=this.options[this.selectedIndex].value">
<{foreach item=item from=$category.items}>
<{foreach item=item from=$category.items|default:false}>
<option title="<{$item.title}>" value="<{$item.itemurl}>"><{$item.title}></option>
<{/foreach}> </select>
</td>
Expand Down
4 changes: 2 additions & 2 deletions templates/blocks/publisher_date_to_date.tpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="outer" cellspacing="1">
<div><h4><{$block.lang_articles_from_to}></h4></div>
<div><h4><{$block.lang_articles_from_to|default:''}></h4></div>
<div>
<ul>
<{foreach item=item from=$block.items}>
<{foreach item=item from=$block.items|default:false}>
<li><{$item.itemlink}></li>
<{/foreach}>
</ul>
Expand Down
10 changes: 5 additions & 5 deletions templates/blocks/publisher_items_columns.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<{if $block.template == 'normal'}>
<{if $block.template|default:'' == 'normal'}>
<div style="width:100%;">
<{section name=i loop=$block.columns}>
<div style="width: <{$block.columnwidth}>%;" class="publisher-left">
Expand All @@ -13,13 +13,13 @@
</h4>
<{if $block.display_datemainitem == '1'}><{$item.date}> <{/if}>
<p>
<{if $item.item_image != ''}>
<{if $item.item_image|default:'' != ''}>
<a href="<{$item.itemurl}>"><img src="<{$item.item_image}>" alt="<{$item.item_cleantitle}>" title="<{$item.item_cleantitle}>" align="left" width="100"></a>
<{/if}> <{$item.item_summary}>
</p>
</div>

<{if $item.subitem}>
<{if $item.subitem|default:false}>
<strong class="publisher-more"><{$smarty.const._MB_PUBLISHER_MORE}></strong>
<ul class="publisher-links">
<{foreach item=subitem from=$item.subitem}>
Expand All @@ -35,7 +35,7 @@
<{/section}>
</div>
<{/if}>
<{if $block.template == 'extended'}>
<{if $block.template|default:'' == 'extended'}>
<div style="width:100%;">
<{section name=i loop=$block.columns}>
<div style="width: <{$block.columnwidth}>%;" class="publisher-left">
Expand All @@ -46,7 +46,7 @@
</h4><{if $block.display_datemainitem == '1'}><{$item.date}> <{/if}>
<div style="float:right; width:60%;">
<div class="publisher-content clearfix">
<{if $item.item_image != ''}>
<{if $item.item_image|default:'' != ''}>
<a href="<{$item.itemurl}>"><img src="<{$item.item_image}>" alt="<{$item.item_cleantitle}>" align="right" width="100"></a>
<{/if}>
<p><{$item.item_summary}></p>
Expand Down
4 changes: 2 additions & 2 deletions templates/blocks/publisher_items_menu.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<tr>
<td id="mainmenu">
<{if $block.currentcat|default:''}> <{$block.currentcat}> <{/if}>
<{foreach item=category from=$block.categories}>
<{foreach item=category from=$block.categories|default:false}>
<{$category.categoryLink}>
<{if $category.items|default:''}>
<{foreach item=item from=$category.items}> <{$item.titleLink}> <{/foreach}>
<{foreach item=item from=$category.items|default:false}> <{$item.titleLink}> <{/foreach}>
<{/if}>
<{/foreach}>
</td>
Expand Down
18 changes: 9 additions & 9 deletions templates/blocks/publisher_items_new.tpl
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<table cellpadding="0" cellspacing="0" border="0">
<{foreach item=newitems from=$block.newitems|default:null}>
<tr class="<{cycle values="even,odd"}>">
<{if $newitems.image}>
<{if $newitems.image|default:false}>
<td>
<a href="<{$newitems.itemurl}>"><img style="padding: 1px; margin: 2px; border: 1px solid #c3c3c3;" width="50" src="<{$newitems.image}>" title="<{$newitems.alt}>" alt="<{$newitems.alt}>"></a>
</td>
<{/if}>
<td>
<strong><{$newitems.link}></strong>
<{if $block.show_order == '1'}>
<{if $block.show_order|default:'' == '1'}>
(<{$newitems.new}>)
<{/if}>
<br>
<{if $block.show_summary == '1'}><{$newitems.summary}><{/if}>
<{if $block.show_summary|default:'' == '1'}><{$newitems.summary}><{/if}>
<br>
<small>
<{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}>
</small>

</td>
Expand Down
16 changes: 8 additions & 8 deletions templates/blocks/publisher_items_random_item.tpl
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<{foreach item=items from=$block.items}>
<{if $block.display_item_image == '1'}>
<{if $block.display_item_image|default:false == '1'}>
<a href="<{$block.url}>"><img src="<{$block.item_image}>" alt="<{$block.alt}>" title="<{$block.alt}>" style="padding:5px;" align=left></a><br>
<{/if}>
<strong><{$block.titlelink}></strong><br>
<{if $block.display_summary == '1'}><{$block.content}><br><{/if}>
<{if $block.display_summary|default:false == '1'}><{$block.content}><br><{/if}>
<small>
<{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}>
</small>

<{if $block.display_lang_fullitem == '1'}>
<{if $block.display_lang_fullitem|default:'' == '1'}>
<div align="right">
<a href='<{$block.url}>'><{$block.lang_fullitem}></a>
</div>
Expand Down
24 changes: 12 additions & 12 deletions templates/blocks/publisher_items_recent.tpl
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
<table class="outer" cellspacing="1">
<tr>
<td class="head"><{$block.lang_title}></td>
<{if $block.show_category == '1'}> <td class="head" align="left"><{$block.lang_category}></td><{/if}>
<{if $block.show_date == '1'}> <td class="head" align="right" width="120"><{$block.lang_date}></td><{/if}>
<{if $block.show_poster == '1'}> <td class="head" align="center" width="100"><{$block.lang_poster}></td><{/if}>
<{if $block.show_category|default:'' == '1'}> <td class="head" align="left"><{$block.lang_category}></td><{/if}>
<{if $block.show_date|default:'' == '1'}> <td class="head" align="right" width="120"><{$block.lang_date}></td><{/if}>
<{if $block.show_poster|default:'' == '1'}> <td class="head" align="center" width="100"><{$block.lang_poster}></td><{/if}>
</tr>
<{foreach item=item from=$block.items}>
<{foreach item=item from=$block.items|default:false}>
<tr class="<{cycle values=" even,odd"}>">
<td>
<{if $block.show_image == '1'}>
<{if $block.show_image|default:'' == '1'}>
<a href="<{$newitems.itemurl}>"><img src="<{$item.item_image}>" alt="<{$item.alt}>" title="<{$item.alt}>" align="left" style="padding:5px;"></a><br>
<{/if}>
<{$item.itemlink}>
<{if $block.show_summary == '1'}><br><{$item.summary}><{/if}><br>
<{if $block.show_summary|default:'' == '1'}><br><{$item.summary}><{/if}><br>
<small>
<{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}>
</small>
</td>

<{if $block.show_category == '1'}><td align="left"><{$item.categorylink}></td><{/if}>
<{if $block.show_poster == '1'}><td align="center"><{$item.poster}></td><{/if}>
<{if $block.show_date == '1'}><td align="right"><{$item.date}></td><{/if}>
<{if $block.show_category|default:'' == '1'}><td align="left"><{$item.categorylink}></td><{/if}>
<{if $block.show_poster|default:'' == '1'}><td align="center"><{$item.poster}></td><{/if}>
<{if $block.show_date|default:'' == '1'}><td align="right"><{$item.date}></td><{/if}>
</tr>
<{/foreach}>
</table>

<{if $block.show_morelink == '1'}>
<{if $block.show_morelink|default:'' == '1'}>
<div style="text-align:right; padding: 5px;">
<a href="<{$block.publisher_url}>"><{$block.lang_visitItem}></a>
</div>
Expand Down
26 changes: 13 additions & 13 deletions templates/blocks/publisher_items_spot.tpl
Original file line number Diff line number Diff line change
@@ -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:'' != ''}>
<div align="center">
<a href="<{$block.category.categoryurl}>" title="<{$block.category.name}>">
<img src="<{$block.category.image_path}>" width="185" height="80" alt="<{$block.category.name}>">
Expand All @@ -8,49 +8,49 @@
<{/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:'''}>
<div class="itemText" style="padding-left: 5px; padding-top: 5px;">
<div>
<img style="vertical-align: middle;" src="<{$block.publisher_url}>/assets/images/links/doc.png" alt="">&nbsp;<{$item.titlelink}>
<br>
<small>
<{if $block.display_who_link}> <{$block.lang_poster}> <{$item.who}><{/if}> <{if $block.display_when_link}> | <{$item.when}><{/if}> <{if $block.display_reads}> | <{$item.counter}> <{$block.lang_reads}> <{/if}> <{if $block.display_categorylink}> | <{$block.lang_category}> : <{$item.categorylink}><{/if}>
<{if $block.display_who_link|default:false}> <{$block.lang_poster}> <{$item.who}><{/if}> <{if $block.display_when_link|default:false}> | <{$item.when}><{/if}> <{if $block.display_reads|default:false}> | <{$item.counter}> <{$block.lang_reads}> <{/if}> <{if $block.display_categorylink|default:false}> | <{$block.lang_category}> : <{$item.categorylink}><{/if}>
</small>
</div>

<div>
<{if $block.display_item_image}>
<{if $item.image_path}>
<{if $block.display_item_image|default:false}>
<{if $item.image_path|default:''}>
<a href="<{$item.itemurl}>"><img class="publisher_item_image" src="<{$item.image_path}>" align="left" alt="<{$item.clean_title}>" title="<{$item.clean_title}>" style="width:120px"></a>
<{else}>
<a href="<{$item.itemurl}>"><img class="publisher_item_image" src="<{$block.publisher_url}>/assets/images/default_image.jpg" align="left" alt="<{$item.clean_title}>" title="<{$item.clean_title}>" style="width:120px"></a>
<{/if}>
<{/if}>
<{$item.summary}><br>

<{if $block.display_comment_link && $item.cancomment && $item.comments != -1}>
<{if $block.display_comment_link|default:false && $item.cancomment|default:false && $item.comments|default:0 != -1}>
<span style="font-size: 10px; float: left;"><a href="<{$item.itemurl}>"><{$item.comments}></a></span>
<{else}>
<span style="float: left;">&nbsp;</span>
<{/if}>
<{if $block.display_adminlink}>
<{if $block.display_adminlink|default:false}>
<span style="float: right; text-align: right;"><{$item.adminlink}></span>
<{/if}>
</div>
</div>
<div style="clear: both;"></div>
<{if $item.showline}>
<{if $item.showline|default:false}>
<div style="font-size: 10px; text-align: right; border-bottom: 1px dotted #000000;"></div>
<{/if}>
<{if $block.truncate}>
<{if $block.display_readmore}>
<{if $block.truncate|default:false}>
<{if $block.display_readmore|default:false}>
<div style="font-size: 10px; text-align: right;">
<a href="<{$item.itemurl}>"><{$block.lang_readmore}></a></div>
<{/if}>
Expand Down
Loading

0 comments on commit 28db819

Please sign in to comment.