<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ActiveCampaign Email Marketing Blog &#187; Programming</title>
	<atom:link href="http://www.activecampaign.com/blog/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.activecampaign.com/blog</link>
	<description>Email marketing blog discussing email marketing features, deliverability, new marketing ideas, and more.</description>
	<lastBuildDate>Mon, 16 Jan 2012 19:12:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Adding or Updating an Existing Subscriber Through the API</title>
		<link>http://www.activecampaign.com/blog/adding-or-updating-an-existing-subscriber-through-the-api/</link>
		<comments>http://www.activecampaign.com/blog/adding-or-updating-an-existing-subscriber-through-the-api/#comments</comments>
		<pubDate>Fri, 30 Dec 2011 19:57:28 +0000</pubDate>
		<dc:creator>Elizabeth</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.activecampaign.com/blog/?p=3084</guid>
		<description><![CDATA[Our Email Marketing software offers a full featured, easy to use API, with dozens of functions to choose from. Many of our clients have utilized our open API to integration our Email Marketing software with their websites, external databases, and other software applications. Perhaps the most common use of the API is adding new subscribers [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Our Email Marketing software offers a full featured, easy to use API, with dozens of functions to choose from. Many of our clients have utilized our open API to integration our Email Marketing software with their websites, external databases, and other software applications. Perhaps the most common use of the API is adding new subscribers to the system, and updating existing subscribers.</p>
<p>Whenever you need to add a new subscriber to your system through our API, you must follow these steps:</p>
<ol style="font-size: 12px; margin-left: 50px;">
<li>Use <em>subscriber_view_email </em>first, to check and see if a subscriber with the same email address already exists.</li>
<li>If <em>subscriber_view_email </em>returns no response, then use <em>subscriber_add</em> to add a new subscriber.</li>
<li>If <em>subscriber_view_email</em> does return a response, then save the subscriber data that it returns, and use <em>subscriber_edit</em> to edit the existing subscriber while also retaining their original data (lists, fields, etc).</li>
</ol>
<p>This blog post will explain how to check to see if a subscriber exists before adding them, and how to update a pre-existing subscriber.</p>
<h2>Use <em>subscriber_view_email</em> to Fetch Existing Subscriber Details</h2>
<p>Before either adding a new subscriber, or updating an existing subscriber, <strong>you must always check to see if that subscriber exists first, and fetch their existing subscriber details.</strong> This is extremely important! If you attempt to use the <em>subscriber_add</em> function to add a subscriber who already exists in the system, you will receive an error message telling you that duplicate subscribers cannot be added (unless the &#8220;allow duplicate subscriptions&#8221; setting is enabled, which is uncommon). Furthermore, if you attempt to update an existing subscriber without fetching their previous information first, you run the risk of accidentally unsubscribing them to previous lists, or losing custom field data.</p>
<p>To check and see if a subscriber already exists in your system, you can <a title="subscriber_view_email" href="http://www.activecampaign.com/api/example.php?call=subscriber_view_email">use the <em>subscriber_view_email</em> function.</a> This API function only requires that you have the email address of the subscriber, and it will essentially search your database for any record of that email address. If the email address is found, it will return the subscriber ID, name, and all custom fields and lists that the person is subscribed to.</p>
<p>Below is a short example of how you might call the <em>subscriber_view_email</em> function using PHP:</p>
<p><a href="http://www.activecampaign.com/blog/wp-content/uploads/2011/12/apiexample1.gif"><img class="alignnone size-medium wp-image-3086" title="apiexample1" src="http://www.activecampaign.com/blog/wp-content/uploads/2011/12/apiexample1-300x234.gif" alt="" width="300" height="234" /></a>(click to enlarge)</p>
<p>If the email address you are searching for does not exist in your system already, you would receive a response like this:</p>
<p><a href="http://www.activecampaign.com/blog/wp-content/uploads/2011/12/apiexample2.gif"><img class="alignnone size-full wp-image-3085" title="apiexample2" src="http://www.activecampaign.com/blog/wp-content/uploads/2011/12/apiexample2.gif" alt="" width="439" height="149" /></a></p>
<p>The result_code would be 0, and the result_message would say &#8220;Nothing is returned.&#8221; If you receive a response like this from the <em>subscriber_view_email </em>function, then the email address you searched for does not exist in the system, and so it is safe for you to <a title="subscriber_add" href="http://www.activecampaign.com/api/example.php?call=subscriber_add" target="_blank">use the subscriber_add function to add them as a new subscriber</a>.</p>
<h2>What if the subscriber already exists?</h2>
<p>If a subscriber with that email address already exists in your system, the same API call from above would return an array containing all of the subscriber&#8217;s data &#8212; their subscriber ID number, name, date subscribed, the list(s) they are subscribed to, and all custom field data. This image shows a portion of the array that would be returned:</p>
<p><a href="http://www.activecampaign.com/blog/wp-content/uploads/2011/12/apiexample31.gif"><img class="alignnone size-full wp-image-3091" title="apiexample3" src="http://www.activecampaign.com/blog/wp-content/uploads/2011/12/apiexample31.gif" alt="" width="330" height="290" /></a></p>
<p>In this  example, a subscriber with the email address &#8220;test@activecampaign.com&#8221; is subscribed to one list, and the list ID number for that list is 2. This can be seen by looking at the &#8220;lists&#8221; array that is returned within the main array:</p>
<p><a href="http://www.activecampaign.com/blog/wp-content/uploads/2011/12/apiexample4.gif"><img class="alignnone size-full wp-image-3090" title="apiexample4" src="http://www.activecampaign.com/blog/wp-content/uploads/2011/12/apiexample4.gif" alt="" width="326" height="334" /></a></p>
<p>(Note: The &#8220;listslist&#8221; value, also shown in the above image, will include all list ID numbers for the lists the subscriber is subscribed to, separated by a comma.)</p>
<p>If you scroll down a little further in your API result, you will also see that there are two custom fields &#8212; Birthday, and City. The subscriber has a Birthday value, but does not have a value for the City custom field:</p>
<p><a href="http://www.activecampaign.com/blog/wp-content/uploads/2011/12/apiexample5.gif"><img class="alignnone size-full wp-image-3092" title="apiexample5" src="http://www.activecampaign.com/blog/wp-content/uploads/2011/12/apiexample5.gif" alt="" width="311" height="461" /></a></p>
<p>In this example, we will add this subscriber to a new list (ID number 3), and we will also add a value for the City field. However, because the subscriber already exists in the system, we cannot simply use <em>subscriber_add</em> &#8212; we must <a title="subscriber_edit" href="http://www.activecampaign.com/api/example.php?call=subscriber_edit" target="_blank">use <em>subscriber_edit</em> to update them</a> while keeping all of their original data intact (subscriptions, fields, etc).</p>
<h2>Updating The Subscriber</h2>
<p>Below is a short, simplified code example that can be added under the <em>subscriber_view_email </em>call that was already shown above. This code example will read the array that is returned from the <em>subscriber_view_email</em> call, determine whether or not an existing subscriber was returned, and then determine whether or not to add a new subscriber, or update an existing subscriber.</p>
<p><a href="http://www.activecampaign.com/blog/wp-content/uploads/2011/12/apiexample6.gif"><img class="alignnone size-medium wp-image-3095" title="apiexample6" src="http://www.activecampaign.com/blog/wp-content/uploads/2011/12/apiexample6-273x300.gif" alt="" width="273" height="300" /></a>(click to enlarge)</p>
<p>The above code looks at the result array that was returned from the <em>subscriber_view_email</em> function, and preserves the subscriber&#8217;s existing list subscription data, and existing field data. <strong>It is very important to always use <em>subscriber_view</em> or <em>subscriber_view_email</em> to look up the subscriber&#8217;s existing data before using the<em> subscriber_edit</em> function! </strong>Otherwise, you may accidentally erase custom field data, or accidentally unsubscribe the subscriber from their previous lists.</p>
<p>In this example, the subscriber was already present on the list with an ID of 2, and we needed to add them to list 3. If we did not include the <em>foreach</em> loop starting on line 52 &#8212; which finds all lists the subscriber was already present on and adds that subscription information to the <em>$post</em> array as well &#8212; then the subscriber would have been removed from list 2 when the API call was executed. Similarly, if we did not also include the subscriber&#8217;s previous custom field values in the <em>subscriber_edit</em> call, all of their previous custom field values would have been erased.</p>
<p>(Note that the <em>subscriber_add</em> call was not shown in this example, in order to keep the example short. To see a full example of how to use the <em>subscriber_add</em> function, feel free visit our <a title="API Documentation" href="http://www.activecampaign.com/api" target="_blank">API documentation</a> section of our site.)</p>
<p>When combining the two code examples in this article, and calling the script, you should receive the following result from the <em>susbcriber_edit</em> function, indicating success:</p>
<p><a href="http://www.activecampaign.com/blog/wp-content/uploads/2011/12/apiexample7.gif"><img class="alignnone size-full wp-image-3096" title="apiexample7" src="http://www.activecampaign.com/blog/wp-content/uploads/2011/12/apiexample7.gif" alt="" width="353" height="179" /></a></p>
<p>You can perform another <em>subscriber_view_email</em> or<em> subscriber_view</em> (which uses the subscriber&#8217;s ID number instead of email address to look them up) call to verify that the list subscriptions and fields were updated properly &#8212; or you can view their subscriber details within the application&#8217;s administrative interface:</p>
<p><a href="http://www.activecampaign.com/blog/wp-content/uploads/2011/12/apiexample8.gif"><img class="alignnone size-full wp-image-3097" title="apiexample8" src="http://www.activecampaign.com/blog/wp-content/uploads/2011/12/apiexample8.gif" alt="" width="644" height="261" /></a></p>
<h2>Putting It All Together</h2>
<p>If you&#8217;d like to copy and paste the full source code used in this example, with comments included, please <a href="http://www.activecampaign.com/blog/wp-content/uploads/2011/12/update_subscriber_example.zip">click here to download the full example script</a>. (However, keep in mind that it is only a simple example &#8212; login details, subscriber information, and list and custom field ID numbers will need to be changed to suit your needs!) As always, if you have any questions or comments regarding our API, please do not hesitate to <a title="Contact Support" href="https://www.activecampaign.com/support/contact/" target="_blank">contact our support department</a>, and we would be happy to help!</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.activecampaign.com/blog/adding-or-updating-an-existing-subscriber-through-the-api/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Turn Off Automatic Overwrite for Subscriber Edit API</title>
		<link>http://www.activecampaign.com/blog/turn-off-automatic-overwrite-for-subscriber-edit-api/</link>
		<comments>http://www.activecampaign.com/blog/turn-off-automatic-overwrite-for-subscriber-edit-api/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 13:11:33 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Email Marketing]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.activecampaign.com/blog/?p=2713</guid>
		<description><![CDATA[We&#8217;ve improved our subscriber_edit API method to allow for updating only a portion of subscriber details, rather than supplying the entire subscriber record for each update. The default behavior of subscriber_edit remains the same &#8211; you must build the entire subscriber record each time you save any updates associated with that record. Here are example [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>We&#8217;ve improved our <a href="http://www.activecampaign.com/api/example.php?call=subscriber_edit">subscriber_edit</a> API method to allow for updating only a <em>portion</em> of subscriber details, rather than supplying the entire subscriber record for each update.</p>
<p>The <strong>default behavior</strong> of <code>subscriber_edit</code> remains the same &#8211; you must build the entire subscriber record each time you save any updates associated with that record. Here are example <code>POST</code> parameters that you could pass:</p>
<pre>
Array (
  'id' => 1,
  'email' => 'john@doe.com',
  'first_name' => 'John',
  'last_name' => 'Doe',
  'field' => Array (
    '2,4' => 'field value',
  ),
  'p' => Array (
    '3' => 3,
    '5' => 5,
  ),
  'status' => Array (
    '3' => 1,
    '5' => 1,
  ),
)
</pre>
<p>With potentially lots of lists and custom field values, this array becomes very large when you often only want to update a <strong>single value</strong> pertaining to the subscriber.</p>
<p>In these cases you can include the <code>overwrite</code> parameter in the API request URL. Set it to <code>0</code> to turn off automatic overwrite.</p>
<p>Here is an example API request URL for <code>subscriber_edit</code>:</p>
<pre>

http://mysite.com/admin/api.php

?api_user=admin
&#038;api_pass_h=098f6bjdsa87sadhsj4e832627b4f6
&#038;api_action=subscriber_edit
&#038;api_output=serialize
<span style="background: #ffc;">&#038;overwrite=0</span>
</pre>
<p>If you include the <code>overwrite</code> parameter, it can be value <code>1</code> or <code>0</code>. <i>Leaving it out</i> defaults to <code>1</code>.</p>
<p>Now here is your modified <code>POST</code> parameters:</p>
<pre>
Array (
  'id' => 1,
  'p' => Array (
    '6' => 6,
  ),
  'status' => Array (
    '6' => 1,
  ),
)
</pre>
<p>Here we are only <i>appending</i> this new list (ID 6) for the subscriber record, and <b>all other details are left alone</b> (if <code>overwrite=0</code>). Please keep in mind if you leave out some parameters that have dependencies (such as <code>p</code> and <code>status</code>), you might receive an error or have incomplete data being saved.</p>
<p>The only required parameter is <code>id</code>. Here are a list of dependencies:</p>
<ul>
<li><code>p</code> and <code>status</code> are dependent on each other.</li>
<li><code>first_name</code> requires either <code>p</code> or <code>first_name_list</code>.</li>
<li><code>last_name</code> required either <code>p</code> or <code>last_name_list</code>.</li>
</ul>
<p>Let us know if you have any problems with this new functionality!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.activecampaign.com/blog/turn-off-automatic-overwrite-for-subscriber-edit-api/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Customizing Your Server Based PHP Products</title>
		<link>http://www.activecampaign.com/blog/customizing-your-server-based-php-products/</link>
		<comments>http://www.activecampaign.com/blog/customizing-your-server-based-php-products/#comments</comments>
		<pubDate>Mon, 18 Apr 2011 15:50:04 +0000</pubDate>
		<dc:creator>Jason VandeBoom</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.activecampaign.com/blog/?p=2353</guid>
		<description><![CDATA[With our downloaded PHP/MySQL products we include the source code (minus our license checks) allowing you (or any third party programmer) to modify the software as needed.  Change features, add features, and more. We do not offer custom development services (as we must focus on product development) but you or any third part programmer can [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>With our downloaded PHP/MySQL products we include the source code (minus our license checks) allowing you (or any third party programmer) to modify the software as needed.  Change features, add features, and more.</p>
<p>We do not offer custom development services (as we must focus on product development) but you or any third part programmer can modify your downloaded product.</p>
<p>If you are not a programmer you can find a third party programmer that can make changes for you.</p>
<h2><strong>Where to find a programmer</strong></h2>
<ul>
<li><a href="http://www.kqzyfj.com/bg81ft1zt0GMJMILLMGIHOIMLQN" target="_blank">Find PHP Developers on oDesk</a><img src="http://www.tqlkg.com/sd70tkocig174736671329376B8" border="0" alt="" width="1" height="1" /></li>
<li><a href="http://www.dpbolvw.net/a2110p-85-7NTQTPSSTNPOVVVXQP" target="_blank">Find PHP Developers on Elance.</a><img src="http://www.tqlkg.com/mj70tkocig17473667132999B43" border="0" alt="" width="1" height="1" /></li>
</ul>
<h2><strong>What to look for</strong></h2>
<p>When posting a job add on oDesk or Elance pay attention to the following:</p>
<ul>
<li>Try to find people who know about or have experience with ActiveCampaign products</li>
<li>Check their past reviews to make sure they are reputable</li>
<li>Only entertain bids that are customized to your project (discard all the copy/paste bids you receive)</li>
<li>While the lowest price is tempting be sure to factor in quality and past reviews</li>
<li>Have very clear specifications of what needs to be done, how it should work, etc&#8230; Be very precise and detailed.  This will help avoid an end result that you do not like.</li>
</ul>
<h2><strong>When using our hosted services</strong></h2>
<p>With our hosted service we have features within the software to customize the look and feel along with powerful API&#8217;s for external integration.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.activecampaign.com/blog/customizing-your-server-based-php-products/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ActiveCampaign Single Sign-On</title>
		<link>http://www.activecampaign.com/blog/activecampaign-single-sign-on/</link>
		<comments>http://www.activecampaign.com/blog/activecampaign-single-sign-on/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 14:51:43 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.activecampaign.com/blog/?p=2083</guid>
		<description><![CDATA[Single sign-on (&#8220;SSO&#8221; for short) allows users to authenticate to multiple applications while providing their log-in credentials only once. With ActiveCampaign products, specifically Help Desk Hosted, you may wish to have users log-in to an external application, and have them automatically logged-in to Help Desk at the same time, while only providing their credentials once. [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><img src="https://www.activecampaign.com/support/tt/images/mthommes/20101230_2.jpg" /></p>
<p>Single sign-on (&#8220;SSO&#8221; for short) allows users to authenticate to multiple applications while providing their log-in credentials only once.</p>
<p>With ActiveCampaign products, specifically <a href="http://www.activecampaign.com/helpdesk/order.php?hosted=order">Help Desk Hosted</a>, you may wish to have users log-in to an external application, and have them automatically logged-in to Help Desk at the same time, while only providing their credentials once.</p>
<p>The user is unaware that they&#8217;ve simultaneously logged-in to multiple applications at once. The process is much more seamless, and does not require the user to re-enter their credentials.</p>
<h2>How it works</h2>
<p>There are two types of single sign-on: <b>same server</b> and <b>external server</b>.</p>
<p>&#8220;Same server&#8221; is for applications that are all residing on the same server. External is for applications on different servers. (All Help Desk hosted users must use &#8220;external server.&#8221;)</p>
<p>To illustrate how this works, consider a simple log-in form:</p>
<p><img src="https://www.activecampaign.com/support/tt/images/mthommes/20101230_1.jpg" /></p>
<p>This form could be on any site, and once the user logs in, an API call is issued to your Help Desk installation:</p>
<p><code>http://youraccount.activehosted.com/api.php</code></p>
<p>Replace <code>youraccount</code> with your actual Help Desk hosted account, or the entire domain with your custom URL. Include these parameters with the API call, along with their corresponding values:</p>
<table border="1" cellspacing="2" cellpadding="4" style="margin-bottom: 25px;">
<tr>
<th width="150">Parameter</th>
<th width="295">Value</th>
<th>Example</th>
</tr>
<tr>
<td><code>api_user</code></td>
<td><i>admin username</i></td>
<td><code>"admin"</code></td>
</tr>
<tr>
<td><code>api_pass_h</code></td>
<td><i>admin password</i></td>
<td><code>md5("test123")</code></td>
</tr>
<tr>
<td><code>api_output</code></td>
<td><code>"serialize"</code> OR <code>"xml"</code> OR <code>"json"</code></td>
<td></td>
</tr>
<tr>
<td><code>api_action</code></td>
<td><code>"singlesignon_sameserver"</code> OR <code>"singlesignon"</code><br />&#8230; depending on if the authenticating application is &#8220;same server&#8221; or &#8220;external server.&#8221;</td>
<td></td>
</tr>
<tr>
<td><code>sso_addr</code></td>
<td><i>Visitor&#8217;s IP address</i></td>
<td><code>"39.129.71.19"</code></td>
</tr>
<tr>
<td><code>sso_user</code></td>
<td><i>ActiveCampaign username</i></td>
<td><code>"joe"</code></td>
</tr>
<tr>
<td><code>sso_pass</code></td>
<td><i>ActiveCampaign password</i></td>
<td><code>md5("acjoe123")</code></td>
</tr>
<tr>
<td><code>sso_duration</code></td>
<td><i>Number of minutes the user can access the system</i></td>
<td><code>"30"</code></td>
</tr>
</table>
<p>With the API result, you can detect if the user was successfully logged-in by making sure <code>$result["result_code"]</code> is set to <code>1</code>.</p>
<p>When using <b>external server SSO</b> (all Help Desk hosted users), the result will look something like this (example provided as serialized):</p>
<pre>
Array (
    ...
    [token] => 7ed5jb6d44d6sc7ea413d2a599358m1b
    [result_code] => 1
    [result_message] => User Found.
    [result_output] => serialize
)
</pre>
<p>The &#8220;token&#8221; above can then be used to create the URL where the user can access the Help Desk software:</p>
<p><code>http://youraccount.activehosted.com/admin/</code></p>
<p><i>&#8230; continued:</i></p>
<p><code>main.php?_ssot=7ed5jb6d44d6sc7ea413d2a599358m1b</code></p>
<p>When accessing this URL, the user is automatically logged-in to the Help Desk software. <i>(Any subsequent pages they visit will <b>not</b> contain the &#8220;_ssot&#8221; parameter, and they should only have to log-in again if they end their session.)</i></p>
<p>When using <b>same server SSO</b>, the result will look something like this:</p>
<pre>
Array
(
    [id] => 1
    [absid] => 1
    [username] => admin
    [prfxs] => hd_|kb_
    [hash] => udb7130b740sf23b7fc0e8e7a8689d631
    [result_code] => 1
    [result_message] => User Logged In.
    [result_output] => serialize
)
</pre>
<p>In this case a cookie is set in the browser, so you don&#8217;t need to do anything &#8211; the user should be immediately logged in.</p>
<p>Please see <a href="https://www.activecampaign.com/support/tt/kb/article/email-marketing/version-50/integration/quick-guide-for-using-activecampaign-single-sign-on">our help doc</a> for more information, and let us know if anything is unclear.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.activecampaign.com/blog/activecampaign-single-sign-on/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To: Create your own external login source</title>
		<link>http://www.activecampaign.com/blog/how-to-create-your-own-external-login-source/</link>
		<comments>http://www.activecampaign.com/blog/how-to-create-your-own-external-login-source/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 17:26:05 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Product Updates]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[campaign]]></category>
		<category><![CDATA[Content]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[db]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[SupportTrio]]></category>

		<guid isPermaLink="false">http://www.activecampaign.com/blog/2009/03/03/how-to-create-your-own-external-login-source/</guid>
		<description><![CDATA[A while back we released a feature that allows certain ActiveCampaign products to authenticate users with an external login source. This feature is currently supported in KnowledgeBuilder 3.x and SupportTrio 2.x, and will soon be included in every ActiveCampaign product. I wanted to share how dead simple it is to get started creating a new [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://www.activecampaign.com/blog/2008/10/07/supporttrio-external-login-sources/">A while back</a> we released a feature that allows certain ActiveCampaign products to authenticate users with an external login source. This feature is currently supported in <strong>KnowledgeBuilder 3.x</strong> and <strong>SupportTrio 2.x</strong>, and will soon be included in <em>every</em> ActiveCampaign product.</p>
<p>I wanted to share how dead simple it is to get started creating a new login source using your own authentication system. We&#8217;ve included some of the more popular applications like Joomla, PHPBB3, and vBulletin, as default external login sources, which can be enabled at any time.<span id="more-286"></span></p>
<p>But you may have your own custom authentication system that you&#8217;d like to use. In order to do this, you&#8217;ll need familiarity with editing PHP files, as well as a programmatic understanding of how to use PHP to speak to your authentication system.</p>
<p>To get started, open up the <code>ac_global/loginsource/</code> directory contained within your KnowledgeBuilder 3.x or SupportTrio 2.x installation:</p>
<p><img src="http://support.activecampaign.com/bin/image_3783608.jpeg" /></p>
<p>You&#8217;ll see a number of individual .php files, each corresponding to a separate login source configuration. For this example, I&#8217;ve added the last file, <strong>zencart.php</strong>, as we will be creating an external login source for <a href="http://zencart.com/">Zen Cart</a>.</p>
<h2>Set up .php file</h2>
<p>Once you create the new .php file in this directory, edit the contents of the file with this:</p>
<pre>
&lt;?php

$loginident = "zencart";
$loginvars = "host,dbname,user,pass";

?&gt;</pre>
<p>Here we specify the name of our new external login source (the <code>$loginident</code> variable), as well as the settings you&#8217;d like to specify when setting up this login source (the <code>$loginvars</code> variable).</p>
<p>The <code>$loginident</code> variable will correspond with the name you see listed under the available login sources within the application:</p>
<p><img src="http://support.activecampaign.com/bin/image_6893453.jpeg" /></p>
<p>The <code>$loginvars</code> variable will correspond with the available <strong>fields</strong> that allow you to input specific information pertaining to this login source:</p>
<p><img src="http://support.activecampaign.com/bin/image_3117855.jpeg" /></p>
<p>Once you have included those two variables in the new .php file, you should be able to access the login source directly within the application:</p>
<p><img src="http://support.activecampaign.com/bin/image_8490429.jpeg" /></p>
<h2>Enable and further configure .php file</h2>
<p>Once you&#8217;ve saved your new login source settings, using the above application pages, you are ready to configure the .php file to speak to your authentication system.</p>
<p>The easiest way to set up the rest of the .php file is to copy an existing source. For example, if you open <strong>vbulletin.php</strong>, you&#8217;ll see the necessary functions that need to reside within the class:</p>
<pre>
class vBulletinLoginSource extends AC_LoginSource {
....
}</pre>
<p>Modify names to match your new login source. For example, <code>vBulletinLoginSource</code> would become <code>zencartLoginSource</code>.</p>
<p>Keep the five core functions in place:</p>
<p><img src="http://support.activecampaign.com/bin/image_7259881.jpeg" /></p>
<p>Modify these functions to extract and authenticate a given username/password combination. For more information on what each of these functions should return, please view our <a href="https://www.activecampaign.com/support/tt/index.php?article=490&amp;action=kb">detailed help documentation article</a>.</p>
<p>We can also set this up for you, if you provide us the database structure that houses your external user credentials, as well as any specific PHP authentication/validation functions.</p>
<h2>Testing out your new login source</h2>
<p>If you feel confident that you&#8217;ve modified the .php file correctly, the only thing left is to test it out!</p>
<p>Make sure you&#8217;ve <strong>enabled</strong> your new login source, set User Type to Public or Admin, and promote it to be the first login source the system tries to use for authentication:</p>
<p><img src="http://support.activecampaign.com/bin/image_6196894.jpeg" /></p>
<p>Then, log out of the application, and try logging in as a user from your external system. If everything is working, you should be able to log straight in to the application as normal!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.activecampaign.com/blog/how-to-create-your-own-external-login-source/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t Forget To Optimize MySQL</title>
		<link>http://www.activecampaign.com/blog/dont-forget-to-optimize-mysql/</link>
		<comments>http://www.activecampaign.com/blog/dont-forget-to-optimize-mysql/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 21:00:44 +0000</pubDate>
		<dc:creator>Jason VandeBoom</dc:creator>
				<category><![CDATA[Product Updates]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[db]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[optimize]]></category>
		<category><![CDATA[speed]]></category>

		<guid isPermaLink="false">http://www.activecampaign.com/blog/2008/12/16/dont-forget-to-optimize-mysql/</guid>
		<description><![CDATA[I often encounter situations where someone is dedicating their time to server specs yet overlooking some of the most basic optimization options available.  One of these basic optimization options include looking into your MySQL configuration and actually setting it to properly use the resources available on your server. All ActiveCampaign products utilize a MySQL database.  [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><img src="http://support.activecampaign.com/bin/image_3997111.jpeg" alt="" width="320" height="219" align="left" />I often encounter situations where someone is dedicating their time to server specs yet overlooking some of the most basic optimization options available.  One of these basic optimization options include looking into your MySQL configuration and actually setting it to properly use the resources available on your server.<span id="more-262"></span></p>
<p>All ActiveCampaign products utilize a MySQL database.  The database is a critical part of the application and your MySQL configuration can result in your software being lightning fast or can force limited speed upon your applications.</p>
<h2>Types of tables</h2>
<p>Before you start to optimize MySQL you will need to know the basics.  There are two types of tables we use for our applications.  <span><span class="articlecontents">MyISAM and </span></span><span><span class="articlecontents">InnoDB.  While the differences are important &#8211; we will focus on configuration for this article.  There are different configuration options for both types of tables.  Thus the configuration you set your MySQL to may depend on the product(s) you are using.  For example, if you are only using 1-2-All you would want to optimize MySQL for InnoDB and you do not need </span></span>to use as many resources for MyISAM.</p>
<p>Here is a list of table types for a couple of our products:</p>
<blockquote><p>Email Marketing &#8211; Mostly InnoDB &#8211; Some MyISAM</p>
<p>Survey Software -  MyISAM</p>
<p>Knowledge Management &#8211; Mostly MyISAM &#8211; Some InnoDB</p>
<p>Live Chat &#8211; Mostly InnoDB &#8211; Some MyISAM</p>
<p>Help Desk &#8211; Mostly MyISAM &#8211; Some InnoDB</p></blockquote>
<h2>What to edit</h2>
<p>For the basic MySQL configuration options you will want to edit the MySQL configuration file.  This file is called my.cnf or my.ini.</p>
<p>On a linux box you will usually find the file at: /etc/my.cnf</p>
<p>On a windows box you will usually find the file in your MySQL folder and the file name will be my.ini</p>
<h2>Specific Optimization Tips</h2>
<p>For MyISAM tables:</p>
<blockquote><p>bulk_insert_buffer_size=32M<br />
join_buffer_size=4M<br />
key_buffer_size=128M<br />
max_allowed_packet=32M<br />
query_cache_limit=4M<br />
read_buffer_size=1M<br />
read_rnd_buffer_size=2M<br />
sort_buffer_size=8M<br />
table_cache=128<br />
tmp_table_size=32M</p>
<p>These are modest values.  They can be doubled or more based on the amount of RAM on your server.</p></blockquote>
<p>For InnoDB tables:</p>
<blockquote><p>innodb_buffer_pool_size=1G<br />
innodb_flush_log_at_trx_commit=0</p></blockquote>
<p>The buffer size should be 25-50% of your server&#8217;s RAM, if not more. Intensive programs benefit a lot from extra RAM.</p>
<h2>Dig deeper</h2>
<p>The information provided here is only scratching the surface of what you can do with MySQL configuration options.  If you have a host or system administrator they should be able to assist with such configuration changes.  For additional reading you may want to view the <a href="http://www.mysqlperformanceblog.com/" target="_blank">MySQL Performance Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.activecampaign.com/blog/dont-forget-to-optimize-mysql/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Rethinking Cron Management&#8230;</title>
		<link>http://www.activecampaign.com/blog/rethinking-cron-management/</link>
		<comments>http://www.activecampaign.com/blog/rethinking-cron-management/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 22:57:53 +0000</pubDate>
		<dc:creator>Jason VandeBoom</dc:creator>
				<category><![CDATA[Product Updates]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Email Marketing]]></category>
		<category><![CDATA[help desk]]></category>
		<category><![CDATA[SupportTrio]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.activecampaign.com/blog/2008/12/12/rethinking-cron-management/</guid>
		<description><![CDATA[As we are developing the new versions of both Email Marketing and Help Desk we have put a great amount of detail into usability.  The term usability is often used to simply describe the user interface.  But, the term encompasses a much larger area of software development. A specific case in our recent development is [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><img src="http://support.activecampaign.com/bin/image_5084595.jpeg" alt="" width="320" height="219" align="left" />As we are developing the new versions of both Email Marketing and Help Desk we have put a great amount of detail into usability.  The term usability is often used to simply describe the user interface.  But, the term encompasses a much larger area of software development.<span id="more-259"></span></p>
<p>A specific case in our recent development is cron management.  A number of our applications require you to setup a cron job.  In some cases you may need to setup 3 or 4 cronjobs depending on the features you are using.This is something that can be a pain for our users.  Once you setup the application you should not have to do more work when you start using a feature or purchase an add-on.  Thus we are designing our new cron management feature.  Our new cron management feature serves 2 primary purposes:</p>
<ol>
<li>Ability to have a single cron &#8211; yet have different timed events.  This means that while you will only have one cron that you have to setup, our software can choose to execute different actions at different time intervals.</li>
<li>Improve the process of expanding your application and upgrading.  With this new feature in place you will not need to manually add any crons or events if you wish to use extra features, new add-ons, etc..</li>
</ol>
<p>Those 2 purposes are the primary objectives of this feature and a great example of improving usability.   This feature will debut in Email Marketing 5 and Help Desk 3.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.activecampaign.com/blog/rethinking-cron-management/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>PHP Source Code &amp; ActiveCampaign Products&#8230;</title>
		<link>http://www.activecampaign.com/blog/php-source-code-activecampaign-products/</link>
		<comments>http://www.activecampaign.com/blog/php-source-code-activecampaign-products/#comments</comments>
		<pubDate>Sun, 17 Aug 2008 23:18:33 +0000</pubDate>
		<dc:creator>Jason VandeBoom</dc:creator>
				<category><![CDATA[Product Updates]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[campaign]]></category>
		<category><![CDATA[encode]]></category>
		<category><![CDATA[licensing]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[unencoded]]></category>

		<guid isPermaLink="false">http://www.activecampaign.com/blog/2008/08/17/php-source-code-activecampaign-products/</guid>
		<description><![CDATA[There are some exciting changes occurring at ActiveCampaign. We have a number of new updates in the works, KnowledgeBuilder 3.0 is about to be released into beta testing, and we are making some changes in the way you are able to customize all ActiveCampaign products. The ability to customize ActiveCampaign products is of great concern [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>There are some exciting changes occurring at ActiveCampaign.  We have a number of new updates in the works, KnowledgeBuilder 3.0 is about to be released into beta testing, and we are making some changes in the way you are able to customize all ActiveCampaign products.</p>
<p>The ability to customize ActiveCampaign products is of great concern to us.  Customizing sections of the software can be crucial for the product to fit a specific use or direction.  Throughout the years we have increased options such as easy branding settings, smarty templates, central language files, a selection of unencoded files, and more.  And now&#8230;.</p>
<blockquote><p><strong>All future major updates of ActiveCampaign products will be 99% unencoded.</strong></p></blockquote>
<p>You will be able to modify each and every part of our product.  The less than 1% of files that will be encoded only takes care of installing, upgrading, and general licensing.  The need for Zend or Ioncube support will remain &#8211; but it will not hinder your customization efforts.</p>
<p>We hope this will assist our clients who need custom solutions and are excited to start releasing the major updates of all products with the new 99% unencoded format.</p>
<p><font color="#808080">P.S. The first product to be released 99% unencoded will be KnowledgeBuilder 3.0 </font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.activecampaign.com/blog/php-source-code-activecampaign-products/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to install Zend Optimizer</title>
		<link>http://www.activecampaign.com/blog/how-to-install-zend-optimizer/</link>
		<comments>http://www.activecampaign.com/blog/how-to-install-zend-optimizer/#comments</comments>
		<pubDate>Tue, 06 May 2008 14:12:20 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[archive]]></category>
		<category><![CDATA[campaign]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[encode]]></category>
		<category><![CDATA[Loaded]]></category>
		<category><![CDATA[optimize]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[support]]></category>

		<guid isPermaLink="false">http://www.activecampaign.com/blog/2008/05/06/how-to-install-zend-optimizer/</guid>
		<description><![CDATA[Update: 1 Reason Not To Install Zend Optimizer Since this article was published in May of 2008, ActiveCampaign has discontinued use of Zend Optimizer and Ioncube in favor of our own solutions to enhance the speed and security of our applications. Consequently, there is no longer any additional software that you need to install in [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><strong>Update: 1 Reason Not To Install Zend Optimizer</strong></p>
<p>Since this article was published in May of 2008, ActiveCampaign has discontinued use of Zend Optimizer and Ioncube in favor of our own solutions to enhance the speed and security of our applications. Consequently, there is no longer any additional software that you need to install in order to use our products, and you now have full access to the source code of all of our software.</p>
<p>We believe our software can help your business to succeed. We believe this so much that we want  to give you the opportunity to try it out for free for 30 days and make your own decision:</p>
<ul>
<li><a href="http://www.activecampaign.com/email-marketing/free.php">Click here for a free trial of Email Marketing</a></li>
<li><a href="http://www.activecampaign.com/survey-software/free.php">Click here for a free trial of Survey Software</a></li>
<li><a href="http://www.activecampaign.com/help-desk-software/free.php">Click here for a free trial of Help Desk</a></li>
<li><a href="http://www.activecampaign.com/knowledge-management/trial.php">Click here for a free trial of Knowledge Management</a></li>
<li><a href="http://www.activecampaign.com/live-chat/free.php">Click here for a free trial of Live Chat</a></li>
</ul>
<p><span id="more-210"></span><strong>Original Instructions for Installing Zend Optimizer on Your Web Server</strong></p>
<p>One of the ways that we increase the overall speed and security of our <a href="http://www.activecampaign.com/">web-based software</a> is by pre-compiling the PHP code. The tools that we use to do this are called Zend Optimizer and Ioncube. You actually only need one or the other in order to encode PHP scripts, and I&#8217;m not aware of any performance benefit that either one enjoys over the other. The only reason that we use both of these products is to provide maximum compatibility with all the different types of web hosts and servers that are out there. That&#8217;s why, when you visit the downloads page in our <a href="http://www.activecampaign.com/help-desk-software/">online help desk</a>, you&#8217;re always asked which version of the software you&#8217;d like to download: Zend or Ioncube.</p>
<p>Most people who don&#8217;t produce or use a lot of web-based software have never heard of either of these products and get a little flustered when confronted with the question of which they should download. If you&#8217;re using a shared web hosting account or have an in-house server admin running your web server, then you have a simple one-step solution: pick up the phone, call the admin, and ask which one you can use <img src='http://www.activecampaign.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If you&#8217;re running your own server, it&#8217;s still very simple. The first thing to do is to find out if your server can already run Ioncube scripts, since if it can there are no additional steps for you. The way to find this out is to:</p>
<ul>
<li>download our test script</li>
<li>unzip and upload it to your web directory</li>
<li>and then open it up in a web browser</li>
</ul>
<p>You&#8217;ll see something like this:</p>
<p align="center"><img src="http://support.activecampaign.com/bin/image_4059132.jpeg" alt="" width="640" height="232" /></p>
<p>As you can see, my own local test server is not able to run Ioncube-encoded scripts without additional setup, because I&#8217;m using the latest version of PHP, which has broken dynamic loading. That&#8217;s no big deal, because I went ahead and installed the free Zend Optimizer with just a couple of clicks, and now I&#8217;ll show you how to do the same.</p>
<p><strong>Download Zend Optimizer</strong></p>
<p>If you find this part challenging, you probably shouldn&#8217;t be trying to run your own web server!  <img src='http://www.activecampaign.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>What you need to do is to download the Zend Optimizer package onto your web server. You can get it from <a href="http://www.zend.com/en/products/guard/downloads">http://www.zend.com/en/products/guard/downloads</a>, where you&#8217;ll need to select the appropriate package for your server. So first select the radio button labeled &#8220;Zend Optimizer&#8221; (not the one labeled &#8220;Zend Guard,&#8221;) and then you&#8217;ll find that the dropdown box becomes populated with a list of server types that Zend Optimizer is available for. The chances are very good that the type of server you are using is supported by Zend Optimizer. Remember, folks, you&#8217;re installing this on your web server, not on your own local computer (unless your web site is served from your local machine), so you want to be doing all this from the server, and to select the option that corresponds to the operating system running on the web server.</p>
<p>Before you are allowed to download, you&#8217;ll have to register for an account on zend.com on the next page. Once you&#8217;ve downloaded the software, all that is left is to install it on the server. The instructions for doing this will vary depending on the type of server that you use. If it is a Windows IIS server, just double-click on the installer .exe file and follow the instructions that appear on the screen. On any other type of system, including Mac OS X and any Linux or Unix variant, you&#8217;ll find that the installation package is compressed, so you first need to extract it.</p>
<p><strong>On Linux or Unix servers</strong></p>
<ul>
<li>Open up a terminal window or get yourself out to the command line. You can decompress the package by entering the following at the command line prompt:
<ul>
<li>gunzip -c &lt;package name&gt; | tar xf -</li>
</ul>
</li>
<li>Then, from inside the installer package directory that is created when the package is unzipped, type:
<ul>
<li>./install.</li>
</ul>
</li>
<li>Now you&#8217;ll see a nice pretty graphical installation wizard that will walk you through setting up Zend Optimizer on your server.</li>
</ul>
<p><strong>On servers running Mac OS X</strong></p>
<p>Installation on a server running OS X is a little more complicated that you might like it to be, but is still very doable. The most complicated part is basically just that you have to use the command line, which many OS X users are not very familiar with. However, you can find a very good tutorial for going through this process here [link removed since the article disappeared!).</p>
<p><strong>Now put it to good use!</strong></p>
<p>Once you&#8217;ve got Zend Optimizer installed on your server, you should be able to run Zend-encoded PHP scripts right away. So now just grab a copy of the Zend version of whichever ActiveCampaign software product you&#8217;ve purchased, and follow the installation instructions in the docs/install.txt file (you can also find the instructions in our <a href="http://www.activecampaign.com/knowledge-management/">knowledge base</a>.)</p>
<p>If you run into any problems with the Zend Optimizer installation or if you get an error message saying that Zend Optimizer is not installed on your server, check the Zend website for troubleshooting tips.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.activecampaign.com/blog/how-to-install-zend-optimizer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Firefox 3</title>
		<link>http://www.activecampaign.com/blog/firefox-3/</link>
		<comments>http://www.activecampaign.com/blog/firefox-3/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 16:16:42 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[firefox firebug]]></category>

		<guid isPermaLink="false">http://www.activecampaign.com/blog/2008/04/03/firefox-3/</guid>
		<description><![CDATA[I&#8217;m experimenting a bit with Firefox 3, since the stable release should be out soon. There are still some issues: the bookmark manager, in particular, seems to get confused when I move bookmarks around, moving them to the wrong spot; even cloning separators rather than moving them. Stress-testing some AJAX didn&#8217;t work out so well, [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I&#8217;m experimenting a bit with <a href="http://developer.mozilla.org/devnews/index.php/2008/04/02/firefox-3-beta-5-now-available-for-download/">Firefox 3</a>, since the stable release should be out soon.  There are still some issues: the bookmark manager, in particular, seems to get confused when I move bookmarks around, moving them to the wrong spot; even cloning separators rather than moving them.  Stress-testing some AJAX didn&#8217;t work out so well, crashing overnight.</p>
<p>But one bright spot is its memory usage.  It&#8217;s much better than Firefox 2, and despite some of the present quirks in the 5th beta, I&#8217;m pretty happy with the program overall.  The Web Developer add-on has been updated for the latest beta, and <a href="http://getfirebug.com/">Firebug</a> (on its own site) has a beta version that&#8217;s compatible with Firefox 3, too.  (Firebug is indispensable, really, particularly when debugging AJAX.)</p>
<p>Now all that&#8217;s left is for my RSS reader to be updated.  Well, that, and of course the crashing should stop.  The crashing should always stop.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.activecampaign.com/blog/firefox-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

