<?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>Point47</title>
	<atom:link href="http://point47.com/journal/feed/" rel="self" type="application/rss+xml" />
	<link>http://point47.com/journal</link>
	<description>less talk more code</description>
	<lastBuildDate>Tue, 08 May 2012 10:53:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Add jQuery Datepicker to a dynamic inserted input field via AJAX</title>
		<link>http://point47.com/journal/2012/03/add-jquery-datepicker-to-a-dynamic-inserted-input-field-via-ajax/</link>
		<comments>http://point47.com/journal/2012/03/add-jquery-datepicker-to-a-dynamic-inserted-input-field-via-ajax/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 11:58:28 +0000</pubDate>
		<dc:creator>Sorin</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://point47.com/journal/?p=203</guid>
		<description><![CDATA[Problem: You need to dynamically insert input fields in the DOM and attach to them the Datepicker component from jQuery UI. HTML PHP jQuery Pitfall: your input field must not have an id attribute or it must be unique. Preferable &#8230; <a href="http://point47.com/journal/2012/03/add-jquery-datepicker-to-a-dynamic-inserted-input-field-via-ajax/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Problem: You need to <strong>dynamically insert input fields in the DOM</strong> and attach to them the <a href="http://jqueryui.com/demos/datepicker/" title="Datepicker" target="_blank">Datepicker</a> component from <a href="http://jqueryui.com/" title="jQuery UI" target="_blank">jQuery UI</a>.<br />
<span id="more-203"></span></p>
<h3>HTML</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;inputs_wrapper&quot;&gt;&lt;/div&gt;
&lt;a href=&quot;#&quot; id=&quot;addNewInput&quot;&gt;Add a new input and attach a Datepicker component&lt;/a&gt;
</pre>
<h3>PHP</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php
echo '&lt;input type=&quot;text&quot; name=&quot;date&quot; class=&quot;datepicker&quot;&gt;';
?&gt;
</pre>
<h3>jQuery</h3>
<pre class="brush: jscript; title: ; notranslate">
// listen for click action
$('#addNewInput').click(function(e){
       e.preventDefault(); // blocks default link behavior (if it's a link element)

       // get the HTML with a AJAX request
       $.get(&quot;http://point47.com/examples/dynamicdatepicker/inputhtml.php&quot;, function(data){
            // adds the content in the #inputs_wrapper container and attaches the datepicker for each input found
            // also removes the class &quot;datepicker&quot; so we don't attach it again on the same inputs
            $('#inputs_wrapper').append(data).find('.datepicker').removeClass('datepicker').datepicker();
       });
   });
</pre>
<p><strong>Pitfall:</strong> your input field must not have an id attribute or it must be unique. Preferable don&#8217;t add an id attribute.</p>
]]></content:encoded>
			<wfw:commentRss>http://point47.com/journal/2012/03/add-jquery-datepicker-to-a-dynamic-inserted-input-field-via-ajax/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Custom Easy to use jQuery Modal Box</title>
		<link>http://point47.com/journal/2012/03/custom-easy-to-use-jquery-modal-box/</link>
		<comments>http://point47.com/journal/2012/03/custom-easy-to-use-jquery-modal-box/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 11:56:51 +0000</pubDate>
		<dc:creator>Sorin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://point47.com/journal/?p=181</guid>
		<description><![CDATA[A clean modal box that uses jQuery. HTML CSS JavaScript jQuery Plugin Position center plugin]]></description>
			<content:encoded><![CDATA[<p>A clean modal box that uses jQuery.</p>
<p><strong>HTML</strong></p>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;modal_wrapper&quot;&gt;
content for modal here
&lt;/div&gt;
</pre>
<p><span id="more-181"></span><br />
<strong>CSS</strong></p>
<pre class="brush: css; title: ; notranslate">
#feedback_modal{
display: none;
position: absolute;
width: 610px;
background: #000000;
color:#FFFFFF;
z-index: 100;}
</pre>
<p><strong>JavaScript</strong></p>
<pre class="brush: jscript; title: ; notranslate">
$('#feedback_modal').customModal({show : true});
</pre>
<p><strong>jQuery Plugin</strong></p>
<pre class="brush: jscript; title: ; notranslate">
$(document).ready(function(){
      (function($){

        $.customModal= {
            options: {
              show              : true,  // set it to false to hide the modal
              centerOnScroll    : true   // center modal when scrolling the page
            },
            elements: []
        };

        $.fn.customModal= function(options){

            options = $.extend($.customModal.options, options);

            return this.each(function(index) {
                if (index == 0) {
                    var $this = $(this);

                    if(options.show === true)
                    {

                        // center on modal activation
                        $this.show().positionCenter();    

                        // center modal on page scroll
                        if(options.centerOnScroll === true)
                        {
                            $(window).bind('scroll', function () {
                               $this.positionCenter();
                            });
                        }

                        /** -----------------------------
                         *  show and create modal background
                        -----------------------------  */
                        $this.before('&lt;div id=&quot;modalBackground&quot;&gt;&lt;/div&gt;');

                        var modalHeight = $(document).height();

                        $('#modalBackground').height( modalHeight ).css({
                            'position'      : 'absolute',
                            'z-index'       : '1100',
                            'width'         : '100%',
                            'top'           : '0',
                            'left'          : '0',
                            'background'    : '#000',
                            'opacity'       : 0.7
                        });
                    }
                    else
                    {
                        // hide modal
                        $this.hide();

                        // remove modal background
                        $('#modalBackground').remove();

                        if(options.centerOnScroll === true)
                        {
                            $(window).unbind('scroll');
                        }
                    }

                }
            });

        };
    })(jQuery);

});
</pre>
<p><strong>Position center plugin</strong></p>
<pre class="brush: jscript; title: ; notranslate">
$(document).ready(function(){

    /**
    * PositionCenter Plugin
    *
    * center an element on the page viewport
    */
    (function($){
        $.fn.positionCenter = function(options){
            var pos = {
              sTop : function() {
                return window.pageYOffset || document.documentElement &amp;&amp; document.documentElement.scrollTop ||    document.body.scrollTop;
              },
              wHeight : function() {
                return window.innerHeight || document.documentElement &amp;&amp; document.documentElement.clientHeight || document.body.clientHeight;
              }
            };

            return this.each(function(index) {
                if (index == 0) {

                    var $this = $(this);
                    var elHeight = $this.outerHeight();
                    var elTop = pos.sTop() + (pos.wHeight() / 2) - (elHeight / 2);

                    $this.css({
                      position: 'absolute',
                      margin: '0',
                      top: elTop,
                      left: (($(window).width() - $this.outerWidth()) / 2) + 'px'

                    });

                }
            });

        };
    })(jQuery);

});
</pre>
]]></content:encoded>
			<wfw:commentRss>http://point47.com/journal/2012/03/custom-easy-to-use-jquery-modal-box/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DBAL and UTF-8 encoding problem</title>
		<link>http://point47.com/journal/2011/08/dbal-and-utf-8-encoding-problem/</link>
		<comments>http://point47.com/journal/2011/08/dbal-and-utf-8-encoding-problem/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 14:42:57 +0000</pubDate>
		<dc:creator>Sorin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://point47.com/journal/?p=198</guid>
		<description><![CDATA[If you are using Doctrine DBAL to connect to your database you will notice that even if you are using UTF-8 encoding in your database tables the special characters are still not rendered correctly. This is because by default the &#8230; <a href="http://point47.com/journal/2011/08/dbal-and-utf-8-encoding-problem/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you are using <a href="http://www.doctrine-project.org/projects/dbal" title="Doctrine DBAL" target="_blank">Doctrine DBAL</a> to connect to your database you will notice that even if you are using UTF-8 encoding in your database tables the special characters are still not rendered correctly.<br />
<span id="more-198"></span><br />
This is because by default the connection opened by DBAL is not UTF-8. </p>
<p>You will also notice that the documentation on setting connection charset (or other options) doesn&#8217;t exists for the DBAL package. Actually there is some but just to be something there.</p>
<p>So&#8230;</p>
<p>Create your connection:</p>
<pre class="brush: php; title: ; notranslate">
$connectionParams = array(
..
);
$dbh = Doctrine\DBAL\DriverManager::getConnection($connectionParams, null);
</pre>
<p>And after you create the conexion add this: </p>
<pre class="brush: php; title: ; notranslate">
$dbh-&gt;query('set names &quot;utf8&quot;');
$dbh-&gt;query('set character_set_server=&quot;utf8&quot;');
$dbh-&gt;query('set collation_connection=&quot;utf8_general_ci&quot;');
</pre>
<p>That&#8217;s it.</p>
]]></content:encoded>
			<wfw:commentRss>http://point47.com/journal/2011/08/dbal-and-utf-8-encoding-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TurtoiseHG windows 64bit shell extension doesn&#8217;t show in Total Commander</title>
		<link>http://point47.com/journal/2010/12/turtoisehg-windows-64bit-shell-extension-doesnt-show-in-total-commander/</link>
		<comments>http://point47.com/journal/2010/12/turtoisehg-windows-64bit-shell-extension-doesnt-show-in-total-commander/#comments</comments>
		<pubDate>Thu, 30 Dec 2010 08:10:56 +0000</pubDate>
		<dc:creator>Sorin</dc:creator>
				<category><![CDATA[Bulk]]></category>

		<guid isPermaLink="false">http://point47.com/journal/?p=164</guid>
		<description><![CDATA[In the 64bit version of Windows you have to be sure when you install TourtoiseHG that you ALSO install the 32bit version. TotalCommander is 32bit so it won&#8217;t load the 64bit shell version.]]></description>
			<content:encoded><![CDATA[<p>In the 64bit version of Windows you have to be sure when you install TourtoiseHG that you ALSO install the 32bit version.<br />
TotalCommander is 32bit so it won&#8217;t load the 64bit shell version.</p>
]]></content:encoded>
			<wfw:commentRss>http://point47.com/journal/2010/12/turtoisehg-windows-64bit-shell-extension-doesnt-show-in-total-commander/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quickly build a jQuery dropdown menu</title>
		<link>http://point47.com/journal/2010/07/quickly-build-a-jquery-dropdown-menu/</link>
		<comments>http://point47.com/journal/2010/07/quickly-build-a-jquery-dropdown-menu/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 19:09:31 +0000</pubDate>
		<dc:creator>Sorin</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://point47.com/journal/?p=145</guid>
		<description><![CDATA[Let&#8217;s dive directly in: jQuery HTML CSS Full demo here: jQuery Drop Down Menu Enjoy!]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s dive directly in:</p>
<p><strong>jQuery</strong></p>
<pre class="brush: jscript; title: ; notranslate">
$(document).ready(function(){

    $('#navigation li').hover( function()
    {
        $(this).children('ul').not(':animated').slideDown('#navigation li ul');
    }, function()
    {
        $(this).children('ul').slideUp('#navigation li ul');
    });

});
</pre>
<p><span id="more-145"></span></p>
<p><strong>HTML</strong></p>
<pre class="brush: xml; title: ; notranslate">
&lt;ul id=&quot;navigation&quot;&gt;
        &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#&quot;&gt;About&lt;/a&gt;

            &lt;ul&gt;
                &lt;li&gt;&lt;a href=&quot;#&quot;&gt;About us&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href=&quot;#&quot;&gt;More info about&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Even more info&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;

        &lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Services&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;

    &lt;/ul&gt;
</pre>
<p>CSS</p>
<pre class="brush: css; title: ; notranslate">
#navigation {position: relative;float: left;display: inline;}
#navigation li {position: relative;float: left;display: inline;}
#navigation li a {float: left;display: inline;text-decoration: none;color: blue;padding: 4px 10px 4px 10px;}

#navigation li ul {position: absolute;top: 26px;left: 0px;margin: 0;padding: 0;background: #cccccc;display: none;width: 180px;}
#navigation li ul li {float: left;width: 100%;margin: 0;padding: 0;border-bottom: 1px dotted #959595;   }
#navigation li ul li  a {float: left;width: 100%}
</pre>
<p>Full demo here: <a href="http://point47.com/journal/demo/jquery_drop_down.html" target="_blank">jQuery Drop Down Menu</a></p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://point47.com/journal/2010/07/quickly-build-a-jquery-dropdown-menu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Post data from Actionscript 3 to PHP</title>
		<link>http://point47.com/journal/2010/06/post-data-from-actionscript-3-to-php/</link>
		<comments>http://point47.com/journal/2010/06/post-data-from-actionscript-3-to-php/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 09:39:39 +0000</pubDate>
		<dc:creator>Sorin</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://point47.com/journal/?p=123</guid>
		<description><![CDATA[If you need to send some data to a PHP script and don&#8217;t want to use services like Zend_AMF you can try posting that data directly to the PHP script. With the code bellow I&#8217;ll actually send an email. // &#8230; <a href="http://point47.com/journal/2010/06/post-data-from-actionscript-3-to-php/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you need to send some data to a PHP script and don&#8217;t want to use services like <a href="http://framework.zend.com/download/amf" target="_blank">Zend_AMF</a> you can try posting that data directly to the PHP script.<br />
With the code bellow I&#8217;ll actually send an email.<br />
<span id="more-123"></span><br />
// ActionScript 3 Code<br />
// PostToPHP.as<br />
[actionscript]<br />
package<br />
{<br />
        import flash.events.Event;<br />
	import flash.events.HTTPStatusEvent;<br />
        import flash.net.URLLoader;<br />
	import flash.net.URLLoaderDataFormat;<br />
	import flash.net.URLRequest;<br />
	import flash.net.URLRequestMethod;<br />
	import flash.net.URLVariables;</p>
<p>    public class PostToPHP<br />
    {<br />
        // url to post<br />
        private var postToURL:String = &#8220;http://www.yourdomain.tld/post_receiver.php&#8221;;</p>
<p>        public function PostToPHP()<br />
        {<br />
            // create request<br />
            var request:URLRequest = new URLRequest( postToURL );</p>
<p>	    // set post variables<br />
            var requestVars:URLVariables = new URLVariables();<br />
            requestVars.emailTo 	 = &#8216;email.address@mailservice.tld&#8217;;<br />
            requestVars.subject 	 = &#8216;This is a test email&#8217;;<br />
            requestVars.message = &#8216;An this is the content of the message.&#8217;;</p>
<p>            // assign variables to the request and set request method type<br />
            request.data     = requestVars;<br />
            request.method = URLRequestMethod.POST;</p>
<p>            // load the request and listen for a response from the PHP script<br />
            var urlLoader:URLLoader = new URLLoader();<br />
            urlLoader.dataFormat = &#8220;text&#8221;;<br />
            urlLoader.addEventListener(Event.COMPLETE, urlLoader_handler, false, 0, true);<br />
            urlLoader.load(request);<br />
    }</p>
<p>    private function urlLoader_handler(e:Object):void<br />
    {<br />
           // the response given from the PHP script will be traced here<br />
	   trace(e.target.data);<br />
    }<br />
[/actionscript]</p>
<p>// PHP code<br />
// post_receiver.php</p>
<pre class="brush: php; title: ; notranslate">
// assign POST variables and clean them
// filter_var() is available from PHP 5.2.0
$emailTo 	= filter_var($_POST['emailTo'], FILTER_SANITIZE_EMAIL);
$subject 	= filter_var($_POST['subject'], FILTER_SANITIZE_STRING);
$message   = filter_var($_POST['message'], FILTER_SANITIZE_STRING);

// send mail and remember function response
// boolean response
$mailSent = mail($emailTo, $subject, $message);

// the echoed response will be traced in actionscript
if($mailSent == true)
{
    echo 'mail sent';
}
else
{
    echo 'mail NOT sent';
}
</pre>
<p>Simple.</p>
<p>Hey did you know about this?<br />
<a href="http://themeforest.net?ref=forapathy" title="wordpress themes, site templates, psd" target="_blank"><img src="http://envato.s3.amazonaws.com/referrer_adverts/tf_468x60_v4.gif" alt="wordpress themes, site templates" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://point47.com/journal/2010/06/post-data-from-actionscript-3-to-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Modal box on page load with jquery fancy box and cookie plugin</title>
		<link>http://point47.com/journal/2010/06/modal-box-on-page-load-with-jquery-fancy-box-and-cookie-plugin/</link>
		<comments>http://point47.com/journal/2010/06/modal-box-on-page-load-with-jquery-fancy-box-and-cookie-plugin/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 09:37:49 +0000</pubDate>
		<dc:creator>Sorin</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://point47.com/journal/?p=127</guid>
		<description><![CDATA[UPDATE: Custom jQuery Modal box What I want to do? I want to show a message or an image on the first visit on my website. What I need to do this? - FancyBox jQuery plugin that you can get &#8230; <a href="http://point47.com/journal/2010/06/modal-box-on-page-load-with-jquery-fancy-box-and-cookie-plugin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><b>UPDATE:</b> <a href="http://point47.com/journal/2012/03/custom-easy-to-use-jquery-modal-box/">Custom jQuery Modal box</a><br />
<span id="more-127"></span></p>
<p><strong>What I want to do?</strong><br />
I want to show a message or an image on the first visit on my website.</p>
<p><strong>What I need to do this?</strong><br />
- FancyBox jQuery plugin that you can get from here: <a href="http://fancybox.net/" target="_blank">http://fancybox.net/</a>.<br />
I use this plugin as a better alternative to the old LightBox plugin because it resizes the loaded image to the current page size.<br />
- jQuery Cookie plugin that you can get from here: <a href="http://plugins.jquery.com/project/cookie" target="_blank">http://plugins.jquery.com/project/cookie</a><br />
This one I will use to remember if the modal box was already shown. I want to show the modal box only on the first visit on the site. No on every page load <img src='http://point47.com/journal/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> .<br />
- oh and of course the jQuery library: <a href="http://jquery.com/" target="_blank">http://jquery.com/</a></p>
<p><strong>How I do this?</strong><br />
Put this in the head section of the html code.</p>
<pre class="brush: jscript; title: ; notranslate">
// load all the libraries
// i like to put them in a folder called &quot;public&quot; then &quot;js&quot;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;public/js/fancybox/jquery.fancybox-1.3.1.css&quot; media=&quot;screen&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;public/js/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;public/js/fancybox/jquery.mousewheel-3.0.2.pack.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;public/js/fancybox/jquery.fancybox-1.3.1.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;public/js/jquery.cookie.js&quot;&gt;&lt;/script&gt; 

$(document).ready(function(){

/**
      *  MODAL BOX
      */
    // if the requested cookie does not have the value I am looking for show the modal box
    if($.cookie(&quot;modal&quot;) != 'true')
    {
        var _message_to_show = '&lt;h2&gt;Hi!&lt;/h2&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam quis mi eu elit tempor facilisis id et neque&lt;/p&gt; &lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;#&quot; id=&quot;modal_close&quot;&gt;ENTER&lt;/a&gt; &lt;a href=&quot;http://www.google.com&quot; id=&quot;modal_exit&quot;&gt;EXIT&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;';

        // on page load show the modal box
        // more info about the options you can find on the fancybox site
        $.fancybox(
            _message_to_show,
            {
                'width'             : 350,
                'height'            : 300,
                'transitionIn'      : 'none',
                'transitionOut'     : 'elastic',
                'centerOnScroll'    : 'true',
                'overlayOpacity'    : 0.9,
                'overlayColor'      : '#000',
                'modal'             : 'true'
            }
        );

        // in the message is a link with the id &quot;modal_close&quot;
        // when you click on that link the modal will close and the cookie is set to &quot;true&quot;
        // path &quot;/&quot; means it's active for the entire root site.. if you set it to &quot;/admin&quot; will be active on the &quot;admin&quot; folder
        // expires in 7 days
        // &quot;modal&quot; is the name i gave the cookie.. you can name it anything you want
        $('#modal_close').live('click', function(e) {
            e.preventDefault();
            $.cookie(&quot;modal&quot;, &quot;true&quot;, { path: '/', expires: 7 });
            $.fancybox.close()
        });
    }    

});
</pre>
<p>Oh the live demo is <a href="http://point47.com/journal/demo/modalbox.html" target="_blank">HERE</a>!</p>
<p>And that&#8217;s it! Enjoy!</p>
<p>Hey did you know about this?<br />
<a href="http://themeforest.net?ref=forapathy" title="wordpress themes, site templates, psd" target="_blank"><img src="http://envato.s3.amazonaws.com/referrer_adverts/tf_468x60_v4.gif" alt="wordpress themes, site templates" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://point47.com/journal/2010/06/modal-box-on-page-load-with-jquery-fancy-box-and-cookie-plugin/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
		<item>
		<title>Tips about writing CSS</title>
		<link>http://point47.com/journal/2010/04/tips-about-writing-css/</link>
		<comments>http://point47.com/journal/2010/04/tips-about-writing-css/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 11:21:50 +0000</pubDate>
		<dc:creator>Sorin</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://point47.com/journal/?p=94</guid>
		<description><![CDATA[Here are some random tips that I think can be useful to anyone who starts playing with CSS or already is doing that. 1. Reset HTML elements for all browsers. The first thing I do is reset the default styles &#8230; <a href="http://point47.com/journal/2010/04/tips-about-writing-css/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here are some random tips that I think can be useful to anyone who starts playing with CSS or already is doing that.<br />
<span id="more-94"></span></p>
<h4>1. Reset HTML elements for all browsers.</h4>
<p>The first thing I do is reset the default styles that the browsers set on elements. I consider this the most important thing to do before starting writing the actual CSS styles for the layout. For example Internet Explorer sets bigger margin values for elements like &#8220;input&#8221;, &#8220;textarea&#8221; and so on, than Firefox or Chrome.<br />
To reset the styles I prefer to use <a href="http://developer.yahoo.com/yui/reset/" target="_blank">Yahoo Reset</a> or you could try writing your own.</p>
<h4>2. Centering elements with CSS</h4>
<p>To center elements with CSS first you need to set the elements &#8220;width&#8221; and then setting their margins.<br />
So.. we want to center the design/layout of our site in the browser.<br />
We have this HTML</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:610px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;body&gt;<br />
&lt;div id=&quot;layoutWrapper&quot;&gt;site content&lt;/div&gt;<br />
&lt;/body&gt;</div></td></tr></tbody></table></div>
<p>and the CSS to center the <em>layoutWrapper</em> div is:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:610px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#layoutWrapper<br />
{<br />
&nbsp; &nbsp; width: 960px;<br />
&nbsp; &nbsp; margin: 0px auto;<br />
}</div></td></tr></tbody></table></div>
<p>Now the <em>layoutWrapper</em> div is centered with a top margin of 0 and the other margins are set to auto.</p>
<h4>3. Quick fix for the double margin bug in Internet Explorer 6</h4>
<p>The problem is that if you set margin or padding on a floated element those values are doubled in IE6 and get a f*ucked up layout.<br />
To solve this problem there are a lot of tricks but the most easiest and straight forward is to set also &#8220;display:inline&#8221; on the floated elements.<br />
This code will get you a margin left of 40px in Internet Explorer 6.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:610px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">.element<br />
{<br />
&nbsp; &nbsp;float:left;<br />
&nbsp; &nbsp;width: 200px<br />
&nbsp; &nbsp;margin-left: 20px; <br />
}</div></td></tr></tbody></table></div>
<p>By adding display:inline now margin-left is also 20px in IE6</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:610px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">.element<br />
{<br />
&nbsp; &nbsp;display:inline;<br />
&nbsp; &nbsp;float:left;<br />
&nbsp; &nbsp;width: 200px;<br />
&nbsp; &nbsp;margin-left: 20px; <br />
}</div></td></tr></tbody></table></div>
<h4>4. Font size in EM or PX?</h4>
<p>For a period of time I used em&#8217;s to size the fonts because in IE6 you can&#8217;t re-size the font if it&#8217;s in pixels.<br />
So if a title was 21px in font size.. in IE6 it will remain in 21px if you select text size to be larger. If it was in em&#8217;s for example<br />
that title will get larger.<br />
A trick that I used to easier set sizes in em&#8217;s is I was setting the body font size to 62.5%.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:610px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">body { font-size: 62.5%; }</div></td></tr></tbody></table></div>
<p>So now if you set a font size of 2.1em it will be the same as 21px.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:610px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">h1{font-size: 2.1em;}<br />
h2{font-size: 21px;}</div></td></tr></tbody></table></div>
<p>The sizes of the H1 and H2 will be the same 21px.<br />
For some time now I don&#8217;t care so much for IE6 users because there are 9 years since it was released and there are 4 years since version 7 was released.<br />
So if it&#8217;s not plain stupidity I really believe it&#8217;s plain ignorance.</p>
<h4>5. ID&#8217;s or Classes? When to use?</h4>
<p>Simple. Use id&#8217;s to target single elements or classes to target elements that are repeating in the page.<br />
More complex would be that elements with and id should be unique or else you cannot validate your HTML document.<br />
By using classes on elements you can use the same class to target multiple elements or also you can use multiple classes to target the same element.</p>
<h4>6. The equal columns trick</h4>
<p>This is a trick that I use rarely because it&#8217;s kind of an hack and hacks are never a good idea <img src='http://point47.com/journal/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> .<br />
More info for this trick you can find <a href="http://www.ejeliot.com/blog/61" target="_blank">here</a>.<br />
There are also a lot of variations but I find this one the easiest to implement.</p>
<h4>7. Containers and children widths</h4>
<p>I usually set width only to container elements and for the children I set margins and padding or width of 100%.<br />
So if I need to change the width of the container the children automatically change their size also.</p>
<h4>8. IE6 PNG transparency problem (isn&#8217;t really a CSS related but like.. who cares)</h4>
<p>Everybody loves PNG&#8217;s. And how can you not? Full quality, transparency support, smaller size files on graphics (jpeg&#8217;s are still better for big images).<br />
But IE6 doesn&#8217;t like them at all. So we must use some tricks.. and there are a lot.<br />
From that &#8220;a lot&#8221; I prefer one: <a href="http://www.dillerdesign.com/experiment/DD_belatedPNG/" target="_blank">DD_belatedPNG by Drew Diller</a><br />
This one is the best I could find out there. And I tested a lot of them bad scripts <img src='http://point47.com/journal/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://point47.com/journal/2010/04/tips-about-writing-css/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Virtual URL &#8211; link shorten service</title>
		<link>http://point47.com/journal/2010/02/virtual-url-link-shorten-service/</link>
		<comments>http://point47.com/journal/2010/02/virtual-url-link-shorten-service/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 17:22:52 +0000</pubDate>
		<dc:creator>Sorin</dc:creator>
				<category><![CDATA[Bulk]]></category>

		<guid isPermaLink="false">http://point47.com/journal/?p=91</guid>
		<description><![CDATA[VUS.me is a new and very simple link shorten service made with simplicity and quick access in mind. Looks very promising so give it a try.. or more . http://vus.me]]></description>
			<content:encoded><![CDATA[<p><a href="http://vus.me" target="_blank">VUS.me</a> is a new and very simple link shorten service made with simplicity and quick access in mind.<br />
Looks very promising so give it a try.. or more <img src='http://point47.com/journal/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> . </p>
<p><a href=" http://vus.me" target="_blank">http://vus.me</a></p>
]]></content:encoded>
			<wfw:commentRss>http://point47.com/journal/2010/02/virtual-url-link-shorten-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Setup WordPress MU with Domain Mapping</title>
		<link>http://point47.com/journal/2009/12/how-to-setup-wordpress-mu-with-domain-mapping/</link>
		<comments>http://point47.com/journal/2009/12/how-to-setup-wordpress-mu-with-domain-mapping/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 14:41:07 +0000</pubDate>
		<dc:creator>Sorin</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://point47.com/journal/?p=61</guid>
		<description><![CDATA[NOTE! Since WordPress 3.0 this post is outdated. In the new WordPress 3.0 the MU wordpress is already integrated. Here is explained how I made my WordPress MU install to work with domain mapping. There are some tutorials out there &#8230; <a href="http://point47.com/journal/2009/12/how-to-setup-wordpress-mu-with-domain-mapping/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>NOTE! Since WordPress 3.0 this post is outdated. In the new WordPress 3.0 the MU wordpress is already integrated.</strong></p>
<p>Here is explained how I made my WordPress MU install to work with domain mapping. There are some tutorials out there but they are plain crap and very poorly explained. And the explanations for the domain mapping plugins are even worse. But I managed to make it work in around two days with a lot of testing and trial and error.<br />
These are the steps that I followed. Well.. not really.. but in the end these would have been the steps that I should have followed.</p>
<p><em><strong>NOTE! This tutorial is based on the fact that you know how to install and configure a simple WordPress version because I will not offer detailed info about database creation and ftp uploading.</strong></em></p>
<h4>What we want to do here?</h4>
<p>- We want to have WordPress MU so we can create multiple WordPress blogs but with one main Administration area.<br />
- Create as many sub-domains as we want.<br />
- Map those sub-domains to other domains. (<em>subdomain.master-example.com</em> should be accessible from <em>addon-example.com</em> )</p>
<h4>I. Configure domains</h4>
<ul>
<li> First you need some domains, for this tutorial at least 2. One to be the master domain which we will call here <em>master-example.com</em> and the other domain that we will map to the blog created as a subdomain on master-example.com whitch we will call <em>addon-example.com</em>.</li>
<li>Next you need hosting witch offers <strong>WHM with CPanel</strong>. WHM not really needed I think. I added the domains and parked them from WHM but that can be done in CPanel also.</li>
<li>After you have the main domain configured on a hosting and you have acces to the CPanel you need to go to &#8220;<strong>Subdomains</strong>&#8221; and set the subdomains on a wildcard(<strong>*</strong>). So where it says &#8220;<strong>Create a Subdomain</strong>&#8221; enter <strong>*</strong> , check if your master domain is selected in the next drop down and in Document root is &#8220;<em>public_html/</em>&#8221; and click Create. </li>
<li>In the list of sub-domains now should be:<strong> &#8220;*  	.master-example.com  	Home/public_html  not redirected&#8221;</strong> . What this does it lets WordPress MU create any kind of sub-domain without first adding it manually in the CPanel.</li>
<li> Now we need to add the <em>addon-example.com</em> domain. Go to: &#8220;<strong>Parked Domains</strong>&#8221; and enter <em>addon-example.com</em> in the box and press &#8220;<strong>Add Domain</strong>&#8220;. This should park <em>addon-example.com</em> on top of<em>master-example.com</em>. Until I used the Park domain option my domain mapping in WordPress didn&#8217;t work.</li>
<li>Now go to <strong>&#8220;Simple DNS Zone Editor&#8221;</strong> and here you have to set an A record for <em>addon-example.com</em>. So select the addon domain <em>addon-example.com</em> and where it says <strong>Add an A Record </strong> in the <strong>&#8220;Name:&#8221;</strong> field write <strong>*.addon-example.com</strong>  and on the <strong>&#8220;Address&#8221; </strong>field put the <strong>master domain IP</strong> (you should find it in the left sidebar in CPanel.. for example: <strong>&#8220;Shared Ip Address: 127.0.0.20&#8243; </strong>.). Click <strong>&#8220;Add A Record&#8221;. </strong></li>
<li>Great. Now you are ready to install WordPress MU!</li>
</ul>
<p><strong>Note!</strong><em> I made all of this in the WHM administration but I saw those modifications in CPanel also and I checked if they correspond and it seems that it can be done from CPanel too. For WHM just use &#8220;Park a Domain&#8221; and &#8220;Edit DNS Zone&#8221; buttons and make the above modifications.</em></p>
<h4>II. Install WordPress MU.</h4>
<ul>
<li>Create a database and a user in CPanel .. or whatever.</li>
<li>Download the WordPress MU sources from <a href="http://mu.wordpress.org/download/">here</a> </li>
<li>Copy the files to your main domain. I uploaded them to my domain root but they say it can be installed to a folder or a sub-domain too.</li>
<li>Now navigate to your domain (master-example.com) and you should see the installation page. There are some errors for sure and the usual error is that you need to make some folder writable by WordPress. That means to give those folders 777 permission and you&#8217;ll have to reset those to 755 after successful install. </li>
<li>Just follow the steps and be careful to specify where it says Blog addresses <strong>to use sub-domains</strong> and at <strong>Server Address your domain without www or http://</strong></li>
<li>And, this is very important, after install go to Admin menu (upper right corner) in the WordPress admin interface and <strong>change your password</strong> to something you can remember. And don&#8217;t forget to change the folder permissions back to 755</li>
<li>Now is the time to see if it works. Go to Site <strong>Admin -> Blogs</strong> and add a new blog. Let&#8217;s say <em>subdomain.master-example.com</em>. If the email address is different from the one you used at install a new user will be created when you add a new blog. And this happens every time you use a different email address.</li>
<li>OK. Now navigate to: <strong>subdomain.master-example.com</strong> (or whatever you created) and you should see your blog. Congrats! Now you have a working installation of WordPress MU. If it doesn&#8217;t work repeat the above steps with more attention or if you just registered your domains wait a few hours for DNS registrations.</li>
</ul>
<h4>III. Install the Domain Mapping plugin and map a domain</h4>
<ul>
<li>First download the plugin <a href="http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/">WordPress MU Domain Mapping</a> (http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/). I used version 0.5. <strong>Many many thanks to those guys for creating this awesome plugin.</strong></li>
<li>Copy <strong>sunrise.php</strong> into wp-content/</li>
<li>Copy <strong>domain_mapping.php</strong> into wp-content/mu-plugins/</li>
<li>Edit <strong>wp-config.php</strong> and uncomment the SUNRISE definition line: <strong>define( &#8216;SUNRISE&#8217;, &#8216;on&#8217; );</strong></li>
<li>Now go to Plugins and activate the mapping plugin for the main domain.</li>
<li>After you done those login as the MU admin and go to <strong>Site Admin->Domain Mapping</strong> and set the server IP address. (you should know this from when you added the A record)
<li>Now this is the tricky part on what I wasted a lot of hours. Go to <strong>Site Admin -> Options</strong> and scroll down at the bottom. And after where it says <strong>&#8220;Site Wide Settings&#8221;</strong> click on the check box for the Plugins and click Update Options. This activates the plugins for the sub-domains. If you don&#8217;t do this you can&#8217;t map domains to the specific sub-domain because you will not see the plugin on your sub-domains admin area. (First I actually edited this directly in the database until I realized this.) </li>
<li>Now go to <strong>Site admin -> Blogs</strong> and when you hover over the added sub-domain some link will appear. Click on <strong>&#8220;Backend&#8221;</strong>. This will redirect you to that sub-domain WordPress administration panel.</li>
<li>While in this panel go to <strong>Plugins</strong> and you should see the mapping plugin. Activate it.</li>
<li>And now go to <strong>Tools -> Domain mapping</strong>. And here is the part that we worked so hard to get to. Under <strong>&#8220;Add new domain&#8221;</strong> write the domain that you want to map to this sub-domain.</li>
<li>After you clicked <strong>&#8220;Add&#8221;</strong> go to the domain that you wanted to map (<em>addon-example.com</em>) and you will see the contents of <em>subdomain.master-example.com</em></li>
</ul>
<p>Kind of a long tutorial but hopefully I didn&#8217;t forgot anything in the process.<br />
Let me know in the comments if it helped you or if you still got problems with the install flow.</p>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://point47.com/journal/2009/12/how-to-setup-wordpress-mu-with-domain-mapping/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

