1 2014-01-30 19:04:34

Topic: Blog pagination

Download here

Simple preview:


https://dl.dropboxusercontent.com/u/23834858/Morfy/pagination.jpg



Instructions:

Config.php:

        'num_of_pages' => 3, // Number of posts
        'plugins' => array(
            'markdown',
            'sitemap',
            'pagination', // Activate / Desactivate plugin
        )

Remplace blog code for this:

runAction('pagination');?>

In plugins/pagination/lib you have css and js folders to make more pretty wink

..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

nakome's Website

2 2014-01-30 19:17:52

Re: Blog pagination

Preview for few days

..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

nakome's Website

Re: Blog pagination

nice smile
would be nice if you did manstra cms!
free server http://www.000webhost.com/ hehehe

4 2014-01-31 04:28:18

Re: Blog pagination

not working

http://i.troll.ws/a862fe20.png

Re: Blog pagination

fr1zzer wrote:

not working


You have written in the code ?

..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

nakome's Website

Re: Blog pagination

fr1zzer wrote:

not working

http://i.troll.ws/a862fe20.png

http://s17.postimg.org/7e3fezi27/2014_01_31_1404.png

Re: Blog pagination

What version of morfy use?
Where is the readmore button?
Where is the author and tags ?

..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

nakome's Website

8 2014-01-31 12:54:50

Re: Blog pagination

http://s29.postimg.org/512za5ttj/2014_01_31_1451.png
morty version 1.0.4
localhost

Re: Blog pagination

nakome wrote:

You have written in the code ?

Yes.

nakome wrote:

What version of morfy use?

1.0.4

nakome wrote:

Where is the readmore button?
Where is the author and tags ?

http://i.troll.ws/800b8332.png
http://i.troll.ws/eccf4e10.png

Re: Blog pagination

Remplace blog code for this:
runAction('pagination');?>

Example:



runAction('theme_content_before'); ?> runAction('pagination'); ?> runAction('theme_content_after'); ?>
..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

nakome's Website

11 2014-01-31 13:23:37 (edited by nakome 2014-01-31 13:25:24)

Re: Blog pagination

i update code and remove  strpos() i try in other theme http://nakome.co.nf/blog

..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

nakome's Website

Re: Blog pagination

hi fr1zzer:

I do not think it had a problem with that. I've tried it and it worked. I see your screenshot, and you are wrong to put the code in the blog.html


localhost screenshot:

Morfy Site


code screenshot:

Blog.html

I'm not like them but I can pretend.

Re: Blog pagination

Would be awesome to make Tags clickable. And if after clicking on the tag will be displayed Post with this tag only. Is that possible?

Re: Blog pagination

Maybe but i can't make for now  i have not time for now sorry.

..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

nakome's Website

15 (edited by tovic 2014-02-11 14:21:37)

Re: Blog pagination

MBTY wrote:

Would be awesome to make Tags clickable. And if after clicking on the tag will be displayed Post with this tag only. Is that possible?

This is how I make tags becomes clickable. The rest is about how to make custom template for the tags filter via $_GET['tagged']

getUriSegments(); // print_r($segments);
    $tags = explode(',', $page['tags']);
    $tags_link = array();
    array_pop($segments); // We don't need the last path. We only need the parent of the current page
    foreach($tags as $tag) {
        $tags_link[] = '' . trim($tag) . '';
    }
    sort($tags_link); // Sort alphabetically
    echo implode(', ', $tags_link);
?>
XSS Testing

tovic's Website

Re: Blog pagination

Good job tovic

..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

nakome's Website

17 2014-08-21 16:18:45

Re: Blog pagination

nakome wrote:

Download here

Simple preview:


https://dl.dropboxusercontent.com/u/23834858/Morfy/pagination.jpg


hello,
how do I get image and together;
Thank you

Re: Blog pagination

can be pagination for each template separately as exemplified below;

blog template



runAction('theme_content_before'); ?> getPages($url,$order_by,$order_type,$ignore,$limit); // $url is a folder of posts $url = CONTENT_PATH . '/blog/'; // $order_by is a order like date or title $order_by = 'date'; // $order_type is a order type like ASC or DESC $order_type = 'DESC'; // $ignore = array of files to ignore $ignore = array('404','index'); // $limit is a number of posts $limit = 2; $posts = Morfy::factory()->getPages($url,$order_by, $order_type,$ignore,$limit); foreach($posts as $post) { // use default image if not write Thumbnail $thumbnail = ($post['thumbnail']) ? $post['thumbnail'] : $config['Site_url'].'public/images/default.jpg'; echo '

'.$post['title'].'

Posted on '.$post['date'].'

'.$post['title'].'
'.$post['content_short'].'
'; } ?> runAction('pagination'); ?> runAction('theme_content_after'); ?>

news template



runAction('theme_content_before'); ?> getPages($url,$order_by,$order_type,$ignore,$limit); // $url is a folder of posts $url = CONTENT_PATH . '/news/'; // $order_by is a order like date or title $order_by = 'date'; // $order_type is a order type like ASC or DESC $order_type = 'DESC'; // $ignore = array of files to ignore $ignore = array('404','index'); // $limit is a number of posts $limit = 2; $posts = Morfy::factory()->getPages($url,$order_by, $order_type,$ignore,$limit); foreach($posts as $post) { // use default image if not write Thumbnail $thumbnail = ($post['thumbnail']) ? $post['thumbnail'] : $config['Site_url'].'public/images/default.jpg'; echo '

'.$post['title'].'

Posted on '.$post['date'].'

'.$post['title'].'
'.$post['content_short'].'
'; } ?> runAction('pagination'); ?> runAction('theme_content_after'); ?>

http://postimg.org/image/yhzr1img1/