<?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>Tareq's Planet</title>
	<atom:link href="http://tareq.wedevs.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://tareq.wedevs.com</link>
	<description></description>
	<lastBuildDate>Mon, 07 May 2012 07:09:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Facebook comment for WordPress: Email notification on new comment</title>
		<link>http://tareq.wedevs.com/2012/05/facebook-comment-email-notification/</link>
		<comments>http://tareq.wedevs.com/2012/05/facebook-comment-email-notification/#comments</comments>
		<pubDate>Mon, 07 May 2012 07:09:16 +0000</pubDate>
		<dc:creator>Tareq</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[comment]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[wordrpress]]></category>

		<guid isPermaLink="false">http://tareq.wedevs.com/?p=1350</guid>
		<description><![CDATA[Recently I built a lyrics site in Bangla, that contains only Bangla songs. I love music and haven&#8217;t found that much lyrics site thats truly for Bangla songs and in Bangla localization, so I decided to build one. It got very popular in a few days. The songs are added by users and seems like [...]
Related posts:<ol>
<li><a href='http://tareq.wedevs.com/2010/09/translate-wordpress-date-time-comment-number-to-bangla-digit/' rel='bookmark' title='Translate or convert wordpress date/time/comment number to Bangla digit'>Translate or convert wordpress date/time/comment number to Bangla digit</a></li>
<li><a href='http://tareq.wedevs.com/2011/07/add-your-custom-columns-to-wordpress-admin-panel-tables/' rel='bookmark' title='Add your custom columns to WordPress admin panel tables'>Add your custom columns to WordPress admin panel tables</a></li>
<li><a href='http://tareq.wedevs.com/2012/03/log-wordpress-outgoing-mails-for-debugging/' rel='bookmark' title='Log WordPress outgoing mails for debugging'>Log WordPress outgoing mails for debugging</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Recently I built a <a href="http://banglasonglyrics.com/" title="Bangla Song Lyrics" target="_blank">lyrics site</a> in <a href="http://en.wikipedia.org/wiki/Bengali_language" title="Bangla" target="_blank">Bangla</a>, that contains only Bangla songs. I love music and haven&#8217;t found that much lyrics site thats truly for Bangla songs and in Bangla localization, so I decided to build one. It got very popular in a few days. The songs are added by users and seems like they are loving to do that. The beauty of this site in it&#8217;s clean and structured layout, lyrics with youtube video, song classification by music composer, lyricist, singer, album and year.</p>
<p>Anyway, I&#8217;ve integrated facebook comments instead of regular WordPress comment system (obviously it&#8217;s built on top of WordPress, what did you think? <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley colorbox-1350' />  ). The most advantage of this solution is that everyone is connected and signed in at facebook all the time and can left comment easily and share them with friends. But the problem is, if anyone left a comment on a post, there is no way to be notified that any comment has been made either to the post author or to the administrator. So I came up with a quick implementation.</p>
<h3>Loading JS SDK</h3>
<p>Here is the code to load the Facebook JavaScript SDK asynchronously -</p>
<pre class="brush: jscript; title: ; notranslate">
window.fbAsyncInit = function() {
    FB.init({
        appId      : 'YOUR_APP_ID', // App ID
        status     : true, // check login status
        cookie     : true, // enable cookies to allow the server to access the session
        xfbml      : true  // parse XFBML
    });
};

// Load the SDK Asynchronously
(function(d){
    var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
    if (d.getElementById(id)) {return;}
    js = d.createElement('script'); js.id = id; js.async = true;
    js.src = &quot;//connect.facebook.net/en_US/all.js&quot;;
    ref.parentNode.insertBefore(js, ref);
}(document));
</pre>
<h3>New Comment Event</h3>
<p>I&#8217;ve added a event that runs when a new comment has been made. This event sends an ajax request to WordPress to notify that a new comment has been made.</p>
<pre class="brush: php; title: ; notranslate">
FB.Event.subscribe('comment.create', function(response) {
    var ajaxurl = '&lt;?php echo admin_url( 'admin-ajax.php' ); ?&gt;',
        data = {
            action: 'fb_comment_notify',
            _ajax_nonce: '&lt;?php echo wp_create_nonce( 'fb_comment_notify' ); ?&gt;',
            post: '&lt;?php echo $post-&gt;ID; ?&gt;'
        };

    jQuery.post(ajaxurl, data);
});
</pre>
<h3>Full JS Code</h3>
<pre class="brush: jscript; title: ; notranslate">
window.fbAsyncInit = function() {
    FB.init({
        appId      : 'YOUR_APP_ID', // App ID
        status     : true, // check login status
        cookie     : true, // enable cookies to allow the server to access the session
        xfbml      : true  // parse XFBML
    });

    FB.Event.subscribe('comment.create', function(response) {
        var ajaxurl = '&lt;?php echo admin_url( 'admin-ajax.php' ); ?&gt;',
            data = {
                action: 'fb_comment_notify',
                _ajax_nonce: '&lt;?php echo wp_create_nonce( 'fb_comment_notify' ); ?&gt;',
                post: '&lt;?php echo $post-&gt;ID; ?&gt;'
            };

        jQuery.post(ajaxurl, data);
    });

};

// Load the SDK Asynchronously
(function(d){
    var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
    if (d.getElementById(id)) {return;}
    js = d.createElement('script'); js.id = id; js.async = true;
    js.src = &quot;//connect.facebook.net/en_US/all.js&quot;;
    ref.parentNode.insertBefore(js, ref);
}(document));
</pre>
<h3>Handling Ajax Request</h3>
<p>Now that we have sent an ajax request, we need to handle that request as well</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
/**
 * Handles ajax request on new Facebook comment
 */
function wedevs_fb_comment_notify() {
    $post_id = (int) $_POST['post'];

    check_ajax_referer( 'fb_comment_notify' );

    $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
    $recipient = array();
    $post = get_post( $post_id );
    $recipient[] = get_option( 'admin_email' );
    $post_author = get_user_by( 'id', $post-&gt;post_author );

    if( !in_array( $post_author-&gt;data-&gt;user_email, $recipient ) ) {
        $recipient[] = $post_author-&gt;data-&gt;user_email;
    }

    $subject = sprintf( __( 'New Comment on %s', 'wedevs' ), $blogname );
    $body = sprintf( __( 'New comment on the song %s', 'wedevs' ), $post-&gt;post_title ) . &quot;\r\n&quot;;
    $body .= sprintf( __( 'You can see all the comments of this song here: %s', 'wedevs' ), get_permalink( $post_id ) ) . &quot;\r\n&quot;;

    $wp_email = 'no-reply@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME']));
    $from = &quot;From: \&quot;$blogname\&quot; &lt;$wp_email&gt;&quot;;
	$message_headers = &quot;$from\nContent-Type: text/plain; charset=\&quot;&quot; . get_option('blog_charset') . &quot;\&quot;\n&quot;;

    wp_mail( $recipient, $subject, $body, $message_headers );
    exit;
}

