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

Query for latest threads and their URL

edited September 2009 in Vanilla 1.0 Help
Hi,

I would like to make a query for the latest 5 threads for Vanilla.
The threads should be open.
Also, how can I make the friendly URLs for those.
Please help.

Comments

  • Options
    You would need to write a plugin to do this I believe. I would consider looking at the "In this discussion" plugin as an example to figure it out.
  • Options
    I actually need that code outside of vanilla so I was kind of hoping there was a simple

    Select ..... Limit 5

    Kind of code for it.
    Your thoughts!!!
  • Options
    @Mark and @Flam9
    Any ideas about how to do it without going into plugin. Read my comments above.
  • Options
    MarkMark Vanilla Staff
    It's been a long time since I did this with Vanilla 1, but there was a debug plugin and/or a core debug setting that spit out all of the queries on a page. If that's all you needed (the SQL), you could definitely use that.
  • Options
    [CODE]select DiscussionID, name
    from frm_discussion
    where WhisperUserID = 0
    and Active = '1'
    and Sink = '0'
    ORDER BY DateCreated desc
    LIMIT 5[/CODE]
Sign In or Register to comment.