Skip to main content
We are aware of an issue after updating to cPanel versions 11.110.0.65, 11.126.0.21, or 11.128.0.11, some cPanel plugins or features are no longer functioning properly including WP Toolkit. Please see the following article for more information and updates:
Update to latest cPanel 110, 126, or 128 versions removes "addonfeatures" directory.

Custom Anti-Spam plugin planning

Comments

2 comments

  • AndrewH.
    What you can do (and this is what I had originally done when I worked on the x4 installer) is this: Create an install script with Perl From the install script call register_plugin similar to this: sub register_x4_plugin { if ( -x "/usr/local/cpanel/bin/register_cpanelplugin" ) { print "\nRegistering plugin with cPanel...\n"; `/usr/local/cpanel/bin/register_cpanelplugin x4.cpanelplugin`; #Replace this with your .cpanelplugin file } else { print "\nFailed to register plugin with cPanel\n"; } }
    If your plugin registers, copy files over ...and you're done! Now you should also have an uninstall script, since that's the best practice. For that.... Write a Perl script From there call unregister_plugin (make sure to specify your plugin) sub unregister_x4_plugin { if ( -x "/usr/local/cpanel/bin/unregister_cpanelplugin" ) { print "Unregister plugin with cPanel...\n"; `/usr/local/cpanel/bin/unregister_cpanelplugin /var/cpanel/registered_cpanelplugins/x4theme`; } else { print "Failed to unregister plugin with cPanel.\n"; } }
    Remove files as needed ..and that's it! edit: Oh! To install just run from the command line. edit2: Docs link!
    0
  • MACscr
    Where should i be storing my plugin? /usr/local/cpanel/3rdparty/ just doesnt seem right. Also, what method should I use to automatically make my plugin available for all cpanel themes? Important note, I am only using php and a little bash. I don't know perl and won't be using it.
    0

Please sign in to leave a comment.