Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How to add discussions from a specific category to the sidebar panel

beschizzabeschizza New
edited June 2014 in Vanilla 2.0 - 2.8

How might I add a list of the most recently updated discussions from a particular category into a box in the sidebar panel?

Just the discussion titles, linked to the discussions themselves, would be enough!

This is with Vanilla 2.1, stable release.

Comments

  • peregrineperegrine MVP
    edited June 2014

    modify one of the discussion plugins that makes a panel and only select the category you want.

    or look at any number of similar plugins that puts some discussion tiltle in panel just select on the date.

    last comment date as I recall.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited June 2014

    http://vanillaforums.org/addon/latestpostlist-plugin

    e.g. changing line 27 in plugins/LatestPostList/modules/class.latestpostlistmodule.php

    would only retrieve the latest posts in CategoryID number 5.

    you can look in

    change from

    $this->_LatestPosts = $DiscussionModel->Get(0, $Limit, 'all');
    
    to
    
    $this->_LatestPosts = $DiscussionModel->Get(0, $Limit, array("CategoryID"=>"5"));
    

    you can get Category Name and ID matches from the Category Table

    SELECT CategoryID, Name
    FROM `GDN_Category`
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Thank you! I'll give that a try!

  • This worked great. Thank you!

Sign In or Register to comment.