HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Search
-
Plugin inheritance
Currently Vanilla does not support plugin inheritance. If you try to use it, you start getting all kind of bugs (quite unexpected), that spoil everything. Let's say, I would like to have some common functionality, that could be inherited then. So, you create some abstract class _baseBlahPlugin which extends Gdn_Plugin. You… -
Re: Plugin inheritance
In WordPress, I found a group of plugins that all required 1 core "meta" plugin that provided base functionality for all the other plugins in the group. The meta plugin didn't do anything on its own, it just provided a cleaner way for all the others to work. I understand that an abstract class would be the good-and-proper… -
Re: Plugin inheritance
I have AuthCore, with very basic functions. Then I have AuthCore_oAuth2 and AuthCore_openid which extend AuthCore. All these classes are located in AuthCore plugin directory. AuthCore_oAuth2 cannot be plugin by itself - it misses getProfile code, which is specific for every service. That is, the part of connection process… -
Re: Plugin inheritance
-
Re: Plugin inheritance
So, if there is any class loaded that implements Gdn_IPlugin, Vanilla tries to instantiate it as plugin, even if it is abstract. The simple fix looks like this: // Register only non abstract classes. $Reflection = new ReflectionClass($ClassName); if (!$Reflection->isAbstract()) // Register this plugin's methods…
5 results