|
|
@@ -39,6 +39,44 @@ function siteBuilder_MetaData() {
|
|
|
|
|
|
function siteBuilder_ConfigOptions() {
|
|
|
siteBuilderCreateTables();
|
|
|
+ $api = new SiteProApiClient('https://builder.thurdata.ch/api/', 'apikey0', '993yVHwC05TLsx2JI2XFlAhkkPUxR6JbQUYbI.a5HiRtmNV9');
|
|
|
+
|
|
|
+ try {
|
|
|
+ // this call is used to open builder, so you need to set correct parameters to represent users website you want to open
|
|
|
+ // this data usually comes from your user/hosting manager system
|
|
|
+ $res = $api->remoteCall('builder/plans', array(
|
|
|
+ 'action' => 'read',
|
|
|
+ 'brandId' => '852604',
|
|
|
+ 'builderPlan' => 'ThurBuilder'
|
|
|
+ ));
|
|
|
+ if (!$res || !is_object($res)) {
|
|
|
+ logModuleCall(
|
|
|
+ 'siteBuilder',
|
|
|
+ __FUNCTION__,
|
|
|
+ $params,
|
|
|
+ 'Error: Response format error',
|
|
|
+ $res
|
|
|
+ );
|
|
|
+ return 'Error: Response format error';
|
|
|
+ } else {
|
|
|
+ logModuleCall(
|
|
|
+ 'siteBuilder',
|
|
|
+ __FUNCTION__,
|
|
|
+ $params,
|
|
|
+ 'Debug',
|
|
|
+ $res
|
|
|
+ );
|
|
|
+ }
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ logModuleCall(
|
|
|
+ 'siteBuilder',
|
|
|
+ __FUNCTION__,
|
|
|
+ $params,
|
|
|
+ 'Error: Request error',
|
|
|
+ $e->getMessage()
|
|
|
+ );
|
|
|
+ return 'Error: Request error';
|
|
|
+ }
|
|
|
return ["BuilderURL" => [
|
|
|
"FriendlyName" => "Builder URL", # Full Builder URL (prefix//hostname:port/)
|
|
|
"Type" => "text", # Text Box
|