1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-05 04:37:51 +02:00

Blog Plugin as a part of Monstra CMS #188

This commit is contained in:
Awilum
2014-02-11 23:11:28 +02:00
parent bcf3d58c14
commit 6713282196
2 changed files with 415 additions and 377 deletions

View File

@@ -1,2 +1,40 @@
Monstra CMS Blog
Blog
================
### Usage
#### Get Post
<?php echo Blog::getPost(); ?>
#### Get Posts
<?php echo Blog::getPosts(); ?>
#### Get 5 Posts (could be any amount, 5 or 1 or 25):
<?php echo Blog::getPosts(5); ?>
#### Get related Posts
<?php echo Blog::getRelatedPosts(); ?>
#### Get 4 latest posts from Blog
<?php echo Blog::getPostsBlock(4); ?>
#### Get Tags&Keywords
<?php Blog::getTags(); ?>
#### Get Tags&Keywords for current page
<?php Blog::getTags(Page::slug()); ?>
Get Post Title
<?php echo Blog::getPostTitle(); ?>
### Shortcode for content
#### Divided post into 2 parts (short and full)
{cut}
Example:
<p>Best free themes for Monstra CMS at monstrathemes.com</p>
{cut}
<p>There is going to display your content as blog post =)</p>

View File

@@ -1,6 +1,6 @@
<?php
/**
/**
* Blog plugin
*
* @package Monstra
@@ -12,8 +12,8 @@
*/
// Register plugin
Plugin::register( __FILE__,
// Register plugin
Plugin::register( __FILE__,
__('Blog', 'blog'),
__('Blog plugin for Monstra', 'blog'),
'1.7.3',
@@ -21,10 +21,10 @@
'http://monstra.org/');
/**
/**
* Blog Class
*/
class Blog {
class Blog {
/**
@@ -383,5 +383,5 @@
}
}
}