Friend's notes

Joomla is one of the most popular open source CMS (Content Management System) websites online. Joomla is a brainchild of Mambo created by Miro PVT Ltd (Mambo is a trademark of Miro International PVT Ltd). Joomla was established in the era when the internet was relatively new.

Read more: 3 reasons why we love Joomla

Event Data Management (EDM) is the following regular, natural connection in the development of the esteem chain for conferences, gatherings, meetings, events, tradeshows, traditions, congresses, and so on. EDM is the establishment for gathering and incorporation of every single applicable datum and adaptable revealing of that data to address partner needs.

Read more: Importance of Event Data Management in Communication and Success

By now, everyone iѕ аwаrе оf the imроrtаnсе аnd роwеr of ѕосiаl mеdiа in gеnеrаl; yet its adoption bу еvеnt аnd mееting рlаnnеrѕ ѕtill seems tо bе lаgging bеhind. Thеrе аrе many methods оnе соuld use tо tаkе аdvаntаgе оf аnd mаximizе social mеdiа mаrkеting, a numbеr of whiсh we'll lау оut for you bеlоw. 

Read more: Social Media Marketing of an Event

So the purpose of this article is to explain how you can introduce a download ID in your Joomla Updater for your commercial extensions (components, plugins, modules). Of course the updates were limited only to customers who have a current subscription. Examples are found for a plugin :). You can adapt it for a component or a module.

A lot of ressource founded on the net are based on Akeeba. For example the very good article of Tim Plummer. You can see, my article is based on the same article's consutruction :-).

I suppose that you already have RD-Subscriptions installed on your site and are using this to distribute and sell your extensions.

1. The first step is to add a plugin option to store the customer’s download ID. Add a field to store the download ID in your config.xml file

/plugins/plg_yourplugin/plg_yourplugin.xml

<field name="downloadid"
type="text" 
default="" 
size="30" 
label="PLG_YOURPLUGIN_DOWNLOADID" 
description ="PLG_YOURPLUGIN_DOWNLOADID_DESC" />

2. Next, you need to add the language strings for these options.

/language/en-GB/en-GB.plg_yourplugin.ini

PLG_YOURPLUGIN_DOWNLOADID="Download ID"
PLG_YOURPLUGIN_DOWNLOADID_DESC="Enter your Download ID to enable Updates"

3. Add an update server reference in your installation XML file

/plugins/plg_yourplugin/plg_yourplugin.xml

You can construct your extension.xml file (see : Deploying an Update Server)  :  

<updateservers>
<server type="extension" priority="1" name="Your complete plugin name"><![CDATA[https://www.domain.com/yourplugin/extension.xml]]>
</server>
</updateservers>

or you can use RD-Subscription in pro version and use their joomla update system : 

<updateservers> 
<server type="extension" priority="1" name="Your Plugin"><![CDATA[https://www.domain.com/index.php?option=com_rdsubs&view=updater&format=xml&element=plg_yourplugin]]>
</server>
</updateservers>

4. In the plugin code add the following:

/plugins/plg_yourplugin/plg_yourplugin.php

public function __construct(&$subject, $config)
{ parent::__construct($subject, $config);
$plugin = JPluginHelper::getPlugin('element', 'yourplugin'); JPlugin::loadLanguage('plg_yourplugin');
$pluginParams = new JRegistry($plugin->params);
$dlid = $pluginParams->get('downloadid'); *
if (!empty($dlid) && (preg_match('/^([0-9]{1,}:)?[0-9a-f]{32}$/i', $dlid)))
{
$extra_query = "'key=$dlid'";
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->update('#__update_sites')
->set('extra_query = '.$extra_query)
->where('name = "Your complete plugin name"');
$db->setQuery($query);
$db->execute();
}
}

Note the name above should exactly match the name in the updates server section of your installation XML file.

Uppon first use of the plugin, your update server will be fine.

RD-Media propose a manual implementation. For me I prefer my solution :-).

That’s all you need to do in the plugin, the rest of the work is on your site where you have RD Subscriptions installed.

Note : AllEvents is not affiliated to RD-Subs, I use RD-Subs to manage our extensions.