These are chat archives for fansoro/fansoro

24th
Oct 2015
volter9
@volter9
Oct 24 2015 01:46
How is development of admin panel is going on?
dpertal
@dpertal
Oct 24 2015 06:11
@volter9
It is still in development!
@nakome "These days I have a lot of work ( not webdeveloper )"
Sergey Romanenko
@Awilum
Oct 24 2015 06:30
Contact plugin with custom fileds - ready https://github.com/morfy-cms/morfy-plugin-contact (current supported fields: input, textarea)
dpertal
@dpertal
Oct 24 2015 06:39
good morning awilum
we can add select contact form?
<select class="form-control">
  <option>1</option>
  <option>2</option>
  <option>3</option>
  <option>4</option>
  <option>5</option>
</select>
Sergey Romanenko
@Awilum
Oct 24 2015 06:43
current supported fields: input, textarea
dpertal
@dpertal
Oct 24 2015 06:44
ok
Sergey Romanenko
@Awilum
Oct 24 2015 06:44
in next version will improve this.. will add support for select element
dpertal
@dpertal
Oct 24 2015 06:46
Please create plugin pagination end search! tnx
dpertal
@dpertal
Oct 24 2015 06:53

a quick question: how can I show last 6 post?

for version 1.0.6 I used this code

      <?php
             //  Morfy::factory()->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 = 6;
            $posts = Morfy::factory()->getPages($url,$order_by, $order_type,$ignore,$limit);
            foreach($posts as $post) {
                echo '<h3><a href="'.$config['site_url'].'/blog/'.$post['slug'].'">'.$post['title'].'</a></h3>                
                <p>Posted on '.$post['date'].'</p>    
                <div>'.$post['content_short'].'</div>';
            }
    ?>
Sergey Romanenko
@Awilum
Oct 24 2015 08:13
"The use of <meta name = "keywords " content = ""> is completely unnecessary since September 2009. Google had published at the time that the http://googlewebmastercentral.blogspot.com/2009/09/google-does-not-use-keywords-meta-tag.html Hence, the use is not recommended. It has no practical use, however, the competitors can get an idea of ​​what phrases the website is optimised for."
hm...
volter9
@volter9
Oct 24 2015 10:09
_
stion: how can I show last 6 post?
you can use array_slice on Morfy::factory()->getPages()
Sergey Romanenko
@Awilum
Oct 24 2015 10:13
@dpertal check blog.tpl
@dpertal just set a limit
volter9
@volter9
Oct 24 2015 10:13
`$pages = array_slice(Morfy::factory()->getPages()
Sergey Romanenko
@Awilum
Oct 24 2015 10:13
I am talking about new morfy
volter9
@volter9
Oct 24 2015 10:15
Dammit Gitter, apparently it's not really handy to write messages on mobile
'
...
dpertal
@dpertal
Oct 24 2015 10:17
that is right?
{extends 'layout.tpl'}
{block 'content'}
    <div class="container">
        {set $posts = Morfy::getPages('blog', 'date', 'DESC','limit' ['404','index'])}
                {set $limit = 6}
        {foreach $posts as $post}
            <h3><a href="{$.site.url}/blog/{$post.slug}">{$post.title}</a></h3>
            <p>Posted on {$post.date}</p>
            <div>{$post.summary}</div>
        {/foreach}
    </div>
{/block}
Sergey Romanenko
@Awilum
Oct 24 2015 10:31
No
The last parameter of getPages method is limit
Set any number there
I am not at home now, and can't write code from mobile phone...
dpertal
@dpertal
Oct 24 2015 10:39
@Awilum
when you're home you write the correct code
I'll wait! tnx
it is very simple, just:
{set $posts = Morfy::getPages('blog', 'date', 'DESC', ['404','index'], 6)}
Sergey Romanenko
@Awilum
Oct 24 2015 22:22
Morfy Contact plugin 1.1.0 - Release
  • Added ability to setup contact form buttons
  • Added support for select form control
  • Added templates for form control attributes
  • Added support for new form control attributes
  • Documentation updates