• Dadman with a boy
  • Posts: 16,061
« on May 7th, 2011, 12:55 PM »Last edited on February 8th, 2013, 10:47 AM
Feature: Plugins
Developer: Arantor (main), Nao
Target: admins, modders
Status: 99% (a complete rewrite... Pretty much ready to go!)

SMF 'packages' and 'mods' are now called 'plugins'.
Our goal here is to completely phase out file edits in favor of the use of hooks, so that admins no longer have no deal with plugin incompatibilities and tedious forum updates. Of course, it's not going to be easy... Which is why, like its Hook counterpart, this is still largely a work in progress.

October 7 update: Arantor implemented the new plugin system, which is a much bigger rewrite than originally expected, and more powerful as well. We're sure modders and users will both love it!

2013 update: it seems to be complete at last ;)

Re: Plugins
« Reply #1, on November 15th, 2013, 10:08 PM »
A question for those of you who've played with the plugin system more than I did, which is basically, everyone who released a plugin so far... :P

I'm currently 'fixing' code everywhere in Wedge, and found these undeclared variables in Subs-Plugin.php...

At the beginning, there's a $path on which empty() is tested. Obviously, it always returns true... So, I removed it. But I suspect there's something bigger behind.
Later, search for $full_path and you'll see the deleteFiletree function, which uses that variable, when it's not declared anywhere. I suspect Arantor meant to use $dir instead, as he's declaring $full_path later on, and then calling deleteFiletree with that variable as $dir. Any ideas..?
The line just below that uses yet another undefined variable, aka $entryname. Smells of copy & paste to me. I replaced it with if (!is_writable($dir)), because it makes the most sense. Nice.[1]
In uploadedPluginPrune, the $dir var is at one point called dir. Nice.
There's also a typo in the globals list in test_hooks_conflict... Nice.

It's surprising the plugin system worked so far without any errors, really... ;)
 1. Oh wait, that's funny... That code is actually copied from Subs-Package:deltree, and I checked out SMF 2.1, and guess what? They also have the $entryname bug... Except, Spuds documented it, but never fixed it. Well, easy enough guys: you probably can just remove it, and the slash...