Haihaisoft
Welcome, Guest
Please Login or Register.    Lost Password?
Integrate DRM-X with Joomla 1.0 tutorial (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Integrate DRM-X with Joomla 1.0 tutorial
#183
admin (Admin)
Admin
Posts: 125
graph
User Offline Click here to see the profile of this user
Integrate DRM-X with Joomla 1.0 tutorial 1 Year, 11 Months ago Karma: 3  
Because Joomla 1.0 doesn't provide the plugin interface as Joomla 1.5, so the only way is add code to user registration page and user edit save page.



This tutorial will guide you in the process of integrating DRM-X with Joomla1.0. You will synchronize the users after the integration.

So let’s begin.



Set the “WebServiceAuthStr” on DRM-X.com

“WebServiceAuthStr”
is a number that is used for authenticating if the content owner has the right to integrate his website with DRM-X platform. The string you set on DRM-X.com must be the same with the one in your Joomla codec.

1. Login to your DRM-X account and click the Account Settings in the left menu:



2. Click the Website Integration Preferences in the Preferences column:



3. Click the Synchronize user integration radio button, and then input the Web Service Authenticate String.

Here, we input “abc123”:



The other three fields is used for customizing the pop-up login page for your users. We will not introduce the features in this tutorial. You can see the details by clicking the link below:

http://community.haihaisoft.com/index.php/Integrating-with-your-websites/127-Customize-the-Pop-up-Login-window-of-the-protected-files.html

We left the other three fields blank here. Please click the Submit button when you finish inputting the Web Service Authenticate String.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#184
admin (Admin)
Admin
Posts: 125
graph
User Offline Click here to see the profile of this user
Re:Integrate DRM-X with Joomla 1.0 tutorial 1 Year, 11 Months ago Karma: 3  


Adding code to Registration.php in your Joomla files


We added code to components/com_registration/registration.php, you will need to place nusoap.php in your joomla components/com_registration folder. Please edit the paramater has change here:




/*
Synchronize User to DRM-X.com, Add User Info
*/

require_once('nusoap.php';

$AdminEmail="support4@haihaisoft.com";


// change here. Your registered email at DRM-X.com

$WebServiceAuthStr="abc123";


// change here. Your Webservice Authentication String at http://www.drm-x.com/SetIntegration.aspx?selection=6.
We set the number into “abc123” in Step 1.

$Money="2";

//change here. Set the initial fund for user at DRM-X.com. By default, you can set this value to 0, and manually set the value at DRM-X.com


$GroupID="106";


//change here. Set GroupID that you want to add user to DRM-X.com. Please find the GroupID from here: http://www.drm-x.com/ManageGroups.aspx?selection=1


$BindNumber="0";

//change here. You can control the license can be used in how many computers by setting BindNumber. 0 Means unlimited;

//Add New User to DRM-X.com


$wsdl="http://www.drm-x.com/haihaisoftlicenseservice.asmx?wsdl";
$client=new soapclient2($wsdl, 'wsdl';
$client->soap_defencoding = 'UTF-8';
$client->decode_utf8 = false;
$param = array(
'AdminEmail' => $AdminEmail,
'WebServiceAuthStr' => $WebServiceAuthStr,
'GroupID' => $GroupID,
'UserLoginName' => $row->username,
'UserPassword' => $row->password,
'UserEmail' => $row->email,
'UserFullName' => $row->name,
'Title'=>'N/A',
'Company' => 'N/A',
'Address' => 'N/A',
'City' => 'N/A',
'Province' => 'N/A',
'ZipCode' => 'N/A',
'Phone' => 'N/A',
'CompanyURL' => 'N/A',
'SecurityQuestion' => 'N/A',
'SecurityAnswer' => 'N/A',
'IP' => $_SERVER['REMOTE_ADDR'],
'Money' => $Money,
'BindNumber' => $BindNumber,
'IsApproved' => 'yes',
'IsLockedOut' => 'no'
);
$result = $client->call('AddNewUser', array('parameters' => $param), '', '', true, true);
$license= $result['AddNewUserResult'];
echo $license;
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/09/21 20:40 By admin.
  The administrator has disabled public write access.
#185
admin (Admin)
Admin
Posts: 125
graph
User Offline Click here to see the profile of this user
Re:Integrate DRM-X with Joomla 1.0 tutorial 1 Year, 11 Months ago Karma: 3  


Adding code to user.php in your Joomla files


We added code to components/com_user/user.php, you will need to place nusoap.php in your joomla components/com_user folder. Please edit the paramater has change here:




/*
Synchronize User to DRM-X.com, Update User Info
*/

require_once('nusoap.php';

$AdminEmail="support4@haihaisoft.com";


// change here. Your registered email at DRM-X.com

$WebServiceAuthStr="abc123";


// change here. Your Webservice Authentication String at http://www.drm-x.com/SetIntegration.aspx?selection=6.
We set the number into “abc123” in Step 1.

$Money="2";

//change here. Set the initial fund for user at DRM-X.com. By default, you can set this value to 0, and manually set the value at DRM-X.com


$GroupID="106";


//change here. Set GroupID that you want to add user to DRM-X.com. Please find the GroupID from here: http://www.drm-x.com/ManageGroups.aspx?selection=1


$BindNumber="0";

//change here. You can control the license can be used in how many computers by setting BindNumber. 0 Means unlimited;

//Add New User to DRM-X.com


$wsdl="http://www.drm-x.com/haihaisoftlicenseservice.asmx?wsdl";
$client=new soapclient2($wsdl, 'wsdl';
$client->soap_defencoding = 'UTF-8';
$client->decode_utf8 = false;
$param = array(
'AdminEmail' => $AdminEmail,
'WebServiceAuthStr' => $WebServiceAuthStr,
'GroupID' => $GroupID,
'UserLoginName' => $row->username,
'UserPassword' => $row->password,
'UserEmail' => $row->email,
'UserFullName' => $row->name,
'Title'=>'N/A',
'Company' => 'N/A',
'Address' => 'N/A',
'City' => 'N/A',
'Province' => 'N/A',
'ZipCode' => 'N/A',
'Phone' => 'N/A',
'CompanyURL' => 'N/A',
'SecurityQuestion' => 'N/A',
'SecurityAnswer' => 'N/A',
'IP' => $_SERVER['REMOTE_ADDR'],
'Money' => $Money,
'BindNumber' => $BindNumber,
'IsApproved' => 'yes',
'IsLockedOut' => 'no'
);
$result = $client->call('AddNewUser', array('parameters' => $param), '', '', true, true);
$license= $result['AddNewUserResult'];
echo $license;
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#186
admin (Admin)
Admin
Posts: 125
graph
User Offline Click here to see the profile of this user
Re:Integrate DRM-X with Joomla 1.0 tutorial 1 Year, 11 Months ago Karma: 3  
Summary:

Step1: Set the “WebServiceAuthStr” on DRM-X.com

Step2: Adding code to Registration.php in your Joomla files

Step3: Adding code to User.php in your Joomla files


Related tutorials:


DRM-X Plugin for Joomla1.5 tutorial!


Download Samples:


File Attachment:
File Name: Integrate_DRM_X_with_Joomla1.rar
File Size: 204814
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply