summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2025-08-28 17:12:09 +0100
committerlsces <lester@lsces.co.uk>2025-08-28 17:12:09 +0100
commitc29fea0ae79977f09fd7b4706c88f3ecb90a4575 (patch)
treeab0f92df2a90e6d490a3d856607e02819728a084
parente71d1ad3b0d588a76226c736c4c37677ec0e9154 (diff)
downloadblogs-c29fea0ae79977f09fd7b4706c88f3ecb90a4575.tar.gz
blogs-c29fea0ae79977f09fd7b4706c88f3ecb90a4575.tar.bz2
blogs-c29fea0ae79977f09fd7b4706c88f3ecb90a4575.zip
Templates code updated to PHP8.4 and namespace
-rwxr-xr-x[-rw-r--r--]templates/admin_blogs.tpl0
-rwxr-xr-x[-rw-r--r--]templates/blog_list_post.tpl8
-rwxr-xr-x[-rw-r--r--]templates/blog_post.tpl35
-rwxr-xr-x[-rw-r--r--]templates/blogs_send_link.tpl0
-rwxr-xr-x[-rw-r--r--]templates/center_list_blog_posts.php62
-rwxr-xr-x[-rw-r--r--]templates/center_list_blog_posts.tpl2
-rwxr-xr-x[-rw-r--r--]templates/crosspost.tpl18
-rwxr-xr-x[-rw-r--r--]templates/edit_blog.tpl2
-rwxr-xr-x[-rw-r--r--]templates/edit_blogpost_status_inc.tpl0
-rwxr-xr-x[-rw-r--r--]templates/html_head_inc.tpl4
-rwxr-xr-x[-rw-r--r--]templates/index.php0
-rwxr-xr-x[-rw-r--r--]templates/list_blogs.tpl0
-rwxr-xr-x[-rw-r--r--]templates/list_posts.tpl0
-rwxr-xr-x[-rw-r--r--]templates/menu_blogs.tpl2
-rwxr-xr-x[-rw-r--r--]templates/menu_blogs_admin.tpl2
-rwxr-xr-x[-rw-r--r--]templates/popup_categs.tpl0
-rwxr-xr-x[-rw-r--r--]templates/print_blog_post.tpl2
-rwxr-xr-x[-rw-r--r--]templates/ranking.tpl0
-rwxr-xr-x[-rw-r--r--]templates/send_blog_post.tpl0
-rwxr-xr-x[-rw-r--r--]templates/user_watch_blog_post.tpl0
-rwxr-xr-x[-rw-r--r--]templates/view_blog.tpl4
-rwxr-xr-x[-rw-r--r--]templates/view_blog_post.tpl29
-rwxr-xr-x[-rw-r--r--]templates/view_blog_post_xml.tpl0
-rwxr-xr-x[-rw-r--r--]templates/wp-migrate.tpl0
24 files changed, 85 insertions, 85 deletions
diff --git a/templates/admin_blogs.tpl b/templates/admin_blogs.tpl
index d0163e0..d0163e0 100644..100755
--- a/templates/admin_blogs.tpl
+++ b/templates/admin_blogs.tpl
diff --git a/templates/blog_list_post.tpl b/templates/blog_list_post.tpl
index ba232fb..c24e8b8 100644..100755
--- a/templates/blog_list_post.tpl
+++ b/templates/blog_list_post.tpl
@@ -54,8 +54,8 @@
</div>
<div class="body">
- <div class="content">
- {if $aPost.crosspost_note}
+ <div class="content col-sm-12">
+ {if !empty($aPost.crosspost_note)}
<div class="bitbox">{$aPost.crosspost_note}</div>
{/if}
@@ -84,11 +84,11 @@
<div class="footer">
<a href="{$aPost.post_url}" rel="bookmark">{tr}Permalink{/tr}</a>
- {assign var=spacer value=TRUE}
+ {assign var=spacer value=true}
{if $showDescriptionsOnly and $aPost.has_more}
{if $spacer}&nbsp; &bull; &nbsp;{/if}
- {assign var=spacer value=TRUE}
+ {assign var=spacer value=true}
{if $ajax_more}
<a href="javascript:void(0);" onclick="BitAjax.updater( 'post_more_{$aPost.post_id}', '{$smarty.const.BLOGS_PKG_URL}view_post.php', 'blog_id={$aPost.blog_id}&post_id={$aPost.post_id}&format={if $aPost.summary}data{else}more{/if}&output=ajax' )">{tr}Read More{/tr}</a>
{else}
diff --git a/templates/blog_post.tpl b/templates/blog_post.tpl
index 882894c..40e52d0 100644..100755
--- a/templates/blog_post.tpl
+++ b/templates/blog_post.tpl
@@ -2,7 +2,7 @@
{strip}
<div class="edit blogs">
<div class="header">
- {if !$post_info.content_id}
+ {if empty($post_info.content_id)}
<h1>{tr}Create Post{/tr}</h1>
{else}
<h1>{tr}Edit Post{/tr}</h1>
@@ -13,7 +13,7 @@
{if $preview eq 'y'}
<h2>Preview {$title}</h2>
<div class="preview">
- {include file="bitpackage:blogs/view_blog_post.tpl"}
+ {* include file="bitpackage:blogs/view_blog_post.tpl" *}
</div>
{/if}
@@ -25,20 +25,20 @@
{jstabs}
{jstab title="Blog Post"}
{legend legend="Post"}
- {if !$blog_data.use_title OR $blog_data.use_title eq 'y'}
+ {* if !$blog_data.use_title || $blog_data.use_title eq 'y' *}
<div class="form-group">
{formlabel label="Title" for="title"}
{forminput}
- <input type="text" size="50" name="title" id="title" value="{$post_info.title|escape}" />
+ <input type="text" size="50" name="title" id="title" value="{$post_info.title|default:''|escape}" />
{formhelp note="When you leave the title blank, the current date will be substituted automagically."}
{/forminput}
</div>
- {/if}
+ {* /if *}
<div class="form-group">
{formlabel label="Summary" for="summary"}
{forminput}
- <input type="text" size="50" name="summary" id="summary" value="{$post_info.summary|escape}" />
+ <input type="text" size="50" name="summary" id="summary" value="{$post_info.summary|default:''|escape}" />
{formhelp note="Description used in listings and search results. If left empty, the first few sentences of the body text will be used."}
{/forminput}
</div>
@@ -53,7 +53,7 @@
{formhelp note="Text entered here will be displayed in the full blog post, commonly known as the Read More section."}
{textarea id="edit_body" name="edit_body" noformat="y" edit=$post_info.raw_more}
{else}
- {textarea edit=$post_info.raw}
+ {textarea edit=$post_info.raw|default:''}
{/if}
{if $availableBlogs}
@@ -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 $gContent->mInfo.blogs.$blogContentId || $blogContentId == $smarty.request.blog_id}selected="selected"{/if}>{$availBlogTitle|escape}</option>
+ <option value="{$blogContentId}" {if !empty($gContent->mInfo.blogs.$blogContentId) || $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 $gContent->mInfo.blogs.$blogContentId || $blogContentId == $smarty.request.blog_id || $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) || $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."}
@@ -80,11 +80,6 @@
{include file="bitpackage:liberty/edit_services_inc.tpl" serviceFile="content_edit_mini_tpl" edit_content_status_tpl="bitpackage:blogs/edit_blogpost_status_inc.tpl"}
{include file="bitpackage:liberty/edit_storage_list.tpl"}
-
- <div class="form-group submit">
- <input type="submit" class="btn btn-default" name="preview" value="{tr}Preview{/tr}" />&nbsp;
- <input type="submit" class="btn btn-default" name="save_post_exit" value="{tr}Save{/tr}" />
- </div>
{/legend}
{/jstab}
@@ -104,8 +99,8 @@
<input type="hidden" name="publishDateInput" value="1" />
{formlabel label="Publish Date" for=""}
{forminput}
- {html_select_date prefix="publish_" time=$post_info.publish_date start_year="-5" end_year="+10"} {tr}at{/tr}&nbsp;
- <span dir="ltr">{html_select_time prefix="publish_" time=$post_info.publish_date display_seconds=false}&nbsp;{$siteTimeZone}</span>
+ {html_select_date prefix="publish_" time=$post_info.publish_date|default:0 start_year="-1" end_year="+10"} at&nbsp;
+ <span dir="ltr">{html_select_time prefix="publish_" time=$post_info.publish_date|default:0 display_seconds=false}&nbsp;{$siteTimeZone}</span>
{formhelp note="This post will not be displayed <strong>before</strong> this date."}
{/forminput}
</div>
@@ -114,8 +109,8 @@
<input type="hidden" name="expireDateInput" value="1" />
{formlabel label="Expiration Date" for=""}
{forminput}
- {html_select_date prefix="expire_" time=$post_info.expire_date start_year="-5" end_year="+10"} {tr}at{/tr}&nbsp;
- <span dir="ltr">{html_select_time prefix="expire_" time=$post_info.expire_date display_seconds=false}&nbsp;{$siteTimeZone}</span>
+ {html_select_date prefix="expire_" time=$post_info.expire_date|default:0 start_year="+5" end_year="+10"} at&nbsp;
+ <span dir="ltr">{html_select_time prefix="expire_" time=$post_info.expire_date|default:0 display_seconds=false}&nbsp;{$siteTimeZone}</span>
{formhelp note="If this date is set after the publish date, this post will not be displayed <strong>after</strong> the expiration date."}
{/forminput}
</div>
@@ -131,6 +126,10 @@
</div>
{/legend}
{/jstab}
+ <div class="form-group submit">
+ <input type="submit" class="btn btn-default" name="preview" value="Preview" />&nbsp;
+ <input type="submit" class="btn btn-default" name="save_post_exit" value="Save" />
+ </div>
{/jstabs}
{/form}
</div><!-- end .body -->
diff --git a/templates/blogs_send_link.tpl b/templates/blogs_send_link.tpl
index c6f0714..c6f0714 100644..100755
--- a/templates/blogs_send_link.tpl
+++ b/templates/blogs_send_link.tpl
diff --git a/templates/center_list_blog_posts.php b/templates/center_list_blog_posts.php
index 52e65f1..550ce4b 100644..100755
--- a/templates/center_list_blog_posts.php
+++ b/templates/center_list_blog_posts.php
@@ -3,23 +3,22 @@
* @version $Header$
* @package bitweaver
*/
-global $gBitSmarty, $gBlog, $gBitSystem, $moduleParams, $gBitUser;
-if( !empty( $moduleParams ) ) {
- extract( $moduleParams );
-}
+use Bitweaver\Blogs\BitBlogPost;
+use Bitweaver\Users\RoleUser;
+
+global $moduleParams;
-include_once( BLOGS_PKG_CLASS_PATH.'BitBlog.php' );
-include_once( BLOGS_PKG_INCLUDE_PATH.'lookup_post_inc.php' );
+include_once BLOGS_PKG_INCLUDE_PATH.'lookup_post_inc.php';
$blogPost = new BitBlogPost();
if( empty( $gContent )) {
- $gBitSmarty->assignByRef( 'gContent', $blogPost );
+ $gBitSmarty->assign( 'gContent', $blogPost );
}
if( $gBitUser->hasPermission( 'p_blog_posts_read_future' ) || $gBitUser->isAdmin() ) {
- $futuresHash = array();
+ $futuresHash = [];
$futuresHash['max_records'] = !empty( $_REQUEST['max_records'] ) ? $_REQUEST['max_records'] : $gBitSystem->getConfig( 'blog_posts_max_list' );
- $futuresHash['get_future'] = TRUE;
+ $futuresHash['get_future'] = true;
if( empty( $futuresHash['user_id'] )) {
if( !empty( $gQueryUserId )) {
$futuresHash['user_id'] = $gQueryUserId;
@@ -28,10 +27,10 @@ if( $gBitUser->hasPermission( 'p_blog_posts_read_future' ) || $gBitUser->isAdmin
}
}
// prevent anything lower than publicly visible be displayed in blog roll
- $futuresHash['enforce_status'] = TRUE;
+ $futuresHash['enforce_status'] = true;
$futuresHash['min_owner_status_id'] = 0;
$futures = $blogPost->getFutureList( $futuresHash );
- $gBitSmarty->assign( 'futures', $futures['data']);
+ $gBitSmarty->assign( 'futures', $futures['data'] ?? []);
} else {
$_REQUEST['max_records'] = $gBitSystem->getConfig( 'blog_posts_max_list' );
}
@@ -41,22 +40,22 @@ if( $gBitUser->hasPermission( 'p_blog_posts_read_future' ) || $gBitUser->isAdmin
$listHash = $module_params;
$listHash = array(
'max_records' => $module_rows,
- 'parse_data' => TRUE,
- 'load_comments' => TRUE,
+ 'parse_data' => true,
+ 'load_comments' => true,
);
*/
-$listHash = array();
-if( !empty( $moduleParams )) {
- $listHash = array_merge( $_REQUEST, $moduleParams['module_params'] );
- $listHash['max_records'] = $module_rows;
- //$listHash['parse_data'] = TRUE;
- //$listHash['load_comments'] = TRUE;
+$listHash = [];
+if( !empty( $moduleParams->values )) {
+ $listHash = array_merge( $_REQUEST, $moduleParams->values );
+ $listHash['max_records'] = $moduleParams->values['module_rows'];
+ //$listHash['parse_data'] = true;
+ //$listHash['load_comments'] = true;
} else {
$listHash = $_REQUEST;
}
-BitUser::userCollection( $_REQUEST, $listHash );
+RoleUser::userCollection( $_REQUEST, $listHash );
if ( empty( $listHash['sort_mode'] ) ){
$listHash['sort_mode'] = 'sort_date_desc';
@@ -75,12 +74,12 @@ $paginationPath = BLOGS_PKG_URL.'index.php';
*/
if ( !empty( $module_params ) && !empty( $module_params['blog_id'] ) ){
- $_template->tpl_vars['blogId'] = new Smarty_variable( $module_params['blog_id'] );
+ $gBitSmarty->assign( 'blogId', $module_params['blog_id'] );
$paginationPath = BLOGS_PKG_URL.'view.php';
}
// prevent anything lower than publicly visible be displayed in blog roll
-$listHash['enforce_status'] = TRUE;
+$listHash['enforce_status'] = true;
$listHash['min_owner_status_id'] = 0;
/* I think this is right - usually we pass in $_REQUEST
@@ -89,15 +88,14 @@ $listHash['min_owner_status_id'] = 0;
*/
$blogPost->invokeServices( 'content_list_function', $listHash );
$blogPosts = $blogPost->getList( $listHash );
-$_template->tpl_vars['paginationPath'] = new Smarty_variable( $paginationPath );
-$_template->tpl_vars['gQueryUserId'] = new Smarty_variable( $listHash['user_id'] );
-$_template->tpl_vars['blogPosts'] = new Smarty_variable( $blogPosts );
+$gBitSmarty->assign( 'paginationPath', $paginationPath );
+$gBitSmarty->assign( 'gQueryUserId', $listHash['user_id'] ?? 0 );
+$gBitSmarty->assign( 'blogPosts', $blogPosts );
-$_template->tpl_vars['listInfo'] = new Smarty_variable( $listHash );
-$_template->tpl_vars['descriptionLength'] = new Smarty_variable( $gBitSystem->getConfig( 'blog_posts_description_length', 500 ));
-$_template->tpl_vars['showDescriptionsOnly'] = new Smarty_variable( TRUE );
-$_template->tpl_vars['showBlogTitle'] = new Smarty_variable( 'y' );
-$_template->tpl_vars['blogPostsFormat'] = new Smarty_variable( (empty($module_params['format']) ? 'full' : $module_params['format']) );
+$gBitSmarty->assign( 'listInfo', $listHash );
+$gBitSmarty->assign( 'descriptionLength', $gBitSystem->getConfig( 'blog_posts_description_length', 500 ));
+$gBitSmarty->assign( 'showDescriptionsOnly', true );
+$gBitSmarty->assign( 'showBlogTitle', 'y' );
+$gBitSmarty->assign( 'blogPostsFormat', empty( $module_params['format'] ) ? 'full' : $module_params['format'] );
// unfortunately, the following feature pulls module parameters in from other modules
-//$gBitSmarty->assign( 'centerTitle', $moduleParams['title'] );
-?>
+//$gBitSmarty->assign( 'centerTitle', $moduleParams['title'] ); \ No newline at end of file
diff --git a/templates/center_list_blog_posts.tpl b/templates/center_list_blog_posts.tpl
index 27b1ec5..5c380e8 100644..100755
--- a/templates/center_list_blog_posts.tpl
+++ b/templates/center_list_blog_posts.tpl
@@ -1,5 +1,5 @@
{* $Header$ *}
-{if !( $smarty.request.home && $gBitSystem->isFeatureActive('blog_hide_empty_usr_list') ) }
+{if !( $smarty.request.home|default:true && $gBitSystem->isFeatureActive('blog_hide_empty_usr_list') ) }
<div class="floaticon">{bithelp}</div>
<div class="display blogs">
diff --git a/templates/crosspost.tpl b/templates/crosspost.tpl
index dc0d9ec..95dd74c 100644..100755
--- a/templates/crosspost.tpl
+++ b/templates/crosspost.tpl
@@ -16,8 +16,8 @@
{formlabel label="Blogs this Post is Already Crossposted To" for="blog_id"}
{forminput}
{foreach from=$availableBlogs key=blogContentId item=availBlogTitle}
- {if $gContent->mInfo.blogs.$blogContentId && ($blogContentId != $crosspost.blog_content_id) }
- {assign var="has_crosspost" value=TRUE}
+ {if $gContent->mInfo.blogs.$blogContentId and ($blogContentId != $crosspost.blog_content_id) }
+ {assign var="has_crosspost" value=true}
{$availBlogTitle|escape}
&nbsp;<a title="{tr}Edit{/tr}" href="{$smarty.const.BLOGS_PKG_URL}crosspost.php?blog_content_id={$blogContentId}&amp;post_id={$post_info.post_id}">{booticon iname="icon-edit" ipackage="icons" iexplain="edit crosspost note"}</a>
&nbsp;<a title="{tr}Remove{/tr}" href="{$smarty.const.BLOGS_PKG_URL}crosspost.php?action=remove&amp;post_id={$post_info.post_id}&amp;blog_content_id={$blogContentId}&amp;status_id=300">{booticon iname="icon-trash" ipackage="icons" iexplain="delete this crossposting"}</a><br/>
@@ -38,7 +38,7 @@
{forminput}
{foreach from=$availableBlogs key=blogContentId item=availBlogTitle}
{if !$gContent->mInfo.blogs.$blogContentId || ($blogContentId == $crosspost.blog_content_id) }
- {assign var="has_crosspost_option" value=TRUE}
+ {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}
{/foreach}
@@ -51,11 +51,11 @@
</div>
{/if}
- {if $has_crosspost_option}
+ {* if $has_crosspost_option}
{formlabel label="Crosspost Note Format"}
{forminput}
{foreach name=formatPlugins from=$gLibertySystem->mPlugins item=plugin key=guid}
- {if $plugin.edit_field eq $post_info.format_guid}
+ {if $plugin.edit_field|default:'' eq $post_info.format_guid}
{$plugin.edit_label}
{/if}
{/foreach}
@@ -66,7 +66,7 @@
<input type="submit" class="btn btn-default" name="preview" value="{tr}Preview{/tr}" />&nbsp;
<input type="submit" class="btn btn-default" name="save_post_exit" value="{tr}Save{/tr}" />
</div>
- {/if}
+ {/if *}
{/legend}
{/form}
@@ -76,9 +76,9 @@
<div class="display blogs">
<div class="header">
- <h1>
- {$post_info.blogtitle|escape}
- </h1>
+ {if !empty($post_info.blogtitle)}
+ <h1>{$post_info.blogtitle|escape}</h1>
+ {/if}
<div class="navigation">
{if $gContent_previous}
diff --git a/templates/edit_blog.tpl b/templates/edit_blog.tpl
index c6c3761..d21005b 100644..100755
--- a/templates/edit_blog.tpl
+++ b/templates/edit_blog.tpl
@@ -31,7 +31,7 @@
{formfeedback warning=$warning}
{formlabel label="Title" for="title"}
{forminput}
- <input type="text" name="title" id="title" value="{if $gContent->getTitle()}{$gContent->getTitle()|escape}{else}{displayname hash=$gBitUser->mInfo nolink=FALSE}'s Blog{/if}" />
+ <input type="text" name="title" id="title" value="{if $gContent->getTitle()}{$gContent->getTitle()|escape}{else}{displayname hash=$gBitUser->mInfo nolink=false}'s Blog{/if}" />
{/forminput}
</div>
diff --git a/templates/edit_blogpost_status_inc.tpl b/templates/edit_blogpost_status_inc.tpl
index ca4fb03..ca4fb03 100644..100755
--- a/templates/edit_blogpost_status_inc.tpl
+++ b/templates/edit_blogpost_status_inc.tpl
diff --git a/templates/html_head_inc.tpl b/templates/html_head_inc.tpl
index e4cf8a4..14ad066 100644..100755
--- a/templates/html_head_inc.tpl
+++ b/templates/html_head_inc.tpl
@@ -20,10 +20,10 @@
* needed for your site configuation by creating a custom version of this tpl in your theme. Target the
* conditionals to the pkg you are including center_list_blog_posts in.
*}
-{if $ajax_more}
+{if !empty($ajax_more)}
{* @TODO develop custom callback - for now override ajax callback for cool scroll effect *}
{literal}
-<script type="text/javascript">/* <![CDATA[ */
+<script>/* <![CDATA[ */
BitAjax.updaterCallback = function(target, rslt){
BitBase.hideSpinner();
var e = document.getElementById(target);
diff --git a/templates/index.php b/templates/index.php
index 3e305fe..3e305fe 100644..100755
--- a/templates/index.php
+++ b/templates/index.php
diff --git a/templates/list_blogs.tpl b/templates/list_blogs.tpl
index 2a86d72..2a86d72 100644..100755
--- a/templates/list_blogs.tpl
+++ b/templates/list_blogs.tpl
diff --git a/templates/list_posts.tpl b/templates/list_posts.tpl
index 21b5983..21b5983 100644..100755
--- a/templates/list_posts.tpl
+++ b/templates/list_posts.tpl
diff --git a/templates/menu_blogs.tpl b/templates/menu_blogs.tpl
index 754c419..38bef3c 100644..100755
--- a/templates/menu_blogs.tpl
+++ b/templates/menu_blogs.tpl
@@ -1,5 +1,5 @@
{strip}
-{if $packageMenuTitle}<a class="dropdown-toggle" data-toggle="dropdown" href="#"> {tr}{$packageMenuTitle}{/tr} <b class="caret"></b></a>{/if}
+{if !empty($packageMenuTitle)}<a class="dropdown-toggle" data-toggle="dropdown" href="#"> {tr}{$packageMenuTitle}{/tr} <b class="caret"></b></a>{/if}
<ul class="{$packageMenuClass}">
{if $gBitUser->hasPermission( 'p_blogs_view' )}
{if $gBitSystem->isFeatureActive( 'blog_home' )}
diff --git a/templates/menu_blogs_admin.tpl b/templates/menu_blogs_admin.tpl
index 71dae5e..02e6716 100644..100755
--- a/templates/menu_blogs_admin.tpl
+++ b/templates/menu_blogs_admin.tpl
@@ -1,2 +1,2 @@
-{if $packageMenuTitle}<a class="nosubmenu"href="{$smarty.const.KERNEL_PKG_URL}admin/index.php?page=blogs">{tr}Blogs{/tr}</a>{/if}
+{if !empty($packageMenuTitle)}<a class="nosubmenu"href="{$smarty.const.KERNEL_PKG_URL}admin/index.php?page=blogs">{tr}Blogs{/tr}</a>{/if}
diff --git a/templates/popup_categs.tpl b/templates/popup_categs.tpl
index 91ad312..91ad312 100644..100755
--- a/templates/popup_categs.tpl
+++ b/templates/popup_categs.tpl
diff --git a/templates/print_blog_post.tpl b/templates/print_blog_post.tpl
index 0eda914..4154af0 100644..100755
--- a/templates/print_blog_post.tpl
+++ b/templates/print_blog_post.tpl
@@ -1,7 +1,7 @@
<html>
<head>
<title>
-{if $post_info.use_title eq 'y'}{$post_info.title|escape} {tr}posted by{/tr} {displayname hash=$post_info nolink=TRUE} on {$post_info.publish_date|default:$post_info.created|bit_short_datetime}{else}{$post_info.publish_date|default:$post_info.created|bit_short_datetime} {tr}posted by{/tr} {displayname hash=$post_info}{/if}
+{if $post_info.use_title eq 'y'}{$post_info.title|escape} {tr}posted by{/tr} {displayname hash=$post_info nolink=true} on {$post_info.publish_date|default:$post_info.created|bit_short_datetime}{else}{$post_info.publish_date|default:$post_info.created|bit_short_datetime} {tr}posted by{/tr} {displayname hash=$post_info}{/if}
</title>
</head>
<style type="text/css">
diff --git a/templates/ranking.tpl b/templates/ranking.tpl
index 19cda98..19cda98 100644..100755
--- a/templates/ranking.tpl
+++ b/templates/ranking.tpl
diff --git a/templates/send_blog_post.tpl b/templates/send_blog_post.tpl
index 1d59bb4..1d59bb4 100644..100755
--- a/templates/send_blog_post.tpl
+++ b/templates/send_blog_post.tpl
diff --git a/templates/user_watch_blog_post.tpl b/templates/user_watch_blog_post.tpl
index ffdf3d2..ffdf3d2 100644..100755
--- a/templates/user_watch_blog_post.tpl
+++ b/templates/user_watch_blog_post.tpl
diff --git a/templates/view_blog.tpl b/templates/view_blog.tpl
index 1ce9526..83e3505 100644..100755
--- a/templates/view_blog.tpl
+++ b/templates/view_blog.tpl
@@ -29,7 +29,7 @@
{/if}
</div>
- <div class="header">
+ <div class="main_header">
<h1>{$gContent->getTitle()}</h1>
{if $gContent->getField('parsed')}<p>{$gContent->getField('parsed')}</p>{/if}
<div class="date">
@@ -43,7 +43,7 @@
</div>
{if $gContent->getField('use_find') eq 'y'}
- {minifind blog_id=$gContent->mBlogId sort_mode=$smarty.request.sort_mode}
+ {minifind blog_id=$gContent->mBlogId sort_mode=$smarty.request.sort_mode|default:''}
{/if}
{foreach from=$blogPosts item=aPost}
diff --git a/templates/view_blog_post.tpl b/templates/view_blog_post.tpl
index e9a8645..0390fa0 100644..100755
--- a/templates/view_blog_post.tpl
+++ b/templates/view_blog_post.tpl
@@ -1,4 +1,6 @@
-{if !($liberty_preview or $preview)}
+{* $Header$ *}
+{if empty($print_page)}{assign var=print_page value=false}{/if}
+{if !empty($liberty_preview) or !empty($preview)}
<!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
@@ -6,7 +8,7 @@
<rdf:Description
rdf:about="{$uri}"
dc:identifer="{$uri}"
- dc:title="{if $post_info.use_title eq 'y'}{$post_info.title|escape} {tr}posted by{/tr} {$post_info.user} on {$post_info.publish_date|default:$post_info.created|bit_short_datetime}{else}{$post_info.publish_date|default:$post_info.created|bit_short_datetime} {tr}posted by{/tr} {$post_info.user}{/if}"
+ dc:title="{if $post_info.use_title eq 'y'}{$post_info.title|escape} posted by {$post_info.user} on {$post_info.publish_date|default:$post_info.created|bit_short_datetime}{else}{$post_info.publish_date|default:$post_info.created|bit_short_datetime} posted by {$post_info.user}{/if}"
trackback:ping="{$uri2}" />
</rdf:RDF>
-->
@@ -16,7 +18,7 @@
{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='nav' serviceHash=$post_info}
<div class="display blogs">
- {if !($liberty_preview)}
+ {if empty($liberty_preview)}
{if !($preview)}
<div class="floaticon">
{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='icon' serviceHash=$post_info}
@@ -43,10 +45,11 @@
{/if}
</div>
{/if}
+ {/if}
- <div class="header">
- {if $post_info.blogtitle}
- <h1>{$post_info.blogtitle|escape}</h1>
+ <div class="main_header">
+ {if !empty($post_info.blogtitle)}
+ <h1>{$post_info.blogtitle|escape|highlight}</h1>
{/if}
<div class="navigation">
@@ -65,7 +68,7 @@
<h1>
{if $post_info.use_title eq 'y' && $post_info.title}
- {$post_info.title|escape}
+ {$post_info.title|escape|highlight}
{else}
{$post_info.publish_date|default:$post_info.created|bit_long_date}
{/if}
@@ -82,12 +85,12 @@
<br />
{/if}
</div>
+ {if ( !empty( $highlightWordList) ) }{$highlightWordList}{/if}
</div>
- {/if}
<div class="body"
{if $gBitUser->getPreference( 'users_double_click' ) eq 'y' and (($ownsblog eq 'y') or $gContent->hasUserPermission( 'p_blogs_admin' ))}
- ondblclick="location.href='{$smarty.const.BLOGS_PKG_URL}post.php?blog_id={$post_info.blog_id}&amp;post_id={$post_info.post_id}';"
+ ondblclick="location.href='{$smarty.const.BLOGS_PKG_URL}post.php?post_id={$post_info.post_id}';"
{/if}
>
<div class="content">
@@ -100,13 +103,13 @@
</div>
{/if}
- {$parsed_data}
+ {$parsed_data|highlight}
</div> <!-- end .content -->
</div> <!-- end .body -->
<div class="footer">
<a href="{$post_info.display_url}" rel="bookmark">{tr}Permalink{/tr}</a>
- {assign var=spacer value=TRUE}
+ {assign var=spacer value=true}
{if $post_info.trackbacks_from_count > 0}
{if $spacer}&nbsp; &bull; &nbsp;{/if}
{tr}referenced by{/tr} {$post_info.trackbacks_from_count} {tr}posts{/tr}
@@ -123,7 +126,7 @@
{/if}
</div> {* end .footer *}
- {if $pages > 1}
+ {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}&amp;post_id={$smarty.request.post_id}&amp;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}&amp;post_id={$smarty.request.post_id}&amp;page={$prev_page}">{booticon iname="icon-arrow-left" ipackage="icons" iexplain="previous page"}</a>
@@ -153,7 +156,7 @@
{/if}
</div> {* end .blog *}
-{if $print_page ne 'y' and $gBitSystem->isFeatureActive( 'blog_posts_comments' ) and !$preview and !$liberty_preview}
+{if $gBitSystem->isFeatureActive( 'blog_posts_comments' ) and !empty($preview) and !empty($liberty_preview)}
{include file="bitpackage:liberty/comments.tpl"}
{/if}
diff --git a/templates/view_blog_post_xml.tpl b/templates/view_blog_post_xml.tpl
index 3b02ea6..3b02ea6 100644..100755
--- a/templates/view_blog_post_xml.tpl
+++ b/templates/view_blog_post_xml.tpl
diff --git a/templates/wp-migrate.tpl b/templates/wp-migrate.tpl
index 3da4de9..3da4de9 100644..100755
--- a/templates/wp-migrate.tpl
+++ b/templates/wp-migrate.tpl