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

2456

Comments

  • Here's how it looks like in IE6

    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.
  • regarding the "All Discussion" not being left align. It is actually left aligned. the width however is not 100%
    So open up vanilla.css and look for thishtml > body .ContentInfo h1 width:80% !important; }
    change that width to 100% or 99.5%
  • Uploaded version 1.1.3 of Blog.
  • How can i make the "Start a New Blog Post" link invisible to unauthorized users, i mean i would like to make it visible only to admin. And one more question, but i dont know whether this is only on me or not. Under not signed in situation, i click the "show all" link, and then i try to sign-in, the page wont be rediricted properly to the sign-in form. It is just redirected to a simple page with site name and lussumo copyright link, no sign-in form. tested on a localhost. Thanks for the great stuff.
  • ok you want a feature on who can start a new blog post. for that I have have to use delegates, So you the admin will see both "Start a new blog" and "Start a new discussion". non admins or unauthorized users will only see "Start a new discussion"
    sujangUnder not signed in situation, i click the "show all" link, and then i try to sign-in, the page wont be redirected properly to the sign-in form. It is just redirected to a simple page with site name and lussumo copyright link, no sign-in form.
    Nice catch
  • Hey Schizo - thanks for the extension. Saved me from attempting a blog(wordpress)/vanilla integration project... ;) One thing - I thought I'd seen this referenced somewhere else, but can't find it now - I get the "discussion counters" extension options link on the sidepanel of the blog page when I'm logged in. I'm presuming that other users can't see it, but was wondering what the fix for that might be...? Ta!
  • One other thing - I've been trying to get the "latest posts" nugget up and running as well. I can get it to display on any other page apart from the blog. Did as sugggested and enabled nuggets after blog... Any/all suggestions appreciated.
  • @# jsamlarose
    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)
  • Thanks for the DiscussionCounter fix!

    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...
  • Blog extension uses extension.php page. which most extension developers ignore to include. So even if your sidepanel extensions will work in other pages they won't work in extension.php. thats how it is suppose to be. If you want your side panel stuff (other than one created by Nuggets) then you have to include extension.php in the array.it looks like this 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.
  • Great - that's good to know. Got livesearch up and running, and I'll work through the other exts that I'd like to see on the blog page. Thanks - particularly for the speedy reply.

    If you've got any further thoughts on why my nugget's not working, I'm all ears... ;)
  • So Latest blog post is visible in other pages but not on blog page. Does it give any errors.one more thing do you have any blog posts. IS the heading "latest Blog Post" showing or not Look in Nuggets.php and see if Blog is listed under pages of "latest blog extension" it should look like this<?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
  • No errors. One blog post. Heading isn't showing in the sidepanel. Checking the nuggets.php now...
  • Everything seems to be in order. Just in case I'm missing something:

    <?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'))); ?>
  • thats wrong. Its supposed to Blog not blog. change it
  • That fixed it. Had a quick look in Page management and noticed that the tab identifier for my blog page is "blog", although the title is "Blog". I don't remember entering that myself (Page manager instructions say leave the identifier alone) - but I'm guessing that's where the lowercase came from...

    Thanks again for your help. It's appreciated.
  • the new version of page manager should use the proper case now.
  • Now it works just fine :) Thanks again for this great extension.

    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 default value should be disabled. cause 0 is the default value in the database.
  • Hi, MSB
    The above issue i mentioned(Blog # 25) solved?
    Thanks
This discussion has been closed.