HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Improving the user experience

hgtonighthgtonight ∞ · New Moderator

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() {

public function OnDisable() {

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.

Search first

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.


Sign In or Register to comment.