HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Blog 1.1.3

Turn any category in a blog. Blog entries can be created by any member. Drafts posts can also be created.
Example site by mis-one

Download and extract the Blog extension into the extensions folder like so /path/to/vanilla/extensions/Blog
Activate the Blog extension from Account Tab->Extensions

This is what it should look like.
Picture 3
Draft mode (enable this in Roles & Permissions Setting page
Picture 1
Draft side panel (only roles allowed to view drafts can see this)
Picture 2
Blog page
Picture 4

Latest Blog post. Install Nuggets extension. Enable it after the Blog extension. Create new nugget called "Latest Blog Post" and use the "Inside Panel" pan, and the following as the Nugget Html
<?php global $Context; $DiscussionManager = $Context->ObjectFactory->NewContextObject($Context, "DiscussionManager"); AddLatestBlogPostToPanel($Context, $Panel, $DiscussionManager); function AddLatestBlogPostToPanel (&$Context, &$Panel, &$DiscussionManager) { global $Panel; $LatestBlogPostList = ""; $Discussion = $Context->ObjectFactory->NewContextObject($Context, "Discussion"); $LatestBlogPost = $DiscussionManager->GetDiscussionList(5, 1, $Context->Configuration["BLOG_CATEGORY_ID"]); while ($Row = $DiscussionManager->Context->Database->GetRow($LatestBlogPost)) { $Discussion->Clear(); $Discussion->GetPropertiesFromDataSet($Row, $Context->Configuration); $Discussion->FormatPropertiesForDisplay(); $LatestBlogPostList .= '<li><a href="'.GetUrl($Context->Configuration, "comments.php", "", "DiscussionID", $Discussion->DiscussionID, "", "#Item_1", CleanupString($Discussion->Name)."/").'">'.$Discussion->Name.'</a></li>'; } $LatestBlogPostList .= '<li><a href="'.GetUrl($Context->Configuration, "extension.php", "category/", "CategoryID", $Context->Configuration["BLOG_CATEGORY_ID"], "", "PostBackAction=Blog").'">Show all</a></li>'; echo $LatestBlogPostList; }?>
to get this in your panel
Picture 2

If using friendlyURL add these lines to .htaccess
RewriteRule ^extension/category/([0-9]+)$ extension.php?CategoryID=$1 [QSA,L] RewriteRule ^extension/category/([0-9]+)/$ extension.php?CategoryID=$1 [QSA,L] RewriteRule ^extension/discussion/([0-9]+)$ extension.php?DiscussionID=$1 [QSA,L] RewriteRule ^extension/discussion/([0-9]+)/$ extension.php?DiscussionID=$1 [QSA,L] RewriteRule ^extension/([0-9]+)/([0-9]+)$ extension.php?CategoryID=$1&page=$2 [QSA,L] RewriteRule ^extension/([0-9]+)/([0-9]+)/$ extension.php?CategoryID=$1&page=$2 [QSA,L]

To use More tag
1) in HTML formatter, change 77 to this
'if($m[2]==\'-->\')return \'<!--\'.str_replace(\'--\',\' - - \',htmlspecialchars($m[1])).\'--><a id="more" name="more"> </a>\';else return \'\';'
2) Quicktags extension already has more tag its just disabled. look in quicktags.js change line 143 to this
edButtons[edButtons.length] = new edButton('ed_more' ,'more' ,'<!--more--><a id="more" name="more"> </a>' ,'' ,'t' ,-1 );
Changelog
v1.1.3 IE 6 css issues fixed, convert png to gif, so IE6 can display transparent background
v1.1.2 Social Bookmarks are now only icons and no text, IE 7 css issues fixed
v1.1 Fixed major bug in drafts mode



Support this extension


Questions