Files
Testing/templates/blog_reader.tpl
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

180 lines
7.3 KiB
Smarty

{include file='header_blog_reader.tpl'}
{* $Id: blog.tpl 162 2009-04-30 01:43:11Z john $ *}
{* JAVASCRIPT *}
{lang_javascript id=861}
<script type="text/javascript" src="./include/js/class_blog.js"></script>
<script type="text/javascript">
SocialEngine.Blog = new SocialEngineAPI.Blog();
SocialEngine.RegisterModule(SocialEngine.Blog);
</script>
{* BLOG ENTRIE(S) *}
<div style="margin:5px 5px 5px 5px;text-align:left;background:#660000;border:solid 1px #fa3100;-webkit-overflow-scrolling: touch;">
<a name="top"></a>
<div style="float:left;width:28px;margin-right:7px;">
<div style="display:block;width:100%;text-align:center;">
<a href="{$url->url_create('profile', $owner->user_info.user_username)}" target="_blank">
{assign var="profilepicture" value=$owner->user_photo("./images/nophoto.png")}
{$owner->userprofiledot($profilepicture, "240px", "240px")}
</a>
</div>
<div style="display:block;text-align:center;width:100%;font-weight: bold;margin-top:3px;display:none;">
<a href="{$url->url_create('profile', $owner->user_info.user_username)}"><span style="font-size:70%;">{$owner->user_displayname}</span></a>
</div>
</div>
<div style="padding:10px;">
{section name=entries_loop loop=$entries}
<div class="seBlogEntry seBlogEntry{cycle values='1,2'}">
{* MAKE SURE TITLE IS NOT BLANK *}
{if $entries[entries_loop].blogentry_title != ""}
{assign var='blogentry_title' value=$entries[entries_loop].blogentry_title}
{else}
{lang_block id=1500015 var=blogentry_title}{/lang_block}
{/if}
<div class='seBlogEntryTitle'>
<a style="font-size:90%;">{$blogentry_title}, By {$owner->user_displayname}</a>
</div>
<div class='seBlogEntryDate'>
{lang_print id=1500016}
{$datetime->cdate("`$setting.setting_dateformat`", $datetime->timezone("`$entries[entries_loop].blogentry_date`", $global_timezone))}
-
<a href='#comments'>{$entries[entries_loop].blogentry_totalcomments} comment{if $entries[entries_loop].blogentry_totalcomments!=1}s{/if}</a>
[ <a href='#comment'>{lang_print id=1500021}</a> ]
{if $user->user_exists && $user->user_info.user_id!=$owner->user_info.user_id}
<div class="seBlogSubscribe" {if $is_subscribed} style="display:none;"{/if}><a href="javascript:void(0);" onclick="SocialEngine.Blog.subscribeBlog(SocialEngine.Owner.user_info.user_id);">{lang_print id=1500027}</a></div>
<div class="seBlogUnsubscribe"{if !$is_subscribed} style="display:none;"{/if}><a href="javascript:void(0);" onclick="SocialEngine.Blog.unsubscribeBlog(SocialEngine.Owner.user_info.user_id);">{lang_print id=1500028}</a></div>
{/if}
</div>
{* SHOW ENTRY CATEGORY *}
{if !empty($entries[entries_loop].blogentry_blogentrycat_id)}
<div class='seBlogEntryCategory'>
Category:
{if !$entries[entries_loop].blogentrycat_user_id}<a href='browse_blogs.php?c={$entries[entries_loop].blogentry_blogentrycat_id}'>{/if}
{if !empty($entries[entries_loop].blogentrycat_languagevar_id)}
{capture assign=blogentrycat_title}{lang_print id=$entries[entries_loop].blogentrycat_languagevar_id}{/capture}
{else}
{assign var=blogentrycat_title value=$entries[entries_loop].blogentrycat_title}
{/if}
{$blogentrycat_title|truncate:97}
{if !$entries[entries_loop].blogentrycat_user_id}</a>{/if}
</div>
{/if}
<div class='seBlogEntryBody' style="overflow: auto;">
{$entries[entries_loop].blogentry_body|choptext:75:"<br>"}
</div>
</div>
{sectionelse}
<!--<img src='./images/icons/bulb22.gif' border='0' class='icon' />-->
{lang_sprintf id=1500023 1=$owner->user_displayname 2=$url->url_create("profile", $owner->user_info.user_username)}
{/section}
{* STUFF TO SHOW IF ONLY ONE BLOG ENTRY *}
{if $blogentry_id && $total_blogentries==1}
<div class='seBlogComments'>
{* RETURN AND REPORT LINKS AND SOCIAL BOOKMARKING *}
<div style='margin-bottom: 20px;'>
<div class='button' style='float: left; padding-left: 5px;'>
<a data-toggle="modal" data-target="#myModal" href="user_report.php?return_url={$url->url_current()|escape:url}"><!--<img src='./images/icons/report16.gif' border='0' class='button'>-->{lang_print id=861}</a>
</div>
<div style='clear: both; height: 1px;'></div>
</div>
{* COMMENTS *}
<a name="comment" /></a>
<a href="#top" style="font-size:80%;">[Top Of Page]</a>
<div id="blog_{$blogentry_id}_postcomment"></div>
<a name="comments" /></a>
<div id="blog_{$blogentry_id}_comments" style='margin-left: auto; margin-right: auto;'></div>
{lang_javascript ids=39,155,175,182,183,184,185,187,784,787,829,830,831,832,833,834,835,854,856,891,1025,1026,1032,1034,1071}
<script type="text/javascript">
SocialEngine.BlogComments = new SocialEngineAPI.Comments({ldelim}
'canComment' : {if $allowed_to_comment}true{else}false{/if},
'commentHTML' : '{$setting.setting_comment_html}',
'commentCode' : {if $setting.setting_comment_code}true{else}false{/if},
'type' : 'blog',
'typeIdentifier' : 'blogentry_id',
'typeID' : {$blogentry_id},
'typeTab' : 'blogentries',
'typeCol' : 'blogentry',
'initialTotal' : {$blogentry_info.blogentry_totalcomments|default:0},
'paginate' : false,
'cpp' : 5
{rdelim});
SocialEngine.RegisterModule(SocialEngine.BlogComments);
// Backwards
function addComment(is_error, comment_body, comment_date)
{ldelim}
SocialEngine.BlogComments.addComment(is_error, comment_body, comment_date);
{rdelim}
function getComments(direction)
{ldelim}
SocialEngine.BlogComments.getComments(direction);
{rdelim}
</script>
</div>
<a href="#top" style="font-size:80%;">[Top Of Page]</a>
{/if}
</div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<script type="text/javascript">
{literal}
jQuery.noConflict();
jQuery('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
|| location.hostname == this.hostname) {
var target = jQuery(this.hash);
target = target.length ? target : jQuery('[name=' + this.hash.slice(1) +']');
if (target.length) {
jQuery('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
jQuery(window).load(function() {
});
{/literal}
</script>
</body>
</html>