General 2.5 Plugin Compatibility Issues
If you have a plugin with the plugin key called "Something", the plugin class must be named "SomethingPlugin" like so
<?php $PluginInfo['Something'] = array( // ... ); class SomethingPlugin extends Gdn_Plugin {
Sometimes you find plugins which only use class Something extends Gdn_Plugin
. Plugins like that seem to "not work" with Vanilla 2.5 any more. It can be simply fixed by renaming the class. Afterwards you have to delete the file /cache/addon.php and the problem should be gone.
@Vivant: you have mentioned problems with the "I Like This" plugin.
@Dr_Sommer: you have problems with the Add Registration Question
You both should be able to fix these problems by replacing class LikeThis extends Gdn_Plugin {
with class LikeThisPlugin extends Gdn_Plugin {
for the "I Like This" plugin and class AddRegistrationQuestion extends Gdn_Plugin {
with class AddRegistrationQuestionPlugin extends Gdn_Plugin {
for the "Add Registration Question" plugin and deleting the file /cache/addon.php
afterwards.
Comments
You can also add a
class
parameter to the addon data if you're using the new JSON format if you really want to call the class something else.I've just tried the following and it didn't work for
class LikeThis
. I've slightly changed the plugins name in the addon.json and I could see in the plugin list, that the name from the addon.json was used.Well, I was pretty sure that's what it was for.
Thanks @R_J - that fixed it
And you were not wrong: it is possible to choose a differing class name but the key needed for that is "className" not "class".
@R_J:
ThX a lot... worked!!
I'll post the solution in the correct Discussion for noobs like me...