mirror of
https://github.com/danpros/htmly.git
synced 2026-04-23 05:56:22 +05:30
Add theme: blog
Add new theme blog
This commit is contained in:
parent
2ab20034db
commit
b3e3895bf4
28 changed files with 1879 additions and 4 deletions
|
|
@ -1416,12 +1416,12 @@ function generate_rss($posts)
|
|||
if (!empty($rssLength)) {
|
||||
if (strlen(strip_tags($p->body)) < config('rss.char')) {
|
||||
$string = preg_replace('/\s\s+/', ' ', strip_tags($p->body));
|
||||
$body = $string . '...' . ' <a class="readmore" href="' . $p->url . '#more">more</a>';
|
||||
$body = $string . '...' . ' <a class="readmore" href="' . $p->url . '">more</a>';
|
||||
} else {
|
||||
$string = preg_replace('/\s\s+/', ' ', strip_tags($p->body));
|
||||
$string = substr($string, 0, config('rss.char'));
|
||||
$string = substr($string, 0, strrpos($string, ' '));
|
||||
$body = $string . '...' . ' <a class="readmore" href="' . $p->url . '#more">more</a>';
|
||||
$body = $string . '...' . ' <a class="readmore" href="' . $p->url . '">more</a>';
|
||||
}
|
||||
} else {
|
||||
$body = $p->body;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue