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

Use Vanilla for comments section

edited December 2011 in Vanilla 2.0 - 2.8

I'm building a website where users can upload html5 games. How can I automatically create a vanilla thread for each uploaded game and embed it on the game page as a comments section? It should work like the wordpress comments section here on vanilla forums: http://vanillaforums.com/blog/news/why-host-with-vanilla/#vanilla-comments.

Tagged:

Answers

  • Options
    422422 Developer MVP

    You could look at the addons code hosted on github, search these forums for recent link

    There was an error rendering this rich post.

  • Options
    edited December 2011

    I don't know which code you mean, but I have looked into the code of some plugins and that did not really help me.

    This is my current code:

    define('APPLICATION', 'Vanilla');
    define('APPLICATION_VERSION', '2.0.16');
    define('DS', '/');
    define('PATH_ROOT', 'community');
    ob_start();
    require_once(PATH_ROOT.DS.'bootstrap.php');
    ob_end_clean(); // clear any header output from vanila
    $Session = Gdn::Session();
    $Authenticator = Gdn::Authenticator();
    

    Now I am looking for something like this for displaying:

    $discussionID = 12;
    $DiscussionController = GDN::DiscussionController();
    $DiscussionController->Get($discussionID);
    $DiscussionController->Render();

    and something like this for adding a discussion:

    $DiscussionController->Insert($discussionTitle, ...);

    Any idea?

  • Options
    sahotataransahotataran Developer, Bay Area - CA ✭✭✭
    edited December 2011

    you might need to update vanilla to 2.0.18 - the latest one

    and the addons app 422 is talking about is here addons

    There was an error rendering this rich post.

  • Options

    Thanks for the link.

    I am running the latest version 2.0.18.

    Do you know which addon was used for the wordpress comments at http://vanillaforums.com/blog/ or the addon comment embedding at for example http://vanillaforums.org/addon/729/thankful-people?

  • Options
    sahotataransahotataran Developer, Bay Area - CA ✭✭✭

    i see they use an integration of wordpress and vanilla at http://vanillaforums.com/blog/ but still not sure. Todd and Lincoln can explain you better on this.

    There was an error rendering this rich post.

Sign In or Register to comment.