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 can i show ten recent posts on the sidebar?

H00jH00j
edited June 2012 in Vanilla 2.0 - 2.8

I am using categories as the default homepage as that is what most of my members prefered but i would still like to be able to show like 10-15 recent posts on the side bar, how would i do this?

Best Answer

  • x00x00 MVP
    Answer ✓

    The simplest way is just to use jquery/javascript and the api. that way you aren't getting duplication which isn't great for SEO, and it relatively easy to do.

    if you point to discussions.json you have a json object you can fetch and manipulate (try the JSONView plugin for firefox to inspecting). Just traverse through discussion, an insert using a simple template pre-styled to the side panel.

    I'm not currently taking on more jobs for a while.

    grep is your friend.

Answers

  • Probably best accomplished with a plugin, though you may be able to cook something up in a template...

    Sounds like a good candidate for my pro bono plugin-a-day series, though I'm not sure if I can keep that up tomorrow.

    Maybe you can "sponsor" @x00 to do it, looks like he's awake. :)

  • x00x00 MVP
    Answer ✓

    The simplest way is just to use jquery/javascript and the api. that way you aren't getting duplication which isn't great for SEO, and it relatively easy to do.

    if you point to discussions.json you have a json object you can fetch and manipulate (try the JSONView plugin for firefox to inspecting). Just traverse through discussion, an insert using a simple template pre-styled to the side panel.

    I'm not currently taking on more jobs for a while.

    grep is your friend.

  • Sorry for the cheeky mention @x00... I wouldn't have thought to pull it off this way, great to learn from a master!

  • Do I need to install this to do that? http://vanillaforums.org/addon/542-api-json

  • no

    grep is your friend.

Sign In or Register to comment.