
<?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>Arrow Concept</title>
	<atom:link href="http://arrowconcept.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://arrowconcept.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 10 Jan 2012 21:52:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>After reading the Steve Jobs biography</title>
		<link>http://arrowconcept.com/after-reading-the-steve-jobs-biography/</link>
		<comments>http://arrowconcept.com/after-reading-the-steve-jobs-biography/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 21:33:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://arrowconcept.com/?p=640</guid>
		<description><![CDATA[<a href="http://arrowconcept.com/after-reading-the-steve-jobs-biography/"><img class="alignnone size-full wp-image-643" title="jobs-house" src="http://arrowconcept.com/wp-content/uploads/2011/12/jobs-house.png" alt="" width="518" height="321" /></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-643" title="jobs-house" src="http://arrowconcept.com/wp-content/uploads/2011/12/jobs-house.png" alt="" width="518" height="321" /></p>
<p>Good intentions, just harsher way of getting things done. Great read though. It created such a favorable perception of Apple, I dunno if I can ever buy anything that is not Apple anymore. I&#8217;m left with the feeling that Apple is the only company that is innovating and everyone just copies from them.</p>
]]></content:encoded>
			<wfw:commentRss>http://arrowconcept.com/after-reading-the-steve-jobs-biography/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Troxler&#8217;s fading in CSS</title>
		<link>http://arrowconcept.com/troxlers-fading-in-css/</link>
		<comments>http://arrowconcept.com/troxlers-fading-in-css/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 17:56:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://arrowconcept.com/?p=610</guid>
		<description><![CDATA[<p>Found this on Reddit couple of days back and thought of getting some CSS practice. <strong>Webkit only though</strong>. Firefox works too without the animation, but you can still see the effect.</p>
<p><strong>Troxler&#8217;s fading</strong> or Troxler&#8217;s effect is a phenomenon of&#8230; <a href="http://arrowconcept.com/troxlers-fading-in-css/" class="read_more">more</a></p>]]></description>
			<content:encoded><![CDATA[<p>Found this on Reddit couple of days back and thought of getting some CSS practice. <strong>Webkit only though</strong>. Firefox works too without the animation, but you can still see the effect.</p>
<p><strong>Troxler&#8217;s fading</strong> or Troxler&#8217;s effect is a phenomenon of visual perception. When one fixates a particular point, after about 20 seconds or so, a stimulus away from the fixation point, in peripheral vision, will fade away and disappear. The effect is enhanced if the stimulus is small, is of low contrast or equiluminant, or is blurred. The effect is enhanced the further the stimulus is away from the fixation point. Source: <a href="http://en.wikipedia.org/wiki/Troxler's_fading">Wikipedia</a></p>
<p>Fixate on the +, after about 10-15 seconds the circles around it will fade away and you will see a green dot revolving around a circle. If you look away, you will see the below circle with green dots. Blinking is ok, but try not to for the best effect.</p>
<div style="background:#BFBFBF;width:420px;height:420px;position:relative;">
<p style="font-size:2em;position:absolute; top:180px;left:190px;font-weight:bold;">+</p>
<p class="troxlercircles circle1" style="top:30px;left:146px;-webkit-animation-delay: 0s;">
<p class="troxlercircles circle2" style="top:31px;left:232px;-webkit-animation-delay: 0.2s;">
<p class="troxlercircles circle3" style="top:76px;left:307px;-webkit-animation-delay: 0.4s;">
<p class="troxlercircles circle4" style="top:148px;left:349px;-webkit-animation-delay: 0.6s;">
<p class="troxlercircles circle5" style="top:233px;left:349px;-webkit-animation-delay: 0.8s;">
<p class="troxlercircles circle6" style="top:309px;left:307px;-webkit-animation-delay: 1s;">
<p class="troxlercircles circle7" style="top:352px;left:231px;-webkit-animation-delay: 1.2s;">
<p class="troxlercircles circle8" style="top:349px;left:147px;-webkit-animation-delay: 1.4s;">
<p class="troxlercircles circle9" style="top:309px;left:70px;-webkit-animation-delay: 1.6s;">
<p class="troxlercircles circle10" style="top:232px;left:30px;-webkit-animation-delay: 1.8s;">
<p class="troxlercircles circle11" style="top:148px;left:28px;-webkit-animation-delay: 2s;">
<p class="troxlercircles circle12" style="top:73px;left:73px;-webkit-animation-delay: 2.2s;">
</div>
]]></content:encoded>
			<wfw:commentRss>http://arrowconcept.com/troxlers-fading-in-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Browseup</title>
		<link>http://arrowconcept.com/browseup/</link>
		<comments>http://arrowconcept.com/browseup/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 16:51:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://arrowconcept.com/?p=571</guid>
		<description><![CDATA[After going through another round of frustrations with cross browser compatibility, I created this 'upgrade your browser' page. Come on people, browse up.

The design is inspired by the new Blue Screen of Death in Windows 8. <a title="Download Browseup from Github" href="http://ianand2.github.com/browseup">Download the code from Github</a>, you can also see a <a title="See demo of Browseup" href="http://ianand2.github.com/browseup/browseup.html">demo of the page here</a>. Switch the theme for a dark version.

<a href="http://arrowconcept.com/browseup"><img class="alignnone size-full wp-image-572" title="browseup" src="http://arrowconcept.com/wp-content/uploads/2011/11/browseup.png" alt="" width="521" style="border:1px solid #eee;" /></a>]]></description>
			<content:encoded><![CDATA[<p>After going through another round of frustrations with cross browser compatibility, I created this &#8216;upgrade your browser&#8217; page. Come on people, browse up.</p>
<p>The design is inspired by the new Blue Screen of Death in Windows 8. <a title="Download Browseup from Github" href="http://ianand2.github.com/browseup">Download the code from Github</a>, you can also see a <a title="See demo of Browseup" href="http://ianand2.github.com/browseup/browseup.html">demo of the page here</a>. Switch the theme for a dark version.</p>
<p><a href="http://ianand2.github.com/browseup/browseup.html"><img class="alignnone size-full wp-image-572" title="browseup" src="http://arrowconcept.com/wp-content/uploads/2011/11/browseup.png" alt="" width="521" style="border:1px solid #eee;" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://arrowconcept.com/browseup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prevent multiple registrations by same email in mura</title>
		<link>http://arrowconcept.com/prevent-multiple-registrations-by-same-email-in-mura/</link>
		<comments>http://arrowconcept.com/prevent-multiple-registrations-by-same-email-in-mura/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 17:35:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://arrowconcept.com/?p=580</guid>
		<description><![CDATA[<p>This was a request from one of the site visitors (my first request :)).</p>
<p>It was easy enough, the code is in the validate() method in userBean.cfc. You just need to add the highlighted lines in. Instead of modifying the&#8230; <a href="http://arrowconcept.com/prevent-multiple-registrations-by-same-email-in-mura/" class="read_more">more</a></p>]]></description>
			<content:encoded><![CDATA[<p>This was a request from one of the site visitors (my first request :)).</p>
<p>It was easy enough, the code is in the validate() method in userBean.cfc. You just need to add the highlighted lines in. Instead of modifying the core file, you can use method injection to inject the method, the process is similar to <a href="http://arrowconcept.com/send-account-activation-emails-to-users-on-sign-up-in-mura/">this post</a>. This way it won&#8217;t break when you update mura.</p>
<div style="display: none;">
<pre class="brush: coldfusion; title: ; notranslate">
</pre>
</div>
<pre class="brush: coldfusion, highlight: [24,25,26]">&lt;cffunction name="validate" access="public" output="false" &gt;
&lt;cfset var extErrors=structNew() /&gt;
&lt;cfif len(getSiteID())&gt;
&lt;cfset extErrors=variables.configBean.getClassExtensionManager().validateExtendedData(getAllValues())&gt;
&lt;/cfif&gt;
&lt;cfset variables.instance.errors=structnew() /&gt;
&lt;cfif not structIsEmpty(extErrors)&gt;
&lt;cfset structAppend(variables.instance.errors,extErrors)&gt;
&lt;/cfif&gt;
&lt;cfif trim(variables.instance.siteid) neq ""&gt;
&lt;cfif variables.instance.type eq 2 and (variables.instance.username eq "" or not checkUsername())&gt;
&lt;cfsetvariables.instance.errors.username=variables.settingsManager.getSite(getSiteID()).getRBFactory().getResourceBundle().messageFormat(variables.settingsManager.getSite(getSiteID()).getRBFactory().getKey("user.usernamevalidate") , getusername() ) /&gt;
&lt;/cfif&gt;
&lt;cfif variables.instance.type eq 2 and variables.instance.email eq ""&gt;
&lt;cfsetvariables.instance.errors.email=variables.settingsManager.getSite(getSiteID()).getRBFactory().getKey("user.emailrequired")/&gt;
&lt;/cfif&gt;
&lt;cfif variables.instance.type eq 2 and not checkEmail()&gt;
&lt;cfsetvariables.instance.errors.email=variables.settingsManager.getSite(getSiteID()).getRBFactory().getKey("user.emailalreadyinuse")/&gt;
&lt;/cfif&gt;
&lt;!--- If captcha data has been submitted validate it ---&gt;
&lt;cfif not (not len(variables.instance.hKey) or variables.instance.hKey eq hash(variables.instance.uKey))&gt;
&lt;cfsetvariables.instance.errors.SecurityCode=variables.settingsManager.getSite(getSiteID()).getRBFactory().getKey("captcha.error")/&gt;
&lt;/cfif&gt;
&lt;!--- If cfformprotect has been submitted validate it ---&gt;
&lt;cfif not variables.instance.passedProtect&gt;
&lt;cfsetvariables.instance.errors.Spam=variables.settingsManager.getSite(getSiteID()).getRBFactory().getKey("captcha.spam")/&gt;
&lt;/cfif&gt;
&lt;cfelse&gt;
&lt;cfset variables.instance.errors.siteid="The 'SiteID' variable is missing." /&gt;
&lt;/cfif&gt;
&lt;cfreturn this&gt;
&lt;/cffunction&gt;</pre>
<p>Add the &#8216;user.emailalreadyinuse&#8217; key in the properties files in <strong>resourcebundles</strong> folder in your theme. You can add a message like &#8216;This email is already in use&#8217; or of you want it to be more verbose, &#8216;This email already has an account, please go to the login page to login or if you have forgotten your password, reset it using the Forgot Password form on the login page.&#8217;</p>
<p>I did not have enough time to test it thoroughly, but it worked on the registration page and it did not seem to break anything else. Please test it out some more before deploying to production.</p>
]]></content:encoded>
			<wfw:commentRss>http://arrowconcept.com/prevent-multiple-registrations-by-same-email-in-mura/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building and hosting a free website</title>
		<link>http://arrowconcept.com/building-and-hosting-a-free-website/</link>
		<comments>http://arrowconcept.com/building-and-hosting-a-free-website/#comments</comments>
		<pubDate>Sat, 03 Sep 2011 20:26:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://arrowconcept.com/?p=530</guid>
		<description><![CDATA[<p>This is about a fun and very enlightening experience I had building the website for <a href="http://dcdiaperbank.org">DC Diaper Bank</a>, a non-profit organization that collects baby diapers for needy families in the Washington DC metro area.  The existing site was built&#8230; <a href="http://arrowconcept.com/building-and-hosting-a-free-website/" class="read_more">more</a></p>]]></description>
			<content:encoded><![CDATA[<p>This is about a fun and very enlightening experience I had building the website for <a href="http://dcdiaperbank.org">DC Diaper Bank</a>, a non-profit organization that collects baby diapers for needy families in the Washington DC metro area.  The existing site was built on Blogger and it was mapped to their domain. It worked pretty well and there were no hosting charges, etc but the site itself had a very dated look and it was like a static website with 7 pages. The new version of the site was to have a redesigned interface, accept donations, allow mailing list sign ups and have a photo gallery. It was a tall order, since all of them needed to be as affordable as possible. But as I started building it out, it was surprisingly very easy. Blogger has incredible theme customizing capability, you can remove all the references of Blogger if you want to. And most premium service providers have pretty generous free plans.</p>
<p>So here is how it breaks out</p>
<ol>
<li><a href="http://www.blogger.com">Blogger </a>to host the website and customize the heck out of the HTML and CSS</li>
<li><a href="http://picasaweb.google.com">Picasa</a> to host all the images</li>
<li><a href="http://www.dropbox.com/">Dropbox</a> to host javascript libraries which are not already on Google CDN</li>
<li><a href="http://mailchimp.com/">MailChimp</a> for the mailing list sign up box</li>
</ol>
<p>I needed Dropbox to host the <a href="http://www.shadowbox-js.com/">Shadowbox lightbox plugin</a>, just place the javascript file in the public folder and use the URL it gives. Mailchimp free plan allows 2000 members, non-profits get some more.<br />
<a href="http://dcdiaperbank.org">Take a look at the website here</a><br />
Its a complete website with mailing list sign ups, donations, a superb photo gallery with a very robust CMS hosted by  Google and its completely free. This is more than enough for the small business or a local restaurant, wonder how much they are charged out there.<br />
I know I&#8217;m sensationalizing a bit here since for any software project, most of the costs are for the requirements gathering, design and development, but the hosting costs and other services become significant over a period of time.</p>
]]></content:encoded>
			<wfw:commentRss>http://arrowconcept.com/building-and-hosting-a-free-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deer sighting</title>
		<link>http://arrowconcept.com/deer-sighting/</link>
		<comments>http://arrowconcept.com/deer-sighting/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 02:50:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Living]]></category>
		<category><![CDATA[Deers]]></category>
		<category><![CDATA[state park]]></category>

		<guid isPermaLink="false">http://arrowconcept.com/deer-sighting/</guid>
		<description><![CDATA[<a href="http://arrowconcept.com/deer-sighting/"><img class="alignnone size-full fltlt" src="http://arrowconcept.com/wp-content/uploads/2011/08/20110830-1046522.jpg" alt="" width="246" style="margin:0 0.4em;"  /></a>


<a href="http://arrowconcept.com/deer-sighting/"><img class="alignnone size-full fltlt" src="http://arrowconcept.com/wp-content/uploads/2011/08/20110830-1047112.jpg" alt="" width="246" style="margin:0 0.4em;" /></a>
]]></description>
			<content:encoded><![CDATA[<p>I wish I had a better camera.<br />
<a href="http://arrowconcept.com/wp-content/uploads/2011/08/20110830-104711.jpg"><img class="alignnone size-full" src="http://arrowconcept.com/wp-content/uploads/2011/08/20110830-104711.jpg" alt="20110830-104711.jpg" width="746" height="558" /></a></p>
<p><a href="http://arrowconcept.com/wp-content/uploads/2011/08/20110830-104652.jpg"><img class="alignnone size-full" src="http://arrowconcept.com/wp-content/uploads/2011/08/20110830-104652.jpg" alt="20110830-104652.jpg" width="746" height="558" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://arrowconcept.com/deer-sighting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This is how horror games should be done</title>
		<link>http://arrowconcept.com/this-is-how-horror-games-should-be-done/</link>
		<comments>http://arrowconcept.com/this-is-how-horror-games-should-be-done/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 03:19:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://arrowconcept.com/?p=504</guid>
		<description><![CDATA[<p><object width="560" height="345" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/zwGOWS2svas?version=3&#38;hl=en_US" /><param name="allowfullscreen" value="true" /><embed width="560" height="345" type="application/x-shockwave-flash" src="http://www.youtube.com/v/zwGOWS2svas?version=3&#38;hl=en_US" allowFullScreen="true" allowscriptaccess="always" allowfullscreen="true" /></object></p>
<p>&#160;</p>
]]></description>
			<content:encoded><![CDATA[<p><object width="560" height="345" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/zwGOWS2svas?version=3&amp;hl=en_US" /><param name="allowfullscreen" value="true" /><embed width="560" height="345" type="application/x-shockwave-flash" src="http://www.youtube.com/v/zwGOWS2svas?version=3&amp;hl=en_US" allowFullScreen="true" allowscriptaccess="always" allowfullscreen="true" /></object></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://arrowconcept.com/this-is-how-horror-games-should-be-done/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add user to a mailing list in the sign up form in Mura</title>
		<link>http://arrowconcept.com/add-user-to-a-mailing-list-in-the-sign-up-form-in-mura/</link>
		<comments>http://arrowconcept.com/add-user-to-a-mailing-list-in-the-sign-up-form-in-mura/#comments</comments>
		<pubDate>Sun, 19 Jun 2011 18:51:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[mailing list]]></category>
		<category><![CDATA[mura]]></category>
		<category><![CDATA[newsletters]]></category>

		<guid isPermaLink="false">http://arrowconcept.com/?p=346</guid>
		<description><![CDATA[<p>I&#8217;m not sure if this functionality is already in mura, but I couldn&#8217;t find anything after browsing the forums. All I found was ability to add to mailing list from a custom form with 2 hidden fields, mlid = {mailing&#8230; <a href="http://arrowconcept.com/add-user-to-a-mailing-list-in-the-sign-up-form-in-mura/" class="read_more">more</a></p>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not sure if this functionality is already in mura, but I couldn&#8217;t find anything after browsing the forums. All I found was ability to add to mailing list from a custom form with 2 hidden fields, mlid = {mailing list ID} and doaction = &#8216;subscribe&#8217;, but on the signup form, doaction already has a value &#8216;createprofile&#8217;.</p>
<p>There is an way to add a user to a group at sign up but nothing about mailing list, which is weird since it is a common feature on most sign up pages, a checkbox at the end saying &#8216;Sign up for our newsletter&#8217;.</p>
<p>So, anyway it doesn&#8217;t really matter, it was pretty easy to add that functionality anyway. It requires 2 edits,</p>
<p><strong>{theme_directory}/display_objects/dsp_edit_profile.cfm</strong></p>
<p>You can copy this file from {siteroot}/default/includes/ if it&#8217;s not there already.<br />
add this in the form where you want the checkbox to show up.</p>
<pre class="brush: coldfusion; title: ; notranslate">
&lt;cfif not session.mura.isLoggedIn&gt;
&lt;fieldset&gt;
  &lt;ul&gt;
        &lt;li&gt;
        &lt;div style=&quot;margin-top:20px;&quot;&gt;
        &lt;input type=&quot;checkbox&quot; id=&quot;signupnewsletter&quot; name=&quot;mlid&quot; value=&quot;334FA4F6-AC74-$#B2-9BB871B2438EED44&quot;/&gt;
        &lt;label for=&quot;signupnewsletter&quot; style=&quot;float:none;&quot;&gt;Sign up for our newsletter&lt;/label&gt;
        &lt;/div&gt;
        &lt;/li&gt;
  &lt;/ul&gt;
&lt;/fieldset&gt;
&lt;/cfif&gt;
</pre>
<p><strong>includes/eventHandler.cfc</strong></p>
<p>This code checks if the mlid input was checked, if it is, it creates a struct with data required for adding to the mailing list and submits it to the createmember method in the mailingListManager.</p>
<pre class="brush: coldfusion; title: ; notranslate">
&lt;cffunction name=&quot;onBeforeUserCreate&quot; output=&quot;true&quot;&gt;
  &lt;cfargument name=&quot;$&quot;&gt;

  &lt;cfset uu.userEmail = $.event(&quot;userBean&quot;).getemail()&gt;
  &lt;cfset uu.username = $.event(&quot;userBean&quot;).getusername()&gt;

    &lt;cfif $.event().valueExists(&quot;mlid&quot;)&gt;
      &lt;cfset maillistdata = structNew()&gt;
        &lt;cfset maillistdata.email = uu.userEmail&gt;
        &lt;cfset maillistdata.siteid = $.event('siteid')&gt;
        &lt;cfset maillistdata.mlid = $.event().getValue(&quot;mlid&quot;)&gt;
      &lt;cftry&gt;
    &lt;cfset $.getBean(&quot;mailingListManager&quot;).createMember(maillistdata)&gt;
        &lt;cfcatch type=&quot;any&quot;&gt;&lt;/cfcatch&gt;
        &lt;/cftry&gt;
    &lt;/cfif&gt;

&lt;/cffunction&gt;
</pre>
<p>If there is something already built in, I would love to know. Please let me know in the comments. I hope you find it useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://arrowconcept.com/add-user-to-a-mailing-list-in-the-sign-up-form-in-mura/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Send account activation emails to users on sign up in Mura</title>
		<link>http://arrowconcept.com/send-account-activation-emails-to-users-on-sign-up-in-mura/</link>
		<comments>http://arrowconcept.com/send-account-activation-emails-to-users-on-sign-up-in-mura/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 20:48:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://arrowconcept.com/?p=356</guid>
		<description><![CDATA[<p>This is a very simple way to send account activation emails and activate the user account once they click the link in their emails in mura. It uses encrypted usernames as the passphrase in the activation emails. You can set&#8230; <a href="http://arrowconcept.com/send-account-activation-emails-to-users-on-sign-up-in-mura/" class="read_more">more</a></p>]]></description>
			<content:encoded><![CDATA[<p>This is a very simple way to send account activation emails and activate the user account once they click the link in their emails in mura. It uses encrypted usernames as the passphrase in the activation emails. You can set this up in 5 min :) by following the instructions below</p>
<p>Look for this snippet in your <code>{theme folder}/display_objects/dsp_edit_profile.cfm</code>. You can copy this file from <code>{siteroot}/{siteid}/includes/</code> if it&#8217;s not there already.</p>
<pre class="brush: coldfusion">
 &lt;input name=&quot;inactive&quot; type=&quot;hidden&quot; value=&quot;1&quot; /&gt;
</pre>
<p>Make sure the value is 1</p>
<p>To send e-mails, edit the <code>{siteroot}/{siteid}/includes/eventHandler.cfc</code> and add this snippet of code.</p>
<p>set your own encryption key.</p>
<pre class="brush: coldfusion">

&lt;cffunction name=&quot;onApplicationLoad&quot; output=&quot;false&quot;&gt;
&lt;cfargument name=&quot;$&quot;&gt;
&lt;cfargument name=&quot;event&quot;&gt;

&lt;cfset application.encKey=&quot;as7gas6fgas6fga76sfg6gfw6gqfg6fgfwe6fgwe8fg6&quot;&gt;

&lt;/cffunction&gt;
</pre>
<p>Here, we send the activation email, I&#8217;m using cfusion_encrypt() because the encrypted output only contains alphanumeric characters. This avoids any issues with emails clients or browsers.</p>
<pre class="brush: coldfusion">

&lt;cffunction name=&quot;onBeforeUserCreate&quot; output=&quot;true&quot;&gt;
&lt;cfargument name=&quot;$&quot;&gt;

&lt;cfset uu.userEmail = $.event(&quot;userBean&quot;).getemail()&gt;
&lt;cfset uu.username = $.event(&quot;userBean&quot;).getusername()&gt;

&lt;cfmail to=&quot;#uu.userEmail#&quot;
from='#$.siteConfig().getmailserverusername()#'
subject=&quot;Activate Your Account on #$.siteConfig().getsite()#&quot;
server=&quot;#$.siteConfig().getmailserverip()#&quot;
username=&quot;#$.siteConfig().getmailserverusername()#&quot;
password=&quot;#$.siteConfig().getmailserverpassword()#&quot;
port=&quot;#$.siteConfig().getmailserversmtpport()#&quot;
replyto=&quot;#$.siteConfig().getmailserverusernameemail()#&quot;
failto=&quot;#$.siteConfig().getmailserverusernameemail()#&quot;
type=&quot;html&quot;&gt;

&lt;p&gt;Thank you for creating an account on #$.siteConfig().getsite()#. You need to confirm your email to activate your account&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://#$.siteConfig().getdomain()##$.createHREF(filename='accounts/verify')#?passphrase=#cfusion_encrypt(uu.username, application.encKey)#&quot;&gt;Click here&lt;/a&gt; to activate your account&lt;/p&gt;

&lt;p&gt;If you are not able to click directly, copy and paste the URL below:&lt;/p&gt;

&lt;p&gt;http://#$.siteConfig().getdomain()##$.createHREF(filename='accounts/verify')#?passphrase=#cfusion_encrypt(uu.username, application.encKey)#&lt;/p&gt;

&lt;p&gt;Thanks, &lt;br /&gt;
The ArrowConcept Team&lt;/p&gt;

&lt;/cfmail&gt;

&lt;/cffunction&gt;
</pre>
<p>OK. So, the email is sent, now we need to activate the account when they click on the link. In my activation email, I&#8217;m pointing them to accounts/verify. You can change it per your need and create that page in the mura admin. Assign it a separate template and in that template, add this code</p>
<pre class="brush: coldfusion">
&lt;cfparam name=&quot;url.passphrase&quot; default=&quot;&quot;&gt;
&lt;cfoutput&gt;
&lt;cfinclude template=&quot;inc/html_head.cfm&quot; /&gt;
&lt;body id=&quot;#$.getTopID()#&quot; class=&quot;oneCol depth#arrayLen($.event('crumbdata'))#&quot;&gt;
&lt;div class=&quot;container #$.createCSSid($.content('menuTitle'))#&quot;&gt;
&lt;cfinclude template=&quot;inc/header.cfm&quot; /&gt;
&lt;/div&gt;
&lt;div id=&quot;container&quot; class=&quot;#$.createCSSid($.content('menuTitle'))#&quot;&gt;
  &lt;div id=&quot;content&quot; class=&quot;clearfix&quot;&gt;
    &lt;div id=&quot;primary&quot; class=&quot;article&quot;&gt;
      #$.dspCrumbListLinks(&quot;crumbList&quot;,&quot;&amp;nbsp;&amp;raquo;&amp;nbsp;&quot;)#
            &lt;cfif len(url.passphrase)&gt;
                &lt;cftry&gt;
                  &lt;cfset uu.username = cfusion_decrypt(url.passphrase, application.encKey)&gt;
                &lt;cfcatch type=&quot;any&quot;&gt;
                &lt;/cfcatch&gt;
                &lt;/cftry&gt;

                &lt;cfif len(uu.username) and $.getBean(&quot;user&quot;).checkUsername(uu.username)&gt;
                    &lt;cfset uu.getUserBean=$.getBean(&quot;user&quot;).loadby(username=uu.username)&gt;
                    &lt;cfset uu.getUserBean.setInactive(0)&gt;
                    &lt;cfset uu.getUserBean.save()&gt;
                    #$.dspBody(body=$.content('body'),crumbList=0,showMetaImage=1)#
&lt;pre&gt;               &lt;cfelse&gt;
               &lt;cflocation url=&quot;/&quot; addtoken=&quot;no&quot;&gt;&lt;/pre&gt;
&lt;/cfif&gt;
 &lt;cfelse&gt;
 &lt;cflocation url=&quot;/&quot; addtoken=&quot;no&quot;&gt;
 &lt;/cfif&gt;
 &lt;/div&gt;
 &lt;/div&gt;
&lt;/div&gt;
&lt;cfinclude template=&quot;inc/footer.cfm&quot; /&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;/cfoutput&gt;​
</pre>
<p>That&#8217;s it, if the user is activated, it shows them the message you type in the body of the page. Any other scenario, it redirects to the home page.</p>
<p>Now there are a couple more things you can do to improve the usability of the accounts creation process. Change the create account confirmation message to say that they need to click the activation link in the email to be able to login. In our usability testing, most did not bother reading the message and kept trying to login but the application just gives a username and password do not match notification message. So, need to do one more change to show a message saying, your account is inactive, you need to click the activation link in your email to be able to login.</p>
<p>Back to the eventHandler.cfc file in your includes folder</p>
<pre class="brush: coldfusion, highlight: [23,24,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92, 103]">&lt;cffunction name="LoginWithEmailToo" output="false"&gt;
  &lt;cfargument name="username" type="string" required="true" default=""&gt;
  &lt;cfargument name="password" type="string" required="true" default=""&gt;
  &lt;cfargument name="siteid" type="string" required="false" default=""&gt;
  &lt;cfset var rolelist = "" /&gt;
  &lt;cfset var rsUser = "" /&gt;
  &lt;cfset var user = "" /&gt;
  &lt;cfset var group = "" /&gt;
  &lt;cfset var lastLogin = now() /&gt;
  &lt;cfset var pluginEvent = createObject("component","mura.event").init(arguments) /&gt;
  &lt;cfset var strikes = createObject("component","mura.user.userstrikes").init(arguments.username,variables.configBean) /&gt;

  &lt;cflogout&gt;
  &lt;cfparam name="session.blockLoginUntil" type="string" default="#strikes.blockedUntil()#" /&gt;

  &lt;cfif len(arguments.siteID)&gt;
    &lt;cfset variables.pluginManager.announceEvent('onSiteLogin',pluginEvent)/&gt;
  &lt;cfelse&gt;
    &lt;cfset variables.pluginManager.announceEvent('onGlobalLogin',pluginEvent)/&gt;
  &lt;/cfif&gt;
  &lt;cfquery datasource="#application.configBean.getDatasource()#" name="rsUser" username="#variables.configBean.getDBUsername()#" password="#variables.configBean.getDBPassword()#"&gt;
  SELECT * FROM tusers WHERE
  (username=&lt;cfqueryparam cfsqltype="cf_sql_varchar" value="#trim(arguments.username)#"&gt;
  OR email=&lt;cfqueryparam cfsqltype="cf_sql_varchar" value="#trim(arguments.username)#"&gt;)
  AND
  (
    password=&lt;cfqueryparam cfsqltype="cf_sql_varchar" value="#hash(trim(arguments.password))#"&gt;
    &lt;cfif not variables.configBean.getEncryptPasswords() and len(trim(arguments.password)) neq 32&gt;
    OR
    password=&lt;cfqueryparam cfsqltype="cf_sql_varchar" value="#trim(arguments.password)#"&gt;
    &lt;/cfif&gt;
  )
  AND Type = 2
  and inactive=0
  &lt;/cfquery&gt;

  &lt;cfif rsUser.RecordCount GREATER THAN 0
    and not strikes.isBlocked()&gt;

      &lt;cfif rsUser.isPublic and (arguments.siteid eq '' or variables.settingsManager.getSite(arguments.siteid).getPublicUserPoolID() neq rsUser.siteid)&gt;

        &lt;cfset strikes.addStrike()&gt;

        &lt;cfreturn false  &gt;
      &lt;/cfif&gt;

      &lt;cfset session.blockLoginUntil=""/&gt;

      &lt;cfset loginByQuery(rsUser)/&gt;
      &lt;cfset strikes.clear()&gt;
      &lt;cfif len(arguments.siteID)&gt;
        &lt;cfset variables.pluginManager.announceEvent('onSiteLoginSuccess',pluginEvent)/&gt;
      &lt;cfelse&gt;
        &lt;cfset variables.pluginManager.announceEvent('onGlobalLoginSuccess',pluginEvent)/&gt;
      &lt;/cfif&gt;

      &lt;cfreturn true /&gt;

  &lt;cfelse&gt;
    &lt;cfif not strikes.isBlocked()&gt;
      &lt;cfset strikes.addStrike()&gt;
    &lt;cfelse&gt;

      &lt;cfif len(arguments.siteID)&gt;
        &lt;cfset variables.pluginManager.announceEvent('onSiteLoginBlocked',pluginEvent)/&gt;
      &lt;cfelse&gt;
        &lt;cfset variables.pluginManager.announceEvent('onGlobalLoginBlocked',pluginEvent)/&gt;
      &lt;/cfif&gt;

      &lt;cfset session.blockLoginUntil=strikes.blockedUntil()/&gt;

    &lt;/cfif&gt;

        &lt;cfquery datasource="#application.configBean.getDatasource()#" name="rsUserInactive" username="#variables.configBean.getDBUsername()#" password="#variables.configBean.getDBPassword()#"&gt;
        SELECT * FROM tusers WHERE
        (username=&lt;cfqueryparam cfsqltype="cf_sql_varchar" value="#trim(arguments.username)#"&gt;
        OR email=&lt;cfqueryparam cfsqltype="cf_sql_varchar" value="#trim(arguments.username)#"&gt;)
        AND
        (
            password=&lt;cfqueryparam cfsqltype="cf_sql_varchar" value="#hash(trim(arguments.password))#"&gt;
            &lt;cfif not variables.configBean.getEncryptPasswords() and len(trim(arguments.password)) neq 32&gt;
            OR
            password=&lt;cfqueryparam cfsqltype="cf_sql_varchar" value="#trim(arguments.password)#"&gt;
            &lt;/cfif&gt;
        )
        AND Type = 2
        and inactive=1
        &lt;/cfquery&gt;

        &lt;cfif rsUserInactive.recordcount&gt;
            &lt;cfset session.logininactive = true&gt;
        &lt;/cfif&gt;

  &lt;/cfif&gt;

  &lt;cfreturn false /&gt;
&lt;/cffunction&gt;

&lt;cffunction name="onApplicationLoad" output="false"&gt;
    &lt;cfargument name="$"&gt;
    &lt;cfargument name="event"&gt;

    &lt;cfset $.getBean("userUtility").injectMethod("Login",LoginWithEmailToo)/&gt;

    &lt;cfset application.encKey="as7gas6fgas6fga76sfg6gfw6gqfg6fgfwe6fgwe8fg6"&gt;

&lt;/cffunction&gt;</pre>
<p>This includes code to use email address along with username to login. The first highlighted block does that. You can copy it if you want that feature. For what we are doing now, you need the bottom 2 highlighted code blocks.</p>
<p>And in the {themefolder}/display_objects/dsp_login.cfm, replace this block of text at the top</p>
<pre class="brush: coldfusion, highlight: [6,7,8,9,10,11]">&lt;cfif request.status eq 'failed'&gt;
 &lt;cfif isDate(session.blockLoginUntil) and session.blockLoginUntil gt now()&gt;
 &lt;cfset request.isBlocked=true /&gt;
 &lt;p id="loginMsg" class="error"&gt;#variables.rbFactory.getKey('user.loginblocked')#&lt;/p&gt;
 &lt;cfelse&gt;
 &lt;cfif isDefined("session.logininactive")&gt;
 &lt;p id="loginMsg" class="error"&gt;#variables.rbFactory.getKey('user.logininactive')#&lt;/p&gt;
 &lt;cfset structDelete(session, "logininactive")&gt;
 &lt;cfelse&gt;
 &lt;p id="loginMsg" class="error"&gt;#variables.rbFactory.getKey('user.loginfailed')#&lt;/p&gt;
 &lt;/cfif&gt;

 &lt;/cfif&gt;
 &lt;/cfif&gt;</pre>
<p>Phew! Add the &#8216;user.logininactive&#8217; key in the properties file in resourcebundles folder in your theme. And you&#8217;re done.</p>
<p>Obviously there are better ways to do this, plugin would be ideal, with the passphrase generated randomly and stored in a column in the database which is more secure, but this is quite secure in itself and you can make it harder to crack by using email or join date along with the username during encryption and encrypting multiple times.</p>
<p>So, there you go, a simple way to add account activation emails in mura</p>
]]></content:encoded>
			<wfw:commentRss>http://arrowconcept.com/send-account-activation-emails-to-users-on-sign-up-in-mura/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Login with email address in Mura</title>
		<link>http://arrowconcept.com/login-with-email-address-in-mura/</link>
		<comments>http://arrowconcept.com/login-with-email-address-in-mura/#comments</comments>
		<pubDate>Tue, 17 May 2011 19:31:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[mura]]></category>

		<guid isPermaLink="false">http://arrowconcept.com/?p=272</guid>
		<description><![CDATA[<p>This seems to be a highly requested feature, to allow logins with Email instead of username. The solution, I found is quite simple. The login method is in /requirements/mura/user/userUtility.cfc. Need to override that to check the email column as well.&#8230; <a href="http://arrowconcept.com/login-with-email-address-in-mura/" class="read_more">more</a></p>]]></description>
			<content:encoded><![CDATA[<p>This seems to be a highly requested feature, to allow logins with Email instead of username. The solution, I found is quite simple. The login method is in /requirements/mura/user/userUtility.cfc. Need to override that to check the email column as well. Using Mura&#8217;s Method Injection, this is super simple. In your local event handler, add this code. This method allows login with either email or username. You can change the query to just Email too if thats what you want. Look at the highlighted portion, thats the change. Remember to reload the application from the admin for the change to take effect.</p>
<pre class="brush:coldfusion; highlight:[23,24]">&lt;cffunction name="LoginWithEmailToo" output="false"&gt;
  &lt;cfargument name="username" type="string" required="true" default=""&gt;
  &lt;cfargument name="password" type="string" required="true" default=""&gt;
  &lt;cfargument name="siteid" type="string" required="false" default=""&gt;
  &lt;cfset var rolelist = "" /&gt;
  &lt;cfset var rsUser = "" /&gt;
  &lt;cfset var user = "" /&gt;
  &lt;cfset var group = "" /&gt;
  &lt;cfset var lastLogin = now() /&gt;
  &lt;cfset var pluginEvent = createObject("component","mura.event").init(arguments) /&gt;
  &lt;cfset var strikes = createObject("component","mura.user.userstrikes").init(arguments.username,variables.configBean) /&gt;

  &lt;cflogout&gt;
  &lt;cfparam name="session.blockLoginUntil" type="string" default="#strikes.blockedUntil()#" /&gt;

  &lt;cfif len(arguments.siteID)&gt;
    &lt;cfset variables.pluginManager.announceEvent('onSiteLogin',pluginEvent)/&gt;
  &lt;cfelse&gt;
    &lt;cfset variables.pluginManager.announceEvent('onGlobalLogin',pluginEvent)/&gt;
  &lt;/cfif&gt;
  &lt;cfquery datasource="#application.configBean.getDatasource()#" name="rsUser" username="#variables.configBean.getDBUsername()#" password="#variables.configBean.getDBPassword()#"&gt;
  SELECT * FROM tusers WHERE
  (username=&lt;cfqueryparam cfsqltype="cf_sql_varchar" value="#trim(arguments.username)#"&gt;
  OR email=&lt;cfqueryparam cfsqltype="cf_sql_varchar" value="#trim(arguments.username)#"&gt;)
  AND
  (
    password=&lt;cfqueryparam cfsqltype="cf_sql_varchar" value="#hash(trim(arguments.password))#"&gt;
    &lt;cfif not variables.configBean.getEncryptPasswords() and len(trim(arguments.password)) neq 32&gt;
    OR
    password=&lt;cfqueryparam cfsqltype="cf_sql_varchar" value="#trim(arguments.password)#"&gt;
    &lt;/cfif&gt;
  )
  AND Type = 2
  and inactive=0
  &lt;/cfquery&gt;

  &lt;cfif rsUser.RecordCount GREATER THAN 0
    and not strikes.isBlocked()&gt;

      &lt;cfif rsUser.isPublic and (arguments.siteid eq '' or variables.settingsManager.getSite(arguments.siteid).getPublicUserPoolID() neq rsUser.siteid)&gt;

        &lt;cfset strikes.addStrike()&gt;

        &lt;cfreturn false  &gt;
      &lt;/cfif&gt;

      &lt;cfset session.blockLoginUntil=""/&gt;

      &lt;cfset loginByQuery(rsUser)/&gt;
      &lt;cfset strikes.clear()&gt;
      &lt;cfif len(arguments.siteID)&gt;
        &lt;cfset variables.pluginManager.announceEvent('onSiteLoginSuccess',pluginEvent)/&gt;
      &lt;cfelse&gt;
        &lt;cfset variables.pluginManager.announceEvent('onGlobalLoginSuccess',pluginEvent)/&gt;
      &lt;/cfif&gt;

      &lt;cfreturn true /&gt;

  &lt;cfelse&gt;
    &lt;cfif not strikes.isBlocked()&gt;
      &lt;cfset strikes.addStrike()&gt;
    &lt;cfelse&gt;

      &lt;cfif len(arguments.siteID)&gt;
        &lt;cfset variables.pluginManager.announceEvent('onSiteLoginBlocked',pluginEvent)/&gt;
      &lt;cfelse&gt;
        &lt;cfset variables.pluginManager.announceEvent('onGlobalLoginBlocked',pluginEvent)/&gt;
      &lt;/cfif&gt;

      &lt;cfset session.blockLoginUntil=strikes.blockedUntil()/&gt;

    &lt;/cfif&gt;

  &lt;/cfif&gt;

  &lt;cfreturn false /&gt;
&lt;/cffunction&gt;

&lt;cffunction name="onApplicationLoad" output="false"&gt;
    &lt;cfargument name="$"&gt;

    &lt;cfset $.getBean("userUtility").injectMethod("Login",LoginWithEmailToo)/&gt;

&lt;/cffunction&gt;</pre>
<p>Once this is done, you will want to update your label and the required field message. Open up includes/resourceBundles folder in your site directory. Copy the language file you are currently using (Hint: en.properties is for English) into the resourceBundles folder in your theme directory. At the end of the file, add two new values, user.loginusername and user.loginusernamerequired. Copy the displayobjects/dsp_login.cfm file to your themes display_objects folder and change the label and the required message rbfactory values for the Username to the ones we just created. And you&#8217;re done :)</p>
<pre class="brush: coldfusion; title: ; notranslate">
user.username=Username or Email
user.usernamerequired=Please enter your 'Username' or 'Email Address'.
</pre>
]]></content:encoded>
			<wfw:commentRss>http://arrowconcept.com/login-with-email-address-in-mura/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

