1

(7 replies, posted in Plugins)

I have the same problem!

Fatal error: Using $this when not in object context in /home/xxxxx/public_html/plugins/share/share.php on line 60.

Can you help me?

2

(9 replies, posted in Questions)

Hello
I am interested and I about the same thing
can you tell me how it will manage;

3

(3 replies, posted in Questions)

@aim
now it's all ok the fixed it myself!
http://marekwaszkiewicz.com/mon2/

nice code

<meta property="og:title" content="<?php echo Site::title(); ?>">

5

(3 replies, posted in Questions)

you could bro to add blocks?

6

(3 replies, posted in Questions)

wow nice smile

dextra wrote:

hi
https://www.dropbox.com/s/bejj4ied2f4qh … s.zip?dl=0 SimpleApp work for Monstra 3.0.1 smile

@ michaelmorrisbowyer
The link works please download again

@ michaelmorrisbowyer
okay I'll do it tomorrow I receive my new computer! I am now with tablet and is difficult I hope you understand me

9

(2 replies, posted in Questions)

hi
You can send me a private message with the link of your site and I will tell you wink

10

(1 replies, posted in Snippets)

nice wink

11

(1 replies, posted in Questions)

Hi

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !\.[a-zA-Z0-9]+$ 
RewriteRule ^(.+?)/*$ $1.php [L,QSA]

only for one day is;
WELCOME TO YOUR MEMBER AREA, DPERTAL.
YOU ARE A MEMBER SINCE: 10.4.2015 YOUR MEMBERSHIP WILL EXPIRE ON: 10.04.2015

ok

@wormsunited
I did register but I still have not received email

15

(22 replies, posted in Questions)

nakome wrote:

Like this ? (Morfy panel plugin )
https://dl.dropboxusercontent.com/u/23834858/fotos/testing%20select%20pages.gif


@dextra
xm problem backup

Ok Thx

Hi bro
any new to admin panel?

16

(4 replies, posted in Plugins)

@egetcode
404 fix the link

@tovic

1) Tags Page
2) Page Views Counter
3) Next/Previous Navigation

I installed but spend error

( ! ) Parse error: syntax error, unexpected ''tags_config'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in C:\wamp\www\demo\config.php on line 22
Call Stack
#    Time    Memory    Function    Location
1    0.0010    250960    {main}( )    ..\index.php:0
2    0.0040    403608    Morfy->run( )    ..\index.php:47
3    0.0040    403648    Morfy->loadConfig( )    ..\Morfy.php:138

config.php

<?php
    return array(
        'site_url' => 'http://localhost/demo',
        'site_charset' => 'UTF-8',
        'site_timezone' => 'Kwajalein',
        'site_theme' => 'default',
        'site_title' => 'demo',
        'site_description' => 'demo',
        'site_keywords' => 'demo',
        'email' => 'demo@gmail.com',
        'plugins' => array(
            'markdown',
            'sitemap',
            'pageview',
            'tags',
            'nextprev'
        ),
        'pageview_config' => array(
            // Change to `false` if you want to remove the leading zero in counter
            'leading_zero' => '000000'
        )
        'tags_config' => array( // <= Configuration
            'param' => 'tagged', // <= Page parameter name in URL for the tags filter
            'param_page' => 'page', // <= Page parameter name in URL for the page filter
            'limit' => 5, // <= Number of posts to display per page request
            'separator' => ', ', // <= Separator for each tag link
            'classes' => array( // <= List of item's HTML classes
                'page_item' => 'page',
                'nav' => 'pager',
                'nav_prev' => 'previous',
                'nav_next' => 'next',
                'nav_disabled' => 'disabled',
                'tag' => 'tag',
                'current' => 'current'
            ),
            'labels' => array( // <= List of item's readable text or labels
                'page_header' => '<div class="alert alert-info"><p>Showing posts tagged in <strong>{tag}</strong>.</p></div>',
                'nav_prev' => '&larr; Previous',
                'nav_next' => 'Next &rarr;',
                'not_found' => '<div class="alert alert-danger"><p>No more posts found tagged in <strong>{tag}</strong>.</p></div>'
            )
        )
        'nextprev_config' => array( // <= Configuration
            'param' => 'page', // <= Page parameter name in URL
            'limit' => 5, // <= Number of posts to display per page request
            'classes' => array( // <= List of item's HTML classes
                'page_item' => 'page',
                'nav' => 'pager',
                'nav_prev' => 'previous',
                'nav_next' => 'next',
                'nav_disabled' => 'disabled'
            ),
            'labels' => array( // <= List of item's readable text or labels
                'nav_prev' => '&larr; Previous',
                'nav_next' => 'Next &rarr;',
                'not_found' => '<div class="alert alert-danger"><p>Not found.</p></div>'
            )
        )
    );
          

tempate news.html

<?php include 'header.html' ?>
<?php include 'navbar.html' ?>
    <?php Morfy::factory()->runAction('theme_content_before'); ?>
    <div class="container">
        <div class="row">
            <div class="col-md-12">
            <?php
                        // Configuration data
                        $config = Morfy::$config['nextprev_config'];
                        // Get current URI segments
                        $path = Morfy::factory()->getUriSegments();
                        $path = implode('/', $path);
                        // Number of posts to display per page request
                        $per_page = isset($config['limit']) ? $config['limit'] : 5;
                        // Get all posts
                        $all_posts = Morfy::factory()->getPages(CONTENT_PATH . '/' . $path . '/', 'date', 'DESC', array('404', 'index'));
                        // Calculate total pages
                        $total_pages = ceil(count($all_posts) / $per_page);
                        // Get current page offset
                        $current_page = isset($_GET[$config['param']]) ? $_GET[$config['param']] : 1;
                        // Split all posts into chunks
                        $posts = is_array($all_posts) ? array_chunk($all_posts, $per_page) : array();
                        $tag_filter = Morfy::$config['tags_config']['param'];
                        if(isset($tag_filter) && isset($_GET[$tag_filter])) { // Tags page
                            Morfy::factory()->runAction('tags');
                        } else { // Normal posts loop
                            Morfy::factory()->runAction('index_nextprev');
                        }
                        // Posts loop
                        if(isset($posts[$current_page - 1]) && ! empty($posts[$current_page - 1])) {
                            foreach($posts[$current_page - 1] as $post) {
                                // use default image if not write Thumbnail 
                                $thumbnail =  ($post['thumbnail']) ? $post['thumbnail'] : $config['Site_url'].'public/images/default.jpg';
                                
                                echo '<div class="tumb-grid"><img src="'.$thumbnail.'" alt="'.$post['title'].'" data-holder-rendered="true" style="height: 200px; width: 100%; display: block;"><h3><a href="'.$config['site_url'].'/blog/'.$post['slug'].'">'.$post['title'].'</a></h3>
                                </div>';
                            }
                        } else {
                            echo '<div class="' . $config['classes']['page_item'] . '">' . $config['labels']['not_found'] . '</div>';
                        }
                        
            ?>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <?php
                // Build the pagination
                        $html  = '<ul class="' . $config['classes']['nav'] . '">';
                        $html .= $current_page > 1 ? '<li class="' . $config['classes']['nav_prev'] . '"><a href="?' . $config['param'] . '=' . ($current_page - 1) . '">' . $config['labels']['nav_prev'] . '</a></li>' : '<li class="' . $config['classes']['nav_prev'] . ' ' . $config['classes']['nav_disabled'] . '"><span>' . $config['labels']['nav_prev'] . '</span></li>';
                        $html .= $current_page < $total_pages ? ' <li class="' . $config['classes']['nav_next'] . '"><a href="?' . $config['param'] . '=' . ($current_page + 1) . '">' . $config['labels']['nav_next'] . '</a></li>' : ' <li class="' . $config['classes']['nav_next'] . ' ' . $config['classes']['nav_disabled'] . '"><span>' . $config['labels']['nav_next'] . '</span></li>';
                        $html .= '</ul>';
                        echo $html;
                ?>
            </div>
        </div>
    </div>
    <?php Morfy::factory()->runAction('theme_content_after'); ?>
<?php include 'footer.html' ?>

news_post.html

<?php include 'header.html' ?>
<?php include 'navbar.html' ?>
<div class="container">
    <?php Morfy::factory()->runAction('theme_content_before'); ?>
    <h3><?php echo $page['title']; ?></h3>
    <?php $thumbnail =  ($page['thumbnail']) ? $page['thumbnail'] : $config['Site_url'].'public/images/default.jpg'; ?>
    <div class="tumb">
        <img src="<?php echo $thumbnail;?>" alt="<?php echo $page['title'];?>">
    </div>
    <p>Posted on <?php echo $page['date']; ?></p>
    <div><?php echo $page['content']; ?></div>  
    <span class="page-views">
        <strong class="page-views-label">Total Page Views:</strong> 
        <span class="page-views-counter">
            <?php Morfy::factory()->runAction('pageview'); ?>
        </span>
    </span>
    <div class="post-tags">
        <?php Morfy::factory()->runAction('tags_links'); ?>
    </div>
    <?php Morfy::factory()->runAction('item_nextprev'); ?>
    <?php Morfy::factory()->runAction('theme_content_after'); ?>
    <hr>
</div>
<?php include 'footer.html' ?>

I did not touch any file!
and I get this error sad

18

(6 replies, posted in Questions)

tovic wrote:

You answered your own question:

<?php echo date('d/m/Y', strtotime($page['date'])); ?>

http://php.net/manual/en/function.date.php

we put code;

19

(6 replies, posted in Questions)

How to change date format in d/m/Y ?

now

<?php
    return array(

        ...
        ...
        ...

        'plugins' => array(
            'markdown',
            'sitemap',
            'nextprev' // <= Activation
        ),
        'nextprev_config' => array( // <= Configuration
            'param' => 'page', // <= Page parameter name in URL
            'limit' => 5, // <= Number of posts to display per page
            'classes' => array( // <= List of item's HTML classes
                'page_item' => 'page',
                'nav' => 'pager',
                'nav_prev' => 'previous',
                'nav_next' => 'next',
                'nav_disabled' => 'disabled'
            ),
            'labels' => array( // <= List of item's readable text or labels
                'nav_prev' => '&larr; Previous',
                'nav_next' => 'Next &rarr;',
                'not_found' => '<div class="alert alert-danger"><p>Not found.</p></div>'
            )
        )
    );

template news.html

<?php include 'header.html' ?>
<?php include 'navbar.html' ?>
<div class="container">
    <?php Morfy::factory()->runAction('theme_content_before'); ?>
    <?php

    // Configuration data
    $config = Morfy::$config['nextprev_config'];
    // Get current URI segments
    $path = Morfy::factory()->getUriSegments();
    $path = implode('/', $path);
    // Number of posts to display per page request
    $per_page = isset($config['limit']) ? $config['limit'] : 5;
    // Get all posts
    $all_posts = Morfy::factory()->getPages(CONTENT_PATH . '/' . $path . '/', 'date', 'DESC', array('404', 'index'));
    // Calculate total pages
    $total_pages = ceil(count($all_posts) / $per_page);
    // Get current page offset
    $current_page = isset($_GET[$config['param']]) ? $_GET[$config['param']] : 1;
    // Split all posts into chunks
    $posts = is_array($all_posts) ? array_chunk($all_posts, $per_page) : array();

    // Posts loop
    if(isset($posts[$current_page - 1]) && ! empty($posts[$current_page - 1])) {
        foreach($posts[$current_page - 1] as $post) {
            echo '<div class="' . $config['classes']['page_item'] . '">';
            echo $post['title'] ? '<h3><a href="' . $post['url'] . '">' . $post['title'] . '</a></h3>' : "";
            echo $post['date'] ? '<p><em><strong>Published on:</strong> ' . $post['date'] . '</em></p>' : "";
            if(strlen($post['description']) > 0) {
                echo '<p>' . $post['description'] . '</p>';
            } elseif(strlen($post['content_short']) > 0) {
                echo '<p>' . $post['content_short'] . '</p>';
            }
            echo '</div>';
        }
    } else {
        echo '<div class="' . $config['classes']['page_item'] . '">' . $config['labels']['not_found'] . '</div>';
    }

    // Build the pagination
    $html  = '<ul class="' . $config['classes']['nav'] . '">';
    $html .= $current_page > 1 ? '<li class="' . $config['classes']['nav_prev'] . '"><a href="?' . $config['param'] . '=' . ($current_page - 1) . '">' . $config['labels']['nav_prev'] . '</a></li>' : '<li class="' . $config['classes']['nav_prev'] . ' ' . $config['classes']['nav_disabled'] . '"><span>' . $config['labels']['nav_prev'] . '</span></li>';
    $html .= $current_page < $total_pages ? ' <li class="' . $config['classes']['nav_next'] . '"><a href="?' . $config['param'] . '=' . ($current_page + 1) . '">' . $config['labels']['nav_next'] . '</a></li>' : ' <li class="' . $config['classes']['nav_next'] . ' ' . $config['classes']['nav_disabled'] . '"><span>' . $config['labels']['nav_next'] . '</span></li>';
    $html .= '</ul>';

    echo $html;

    ?>
    <?php Morfy::factory()->runAction('theme_content_after'); ?>
</div>
<?php include 'footer.html' ?>

code nextprev.php

<?php
/**
 * Next & Previous Navigation for Morfy CMS
 *
 * @package Morfy
 * @subpackage Plugins
 * @author Taufik Nurrohman <http://latitudu.com>
 * @copyright 2014 Romanenko Sergey / Awilum
 * @version 1.0.4
 *
 */
