The following guide will show you how to integrate SitePad with your custom/proprietary control panel or create a custom link for SitePad from your control panel.
Download the integration sample file
In case of integrating with your custom control panel you do not need to install SitePad on your server.
You just need to download the integrating sample file here Sitepad_Custom.zip.
Upload it to the appropriate location on your server and create a link to SitePad Website Builder in your custom control panel to point to this file.
SitePad License and Pricing
In order to run SitePad with your custom control panel you need a SitePad license. You will need to contact our Sales Team at [email protected] to get SitePad license for a custom control panel.
The pricing for SitePad with custom control panel is $0.1/user per month with a minimum billing of $100/month i.e. (minimum 1000 users).
You can contact our Sales team for a bulk or site wide (unlimited users) pricing.
Start the Integration
SitePad needs the user's domains list, path of the domains, FTP login details and email to function. These details are used to Publish the website to the control panel account.
Note : You will need to do the user authentication as per the session the user has registered with your control panel. You need to do this to fetch the domain, FTP, etc details of the appropriate user logged in and to prevent unauthorized access if the user is not logged in.
1) API Credentials : Write the save_api_credentials() and load_api_credentials() which will save and load the API Key and API Pass (associated for a user on SitePad editor server). The API Credentials are important as it associates the account so as the user can continue with the existing site content.
2) SitePad License : Update the SitePad License in your integrating file. You can contact our sales team at [email protected] to get a test license to test the integration.
$sitepad_license = 'SMUSH-XXXXX-XXXXX-XXXXX-XXXXX';
3) Choose the editor server :
- You can choose from our available Servers
$sitepad_editor_url = 'https://us.sitepad.com';
- You can use your custom URL for editor eg : https://sitebuilder.myhost.com
- For custom URL you will need to add a CNAME record of your URL to point to one of our editor servers eg : us.sitepad.com
- In order to use SSL please contact SitePad team to install a certificate
$sitepad_editor_url = 'https://sitebuilder.myhost.com';
4) User Details : Pass the control panel username and email of the user currently logged in your panel.
$username = 'USERNAME'; // The control panel username $post['sm_email'] = '[email protected]'; // The user's Email address
5) Control Panel URL : Configure the URL where you want the user to be redirected when they logout from the SitePad editor server.
$post['sm_goto_cp'] = 'https://my.controlpanel.url';
6) Domains List : Configure the list of domains owned by the user currently logged in. This allows the user to create multiple sites for the domains owned by them.
$domainroots = array(); $domainroots['example.com'] = '/home/username/public_html'; $domainroots['addon.example.com'] = '/home/username/public_html/addon'; $domainroots['subdomain.example.com'] = '/home/username/public_html/subdomain'; $domainroots['parked.example.com'] = '/home/username/public_html';
7) FTP PATH : Configure the FTP path of the domains list above. The Path should be relative path from the FTP directory. Eg : The domain path is /home/username/public_htmland the FTP account lands in /home/username you need to pass the FTP path as /public_html
$domain_ftp_paths = array(); $domain_ftp_paths['example.com'] = '/public_html'; $domain_ftp_paths['addon.example.com'] = '/public_html/addon'; $domain_ftp_paths['subdomain.example.com'] = '/public_html/subdomain'; $domain_ftp_paths['parked.example.com'] = '/public_html';
8) FTP Login Credentials : Configure the FTP login credentials that should be used to connect to the web server to transfer the files for the website to the domain's directory.
$ftp_user = '[email protected]'; // FTP Username $ftp_pass = 'RANDOMPASS'; // FTP Password $ftp_host = 'ftp.server.com'; // FTP HOST $ftp_port = 21; // FTP PORT
9) Re-branding Options (Optional) : You can pass your custom brand details to white label SitePad. Configure the details as explained below
$post['sm_brand'] = 'CUSTOMBRAND'; // Custom brand name. Default : SitePad $post['sm_brand_app'] = 'CUSTOMBRAND Website Builder'; // Custom website builder name. Default : SitePad Website Builder $post['sm_brand_editor'] = 'CUSTOMBRAND Editor'; // Custom editor name. Default : SitePad Editor $post['sm_brand_url'] = 'https://myhost.com'; // Website URL, will be displayed in footer. Default : https://sitemush.com $post['sm_brand_logo'] = 'https://myhost.com/logo.png'; // Custom Logo (100px x 100px transparent PNG) Default : SitePad logo $post['sm_brand_demos'] = 'https://demos.sitebuilder.myhost.com'; // You can use a custom URL for Demos. However you will need to add a CNAME record of this demo to point to demos.sitepad.com. In order to use SSL please contact SitePad team to install a certificate
10) That's it ! The integration is complete.
Test the Integration
Once the integration is complete you can test the integration by clicking on the SitePad Website Builder link in your control panel and confirming that it redirects to the SitePad editor server successfully.
- Choose a Theme
- Build Some Pages
- Publish the Site
- Check the site works fine after Publish
- Logout from the editor server
- Login again to make sure the API Key and Pass are read correctly and that the user data is loaded with the associated API Key pass by checking the customization you had done in the above steps.
- That's it ! You are good to go !
In case you face any issues with integrating SitePad with your control panel, you can contact us anytime for support at [email protected].