Topic: Blog

Simple Blog Plugin for Monstra smile

http://i.minus.com/ivaOxHwdI8I1G.png

http://i.minus.com/iFDu436hwtYn1.png


Download: blog.zip

Usage:

Get Tags&Keywords:
<?php Blog::getTags(); ?> - All keywords
<?php Blog::getTags(Page::slug()); ?> - Keywords for current page

Get Posts:
<?php echo Blog::getPosts(); ?> - All posts
<?php echo Blog::getPosts(5); ?> - Last 5 posts

Get Post Title:
<?php echo Blog::getPostTitle(); ?>

Get Post:
<?php echo Blog::getPost(); ?>

Get Related Posts:
<?php echo Blog::getRelatedPosts(); ?>

Cut:  {cut}

Parent page: $parent_page_name = 'blog' you can change it to "News"

1) Create template: blog
2) Create template: blog-post
3) Place rss.php in the site root.
4) Create a new page: "Blog" with template "blog" and add your posts to this page
5) Create a new pages(posts) with template "blog-post" for parent page "Blog".

Example: http://monstra.org/blog

Monstra Loves You! Give some love back!

2 (edited by martynas 2012-10-11 19:48:09)

Re: Blog

Very good. Look, I'm working with Taxonomy plugin now. Are you planning to release Taxonomy (Categories) plugin in near future? Now my progress is:
1. Add term (done);
2. Edit term (done);
3. Taxonomy terms list (frontend and backend versions) (done);
4. Taxonomy terms ordering (currently working on it).

What do you think. Could we integrate taxonomy feature with blog plugin. Or plugins should be separated?

Re: Blog

Did not understand。。。

Re: Blog

martynas this is just simple plugin on top of Pages Plugin. Actually I dont how to integrate your plugin for now.  It would be greate if you will provide some code and more information about your plugin smile

Monstra Loves You! Give some love back!

Re: Blog

http://monstra.orgpublic/uploads/plugins/blog.zip

I want to try your Blog solution, but link is dead sad

Re: Blog

missing /

http://monstra.org/public/uploads/plugins/blog.zip

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

Re: Blog

nakome, thanks, fixed)

Monstra Loves You! Give some love back!

Re: Blog

Blog 1.2.0
+ Shows posts content
+ Added abb to cut text: <!--cut-->
+ Added abb to set count of posts to show: <?php Blog::getPosts(5); ?>

Monstra Loves You! Give some love back!

9 (edited by RomanArt 2012-10-18 16:17:57)

Re: Blog

are you planing to make plugIn "News" ? smile

(с) Roman Art
So far So good wink

Re: Blog

RomanArt, yes. I think will be an option: blog or news or some other custome page....

Now I am working on code refactoring and adding new feature: Get Related Posts! (based on post tags/keywords)

Monstra Loves You! Give some love back!

Re: Blog

Blog 1.5.0
+ A lot of changes. Read My #0 post in this topic.

Monstra Loves You! Give some love back!

Re: Blog

How to edit blog template and blog-post template ?

Re: Blog

mylife same as you create them. Admin -> Themes

Monstra Loves You! Give some love back!

Re: Blog

I created the theme but the error, how to create?

Re: Blog

I created the theme but the error, how to create?

Re: Blog

>1) Create template: blog

http://i.minus.com/ibymgquTT2LeTx.png

Monstra Loves You! Give some love back!

Re: Blog

New theme inside the code how to write?

Re: Blog

I do not know what to write code in the theme?

Re: Blog

I do not know what to write code in the theme?

Usage:
Get Tags&Keywords:
<?php Blog::getTags(); ?> - All keywords
<?php Blog::getTags(Page::slug()); ?> - Keywords for current page
Get Posts:
<?php echo Blog::getPosts(); ?> - All posts
<?php echo Blog::getPosts(5); ?> - Last 5 posts
Get Post Title:
<?php echo Blog::getPostTitle(); ?>
Get Post:
<?php echo Blog::getPost(); ?>
Get Related Posts:
<?php echo Blog::getRelatedPosts(); ?>

Monstra Loves You! Give some love back!

Re: Blog

Who can help me write a complete blog theme code?

21 (edited by RomanArt 2012-11-19 09:21:51)

Re: Blog

mylife wrote:

Who can help me write a complete blog theme code?

make 2 files here : www\public\themes\default

1. blog.template.php with this code :

<?php Chunk::get('header'); ?>
    <div class="container">

        <div>
            <?php Action::run('theme_pre_content'); ?>
        </div>

        <div>
            <?php echo Blog::getPosts(); ?>
        </div>

        <div>
            <?php Action::run('theme_post_content'); ?>
        </div>

        <hr>
<?php Chunk::get('footer'); ?>   



2. blog-post.template.php with this code:


<?php Chunk::get('header'); ?>
    <div class="container">

        <div>
            <?php Action::run('theme_pre_content'); ?>
        </div>

        <div>
            <?php echo Blog::getPost(); ?>
        </div>

        <div>
            <?php Action::run('theme_post_content'); ?>
        </div>

        <hr>
<?php Chunk::get('footer'); ?> 


3. Create new page in admin panel called "blog"
4. Press edit ur page - "blog" than go in Settings - Template - choose "blog"

5. Than create new page ( this gonna be ur blog post )
6. In ur new page (which is ur post now ) go to - Settings - Parent (choose blog) - than Template - Choose blog-post

Q: So do i have to edit all my posts with parenting it with Blog page and adding Template?
A: No u dont, after creating first Post in ur blog next time u can just press "CLONE"

http://s61.radikal.ru/i172/1211/4e/8f864d89e87a.png

(с) Roman Art
So far So good wink

Re: Blog

RomanArt thanks

Re: Blog

I can not post pictures. The article shows:
text text text text text text��text text text text text text text text。  �� is {Cut} parts.

Re: Blog

Screenshot please, website and admin panel

(с) Roman Art
So far So good wink

Re: Blog

I found the blog of Chinese support is not good enough.The English article no problem, but the Chinese will be garbled.