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
After February 6, this site will no longer have Facebook, Twitter, or OpenID sign-in options. Read our announcement about social media SSO support in 2.8 for more info.

Make sure you have a current, valid email address set in your profile and set a password so you can login without it. If you get locked out after that time, you can choose "Forgot Password" to fix it as long as a valid email is on your account.

How to modify an old plugin for 2.1

vrijvlindervrijvlinder Papillon-Sauvage MVP
edited December 2013 in Tutorials

So you found and old plugin but it does not work with your version of Vanilla....

There are some modifications you need to make. Some will work others will not due to major changes in framework. These 3 steps cover only the basic changes for a plugin that is 2.0 but 2.1 friendly . This means it requires only minor changes to work.

1.If your old plugin's definition has a lower version requirement. You must remove the entire requirement sentence from the list.

2.If your old plugin says: class OldPlugin implements Gdn_IPlugin you must change that to: class OldPlugin extends Gdn_Plugin

3.If your old plugin contains: &$Sender You must change it to this: $Sender

If these changes still don't make it work there are a couple other changes you can make to the Handlers that render the plugin. These simply tell where it will appear.

If these functions exist , example:






Not every plugin will work for 2.1 even given these changes, just as not every 2.1 plugin will work for 2.0.

Because of extensive changes in the framework and additions to it that do not exist in 2.0, those plugins will only work with their intended versions.

Before you test your fixed plugin, make sure you backed up all your plugins and files. Or test it under a test environment to minimize any potential risk.



Sign In or Register to comment.