Learning about Plug-ins..

mike_p

Verified User
Joined
Aug 26, 2004
Messages
101
Hi

I'm starting to play with plug-ins and have come across a couple of things I can't work out.

I've based my investigations on the hello_world example.

Having installed the hello_world example, I then made a couple of small changes to the script in the admin directory.

When I entered
http://myserverIP:2222/CMD_PLUGINS/hello_world/index.html
the changes didn't show up, but it did say
"This script is being run as admin"

After a while I edited the index.html in the User directory.

This time the changes did appear even though I was running as admin.

How come?
 
I have also had this problem and have not found a workaround yet. I don't use installatron, but I think they might have a solution since they advertise that the admin can control what users can install what scripts or something like that. Not entirely sure, you might want to contact l0rdphi1.
 
you might want to contact l0rdphi1
Hopefully he will have spotted this thead anyway.

Meanwhile my main question is ...

Is this a feature or a BUG?
 
I don't really know if I understand your question :s

You have a set of dirs in /usr/local/directadmin/plugins/hello_world/

- Admin
- User
- Reseller (or something :S)

All of these have a index.html wich is executable. If you alter the index.html in the admin dir, you will notice the changes if you're an Administrator and click on the link in the CP on "Administrator" level.

For the user and reseller it's the same. But you should check out the user_txt.html, admin_txt.html and reseller_txt.html. This will show you wich url be used on each level ;)

Hope I could make it a little bit clear to you ;)

Good luck
 
More questions

Here is another question on plugins.

On the USER page, is there any way to access the current Domain name without having to examine either the URL or the request?

Username and User are passed as ENV/SERVER variables but the domain isn't.

Also it appears the GET variables are not passed into the _GET array.

Thanks for any help.

It would be useful if soemone at DA (or elsewhere!) could write a short 'HowTo' for plugins.
 
Back
Top