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.

Any chance of a blurb ext?

edited July 2006 in Vanilla 1.0 Help
An ext that will show a little preview of the discussion posted by the original starter? get me? like u see on dig would be awsome!


  • blizeHblizeH ✭✭
  • ):
  • thank for the help...
  • edited July 2006
    I have not looked, at how extensions are handled in Vanilla 1, and I only briefly took at look at them in 0.9.x, so I can't say for sure. Don't mind those people. I am sure it is possible, and the beauty of having it as an extension is that they don't have to use it :P Give them a chance guys. Stick around, and I am sure that Mark, or another extension developer will tell you if it is possible, and might give you some direction on how to tackle the problem. You might want to read the docs also. There could be something there.
  • The Discussion object has a $FirstCommentID field, but I don't know any way to get the comment text from an ID other than a raw database query.

    Maybe there's a way and I'm just missing it, but from what you have to work with in the discussion templates, it would be pretty hard.
  • MarkMark Vanilla Staff
    edited July 2006
    No, you can do this no problem. It might require that I add a delegate or two to the source, but that's not a problem either. Basically you attach to a delegate in the discussionmanager class and alter the GetDiscussionBuilder method so that it joins to the comment table on the FirstCommentID (as bergamot said). Then you'd attach to a delegate on the DiscussionGrid control to render that extra bit of information for each discussion, and finally you'd add a stylesheet to style your new bit of xhtml. I'm pretty sure you'd need a new delegate in the themes/discussion.php template file, but there should already be a delegate for you to use in the DiscussionManager class.
  • What might be even cooler is to use a tooltip-like ability to display the synopsis in a hovering DIV. Would cut down on clutter.
  • Mark you seem to know what you are doing, if you have time could you make it?
  • i'm looking in other extensions' code how i could make this and the DiscussionCounters ext adds this delegate:

    $Context->AddToDelegate("DiscussionGrid", "PostDiscussionOptionsRender", "DiscussionGridView_Add");

    but i can't find where this 'PostDiscussionOptionsRender' delegate is called. i only see PreRender and PostRender but this must be something between both, am i blind?
  • edited July 2006
    I posted some example code of how I do this here:

    never quite finished though...
  • tarninc Jul 5th 2006

    Mark you seem to know what you are doing, if you have time could you make it?
    :( ):
This discussion has been closed.