// Include `shell.css` in header
// Uncomment the hook function below if you are not using Bootstrap.
// Morfy::factory()->addAction('theme_header', function() {
//     echo '<link href="' . Morfy::$config['site_url'] . '/plugins/nextprev/lib/css/shell.css" rel="stylesheet">' . "\n";
// });
// For posts listing page
// Usage => Morfy::factory()->runAction('index_nextprev');
Morfy::factory()->addAction('index_nextprev', function() {
    // Configuration data
    $config = Morfy::$config['nextprev_config'];
    // Get current URI segments
    $path = Morfy::factory()->getUriSegments();
    $path = implode('/', $path);
    // Number of posts to display per page request
    $per_page = isset($config['limit']) ? $config['limit'] : 5;
    // Get all posts
    $all_posts = Morfy::factory()->getPages(CONTENT_PATH . '/' . $path . '/', 'date', 'DESC', array('404', 'index'));
    // Calculate total pages
    $total_pages = ceil(count($all_posts) / $per_page);
    // Get current page offset
    $current_page = isset($_GET[$config['param']]) ? $_GET[$config['param']] : 1;
    // Split all posts into chunks
    $posts = is_array($all_posts) ? array_chunk($all_posts, $per_page) : array();
    // Posts loop
    if(isset($posts[$current_page - 1]) && ! empty($posts[$current_page - 1])) {
        foreach($posts[$current_page - 1] as $post) {
            echo '<div class="' . $config['classes']['page_item'] . '">';
            echo $post['title'] ? '<h3><a href="' . $post['url'] . '">' . $post['title'] . '</a></h3>' : "";
            echo $post['date'] ? '<p><em><strong>Published on:</strong> ' . $post['date'] . '</em></p>' : "";
            if(strlen($post['description']) > 0) {
                echo '<p>' . $post['description'] . '</p>';
            } elseif(strlen($post['content_short']) > 0) {
                echo '<p>' . $post['content_short'] . '</p>';
            }
            echo '</div>';
        }
    } else {
        echo '<div class="' . $config['classes']['page_item'] . '">' . $config['labels']['not_found'] . '</div>';
    }
    // Build the pagination
    $html  = '<ul class="' . $config['classes']['nav'] . '">';
    $html .= $current_page > 1 ? '<li class="' . $config['classes']['nav_prev'] . '"><a href="?' . $config['param'] . '=' . ($current_page - 1) . '">' . $config['labels']['nav_prev'] . '</a></li>' : '<li class="' . $config['classes']['nav_prev'] . ' ' . $config['classes']['nav_disabled'] . '"><span>' . $config['labels']['nav_prev'] . '</span></li>';
    $html .= $current_page < $total_pages ? ' <li class="' . $config['classes']['nav_next'] . '"><a href="?' . $config['param'] . '=' . ($current_page + 1) . '">' . $config['labels']['nav_next'] . '</a></li>' : ' <li class="' . $config['classes']['nav_next'] . ' ' . $config['classes']['nav_disabled'] . '"><span>' . $config['labels']['nav_next'] . '</span></li>';
    $html .= '</ul>';
    echo $html;
});
// For single article
// Usage => Morfy::factory()->runAction('item_nextprev');
Morfy::factory()->addAction('item_nextprev', function() {
    // Configuration data
    $config = Morfy::$config['nextprev_config'];
    // Get current URI segments
    $path = Morfy::factory()->getUriSegments();
    array_pop($path);
    $path = implode('/', $path);
    // Get all posts
    $all_posts = Morfy::factory()->getPages(CONTENT_PATH . '/' . $path . '/', 'date', 'DESC', array('404', 'index'));
    // Count total posts
    $total_posts = count($all_posts);
    // Get current page URL
    $current_url = Morfy::factory()->getUrl();
    // Get current page data
    $current_page = Morfy::factory()->getPage($current_url);
    // Testing...
    // echo $current_page['date'];
    // Find next and previous link from current page
    $prev_page = $next_page = null;
    for($i = 0; $i < $total_posts; $i++) {
        if($current_page['date'] == $all_posts[$i]['date']) {
            $prev_page = isset($all_posts[$i - 1]['url']) && ! empty($all_posts[$i - 1]['url']) ? $all_posts[$i - 1]['url'] : null;
            $next_page = isset($all_posts[$i + 1]['url']) && ! empty($all_posts[$i + 1]['url']) ? $all_posts[$i + 1]['url'] : null;
        }
    }
    // Build the pagination
    $html  = '<ul class="' . $config['classes']['nav'] . '">';
    $html .= $prev_page !== null ? '<li class="' . $config['classes']['nav_prev'] . '"><a href="' . $prev_page . '">' . $config['labels']['nav_prev'] . '</a></li>' : '<li class="' . $config['classes']['nav_prev'] . ' ' . $config['classes']['nav_disabled'] . '"><span>' . $config['labels']['nav_prev'] . '</span></li>';
    $html .= $next_page !== null ? ' <li class="' . $config['classes']['nav_next'] . '"><a href="' . $next_page . '">' . $config['labels']['nav_next'] . '</a>' : ' <li class="' . $config['classes']['nav_next'] . ' ' . $config['classes']['nav_disabled'] . '"><span>' . $config['labels']['nav_next'] . '</span></li>';
    $html .= '</ul>';
    echo $html;
});

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

