<?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>The home of Lalu</title>
	<atom:link href="http://www.lbsaud.com.np/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lbsaud.com.np</link>
	<description></description>
	<lastBuildDate>Sat, 04 Feb 2012 17:17:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<item>
		<title>Stay safe online</title>
		<link>http://www.lbsaud.com.np/stay-safe-online/</link>
		<comments>http://www.lbsaud.com.np/stay-safe-online/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 13:51:54 +0000</pubDate>
		<dc:creator>Lalu</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.lbsaud.com.np/?p=385</guid>
		<description><![CDATA[Security is one of the most vague topic for any individual or company that is related to some sort of Web Services. It may be either a company providing online services for its customer, or an individual that is hosting his/her private portal or a user that surfs internet and shares some of his private [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Security is one of the most vague topic for any individual or company that is related to some sort of Web Services. It may be either a company providing online services for its customer, or an individual that is hosting his/her private portal or a user that surfs internet and shares some of his private information in the net. Security is one of the major concern that every individual has to think about before going in the internet.</p>
<p>I will talk about Application Security or Network Security in some other articles. Here I am focusing on the individual user&#8217;s security. Most probably the user should be aware of some kind of Computer Frauds, Internet Blackmailing, Sexual Abuses and Identity Theft.<span id="more-385"></span></p>
<p>Here I am providing some tips for your and your family&#8217;s safety if you are going over the internet:</p>
<p><strong>1. Never gice out your personal information unless it is for verified source </strong>(Such as your full name, phone number, address, email address, school name to people you meet on-line)</p>
<p><strong>2. Be very careful about what you say and post (</strong>About yourself (or your friends) in chat rooms or other public places like social networking sites. Once it is out there, it is public and you cannot take it back)</p>
<p><strong>3. Meeting someone you only met can be dangerous </strong>(Never agree to meet anyone in person, alone. Only do so with your parent’s permission, meet in a public place and bring one of them or a trusted adult with you.)</p>
<p>Remember, that online people often lie about who they are. Angel14 could be a Man aged 45.</p>
<p><strong>4. Never respond to nasty, suggestive (sexual solicitations) or rude emails or postings.</strong></p>
<p><strong>5. Be a good online citizen and treat others as you would like to be treated yourself.</strong></p>
<p><strong>6. Never give your internet password to anyone, not even to your best friend. Also, learn about creating complex password and password security.<br />
</strong></p>
<p><strong>7. Learn more about new types of threats to Internet Users (such as Scams, Phishing etc  ) and about problems with technological advances.</strong></p>
<p><strong>8. Never accept emails, Internet message( like on Yahoo messenger), or open files, pictures or texts from people you don’t know.</strong></p>
<p>&nbsp;</p>
<div class="shr-publisher-385"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.lbsaud.com.np/stay-safe-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hacker vs Cracker</title>
		<link>http://www.lbsaud.com.np/hacker-vs-cracker/</link>
		<comments>http://www.lbsaud.com.np/hacker-vs-cracker/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 19:23:42 +0000</pubDate>
		<dc:creator>Lalu</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.lbsaud.com.np/?p=391</guid>
		<description><![CDATA[Have you ever heard this statement? &#8220;Every cracker is a hacker but every hacker is not a cracker!!&#8221; Well, if you are a computer enthusiast, then probably yes. One of my friends asked me about this statement and I thought I have satisfied him with my answer. I think, this phrase defines the difference between [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Have you ever heard this statement?</p>
<p>&#8220;Every cracker is a hacker but every hacker is not a cracker!!&#8221;</p>
<p>Well, if you are a computer enthusiast, then probably yes. One of my friends asked me about this statement and I thought I have satisfied him with my answer. I think, this phrase defines the difference between hacker and a cracker and is useful to share here.</p>
<p>Today, most of the writers and people define the term Hacker and Cracker synonymously. However, we are separating both the terms over here. So, let’s first define what a hacker is?<span id="more-391"></span></p>
<p>The RFC 1392: Internet Users’ Glossary defines “hacker” as:</p>
<p>&#8220;Hacker is a person who delights in having an intimate understanding of the internal workings of a system, computers and computer networks in particular. The term is often misused in a pejorative context, where “cracker” would be the correct term.&#8221;</p>
<p>Some other definition defines the term hacker as:</p>
<p>&#8220;A person who enjoys exploring the details of programmable systems and how to stretch their capabilities, as opposed to most users, who prefer to learn only the minimum necessary.&#8221;</p>
<p>So, this means a hacker is a nice guy which penetrates the security flaws for the world&#8217;s goodness. Let&#8217;s see what a Cracker means than,</p>
<p>A security cracker is someone whose purpose is to circumvent or break security measures. Some security crackers end up using their powers for good, providing penetration testing services or otherwise making efforts on the side of the angels. Many others use their powers for evil, however, as we are all too painfully aware.</p>
<p>Often there are misconceptions about Hacker as it is identical with a computer expert who was evil and damaging people’s computer systems or institutions, but this opinion was not true. Often Hackers are also known as White Hats and Crackers as Black Hats. Today, most of the people term Hackers as Ethical Hackers and Crackers as Hackers.</p>
<p>Hacker is a term for those who provide a useful contribution to the computer network, make a small program and share it with people on the Internet. Those, who have the satisfaction of breaking through computer and communication system, true hackers call these people ‘crackers’ and do not like to hang out with them. True hackers regard crackers as lazy people, not responsible, and not too savvy. Real hackers do not agree to say that the person through the security has become a hacker.</p>
<p>True hackers will always act based on the code of ethics and rules of the game whereas a cracker does not poses any code of ethics. According to the level of experience and skills, the Hacker’s Communities often categorize hackers as: Elite, Semi Elite, Kiddies and Lamer.</p>
<p>Cracker is a term for those who go into other people’s systems and do some destructive works, usually on a computer network, bypasses passwords or licenses a computer program, knowingly against computer security, deface the web home page belonged to someone else, even up to delete the data of others, stealing data and generally do the cracking to his own advantage, malice, or for other reasons as there are challenges.</p>
<p>So, regarding the phrase that we have read in the start of this post, a true hacker is someone who bears knowledge about finding security flaws in the computer and a cracker is someone who also has skills on finding security flaws as well as providing destructive characteristics that is not the case with real hackers. This justifies the statement given above.</p>
<div class="shr-publisher-391"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.lbsaud.com.np/hacker-vs-cracker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redirect Registration Plugin for Joomla</title>
		<link>http://www.lbsaud.com.np/redirect-registration-plugin/</link>
		<comments>http://www.lbsaud.com.np/redirect-registration-plugin/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 18:22:00 +0000</pubDate>
		<dc:creator>Lalu</dc:creator>
				<category><![CDATA[Joomla]]></category>

		<guid isPermaLink="false">http://www.lbsaud.com.np/?p=377</guid>
		<description><![CDATA[This is a simple plugin, that is created to redirect the users of a Joomla site from default registration page to Jomsocial registration page. To be able to work perfectly, the plugin needs prior installation of Jomsocial in your Joomla site. This plugin only works with Joomla version 1.6/1.7 with Jomsocial installed. This plugin will [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div id="attachment_422" class="wp-caption alignright" style="width: 202px"><a href="http://www.lbsaud.com.np/wp-content/uploads/2011/12/redirect_registration.png"><img class=" wp-image-422   colorbox-377" title="Redirect Registration for Joomla" src="http://www.lbsaud.com.np/wp-content/uploads/2011/12/redirect_registration-300x254.png" alt="Redirect Registration for Joomla" width="192" height="162" /></a><p class="wp-caption-text">Redirect Registration for Joomla</p></div>
<p>This is a simple plugin, that is created to redirect the users of a Joomla site from default registration page to Jomsocial registration page. To be able to work perfectly, the plugin needs prior installation of Jomsocial in your Joomla site. This plugin only works with Joomla version 1.6/1.7 with Jomsocial installed. This plugin will be helpful if you want to register users only from a single registration page using Jomsocial. Otherwise, there will be two different registration pages in your Joomla site.<span id="more-377"></span></p>
<p>Click on the link below to download the plugin:</p>
<p><a title="Redirect Registration Plugin for Joomla" href="http://www.lbsaud.com.np/wp-content/uploads/2011/12/plg_redirectreg_1.1.zip">Download Registration Redirect Plugin for Joomla 1.6/1.7/2.5</a></p>
<p>&nbsp;</p>
<p>Updates in V1.1<br />
+++++++++++++++++++++</p>
<ol>
<li>Add Jomsocial Itemid<br />
Itemid preserves the module positions, templates, access control (acl), sef URL etc. If you have created the menu link for Jomsocial, then you will get an Itemid. Add it here. Leave blank if you don&#8217;t have it. Add numeric value only. This only works if SEF links are enabled.<br />
If you want to know more about Itemids in Joomla, <a href="http://www.joomlamarketing.org/further-reading/blog/joomla-what-s-in-an-itemid.html" target="_blank">here</a> is a good post. Check <a href="http://www.ostraining.com/blog/joomla/what-is-the-joomla-itemid/" target="_blank">this</a> also.<br />
You can add Itemid from the plugin  parameters on plugin page. If you don&#8217;t want to add Itemid, then leave the field blank.</li>
<li>Redirect Joomla Login link to Jomsocial Login Page<br />
The Joomla has a default login page (except the module). If you want to redirect the default Joomla login to Jomsocial login page, then you can enable this feature from the plugin parameters. This feature is turned off by default.</li>
</ol>
<p>&nbsp;</p>
<p>There are other plugins to do this job for Joomla 1.5, however there are not for Joomla 1.6/1.7. So I created this plugin. If you find this plugin helpful, then please leave some good review on JED. Thanks.</p>
<div class="shr-publisher-377"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.lbsaud.com.np/redirect-registration-plugin/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Enable Nepali Unicode in Ubuntu</title>
		<link>http://www.lbsaud.com.np/nepali-unicode-in-ubuntu/</link>
		<comments>http://www.lbsaud.com.np/nepali-unicode-in-ubuntu/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 12:31:29 +0000</pubDate>
		<dc:creator>Lalu</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.lbsaud.com.np/?p=351</guid>
		<description><![CDATA[Enabling Nepali Unicode Romanized Layout in Ubuntu is very easy. In-fact, there is no need to install any Unicode drivers as needed in Windows Computers. Nepali Unicode drivers already come bundled with Ubuntu. We just need to enable it in Ubuntu. To enable Nepali Unicode, just follow the steps described below: How to enable Nepali [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://www.lbsaud.com.np/wp-content/uploads/2011/12/nepali_unicode.jpeg"><img class="size-full wp-image-369  alignright colorbox-351" style="margin-left: 5px; margin-right: 5px;" title="Nepali Unicode" src="http://www.lbsaud.com.np/wp-content/uploads/2011/12/nepali_unicode.jpeg" alt="Nepali Unicode" width="219" height="147" /></a>Enabling Nepali Unicode Romanized Layout in Ubuntu is very easy. In-fact, there is no need to install any Unicode drivers as needed in Windows Computers. Nepali Unicode drivers already come bundled with Ubuntu. We just need to enable it in Ubuntu.</p>
<p>To enable Nepali Unicode, just follow the steps described below:</p>
<p><span id="more-351"></span></p>
<p><strong>How to enable Nepali Unicode in Ubuntu &#8211; Unity</strong></p>
<p>To enable Nepali Unicode in Ubuntu Unity Desktop Interface, simply click on Dash Home at the launcher and type System Settings and press Enter. Alternatively you can also select System Setting icon from the launcher at right side of the window.</p>
<div id="attachment_359" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.lbsaud.com.np/wp-content/uploads/2011/12/Step-1.png"><img class="size-medium wp-image-359  colorbox-351" title="System Settings in Ubuntu" src="http://www.lbsaud.com.np/wp-content/uploads/2011/12/Step-1-300x220.png" alt="System Settings in Ubuntu" width="300" height="220" /></a><p class="wp-caption-text">System Settings in Ubuntu</p></div>
<p>The System Settings window will open as shown in figure above. From there, select Keyboard Layout option. Initially, you will see only English Language there.</p>
<p>Click on the &#8216;+&#8217; button at the bottom of the window and select Nepali, then click Add button. After adding Nepali Language Keyboard Layout, you will see the Keyboard Layout icon automatically pop up in the top bar from where you can change between English and Nepali Keyboard Layouts.</p>
<div id="attachment_361" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.lbsaud.com.np/wp-content/uploads/2011/12/Step-2.png"><img class="size-medium wp-image-361 colorbox-351" title="Select Nepali in Keyboard Layout" src="http://www.lbsaud.com.np/wp-content/uploads/2011/12/Step-2-300x199.png" alt="Select Nepali in Keyboard Layout" width="300" height="199" /></a><p class="wp-caption-text">Select Nepali in Keyboard Layout</p></div>
<p>&nbsp;</p>
<p><strong>How to enable Nepali Unicode in Ubuntu &#8211; Gnome</strong></p>
<p>Enabling Nepali Unicode in Ubuntu Gnome interface is similar however there are slight differences when you go to System Settings -&gt; Keyboard Layout window. There you will see three tabs. Now click on the Layouts Tab and add the Nepali Keyboard Layout by clicking on &#8216;+&#8217; button at the bottom. The process is similar as described above.</p>
<div id="attachment_367" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.lbsaud.com.np/wp-content/uploads/2011/12/Step-3.png"><img class="size-medium wp-image-367 colorbox-351" title="Adding Keyboard Layout in GNome" src="http://www.lbsaud.com.np/wp-content/uploads/2011/12/Step-3-300x208.png" alt="Adding Keyboard Layout in GNome" width="300" height="208" /></a><p class="wp-caption-text">Adding Keyboard Layout in GNome</p></div>
<p>&nbsp;</p>
<p><strong>Adding shortcut for Layout Switching between English and Nepali</strong><br />
You can also set the shortcut keys to change the layout from keyboard. To do this, in the Keyboard Layout window, click on Options button. Go to the Key(s) to Change Layout option and select appropriate key combination such as &#8216;Alt+Shift&#8217;.</p>
<div id="attachment_362" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.lbsaud.com.np/wp-content/uploads/2011/12/Step-4.png"><img class="size-medium wp-image-362 colorbox-351" title="Keyboard Layout Options" src="http://www.lbsaud.com.np/wp-content/uploads/2011/12/Step-4-300x197.png" alt="Keyboard Layout Options" width="300" height="197" /></a><p class="wp-caption-text">Keyboard Layout Options</p></div>
<p>That&#8217;s it. You are done. Now, you can easily type in Nepali Unicode in Ubuntu and switch between languages by using keyboard keys.</p>
<p>&nbsp;</p>
<div class="shr-publisher-351"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.lbsaud.com.np/nepali-unicode-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Hide content or modules from frontpage in Joomla</title>
		<link>http://www.lbsaud.com.np/hide-content-or-modules-from-frontpage-in-joomla/</link>
		<comments>http://www.lbsaud.com.np/hide-content-or-modules-from-frontpage-in-joomla/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 15:11:47 +0000</pubDate>
		<dc:creator>Lalu</dc:creator>
				<category><![CDATA[Joomla]]></category>

		<guid isPermaLink="false">http://www.lbsaud.com.np/?p=338</guid>
		<description><![CDATA[Often we come to conditions where we do not want to display modules or content in the front page. One example of this is, we do not display breadcrumb (pathway) in the front page of a Joomla website. So, lets see how we can achieve this: Please note that the simplest way to hide modules [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Often we come to conditions where we do not want to display modules or content in the front page. One example of this is, we do not display breadcrumb (pathway) in the front page of a Joomla website. So, lets see how we can achieve this:</p>
<p>Please note that the simplest way to hide modules from front page is to click on the required module from Joomla administration and under menu assignment, you can select all other menu items except home menu. This will display the module on all pages except front page. However, this method does not work for some of our specific requirements. Also, to hide content from front page, you need to follow the method described below.<span id="more-338"></span></p>
<p>To hide content or modules from front page, we need to modify index.php file of the default template. So, open index.php file of your default template, which is inside templates/[default template folder]/.</p>
<p><strong>How to hide content from front page?</strong></p>
<p>To hide content from front page, you need to add following code where you display content in your template:</p>
<pre class="brush:php">&lt;?php
$menu = &amp;JSite::getMenu();
if ($menu-&gt;getActive() != $menu-&gt;getDefault()) {
?&gt;
    &lt;jdoc:include type="component" /&gt;
&lt;?php } ?&gt;</pre>
<p><strong>How to hide module from front page?</strong></p>
<p>To hide module from front page, you need to add the module position in the place of component, such as:</p>
<pre class="brush:php">&lt;?php
$menu = &amp;JSite::getMenu();
if ($menu-&gt;getActive() != $menu-&gt;getDefault()) {
?&gt;
    if($this-&gt;countModules('breadcrumb')) : ?&gt;
                &lt;div id="breadcrumb"&gt;
                    &lt;jdoc:include type="modules" name="breadcrumb" /&gt;
                &lt;/div&gt;
                &lt;?php endif; 

} ?&gt;</pre>
<p>Here, the module position breadcrumb is displayed in other pages except front page. We have also checked if there is any module published in the breadcrumb position or not.</p>
<p><strong>Hiding modules for specific pages in a component displayed in front page</strong></p>
<p>Sometimes the above described methods may not be sufficient to achieve what we wanted. One of the cases that I have faced is when I was developing a directory site in Joomla. I have used SOBI2 extensions and in the front page, the SOBI2 categories were displayed. And the requirement is, do not display the breadcrumb in the front page (the category page) while in other pages (sub-category pages, item details page etc.) of SOBI2 we need it. Now, non of the methods described above worked for me, because the Itemid that the menu takes is same for all pages as it was for the home page.</p>
<p>So, I slightly modified the above if condition for not just checking the default menu item as well as the URL return value by get method. The example is as:</p>
<p>&nbsp;</p>
<div class="shr-publisher-338"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.lbsaud.com.np/hide-content-or-modules-from-frontpage-in-joomla/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XSS Validation in Joomla Components</title>
		<link>http://www.lbsaud.com.np/xss-validation-in-joomla-components/</link>
		<comments>http://www.lbsaud.com.np/xss-validation-in-joomla-components/#comments</comments>
		<pubDate>Sat, 22 Oct 2011 05:17:51 +0000</pubDate>
		<dc:creator>Lalu</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Extensions Development]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://www.lbsaud.com.np/?p=308</guid>
		<description><![CDATA[Before reading this article, you must have knowledge about Joomla extensions development. If you don&#8217;t know how to develop joomla extensions, then I suggest to read Developing Component in Joomla first. If you have created a user input form in your Joomla component, such as Comment Form or Picture Upload Form, then you must be [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Before reading this article, you must have knowledge about Joomla extensions development. If you don&#8217;t know how to develop joomla extensions, then I suggest to read <a href="http://docs.joomla.org/Developing_a_Model-View-Controller_%28MVC%29_Component_for_Joomla!1.6" target="_blank">Developing Component in Joomla</a> first.</p>
<p>If you have created a user input form in your Joomla component, such as Comment Form or Picture Upload Form, then you must be aware that processing the user input without properly validating it may make the application vulnerable to XSS attacks. Most of the extensions that doesnot properly validate their inputs against XSS vulnerability are prone to attacks from attackers.<span id="more-308"></span></p>
<p><strong>So, What is an XSS attack?</strong></p>
<p><strong></strong>Cross Site Scripting (XSS) is a common website vulnerability, that can be exploited if proper input sanitation is not used in custom Web Applications.</p>
<p>XSS is one of the most common website attack, in which attackers inject client-side scripts into a web page mostly from input forms, which displays odd behavior when viewed by other users. Their effect may range from a petty nuisance to a significant security risk, depending on the sensitivity of the data handled by the vulnerable site and the nature of any security mitigation implemented by the site&#8217;s owner.</p>
<p>Search google for more information on XSS attack.</p>
<p>Let&#8217;s see how you can provide safeguards to your extension against XSS attacks in Joomla.</p>
<p><strong>Validating Form Inputs in Joomla</strong></p>
<p>Joomla has its inbuilt validate module for validating Form inputs. You just need to call that module in your model before saving the input data. In your Joomla component, the controller calls the store function in the required model for saving data. In the controller, you should have the something like this:</p>
<pre class="brush:php">/**
     * Method to save a record.
     *
     * @param    string    $key    The name of the primary key of the URL variable.
     * @param    string    $urlVar    The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
     *
     * @return    Boolean    True if successful, false otherwise.
     * @since    1.6
     */

public function save()
{
        JRequest::checkToken() or die( 'Invalid Token' );

        $model = $this-&gt;getModel('[ModelName]');     //[ModelName]: Use your model name

        if ($model-&gt;store())
        {
            $msg = JText :: _('COM_XXX_DATA_SAVED_SUCCESS');
        }
        else
        {
            $msg = JText :: _('COM_XXX_DATA_SAVED_ERROR');
        }

        $link = 'index.php?option=com_xxx&amp;view=[ViewName]';    //[ViewName]: Use viewname to display after saving data
        $this-&gt;setRedirect($link, $msg);
}</pre>
<p>This controller function passes control to the model where actual store of input data takes place and returns true if everything is fine. Now, in the model you should have following code to store the data:</p>
<pre class="brush:php">/**
     *
     * Store the Data
     *
     */

    function store()
    {
	// Check the request token.
	JRequest::checkToken('post') or jexit(JText::_('JINVALID_TOKEN'));

	// Initialise variables.
	$app	= JFactory::getApplication();
        $row    = &amp; $this-&gt;getTable('[TableName]');  //[TableName]: Use your table class here

        // Get the user data.
	$requestData = JRequest::getVar('jform', array(), 'post', 'array');

	if (!$row-&gt;bind($data))
	{
	    $this-&gt;setError($this-&gt;_db-&gt;getErrorMsg());
	    return false;
	}

	if (!$row-&gt;store())
	{
	    $this-&gt;setError($this-&gt;_db-&gt;getErrorMsg());
	    return false;
	}

	return true;
}</pre>
<p>This function gets data from the input form, binds it to the table row and if everything is fine, stores it to the database. However, you are storing the information without properly validating it. Hence, any html or javascript tags inside the input box will be accepted and stored in the database.</p>
<p>To validate against XSS you need to add validation module in the store function of module. Now, the function looks like:</p>
<pre class="brush:php">/**
 *
 * Store the Data
 *
 */

function store()
{
	// Check the request token.
	JRequest::checkToken('post') or jexit(JText::_('JINVALID_TOKEN'));

	// Initialise variables.
	$app	= JFactory::getApplication();
        $row    = &amp; $this-&gt;getTable('[TableName]');  //[TableName]: Use your table class here

        // Get the user data.
	$requestData = JRequest::getVar('jform', array(), 'post', 'array');

	// Validate the posted data.
	$form	= $this-&gt;getForm();

	if (!$form) {
		JError::raiseError(500, $model-&gt;getError());
		return false;
	}

	$data	= $this-&gt;validate($form, $requestData);

	// Check for validation errors.
	if ($data === false) {
		// Get the validation messages.
		$errors	= $this-&gt;getErrors();

		// Push up to three validation messages out to the user.
		for ($i = 0, $n = count($errors); $i &lt; $n &amp;&amp; $i &lt; 3; $i++) {
			if (JError::isError($errors[$i])) {
				$app-&gt;enqueueMessage($errors[$i]-&gt;getMessage(), 'warning');
			} else {
				$app-&gt;enqueueMessage($errors[$i], 'warning');
			}
		}

		// Save the data in the session.
		$app-&gt;setUserState('com_xxx.[ViewName].data', $data);   //[ViewName]: Enter view name here

		// Redirect back to the input form
		$this-&gt;setRedirect(JRoute::_('index.php?option=com_xxx&amp;view=[ViewName]', false));  //[ViewName]: Use viewname to display after saving data
		return false;
	}

	if (!$row-&gt;bind($data))
	{
	    $this-&gt;setError($this-&gt;_db-&gt;getErrorMsg());
	    return false;
	}

	if (!$row-&gt;store())
	{
	    $this-&gt;setError($this-&gt;_db-&gt;getErrorMsg());
	    return false;
	}

	return true;
}</pre>
<p>Here, from line number 19 to 27, we have get the input form and validate the data by calling Joomla&#8217;s validate module. From line 30 to 49, we have checked for any errors. This function also checks for other validation errors such as required field data. If the error occurs then the user is redirected to the input form with pre-entered data stored in session variable. If everything is ok, then only the data is saved in the database.</p>
<p>The validate method is pretty much useful for securing Joomla component from XSS vulnerability in input data and other input data validation in Joomla. For other type of security requirements in Joomla, you need to look at <a href="http://docs.joomla.org/Securing_Joomla_extensions" target="_blank">Securing Joomla Extensions</a> and <a href="http://docs.joomla.org/Security" target="_blank">Security</a> link. Also search Google for more information.</p>
<div class="shr-publisher-308"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.lbsaud.com.np/xss-validation-in-joomla-components/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Complete Web Directory of Nepal</title>
		<link>http://www.lbsaud.com.np/nepal-directory/</link>
		<comments>http://www.lbsaud.com.np/nepal-directory/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 13:58:10 +0000</pubDate>
		<dc:creator>Lalu</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[MyNepal]]></category>
		<category><![CDATA[Nepal Directory]]></category>

		<guid isPermaLink="false">http://www.lbsaud.com.np/?p=299</guid>
		<description><![CDATA[Recently I have been searching for sites related to Nepal for several categories. I came to know a website (http://directory.mynepal.com.np) contains most of the listing categorized nicely. The online website directory contains listing of websites related to Nepal Government, Bank and Financial Institutions, Domestic and International Airlines operating in Nepal, Educational Institutions and many more. [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Recently I have been searching for sites related to Nepal for several categories. I came to know a website (<a title="Online Web Directory of Nepal and Nepalese Websites" href="http://directory.mynepal.com.np" target="_blank">http://directory.mynepal.com.np</a>) contains most of the listing categorized nicely. The online website directory contains listing of websites related to Nepal Government, Bank and Financial Institutions, Domestic and International Airlines operating in Nepal, Educational Institutions and many more.</p>
<p><span id="more-299"></span></p>
<p>While googling for the listings contained in the websites, I found that for most of the listings the site is listed in the first page of google. After this, I must say that the SEO ranking of the site is very good. I am curious about how the website has been developed and what tools are used to develop such a website, that lists contents in the first page of google. After a bit of excercise, I knew that the site is developed in Joomla with SOBI2 extension.</p>
<p>&nbsp;</p>
<p>It was good to know that such sites are available in Nepal and I am also looking to develop one like My Nepal Directory.</p>
<div class="shr-publisher-299"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.lbsaud.com.np/nepal-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nepali Calendar Module for Joomla 1.6</title>
		<link>http://www.lbsaud.com.np/nepali-calendar-module-for-joomla-1-6/</link>
		<comments>http://www.lbsaud.com.np/nepali-calendar-module-for-joomla-1-6/#comments</comments>
		<pubDate>Thu, 26 May 2011 14:15:10 +0000</pubDate>
		<dc:creator>Lalu</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Bikram Sambat]]></category>
		<category><![CDATA[Joomla 1.6]]></category>
		<category><![CDATA[Nepali Calendar]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.lbsaud.com.np/?p=283</guid>
		<description><![CDATA[Nepali Calendar Module is a Bikram Sambat based Calendar for Joomla 1.6.x. This module is the upgraded version of Nepali Calendar for Joomla 1.5.x, which I have developed a year before (Nepali Calendar for Joomla 1.5.x can be found here »). I have upgraded this module to support Joomla 1.6.x with slight modification and limited [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><br />
<div id="attachment_292" class="wp-caption alignright" style="width: 210px"><a href="http://www.lbsaud.com.np/wp-content/uploads/2011/05/npcalendar_en.png"><img class="size-full wp-image-292 colorbox-283" title="Nepali Calendar for Joomla" src="http://www.lbsaud.com.np/wp-content/uploads/2011/05/npcalendar_en.png" alt="Nepali Calendar for Joomla" width="200" height="200" /></a><p class="wp-caption-text">Nepali Calendar Module for Joomla 1.6</p></div></p>
<p>Nepali Calendar Module is a Bikram Sambat based Calendar for Joomla 1.6.x. This module is the upgraded version of Nepali Calendar for Joomla 1.5.x, which I have developed a year before (Nepali Calendar for Joomla 1.5.x can be found <a title="Nepali Calendar for Joomla 1.5.x" href="http://blog.youngminds.com.np/free-joomla-download/nepali-calendar-module-for-joomla/" target="_blank">here »</a>).</p>
<p>I have upgraded this module to support Joomla 1.6.x with slight modification and limited support for Nepali Language.</p>
<p><span id="more-283"></span></p>
<p>You can simply install this module in your Joomla 1.6.x site and display in any Module Position. The installation and configuration is quite similar to the module for Joomla 1.5.x. Click<a title="Nepali Calendar for Joomla 1.5.x" href="http://blog.youngminds.com.np/free-joomla-download/nepali-calendar-module-for-joomla/" target="_blank"> here »</a> to view the documentation. You can download the module by clicking on the download link below:</p>
<p><a href="http://www.lbsaud.com.np/wp-content/uploads/2011/05/mod_nepalicalendar_1.6.1.zip">Download Nepali Calendar Module for Joomla 1.6.x »</a></p>
<p>If you find any problem or have any suggestion, please feel free to contact me at info@lbsaud.com.np.</p>
<div class="shr-publisher-283"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.lbsaud.com.np/nepali-calendar-module-for-joomla-1-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Install Apache, PHP, MySQL and PHPMyAdmin in Ubuntu 11.04</title>
		<link>http://www.lbsaud.com.np/installing-apache-php-mysql-and-phpmyadmin-in-ubuntu-11-04/</link>
		<comments>http://www.lbsaud.com.np/installing-apache-php-mysql-and-phpmyadmin-in-ubuntu-11-04/#comments</comments>
		<pubDate>Sat, 21 May 2011 11:44:17 +0000</pubDate>
		<dc:creator>Lalu</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.lbsaud.com.np/?p=264</guid>
		<description><![CDATA[If you are a PHP based web developer, you need all the software running and configured properly. Here I am talking about installing them One by One in your Ubuntu Desktop. We are installing all the applications from terminal. How to Open Terminal: So, to fire up the terminal follow any of these steps: If [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>If you are a PHP based web developer, you need all the software running and configured properly. Here I am talking about installing them One by One in your Ubuntu Desktop. We are installing all the applications from terminal.<span id="more-264"></span></p>
<p><span style="color: #a2410b;"><strong>How to Open Terminal:</strong></span><br />
So, to fire up the terminal follow any of these steps:</p>
<ol>
<li>If you are running Unity Desktop, click on the Ubuntu Logo at top left corner and type Terminal in the search application bar. Then click on the terminal icon.</li>
<li>If you are running GNome Desktop, click on Applications-&gt;Accessories-&gt;Terminal</li>
<li>For shortcut, you can also press Ctrl+Alt+T at once, to open the terminal.</li>
</ol>
<p>&nbsp;</p>
<p><span style="color: #a2410b;"><strong>How to install Apache:</strong></span></p>
<p>1. Make sure you have the internet connection. To install apache execute the following command in the terminal:</p>
<pre class="brush:php">sudo apt-get install apache2</pre>
<p>It takes some time to download and install apache. After the setup completes, type <a href="http://localhost/" target="_blank">http://localhost/</a> in your browser window to make sure apache is installed and running properly. If you see the page with <strong>It Works!, </strong>the setup of apache2 completes successfully.</p>
<p>&nbsp;</p>
<p><span style="color: #a2410b;"><strong>How to Install PHP:</strong></span></p>
<p>1. To install PHP 5, type following commands in the terminal one by one:</p>
<pre class="brush:php">sudo apt-get install php5
sudo apt-get install libapache2-mod-php5</pre>
<p>The first line installs PHP5 in the computer. The second one provides the PHP5 module for the Apache 2 webserver. If second one is not installed, then Apache cannot parse PHP codes in a web page.</p>
<p>2. After installing PHP5 and PHP module for apache, restart the apache with following code:</p>
<pre class="brush:php">sudo /etc/init.d/apache2 restart</pre>
<p>3. While restarting the apache server, if you see a warning as “<em>Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName&#8221;, </em>then you can fix this by creating a file with the Server name. To do this type the following command in the terminal:</p>
<pre class="brush:php">sudo gedit /etc/apache2/conf.d/fqdn</pre>
<p>When the text editor opens, type “ServerName localhost” inside the file and click Save. Then close it. Now restart again with the above code and you will see that the warning message has gone.</p>
<p>4. Now, we have successfully installed php and apache web server. However, still we don&#8217;t know if PHP is successfully installed. To check this, create a file inside /var/www/ folder named test.php as:</p>
<pre class="brush:php">sudo gedit /var/www/test.php</pre>
<p>and write following code in it</p>
<pre class="brush:php">&lt;?php   phpinfo();  ?&gt;</pre>
<p>Save the file and type this in browser: <a href="http://localhost/test.php" target="_blank">http://localhost/test.php</a></p>
<p>If you see the various information about PHP and installed modules there, then we can confirm that Apache is parsing PHP codes. Hence the installation is successful up to this point.</p>
<p>&nbsp;</p>
<p><span style="color: #a2410b;"><strong>How to Install MySQL:</strong></span></p>
<p>1. To install MySQL Server in ubuntu, type following code in terminal window:</p>
<pre class="brush:php">sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql</pre>
<p>This will install latest mysql server and other necessary PHP modules for recognizing mysql functions from PHP code. While installing MySQL server, you may require to enter the password for MySQL root user.</p>
<p>&nbsp;</p>
<p><span style="color: #a2410b;"><strong>How to Install PHPMyAdmin:</strong></span></p>
<p>1. To Install PHPMyAdmin, type the following codes in the terminal:</p>
<pre class="brush:php">sudo apt-get install phpmyadmin</pre>
<p>While installing PHPMyAdmin, you may require to select the web server. In such case, tick the Apache2 Server and proceed with the installation. You may also require to input MySQL root user password during installation.</p>
<p>Once the installation completes, type this in your browser window to confirm the successful installation of PHPMyAdmin: <a href="http://localhost/phpmyadmin/index.php" target="_blank">http://localhost/phpmyadmin/index.php</a>.</p>
<p>Now, you are finished. Your environment is setup and you can enjoy using all these applications. Next, you can install other applications that may be necessary such as Eclipse, GIMP etc.</p>
<div class="shr-publisher-264"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.lbsaud.com.np/installing-apache-php-mysql-and-phpmyadmin-in-ubuntu-11-04/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Change is good and Change came with Ubuntu</title>
		<link>http://www.lbsaud.com.np/change-is-good-and-change-came-with-ubuntu/</link>
		<comments>http://www.lbsaud.com.np/change-is-good-and-change-came-with-ubuntu/#comments</comments>
		<pubDate>Fri, 06 May 2011 17:36:07 +0000</pubDate>
		<dc:creator>Lalu</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.lbsaud.com.np/?p=252</guid>
		<description><![CDATA[A few days ago, Ubuntu team has released Ubuntu 11.04 code named Nattry Narwhal. This release of Ubuntu has featured a newer desktop shell environment named Unity which was previously used for Ubuntu 10.10 Netbook Edition. The unity desktop environment looks a bit odd and painful at first to the users, however after spending a [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div id="attachment_259" class="wp-caption alignright" style="width: 310px"><a href="http://www.lbsaud.com.np/wp-content/uploads/2011/05/Ubuntu-Unity-UI.jpg"><img class="size-medium wp-image-259 colorbox-252" title="Ubuntu Unity" src="http://www.lbsaud.com.np/wp-content/uploads/2011/05/Ubuntu-Unity-UI-300x188.jpg" alt="Ubuntu Unity" width="300" height="188" /></a><p class="wp-caption-text">Ubuntu Unity Interface</p></div>
<p>A few days ago, Ubuntu team has released Ubuntu 11.04 code named Nattry Narwhal. This release of Ubuntu has featured a newer desktop shell environment named Unity which was previously used for Ubuntu 10.10 Netbook Edition. The unity desktop environment looks a bit odd and painful at first to the users, however after spending a couple of hours with unity, it becomes very usual to work.<span id="more-252"></span></p>
<p>At my first thought about Unity, I found myself into a totally new world. By this time, I feel a bit anger about the Ubuntu team for using such a different environment than that of traditional GNOME based environment. However, after spending a couple of hours I felt like with the introduction of Unity in ubuntu, the Linux based desktop operating system has given a new and improved user interface to the world. Which, definitely will change the traditional type of environment and provide a fresh look to the users. Here are some of the changes introduced with the introduction of Unity:</p>
<p><strong>Improvised Launcher</strong></p>
<p>The Unity launcher is far more different that the traditional windows type or gnome based launcher. It looks like a fancy dock that resides in the left part of the screen. Programs can be pinned or unpinned to the launcher. The launcher auto hides when you maximize the applications. To recover the launcher, just poke the left hand bar of your screen with the mouse.</p>
<p><strong>OS X like Panel</strong></p>
<p>With the introduction of Unity, ubuntu has moved to a bit near to Apple&#8217;s OS X. The global panel acts as a menu bar for applications and if no applications are open, then its just a panel with basic menus.</p>
<p>At first, this part is a bit more confusing for the users. The menu items for applications are only visible when you put cursor over the panel. However, introduction of such panel, adds extra space for the main application by removing the extra space occupied by menu bars in previous versions.</p>
<p><strong>The Dash</strong></p>
<p>The top left corner of the screen consists of a Ubuntu icon, which on clicking opens the dash. This is one of the biggest improvement I have found on Unity. You can find any of your application just by typing the first some letters of application and when listed, you can simply open it by pressing tab key for selection and then enter key.</p>
<p><strong>Other Changes</strong></p>
<p>Besides these major changes in the Unity interface, there are several other changes such as Drag and Drop Support for applications. Improved look and feel of icons, Introduction of new applications and Improved accessibility to the programs and files.</p>
<div class="shr-publisher-252"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.lbsaud.com.np/change-is-good-and-change-came-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
