Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Vanilla 2.6 is here! It includes security fixes and requires PHP 7.0. We have therefore ALSO released Vanilla 2.5.2 with security patches if you are still on PHP 5.6 to give you additional time to upgrade.

New Plugin Idea - Guidance

Can someone spare some wisdom to help guide me in creating a plugin that follows the same features as: https://meta.discourse.org/t/compose-a-new-pre-filled-topic-via-url/28074/8

Discussion extender is no longer working so I thought maybe I can fix discussion extender and add the functionality discourse has for discussion meta.

Comments

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    The discussion extender adds fields to discussions. I don't know how that should help. But if it is broken (whatever "broken" means) and you want to fix it, that would be great!

    If you need help on how to create a plugin, you should a) look at the documentation and b) look at the plugins that come with Vanilla and take them as an example.

    It should be enough to hook into PostControllers event BeforeDiscussionRender (the QnA plugin does so if you need an example) and use the Request class to check for GET parameters (search Vanillas source files for "Gdn::request()") and fill the form (search the source files for "Form->setValue") before it is rendered.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Whoops! Turns out that would be a waste of time. See yourself

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Well then, now you can concentrate on fixing the Discussion Extender! =)

  • @R_J broken means the following:

    Installing the plugin on a fresh install and clicking on the settings button for this plugin does nothing.

    It doesn't work. It is broken. No functionality is available from this plugin.

    I took a brief look at the documentation and it seems that plugins are now built with json? Is it a habit/trend for Vanillaforums to upgrade and completely change this much? I understand upgrading between PHP versions, event handlers, etc., but looking at the documentation versus what I see in 2.3 plugins, things are very different.

    Am I wrong in that perception?

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Yes and no...

    The future of the informational part is a separate json file. By now you can use the PluginInfo array in the plugin itself and you can use the addon.json, whatever you prefer. But the PHP array in the plugin file itself will not be supported in the future. By now it is no problem, so there is not that change that you are talking about.

    There have been a massive redesign of the dashboard which is the main reason for any incompatibilities

  • @VanillaNoob said:
    @R_J broken means the following:

    Installing the plugin on a fresh install and clicking on the settings button for this plugin does nothing.

    It doesn't work. It is broken. No functionality is available from this plugin.

    I took a brief look at the documentation and it seems that plugins are now built with json? Is it a habit/trend for Vanillaforums to upgrade and completely change this much? I understand upgrading between PHP versions, event handlers, etc., but looking at the documentation versus what I see in 2.3 plugins, things are very different.

    Am I wrong in that perception?

    whatever the perception or answer. you are correct that many plugins are broken in 2.5.1 naming conventions of classes have caused issues in the past regarding plugins, functionality has confused developers and staff some issues if you search the forum for plugin naming and class naming have caused problems regarding mobile vs non.mobile, whether views load, whether auto loading occurs, and whether the js scripts load. A variety of naming conventions in staff plugins has led to a confusion along with the lack of understanding that issues actually did exist and the constant changing of how each new version will be addressed - frequent updates number of backports infrequent updates, etc.
    Seeming ebb and flow of changes one way or another and then reversal It is a common occurrence in politics, governments, boards of directors, etc and vanilla is just one example of excelling at this.

    https://open.vanillaforums.com/discussion/comment/252061/#Comment_252061

    sometimes breakage is unrealized, maybe it will be addressed in the next release and broken plugins might work again or maybe they will find a way to modify the addons if it is a case of a naming convention and a one line change.

    https://open.vanillaforums.com/discussion/comment/252063/#Comment_252063

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

Sign In or Register to comment.