after

<?php
    return array(

        ...
        ...
        ...

        'plugins' => array(
            'markdown',
            'sitemap',
            'nextprev' // <= Activation
        ),
    );

template news.html

<?php include 'header.html' ?>
<?php include 'navbar.html' ?>
<div class="container">
    <?php Morfy::factory()->runAction('theme_content_before'); ?>
    <?php

    // Configuration data
    $config = Morfy::$config['nextprev_config'];
    // Get current URI segments
    $path = Morfy::factory()->getUriSegments();
    $path = implode('/', $path);
    // Number of posts to display per page request
    $per_page = isset($config['limit']) ? $config['limit'] : 5;
    // Get all posts
    $all_posts = Morfy::factory()->getPages(CONTENT_PATH . '/' . $path . '/', 'date', 'DESC', array('404', 'index'));
    // Calculate total pages
    $total_pages = ceil(count($all_posts) / $per_page);
    // Get current page offset
    $current_page = isset($_GET[$config['param']]) ? $_GET[$config['param']] : 1;
    // Split all posts into chunks
    $posts = is_array($all_posts) ? array_chunk($all_posts, $per_page) : array();

    // Posts loop
    if(isset($posts[$current_page - 1]) && ! empty($posts[$current_page - 1])) {
        foreach($posts[$current_page - 1] as $post) {
            echo '<div class="page">';
            echo $post['title'] ? '<h3><a href="' . $post['url'] . '">' . $post['title'] . '</a></h3>' : "";
            echo $post['date'] ? '<p><em><strong>Published on:</strong> ' . $post['date'] . '</em></p>' : "";
            if(strlen($post['description']) > 0) {
                echo '<p>' . $post['description'] . '</p>';
            } elseif(strlen($post['content_short']) > 0) {
                echo '<p>' . $post['content_short'] . '</p>';
            }
            echo '</div>';
        }
    } else {
        echo '<div class="page"><div class="alert alert-danger"><p>Not found.</p></div></div>';
    }

    // Build the pagination
    $html  = '<ul class="pager">';
    $html .= $current_page > 1 ? '<li class="previous"><a href="?page=' . ($current_page - 1) . '">&larr; Previous</a></li>' : '<li class="previous disabled"><span>&larr; Previous</span></li>';
    $html .= $current_page < $total_pages ? ' <li class="next"><a href="?page=' . ($current_page + 1) . '">Next &rarr;</a></li>' : ' <li class="next disabled"><span>Next &rarr;</span></li>';
    $html .= '</ul>';

    echo $html;

    ?>
    <?php Morfy::factory()->runAction('theme_content_after'); ?>