add_action( 'wp_ajax_fb_comment_notify', 'wedevs_fb_comment_notify' );
add_action( 'wp_ajax_nopriv_fb_comment_notify', 'wedevs_fb_comment_notify' );
</pre>
<p>It sends a notification email to that administrator and the post author that a new comment has been made. Easy peasy!</p>
<p>Related posts:<ol>
<li><a href='http://tareq.wedevs.com/2010/09/translate-wordpress-date-time-comment-number-to-bangla-digit/' rel='bookmark' title='Translate or convert wordpress date/time/comment number to Bangla digit'>Translate or convert wordpress date/time/comment number to Bangla digit</a></li>
<li><a href='http://tareq.wedevs.com/2011/07/add-your-custom-columns-to-wordpress-admin-panel-tables/' rel='bookmark' title='Add your custom columns to WordPress admin panel tables'>Add your custom columns to WordPress admin panel tables</a></li>
<li><a href='http://tareq.wedevs.com/2012/03/log-wordpress-outgoing-mails-for-debugging/' rel='bookmark' title='Log WordPress outgoing mails for debugging'>Log WordPress outgoing mails for debugging</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://tareq.wedevs.com/2012/05/facebook-comment-email-notification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing phpmyadmin not found problem and AllowNoPassword in ubuntu</title>
		<link>http://tareq.wedevs.com/2012/04/fixing-phpmyadmin-not-found-problem-and-allownopassword-in-ubuntu/</link>
		<comments>http://tareq.wedevs.com/2012/04/fixing-phpmyadmin-not-found-problem-and-allownopassword-in-ubuntu/#comments</comments>
		<pubDate>Sat, 28 Apr 2012 20:18:21 +0000</pubDate>
		<dc:creator>Tareq</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://tareq.wedevs.com/?p=1348</guid>
		<description><![CDATA[Every time I installed phpmyadmin in my ubuntu desktop, navigating to http://localhost/phpmyadmin simply displays a 404 message. This is how I fix everytime - Fixing AllowNoPassword I don&#8217;t use any password for mysql in my development invironment. But by default phpmyadmin doesn&#8217;t allow you to login without a password. You can overcome it by editing [...]
Related posts:<ol>
<li><a href='http://tareq.wedevs.com/2008/11/ubuntus-problem-solve-is-in-pdf-now/' rel='bookmark' title='Ubuntu&#8217;s problem solve is in PDF now'>Ubuntu&#8217;s problem solve is in PDF now</a></li>
<li><a href='http://tareq.wedevs.com/2011/10/things-to-do-after-installing-ubuntu-11-10/' rel='bookmark' title='Things to do after installing Ubuntu 11.10 Oneiric Ocelot'>Things to do after installing Ubuntu 11.10 Oneiric Ocelot</a></li>
<li><a href='http://tareq.wedevs.com/2012/04/changing-apache-document-root-in-ubuntu/' rel='bookmark' title='Changing apache document root in ubuntu'>Changing apache document root in ubuntu</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Every time I installed phpmyadmin in my ubuntu desktop, navigating to http://localhost/phpmyadmin simply displays a 404 message. This is how I fix everytime -</p>
<pre class="brush: bash; title: ; notranslate">$ sudo ln -s /usr/share/phpmyadmin /var/www</pre>
<h3>Fixing AllowNoPassword</h3>
<p>I don&#8217;t use any password for mysql in my development invironment. But by default phpmyadmin doesn&#8217;t allow you to login without a password. You can overcome it by editing the /etc/phpmyadmin/config.inc.php. Open the file with root previledge -</p>
<pre class="brush: bash; title: ; notranslate">$ sudo gedit /etc/phpmyadmin/config.inc.php</pre>
<p>And uncomment this line </p>
<pre class="brush: php; title: ; notranslate">$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;</pre>
<p>Related posts:<ol>
<li><a href='http://tareq.wedevs.com/2008/11/ubuntus-problem-solve-is-in-pdf-now/' rel='bookmark' title='Ubuntu&#8217;s problem solve is in PDF now'>Ubuntu&#8217;s problem solve is in PDF now</a></li>
<li><a href='http://tareq.wedevs.com/2011/10/things-to-do-after-installing-ubuntu-11-10/' rel='bookmark' title='Things to do after installing Ubuntu 11.10 Oneiric Ocelot'>Things to do after installing Ubuntu 11.10 Oneiric Ocelot</a></li>
<li><a href='http://tareq.wedevs.com/2012/04/changing-apache-document-root-in-ubuntu/' rel='bookmark' title='Changing apache document root in ubuntu'>Changing apache document root in ubuntu</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://tareq.wedevs.com/2012/04/fixing-phpmyadmin-not-found-problem-and-allownopassword-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing apache document root in ubuntu</title>
		<link>http://tareq.wedevs.com/2012/04/changing-apache-document-root-in-ubuntu/</link>
		<comments>http://tareq.wedevs.com/2012/04/changing-apache-document-root-in-ubuntu/#comments</comments>
		<pubDate>Sat, 28 Apr 2012 19:38:11 +0000</pubDate>
		<dc:creator>Tareq</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://tareq.wedevs.com/?p=1346</guid>
		<description><![CDATA[In my development machine I always like to move the default /var/www directory to my home directory, e.g. /home/tareq/www . It&#8217;s very simple to do. Open the /etc/apache2/sites-available/default file with administrator previledge and change the document root as you want Now change the file like this: Now restart your apache Update According to Nasim vai, [...]
Related posts:<ol>
<li><a href='http://tareq.wedevs.com/2011/10/things-to-do-after-installing-ubuntu-11-10/' rel='bookmark' title='Things to do after installing Ubuntu 11.10 Oneiric Ocelot'>Things to do after installing Ubuntu 11.10 Oneiric Ocelot</a></li>
<li><a href='http://tareq.wedevs.com/2009/03/activate-curl-in-xampp/' rel='bookmark' title='Activate cURL in XAMPP'>Activate cURL in XAMPP</a></li>
<li><a href='http://tareq.wedevs.com/2008/11/ubuntus-problem-solve-is-in-pdf-now/' rel='bookmark' title='Ubuntu&#8217;s problem solve is in PDF now'>Ubuntu&#8217;s problem solve is in PDF now</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In my development machine I always like to move the default <code>/var/www</code> directory to my home directory, e.g. <code>/home/tareq/www</code> . It&#8217;s very simple to do. Open the <code>/etc/apache2/sites-available/default</code> file with administrator previledge and change the document root as you want</p>
<pre class="brush: bash; title: ; notranslate">$ sudo gedit /etc/apache2/sites-available/default</pre>
<p>Now change the file like this:</p>
<pre class="brush: bash; highlight: [1,6]; title: ; notranslate">
DocumentRoot /home/tareq/www
&lt;Directory /&gt;
    Options FollowSymLinks
    AllowOverride None
&lt;/Directory&gt;
&lt;Directory /home/tareq/www/&gt;
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
&lt;/Directory&gt;
</pre>
<p>Now restart your apache</p>
<pre class="brush: bash; title: ; notranslate">$ sudo /etc/init.d/apache2 restart</pre>
<h3>Update</h3>
<p>According to <a href="http://twitter.com/nsmgr8" target="_blank">Nasim</a> vai, there is a more elegant solution with a single line command :-</p>
<pre class="brush: bash; title: ; notranslate">$ sudo rm -r /var/www; sudo ln -s /home/${USER}/www /var/www</pre>
<p>Related posts:<ol>
<li><a href='http://tareq.wedevs.com/2011/10/things-to-do-after-installing-ubuntu-11-10/' rel='bookmark' title='Things to do after installing Ubuntu 11.10 Oneiric Ocelot'>Things to do after installing Ubuntu 11.10 Oneiric Ocelot</a></li>
<li><a href='http://tareq.wedevs.com/2009/03/activate-curl-in-xampp/' rel='bookmark' title='Activate cURL in XAMPP'>Activate cURL in XAMPP</a></li>
<li><a href='http://tareq.wedevs.com/2008/11/ubuntus-problem-solve-is-in-pdf-now/' rel='bookmark' title='Ubuntu&#8217;s problem solve is in PDF now'>Ubuntu&#8217;s problem solve is in PDF now</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://tareq.wedevs.com/2012/04/changing-apache-document-root-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Deploying PHP apps with git and git submodule</title>
		<link>http://tareq.wedevs.com/2012/04/deploying-php-apps-with-git-and-git-submodule/</link>
		<comments>http://tareq.wedevs.com/2012/04/deploying-php-apps-with-git-and-git-submodule/#comments</comments>
		<pubDate>Fri, 27 Apr 2012 20:06:04 +0000</pubDate>
		<dc:creator>Tareq</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[deploy]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[submodule]]></category>

		<guid isPermaLink="false">http://tareq.wedevs.com/?p=1343</guid>
		<description><![CDATA[I used to work in my projects like editing a file and uploading the changed files back to the server every time when it feels like those changes are OK. But when the number of files gets bigger, I loose track which files I&#8217;ve edited. In that case I had to upload all the files [...]
Related posts:<ol>
<li><a href='http://tareq.wedevs.com/2012/03/log-wordpress-outgoing-mails-for-debugging/' rel='bookmark' title='Log WordPress outgoing mails for debugging'>Log WordPress outgoing mails for debugging</a></li>
<li><a href='http://tareq.wedevs.com/2012/03/wordpress-plugin-user-login-statistics/' rel='bookmark' title='WordPress plugin: User Login Statistics'>WordPress plugin: User Login Statistics</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I used to work in my projects like editing a file and uploading the changed files back to the server every time when it feels like those changes are OK. But when the number of files gets bigger, I loose track which files I&#8217;ve edited. In that case I had to upload all the files again to the server via FTP.</p>
<p>I am using Git as my primary SCM tool. Although I wasn&#8217;t using any SCM until I realized how essential it was when developing the plugin <a href="http://tareq.wedevs.com/2011/01/new-plugin-wordpress-user-frontend/" title="New plugin: WordPress User Frontend" target="_blank">WP User Frontend</a>. Some clients asked me to modify the plugin to fit in their project, others asked about other requirements. So every time I had to modify that plugin to suit their needs from the beginning. And It was a pain in the ass to track where I changed for that custom work. Because I had to update the plugin again to release in the public without the custom modification. So, it was a nightmare.</p>
<p>Anyway, back to the topic. I thought I can easily track those changed files and can only upload those change sets and it&#8217;ll be very tiny. So I am writing the process as a future reference for myself and might help others too.</p>
<h3>1. initialize your project</h3>
<pre class="brush: bash; title: ; notranslate">
$ mkdir awesome-project
$ cd awesome-project
$ git init
</pre>
<p>As I was also working with git submodules, I&#8217;ll add the submodule to my newly created awesome project. If you don&#8217;t know what a submodule is, it&#8217;s usually an another git repository that can be used under another git project.</p>
<h3>2. Adding git submodule</h3>
<pre class="brush: bash; title: ; notranslate">$ git submodule add ~/www/tiny-framework lib/framework</pre>
<p>Here I am using another git project <code>~/www/tiny-framework</code> inside my <code>awesome-project</code> in path <code>awesome-project/lib/framework</code>. This command will clone my <code>tiny-framework</code> project in the <code>awesome-project/lib/framework</code> folder.</p>
<p>You can skip the submodule part if you are not using any.</p>
<h3>3. pulling changes from the framework</h3>
<p>In case you have updated your tiny-framework project, obviously you&#8217;ll want to bring the changes to your awesome-project too, but those changes will not automatically pulled down in your awesome project. You&#8217;ve to pull it manually.</p>
<pre class="brush: bash; title: ; notranslate">
$ cd lib/framework
$ git pull
</pre>
<p>Now you&#8217;ve worked in your project and ready to deploy to the server for test or production usage. It&#8217;s time to add a remote branch to your project.</p>
<h3>4. Add remote repo to deploy the app</h3>
<p>Now add a remote repository to your awesome project.</p>
<pre class="brush: bash; title: ; notranslate">$ git remote add production ssh://example.com/~/git/app</pre>
<p>I have shell access to my server, so I am adding the server as the remote repository. The trailing <code>~/git/app</code> is the path where I&#8217;ll be pushing my local repo. In case you don&#8217;t know what the <code>~</code> sign means, it&#8217;s a shortcut to your home directory path.</p>
<h3>5. Create the app bare repo in server</h3>
<p>Now that you&#8217;ve added the remote repository to your local machine, you&#8217;ve to create the actual remote repository to the server. Log in to your server and create the folder and initialize the empty git repo.</p>
<pre class="brush: bash; title: ; notranslate">
$ mkdir git/app
$ cd git/app
$ git init --bare
</pre>
<p>You might have noticed, I am creating a bare repo here. There are <a href="http://sitaramc.github.com/concepts/bare.html" target="_blank">some</a> <a href="http://www.bitflop.com/document/111" target="_blank">reasons</a> behind why I am using bare repo.</p>
<p>The bare repo is not like a normal git repo, it doesn&#8217;t and will not contain any files that you&#8217;ll be pushing from your local repo. What we&#8217;ll be doing is :- </p>
<ul>
<li>we will create a post-receive hook in this bare repo</li>
<li>we will push the local repo to this bare repo</li>
<li>the post-receive hook in this bare repo will checkout our local repo and will copy our local files to another folder in the server</li>
</ul>
<h3>6. Add post receive hook to the server</h3>
<p>Now in this bare repo, we&#8217;ll add the post receive hook to checkout our local repo</p>
<pre class="brush: bash; title: ; notranslate">
$ cd hooks
$ vi post-receive.sample
</pre>
<h3>7. Add the details of the folder to clone</h3>
<p>You&#8217;ve to add this line in the <code>post-receive.sample</code> file. I am using vi/vim, you can you nano or emacs or whatever editor you want. But make sure you are providing the right path to the folder. In my case, my local repo will be copied to the <code>awesome-project</code> folder in <code>public_html</code> directory</p>
<pre class="brush: bash; title: ; notranslate">GIT_WORK_TREE=~/public_html/awesome-project git checkout -f</pre>
<h3>8. Rename and make executable</h3>
<p>To make the hook work, you&#8217;ve to rename the <code>post-receive.sample</code> file to <code>post-receive</code> and make it executable</p>
<pre class="brush: bash; title: ; notranslate">
$ mv post-receive.sample post-receive
$ chmod +x post-receive
</pre>
<h3>9. Now push the changes</h3>
<p>Now everything is done, we are finally able to push our local git repo to the server. The files will be placed in <code>public_html/awesome-project</code> folder in the server.</p>
<pre class="brush: bash; title: ; notranslate">
$ cd awesome-project
$ git push production master
</pre>
<p>Now, you might have noticed, the submodule has not been deployed to your server, why is that? Because git consider the submodule as another git repo and if you want to push the submodule too, you&#8217;ve to create an another bare repo in the server, configure the post-receive hook, adding the remote repo in the submodule and push them again as you did for your awesome-project, damn! But you&#8217;ve to do it <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley colorbox-1343' /> </p>
<h3>10. Push the submodule</h3>
<p>Repeat the process 4 to 9 again. That means:</p>
<ol>
<li>cd into the &#8220;framework&#8221; folder</li>
<li>add remote repo</li>
<li>create bare repo in server (e.g: ~/git/framework)</li>
<li>add the post-receive hook in path: ~/public_html/awesome-project/lib/framework</li>
<li>push the local changes</li>
</ol>
<p>Thats pretty much it.</p>
<h3>Skipping the password prompt</h3>
<p>Now your system is ready and you can always push your changes to the server. But, every time it&#8217;ll ask your ssh password when pushing the changes. You can skip this problem too. Generate a private/public key for your laptop/computer. Log in to your cpanel. Goto the <code>SSH/Shell Access</code> => <code>Manage SSH Keys</code>. Then import your public key and authorize it. From now on, you&#8217;ll not be asked to enter your password every time you push you changes.</p>
<h3>Extra: Removing a git submodule</h3>
<p>If you want/have to remove the submodule from the project, here&#8217;s how to do it</p>
<pre class="brush: bash; title: ; notranslate">git rm --cached path/to/submodule</pre>
<p>Related posts:<ol>
<li><a href='http://tareq.wedevs.com/2012/03/log-wordpress-outgoing-mails-for-debugging/' rel='bookmark' title='Log WordPress outgoing mails for debugging'>Log WordPress outgoing mails for debugging</a></li>
<li><a href='http://tareq.wedevs.com/2012/03/wordpress-plugin-user-login-statistics/' rel='bookmark' title='WordPress plugin: User Login Statistics'>WordPress plugin: User Login Statistics</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://tareq.wedevs.com/2012/04/deploying-php-apps-with-git-and-git-submodule/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to extend WP User Frontend</title>
		<link>http://tareq.wedevs.com/2012/04/how-to-extend-wp-user-frontend/</link>
		<comments>http://tareq.wedevs.com/2012/04/how-to-extend-wp-user-frontend/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 15:16:46 +0000</pubDate>
		<dc:creator>Tareq</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://tareq.wedevs.com/?p=1340</guid>
		<description><![CDATA[WP User Frontend plugin supports some actions and filters by itself. That means you can extend this plugin without touching it&#8217;s code. Lets see how to do that. Adding a input field You can add your custom input fields in 5 areas in the post add form, they are: Top area: wpuf_add_post_form_top Before the post [...]
Related posts:<ol>
<li><a href='http://tareq.wedevs.com/2011/01/new-plugin-wordpress-user-frontend/' rel='bookmark' title='New plugin: WordPress User Frontend'>New plugin: WordPress User Frontend</a></li>
<li><a href='http://tareq.wedevs.com/2012/03/wordpress-plugin-user-login-statistics/' rel='bookmark' title='WordPress plugin: User Login Statistics'>WordPress plugin: User Login Statistics</a></li>
<li><a href='http://tareq.wedevs.com/2012/03/log-wordpress-outgoing-mails-for-debugging/' rel='bookmark' title='Log WordPress outgoing mails for debugging'>Log WordPress outgoing mails for debugging</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://wordpress.org/extend/plugins/wp-user-frontend/" target="_blank">WP User Frontend</a> plugin supports some actions and filters by itself. That means you can extend this plugin without touching it&#8217;s code. Lets see how to do that.</p>
<h3>Adding a input field</h3>
<p>You can add your custom input fields in 5 areas in the post add form, they are: </p>
<ul>
<li>Top area: <strong>wpuf_add_post_form_top</strong></li>
<li>Before the post description: <strong>wpuf_add_post_form_description</strong></li>
<li>After the post description: <strong>wpuf_add_post_form_after_description</strong></li>
<li>After the tags area: <strong>wpuf_add_post_form_tags</strong> and </li>
<li>At the bottom: <strong>wpuf_add_post_form_bottom</strong></li>
</ul>
<p>These are the action hooks and you can bind your function to display/process anything you want. Lets create a function that will add a text field before the post description area &#8211; </p>
<pre class="brush: php; title: ; notranslate">
/**
 * Add a field to the add post area
 *
 * @uses `wpuf_add_post_form_description` action hook
 *
 * @param string $post_type the post type of the post add screen
 * @param object|null $post the post object
 */
function wpufe_artist( $post_type, $post = null) {

    $artist = ( $post != null ) ? get_post_meta( $post-&gt;ID, 'artists', true ) : '';
    ?&gt;
    &lt;li&gt;
        &lt;label for=&quot;song_artist&quot;&gt;
            Artist &lt;span class=&quot;required&quot;&gt;*&lt;/span&gt;
        &lt;/label&gt;
        &lt;input class=&quot;requiredField&quot; value=&quot;&lt;?php echo esc_attr( $artist ); ?&gt;&quot; type=&quot;text&quot; name=&quot;song_artist&quot; id=&quot;song_artist&quot; minlength=&quot;2&quot; /&gt;
        &lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
    &lt;/li&gt;
    &lt;?php
}
</pre>
<p>And we can show this field by binding the function in any of those 5 action hooks mentioned before.</p>
<pre class="brush: php; title: ; notranslate">add_action( 'wpuf_add_post_form_description', 'wpufe_artist', 10, 2 );</pre>
<p>These hooks can receive 2 parameters, the first one is the post_type and second one is the post object (only available on edit post area, otherwise set to NULL).</p>
<h3>Validating the input</h3>
<p>Now that we&#8217;ve added our field to the posting form area, we can validate that field if we want.</p>
<pre class="brush: php; title: ; notranslate">
/**
 * Validate the artist name
 *
 * @uses 'wpuf_add_post_validation' filter
 *
 * @param array $errors errors array
 * @return array errors array
 */
function wpufe_artist_validation( $errors ) {
    if( $_POST['song_artist'] == '' ) {
        $errors[] = 'Please enter the artist name';
    }

    return $errors;
}
add_filter( 'wpuf_add_post_validation', 'wpufe_artist_validation' );
</pre>
<p>use the &#8220;<strong>wpuf_add_post_validation</strong>&#8221; filter for validating the input and return the errors.</p>
<p><strong>Note:</strong> For a reason, the errors are hidden by default. That means, if any validation fails and return errors, you&#8217;ll not see the errors.</p>
<p>There is a line in &#8220;wpuf-add-post.php&#8221; like this: </p>
<pre class="brush: php; title: ; notranslate">//echo wpuf_error_msg( $errors ); </pre>
<p> it means the errors are not shown although if it has any. The reason behind this approach is to escape PHP&#8217;s &#8220;header already sent&#8221; message (for now).</p>
<p>for edit post validation, use this filter &#8220;<strong>wpuf_edit_post_validation</strong>&#8221; just like &#8220;wpuf_add_post_validation&#8221; filter</p>
<h3>Processing the input</h3>
<p>Now that you&#8217;ve validated the user input, it&#8217;s time to process the data. </p>
<p>There is a action hook <strong>wpuf_add_post_after_insert</strong> runs after the new post creation, it returns the post id. So you can grab the post ID and process as you want.</p>
<pre class="brush: php; title: ; notranslate">
/**
 * Add the artist after new post creation
 *
 * @uses `wpuf_add_post_after_insert` action hook
 *
 * @param int $post_id the newly created post id
 */
function wpufe_add_artist( $post_id ) {
    update_post_meta( $post_id, 'artist', $_POST['song_artist'] );
}
add_action( 'wpuf_add_post_after_insert', 'wpufe_add_artist' );
</pre>
<p>for edit post area, use this action hook: &#8220;<strong>wpuf_edit_post_after_update</strong>&#8221;</p>
<h3>Other options</h3>
<h3>Modifying the new post arguments:</h3>
<p>You can modify the post arguments before running the <code>wp_insert_post( $args )</code> function. For example, if you want to change the post status forcefully -</p>
<pre class="brush: php; title: ; notranslate">
/**
 * Modify the post array
 *
 * @uses `wpuf_add_post_args` filter hook
 *
 * @param array $my_post the post array
 * @return array the post array
 */
function wpufe_change_post_status( $my_post ) {
    $my_post['post_status'] = 'pending';

    //want to change the post author?
    $my_post['post_author'] = 1;

    //must return
    return $my_post;
}

add_filter( 'wpuf_add_post_args', 'wpufe_change_post_status' );
</pre>
<p>for edit post area, use this filter: &#8220;<strong>wpuf_edit_post_args</strong>&#8221;</p>
<h3>Redirecting after new post:</strong></h3>
<p>You can set the redirection url after the new post creation. </p>
<pre class="brush: php; title: ; notranslate">
/**
 * Change the direction url
 *
 * @uses `wpuf_after_post_redirect` filter hook
 *
 * @param string $url the redirection url
 * return string new redirect url
 */
function wpufe_force_redirection( $url ) {
    return home_url('/dashboard/');
}
add_filter( 'wpuf_after_post_redirect', 'wpufe_force_redirection' );
</pre>
<h3>Showing info on dashboard:</h3>
<p>There is a hook on the plugin dashboard area <strong>wpuf_dashboard</strong>. It accepts two parameter, the user id and the currently showing post_type.</p>
<pre class="brush: php; title: ; notranslate">
/**
 * Show in dashboard
 *
 * @uses `wpuf_dashboard` action hook
 *
 * @param int $user_id the current users user id
 * @param string $post_type
 */
function weufe_dashboard_info( $user_id, $post_type ) {
    $user = get_userdata( $user_id );

    echo 'Hello ' . $user-&gt;display_name . ', Having fun?';
}
add_action( 'wpuf_dashboard', 'weufe_dashboard_info', 10, 2 );
</pre>
<h3>Disabling posting capability:</h3>
<p>You can even block a specific user from posting and show him a message/cause. Helpful for blocking spammers.</p>
<p>Lets check if a user has a meta field &#8220;paid&#8221; with the value &#8220;yes&#8221;, so we can let the users posting who paid for something, others will see a message.</p>
<pre class="brush: php; title: ; notranslate">
/**
 * Check if the current user can post
 *
 * @return bool
 */
function wpufe_can_post() {
    $user = wp_get_current_user();
    $paid = get_user_meta( $user-&gt;ID, 'paid', true );

    if( $paid == 'yes' ) {
        return true;
    }

    return false;
}

/**
 * Block the user if hasn't the post capability
 *
 * @return string
 */
function wpufe_block_user( $can_post ) {

    if( wpufe_can_post() ) {
        return 'yes';
    }

    return 'nope';
}
add_filter( 'wpuf_can_post', 'wpufe_block_user' );

/**
 * Show the message if can't post
 *
 * @param string info message
 * @return string info message
 */
function wpufe_show_message( $info ) {
    if( !wpufe_can_post() ) {
        $info = 'Sorry, you have to pay first';
    }

    return $info;
}
add_filter( 'wpuf_addpost_notice', 'wpufe_show_message' );
</pre>
<h3>Modifying the plugin options</h3>
<p>You can also change the plugin options and add your own options to the plugin settings area. Lets take a look how to add &#8220;EURO&#8221; as a currency in the plugin options area.</p>
<pre class="brush: php; title: ; notranslate">
/**
 * Adds new currency to admin options
 *
 * @param array $fields admin options
 */
function wpufe_currency_filter( $fields ) {

    foreach( $fields as $key =&gt; $val ) {
        if( $val['name'] == 'wpuf_sub_currency' ) {
            $fields[$key]['options']['EUR'] = 'EURO';
        }
    }

    return $fields;
}
add_filter( 'wpuf_build_form_args', 'wpufe_currency_filter' );
</pre>
<p>The plugin settings are build from a big array, so you can add/modify the array. So handy!</p>
<p>Related posts:<ol>
<li><a href='http://tareq.wedevs.com/2011/01/new-plugin-wordpress-user-frontend/' rel='bookmark' title='New plugin: WordPress User Frontend'>New plugin: WordPress User Frontend</a></li>
<li><a href='http://tareq.wedevs.com/2012/03/wordpress-plugin-user-login-statistics/' rel='bookmark' title='WordPress plugin: User Login Statistics'>WordPress plugin: User Login Statistics</a></li>
<li><a href='http://tareq.wedevs.com/2012/03/log-wordpress-outgoing-mails-for-debugging/' rel='bookmark' title='Log WordPress outgoing mails for debugging'>Log WordPress outgoing mails for debugging</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://tareq.wedevs.com/2012/04/how-to-extend-wp-user-frontend/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Log WordPress outgoing mails for debugging</title>
		<link>http://tareq.wedevs.com/2012/03/log-wordpress-outgoing-mails-for-debugging/</link>
		<comments>http://tareq.wedevs.com/2012/03/log-wordpress-outgoing-mails-for-debugging/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 19:37:30 +0000</pubDate>
		<dc:creator>Tareq</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[mail]]></category>

		<guid isPermaLink="false">http://tareq.wedevs.com/?p=1337</guid>
		<description><![CDATA[May be you are working in a server or in local machine, you may have situations where you want to track if mail is sending as you want. I find it very useful in my local server, because I don&#8217;t have any MTP installed in my local machine. So I use this following method to [...]
Related posts:<ol>
<li><a href='http://tareq.wedevs.com/2011/05/debugging-zend-framework-using-firebug/' rel='bookmark' title='Debugging Zend Framework using firebug'>Debugging Zend Framework using firebug</a></li>
<li><a href='http://tareq.wedevs.com/2011/07/add-your-custom-columns-to-wordpress-admin-panel-tables/' rel='bookmark' title='Add your custom columns to WordPress admin panel tables'>Add your custom columns to WordPress admin panel tables</a></li>
<li><a href='http://tareq.wedevs.com/2011/01/new-plugin-wordpress-user-frontend/' rel='bookmark' title='New plugin: WordPress User Frontend'>New plugin: WordPress User Frontend</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>May be you are working in a server or in local machine, you may have situations where you want to track if mail is sending as you want. I find it very useful in my local server, because I don&#8217;t have any MTP installed in my local machine. So I use this following method to track the outgoing mails.</p>
<h3>Utility function for logging:</h3>
<pre class="brush: php; title: ; notranslate">
/**
 * Logs error to file
 *
 * @uses `error_log` function to log on file
 *
 * @param string $error message of the error
 * @param string $type type of the error message
 */
function log_error( $error, $type = 'error' ) {
    $path = dirname( __FILE__ ) . '/log.txt';
    $msg = sprintf( &quot;[%s][%s] %s\n&quot;, date( 'd.m.Y h:i:s' ), $type, $error );
    error_log( $msg, 3, $path );
}
</pre>
<p>This function is a helper function that takes any data as input and log the data/error in a text file &#8220;log.txt&#8221; in the current directory.</p>
<h3>Main logger function:</h3>
<pre class="brush: php; title: ; notranslate">
/**
 * Log the mail to text file
 *
 * @uses `wp_mail` filter
 * @param array $mail
 */
function wedevs_mail_log( $mail ) {

    $message = &quot;to: {$mail['to']} \nsub: {$mail['subject']}, \nmsg:{$mail['message']}&quot;;
    log_error( 'mail', $message );

    return $mail;
}

add_filter( 'wp_mail', 'wedevs_mail_log', 10 );
</pre>
<p>This function adds a filter in the `wp_mail` filter and logs the mail through our logging utility function in the log.txt file. Quite handy, isn&#8217;t it?</p>
<p>Related posts:<ol>
<li><a href='http://tareq.wedevs.com/2011/05/debugging-zend-framework-using-firebug/' rel='bookmark' title='Debugging Zend Framework using firebug'>Debugging Zend Framework using firebug</a></li>
<li><a href='http://tareq.wedevs.com/2011/07/add-your-custom-columns-to-wordpress-admin-panel-tables/' rel='bookmark' title='Add your custom columns to WordPress admin panel tables'>Add your custom columns to WordPress admin panel tables</a></li>
<li><a href='http://tareq.wedevs.com/2011/01/new-plugin-wordpress-user-frontend/' rel='bookmark' title='New plugin: WordPress User Frontend'>New plugin: WordPress User Frontend</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://tareq.wedevs.com/2012/03/log-wordpress-outgoing-mails-for-debugging/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress plugin: User Login Statistics</title>
		<link>http://tareq.wedevs.com/2012/03/wordpress-plugin-user-login-statistics/</link>
		<comments>http://tareq.wedevs.com/2012/03/wordpress-plugin-user-login-statistics/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 13:07:16 +0000</pubDate>
		<dc:creator>Tareq</dc:creator>
				<category><![CDATA[My Works]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://tareq.wedevs.com/?p=1332</guid>
		<description><![CDATA[It&#8217;s a tiny plugin that logs the user login count. I made this about to months ago for a client. Now I am making it open source. You can view how many registered user logged in in your site every day. There are no other options for this plugin. Just install and it&#8217;ll log the [...]
Related posts:<ol>
<li><a href='http://tareq.wedevs.com/2011/01/new-plugin-wordpress-user-frontend/' rel='bookmark' title='New plugin: WordPress User Frontend'>New plugin: WordPress User Frontend</a></li>
<li><a href='http://tareq.wedevs.com/2010/05/wordpress-plugin-gaf-affiliate-widget/' rel='bookmark' title='WordPress Plugin: GAF affiliate widget'>WordPress Plugin: GAF affiliate widget</a></li>
<li><a href='http://tareq.wedevs.com/2009/10/custom-content-gallery-%e2%80%93-my-first-wordpress-plugin/' rel='bookmark' title='Custom Content Gallery – My first wordpress plugin'>Custom Content Gallery – My first wordpress plugin</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a tiny plugin that logs the user login count. I made this about to months ago for a client. Now I am making it open source.</p>
<p>You can view how many registered user logged in in your site every day. There are no other options for this plugin. Just install and it&#8217;ll log the users when they login in your site.</p>
<div id="attachment_1334" class="wp-caption aligncenter" style="width: 310px"><a href="http://tareq.wedevs.com/wp-content/uploads/2012/03/screenshot-1.png"><img src="http://tareq.wedevs.com/wp-content/uploads/2012/03/screenshot-1-300x191.png" alt="User Login Statistics" title="User Login Statistics" width="300" height="191" class="size-medium wp-image-1334 colorbox-1332" /></a><p class="wp-caption-text">User Login Statistics</p></div>
<h3>Download</h3>
<p>&nbsp;</p>
<p><a class="medium green awesome" title="Download from WordPress repository" href="http://wordpress.org/extend/plugins/user-login-stat/" target="_blank">Download</a> <a class="medium red awesome" title="Project on Github" href="https://github.com/tareq1988/User-Login-Stat" target="_blank">Github</a></p>
<p>Related posts:<ol>
<li><a href='http://tareq.wedevs.com/2011/01/new-plugin-wordpress-user-frontend/' rel='bookmark' title='New plugin: WordPress User Frontend'>New plugin: WordPress User Frontend</a></li>
<li><a href='http://tareq.wedevs.com/2010/05/wordpress-plugin-gaf-affiliate-widget/' rel='bookmark' title='WordPress Plugin: GAF affiliate widget'>WordPress Plugin: GAF affiliate widget</a></li>
<li><a href='http://tareq.wedevs.com/2009/10/custom-content-gallery-%e2%80%93-my-first-wordpress-plugin/' rel='bookmark' title='Custom Content Gallery – My first wordpress plugin'>Custom Content Gallery – My first wordpress plugin</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://tareq.wedevs.com/2012/03/wordpress-plugin-user-login-statistics/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>phpXperts seminar &#8211; 2011</title>
		<link>http://tareq.wedevs.com/2011/12/phpxperts-seminar-2011/</link>
		<comments>http://tareq.wedevs.com/2011/12/phpxperts-seminar-2011/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 19:34:45 +0000</pubDate>
		<dc:creator>Tareq</dc:creator>
				<category><![CDATA[Daily life]]></category>

		<guid isPermaLink="false">http://tareq.wedevs.com/?p=1326</guid>
		<description><![CDATA[phpXperts is the biggest PHP group from Bangladesh. It was started by Hasin Hayder as a yahoo group and is a great place for newbies to ask question and to solve their problems. Now the most part of the activity of this group is based on the facebook group for phpXperts . The annual seminar [...]
Related posts:<ol>
<li><a href='http://tareq.wedevs.com/2009/02/at-last-i-am-free-from-exam/' rel='bookmark' title='At last i am free from exam'>At last i am free from exam</a></li>
<li><a href='http://tareq.wedevs.com/2009/03/take-a-break-gmails-new-feature/' rel='bookmark' title='Take a break: Gmail&#8217;s new feature'>Take a break: Gmail&#8217;s new feature</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a title="phpXperts Group" href="http://tech.groups.yahoo.com/group/phpexperts/" target="_blank">phpXperts</a> is the biggest PHP group from Bangladesh. It was started by <a title="Hasin Hayder" href="http://ofhas.in/" target="_blank">Hasin Hayder</a> as a yahoo group and is a great place for newbies to ask question and to solve their problems. Now the most part of the activity of this group is based on the <a title="phpXperts Group on facebook" href="https://www.facebook.com/groups/pxperts/" target="_blank">facebook group for phpXperts </a>.</p>
<p>The annual seminar of this group was arranged this year for the 5th time. Here is the <a title="Official 2011 phpXperts page" href="http://seminar2011.phpxperts.net/" target="_blank">official page</a> of the seminar 2011. You can find the topic list and along with their speakers there.</p>
<p>The seminar was a blast. Too many great speakers with great topics and huge number of audience was the life of the seminar. All the speakers and the listeners enjoyed this event very much.</p>
<p>There is a special portion of the seminar this year and it&#8217;s called <strong>6 minutes of fame</strong>. It was a chance for new comer speakers to speak for this first time and I was a part of this great opportunity to speak in front of the audience. So I had only 6 minutes to talk on something and I choose a topic from my favorite WordPress. The topic title was <strong>&#8220;WordPress themes &amp; Plugins development &#8211; Best Practices&#8221;</strong>. As the time was very short, I wanted to cover some of the important features that a WordPress developer should take care of. Here is the slide -</p>
<div id="__ss_10624925" style="width: 425px;"><strong style="display: block; margin: 12px 0 4px;"><a title="WordPress Theme &amp; Plugin development best practices - phpXperts seminar 2011" href="http://www.slideshare.net/tareq1988/wordpress-theme-plugin-development-best-practices-phpxperts-seminar-2011" target="_blank">WordPress Theme &amp; Plugin development best practices</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/10624925" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="600" height="534"></iframe></div>
<p>Related posts:<ol>
<li><a href='http://tareq.wedevs.com/2009/02/at-last-i-am-free-from-exam/' rel='bookmark' title='At last i am free from exam'>At last i am free from exam</a></li>
<li><a href='http://tareq.wedevs.com/2009/03/take-a-break-gmails-new-feature/' rel='bookmark' title='Take a break: Gmail&#8217;s new feature'>Take a break: Gmail&#8217;s new feature</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://tareq.wedevs.com/2011/12/phpxperts-seminar-2011/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Things to do after installing Ubuntu 11.10 Oneiric Ocelot</title>
		<link>http://tareq.wedevs.com/2011/10/things-to-do-after-installing-ubuntu-11-10/</link>
		<comments>http://tareq.wedevs.com/2011/10/things-to-do-after-installing-ubuntu-11-10/#comments</comments>
		<pubDate>Sat, 15 Oct 2011 15:05:23 +0000</pubDate>
		<dc:creator>Tareq</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[11.10]]></category>
		<category><![CDATA[gnome3]]></category>
		<category><![CDATA[oneiric ocelot]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://tareq.wedevs.com/?p=1324</guid>
		<description><![CDATA[The new Ubuntu is here 2 days ago. I was using Natty Narwhal (11.04) and didn&#8217;t take any risk to use Gnome 3 there. But I couldn&#8217;t resist myself to switch to Gnome 3 this time. Here is some things I did after installing 11.10 - [Note: If you are in Bangladesh, change the default [...]
Related posts:<ol>
<li><a href='http://tareq.wedevs.com/2010/09/installing-hackintosh-iatkos-mac-os-x-leopard-10-5-8-on-dell-inspiron-1545-and-my-experience/' rel='bookmark' title='Installing hackintosh iATKOS v7 (Mac OS X leopard 10.5.8) on Dell Inspiron 1545 and my experience'>Installing hackintosh iATKOS v7 (Mac OS X leopard 10.5.8) on Dell Inspiron 1545 and my experience</a></li>
<li><a href='http://tareq.wedevs.com/2008/11/ubuntus-problem-solve-is-in-pdf-now/' rel='bookmark' title='Ubuntu&#8217;s problem solve is in PDF now'>Ubuntu&#8217;s problem solve is in PDF now</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The new Ubuntu is here 2 days ago. I was using Natty Narwhal (11.04) and didn&#8217;t take any risk to use Gnome 3 there. But I couldn&#8217;t resist myself to switch to Gnome 3 this time. Here is some things I did after installing 11.10 -</p>
<p>[<strong>Note:</strong> If you are in Bangladesh, change the default mirror to Main Server or Server for United States, it'll save a lot of troubles]</p>
<p><strong>1.</strong> Update your repository first</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">sudo apt-get update</pre>
<p><strong>2.</strong> Install resticted extras package for audio/video codec support and Vlc</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">sudo apt-get install ubuntu-restricted-extras vlc</pre>
<p><strong>3.</strong> Surely you want switch to Gnome 3, aren&#8217;t you?</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">sudo apt-get install gnome-shell</pre>
<p><strong>4.</strong> Install Gnome shell Tweak tool</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">sudo apt-get install gnome-tweak-tool</pre>
<p><img class="colorbox-1324"  src="http://lh3.googleusercontent.com/-IS_B6Zmf5es/Tpbj3UvbRaI/AAAAAAAAGQA/lH-hCAUaPWE/gnome-tweak-tool.png" alt="Gnome tweak Tool" /><span id="more-1324"></span></p>
<p><strong>5.</strong> You might be very familiar with Synaptic package manager like me, install it</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">sudo apt-get install synaptic</pre>
<p><img class="colorbox-1324"  src="http://lh4.googleusercontent.com/-Orivn0pz4zU/Tpbj3R0Q-MI/AAAAAAAAGQU/Pl6jZcPpMDA/s400/synaptic.png" alt="Synaptic package manager" /></p>
<p><strong>6.</strong> You might need this file previewer for nautilus, it&#8217;s nice</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">sudo apt-get install gnome-sushi</pre>
<p><img class="colorbox-1324"  src="http://lh3.googleusercontent.com/-vNiBH010MJI/Toj29DaCVfI/AAAAAAAAGGU/72t2k4gFKtE/s400/nautilus-sushi_2.png" alt="Gnome Sushi" /></p>
<p><strong>7.</strong> To run a quick application launch command, Alt+F2 is the most useful thing. But it didn&#8217;t worked for me like many others. To fix it, open &#8220;System Settings&#8221; =&gt; Keyboard =&gt; Shortcuts =&gt; System, click &#8220;Disabled&#8221; next to &#8220;Show the run command prompt&#8221; and press ALT+F2. This should set ALT + F2 for running the command prompt.</p>
<p><strong>8.</strong> Webupd8 team has a nice repository for gnome3 shell extensions, add that repository</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">sudo add-apt-repository ppa:webupd8team/gnome3
sudo apt-get update
sudo apt-get install gnome-shell-extensions-user-theme gnome-shell-extensions-alternative-tab gnome-shell-extensions-dock gnome-shell-extensions-drive-menu gnome-shell-extensions-pidgin gnome-shell-extensions-system-monitor gnome-shell-extensions-weather gnome-shell-extensions-windows navigator</pre>
<p><strong>9.</strong> You&#8217;ll not see any maximize, minimize buttons in the titlebar. If you are habituated by using the menu in the left side of the window, lets get those buttons and move them to the left. Open gconf-editor by pressing Alt+F2 and enter <code>gconf-editor</code> as the command. And open just like the image. Set the value of button_layout as &#8220;close,maximize,minimize:&#8221;.<br />
<img class="colorbox-1324"  src="http://i.imgur.com/0kO4P.png" alt="Gnome Configuration Editor" /></p>
<p><strong>10.</strong> Install google chrome</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo deb http://dl.google.com/linux/chrome/deb/ stable main &amp;gt;&amp;gt; /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install google-chrome-stable</pre>
<p><strong>11.</strong> Hotot is my favorite twitter client, you might love it</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">sudo add-apt-repository ppa:hotot-team
sudo apt-get update &amp;&amp; sudo apt-get install hotot</pre>
<p><strong>12.</strong> If you have some drives with NTFS file-system, lets mount them automatically</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">sudo apt-get install ntfs-config ntfs-3g hal</pre>
<p>then press Alt+F2 and enter the command &#8220;ntfs-config&#8221; to open the Gui</p>
<p><strong>13.</strong> Install pidgin, I hate empathy</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">sudo apt-get install pidgin</pre>
<p><strong>14.</strong> If you are a Bangladeshi user like me and use probhat or unijoy keyboard layout, lets grab the m17-db, as the layouts are missing in this version</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">sudo apt-get install ibus ibus-m17n m17n-db m17n-contrib ibus-gtk</pre>
<p>Now you can use probhat or unijoy or inscript using ibus. The default keyboard has also probhat keyboard support, but I like to use ibus. iBus doesn&#8217;t run every time you login in ubuntu, so we need to run it on startup. Goto &#8220;Startup Applications&#8221; =&gt; click the button: Add and input the data like this:</p>
<blockquote><p>Name: IBus daemon<br />
Command: /usr/bin/ibus-daemon -d<br />
Comment: start IBus daemon when Gnome starts</p></blockquote>
<p><strong>15.</strong> You might need to install build essential package if you are related to programming and geany</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">sudo apt-get install build-essential geany</pre>
<p><strong>16.</strong> Install skype</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">sudo apt-get install skype</pre>
<p><strong>17.</strong> Shutter is a great tool for taking screenshots</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">sudo apt-get install shutter</pre>
<p><strong>18.</strong> You can install tasksel. It helps to install a bunch of things at once. Like installing LAMP server with sudo tasksel install lamp-server. But before this, you need to install tasksel</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">sudo apt-get install tasksel</pre>
<p>Thats the all thing I can remember right now.</p>
<h3>Some shell tips:</h3>
<ul>
<li>You can start screencast recording in gnome3 by pressing Ctrl+Alt+Shift+R. It&#8217;ll save in your home folder in webm format.</li>
<li>Launch any program by pressing windows key and typing the program name</li>
<li>In Gnome3, at first you have to logout and then you can shutdown/restart your computer. But clicking at your username in top-right corner at the screen and pressing Alt key will change the option named the &#8220;Suspend&#8221; into a &#8220;Power Off&#8221; menu item.</li>
</ul>
<p>Related posts:<ol>
<li><a href='http://tareq.wedevs.com/2010/09/installing-hackintosh-iatkos-mac-os-x-leopard-10-5-8-on-dell-inspiron-1545-and-my-experience/' rel='bookmark' title='Installing hackintosh iATKOS v7 (Mac OS X leopard 10.5.8) on Dell Inspiron 1545 and my experience'>Installing hackintosh iATKOS v7 (Mac OS X leopard 10.5.8) on Dell Inspiron 1545 and my experience</a></li>
<li><a href='http://tareq.wedevs.com/2008/11/ubuntus-problem-solve-is-in-pdf-now/' rel='bookmark' title='Ubuntu&#8217;s problem solve is in PDF now'>Ubuntu&#8217;s problem solve is in PDF now</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://tareq.wedevs.com/2011/10/things-to-do-after-installing-ubuntu-11-10/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Galaxy Mini S5570 downgrading Gingerbread 2.3.4 to Froyo 2.1</title>
		<link>http://tareq.wedevs.com/2011/10/galaxy-mini-s5570-downgrading-gingerbread-2-3-4-to-froyo-2-1/</link>
		<comments>http://tareq.wedevs.com/2011/10/galaxy-mini-s5570-downgrading-gingerbread-2-3-4-to-froyo-2-1/#comments</comments>
		<pubDate>Sat, 15 Oct 2011 13:29:33 +0000</pubDate>
		<dc:creator>Tareq</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[Bangla]]></category>
		<category><![CDATA[bengali]]></category>
		<category><![CDATA[complex script]]></category>
		<category><![CDATA[froyo]]></category>
		<category><![CDATA[gingerbread]]></category>
		<category><![CDATA[indic]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[ROM]]></category>

		<guid isPermaLink="false">http://tareq.wedevs.com/?p=1321</guid>
		<description><![CDATA[After I saw the latest release Gingerbread 2.3.4 in samfirmwire.com about a month ago, I decided to upgrade my Galaxy Mini from Froyo (2.1). I upgraded without any hassle. The experience was quite good. The phone was more faster and also the touch response was really good. I was happy with that But, as Bangla [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>After I saw the latest release Gingerbread 2.3.4 in <a title="Sam Firmware" href="http://www.samfirmware.com/WEBPROTECT-s5570.htm" target="_blank">samfirmwire.com</a> about a month ago, I decided to upgrade my Galaxy Mini from Froyo (2.1). I upgraded without any hassle. The experience was quite good. The phone was more faster and also the touch response was really good. I was happy with that <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley colorbox-1321' /> </p>
<p>But, as Bangla is my native language and I use it a lot in my online activity including twitter, facebook, forum, etc &#8211; it was a must have support for my phone and I had that in my default ROM (<strong>S5570DDKC1</strong>). Although I had root my phone and install a new font. What problem I faced that, the gingerbread build of the ROM hadn&#8217;t support for complex script rendering. Although it was an Asian build, but it was lacking of complex script rendering support. So I couldn&#8217;t see Bangla clearly on the Gingerbread. Replacing the DroidSansFallback.ttf font was showing the characters, but rendering was faulty. So I decided to downgrade my Android OS to the Froyo stock ROM. I tried two Gingerbread ROM that time, one is <strong>S5570ZSKPB &#8211; China build</strong> and other one was <strong>S5570XXKPK &#8211; Russian build</strong>.<br />
<span id="more-1321"></span></p>
<p>So, what I did next is &#8211; download the official ROM and install with the mighty Odin <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley colorbox-1321' />  . But the problem was, it didn&#8217;t boot after installing Froyo. After installing, it comes with just a black screen and nothing else, no samsung logo or anything. But Odin can detect it. I was confused, why it doesn&#8217;t boot? As the power button and any combination key was not working (including the download mode combination), I thought I bricked my precious phone <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley colorbox-1321' />  . But then I found a way, removed the battery, pressing volume down+menu+power and again inserting the battery, the phone comes to download mode again. Then installing gingerbread boots fine, but when I install Froyo, it doesn&#8217;t boot.</p>
<p>The problem was, the bootloader of the Gingerbread was updated version than Froyo. So it replaced the Froyo bootloader and when I was installing the Froyo ROM, the Gingerbread bootloader was refusing to boot again. So I had to somehow replace the bootloader with the Froyo bootloader.</p>
<div class="wp-caption aligncenter" style="width: 330px"><a href="http://1.bp.blogspot.com/-B_zZY64DE8w/TjGayKCvlkI/AAAAAAAABxk/HAUBd6M7JC8/s1600/odin+xxkpg+s5570+2.3.4+gingerbread.jpg"><img class="  colorbox-1321" title="ROM without bootloader" src="http://1.bp.blogspot.com/-B_zZY64DE8w/TjGayKCvlkI/AAAAAAAABxk/HAUBd6M7JC8/s320/odin+xxkpg+s5570+2.3.4+gingerbread.jpg" alt="ROM without bootloader" width="320" height="223" /></a><p class="wp-caption-text">ROM without bootloader</p></div>
<p>You&#8217;ll see that, what ROM&#8217;s you get in samfirmware is only a single *.tar file. So I had to find a ROM that comes with a bootloader too. Luckily, samfirmware has this one. You&#8217;ll see the last part of the <a title="Sam Firmware" href="http://www.samfirmware.com/WEBPROTECT-s5570.htm" target="_blank">ROM page</a> is &#8220;Provider Samsung S5570 Firmwares&#8221;. Those ROM&#8217;s comes with 4 different files. I downloaded the &#8220;<strong>S5570XWKE3</strong>&#8221; ROM and found the following files:</p>
<ol>
<li>APBOOT_S5570XWKE3_CL991862_REV02_user_low_true.tar.md5</li>
<li>CODE_S5570XWKE3_CL991862_REV02_user_low_true.tar.md5</li>
<li>GT-S5570-CSC-ERAKE3.tar.md5</li>
<li>MODEM_S5570XXKB2_CL968961_REV02.tar.md5</li>
</ol>
<div class="wp-caption aligncenter" style="width: 410px"><a href="http://4.bp.blogspot.com/-gkWcapOu2W0/ToS3jKcfxcI/AAAAAAAAB7g/W-Bmh0jUJMk/s1600/odin+flashing+arabic+android+2.3.4+gingerbread+s5570jpq8+samsung+galaxy+Mini.jpg"><img class="   colorbox-1321" title="ROM with bootloader" src="http://4.bp.blogspot.com/-gkWcapOu2W0/ToS3jKcfxcI/AAAAAAAAB7g/W-Bmh0jUJMk/s400/odin+flashing+arabic+android+2.3.4+gingerbread+s5570jpq8+samsung+galaxy+Mini.jpg" alt="ROM with bootloader" width="400" height="267" /></a><p class="wp-caption-text">ROM with bootloader</p></div>
<p>Installing this ROM with Odin did the trick and my phone was again back to Froyo. As now I&#8217;ve the Froyo bootloader, again I installed the Indian ROM S5570DDKC1. And again I got the nice Bangla support <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley colorbox-1321' /> </p>
<p>This font rendering part is keeping us away from using the latest build. Android developers should really give us a way to choose what language we want to use, may be with some external application or some another way. I see posts in Google android group, XDA developers forum and other android forums &#8211; people are shouting about this issue. But no solve came till now. It&#8217;s really depressing, we badly need it <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley colorbox-1321' /> </p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://tareq.wedevs.com/2011/10/galaxy-mini-s5570-downgrading-gingerbread-2-3-4-to-froyo-2-1/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.597 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-19 15:46:18 -->

