Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Blog
This discussion has been closed.
Comments
Don't mind the messy definitions in the statistics extension, I'm working on the language file. I've also tried with the default style and different items in the panel, and I get the same blank space. The more items in the panel, the bigger the space.
So open up vanilla.css and look for this
html > body .ContentInfo h1 width:80% !important; }
change that width to 100% or 99.5%
Did you select the Blog page under Nuggets?
open default.php in DiscussionCounter
Line 96 change it to this
if($Context->SelfUrl == 'settings.php' && $Context->Session->User->RoleID == $managerRoleId)
re: Nuggets - yep, I selected the appropriate page. Played around with that a bit actually, to see if it was turning up on other pages. My blog page actually doesn't show any other sidepanel items at all for an unauthenticated user as it currently stands - not even the livesearch. If I'm logged in (admin) I see the start new post option and blog publish status options, but nothing else. Again, sidepanel items work fine for other pages...
in_array($Context->SelfUrl, array('settings.php', 'extension.php'))
only pages mentioned there will work. So you have to edit default.php and look for a similar line and change it. its pretty simple.If you've got any further thoughts on why my nugget's not working, I'm all ears...
<?php return array(0 => array('name' => 'Latest Blog Post', 'id' => 1, 'description' => '', 'position' => 'PANEL', 'status' => 1, 'hideName' => 0, '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 style="margin-top:10px;"><a href="\'.GetUrl($Context->Configuration, "extension.php", "category/", "CategoryID", $Context->Configuration["BLOG_CATEGORY_ID"], "", "PostBackAction=Blog").\'">Show all</a></li>\'; echo $LatestBlogPostList; }?>', 'weight' => -8, 'roles' => array(0 => 0, 1 => 2, 2 => 3, 3 => 4), 'pages' => array(0 => 'comments.php', 1 => 'index.php', 2 => 'Blog', 3 => 'extension.php')),
Notice how Blog is listed under pages array<?php return array(0 => array('name' => 'Latest Blog post', 'id' => 1, 'description' => '', 'position' => 'PANEL', 'status' => 1, 'hideName' => 0, '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; }?>', 'weight' => 1, 'roles' => array(0 => 0, 1 => 2, 2 => 5, 3 => 3, 4 => 6, 5 => 4), 'pages' => array(0 => 'blog', 1 => 'extension.php'))); ?>
Thanks again for your help. It's appreciated.
However, I have a question: what should I change in order to get the draft box checked by default? This would prevent to publish stuff by accident for first time users.
I guess it has something to do with lines 32-34 in Function.Blog.php, am I wrong? I'm not sure what to change.
echo '<li class="Draft"> <label>'.GetBasicCheckBox("Draft", 1, $Draft, '').' '.$Context->GetDefinition('Draft').'</label> </li> ';
The above issue i mentioned(Blog # 25) solved?
Thanks