|
|||
|
Use API1 and API2
I am a newbie,
I read the Interested? - HOW TO: Create your own remote access features in PHP I understood the thing But now in 11.24 its mentioned that cPanel::Accounting PHP Module is deprecated and XML API is In I know the XML commands also by now! But I am confused on the following for Plugins: 1) Should the Plugin we create be in http://WHM/frontend/x3/myplugin (I saw this in ROR, fantastico) or in the 3rdparty folder 2) How to call XML API in the PHP Plugin sript ? - using the Web like file_get_contents() - OR fsockopen I want to make a plugin like ROR, Fantastico - I mean the way they operate in the end user CPanel. Please help |
|
||||
|
Quote:
Are you looking to create a plug-in? A plug-in is something like Fantastico where it is accessed via the cPanel interface. If so, then you likely will not be using the XML-API. The XML-API is designed for external scripts (e.g. billing applications) to interact with cPanel's APIs. If you are building a plug-in, your script will be running on cpsrvd, thus will not need XML-API wrappers to access API1/API2 functionality. You would simply use API1/API2 directly or use our LivePHP wrapper.
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit |
|
|||
|
Thanks for clearing those confusions
Also can you just tell me what is LivePHP wrapper and how can I access / use API1/API2 directly AND my files will be placed in : usr/local/cpanel/whostmgr/docroot/cgi/ OR frontend/x3/ Is there some detailed guide about how to make a Pluging like Fantastico or ROR |
|
||||
|
Quote:
There's a crash course on all of our APIs as well as LivePHP in the following presentation: http://www.cpanel.net/conference/08/files/APIs.pdf The cPanel Plugin will be stored in: /usr/local/cpanel/base/frontend/$themename/$somedir Where $themename is the name of a theme (e.g. x3) and $somedir is some directory where you're placing your plugin file(s). As for making a WHM plug-in, some documentation for that can be found at: http://www.cpanel.net/support/docs/modules/index.html
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit |
|
|||
|
Thanks a million
Just to clear my last doubts 1) Why is Fantastico stored in /usr/local/cpanel/whostmgr/docroot/cgi(thats what i saw in its files) 2) If the plugin is in /usr/local/cpanel/base/frontend/$themename/$somedir then what about other themes in CPanel Will the plugin be available then ? 3) Cant modules be created in PHP. The above docs are for Perl Modules. But Fantastico is in PHP with just installation addon_fantastico.cgi in PERL Language ! Last edited by rongup; 12-30-2008 at 12:42 PM. |
|
||||
|
Quote:
2. The plug-in installer will install an icon for your plug-in to all themes that support plug-ins, which is essentially all of them except xmail and x3mail. You could symlink or copy the plug-in directory contents for all themes in /usr/local/cpanel/base/frontend if you desire.
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit |
|
|||
|
Ok, So let me just clear up what I want:
1) I want to design a plugin that will be installable by any host and will be finally available to the End User 2) I want to make it in PHP 3) With PHP I want to get the END USER domains, Mysql info. I meant is that when the END USER Interacts with the PLUGIN, the PLUGIN needs the END USER domains info, Mysql info etc I hope I am clear enogh this time! ![]() I thought Fantastico and ROR are like this PLease help me by giving any tutorials and resources! Last edited by rongup; 12-31-2008 at 10:46 AM. |
|
|||
|
Any guides for that!
Also for the third point I meant is that when the END USER Interacts with the PLUGIN the PLUGIN needs the END USER domains, Mysql info etc I will edit the 3rd point! Last edited by rongup; 12-31-2008 at 10:46 AM. |
|
||||
|
I'm not familiar with building a WHM plug-in in PHP, but information such as the end user's domain and the ability to create MySQL users is available via API1/API2. You can view the source code for the x3 theme to become familiar with these APIs. The code is located at /usr/local/cpanel/base/frontend/x3. The x3 theme is essentially some HTML, CSS, Javascript, YUI (Javascript handling the AJAX) and some API1/API2 calls. If you need help finding a specific API call, let me know.
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit |
|
|||
|
Ok i got this file test.php and it had these functions:
<cpanel PHP="loadvars()"> <cpanel PHP="loadparkeddomains()"> <cpanel PHP="loadsubdomains()"> <cpanel PHP="loaddocroots()"> What other functions exist ? I want MySQL info so that I can connect to MySQL Also will a PHP script be allowed to open external files ! like http://ext-url.com/file.zip I want to store that file in the frontend/x3/myplugin/ |
![]() |
| Thread Tools | |
| Display Modes | |
|
|