Hello, World equivalent of a WHM plugin - does one exist?
I'll start this by saying I don't really have any experience with Perl or PHP outside of little one-liners. I'm trying to create a plugin to install and manage a service, edit some files - somewhat similar to CSF.
I tried following this tutorial, but rblcheck.cgi just shows the contents of the file rather than anything in the GUI:
I've also referred to the documentation but me not being the most dev savvy, it provides more questions than answers:
I've also tried referring to some other plugins and basing something around how they're set up, but I just get 404 or 500 errors whenever I try anything.
So that leads me here. I was wondering if would be willing to provide a very basic one-page plugin - its .cgi and .conf files and anything else that may be required. I'd even be willing to pay someone to help me flesh out an idea I have, but not sure if stuff like that can be discussed here.
Appreciate you in advance.
-
Hello! Thank you for posting your question here. I am sure we have some users here who could offer their input. 0 -
I actually managed to get some test plugins working with PHP now. I haven't quite worked out how something like CSF manages to use the same index.cgi page regardless of whatever option you select, though. Tried making sense of the plugin files to no avail. Not really a cPanel/WHM problem but if anyone has suggestions, my next goal was to either: 1. Use the same entry URL for all subsequent requests so that functionality mirrors how CSF works. So for example, I load up to index.php or index.cgi, click a 'Edit Something' button, page content changes but the URL stays as index.php or index.cgi. Kind of similar but looking at Installatron, the URLs are all variants of something like index.cgi#/backups, index.cgi#/installs, index.cgi#/admin, etc. - something like that is the end goal. 2. Find a way to strip out the .php or .cgi on any pages I have without making any changes to the cPanel or Apache config seeing as there isn't .htaccess support in there. Right now, I can have multiple PHP pages a la index.php or test.php, but would like to drop the .php if I can't figure out option 1. If there was a clean, safe way to do that with config changes, I'd be curious to know as well. I've also tried getting it to work with frameworks, but not having much luck. Example, using Lumen, I set up a route per their tutorial for foo. index.php loads fine, but index.php/foo leads to a 404. Again, I lack proper web dev chops but I'm trying to pick some up so any pointers or best practice is appreciated. :) 0
Please sign in to leave a comment.
Comments
2 comments