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.
Tagging Plugin
I and a couple cohorts wanted the ability to Tag all threads during the initial creation of a Discussion. We're roughly basing it after Spode's TagThis http://vanillaforums.org/addon/415/TagThis After a day or so we've run into some unknown's to which we'd like some feedback and suggestions.
So below is what we've done so far—
We've created the database and tried appending our Form and Logic to:
• Hooking into PostController class in .../vanilla/controllers/post.php—We can insert logic and XHTML content with very minimal control using the magic events PostController_Render_Before(). We were successful in adding hidden inputs, but all visible inputs would be displayed above the rest of the page. We got the same result hooking in our own $Sender->FireEvent('EventName') and PostController_EventName_Handler(). What did work for us was prefixing an x to Discussion() and overriding that with PostController_Discussion_Override() . In the latter two of the 3 we are editing the Vanilla application. You can see the downside as we'd like to update to the stable version of Vanilla 2 when it's released.
• Modifying the form's view in .../vanilla/views/post/discussion.php—This displayed exactly how we wanted it, however we had no difficulty hooking in the logic.
→ As I sit here thinking about these conundrums I find myself with even more questions. Our Tagging plugin has its own Table in the Database. Is there a way for the DiscussionModel in .../vanilla/controllers/post.php to take the information from our Input('Tag') and send that information to a different database from the rest of the form? Can you nest forms? At the moment we had planned to write the plugin to be its own form (similar to how Vimeo and WordPress handle tagging in admin).
So below is what we've done so far—
We've created the database and tried appending our Form and Logic to:
• Hooking into PostController class in .../vanilla/controllers/post.php—We can insert logic and XHTML content with very minimal control using the magic events PostController_Render_Before(). We were successful in adding hidden inputs, but all visible inputs would be displayed above the rest of the page. We got the same result hooking in our own $Sender->FireEvent('EventName') and PostController_EventName_Handler(). What did work for us was prefixing an x to Discussion() and overriding that with PostController_Discussion_Override() . In the latter two of the 3 we are editing the Vanilla application. You can see the downside as we'd like to update to the stable version of Vanilla 2 when it's released.
• Modifying the form's view in .../vanilla/views/post/discussion.php—This displayed exactly how we wanted it, however we had no difficulty hooking in the logic.
→ As I sit here thinking about these conundrums I find myself with even more questions. Our Tagging plugin has its own Table in the Database. Is there a way for the DiscussionModel in .../vanilla/controllers/post.php to take the information from our Input('Tag') and send that information to a different database from the rest of the form? Can you nest forms? At the moment we had planned to write the plugin to be its own form (similar to how Vimeo and WordPress handle tagging in admin).
0
Comments
All events or assets can be requested, i made a request for some hooks that are now in the master.