<?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>tips4developer</title>
	<atom:link href="http://www.tips4developer.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tips4developer.com</link>
	<description></description>
	<lastBuildDate>Thu, 31 Jan 2013 11:25:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Conditional Statement to Detect VirtueMart Pages</title>
		<link>http://www.tips4developer.com/joomla/conditional-statement-to-detect-virtuemart-pages/</link>
		<comments>http://www.tips4developer.com/joomla/conditional-statement-to-detect-virtuemart-pages/#comments</comments>
		<pubDate>Thu, 17 Jan 2013 11:20:54 +0000</pubDate>
		<dc:creator>Guest</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[condition]]></category>
		<category><![CDATA[joomla condition]]></category>
		<category><![CDATA[virtuemart condition]]></category>

		<guid isPermaLink="false">http://www.tips4developer.com/?p=912</guid>
		<description><![CDATA[Here in this post I am sharing a way to detect if your current visited page is a VirtueMart page, VirtueMart category page or VirtueMart product detail page. I think most of you have experience that when your client asks to show/hide any particular section from VirtueMart pages so that might be from sidebar or&#8230;]]></description>
				<content:encoded><![CDATA[<p>Here in this post I am sharing a way to detect if your current  visited page is a VirtueMart page, VirtueMart category page or VirtueMart  product detail page.</p>
<p>I think most of you have experience that when your client asks  to show/hide any particular section from VirtueMart pages so that might be from  sidebar or somewhere else and that was placed in default template file. Now in  this case you have only 2 option so either to prepare a new template for VirtueMart  pages or by preparing hidden menus for each product and category pages, which  actually takes time and sometime not feasible in case of large number of products  and categories.</p>
<p>So to eliminate such a situation you can place <strong>conditional statements to detect virtuemart  pages</strong>, which is quite simple and easy to manage and for that you simply  have to place the below code in you template&rsquo;s index.php to show/hide any  section, module or else very easily.</p>
<h2>Condition to Detect – If Virtuemart Page</h2>
<p>Below code will detect and condetion will return true for all virtuemart pages so for VirtueMart Category page, product page or cart page </p>
<pre><code>&lt;?php
/* getting value in &ldquo;Option&rdquo; variable */
$option = JRequest::getString('option', null);  
?&gt; <br />
&lt;?php
/* check if it is VirtueMart  page or grabbing  content using  com_virtuemart*/
if ($option == 'com_virtuemart')
{ ?&gt;
  Yes this is a VirtueMart  page and you can place your module or else by replacing   this line
&lt;?php } ?&gt;</code></pre>
<h2>Condition to Detect – If Virtuemart Category Page</h2>
<pre><code>&lt;?php 
/* getting value in &ldquo;view&rdquo; variable */ 
$view= JRequest::getString('view', null); 
?&gt;

&lt;?php 
/* check if it is VirtueMart  category page*/
if ($view == 'category') 
{ ? &gt;
  Yes this is a VirtueMart  category page and you can place your module or else by replacing this line
&lt;?php } ?&gt;</code></pre>
<h2>Condition to Detect – If Virtuemart  Product or product detail Page</h2>
<pre><code>&lt;?php 
/* getting  value in &ldquo;view&rdquo; variable */
$view = JRequest::getString(view, null);   
?&gt;

&lt;?php 
/* check if  it is VirtueMart product detail page*/
if ($view == 'productdetails') 
{ ? &gt;
  Yes this is a  virtueMart product detail page and you can place your module or else by  replacing this line
&lt;?php } ?&gt;</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tips4developer.com/joomla/conditional-statement-to-detect-virtuemart-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Joomla Responsive Menu</title>
		<link>http://www.tips4developer.com/joomla/joomla-responsive-menu/</link>
		<comments>http://www.tips4developer.com/joomla/joomla-responsive-menu/#comments</comments>
		<pubDate>Fri, 04 Jan 2013 10:32:29 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[joomla menu]]></category>
		<category><![CDATA[responsive]]></category>
		<category><![CDATA[responsive design]]></category>
		<category><![CDATA[responsive menu]]></category>

		<guid isPermaLink="false">http://www.tips4developer.com/?p=890</guid>
		<description><![CDATA[Now a days responsive web designs are very rapidly acquiring the web design market and trying to get fitted in to each new devices. So in presence of this it is noticed that a new or less experienced web developers/designers faces problem to display each elements of website properly and symmetrically on different devices and&#8230;]]></description>
				<content:encoded><![CDATA[<p>Now a days  responsive web designs are very rapidly acquiring the web design market and  trying to get fitted in to each new devices. So in presence of this it is  noticed that a new or less experienced web developers/designers faces problem  to display each elements of website properly and symmetrically on different  devices and one of the most important element is main navigation of the  website.</p>
<p>As in desktop  version we can get much space to float our website main navigation but it  mobile device it quite difficult to fit in, and either that requires to <a href="http://www.tips4developer.com/general/responsive-navigation-converting-menu-navigation-dropdown-navigation/" target="_blank">convert normal menu navigation to dropdown navigation</a> or shrinking the menu to fit in device or something else that fits in your layout design.</p>
<p>So here I am  sharing one of the best Joomla Module and plugin I experienced with is – <a href="http://extensions.joomla.org/extensions/structure-a-navigation/menu-systems/drop-a-tab-menus/11578" target="_blank">Joomla Maxi Menu CK</a></p>
<h2>Joomla Maxi Menu CK</h2>
<p>You can  download module for Joomla Maxi Menu CK, which is actually non-commercial and  free to use. </p>
<p><a target="_blank" href="http://extensions.joomla.org/extensions/structure-a-navigation/menu-systems/drop-a-tab-menus/11578" class="download">Download Joomla Maxi Menu CK</a></p>
<h2>Plugin Maximenu CK Mobile</h2>
<p>After  downloading and installing the module you have to buy its mobile plugin &#8211; <a href="http://www.joomlack.fr/en/joomla-extension-maximenu/maximenu-mobile-plugin" target="_blank">Plugin Maximenu CK Mobile</a>.  This plugin will allow you to transform your normal navigation to responsive or  mobile navigation. </p>
<p>Just publish the plugin and choose the  module you want to use as main mobile menu in the options. Then you can choose  the resolution limit to activate the mobile menu, and one of the two  preinstalled themes.</p>
<div style="text-align:center">
<img src="http://www.tips4developer.com/wp-content/themes/Horcrux/images/module_maximenuck_plugin_mobile.png" alt="Plugin Setting maximenuck_plugin_mobile">
</div>
<p>After activating and configuring the plugin  you will notice that on mobile devices standard Maximenu will be hidded and new  control bar will appear at the top of the page with an icon to open the mobil  menu.</p>
<div style="text-align:center">
<img src="http://www.tips4developer.com/wp-content/themes/Horcrux/images/maximenuck-normal-menu.jpg" alt="maximenuck Normal Menu "></p>
<p><img src="http://www.tips4developer.com/wp-content/themes/Horcrux/images/maximenuck-responsivel-menu.jpg" alt="maximenuck Responsive Menu "></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.tips4developer.com/joomla/joomla-responsive-menu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Calling Joomla Module in Virtuemart Category page</title>
		<link>http://www.tips4developer.com/joomla/calling-joomla-module-virtuemart-category-page/</link>
		<comments>http://www.tips4developer.com/joomla/calling-joomla-module-virtuemart-category-page/#comments</comments>
		<pubDate>Sat, 29 Dec 2012 16:42:14 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[virtuemart]]></category>

		<guid isPermaLink="false">http://www.tips4developer.com/?p=874</guid>
		<description><![CDATA[I know this might be a very old topic for Joomla developers, so to call Joomla module in virtuemart category page or any other component template file, but I am just posting this topic as I recently get to know about it and I recently implemented in one of my Joomla project. Here in this&#8230;]]></description>
				<content:encoded><![CDATA[<p>I know this might be a very old topic for Joomla developers, so to <strong>call Joomla module in virtuemart category page or any other component template file</strong>, but I am just posting this topic as I recently get to know about it and I recently implemented in one of my Joomla project.</p>
<p>Here in this post I am going to share the way to <strong>call Joomla module in category page</strong> so the one particular module get visible only when browsing categories and subcategories pages. So this will be something like including {loadposition module} inside Virtuemart template file</p>
<p>So let open the file to add the code  &#8211; /components/com_virtuemart/views/category/tmpl/default.php and place the below code in to it.</p>
<pre><code>&lt;?php
      /*   Calling Joomla Module in Virtuemart category page */
           $modules =&amp;  JModuleHelper::getModules('module-name');
           foreach ($modules as $module)
           {
              echo JModuleHelper::renderModule($module)
           }
  ?&gt;</code></pre>
<p>Just don’t forget to update the “module-name” with your actual module name</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tips4developer.com/joomla/calling-joomla-module-virtuemart-category-page/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google Web Fonts &#8211; Using Non System Fonts in Web Pages</title>
		<link>http://www.tips4developer.com/general/google-web-fonts-system-fonts-web-pages/</link>
		<comments>http://www.tips4developer.com/general/google-web-fonts-system-fonts-web-pages/#comments</comments>
		<pubDate>Mon, 17 Sep 2012 12:01:41 +0000</pubDate>
		<dc:creator>Guest</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://www.tips4developer.com/?p=844</guid>
		<description><![CDATA[Now a days use of Non System fonts is crazily moving forward and widely using by the web developers and designers and the whole credit for the same goes to Google Web fonts. Where Google Web fonts is totally a free service and an amazing free resource for web designers. There was a time when&#8230;]]></description>
				<content:encoded><![CDATA[<p>Now a days use  of Non System fonts is crazily moving forward and widely using by the web  developers and designers and the whole credit for the same goes to <a target="_blank" href="http://www.google.com/webfonts" title="Google Web Fonts">Google Web fonts</a>. Where  Google Web fonts is totally a free service and an amazing free resource for web  designers.</p>
<p>There was a time when web designers and developers were forced and restricted to use system fonts that were commonly found in most of the machines. But now the scenario has totally been changed and the use of Non System fonts is drastically increasing.</p>
<h2>Adding Non System fonts using Google Web Fonts</h2>
<p>Adding Non System fonts is quite easy, as you just have to follow very few steps mentioned below</p>
<ol>
<li>
<p>Select a font of your  choice from <a href="http://www.google.com/webfonts" target="_blank" title="Google Web Fonts">Google fonts  library</a></p>
</li>
<li>
<p>Click to &ldquo;Quick Use&rdquo;  link as shown below</p>
<p><img src="http://www.tips4developer.com/wp-content/themes/tips/images/google-web-font-quick-use.jpg" alt="Google Web font step 2"></p>
</li>
<li>
<p>Scroll down the Google  font page to step 3, where you will find 3 ways to add Google fonts – Standard,  import and JavaScript. Whereas I prefer the &ldquo;Standard&rdquo; one so adding  &lt;link&gt; tag in &lt;head&gt; section.</p>
<p><img src="http://www.tips4developer.com/wp-content/themes/tips/images/google-web-font-quick-use2.jpg" alt="Google Web font step 3"></p>
</li>
<li>
<p>If you like you can  combine and use 2 or more fonts with pipe &ldquo;|&rdquo; sign</p>
<pre><code>&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;<a href="http://fonts.googleapis.com/css?family=Lora">http://fonts.googleapis.com/css?family=Skranji</a>|Headland One&quot; media=&quot;screen&quot;&gt;</code></pre>
</li>
<li>
<p>Finally it&rsquo;s time to integrate  the linked font in CSS. So for that scroll a bit more in Google Font page and  copy the given CSS rule to your website style sheet.</p>
<p><img src="http://www.tips4developer.com/wp-content/themes/tips/images/google-web-font-quick-use3.jpg" alt="Google Web font step 4"></p>
</li>
</ol>
<p>Enjoy the Non System using Google Web Fonts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tips4developer.com/general/google-web-fonts-system-fonts-web-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Responsive Images – Reduce Image Size Using Adaptive Images</title>
		<link>http://www.tips4developer.com/general/responsive-images-reduce-image-size-adaptive-images/</link>
		<comments>http://www.tips4developer.com/general/responsive-images-reduce-image-size-adaptive-images/#comments</comments>
		<pubDate>Sat, 25 Aug 2012 10:24:18 +0000</pubDate>
		<dc:creator>Guest</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[responsive design]]></category>

		<guid isPermaLink="false">http://www.tips4developer.com/?p=818</guid>
		<description><![CDATA[Here I am sharing the best and effective way to reduce the image size using &#8220;Adaptive Images&#8221;. Basically Adaptive Images is a project by Matt Wilcox with the aim to render and reduce the images size on mobile devices respective to screen resolution. Adaptive Images detects the device screen size and automatically scale, re-size and&#8230;]]></description>
				<content:encoded><![CDATA[<p>Here I am sharing the best and  effective way to <strong>reduce the image size  using &ldquo;</strong><a href="http://adaptive-images.com/" target="_blank"><strong>Adaptive Images</strong></a><strong>&rdquo;. </strong>Basically Adaptive Images is a project by Matt Wilcox  with the aim to <strong>render and reduce the images  size on mobile devices respective to screen resolution</strong>. </p>
<p>Adaptive Images <strong>detects  the device screen size and automatically</strong><strong> scale, re-size and save the  images in cache folder at run time</strong>. The best part about this is that it just  not only reduce the image size to fit on different devices, instead it also <strong>reduces the images size in bites and kilo  bites</strong>,<strong> </strong>so that they can quickly  download and render on devices using low bandwidth internet.</p>
<p>Let&rsquo;s start with <a href="http://adaptive-images.com/content/downloads/adaptive-images.1.5.2.zip" target="_blank">downloading required resources</a> form the <a href="http://adaptive-images.com" target="_blank">Adaptive Images official website</a>. Further after downloading the .zip you will get the  directions to implement under the same zip file, but additionally here I am it sharing with you.</p>
<p><a target="_blank" href="http://adaptive-images.com/content/downloads/adaptive-images.1.5.2.zip" class="download">Download Image Re-size Script</a></p>
<h2>Implementing Adaptive or Responsive Images</h2>
<p><strong>1</strong>. Copy <strong><em>adaptive-images.php</em></strong> and <strong><em>.htaccess</em></strong> into the  root directory of your site. If you already have a htaccess file DO NOT  OVERWRITE IT. </p>
<p><strong>2</strong>. Copy the below Javascript code into the  &lt;head&gt; of your site.</p>
<pre><code>&lt;script&gt;document.cookie='resolution='+Math.max(screen.width,screen.height)+';  path=/';&lt;/script&gt;</code></pre>
<p><strong>3</strong>. Prepare a folder on root to cache  the images as per screen resolution. So as per default code written in PHP  file, you can prepare a folder named as &ldquo;ai-cache&rdquo;. But if needed you can  change the folder name as per your choice, just don&rsquo;t forget to update the new  name in CONFIG area of PHP file.</p>
<p><strong>4</strong>. If you are already having the  .htacces file in your website root folder and not using the file in zip folder,  then simply add the below code in it. JUST DON&rsquo;T FORGET TO BACKUP YOUR ORIGINAL  .HTACCESS BEFORE ANY THING.</p>
<div class="noteContainer"><span class="txtRed">Please Note:-</span> You can omit the code in bold, if it is already there in .htaccess, and place the rest of the code, but place it after RewriteEngine On,  as shown below.</div>
<p></p>
<pre><code><strong>&lt;IfModule  mod_rewrite.c&gt;</strong>
<strong>  Options +FollowSymlinks</strong>
<strong>  RewriteEngine On</strong>
  # Adaptive-Images  --------------------------------------------------------------
  # Add any directories you wish to omit from  the Adaptive-Images process on a new line, as follows:
  # RewriteCond %{REQUEST_URI} !some-directory
  # RewriteCond %{REQUEST_URI}  !another-directory
  RewriteCond %{REQUEST_URI} !assets
  # Send any GIF, JPG, or PNG request that IS  NOT stored inside one of the above directories
  # to adaptive-images.php so we can select  appropriately sized versions
  RewriteRule \.(?:jpe?g|gif|png)$  adaptive-images.php
  # END Adaptive-Images  -----------------------------------------------------------
<strong>&lt;/IfModule&gt;</strong></code></pre>
<p><strong>5</strong>. In the above code  there is code line &#8211; <strong><em>RewriteCond %{REQUEST_URI} !assets</em></strong>.  You can update the folder name &ldquo;assets&rdquo; as per your choice, which actually mean  that you want to restrict the mentioned folder images to get resize.<strong> </strong></p>
<p><strong>6</strong>.	You can now open the PHP file and have a play with the settings that are in the CONFIG area. By default it looks like this:</p>
<pre><code>/* CONFIG ----------------------------------------------------------------------------------- */
$resolutions = array(1382, 992, 768, 480); // the resolution break-points to use (screen widths, in pixels)

$cache_path  = &quot;ai-cache&quot;; // where to store the generated re-sized images. Specify from your document root!

$jpg_quality = 80; // the quality of any generated JPGs on a scale of 0 to 100

$sharpen     = TRUE; // Shrinking images can blur details, perform a sharpen on re-scaled images?

$watch_cache = TRUE; // check that the adapted image isn't stale (ensures updated source images are re-cached)

$browser_cache = 60*60*24*7; // How long the BROWSER cache should last (seconds, minutes, hours, days. 7days by default)

/* END CONFIG --------------------------------------------------------------------------------------</code></pre>
<p><strong>$resolutions</strong> are the  screen widths we&#8217;ll work with. In the default it will store a re-sized image  for large screens, normal screens, tablets, phones, and tiny phones.<br />
  In general, if you&#8217;re using a responsive design in CSS, these breakpoints  will be exactly the same as the ones you use in your media queries.</p>
<p><strong>$cache_path</strong> If you don&#8217;t  like the cached images being written to that folder, you can put it somewhere  else. Just put the path to the folder here and make sure you create it on the  server if for some reason that couldn&#8217;t be done automatically by  adaptive-images.php.</p>
<p><strong>$sharpen</strong> Will perform a  subtle sharpening on the rescaled images. Usually this is fine, but you may  want to turn it off if your server is very very busy.</p>
<p><strong>$watch_cache</strong> If your  server gets very busy it may help performance to turn this to FALSE. It will  mean however that you will have to manually clear out the cache directory if  you change a resource file</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tips4developer.com/general/responsive-images-reduce-image-size-adaptive-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Responsive Navigation – Converting menu navigation to dropdown navigation</title>
		<link>http://www.tips4developer.com/general/responsive-navigation-converting-menu-navigation-dropdown-navigation/</link>
		<comments>http://www.tips4developer.com/general/responsive-navigation-converting-menu-navigation-dropdown-navigation/#comments</comments>
		<pubDate>Thu, 23 Aug 2012 05:00:51 +0000</pubDate>
		<dc:creator>Guest</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[responsive]]></category>
		<category><![CDATA[responsive design]]></category>

		<guid isPermaLink="false">http://www.tips4developer.com/?p=802</guid>
		<description><![CDATA[Basically this article is about preparing the Responsive Navigation by converting horizontal menu navigation to dropdown navigation. In the very fast and moving edge of responsive designs and responsive layouts you might have seen X numbers to responsive navigation with different look and feel, which actually requires a bit extra time and CSS efforts to&#8230;]]></description>
				<content:encoded><![CDATA[<p>Basically  this article is about preparing the <strong>Responsive  Navigation by converting horizontal menu navigation to dropdown navigation</strong>.  In the very fast and moving edge of responsive designs and responsive layouts  you might have seen X numbers to responsive navigation with different look and  feel, which actually requires a bit extra time and CSS efforts to prepare them.  But preparing a dropdown navigation using &lt;select&gt; and &lt;option&gt; tag  is quite easier and along which actually consume very less space to fit in web  page to be viewed on mobile devices</p>
<p>What it just need a very few line of CSS code, CSS3 media queries, and JQuery. So let’s start the session.</p>
<h2>HTML to prepare dropdown navigation</h2>
<p>1. <strong>Adding Media viewport inside the &lt;head&gt;  tag &#8211; </strong>:-  if you are already using a responsive layout  structure, then no need to add Media viewport again as that will be already  there in your page &lt;head&gt;.</p>
<pre><code>&lt;meta&nbsp;name=&quot;viewport&quot;&nbsp;content=&quot;width=device-width,&nbsp;initial-scale=1,&nbsp;maximum-scale=1&quot;&gt;&nbsp;&nbsp;</code></pre>
<p>2. <strong>Placing the navigation code inside &lt;nav&gt;  tag</strong> &#8211; if you are using a WordPress site then simply  place the navigation code inside the &lt;nav&gt; tag. So your navigation  code will look something like this -</p>
<pre><code><strong>&lt;nav&gt;</strong>&lt;?php wp_nav_menu( array( 'theme_location' =&gt;  'primary' ) ); ?&gt;<strong>&lt;/nav&gt;</strong></code></pre>
<p>If you have a normal HTML or PHP site then your navigation code will look something like this &#8211; </p>
<pre><code><strong>&lt;nav&gt;</strong>
  &lt;ul&gt;
     &lt;li&gt;&lt;a  href=&quot;#&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
     &lt;li&gt;&lt;a href=&quot;#&quot;&gt;About  Us&lt;/a&gt;&lt;/li&gt;
     &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Our  Services&lt;/a&gt;
        &lt;ul&gt;
           &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Web Designing&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Web Development&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
     &lt;/li&gt;
     &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Contact  Us&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  <strong>&lt;/nav&gt;</strong></code></pre>
<h2>CSS</h2>
<p>Now by default we are going to hide the dropdown navigation and instead we will force horizontal navigation (normal navigation of your website) to get displayed. So for that simply place the below CSS code inside your Style sheet – </p>
<pre><code>nav select 
{
  display: none; /*= Force dropdown navigation to hide on desktop = */
}
@media (max-width: 960px)  
{
  nav ul     { display: none; } /*= Force normal horizontal navigation to hide mobile devices and ipad = */
  nav select { display: inline-block; } /*= Force dropdown navigation to get displayed on mobile devices and ipad = */
}</code></pre>
<h2>JQuery to prepare Dropdown Navigation using  tag</h2>
<p>Simply place the below code inside the &lt; head &gt; tag of your template file</p>
<pre><code>&lt;script src=&quot;<a href="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js">http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js</a>&quot;&gt;&lt;/script&gt;
&lt;script&gt;
 $(function() {
$(&quot;&lt;select /&gt;&quot;).appendTo(&quot;nav&quot;); 

$(&quot;&lt;option /&gt;&quot;, 
{ 
   &quot;selected&quot;: &quot;selected&quot;, 
   &quot;value&quot;   : &quot;&quot;, 
   &quot;text&quot;    : &quot;Site Menu&quot; // default &lt;option&gt; to display in dropdown 

}).appendTo(&quot;nav select&quot;); 

$(&quot;nav a&quot;).each(function()
{ 
 var el = $(this); 
 $(&quot;&lt;option /&gt;&quot;, { 
     &quot;value&quot;   : el.attr(&quot;href&quot;), 
     &quot;text&quot;    : el.text() 
 }).appendTo(&quot;nav select&quot;); 
});

$(&quot;nav select&quot;).change(function() 
{ 
  window.location = $(this).find(&quot;option:selected&quot;).val(); 
}); });<br />&lt;/script&gt;
</code></pre>
<p>Here you are all set, just go and check the out on your mobile device and ipad.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tips4developer.com/general/responsive-navigation-converting-menu-navigation-dropdown-navigation/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Adding Custom Widget in WordPress</title>
		<link>http://www.tips4developer.com/wordpress/adding-custom-widget-wordpress/</link>
		<comments>http://www.tips4developer.com/wordpress/adding-custom-widget-wordpress/#comments</comments>
		<pubDate>Wed, 01 Aug 2012 08:20:39 +0000</pubDate>
		<dc:creator>Guest</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[custom widget]]></category>
		<category><![CDATA[widget]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.tips4developer.com/?p=772</guid>
		<description><![CDATA[Here I am sharing a best and easiest way to create your own custom widgets with your own custom code in WordPress. In one of my old post I have already shared the way to Create custom widget area, so if you like you can also go through it. Before moving to the core code&#8230;]]></description>
				<content:encoded><![CDATA[<p>Here I am sharing a best and easiest way to <strong>create your  own custom widgets with your own custom code in WordPress</strong>. In one of my old  post I have already shared the way to <strong><a href="http://www.tips4developer.com/wordpress/wordpress-create-custom-widget-area/" target="_blank">Create  custom widget area</a>, </strong>so if you like you can also go through it.</p>
<p>Before moving to the core code I would like to share that basically Widgets are the small application that can be installed/coded and executed within a web page, they are derived from the idea to re use the code and allow users to turn personal content into dynamic web applications.</p>
<div style="text-align:center"><img src="http://www.tips4developer.com/wp-content/themes/Horcrux/images/adding-custom-widget.jpg" alt="Custom Widget in WordPress"></div>
<p>Here in my example I am sharing the <strong>base to create custom widget in WordPress</strong>. But you can place your own code as per your requirement just by replacing “// CUSTOM WIDGET CODE GOES HERE” in the below code. So might be you can prepare a widget to display latest 5 blog posts, random posts or else.</p>
<p>So what you simply have to do is – Place the bellow code in <strong>function.php</strong> of you activated theme folder</p>
<pre><code>&lt;?php
class mycustomwidget extends WP_Widget
{
  function mycustomwidget()
  {
    $widget_ops = array('classname' =&gt; 'mycustomwidget', 'description' =&gt; 'This is my own customized widget' );
    $this-&gt;WP_Widget('mycustomwidget', 'My Custom Widget', $widget_ops);
  }
 
  function form($instance)
  {
    $instance = wp_parse_args( (array) $instance, array( 'title' =&gt; '' ) );
    $title = $instance['title'];
?&gt;
  &lt;p&gt;&lt;label for="&lt;?php echo $this-&gt;get_field_id('title'); ?&gt;"&gt;Title: &lt;input class="widefat" id="&lt;?php echo $this-&gt;get_field_id('title'); ?&gt;" name="&lt;?php echo $this-&gt;get_field_name('title'); ?&gt;" type="text" value="&lt;?php echo attribute_escape($title); ?&gt;" /&gt;&lt;/label&gt;&lt;/p&gt;
&lt;?php
  }
 
  function update($new_instance, $old_instance)
  {
    $instance = $old_instance;
    $instance['title'] = $new_instance['title'];
    return $instance;
  }
 
  function widget($args, $instance)
  {
    extract($args, EXTR_SKIP);
 
    echo $before_widget;
    $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
 
    if (!empty($title))
      echo $before_title . $title . $after_title;;
 
   <strong> // CUSTOM WIDGET CODE GOES HERE</strong>
    echo "&lt;h1&gt;This is my new widget!&lt;/h1&gt;";
 
    echo $after_widget;
  }
 
}
add_action( 'widgets_init', create_function('', 'return register_widget("mycustomwidget");') );?&gt;</code></pre>
<p>Just don&#8217;t forget to add your own code in place of // CUSTOM WIDGET CODE GOES HERE and if you like you can also change the class name from &#8220;mycustomwidget&#8221; to what you like.</p>
<p>Enjoy you wordpress custom widget.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tips4developer.com/wordpress/adding-custom-widget-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securing WordPress From Malware Attack</title>
		<link>http://www.tips4developer.com/wordpress/securing-wordpress-malware-attack/</link>
		<comments>http://www.tips4developer.com/wordpress/securing-wordpress-malware-attack/#comments</comments>
		<pubDate>Sun, 15 Jul 2012 04:40:02 +0000</pubDate>
		<dc:creator>Guest</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[virus]]></category>
		<category><![CDATA[wordpress hack]]></category>
		<category><![CDATA[wordpress security]]></category>

		<guid isPermaLink="false">http://www.tips4developer.com/?p=725</guid>
		<description><![CDATA[I am writing this post just after practically experiencing the Malware attack on multiple WordPress websites hosted on 2 different server accounts. That was a very shocking moment for me when I was continuously receiving the malware infection alert from our hosting company. As they told us that our websites hosted on their sever were&#8230;]]></description>
				<content:encoded><![CDATA[<p>I am writing this post just after practically experiencing the Malware attack on multiple WordPress websites hosted on 2 different server accounts.  </p>
<p>That was a very shocking moment for me when I was continuously receiving the malware infection alert from our hosting company. As they told us that our <strong>websites hosted on their sever were compromised by Malware attack</strong> and that were <strong>injected through direct FTP access</strong>, so that was either by my machine or any of our collogues having the FTP access. </p>
<h2>Malwares Symptoms and Malicious Code</h2>
<p>In my case I noticed the <strong>front end of WordPress sites were completely get un-styled</strong> and was looking wearied as a UI point of view. Then I noticed a <strong>malicious code in header.php of theme folder</strong> that was looking something like this.</p>
<pre><code>&lt;?php eval(base64_decode("aWYoZnVuY3Rpb25fZXhpc3R.......</code></pre>
<p>And luckily I was aware of a <strong>website to scan Malware</strong> that is <a target="_blank" href="http://sitecheck.sucuri.net/">http://sitecheck.sucuri.net</a>, so with the help of this sucuri I scanned my all websites and get to know the infected files, and by luck that was only header.php and no any other file get infected.</p>
<h2>How to remove Malwares form WordPress Websites</h2>
<p>Here are very basic steps to remove malware from WordPress sites.</p>
<ol>
<li>Scan you website with <a href="http://sitecheck.sucuri.net" target="_blank">http://sitecheck.sucuri.net</a></li>
<li>After knowing the infection and infected  files either you can manually remove the malicious code directly accessing you  FTP and files or you can let the sucuri magical file to do this. For that you  simply have to
<ol>
<li><a href="http://www.tips4developer.com/wordpress-fix.txt">download wordpress-fix.txt</a> </li>
<li>Rename it to wordpress-fix.php and upload it to the root  of infected domain using any FTP Client. </li>
<li>Navigate  to <em>http://yoursite.com/wordpress-fix.php</em></li>
<li>And just wait for the magic.</li>
</ol>
<p>In my case I gone through  the manual process as that was bit late when i get aware of sucuri magical file  (but this really works well). And if you like you can <a href="http://blog.sucuri.net/2010/05/simple-cleanup-solution-for-the-latest-wordpress-hack.html" target="_blank">read  more about sucuri malware fixing file</a></p>
</li>
<li>After cleaning the malwares it’s time to secure  your website by reinjection of malwares and unauthorized access and for that  you have to follow these simple steps –
<ol>
<li>Reset your FTP and WP Admin account  password</li>
<li>Update the Files and Folder permissions on  FTP so as general it should be –
<ul>
<li>
  Folders  (directories): chmod 755</li>
<li>Files: chmod 644</li>
<li>Your wp-config.php  file: chmod 400</li>
</ul>
<p>  But  in my case I updated the header.php to 444 i.e read only. I did this just to  prevent from reinjection in between cleaning up the other websites on same  hosting account.
   </li>
</ol>
</li>
<li> Then at the top of anything else –
<ol>
<li>Always choose strong password</li>
<li>Keep up to date with latest WordPress  and Plugins</li>
<li>Change the WordPress Table Prefix (use  WP Security Scan)</li>
<li>Change WordPress Secret Keys (use WP  Security Scan)</li>
<li>Always scan your computer for virus, malwares, spywares,  trojans and other infections and loopholes with licensed Antivirus.</li>
</ol>
</li>
</ol>
<p>After following the above steps all manual work, the  next step is to install few of the <strong>best  working WordPress security plugins</strong>,<strong> </strong>that  will going to steel shield your website and hack proof up to a very good  extend.</p>
<h2>Best  of all WorpPress Security Plugins and Tips to make you WordPress site more  secure</h2>
<p></p>
<ol>
<li><strong>Wordfence</strong> &#8211; scans your site for viruses, malware, trojans, malicious links, protects your  site against scrapers, aggressive robots, fake Googlebots, protects against  brute force attacks, It Constantly scans your posts, pages, comments and  plugins for malware URL’s, Send <strong>email  alerts and notification while detecting any loop hole</strong>, plugin update, code  change in FTP file and much much more.<br />
  <a class="download" href="http://wordpress.org/extend/plugins/wordfence/">Download Wordfence</a>
  </li>
<p></p>
<li><strong>Exploit Scanner &#8211; </strong>This plugin searches the files  on your website, and the posts and comments tables of your database for  anything suspicious. It also examines your list of active plugins for unusual  filenames.<br />
  <a class="download" href="http://wordpress.org/extend/plugins/exploit-scanner/">Download Exploit Scanner</a>
  </li>
<p></p>
<li><strong>Sucuri Scanner – </strong>Official Plugin by  Sucuri SiteCheck that scan results directly in  your WordPress dashboard. The best way to know if your site is infected with  malware or blacklist.<br />
    <a class="download" href="http://wordpress.org/extend/plugins/sucuri-scanner/">Download Sucuri Scanner</a>
  </li>
<p></p>
<li><strong>WP Security Scan  &#8211; </strong>WP Security Scan checks your WordPress website/blog for security  vulnerabilities and suggests corrective actions such as:
<ol>
<li>Passwords</li>
<li>File permissions</li>
</ol>
<ol start="3" type="1">
<li>Database security</li>
<li>Version hiding</li>
<li>WordPress admin protection/security</li>
<li>Removes WP Generator META tag from core code</li>
</ol>
</li>
<li><strong>Install Perishable Press 3G Blacklist – </strong>A great and effective .htacces security developed by <a href="http://perishablepress.com/perishable-press-3g-blacklist/" target="_blank">Perishable Press</a>.  That simply requires some code to be pated in .htaccess file. </li>
</ol>
<p>Then I have  already shared few more <a href="http://www.tips4developer.com/wordpress/plugins-secure-wordpress-website/" target="_blank">best  plugins to secure  WordPress website</a> and <a href="http://www.tips4developer.com/wordpress/tips-secure-wordpress-website/" target="_blank">few  tips to secure WordPress website</a>, so you can also refer this.
  </p>
<p>And I hope  following the above steps you will make your websites a bit healthy and  infection free.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tips4developer.com/wordpress/securing-wordpress-malware-attack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtuemart 2.0 – Resolving multiple tax issue</title>
		<link>http://www.tips4developer.com/joomla/virtuemart-20-resolving-multiple-tax-issue/</link>
		<comments>http://www.tips4developer.com/joomla/virtuemart-20-resolving-multiple-tax-issue/#comments</comments>
		<pubDate>Wed, 27 Jun 2012 08:41:33 +0000</pubDate>
		<dc:creator>Guest</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Joomla 2.5]]></category>
		<category><![CDATA[virtuemart 2.0]]></category>

		<guid isPermaLink="false">http://www.tips4developer.com/?p=700</guid>
		<description><![CDATA[I recently noticed a bug in Virtuemart 2.0.2 that if your website is configured with multiple tax options based on different state/province then Virtuemart checkout page displays and adds all the configured taxes in product sale price, until and unless if user gets logged in before moving on to checkout process. So for example if&#8230;]]></description>
				<content:encoded><![CDATA[<p>I recently noticed a bug in Virtuemart 2.0.2 that if your website is <strong>configured with multiple tax options</strong> based on different state/province then <strong>Virtuemart checkout page displays and adds all the configured taxes in product sale price</strong>, until and unless if user gets logged in before moving on to checkout process.</p>
<p>So for example if your Virtuemart is configured to add 10% tax for Toronto, 20% for Alberta, 15 % for British Columbia and say if product sales price is $50. Now on checkout page buyer will ask to pay $ 72.5 as a total amount, bifurcating $(50 as sales price + 5(10% Toronto tax) + 10(20% Alberta tax) +7.5(BC 15% tax)).</p>
<p>Now as soon the buyer get logged in and confirm for the check out, all the added tax will get cut off and final tax will get applied on the basis state/province displaying on his/her shipping address.</p>
<div style="text-align:center"><img src="/wp-content/themes/Horcrux/images/virtuemart-multiple-tax-issue-default.jpg" alt="Virtuemart 2.0 multiple tax issue"><br />
<br />
<img src="/wp-content/themes/Horcrux/images/virtuemart-multiple-tax-issue-custom.jpg" alt="Virtuemart 2.0 multiple tax issue">
</div>
<p></p>
<h2>Solution to resolve multiple tax issue</h2>
<p>Here we have a trick, so <strong>by adding a condition to check that whether user is logged in or not, we can show/hide or add/remove the unwanted taxes</strong>.</p>
<p>1.0.	Locate the file &#8211; <strong>\components\com_virtuemart\views\cart\tmpl\default_pricelist.php</strong><em><br />
and search for the below lines of code</p>
<pre><code>&lt;td colspan=&quot;4&quot; align=&quot;right&quot;&gt;&lt;?php echo $rule['calc_name'] ?&gt; &lt;/td&gt;
  &lt;?php if ( VmConfig::get('show_tax')) { ?&gt;
     &lt;td align=&quot;right&quot;&gt; &lt;/td&gt; 
  &lt;?php } ?&gt;</code></pre>
<p>1.1.	Replace the above lines of code with – </p>
<pre><code>&lt;td colspan=&quot;4&quot; align=&quot;right&quot;&gt;&lt;?php echo $rule['calc_name'] ?&gt; &lt;/td&gt;
  &lt;?php if ( VmConfig::get('show_tax') <strong>&amp;&amp; $user-&gt;id &gt;0</strong>) { ?&gt; 
   { ?&gt;
     &lt;td align=&quot;right&quot;&gt; &lt;/td&gt; 
   &lt;?php } ?&gt;</code></pre>
<p>2.0.	Search for the below lines of code -</p>
<pre><code>&lt;td colspan=&quot;4&quot;  align=&quot;right&quot;&gt;&lt;?php echo JText::_('COM_VIRTUEMART_CART_TOTAL')  ?&gt;: &lt;/td&gt;<br />
  &lt;?php if ( VmConfig::get('show_tax'))  { ?&gt;<br />
   &lt;td align=&quot;right&quot;&gt;<br />
     &lt;?php echo &quot;&lt;span class='priceColor2'&gt;&quot;.$this-&gt;cart-&gt;prices['billTaxAmount'].&quot;&lt;/span&gt;&quot;  ?&gt; <br />
   &lt;/td&gt;<br />
  &lt;?php } ?&gt;</code></pre>
<p>2.1.	Replace the above lines of code with –</p>
<pre><code>&lt;td colspan=&quot;4&quot;  align=&quot;right&quot;&gt;&lt;?php echo JText::_('COM_VIRTUEMART_CART_TOTAL')  ?&gt;: &lt;/td&gt;<br />
  &lt;?php if ( VmConfig::get('show_tax'))  { ?&gt;<br />
    <strong>if($user-&gt;id  &gt;0)</strong> <strong>{  ?&gt;</strong><br />
     &lt;td align=&quot;right&quot;&gt;<br />
         &lt;?php echo &quot;&lt;span class='priceColor2'&gt;&quot;.$this-&gt;cart-&gt;prices['billTaxAmount'].&quot;&lt;/span&gt;&quot;  ?&gt; <br />
     &lt;/td&gt;<br />
     <strong>&lt;?php </strong><br />
     <strong>} else  { echo &quot;&lt;td align='right'&gt;  $0.00&lt;/td&gt;&quot;; } }</strong></code></pre>
<p>3.0.	Search for the below lines of code -</p>
<pre><code>&lt;tr  class=&quot;sectiontableentry&lt;?php $i ?&gt;&quot;&gt;<br />
 &lt;td colspan=&quot;4&quot;  align=&quot;right&quot;&gt;&lt;?php echo $rule['calc_name'] ?&gt; &lt;/td&gt;<br />
   &lt;?php if (  VmConfig::get('show_tax')) { ?&gt;<br />
    &lt;td align=&quot;right&quot;&gt;  &lt;/td&gt;<br />
   &lt;?php } ?&gt;<br />
 &lt;td align=&quot;right&quot;&gt;  &lt;?php echo  $this-&gt;cart-&gt;prices[$rule['virtuemart_calc_id'].'Diff'];  ?&gt;&lt;/td&gt;<br />
 &lt;td  align=&quot;right&quot;&gt;&lt;?php echo  $this-&gt;cart-&gt;prices[$rule['virtuemart_calc_id'].'Diff'];   ?&gt; &lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;?php<br />
if($i) $i=1; else $i=0;<br />
} ?&gt;<br />
&lt;?php</code></pre>
<p>3.1.	Place the above code under a conditional tag or simply replace  the above lines of code with – </p>
<pre><code><strong>if($user-&gt;id  &gt;0){ ?&gt;</strong><br />
 &lt;tr  class=&quot;sectiontableentry&lt;?php $i ?&gt;&quot;&gt;<br />
   &lt;td colspan=&quot;4&quot;  align=&quot;right&quot;&gt;&lt;?php echo $rule['calc_name'] ?&gt; &lt;/td&gt;<br />
    &lt;?php if (  VmConfig::get('show_tax')) { ?&gt;<br />
      &lt;td align=&quot;right&quot;&gt;  &lt;/td&gt;<br />
    &lt;?php } ?&gt;<br />
  &lt;td align=&quot;right&quot;&gt;  &lt;?php echo  $this-&gt;cart-&gt;prices[$rule['virtuemart_calc_id'].'Diff'];  ?&gt;&lt;/td&gt;<br />
  &lt;td  align=&quot;right&quot;&gt;&lt;?php echo  $this-&gt;cart-&gt;prices[$rule['virtuemart_calc_id'].'Diff'];   ?&gt; &lt;/td&gt;<br />
 &lt;/tr&gt;<br />
  &lt;?php<br />
  if($i) $i=1; else $i=0;<br />
  }<br />
  <strong>}</strong></code></pre>
<p>4.0. Search for the below lines of code –</p>
<pre><code>&lt;td  align=&quot;right&quot;&gt;&lt;strong&gt;&lt;?php echo  $this-&gt;cart-&gt;prices['billTotal'] ?&gt;&lt;/strong&gt;&lt;/td&gt;</code></pre>
<p>4.1.	Replace the above lines of code with – </p>
<pre><code>&lt;td  align=&quot;right&quot;&gt;&lt;strong&gt;<br />
  &lt;?php  if($user-&gt;id &gt;0)<br />
  {<br />
  echo $this-&gt;cart-&gt;prices['billTotal'] ;<br />
  }<br />
  else<br />
  {<br />
  echo $this-&gt;cart-&gt;prices['salesPrice'];<br />
  }<br />
  ?&gt;&lt;/strong&gt;
&lt;/td&gt;</code></pre>
<p>Heeee we are done, its time to check the output.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tips4developer.com/joomla/virtuemart-20-resolving-multiple-tax-issue/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Joomla 2.5 – Adding Embed and Object tag in article</title>
		<link>http://www.tips4developer.com/joomla/joomla-25-adding-embed-object-tag-article/</link>
		<comments>http://www.tips4developer.com/joomla/joomla-25-adding-embed-object-tag-article/#comments</comments>
		<pubDate>Fri, 15 Jun 2012 06:35:44 +0000</pubDate>
		<dc:creator>Guest</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[jooomla 2.5]]></category>

		<guid isPermaLink="false">http://www.tips4developer.com/?p=692</guid>
		<description><![CDATA[I noticed that most of the Joomla developer has faced the issue that Joomla editor omits embed and object tag that we use to embed flash, video or YouTube. So whether it is JCK Editor, CK Editor, TinyMCE or else, none of these allows adding embed and object tags by default. Then I found that&#8230;]]></description>
				<content:encoded><![CDATA[<p>I noticed that most of the Joomla developer has faced the issue that <strong>Joomla editor omits embed and object tag</strong> that we use to embed flash, video or YouTube. So whether it is JCK Editor, CK Editor, TinyMCE or else, none of these allows adding embed and object tags by default.</p>
<p>Then I found that different bloggers shares different view and tell different ways to <strong>add embed tag in Joomla editor</strong>, like by entering in Plugin settings and making some changes over there, but that actually do not found to be work.</p>
<p>Now here I got a best and 100% working solution to <strong>allow Joomla editors to add embed and object tag in it. This solution tested and works well in Joomla 1.6, Joomla 1.7 and Joomla 2.5</strong>.</p>
<p>The actual reason I found is that under the core Joomla file (libraries\joomla\filter\input.php) there are some black listed tags assigned to a variable “<strong>$tagBlacklist</strong>” and by removing those tags from the black list we can achieve the requirement.</p>
<p>1.	Locate the file – <strong><em>\libraries\joomla\filter\input.php</em></strong></p>
<p>2.	Search for “$tagBlacklist” (provabily you will get this on line # 64)</p>
<p>3.	Remove &#8216;object&#8217; and ‘embed’ form the array</p>
<p>That’s all now editor will allow you to add these tags. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.tips4developer.com/joomla/joomla-25-adding-embed-object-tag-article/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
