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.
Options

Help with FrameWork ? :)

edited January 2007 in Vanilla 1.0 Help
Here's my stupid question (!): I'm trying to make some News add-on, and to do so, for the moment, I want to get the first N discussions of a category, and display the first comment of each discussion, sorted by date Looking how Discussion Overview, the Framework and TBL do, I have found how to render 1 comment for the moment but just for 1 discussion(and they aren't sorted by date). My problem is that I would like to have all my datas in a variable, say $CD, like if they where from the same Discussion: while ($Row = $this->Context->Database->GetRow($DiscussionData);) { $Discussion->Clear(); $Discussion->GetPropertiesFromDataSet($Row, $this->Context->Session->UserID); $CommentData = $CommentManager->GetCommentList($this->Context->Configuration['NEWS_COMMENTS_PER_NEWS'], 1, $Discussion->DiscussionID); push_array($CD,$CommentData); //<---- this doesn't work } I've tried to push it as an array, I've tried "+=" and ".=" assignation, no way, so as I don't know the type of CommentData and how to aggregate it...Help! So if you have any solution (maybe simply doing a better SQL request and having directly what I need in a $CommentData usable by a simplified --no reference to the Discussion-- comment.php template) don't hesitate :o) P.S: I think I'm going to release a bunch of new add-ons in the next weeks/months (if I'm not discouraged to do so :P). I have currently enhanced DiscussionOverview (great add-on!) to animate it (using script.aculo.us: you'll see only the topics you point at) and to work well with Category Icons (no need to have the Icon on each Discussion but it's needed on the Category Block). If you want it, I'll realise here this enhancement, but you have to know that you'll need to complete your style to work with this version (or find me a smart way to get the css rules applied to an element defined by an id (id="discussions" for example) and use it to define the rules applied to a class (class="discussions" in the same example), if possible only with javascript (maybe adding a non displayed element with this id, getting ths css rules, then delete the element and apply the rules to whatever elelment having the good class ?) :)

Comments

  • Options
    Did you ever get this? Or release any add-ons?
  • Options
    I absolutely need this News Add-On. I try to alter the style to get it done, but this is very unpromising. Regarding the order by date the Chronological extension might help: http://lussumo.com/addons/?PostBackAction=AddOn&AddOnID=197
  • Options
    edited January 2007
    use this and you might see that it's become a class, but check anyways if i'm wrong. It's probably that or you havent allowed $CD to become a global variable
    print_r($CommentData);
This discussion has been closed.