更新
This commit is contained in:
parent
86e77cbbc1
commit
9d29106040
@ -3,7 +3,7 @@
|
|||||||
/* 获取主题当前版本号 */
|
/* 获取主题当前版本号 */
|
||||||
function _getVersion()
|
function _getVersion()
|
||||||
{
|
{
|
||||||
return "5.1.5";
|
return "5.1.6";
|
||||||
};
|
};
|
||||||
|
|
||||||
/* 判断是否是手机 */
|
/* 判断是否是手机 */
|
||||||
|
@ -50,7 +50,7 @@ function _getPost($self)
|
|||||||
"agree" => _getAgree($item, false),
|
"agree" => _getAgree($item, false),
|
||||||
"permalink" => $item->permalink,
|
"permalink" => $item->permalink,
|
||||||
"lazyload" => _getLazyload(false),
|
"lazyload" => _getLazyload(false),
|
||||||
"type" => "sticky"
|
"type" => "sticky",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -64,9 +64,9 @@ function _getPost($self)
|
|||||||
"title" => $item->title,
|
"title" => $item->title,
|
||||||
"abstract" => _getAbstract($item, false),
|
"abstract" => _getAbstract($item, false),
|
||||||
"category" => $item->categories,
|
"category" => $item->categories,
|
||||||
"views" => _getViews($item, false),
|
"views" => $item->views,
|
||||||
"commentsNum" => number_format($item->commentsNum),
|
"commentsNum" => number_format($item->commentsNum),
|
||||||
"agree" => _getAgree($item, false),
|
"agree" => $item->agree,
|
||||||
"permalink" => $item->permalink,
|
"permalink" => $item->permalink,
|
||||||
"lazyload" => _getLazyload(false),
|
"lazyload" => _getLazyload(false),
|
||||||
"type" => "normal"
|
"type" => "normal"
|
||||||
|
@ -4,8 +4,10 @@ class Widget_Contents_Hot extends Widget_Abstract_Contents
|
|||||||
public function execute()
|
public function execute()
|
||||||
{
|
{
|
||||||
$this->parameter->setDefault(array('pageSize' => 10));
|
$this->parameter->setDefault(array('pageSize' => 10));
|
||||||
|
$select = $this->select();
|
||||||
|
$select->cleanAttribute('fields');
|
||||||
$this->db->fetchAll(
|
$this->db->fetchAll(
|
||||||
$this->select()->from('table.contents')
|
$select->from('table.contents')
|
||||||
->where("table.contents.password IS NULL OR table.contents.password = ''")
|
->where("table.contents.password IS NULL OR table.contents.password = ''")
|
||||||
->where('table.contents.status = ?', 'publish')
|
->where('table.contents.status = ?', 'publish')
|
||||||
->where('table.contents.created <= ?', time())
|
->where('table.contents.created <= ?', time())
|
||||||
@ -23,8 +25,10 @@ class Widget_Contents_Sort extends Widget_Abstract_Contents
|
|||||||
{
|
{
|
||||||
$this->parameter->setDefault(array('page' => 1, 'pageSize' => 10, 'type' => 'created'));
|
$this->parameter->setDefault(array('page' => 1, 'pageSize' => 10, 'type' => 'created'));
|
||||||
$offset = $this->parameter->pageSize * ($this->parameter->page - 1);
|
$offset = $this->parameter->pageSize * ($this->parameter->page - 1);
|
||||||
|
$select = $this->select();
|
||||||
|
$select->cleanAttribute('fields');
|
||||||
$this->db->fetchAll(
|
$this->db->fetchAll(
|
||||||
$this->select()
|
$select
|
||||||
->from('table.contents')
|
->from('table.contents')
|
||||||
->where('table.contents.type = ?', 'post')
|
->where('table.contents.type = ?', 'post')
|
||||||
->where('table.contents.status = ?', 'publish')
|
->where('table.contents.status = ?', 'publish')
|
||||||
|
@ -114,7 +114,7 @@
|
|||||||
<li class="item">
|
<li class="item">
|
||||||
<a class="link" href="<?php $item->permalink(); ?>" title="<?php $item->title(); ?>">
|
<a class="link" href="<?php $item->permalink(); ?>" title="<?php $item->title(); ?>">
|
||||||
<figure class="inner">
|
<figure class="inner">
|
||||||
<span class="views"><?php _getViews($item); ?> ℃</span>
|
<span class="views"><?php $item->views(); ?> ℃</span>
|
||||||
<img class="image lazyload" src="<?php _getLazyload(); ?>" data-src="<?php echo _getThumbnails($item)[0]; ?>" onerror="javascript: this.src='<?php _getLazyload() ?>';" alt="<?php $item->title(); ?>" />
|
<img class="image lazyload" src="<?php _getLazyload(); ?>" data-src="<?php echo _getThumbnails($item)[0]; ?>" onerror="javascript: this.src='<?php _getLazyload() ?>';" alt="<?php $item->title(); ?>" />
|
||||||
<figcaption class="title"><?php $item->title(); ?></figcaption>
|
<figcaption class="title"><?php $item->title(); ?></figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
<img class="image lazyload" src="<?php _getLazyload(); ?>" data-src="<?php echo _getThumbnails($item)[0]; ?>" onerror="javascript: this.src='<?php _getLazyload() ?>';" alt="<?php $item->title() ?>" />
|
<img class="image lazyload" src="<?php _getLazyload(); ?>" data-src="<?php echo _getThumbnails($item)[0]; ?>" onerror="javascript: this.src='<?php _getLazyload() ?>';" alt="<?php $item->title() ?>" />
|
||||||
<div class="describe">
|
<div class="describe">
|
||||||
<h6><?php $item->title(); ?></h6>
|
<h6><?php $item->title(); ?></h6>
|
||||||
<span><?php _getViews($item); ?> 阅读 - <?php $item->date('m/d'); ?></span>
|
<span><?php $item->views(); ?> 阅读 - <?php $item->date('m/d'); ?></span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -146,7 +146,7 @@
|
|||||||
<a href="<?php $item->permalink(); ?>" title="<?php $item->title(); ?>" class="item">
|
<a href="<?php $item->permalink(); ?>" title="<?php $item->title(); ?>" class="item">
|
||||||
<span class="sort"><?php echo $index; ?></span>
|
<span class="sort"><?php echo $index; ?></span>
|
||||||
<span class="text"><?php $item->title(); ?></span>
|
<span class="text"><?php $item->title(); ?></span>
|
||||||
<span class="views"><?php _getViews($item); ?> 阅读</span>
|
<span class="views"><?php $item->views(); ?> 阅读</span>
|
||||||
</a>
|
</a>
|
||||||
<?php $index++; ?>
|
<?php $index++; ?>
|
||||||
<?php endwhile; ?>
|
<?php endwhile; ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user