fix author image in display page
hook to display_item to add local display url to template
This commit is contained in:
parent
dacf38b794
commit
31649a31b7
|
@ -476,8 +476,9 @@ ul.tabs li a.active { background-color: #1982D1; color: #ffffff; }
|
|||
.compact .commentlist .avatar { left: -44px; width: 34px; height: 34px; }
|
||||
.compact .commentlist > li::before { display: none; }
|
||||
/* item author icon */
|
||||
.hentry .avatar { position: absolute; left: -73px; top: 20px; border-radius: 3px; box-shadow: 0px 1px 2px #CCCCCC; }
|
||||
|
||||
.hentry .avatar { position: absolute; left: -60px; top: 20px; border-radius: 3px; box-shadow: 0px 1px 2px #CCCCCC; width: 48px; height: 48px;}
|
||||
.singular .entry-meta { position: relative; }
|
||||
.singular .hentry .avatar { left: 40px; top: 85px;}
|
||||
|
||||
/* search item */
|
||||
article.search {
|
||||
|
|
|
@ -13,9 +13,28 @@ function blog_init(&$a) {
|
|||
$a->theme_info = array();
|
||||
}
|
||||
|
||||
function blog_install(&$a){
|
||||
register_hook('display_item', 'view/theme/blog/theme.php','blogtheme_display_item');
|
||||
logger("installed theme blog");
|
||||
}
|
||||
function blog_uninstall(&$a){
|
||||
unregister_hook('display_item', 'view/theme/blog/theme.php','blogtheme_display_item');
|
||||
logger("uninstalled theme blog");
|
||||
}
|
||||
|
||||
function blogtheme_imgurl($headimg) {
|
||||
$a = get_app();
|
||||
if ($headimg[0]==".") return $a->get_baseurl().'/view/theme/blog/headers/'.substr($headimg,1);
|
||||
if ($headimg == "~none~") return "";
|
||||
return False;
|
||||
}
|
||||
|
||||
function blogtheme_display_item(&$a, &$data){
|
||||
if (!is_null($data)) {
|
||||
$nick = $a->profile['nickname'];
|
||||
if (is_null($nick)) $nick = $a->user['nickname'];
|
||||
$data['output']['displaylink'] = $a->get_baseurl()."/display/".$nick."/".$data['item']['id'];
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
<article class="post-8 post type-post status-publish format-standard hentry category-uncategorized tag-html tag-wordpress {{if $mode == network}}compact{{endif}}" id="item-$item.id">
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><a rel="bookmark" title="Permalink" href="$item.plink.href">$item.title</a></h1>
|
||||
{{ if $item.title }}<h1 class="entry-title"><a rel="bookmark" title="Permalink" href="$item.displaylink">$item.title</a></h1>{{ endif }}
|
||||
|
||||
<div class="entry-meta">
|
||||
{{if $mode != profile}}<img class="avatar avatar-68 photo avatar-default " alt="" title="$item.name" src="$item.thumb" height="68" width="68">{{endif}}
|
||||
|
@ -22,7 +22,7 @@
|
|||
</div><!-- .entry-meta -->
|
||||
|
||||
<div class="comments-link">
|
||||
<a title="Comment" href="$item.plink.href">$item.total_comments_num</a>
|
||||
<a title="Comment" href="$item.displaylink">$item.total_comments_num</a>
|
||||
</div>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
|
@ -59,7 +59,7 @@
|
|||
<span class="sep"> | </span>
|
||||
{{ endif }}
|
||||
|
||||
<span class="comments-link"><a title="Comment" href="$item.plink.href">$item.total_comments_num $item.total_comments_text</a>
|
||||
<span class="comments-link"><a title="Comment" href="$item.displaylink">$item.total_comments_num $item.total_comments_text</a>
|
||||
</span>
|
||||
</footer><!-- #entry-meta -->
|
||||
|
||||
|
|
Loading…
Reference in New Issue