diff options
| author | lsces <lester@lsces.co.uk> | 2026-03-27 14:12:39 +0000 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2026-03-27 14:12:39 +0000 |
| commit | 97695963c23046019df0b18a3569bd254466a4c3 (patch) | |
| tree | a590c93626c1c42f9714741752eb091a577cc64d /templates | |
| parent | 433ba6d9e0c7f6fe70dbfea0b43d1278a3d75b21 (diff) | |
| download | blogs-97695963c23046019df0b18a3569bd254466a4c3.tar.gz blogs-97695963c23046019df0b18a3569bd254466a4c3.tar.bz2 blogs-97695963c23046019df0b18a3569bd254466a4c3.zip | |
Smarty seems to have dropped && and || in favour of and and or in templates?
Diffstat (limited to 'templates')
| -rwxr-xr-x | templates/admin_blogs.tpl | 10 | ||||
| -rwxr-xr-x | templates/blog_list_post.tpl | 6 | ||||
| -rwxr-xr-x | templates/blog_post.tpl | 6 | ||||
| -rwxr-xr-x | templates/center_list_blog_posts.tpl | 4 | ||||
| -rwxr-xr-x | templates/crosspost.tpl | 4 | ||||
| -rwxr-xr-x | templates/edit_blog.tpl | 8 | ||||
| -rwxr-xr-x | templates/edit_blogpost_status_inc.tpl | 2 | ||||
| -rwxr-xr-x | templates/list_blogs.tpl | 2 | ||||
| -rwxr-xr-x | templates/view_blog.tpl | 4 | ||||
| -rwxr-xr-x | templates/view_blog_post.tpl | 16 |
10 files changed, 31 insertions, 31 deletions
diff --git a/templates/admin_blogs.tpl b/templates/admin_blogs.tpl index d0163e0..971cb7b 100755 --- a/templates/admin_blogs.tpl +++ b/templates/admin_blogs.tpl @@ -3,7 +3,7 @@ {jstabs} {jstab title="Blog Features"} {legend legend="Home Blog"} - <input type="hidden" name="page" value="{$page}" /> + <input type="hidden" name="page" value="{$page|default:''}" /> <div class="form-group"> {formlabel label="Home Blog (main blog)" for="blog_home"} {forminput} @@ -33,7 +33,7 @@ {formlabel label=$output.label for=$item} {forminput} {html_checkboxes name="$item" values="y" checked=$gBitSystem->getConfig($item) labels=false id=$item} - {formhelp note=$output.note page=$output.page} + {formhelp note=$output.note|default:'' page=$output.page|default:''} {/forminput} </div> {/foreach} @@ -51,7 +51,7 @@ {formlabel label=$output.label for=$item} {forminput} <input type="text" name="$item" value="{$gBitSystem->getConfig($item, 3)}" id="{$item}" /> - {formhelp note=$output.note page=$output.page} + {formhelp note=$output.note|default:'' page=$output.page|default:''} {/forminput} </div> {/foreach} @@ -99,14 +99,14 @@ {jstab title="List Settings"} {legend legend="List Settings"} - <input type="hidden" name="page" value="{$page}" /> + <input type="hidden" name="page" value="{$page|default:''}" /> {foreach from=$formBlogLists key=item item=output} <div class="form-group"> {formlabel label=$output.label for=$item} {forminput} {html_checkboxes name="$item" values="y" checked=$gBitSystem->getConfig($item) labels=false id=$item} - {formhelp note=$output.note page=$output.page} + {formhelp note=$output.note|default:'' page=$output.page|default:''} {/forminput} </div> {/foreach} diff --git a/templates/blog_list_post.tpl b/templates/blog_list_post.tpl index 8e4c541..09f7e8e 100755 --- a/templates/blog_list_post.tpl +++ b/templates/blog_list_post.tpl @@ -36,7 +36,7 @@ <div class="date"> {if $gBitSystem->getConfig('blog_list_user_as') eq 'link'} {tr}By{/tr} {displayname hash=$aPost} - {elseif $gBitSystem->getConfig('blog_list_user_as') eq 'avatar' && $aPost.avatar} + {elseif $gBitSystem->getConfig('blog_list_user_as') eq 'avatar' and $aPost.avatar} <img src="{$aPost.avatar}" class="avatar" /> {else} {tr}By{/tr} {displayname hash=$aPost nolink=true} @@ -46,7 +46,7 @@ {if count($aPost.blogs) > 0} {tr}Posted to{/tr} {foreach from=$aPost.blogs item=memberBlog key=blogContentId name=memberBlogLoop} - <a href="{$memberBlog.blog_url}">{$memberBlog.title}</a>{if $smarty.foreach.memberBlogLoop.total > 1 && !$smarty.foreach.memberBlogLoop.last }, {/if} + <a href="{$memberBlog.blog_url}">{$memberBlog.title}</a>{if $smarty.foreach.memberBlogLoop.total > 1 and !$smarty.foreach.memberBlogLoop.last }, {/if} {/foreach} <br /> {/if} @@ -62,7 +62,7 @@ {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$aPost} {* deal with the blog post image if there is one *} - {if $gBitSystem->isFeatureActive( 'blog_show_image' ) && $aPost.thumbnail_url} + {if $gBitSystem->isFeatureActive( 'blog_show_image' ) and $aPost.thumbnail_url} <div class="image"> {jspopup notra=1 href=$aPost.thumbnail_url.original alt=$aPost.title|escape title=$aPost.title|escape img=$aPost.thumbnail_url.medium} </div> diff --git a/templates/blog_post.tpl b/templates/blog_post.tpl index 40e52d0..7541b38 100755 --- a/templates/blog_post.tpl +++ b/templates/blog_post.tpl @@ -25,7 +25,7 @@ {jstabs} {jstab title="Blog Post"} {legend legend="Post"} - {* if !$blog_data.use_title || $blog_data.use_title eq 'y' *} + {* if !$blog_data.use_title or $blog_data.use_title eq 'y' *} <div class="form-group"> {formlabel label="Title" for="title"} {forminput} @@ -63,12 +63,12 @@ {if count($availableBlogs) > 10} <select name="blog_content_id[]" size="6" id="blog_id" multiple="multiple"> {foreach from=$availableBlogs key=blogContentId item=availBlogTitle} - <option value="{$blogContentId}" {if !empty($gContent->mInfo.blogs.$blogContentId) || $blogContentId == $smarty.request.blog_id}selected="selected"{/if}>{$availBlogTitle|escape}</option> + <option value="{$blogContentId}" {if !empty($gContent->mInfo.blogs.$blogContentId) or $blogContentId == $smarty.request.blog_id}selected="selected"{/if}>{$availBlogTitle|escape}</option> {/foreach} </select> {else} {foreach from=$availableBlogs key=blogContentId item=availBlogTitle} - <input name="blog_content_id[]" type="checkbox" value="{$blogContentId}" {if !empty($gContent->mInfo.blogs.$blogContentId) || $blogContentId == $smarty.request.blog_id or $blogContentId == $default_target_blog_content_id}checked="checked"{/if} /> {$availBlogTitle|escape}<br/> + <input name="blog_content_id[]" type="checkbox" value="{$blogContentId}" {if !empty($gContent->mInfo.blogs.$blogContentId) or $blogContentId == $smarty.request.blog_id or $blogContentId == $default_target_blog_content_id}checked="checked"{/if} /> {$availBlogTitle|escape}<br/> {/foreach} {/if} {formhelp note="You can cross post to any and all of the blogs listed above.<br />Just check off the blogs you wish this post to also show up in."} diff --git a/templates/center_list_blog_posts.tpl b/templates/center_list_blog_posts.tpl index 5c380e8..8b5e4fa 100755 --- a/templates/center_list_blog_posts.tpl +++ b/templates/center_list_blog_posts.tpl @@ -1,5 +1,5 @@ {* $Header$ *} -{if !( $smarty.request.home|default:true && $gBitSystem->isFeatureActive('blog_hide_empty_usr_list') ) } +{if !( $smarty.request.home|default:true and $gBitSystem->isFeatureActive('blog_hide_empty_usr_list') ) } <div class="floaticon">{bithelp}</div> <div class="display blogs"> @@ -8,7 +8,7 @@ </div> <div class="body"> - {if ($gBitUser->hasPermission( 'p_blog_posts_read_future' ) || $gBitUser->isAdmin() ) && $futures} + {if ($gBitUser->hasPermission( 'p_blog_posts_read_future' ) or $gBitUser->isAdmin() ) and $futures} <h3>{tr}Upcoming Blog Posts{/tr}</h3> <ul> {foreach from=$futures item=future} diff --git a/templates/crosspost.tpl b/templates/crosspost.tpl index 95dd74c..2c8cef4 100755 --- a/templates/crosspost.tpl +++ b/templates/crosspost.tpl @@ -37,7 +37,7 @@ {formlabel label="Include in Blogs" for="blog_id"} {forminput} {foreach from=$availableBlogs key=blogContentId item=availBlogTitle} - {if !$gContent->mInfo.blogs.$blogContentId || ($blogContentId == $crosspost.blog_content_id) } + {if !$gContent->mInfo.blogs.$blogContentId or ($blogContentId == $crosspost.blog_content_id) } {assign var="has_crosspost_option" value=true} <input name="blog_content_id[]" type="checkbox" option value="{$blogContentId}" {if $blogContentId == $crosspost.blog_content_id}checked="checked"{/if}>{$availBlogTitle|escape}</option><br/> {/if} @@ -108,7 +108,7 @@ {if count($post_info.blogs) > 0} {tr}Posted to{/tr} {foreach from=$post_info.blogs item=memberBlog key=blogContentId name=memberBlogLoop} - <a href="{$memberBlog.blog_url}">{$memberBlog.title}</a>{if $smarty.foreach.memberBlogLoop.total > 1 && !$smarty.foreach.memberBlogLoop.last }, {/if} + <a href="{$memberBlog.blog_url}">{$memberBlog.title}</a>{if $smarty.foreach.memberBlogLoop.total > 1 and !$smarty.foreach.memberBlogLoop.last }, {/if} {/foreach} <br /> {/if} diff --git a/templates/edit_blog.tpl b/templates/edit_blog.tpl index d21005b..82169c0 100755 --- a/templates/edit_blog.tpl +++ b/templates/edit_blog.tpl @@ -9,7 +9,7 @@ </div> <div class="body"> - {if $smarty.request.preview} + {if !empty($smarty.request.preview)} <div class="preview"> <div class="header"> <h1>{$title}</h1> @@ -58,21 +58,21 @@ <div class="form-group"> {forminput label="checkbox"} - <input type="checkbox" name="use_title" id="use_title" {if !$gContent->isValid() || $gContent->getField('use_title') eq 'y'}checked="checked"{/if} />Use titles in blog posts + <input type="checkbox" name="use_title" id="use_title" {if !$gContent->isValid() or $gContent->getField('use_title') eq 'y'}checked="checked"{/if} />Use titles in blog posts {formhelp note='If this is not selected, the time and date of when the post was created will be displayed instead of the post title.'} {/forminput} </div> <div class="form-group"> {forminput label="checkbox"} - <input type="checkbox" name="use_find" id="use_find" {if !$gContent->isValid() || $gContent->getField('use_find') eq 'y'}checked="checked"{/if} />Allow search + <input type="checkbox" name="use_find" id="use_find" {if !$gContent->isValid() or $gContent->getField('use_find') eq 'y'}checked="checked"{/if} />Allow search {formhelp note='Allow users to search this blog for occurances of words.'} {/forminput} </div> <div class="form-group"> {forminput label="checkbox"} - <input type="checkbox" name="allow_comments" id="allow_comments" {if !$gContent->isValid() || $gContent->getField('allow_comments') eq 'y'}checked="checked"{/if} />Allow comments + <input type="checkbox" name="allow_comments" id="allow_comments" {if !$gContent->isValid() or $gContent->getField('allow_comments') eq 'y'}checked="checked"{/if} />Allow comments {formhelp note='Are other users allowed to add comments to posts made in this blog?'} {/forminput} </div> diff --git a/templates/edit_blogpost_status_inc.tpl b/templates/edit_blogpost_status_inc.tpl index ca4fb03..207d9e0 100755 --- a/templates/edit_blogpost_status_inc.tpl +++ b/templates/edit_blogpost_status_inc.tpl @@ -1,4 +1,4 @@ -{if $gBitSystem->isFeatureActive( 'liberty_display_status' ) && $gBitSystem->isFeatureActive( 'liberty_display_status_menu' ) && ($gBitUser->hasPermission('p_liberty_edit_content_status') || $gBitUser->hasPermission('p_liberty_edit_all_status'))} +{if $gBitSystem->isFeatureActive( 'liberty_display_status' ) and $gBitSystem->isFeatureActive( 'liberty_display_status_menu' ) and ($gBitUser->hasPermission('p_liberty_edit_content_status') or $gBitUser->hasPermission('p_liberty_edit_all_status'))} <div class="form-group"> {formlabel label="Publish Status" for="content_status_id"} {forminput} diff --git a/templates/list_blogs.tpl b/templates/list_blogs.tpl index 50c2f72..580f681 100755 --- a/templates/list_blogs.tpl +++ b/templates/list_blogs.tpl @@ -56,7 +56,7 @@ {/if} {/if} - {if ($gBitUser->mUserId and $listBlog.user_id eq $gBitUser->mUserId) || ($gBitUser->hasPermission( 'p_blogs_admin' )) or ($listBlog.is_public eq 'y')} + {if ($gBitUser->mUserId and $listBlog.user_id eq $gBitUser->mUserId) or ($gBitUser->hasPermission( 'p_blogs_admin' )) or ($listBlog.is_public eq 'y')} <a title="{tr}post{/tr}" href="{$smarty.const.BLOGS_PKG_URL}post.php?blog_id={$listBlog.blog_id}">{booticon iname="icon-edit" ipackage="icons" iexplain="post"}</a> {/if} {if ($gBitUser->mUserId and $listBlog.user_id eq $gBitUser->mUserId) or $gBitUser->hasPermission( 'p_blogs_admin' )} diff --git a/templates/view_blog.tpl b/templates/view_blog.tpl index 83e3505..96859b2 100755 --- a/templates/view_blog.tpl +++ b/templates/view_blog.tpl @@ -9,7 +9,7 @@ {/if} {if $gBitSystem->isPackageActive( 'rss' )} - <a title="{tr}RSS feed{/tr}" href="{$smarty.const.BLOGS_PKG_URL}blogs_rss.php?blog_id={$gContent->mBlogId}">{biticon ipackage="rss" iname="rss-16x16" iexplain="RSS feed"}</a> + <a title="{tr}RSS feed{/tr}" href="{$smarty.const.BLOGS_PKG_URL}blogs_rss.php?blog_id={$gContent->mBlogId}">{booticon iname="icon-rss" ipackage="icons" iexplain="RSS feed"}</a> {/if} {if $gContent->hasUpdatePermission()} @@ -20,7 +20,7 @@ {if $user_watching_blog eq 'n'} <a title="{tr}monitor this blog{/tr}" href="{$smarty.const.BLOGS_PKG_URL}view.php?blog_id={$gContent->mBlogId}&watch_event=blog_post&watch_object={$gContent->mBlogId}&watch_action=add">{booticon iname="icon-asterisk" ipackage="icons" iexplain="monitor this blog"}</a> {else} - <a title="{tr}stop monitoring this blog{/tr}" href="{$smarty.const.BLOGS_PKG_URL}view.php?blog_id={$gContent->mBlogId}&watch_event=blog_post&watch_object={$gContent->mBlogId}&watch_action=remove">{biticon ipackage="icons" iname="weather-clear-night" iexplain="stop monitoring this blog"}</a> + <a title="{tr}stop monitoring this blog{/tr}" href="{$smarty.const.BLOGS_PKG_URL}view.php?blog_id={$gContent->mBlogId}&watch_event=blog_post&watch_object={$gContent->mBlogId}&watch_action=remove">{booticon ipackage="icons" iname="weather-clear-night" iexplain="stop monitoring this blog"}</a> {/if} {/if} diff --git a/templates/view_blog_post.tpl b/templates/view_blog_post.tpl index fb28446..70bbb2b 100755 --- a/templates/view_blog_post.tpl +++ b/templates/view_blog_post.tpl @@ -23,8 +23,8 @@ <div class="floaticon"> {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='icon' serviceHash=$post_info} {if $gBitUser->hasPermission( 'p_users_view_icons_and_tools' )} - {if $gBitSystem->isPackageActive( 'rss' ) && $gBitSystem->isFeatureActive( 'rss_blogs' )} - <a href="{$smarty.const.BLOGS_PKG_URL}blogs_rss.php?user_id={$post_info.user_id}">{booticon iname="icon-rss" iexplain="RSS feed"}</a> + {if $gBitSystem->isPackageActive( 'rss' ) and $gBitSystem->isFeatureActive( 'rss_blogs' )} + <a href="{$smarty.const.BLOGS_PKG_URL}blogs_rss.php?user_id={$post_info.user_id}">{booticon iname="icon-rss" ipackage="icons" iexplain="RSS feed"}</a> {/if} {if $gContent->hasUserPermission( 'p_blogs_admin' )} @@ -67,7 +67,7 @@ </div> <h1> - {if $post_info.use_title eq 'y' && $post_info.title} + {if $post_info.use_title eq 'y' and $post_info.title} {$post_info.title|escape|highlight} {else} {$post_info.publish_date|default:$post_info.created|bit_long_date} @@ -80,7 +80,7 @@ {if count($post_info.blogs) > 0} {tr}Posted to{/tr} {foreach from=$post_info.blogs item=memberBlog key=blogContentId name=memberBlogLoop} - <a href="{$memberBlog.blog_url}">{$memberBlog.title}</a>{if $smarty.foreach.memberBlogLoop.total > 1 && !$smarty.foreach.memberBlogLoop.last }, {/if} + <a href="{$memberBlog.blog_url}">{$memberBlog.title}</a>{if $smarty.foreach.memberBlogLoop.total > 1 and !$smarty.foreach.memberBlogLoop.last }, {/if} {/foreach} <br /> {/if} @@ -97,7 +97,7 @@ {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$post_info} {* deal with the blog post image if there is one *} - {if $gBitSystem->isFeatureActive( 'blog_show_image' ) && $post_info.thumbnail_url} + {if $gBitSystem->isFeatureActive( 'blog_show_image' ) and $post_info.thumbnail_url} <div class="image primary"> {jspopup notra=1 href=$post_info.thumbnail_url.original alt=$post_info.title|escape title=$post_info.title|escape img=$post_info.thumbnail_url.medium} </div> @@ -128,11 +128,11 @@ {if !empty($pages) and $pages > 1} <div class="pagination"> - <a href="{$smarty.const.BLOGS_PKG_URL}view_post.php?blog_id={$smarty.request.blog_id}&post_id={$smarty.request.post_id}&page={$first_page}">{biticon ipackage="icons" iname="go-first" iexplain="first page"}</a> + <a href="{$smarty.const.BLOGS_PKG_URL}view_post.php?blog_id={$smarty.request.blog_id}&post_id={$smarty.request.post_id}&page={$first_page}">{booticon ipackage="icons" iname="go-first" iexplain="first page"}</a> <a href="{$smarty.const.BLOGS_PKG_URL}view_post.php?blog_id={$smarty.request.blog_id}&post_id={$smarty.request.post_id}&page={$prev_page}">{booticon iname="icon-arrow-left" ipackage="icons" iexplain="previous page"}</a> {tr}page{/tr}:{$page}/{$pages} - <a href="{$smarty.const.BLOGS_PKG_URL}view_post.php?blog_id={$smarty.request.blog_id}&post_id={$smarty.request.post_id}&page={$next_page}">{biticon ipackage="icons" iname="go-next" iexplain="next page"}</a> - <a href="{$smarty.const.BLOGS_PKG_URL}view_post.php?blog_id={$smarty.request.blog_id}&post_id={$smarty.request.post_id}&page={$last_page}">{biticon ipackage="icons" iname="go-last" iexplain="last page"}</a> + <a href="{$smarty.const.BLOGS_PKG_URL}view_post.php?blog_id={$smarty.request.blog_id}&post_id={$smarty.request.post_id}&page={$next_page}">{booticon ipackage="icons" iname="go-next" iexplain="next page"}</a> + <a href="{$smarty.const.BLOGS_PKG_URL}view_post.php?blog_id={$smarty.request.blog_id}&post_id={$smarty.request.post_id}&page={$last_page}">{booticon ipackage="icons" iname="go-last" iexplain="last page"}</a> </div> {/if} |
