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.

comments & article (intergration)

ToivoToivo New
edited December 2006 in Vanilla 1.0 Help
Once again, how to use lussumo as comment engine for a CMS core where you could start a page or article There has been some diuscussion but where ... what do I want ... (a)user starts new page by CMS (b)new discussion is started in the lussumo with the same title (c) users could see the initial article and write comment about this topic with lussumo


  • Options
    If you are asking "How to start a new discussion from an external page" the basic is quite simple.
    - Ensure your user has an open Vanilla session,
    - Build a simple form with hidden fields like the one below.
    Hitting the submit button will open the discussion and let the user to comment further. The "fake" automatic first comment body should be made informative and include relevant backlink to your CMS page.
    <form method="post" action="forum/post.php"> <input type="hidden" id="DiscussionID" value="0" name="DiscussionID" /> <input type="hidden" id="CommentID" value="0" name="CommentID" /> <input type="hidden" id="AuthUserID" value="0" name="AuthUserID" /> <input type="hidden" id="UserDiscussionCount" value="0" name="UserDiscussionCount" /> <input type="hidden" id="WhisperUsername" value="" name="WhisperUsername" /> <input type="hidden" id="PostBackAction" value="SaveDiscussion" name="PostBackAction" /> <input type="hidden" id="FormatType" value="Html" name="FormatType" /> <input type="hidden" id="CategoryID" value="*******your category for this kind of post*******" name="CategoryID" /> <input type="hidden" id="Body" value="*******your text for this automatic post*******" name="Body" /> <input type="hidden" id="Name" value="*******your discussion title*******" name="Name" /> <input type="submit" id="discussion" value="submit" name="discussion" /> </form>
    The step beyond is "How to get the new DiscussionID back, to link from the CMS page to Vanilla".
    This one is more "Lussuminati", you need to write a simple extension to do this, basically:
    - write a simple function to store the required ID where you like and
    - hook it to vanilla with delegation:
    $Context->AddToDelegate("PostSaveDiscussion", "***your_function***");
    All instructions and example to write a simple extension are on the wiki.
This discussion has been closed.