Improving the user experience
The current version (1.1) has a base render hook that will never add a module. Now this is all fine and dandy, since you are really just using this plugin as vector to override the new discussion module. I would suggest swapping out the entire plugin class methods and replace with the below code:
protected function RefreshModuleCache() { // Refresh the autoloader cache Gdn_Autoloader::SmartFree('library', 'newdiscussionmodule'); } public function Setup() { $this->RefreshModuleCache(); } public function OnDisable() { $this->RefreshModuleCache(); }
This will remove the cache for the new discussion module whenever the plugin is enabled/disabled. The SmartFree()
method is actually not smart at all. As far as I can tell it completely wipes out the cache. In the future it might be a little smarter. But now I am rambling.
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Comments
Ok thanks for that. I tested it and revised the plugin based on your recommendations . So that makes 9 ways of doing this and counting
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