rss
This commit is contained in:
parent
59deb3c2a4
commit
bd89d906b9
|
|
@ -38,7 +38,7 @@ class postsController extends Controller
|
|||
|
||||
public function show($locale,$id){
|
||||
|
||||
$post = $this->Post::find($id,['id','content_html']);
|
||||
$post = $this->Post::find($id,['id','content_html','author']);
|
||||
|
||||
if(!is_null($post)) {
|
||||
$obj = Db::table('vdomah_blogviews_views')
|
||||
|
|
|
|||
|
|
@ -86,9 +86,9 @@ class Plugin extends PluginBase
|
|||
$fileContents .= "\t\t<item>\n" .
|
||||
"\t\t\t<title>" . htmlspecialchars($post->title, ENT_QUOTES, 'UTF-8') . "</title>\n" .
|
||||
"\t\t\t<link>" . Settings::get('link') . Settings::get('postPage') . "/" . $post->slug . "</link>\n" .
|
||||
"\t\t\t<guid>" . Settings::get('link') . Settings::get('postPage') . "/" . $post->slug . "</guid>\n" .
|
||||
"\t\t\t<guid isPermaLink='true''>" . Settings::get('link') . Settings::get('postPage') . "/" . $post->slug . "</guid>\n" .
|
||||
"\t\t\t<pubDate>" . $published->format(DateTime::RFC2822) . "</pubDate>\n" .
|
||||
"\t\t\t<description>" . htmlspecialchars($description, ENT_QUOTES, 'UTF-8') . "</description>\n" .
|
||||
"\t\t\t<description><![CDATA[ " . htmlspecialchars($description, ENT_QUOTES, 'UTF-8') . " ]]></description>\n" .
|
||||
"\t\t</item>\n";
|
||||
|
||||
}
|
||||
|
|
@ -104,6 +104,7 @@ class Plugin extends PluginBase
|
|||
protected function loadPosts()
|
||||
{
|
||||
$posts = Db::table('rainlab_blog_posts')
|
||||
->select('id','title','slug','published_at','content','excerpt','featured_image')
|
||||
->orderBy('published_at', 'desc')
|
||||
->where('published', '=', '1')
|
||||
->get();
|
||||
|
|
|
|||
Loading…
Reference in New Issue