</div>
<?php include 'footer.html' ?>

code nextprev.php

<?php
/**
 * Next & Previous Navigation for Morfy CMS
 *
 * @package Morfy
 * @subpackage Plugins
 * @author Taufik Nurrohman <http://latitudu.com>
 * @copyright 2014 Romanenko Sergey / Awilum
 * @version 1.0.4
 *
 */
// Include `shell.css` in header
// Uncomment the hook function below if you are not using Bootstrap.
// Morfy::factory()->addAction('theme_header', function() {
//     echo '<link href="' . Morfy::$config['site_url'] . '/plugins/nextprev/lib/css/shell.css" rel="stylesheet">' . "\n";
// });
// For posts listing page
// Usage => Morfy::factory()->runAction('index_nextprev');
Morfy::factory()->addAction('index_nextprev', function() {
    // Configuration data
    $config = Morfy::$config['nextprev_config'];
    // Get current URI segments
    $path = Morfy::factory()->getUriSegments();
    $path = implode('/', $path);
    // Number of posts to display per page request
    $per_page = isset($config['limit']) ? $config['limit'] : 5;
    // Get all posts
    $all_posts = Morfy::factory()->getPages(CONTENT_PATH . '/' . $path . '/', 'date', 'DESC', array('404', 'index'));
    // Calculate total pages
    $total_pages = ceil(count($all_posts) / $per_page);
    // Get current page offset
    $current_page = isset($_GET[$config['param']]) ? $_GET[$config['param']] : 1;
    // Split all posts into chunks
    $posts = is_array($all_posts) ? array_chunk($all_posts, $per_page) : array();
    // Posts loop
    if(isset($posts[$current_page - 1]) && ! empty($posts[$current_page - 1])) {
        foreach($posts[$current_page - 1] as $post) {
            echo '<div class="page">';
            echo $post['title'] ? '<h3><a href="' . $post['url'] . '">' . $post['title'] . '</a></h3>' : "";
            echo $post['date'] ? '<p><em><strong>Published on:</strong> ' . $post['date'] . '</em></p>' : "";
            if(strlen($post['description']) > 0) {
                echo '<p>' . $post['description'] . '</p>';
            } elseif(strlen($post['content_short']) > 0) {
                echo '<p>' . $post['content_short'] . '</p>';
            }
            echo '</div>';
        }
    } else {
        echo '<div class="page"><div class="alert alert-danger"><p>Not found.</p></div></div>';
    }
    // Build the pagination
    $html  = '<ul class="pager">';
    $html .= $current_page > 1 ? '<li class="previous"><a href="?page=' . ($current_page - 1) . '">&larr; Previous</a></li>' : '<li class="previous disabled"><span>&larr; Previous</span></li>';
    $html .= $current_page < $total_pages ? ' <li class="next"><a href="?page=' . ($current_page + 1) . '">Next &rarr;</a></li>' : ' <li class="next disabled"><span>Next &rarr;</span></li>';
    $html .= '</ul>';
    echo $html;
});
// For single article
// Usage => Morfy::factory()->runAction('item_nextprev');
Morfy::factory()->addAction('item_nextprev', function() {
    // Configuration data
    $config = Morfy::$config['nextprev_config'];
    // Get current URI segments
    $path = Morfy::factory()->getUriSegments();
    array_pop($path);
    $path = implode('/', $path);
    // Get all posts
    $all_posts = Morfy::factory()->getPages(CONTENT_PATH . '/' . $path . '/', 'date', 'DESC', array('404', 'index'));
    // Count total posts
    $total_posts = count($all_posts);
    // Get current page URL
    $current_url = Morfy::factory()->getUrl();
    // Get current page data
    $current_page = Morfy::factory()->getPage($current_url);
    // Testing...
    // echo $current_page['date'];
    // Find next and previous link from current page
    $prev_page = $next_page = null;
    for($i = 0; $i < $total_posts; $i++) {
        if($current_page['date'] == $all_posts[$i]['date']) {
            $prev_page = isset($all_posts[$i - 1]['url']) && ! empty($all_posts[$i - 1]['url']) ? $all_posts[$i - 1]['url'] : null;
            $next_page = isset($all_posts[$i + 1]['url']) && ! empty($all_posts[$i + 1]['url']) ? $all_posts[$i + 1]['url'] : null;
        }
    }
    // Build the pagination
    $html  = '<ul class="pager">';
    $html .= $prev_page !== null ? '<li class="previous"><a href="' . $prev_page . '">&larr; Previous</a></li>' : '<li class="previous disabled"><span>&larr; Previous</span></li>';
    $html .= $next_page !== null ? ' <li class="next"><a href="' . $next_page . '">Next &rarr;</a>' : ' <li class="next disabled"><span>Next &rarr;</span></li>';
    $html .= '</ul>';
    echo $html;
});

