Browse Source

Improvements

pull/189/head
Danang Probo Sayekti 10 years ago
parent
commit
0bb0382b5c
5 changed files with 11 additions and 9 deletions
  1. +1
    -1
      system/includes/functions.php
  2. +4
    -4
      themes/blog/layout.html.php
  3. +1
    -0
      themes/blog/main.html.php
  4. +4
    -4
      themes/blog/post.html.php
  5. +1
    -0
      themes/blog/static.html.php

+ 1
- 1
system/includes/functions.php View File

@ -1032,7 +1032,7 @@ function tab($p)
echo '<div class="tab"><ul class="nav nav-tabs"><li role="presentation" class="active"><a href="' . $p->url . '">View</a></li><li><a href="' . $p->url . '/edit?destination=post">Edit</a></li></ul></div>';
}
} else {
echo '<div class="tab"><ul class="nav nav-tabs"><li role="presentation" class="active"><a href="' . $p->url . '">View</a><a href="' . $p->url . '/edit?destination=post">Edit</a></li></ul></div>';
echo '<div class="tab"><ul class="nav nav-tabs"><li role="presentation" class="active"><a href="' . $p->url . '">View</a></li><li><a href="' . $p->url . '/edit?destination=post">Edit</a></li></ul></div>';
}
}


+ 4
- 4
themes/blog/layout.html.php View File

@ -102,13 +102,13 @@
<div class="section-inner">
<h2 class="heading">Latest Blog Posts</h2>
<?php $lists = recent_posts(true);?>
<?php $i = 1; $lt = 60;?>
<?php $char = 60;?>
<?php foreach ($lists as $l):?>
<?php if (strlen(strip_tags($l->title)) > $lt) { $lbp = shorten($l->title, $lt) . '...';} else {$lbp = $l->title;}?>
<?php if (strlen(strip_tags($l->title)) > $char) { $recentTitle = shorten($l->title, $char) . '...';} else {$recentTitle = $l->title;}?>
<div class="item">
<h3 class="title"><a href="<?php echo $l->url;?>"><?php echo $lbp;?></a></h3>
<h3 class="title"><a href="<?php echo $l->url;?>"><?php echo $recentTitle;?></a></h3>
<div class="content">
<p><?php echo get_teaser($l->body, 75); ?>...</p>
<p><?php echo shorten($l->body, 75); ?>...</p>
<a class="more-link" href="<?php echo $l->url;?>"><i class="fa fa-link"></i> Read more</a>
</div><!--//content-->
</div>


+ 1
- 0
themes/blog/main.html.php View File

@ -65,6 +65,7 @@
<a href="https://twitter.com/share?url=<?php echo $p->url ?>&text=<?php echo $p->title ?>"><i class="fa fa-twitter"></i></a>
<a class="last" href="https://plus.google.com/share?url=<?php echo $p->url ?>"><i class="fa fa-google-plus"></i></a>
</span>
<div style="clear:both;"></div>
</div>
</div><!--//item-->
</div><!--//content-->


+ 4
- 4
themes/blog/post.html.php View File

@ -72,16 +72,16 @@
<?php echo disqus_count() ?>
<?php endif; ?>
<?php $tags = get_related($p->tag, true, config('related.count'));?>
<?php $mt = 30; $total = count($tags); $i = 1; if ($total >= 1) { ?>
<?php $char = 30; $total = count($tags); $i = 1; if ($total >= 1) { ?>
<div class="related related-posts" style="margin-top:30px;position:relative;">
<hr>
<h2 class="heading">Related Posts</h2>
<?php foreach ($tags as $t):?>
<div class="item col-md-4">
<?php if (strlen(strip_tags($t->title)) > $mt) { $rt = shorten($t->title, $mt) . '...';} else {$rt = $t->title;}?>
<h3 class="title"><a href="<?php echo $t->url;?>"><?php echo $rt;?></a></h3>
<?php if (strlen(strip_tags($t->title)) > $char) { $relatedTitle = shorten($t->title, $char) . '...';} else {$relatedTitle = $t->title;}?>
<h3 class="title"><a href="<?php echo $t->url;?>"><?php echo $relatedTitle;?></a></h3>
<div class="content">
<p><?php echo get_teaser($t->body, 60); ?>... <a class="more-link" href="<?php echo $t->url;?>">more</a></p>
<p><?php echo shorten($t->body, 60); ?>... <a class="more-link" href="<?php echo $t->url;?>">more</a></p>
</div><!--//content-->
</div>
<?php if ($i++ >= config('related.count')) break; ?>


+ 1
- 0
themes/blog/static.html.php View File

@ -1,6 +1,7 @@
<section class="post section" itemprop="blogPost" itemscope="itemscope" itemtype="http://schema.org/BlogPosting">
<div class="section-inner">
<div class="content">
<?php if (login()) { echo tab($p); } ?>
<div class="item">
<h2 class="title" itemprop="headline"><a href="<?php echo $p->url;?>"><?php echo $p->title;?></a></h2>
<div class="desc text-left" itemprop="articleBody">


Loading…
Cancel
Save