1 (edited by MBTY 2014-08-24 11:41:00)

Topic: RSS plugin

Anyone have RSS plugin for Morfy?

2 (edited by MBTY 2014-08-26 19:01:21)

Re: RSS plugin

Also, look what i constructed:
http://dwwb.ru
1) Blocks with random color
2) Tags in Title are clickable
3) Cackle comments widget added
4) Nice sitemap.
5)  /content/blog replaced to /content everywhere in morfy.  - Nice URL without "/blog/"
6) Nice 404 page
It was very hard for me. My html/php knowledge are very poor. Please help me to create RSS button.

3 2014-08-27 19:13:35 (edited by MBTY 2014-08-27 19:22:11)

Re: RSS plugin

I made it!!!!

Instructions:
plugins/rss/rss.php

getUrl() == 'RSS') {
    Morfy::factory()->addAction('before_render', function() {
echo '


YOUR TITLE
HTTP://YOUR_SITE.COM/
YOUR DESCRIPTION
YOUR LANGUAGE: ru, en, etc.
';
$pages = Morfy::factory()->getPages(CONTENT_PATH, 'date', 'DESC', array('404'));
foreach($pages as $page) {
echo ('    
        '.htmlspecialchars($page['title'], ENT_QUOTES).'
        '.$page['url'].'
        '.$page['url'].'
        '.htmlspecialchars($page['content_short'], ENT_QUOTES).'
        '.date('D, d M Y H:i:s', strtotime($page['date'])).' +0400
    
');
}
echo '
';
        exit();
    });
} ?>

About:   "'.date('D, d M Y H:i:s', strtotime($page['date'])).' +0400". "+0400" - Your site`s timezone
/config.php

'plugins' => array(
            'pagination',
            'tags',
            'rss',
        ),

Wasn`t work until:
/libraries/Morfy/Morfy.php

DELETE line 390:             header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found');

Any ideas why need to delete this line in Morfy.php ?

Re: RSS plugin

Please read: https://github.com/Awilum/morfy-cms/issues/9

XSS Testing

tovic's Website