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.

Customized Json Feeds

edited January 2012 in Vanilla 2.0 - 2.8

Hi all,

I need to create some customized Json feeds relative to a single user activity as for example the number of posts by this user. As I am totally new to Vanilla I am reading the documentation but I feel a bit lost as I don't know what I really need to create: plugin, controller, other? I saw in the documentation that some Json feeds are already available. How can I create my own feeds?

Thanks in advance,



  • Options

    There is already an api.

    get for convenience

    You can view your user meta here:

    grep is your friend.

  • Options

    Thanks. That solves many problems. Anyway is possible creating customized json feeds?

  • Options
    LincLinc Detroit Admin

    Yeah, you could do that as a plugin pretty easy. Set info in the Data variable and it should come out in any page ending in .json.

  • Options

    For "Data" you mean I should extend "Gdn_Controller" and using the "JsonTarget" function in it?

  • Options

    Mate we said it is possible, there some documentation on how to create plugins, and you can look at the code, but you are not going to get programming lessons. If you don't feel up to I would pay someone to do it.

    Vanilla/Garden follows MCV, it is roughly restful. So a controller could server anything like xml, json.

    I don't know what you mean by "feed", if you are talking about a specific standard or schema you have to implement that. I could be templates, like rss feeds are.

    grep is your friend.

  • Options

    What Lincoln is talking about when you hook a controller before it is rendered you can


    This is generally the case existent controllers. However one persons definition of easy isn't another.

    if you are talking about creating new methods, or entire controllers, and json resources, that is a bit more work.

    grep is your friend.

Sign In or Register to comment.