<?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>Php Development &#187; mahesh chari</title>
	<atom:link href="http://www.maheshchari.com/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.maheshchari.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 17 Jan 2012 02:42:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>joomla module position</title>
		<link>http://www.maheshchari.com/joomla-module-position/</link>
		<comments>http://www.maheshchari.com/joomla-module-position/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 14:16:55 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[Joomla]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=718</guid>
		<description><![CDATA[how to insert module in joomla article What is Joomla module? &#160; Joomla module is code snippet that will get the data from database or its base component can be placed at a pre defined module positions . Module position is a content holder on template. &#160; Can we place this module in Joomla article? [...]]]></description>
			<content:encoded><![CDATA[<h1>how to insert module in  joomla<br />
  article<br />
</h1>
<h2>What is Joomla module?</h2>
<p>&nbsp;</p>
<p>Joomla module is code snippet that will get the data from database or its base component can be placed at a pre defined module positions . Module position is a content holder on template. </p>
<p>&nbsp;</p>
<h2>Can we place this module in Joomla article?</h2>
<p>&nbsp;</p>
<p>As per Joomla  standard we place the modules on pre defined module positions which are pre defined by developer.But in mostly scenorio we need to place them in middle of  article content. thanks to the joomla core plug in &quot;<strong>Content &#8211; Load Modules</strong>&quot; , we can place module in article also. </p>
<p>&nbsp;</p>
<h2>How can we place the Joomla module in article?</h2>
<p>To place a module first we create a module instance from the module manager and give the unique module position like &quot;my_joomla_module_position&quot;. </p>
<p>Now in the article place a short code like below and publish the document. </p>

<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">{loadposition my_joomla_module_position}</pre></div></div>

<img src="http://www.maheshchari.com/?ak_action=api_record_view&id=718&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/joomla-module-position/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sending email with PHP (2)</title>
		<link>http://www.maheshchari.com/sending-email-with-php-2/</link>
		<comments>http://www.maheshchari.com/sending-email-with-php-2/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 14:15:01 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[PHP/mysql]]></category>
		<category><![CDATA[email]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=715</guid>
		<description><![CDATA[Configure PHP email function for windows server. We learnt about sending mail from PHP with linux sendmail in this series of tutorial. On windows we don&#8217;t have pre configured email sever on mostly server. to fix this PHP mail function on windows, we can do with ini_set php function or setting it up on php.ini. [...]]]></description>
			<content:encoded><![CDATA[<h1>Configure PHP email function for windows server.</h1>
<p>We learnt about sending mail from PHP with linux sendmail in this series of <a href="http://www.maheshchari.com/sending-email-with-php-1/">tutorial</a>. On windows we don&#8217;t have pre configured email sever on mostly server. to fix this PHP mail function on windows, we can do with <strong>ini_set</strong> php function or setting it up on php.ini.</p>
<h2>Setting php.ini </h2>
<p>if you have access to php.ini ,you can change the default global value .</p>

<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">[mail function]
SMTP = localhost
sendmail_from = me@example.com</pre></div></div>

<h2>Setting at run time ini_set </h2>
<p>we can change this configuration at run time with <strong>ini_set</strong> function as given below. </p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'SMTP'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'localhost'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sendmail_from'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'fromaddress@domain.com'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h2>Example</h2>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'SMTP'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'localhost'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sendmail_from'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'fromaddress@domain.com'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
&nbsp;
<span style="color: #000088;">$to</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'toaddress@domain.com'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$subject</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Sample  subject'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$body</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'message body '</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #990000;">mail</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$to</span><span style="color: #339933;">,</span> <span style="color: #000088;">$subject</span> <span style="color: #339933;">,</span> <span style="color: #000088;">$body</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<img src="http://www.maheshchari.com/?ak_action=api_record_view&id=715&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/sending-email-with-php-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sending email with PHP (1)</title>
		<link>http://www.maheshchari.com/sending-email-with-php-1/</link>
		<comments>http://www.maheshchari.com/sending-email-with-php-1/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 17:10:57 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[PHP/mysql]]></category>
		<category><![CDATA[email]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=710</guid>
		<description><![CDATA[How to send email in PHP Email ( Electronic mail ) is most popular communication service on internet . Generally it is common practice to use this service as marketing media for digital products. There are a lot of free email service available on internet like Gmail, Yahoo,AOL and more. So as a developer we [...]]]></description>
			<content:encoded><![CDATA[<h1>How to send email in PHP</h1>
<p><strong>Email</strong> (<strong> Electronic mail </strong>) is most popular communication service on internet . Generally it is common practice to use this service as marketing media for digital products.   There are a lot of free email service available on internet like <strong>Gmail</strong>, <strong>Yahoo</strong>,<strong>AOL</strong> and more. </p>
<p>So as a developer we must know the <strong>mail</strong> functionality in PHP like <strong>send mail</strong> with php and <strong>read mail</strong> with PHP imap ,pop functions. in this tutorial we are going to learn how to send the mail with different MIM types and it mail components. </p>
<p>An email message consists of three components, the message <em>envelope</em>, the message <em>header</em>, and the message <em>body</em>. envelope controls the mail sending path like where it originated and where to be sent the mail. header part will denotes the contents of the email and sender and receiver information. body part contains the main user data information.In this series mail tutorial we learn with different PHP functions to send the mail.</p>
<p>On Linux server by default PHP comes with <strong>send mail</strong> or <strong>exim</strong> email server. But on windows PHP must be configured to allow from <strong>SMTP</strong> . </p>
<p>Main PHP <strong>extensions</strong> for email handling are </p>
<ul>
<li>Cyrus </li>
<li>IMAP </li>
<li>Mail</li>
<li>Mailparse</li>
<li>vpopmail</li>
</ul>
<h2>PHP email function</h2>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">mail</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$to</span> <span style="color: #339933;">,</span> <span style="color: #000088;">$subject</span> <span style="color: #339933;">,</span> <span style="color: #000088;">$message</span> <span style="color: #339933;">,</span><span style="color: #000088;">$headers</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>This function takes mainly four parameters, to,subject, message, headers.It will return a boolean that refers if mail is sent successfully or not. </p>
<h2>$to parameter</h2>
<p>$to parameter is a string to recipients of the email , we can give the &#8216;,&#8217; comma separated email address. it can be send for more than one recipients at at time.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$to</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&quot;To Display Name1&quot; &lt;reciever@domain1.dom&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$to</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">',&quot;To Display Name2&quot; &lt;reciever@domain2.dom&gt;'</span><span style="color: #339933;">;</span></pre></div></div>

<h2>$subject parameter</h2>
<pre>$subject="This is my sample subject.";</pre>
<p>$message parameter contain any length of string that is sperated with new line characters . </p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$message</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Sample message line 1 <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$message</span><span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;sample message line 2&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p>&nbsp;</p>
<h2>$header  parameter</h2>
<p> is the modifier or extending the mail sending option.It has many options ,but we will discuss importent ones here. see below snippet for example.</p>
<pre>
$headers = 'From: "Sender Display Name" <sender@sender.dom>' . PHP_EOL .
'Cc: "CC Display Name" <info@domain.dom>' . PHP_EOL .
'X-Mailer: PHP-' . phpversion() . PHP_EOL.
'MIME-Version: 1.0' . PHP_EOL. 'Content-type: text/plain; charset=UTF-8' . PHP_EOL.
'X-Priority: 1 (Higuest)'.PHP_EOL.
'X-MSMail-Priority: High'.PHP_EOL.
'Importance: High'.PHP_EOL.
'Reply-To: info@example.com'.PHP_EOL.
'Return-Path: info@example.com.PHP_EOL.
'Message-Id: <' . md5(uniqid(microtime())) . '@' . $hostname . '>'.PHP_EOL.
           </pre>
<p>In the above code <strong>PHP_EOL</strong> is PHP constant that represent new line character . </p>
<h2>Main list of email headers</h2>
<p>&#038;nbsp</p>
<p><strong>From,</strong> email header notes from what email address is sent. </p>
<p><strong>Cc</strong> , this email header inform the server that this mail also can be sent to this email address also.</p>
<p><strong>X-Mailer,</strong> this email header inform the mail recipent client about the sender client. </p>
<p><strong>MIME ,</strong> this email header tells about the how the mail should be handle like plain text,html and attachment.</p>
<p><strong>X-Priority,</strong> tells the priority of the email for generel server.</p>
<p><strong>X-MSMail-Priority</strong>, tell the priority of the email for windows server hosted email servers.</p>
<p><strong>Importance</strong>, tells the priority of the email this will work for some of the email server.</p>
<p><strong>Reply-To</strong>, if user reply the sent email ,what the email address it to be taken, if it is not given default is From ,email header.</p>
<p><strong>Return-Path</strong>, if an email is bounced, where to be notified , this can be same email address like From or other email also.this email header can be used to track some email campains .</p>
<p><strong>Message-Id</strong>, is optional email header if we do not provide server will automatically generates and sends. this header can be used to track email campaings also.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<img src="http://www.maheshchari.com/?ak_action=api_record_view&id=710&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/sending-email-with-php-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery form validation example required</title>
		<link>http://www.maheshchari.com/jquery-form-validation-example-required/</link>
		<comments>http://www.maheshchari.com/jquery-form-validation-example-required/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 12:58:43 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[examples]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=699</guid>
		<description><![CDATA[// jQuery form validation &#8220;required&#8221; example 1 &#8220;required&#8221; element with HTML &#160; bind simple function by adding simple class to required elements &#8220;required&#8221;. $&#40;'#form1'&#41;.validate&#40;&#41;; jQuery form validation &#8220;required&#8221; example 1 &#8220;required&#8221; element with Javascript parameters &#160; bind function by adding configuration with Javascript only.Here we add custom messages also. $&#40;'#form2'&#41;.validate&#40;&#123; rules:&#123; username2:'required', password2:'required' &#125; ,messages:&#123; [...]]]></description>
			<content:encoded><![CDATA[<p><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.js"></script><br />
<script type="text/javascript">// <![CDATA[
 jQuery().ready(function (){  jQuery('#form1').validate(); jQuery('#form2').validate({ rules:{ 	username2:'required', 	password2:'required' } ,messages:{ 	username2:"Please enter user name.", 	password2:"Please enter password" 	} }); });
// ]]&gt;</script></p>
<h2>jQuery form validation &#8220;required&#8221; example 1</h2>
<h3>&#8220;required&#8221; element with HTML</h3>
<table>
<tbody>
<tr>
<td>
<form id="form1" method="post">
<input id="username" class="required" name="username" type="text" />
<input id="password" class="required" name="password" type="text" />
<input id="button" name="button" type="submit" value="Submit" />
<p>&nbsp;</p>
</form>
</td>
<td>bind simple function by adding simple class to required elements &#8220;required&#8221;.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#form1'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">validate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</td>
</tr>
</tbody>
</table>
<h2>jQuery form validation &#8220;required&#8221; example 1</h2>
<h3>&#8220;required&#8221; element with Javascript parameters</h3>
<table>
<tbody>
<tr>
<td>
<form id="form2" method="post">
<input id="username2" name="username2" type="text" />
<input id="password2" name="password2" type="text" />
<input id="button2" name="button2" type="submit" value="Submit" />
<p>&nbsp;</p>
</form>
</td>
<td>bind function by adding configuration with Javascript only.Here we add custom messages also.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#form2'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">validate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
rules<span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span>
	username2<span style="color: #339933;">:</span><span style="color: #3366CC;">'required'</span><span style="color: #339933;">,</span>
	password2<span style="color: #339933;">:</span><span style="color: #3366CC;">'required'</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">,</span>messages<span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span>
	username2<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;Please enter user name.&quot;</span><span style="color: #339933;">,</span>
	password2<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;Please enter password&quot;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<img src="http://www.maheshchari.com/?ak_action=api_record_view&id=699&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/jquery-form-validation-example-required/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jquery form validation</title>
		<link>http://www.maheshchari.com/jquery-form-validation/</link>
		<comments>http://www.maheshchari.com/jquery-form-validation/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 21:06:21 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=694</guid>
		<description><![CDATA[jQuery form validation Hello freinds, we know that every dynamic form need to be proper validated through the server and client side. some one get the doubt why we need to be implemented on both client and server side. as per my opinion we just need Server side validation only, but it takes more server [...]]]></description>
			<content:encoded><![CDATA[<h1>jQuery form validation </h1>
<p>Hello freinds, we know that every dynamic form need to be proper validated through the server and client side. some one get the doubt why we need to be implemented on both client and server side. as per my opinion we just need Server side validation only, but it takes more server resources and requests if user doesn&#8217;t submit the data correctly . some one will get question why we can only implment client side validation , i say NO for only client side validation because some users will disable javascript and send the data to server in that case it is useless to implment only client side validation. It is good practice to implement both client and server side validation . </p>
<p>I have created a long <a href="http://www.maheshchari.com/60-validation-functions-with-php/">validation class</a> for PHP and posted in my previous tutorial. now we are going to learn how to implement the client side valdiation with jQuery . for that we have a good <a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/" target="_blank">jQuery validation plug in</a> , that can be used in many ways. you can see the examples <a href="http://jquery.bassistance.de/validate/demo/" target="_blank">here</a>.</p>
<p>&nbsp;</p>
<img src="http://www.maheshchari.com/?ak_action=api_record_view&id=694&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/jquery-form-validation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>textarea resize disable</title>
		<link>http://www.maheshchari.com/textarea-resize-disable/</link>
		<comments>http://www.maheshchari.com/textarea-resize-disable/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 22:36:54 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[Html]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=690</guid>
		<description><![CDATA[How to disable text area re size icon for chrome or webkit browsers. Recently when i was implementing new application , i was asked to remove the text area resize feature and text area glow when user focuses on the text area. Thank god it doesn&#8217;t took much effort. it can be done with simple [...]]]></description>
			<content:encoded><![CDATA[<h1>How to disable text area re size icon for chrome or webkit browsers.</h1>
<p>Recently when i was implementing new application , i  was asked to remove the text area resize feature and text area glow when user focuses on the text area. Thank god it doesn&#8217;t took much effort. it can be done with simple CSS tweaks.<br />
i placed the following CSS code in my page and it solved <img src='http://www.maheshchari.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.exampletextarea</span> <span style="color: #00AA00;">&#123;</span>
resize<span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">outline</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<img src="http://www.maheshchari.com/?ak_action=api_record_view&id=690&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/textarea-resize-disable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>joomla  search exclude plugin customization</title>
		<link>http://www.maheshchari.com/joomla-search-exclude-plugin-customization/</link>
		<comments>http://www.maheshchari.com/joomla-search-exclude-plugin-customization/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 19:28:33 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[customize]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=681</guid>
		<description><![CDATA[How to exclude article,category from joomla 1.6,1.7 search results? Joomla has nice search functionality where we can get search results from any other components like weblinks, categories and any component that supports plug in for this search functionality. We can find a lot of search components and modules that will costomize the search functionality. Even [...]]]></description>
			<content:encoded><![CDATA[<h1>How to exclude article,category from joomla 1.6,1.7 search results?</h1>
<p><strong>Joomla</strong> has nice <strong>search</strong> functionality where we can get search results from any other components like weblinks, categories and any component that supports plug in for this search functionality. We can find a lot of <strong>search components</strong> and modules that will costomize the<strong> search </strong>functionality. Even we find a lot of functionality core joomla article search plug in missed a bit features. </p>
<ul>
<li><strong>Exclude</strong> specific <strong>articles</strong> from search which are private , module content holders. </li>
<li><strong>Exclude</strong> specific article from <strong>categories</strong> . </li>
</ul>
<p>Now we are going to costomize the core Search &#8211; Content plug in to exclude particular articles and categories in steps.</p>
<h2>Find the Search &#8211; Content  core joomla plug in.</h2>
<p>Go to Administrator =&gt; Plug in Manager =&gt; Search &#8211; Content plug in </p>
<p>Then we will see the following default options on right side of the plug in </p>
<ul>
<li>Search Limit &#8211; you can limit the search results from the content </li>
<li>Articles</li>
<li>Archived Articles</li>
</ul>
<p><img src="http://www.maheshchari.com/wp-content/uploads/2011/09/search-content-default-articles.png" width="436" height="151" alt="Joomla default options for search content plug in" /></p>
<p>&nbsp;</p>
<p>Now go to following folder<em><strong> \plugins\search\content</strong></em> and you will see following files in this directory. </p>
<ul>
<li>index.html</li>
<li>content.xml</li>
<li>content.php</li>
</ul>
<h2>Adding Custom parameters for core Joomla search plugin </h2>
<p>Now open content.xml file and append the following code to in field list after the field &quot;search_archived&quot;.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;field name=&quot;search_idlimit&quot; type=&quot;text&quot; size=&quot;30&quot; default=&quot;&quot; label=&quot;Exclude Articles&quot; description=&quot;Enter Article ID(s) to omit from search. Use commas to separate multiple values.&quot;/&gt;
&lt;field name=&quot;search_seclimit&quot; type=&quot;text&quot; size=&quot;30&quot; default=&quot;&quot; label=&quot;Exclude Sections&quot; description=&quot;Enter Section ID(s) to omit from search. Use commas to separate multiple values.&quot;/&gt;
&lt;field name=&quot;search_catlimit&quot; type=&quot;text&quot; size=&quot;30&quot; default=&quot;&quot; label=&quot;Exclude Categories&quot; description=&quot;Enter Category ID(s) to omit from search. Use commas to separate multiple values.&quot;/&gt;</pre></div></div>

<p>Now you will see three more custom parameters for this joomla search plug in as shown bottom figure.</p>
<p><img src="http://www.maheshchari.com/wp-content/uploads/2011/09/search-content-customized-options-for-articles.png" width="440" height="235" alt="Joomla search plug in custom plug in" /></p>
<ul>
<li>In the <em><strong>Exclude articles</strong></em> &#8211; fields we can give comma seperated articles ID&#8217;s which are not going to to be shown in Joomla search results. </li>
<li>In the <em><strong>Exclude Section</strong></em> &#8211; fields we can give comma seperated Section ID&#8217;s which are restricted from the search results.Even Joomla 1.6,1.7 dont have these sections ,i added as backward compatability for Joomla 1.5 . </li>
<li>In <strong>Eclude Categories</strong> &#8211; also we give the comma seperated categories ID&#8217;s to be restricted from the search results . </li>
</ul>
<h2>Customizing the content.php </h2>
<p>Add the following code to this content.php file at 105 line after the first switch statement. </p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$search_idlimit</span><span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">def</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'search_idlimit'</span><span style="color: #339933;">,</span>		<span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$search_seclimit</span><span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">def</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'search_seclimit'</span><span style="color: #339933;">,</span>		<span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$search_catlimit</span><span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">def</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'search_catlimit'</span><span style="color: #339933;">,</span>		<span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$search_seclimit</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$where</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">' AND ( a.sectionid NOT IN ('</span><span style="color: #339933;">.</span><span style="color: #000088;">$search_seclimit</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'))'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$search_catlimit</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$where</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">' AND ( a.catid  NOT IN ('</span><span style="color: #339933;">.</span><span style="color: #000088;">$search_catlimit</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'))'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$search_idlimit</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$where</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">' AND ( a.id  NOT IN ('</span><span style="color: #339933;">.</span><span style="color: #000088;">$search_idlimit</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'))'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>from the above code we get each parameters and  modify the core plug in sql query if parameters available. </p>
<p>&nbsp;</p>
<h2>Test the Search result</h2>
<p>Now go to administrator =&gt;content=&gt;category manager =&gt;new </p>
<p>create a &quot;sample category1 &quot; and add a sample articles with your choice into this sample category. </p>
<p>add the category id of above category in search plug in options &quot;Exclude Category&quot; ,example 15 </p>
<p>now search the result from the front and you can not see this category articles. <img src='http://www.maheshchari.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&nbsp;</p>
<h2>Download Files </h2>
<p>&nbsp;</p>
<p><a href='http://www.maheshchari.com/wp-content/uploads/2011/09/plugins.zip'>Download source code </a></p>
<img src="http://www.maheshchari.com/?ak_action=api_record_view&id=681&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/joomla-search-exclude-plugin-customization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>horizontal scroll</title>
		<link>http://www.maheshchari.com/horizontal-scroll/</link>
		<comments>http://www.maheshchari.com/horizontal-scroll/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 21:28:19 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[Html]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[scroll]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=672</guid>
		<description><![CDATA[how to scroll the window horizontally scroll? I got asked by my coleague to horizontal scroll the window , let me explain the scenario , page width is 1500px with a 1500px image in back ground and it should be always centered on page load and window resized. i got a solution thanx to jQuery.scrollTo [...]]]></description>
			<content:encoded><![CDATA[<h1>how to scroll the window horizontally scroll?<br />
</h1>
<p>I got asked by my coleague to horizontal scroll the window , let me explain the scenario  , page width is 1500px with a 1500px image in back ground and it should be always centered on page load and window resized. i got a solution thanx to<a href="http://demos.flesler.com/jquery/scrollTo/" target="_blank" rel="nofollow"> jQuery.scrollTo plugin</a>. </p>
<p>&nbsp;</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;how to center the window for small screen&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/jquery-1.6.2.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;jquery.scrollTo-min.js&quot;&gt;&lt;/script&gt;
&lt;style type=&quot;text/css&quot;&gt;
&lt;!--
#container {
	width: 1500px;
	border: 1px solid #333;
	min-height:500px;
	margin:0 auto;
	text-align:center;
}
--&gt;
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;container&quot;&gt;
  &lt;h1&gt;This container has 1500px width  and centered into the view port.&lt;/h1&gt;
  &lt;h2&gt; if this container is seen in less than 1500px  ,&lt;/h2&gt;
  &lt;h3&gt; it should be scrolled to the centered on&lt;/h3&gt;
  &lt;h4&gt;page initializes and window resizes&lt;/h4&gt;
&lt;/div&gt;
&lt;script&gt;
$().ready(function(){
$.scrollTo('50%',{axis:'x'});
$(window).resize(function(){$.scrollTo('50%',{axis:'x'});});
});
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<h2><a href='http://www.maheshchari.com/wp-content/uploads/2011/07/horiz.zip'>Demo</a></h2>
<img src="http://www.maheshchari.com/?ak_action=api_record_view&id=672&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/horizontal-scroll/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php get url</title>
		<link>http://www.maheshchari.com/php-get-url/</link>
		<comments>http://www.maheshchari.com/php-get-url/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 20:36:03 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[PHP/mysql]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=669</guid>
		<description><![CDATA[How to get current page full URL with PHP In mostly case we might be need current url of the page with PHP in user log in authentication functionality. when a user go for log in page, after successfull log in the user we should return the user to same page where he came from [...]]]></description>
			<content:encoded><![CDATA[<h1>How to get current page full URL with PHP<br />
</h1>
<p>In mostly case we might be need current url of the page with PHP in user log in authentication functionality. when a user go for log in page, after successfull log in the user we should return the user to same page where he came from . this is same for log out scenario also. We need this current page url in cross site cummunication also. So i wrote a small php function to get the current url of the working page. </p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> current_url<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_URI'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$serverrequri</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'PHP_SELF'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$serverrequri</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_URI'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #009933; font-style: italic;">/**
     * server request uri depends upon server OS version
     */</span>
    <span style="color: #000088;">$s</span> <span style="color: #339933;">=</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;HTTPS&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">''</span> <span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;HTTPS&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;on&quot;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">&quot;s&quot;</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009933; font-style: italic;">/**
     * get protocal if SSL enabled.
     */</span>
    <span style="color: #000088;">$serverprotocol</span> <span style="color: #339933;">=</span> strleft<span style="color: #009900;">&#40;</span><span style="color: #990000;">strtolower</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;SERVER_PROTOCOL&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$s</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$serverport</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;SERVER_PORT&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;80&quot;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;:&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;SERVER_PORT&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009933; font-style: italic;">/**
     * Page might be run with IP and Port also like 127.0.0.1:8080
     */</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$serverprotocol</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;://&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SERVER_NAME'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$serverport</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$serverrequri</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>By calling above function you get the <strong>current page url </strong>and you pass this url to log in and log out page with return get parameter with <strong>base64_encode</strong> and send back user to by <strong>base64_decode</strong> .</p>
<img src="http://www.maheshchari.com/?ak_action=api_record_view&id=669&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/php-get-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>input hidden ie7</title>
		<link>http://www.maheshchari.com/input-hidden-ie7/</link>
		<comments>http://www.maheshchari.com/input-hidden-ie7/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 09:19:51 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[Html]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=665</guid>
		<description><![CDATA[IE7 form hidden input field bug fix Every HTML form may have hidden input fields. Generelly every web browser will render this input hidden field as display:none . but in ie7 it will have small gap. since we can&#8217;t replace or change the position of the input hidden fields ,if they come from any CMS [...]]]></description>
			<content:encoded><![CDATA[<h1>IE7 form hidden input field bug fix<br />
</h1>
<p>Every HTML form  may have hidden input fields. Generelly every web browser will render this input hidden field as display:none . but in ie7 it will have small gap. since we can&#8217;t replace or change the position of the input hidden fields ,if they come from any CMS it is hard. here is a simple trick that will fix the ie7 bug.</p>
<p>&nbsp;</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.hiddeninput</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<img src="http://www.maheshchari.com/?ak_action=api_record_view&id=665&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/input-hidden-ie7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

