summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2026-03-27 16:12:43 +0000
committerlsces <lester@lsces.co.uk>2026-03-27 16:12:43 +0000
commit9dee21c6981e7f5c6a683b6ed98d15b70ca57d42 (patch)
treeaf1bab1bf014d49dd478dfa6f2d97941a13af709 /templates
parentac4c2f886d616cf71575e6923c200eee0d249125 (diff)
downloadnewsletters-9dee21c6981e7f5c6a683b6ed98d15b70ca57d42.tar.gz
newsletters-9dee21c6981e7f5c6a683b6ed98d15b70ca57d42.tar.bz2
newsletters-9dee21c6981e7f5c6a683b6ed98d15b70ca57d42.zip
Figured what has been causing a problem with using && and || in smarty templates and related to mistake in processing {2} elements that should use curly brackets and not revert to square ones.
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/admin_list_newsletters.tpl2
-rwxr-xr-xtemplates/center_list_newsletters.tpl6
-rwxr-xr-xtemplates/edit_edition.tpl2
-rwxr-xr-xtemplates/edit_newsletter.tpl8
-rwxr-xr-xtemplates/list_newsletters.tpl2
-rwxr-xr-xtemplates/user_subscriptions.tpl4
-rwxr-xr-xtemplates/view_edition.tpl2
-rwxr-xr-xtemplates/view_newsletter.tpl2
8 files changed, 14 insertions, 14 deletions
diff --git a/templates/admin_list_newsletters.tpl b/templates/admin_list_newsletters.tpl
index bf92dd1..0f70c31 100755
--- a/templates/admin_list_newsletters.tpl
+++ b/templates/admin_list_newsletters.tpl
@@ -1,4 +1,4 @@
-{if !$newsletters or $gContent->isValid() or $smarty.request.new}
+{if !$newsletters || $gContent->isValid() || $smarty.request.new}
{include file="bitpackage:newsletters/edit_newsletter.tpl"}
{else}
{strip}
diff --git a/templates/center_list_newsletters.tpl b/templates/center_list_newsletters.tpl
index 73e7a5e..880607c 100755
--- a/templates/center_list_newsletters.tpl
+++ b/templates/center_list_newsletters.tpl
@@ -24,7 +24,7 @@
{$gContent->getParsedData()}
{/forminput}
</div>
- {if ($gContent->getField('allow_user_sub') eq 'y') or $gBitUser->hasPermission( 'p_newsletters_subscribe' )}
+ {if ($gContent->getField('allow_user_sub') eq 'y') || $gBitUser->hasPermission( 'p_newsletters_subscribe' )}
{form}
<input type="hidden" name="nl_id" value="{$gContent->mNewsletterId}" />
<div class="form-group">
@@ -67,10 +67,10 @@
*}
{foreach from=$newsletters item=nl key=nlId}
- {if $newsletters.individual ne 'y' or $newsletters.individual_p_subscribe_newsletters eq 'y'}
+ {if $newsletters.individual ne 'y' || $newsletters.individual_p_subscribe_newsletters eq 'y'}
<li class="item {cycle values='odd,even'}">
<div class="floaticon">
- {if $subs.$nlId.unsubscribe_all or $subs.$nlId.unsubscribe_date}
+ {if $subs.$nlId.unsubscribe_all || $subs.$nlId.unsubscribe_date}
<strong>{biticon ipackage="icons" iname="dialog-cancel" iexplain="Success" iforce="icon"}{tr}Unsubscribed{/tr}: {$subs.$nlId.unsubscribe_date|bit_short_date}</strong><br/>
<a href="{$smarty.const.NEWSLETTERS_PKG_URL}sub.php?nl_id={$nl.nl_id}&amp;sub=1">{tr}Subscribe{/tr}</a>
{elseif $subs.$nlId}
diff --git a/templates/edit_edition.tpl b/templates/edit_edition.tpl
index 5399f54..de49918 100755
--- a/templates/edit_edition.tpl
+++ b/templates/edit_edition.tpl
@@ -34,7 +34,7 @@
{/forminput}
</div>
- {if $gBitUser->hasPermission('p_use_content_templates') and $templates}
+ {if $gBitUser->hasPermission('p_use_content_templates') && $templates}
<div class="form-group">
{formlabel label="Template" for=""}
{forminput}
diff --git a/templates/edit_newsletter.tpl b/templates/edit_newsletter.tpl
index a2f3457..a655767 100755
--- a/templates/edit_newsletter.tpl
+++ b/templates/edit_newsletter.tpl
@@ -1,4 +1,4 @@
-{if !$newsletters or $gContent->isValid() or $smarty.request.new}
+{if !$newsletters || $gContent->isValid() || $smarty.request.new}
{strip}
<div class="floaticon">{bithelp}</div>
@@ -32,21 +32,21 @@
<div class="form-group">
{forminput label="checkbox"}
- <input type="checkbox" name="allow_user_sub" id="allow_user_sub" {if !$gContent->isValid() or $gContent->mInfo.allow_user_sub eq 'y'}checked="checked"{/if} />Users can Subscribe
+ <input type="checkbox" name="allow_user_sub" id="allow_user_sub" {if !$gContent->isValid() || $gContent->mInfo.allow_user_sub eq 'y'}checked="checked"{/if} />Users can Subscribe
{formhelp note="Users can subscribe to this list. Disabling this options means that you have to manually add users to the list."}
{/forminput}
</div>
<div class="form-group">
{forminput label="checkbox"}
- <input type="checkbox" name="allow_any_sub" id="allow_any_sub" {if !$gContent->isValid() or $gContent->mInfo.allow_any_sub eq 'y'}checked="checked"{/if} />Any e-mail Address
+ <input type="checkbox" name="allow_any_sub" id="allow_any_sub" {if !$gContent->isValid() || $gContent->mInfo.allow_any_sub eq 'y'}checked="checked"{/if} />Any e-mail Address
{formhelp note="Users may subscribe using any email address."}
{/forminput}
</div>
<div class="form-group">
{forminput label="checkbox"}
- <input type="checkbox" name="unsub_msg" id="unsub_msg" {if !$gContent->isValid() or $gContent->mInfo.unsub_msg eq 'y'}checked="checked"{/if} />Append Un/Subscribe Instructions
+ <input type="checkbox" name="unsub_msg" id="unsub_msg" {if !$gContent->isValid() || $gContent->mInfo.unsub_msg eq 'y'}checked="checked"{/if} />Append Un/Subscribe Instructions
{formhelp note="Append instructions on how to subscribe / unsubscribe to ever outgoing newsletter. This is only useful when users can un / subscribe to the list themselves."}
{/forminput}
</div>
diff --git a/templates/list_newsletters.tpl b/templates/list_newsletters.tpl
index 0dcb3d6..08d9a02 100755
--- a/templates/list_newsletters.tpl
+++ b/templates/list_newsletters.tpl
@@ -1,4 +1,4 @@
-{if !$newsletters or $gContent->isValid() or $smarty.request.new}
+{if !$newsletters || $gContent->isValid() || $smarty.request.new}
{include file="bitpackage:newsletters/edit_newsletter.tpl"}
{else}
{strip}
diff --git a/templates/user_subscriptions.tpl b/templates/user_subscriptions.tpl
index 944c673..7581b63 100755
--- a/templates/user_subscriptions.tpl
+++ b/templates/user_subscriptions.tpl
@@ -1,4 +1,4 @@
-{if $subInfo or $gBitUser->hasPermission('p_newsletters_subscribe')}
+{if $subInfo || $gBitUser->hasPermission('p_newsletters_subscribe')}
{strip}
<div class="display newsletters">
<div class="header">
@@ -31,7 +31,7 @@
{formlabel label="Subscriptions"}
{forminput}
{foreach from=$newsletters key=nlId item=nl}
- {if $nl.allow_user_sub}<input type="checkbox" name="nl_content_id[]" value="{$nlId}" {if !$unsubs.$nlId and !$subInfo.unsubscribe_all}checked="checked"{/if}/>{/if} <a href="{$nl.display_url}"/>{$nl.title|escape}</a> <br/>
+ {if $nl.allow_user_sub}<input type="checkbox" name="nl_content_id[]" value="{$nlId}" {if !$unsubs.$nlId && !$subInfo.unsubscribe_all}checked="checked"{/if}/>{/if} <a href="{$nl.display_url}"/>{$nl.title|escape}</a> <br/>
{foreachelse}
{tr}No newsletters were found{/tr}
{/foreach}
diff --git a/templates/view_edition.tpl b/templates/view_edition.tpl
index 0d5525f..ba5d4e0 100755
--- a/templates/view_edition.tpl
+++ b/templates/view_edition.tpl
@@ -6,7 +6,7 @@
{if $gBitUser->hasPermission('p_newsletters_admin')}
<a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/send.php?edition_id={$gContent->mEditionId}">{booticon iname="icon-envelope" ipackage="icons" iexplain="email this post"}</a>
{/if}
- {if $gContent->isOwner() or $gBitUser->hasPermission( 'p_newsletters_admin' )}
+ {if $gContent->isOwner() || $gBitUser->hasPermission( 'p_newsletters_admin' )}
<a href="{$smarty.const.NEWSLETTERS_PKG_URL}edition_edit.php?edition_id={$gContent->mEditionId}">{booticon iname="icon-edit" ipackage="icons" iexplain="edit"}</a>
<a href="{$smarty.const.NEWSLETTERS_PKG_URL}edition.php?edition_id={$gContent->mEditionId}&amp;remove=1">{booticon iname="icon-trash" ipackage="icons" iexplain="delete"}</a>
{/if}
diff --git a/templates/view_newsletter.tpl b/templates/view_newsletter.tpl
index 2ea4d0c..140d786 100755
--- a/templates/view_newsletter.tpl
+++ b/templates/view_newsletter.tpl
@@ -2,7 +2,7 @@
<div class="floaticon">
{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='icon'}
- {if $gContent->isOwner() or $gBitUser->hasPermission( 'p_newsletters_admin' )}
+ {if $gContent->isOwner() || $gBitUser->hasPermission( 'p_newsletters_admin' )}
<a href="{$smarty.const.NEWSLETTERS_PKG_URL}newsletters.php?nl_id={$gContent->mNewsletterId}">{booticon iname="icon-edit" ipackage="icons" iexplain="edit"}</a>
<a href="{$smarty.const.NEWSLETTERS_PKG_URL}newsletters.php?nl_id={$gContent->mNewsletterId}&amp;remove=1">{booticon iname="icon-trash" ipackage="icons" iexplain="delete"}</a>
{/if}