what am I doing wrong and I spend white page;

21

(29 replies, posted in Projects)

dylan wrote:

Dude, it wasn't an inquisition.  I'm expecting Awilum to answer since it's tied to his username on github.  It's a simple question not a philosophical debate.

are some people who like the very simple cms do not look to find anything

22

(1 replies, posted in Plugins)

nice!

23

(3 replies, posted in Plugins)

nice!

24

(3 replies, posted in Plugins)

nice!

@tovic

I mean something like this

    // Build the pagination
    $html  = '<ul class="' . $config['classes']['nav'] . '">';
    $html .= $current_page > 1 ? '<li class="' . $config['classes']['nav_prev'] . '"><a href="?' . $config['param'] . '=' . ($current_page - 1) . '">' . $config['labels']['nav_prev'] . '</a></li>' : '<li class="' . $config['classes']['nav_prev'] . ' ' . $config['classes']['nav_disabled'] . '"><span>' . $config['labels']['nav_prev'] . '</span></li>';
    $html .= $current_page < $total_pages ? ' <li class="' . $config['classes']['nav_next'] . '"><a href="?' . $config['param'] . '=' . ($current_page + 1) . '">' . $config['labels']['nav_next'] . '</a></li>' : ' <li class="' . $config['classes']['nav_next'] . ' ' . $config['classes']['nav_disabled'] . '"><span>' . $config['labels']['nav_next'] . '</span></li>';
    $html .= '</ul>';
    // Build the pagination
    $html  = '<ul class="pager">';
    $html .= $current_page > 1 ? '<li class="previous"><a href="?page=' . ($current_page - 1) . '">&larr; Previous</a></li>' : '<li class="previous disabled"><span>&larr; Previous</span></li>';
    $html .= $current_page < $total_pages ? ' <li class="next"><a href="?page=' . ($current_page + 1) . '">Next &rarr;</a></li>' : ' <li class="next disabled'"><span>Next &rarr;</span></li>';
    $html .= '</ul>';

I mean to have no parameters config.php