Multi file plugin

sparek

Verified User
Joined
Jun 27, 2019
Messages
517
How do you access other files in the plugin directory when writing plugins?

If you have a plugin created:

/usr/local/directadmin/plugins/new_plugin

and you have PHP/HTML code to show in the user's panel in:

/usr/local/directadmin/plugins/new_plugin/user/index.html

All of this works.

How can I access, say:

/usr/local/directadmin/plugins/new_plugin/user/action.html

from within the plugin?


Put another way - /usr/local/directadmin/plugins/new_plugin/user/index.html - has a form that requests information from the user. I want to process the inputs of that form.

What do I use as my ACTION parameter for the form here and how can the plugin access that script?

If the file - /usr/local/directadmin/plugins/new_plugin/user/action.html - exists, then the panel link to /user/plugins/new_plugin/action.html does not work.


Perhaps there's documentation some where that I'm missing.
 
So maybe using /user/plugins/new_plugin?path=action.html is suppose to work?

But it doesn't really work.

There must be some documentation that I'm missing. There just doesn't appear to be a lot to work with on this.
 
Forgot to

chown diradmin:diradmin /usr/local/directadmin/plugins/new_plugin/user/action.html
chmod 755 /usr/local/directadmin/plugins/new_plugin/user/action.html


Now this seems to work.
 
Back
Top