Hi. Hoping someone can help as I'm tearing my hair out.
I've just followed cPanel plug-in documentation and used the plug-in creator to make a new icon in the mail section of my cPanel.(I am subsequently editing the .cpanelplugin file directly.)
Problem 1
No matter what I try to put in the onclick: line, no such onClick="<Script>" ends up in the <a> tag of the otherwise fully working new plug-in icon in cPanel.
I got around the problem by setting the url: field to
Code:
url:javascript:<JavaScript_Here>
But this isn't entirely satisfactory.
For what it's worth, I also had a problem with a comma in the url: field apparently ending the field data parsing. I tried using a back-slash to escape the commas (didn't work) and ended up using %2C instead. Ex. window.open('url'%2C 'winname');, instead of window.open('url', 'winname');. *shrug*
Problem 2
Additionally, despite having...
...in the plug-in file, my plug-in is NOT appearing in the feature manager.
Note that the plug-in DOES appear in cPanel as expected and does work in terms of the URL part, only. Perplexing :/
- - -
Perhaps I'm referencing outdated documentation and/or using the wrong syntax or field names or something?
Thanks for any assistance.
Gruvin.