<?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>IndoLance.com &#187; Wordpress</title>
	<atom:link href="http://www.indolance.com/category/programming-stuff/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.indolance.com</link>
	<description>Internet, Tech, Gadgets, Money Making, and Stuff</description>
	<lastBuildDate>Sat, 14 Aug 2010 07:43:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Javascript : Text Resize with Cookie</title>
		<link>http://www.indolance.com/javascript-text-resize-with-cookie/</link>
		<comments>http://www.indolance.com/javascript-text-resize-with-cookie/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 04:15:14 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming Stuff]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.indolance.com/javascript-text-resize-with-cookie/</guid>
		<description><![CDATA[I was telling you in a previous article - Javascript - text resize - how you can give your site’s visitors the possibility to see your page’s content at different text sizes, using javascript. Let’s take this further and think a little about the user… now, if he really needs a bigger text size, then he will have to use those buttons or links on each page - not so convenient, right? Well, don’t you worry about this because that’s what we have cookies for!  [...] <a href="" title="">[ &#8594; ]</a> <a href="http://www.indolance.com/javascript-text-resize-with-cookie/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="float:left;text-align:left;margin:0 10px 10px 0;"><a href="" title=""><img src="http://www.indolance.com/images/coding.jpg" alt="" /></a></p>
<p>I was telling you in a previous article &#8211; Javascript &#8211; text resize &#8211; how you can give your site’s visitors the possibility to see your page’s content at different text sizes, using javascript. Let’s take this further and think a little about the user… now, if he really needs a bigger text size, then he will have to use those buttons or links on each page &#8211; not so convenient, right?</p>
<p>Well, don’t you worry about this because that’s what we have cookies for! <img src='http://www.indolance.com/wp-includes/images/smilies/icon_smile.gif' alt=':smile:' class='wp-smiley' /> </p>
<p>Using the same example as in the previous article, here is what you have to do:</p>
<p><strong>1. Add two more functions to the javascript file for cookie’s handling</strong></p>
<p>Javascript code:</p>
<p><code>    function createCookie(name,value,days) {<br />
      if (days) {<br />
        var date = new Date();<br />
        date.setTime(date.getTime()+(days*24*60*60*1000));<br />
        var expires = "; expires="+date.toGMTString();<br />
      }<br />
      else var expires = "";<br />
      document.cookie = name+"="+value+expires+"; path=/";<br />
    }<br />
    function readCookie(name) {<br />
      var nameEQ = name + "=";<br />
      var ca = document.cookie.split(';');<br />
      for(var i=0;i < ca.length;i++) {<br />
        var c = ca[i];<br />
        while (c.charAt(0)==' ') c = c.substring(1,c.length);<br />
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);<br />
      }<br />
      return null;<br />
    }</code></p>
<p>The createCookie function has three parameters: the name and value of the cookie and the number of days it is to remain active. If you set the number of days to 0 the cookie is trashed when the user closes the browser. If you set the days to a negative number the cookie is trashed immediately.<br />
In my example, I used “textsizestyle” as cookie’s name, javascript variable textsize as value and I set it to be active for 365 days: createCookie("textsizestyle", textsize, 365);.</p>
<p>The readCookie function has only one parameter: the name of the cookie. It returns the value of that cookie or null.<br />
In my example, I used “textsizestyle” as cookie’s name: readCookie("textsizestyle");</p>
<p>More info on these two functions and cookies in general Go to <a href="http://www.quirksmode.org/js/cookies.html" target="_blank" rel="external nofollow">Quirksmode site</a>.</p>
<p><strong>2. Use createCookie to store user’s preferred text size</strong></p>
<p>I used it in the fsize function, so that each time the user change the text size, the font value is stored in the cookie. Here is the modified fsize function:</p>
<p><code>    function fsize(size,unit,id){<br />
      var vfontsize = document.getElementById(id);<br />
      if(vfontsize){<br />
        vfontsize.style.fontSize = size + unit;<br />
        createCookie("textsizestyle", textsize, 365);<br />
      }<br />
    }</code></p>
<p><strong>3. Use readCookie to change text size on rendering</strong></p>
<p>I added the following piece of code at the end of the page to read the cookie’s value and in case there is a value stored into the cookie to force the page content to be render at that specific font size.</p>
<p><code>&lt;script type=&quot;text/javascript&quot;&gt;<br />
    var cookie = readCookie("textsizestyle");<br />
    textsize = cookie ? cookie : 10;<br />
    fsize(textsize,'px','content');<br />
    &lt;/script&gt;</code></p>
<p>To make it easy, I have put them all js functions in a javascript file, ready for you to <a href="http://www.indolance.com/go/2/" target="_blank" title="Download Javascript Text Resize File" rel="bookmark">download</a> and add to your site.</p>
<p>[ <a href="http://www.indolance.com/go/2/" target="_blank" title="Download Javascript Text Resize File" rel="bookmark">Download Javascript Text Resize File</a> ]</p>
<p>That’s it! Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.indolance.com/javascript-text-resize-with-cookie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript : Text Resize</title>
		<link>http://www.indolance.com/javascript-text-resize/</link>
		<comments>http://www.indolance.com/javascript-text-resize/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 04:12:04 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming Stuff]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.indolance.com/javascript-text-resize/</guid>
		<description><![CDATA[If you want to give your site’s visitors the possibility to see your page’s content at different text sizes, you can do it with the following javascript text resize solution. First you should decide which part of the page will be affected by text resizing and mark it with an id - in my example id=”content”.  [...] <a href="" title="">[ &#8594; ]</a> <a href="http://www.indolance.com/javascript-text-resize/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="float:left;text-align:left;margin:0 10px 0 0;"><a href="" title=""><img src="http://www.indolance.com/images/coding.jpg" alt="" /></a></p>
<p>If you want to give your site’s visitors the possibility to see your page’s content at different text sizes, you can do it with the following javascript text resize solution.</p>
<p>First you should decide which part of the page will be affected by text resizing and mark it with an id &#8211; in my example id=”content”. It can be a div or a table or the entire page if you want.</p>
<p>Alright, the javascript code..</p>
<p><strong>Simple Text size Switcher</strong></p>
<p><code>function fsize(size,unit,id){<br />
      var vfontsize = document.getElementById(id);<br />
      if(vfontsize){<br />
       vfontsize.style.fontSize = size + unit;<br />
      }<br />
    }</code></p>
<p>This function has 3 parameters: size (like 10, 80, 2), unit (like px, %, em) and id (like content).</p>
<p>Next add links for text resize &#8211; you can use text or images for these &#8211; for example:</p>
<p><code>&lt;a href=&quot;javascript:fsize(10,'px','content');&quot;&gt; Increase size &lt;/a&gt;<br />
    &lt;a href=&quot;javascript:fsize(14,'px','content');&quot;&gt; Reduce size &lt;/a&gt;</code></p>
<p>There you have a simple text size switcher!</p>
<p><strong>Dynamic Text Size Changer</strong></p>
<p>I wanted to change the text size dynamically by 2 px at each click, so I changed the code a little bit. I used another function to calculate the new value of the text size by adding or subtracting 2 out of a js variable (textsize) which holds the current text size value.</p>
<p>Here is what you need to add into the javascript code:</p>
<p><code>var textsize = 10;<br />
    function changetextsize(up){<br />
      if(up){<br />
       textsize = parseFloat(textsize)+2;<br />
      }else{<br />
       textsize =parseFloat(textsize)-2;<br />
      }<br />
    }</code></p>
<p>Now, add onclick event on those links to call the new function and also change the first parameter of fsize function with the js var (textsize) &#8211; like this:</p>
<p><code><br />
&lt;a href=&quot;javascript:fsize(textsize,'px','content');&quot; onclick=&quot;changetextsize(1);&quot;&gt; Increase size &lt;/a&gt;<br />
    &lt;a href=&quot;javascript:fsize(textsize,'px','content');&quot; onclick=&quot;changetextsize(0);&quot;&gt; Reduce<br />
size &lt;/a&gt;</code></p>
<p>That should do it! Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.indolance.com/javascript-text-resize/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ultimate WP Plugins to Help You Make Money with Blogging</title>
		<link>http://www.indolance.com/ultimate-wp-plugins-to-help-you-make-money-with-blogging/</link>
		<comments>http://www.indolance.com/ultimate-wp-plugins-to-help-you-make-money-with-blogging/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 05:04:21 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Basic Money Making]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Wordpress Plugins]]></category>

		<guid isPermaLink="false">http://www.indolance.com/ultimate-wp-plugins-to-help-you-make-money-with-blogging/</guid>
		<description><![CDATA[It's about time to highlight some of my favourite WP plugins that can help you to make money online.
Please note that these plugins may or may not work on your particular Wordpress installation, as it will depend on your version of WP and the latest plugin upate.  [...] <a href="" title="">[ &#8594; ]</a> <a href="http://www.indolance.com/ultimate-wp-plugins-to-help-you-make-money-with-blogging/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="float:right;text-align:right;margin:0 0 10px 10px;"><a href="" title=""><img src="http://www.indolance.com/images/a.gif" alt="" /></a></p>
<p>It&#8217;s about time to highlight some of my favourite WP plugins that can help you to make money online.<br />
Please note that these plugins may or may not work on your particular WordPress installation, as it will depend on your version of WP and the latest plugin upate.</p>
<p>1. <strong><a href="http://wordpress.org/extend/plugins/all-in-one-seo-pack/" target="_blank" rel="external nofollow" title="All-in-One SEO Pack">All-in-One SEO Pack</a></strong> &#8211; Great for auto-adding of meta tags, optimizing titles, etc. Simple to install.</p>
<p>2. <strong><a href="http://wordpress.org/extend/plugins/adsense-manager/" target="_blank" rel="external nofollow" title="AdSense Manager">AdSense Manager</a></strong> &#8211; Makes it easier for you to post your Adsense ads within your WordPress blogs (even within posts). You can change different types of ads. And, it’s widget-enabled. You can also optionally ‘donate’ part of your ad space to the creator of this plugin.</p>
<p>3. <strong><a href="http://kpumuk.info/projects/wordpress-plugins/ad-rotator/" target="_blank" rel="external nofollow" title="Ad Rotator">Ad Rotator</a></strong> &#8211; If you plan to run different affiliate links or your own direct ads, then this might be a good way to show the different ads you’ve got without overcrowding your blog with too many ads.</p>
<p>4. <strong><a href="http://wordpress.org/extend/plugins/amazonsimpleadmin/" target="_blank" rel="external nofollow" title="Amazon Simple Admin">Amazon Simple Admin</a></strong> &#8211; Enables you to insert Amazon products within your blog posts.</p>
<p>5. <strong><a href="http://wordpress.org/extend/plugins/amazon-smartlinks/" target="_blank" rel="external nofollow" title="Amazon Smartlinks Widget">Amazon Smartlinks Widget</a></strong> &#8211; Another way to make money off your Amazon affiliate links. It can post your Wish List, Amazon Bestsellers, etc. with your affiliate ID linked to the displays. Also widgetized.</p>
<p>6. <strong><a href="http://www.text-link-ads.com/" target="_blank" rel="external nofollow" title="Text Link Ads">Text Link Ads</a></strong> &#8211; If you wish to run text link ads, then you gotta have the plugin that comes when you set up your TLA account. It’s also now widget-enabled.</p>
<p>7. <strong><a href="http://www.linksback.org/wordpress/wordpress-plugins/wpdirectory-wordpress-plugin/" target="_blank" rel="external nofollow" title="WP Directory">WP Directory</a></strong> &#8211; Looking to start directories, but don’t want to handle a massive directory software or application? Try this simple solution that you can manage via WordPress. You can create paid listings, sponsored links, marketplace, etc. Really useful!</p>
<p>8. <strong><a href="http://www.justmakemoneyonline.com/2007/06/20/sell-sponsored-links-wp-plugin/" target="_blank" rel="external nofollow" title="textLink Adder">textLink Adder</a></strong> &#8211; A good little plugin that enables you to sell direct text links or run your own affiliate links.</p>
<p>9. <strong><a href="http://wordpress.org/extend/plugins/quick-shop/" target="_blank" rel="external nofollow" title="Quick Shop">Quick Shop</a></strong> &#8211; A sidebar widget that enables you to add a Paypal button, either for donations or for selling an item or two. Has a mini shopping cart feature.</p>
<p>10. <strong><a href="http://wordpress.org/extend/plugins/all-in-one-adsense-and-ypn/" target="_blank" rel="external nofollow" title="All in One AdSense and YPN">All in One AdSense and YPN</a></strong> &#8211; Enables you to add Adsense or Yahoo Publishing Network ads in to your posts.</p>
<p>11. <strong><a href="http://wordpress.org/extend/plugins/ad-minister/" target="_blank" rel="external nofollow" title="Ad-minister">Ad-minister</a></strong> &#8211; Helps you to manage your blog’s ads, including ad rotation.</p>
<p>12. <strong><a href="http://wordpress.org/extend/plugins/adserve/" target="_blank" rel="external nofollow" title="AdServe">AdServe</a></strong> &#8211; A plugin that helps you to manage direct advertising on your blog. It comes various options (how many impressions available, types of banners, etc.)</p>
<p>Be sure to do a test drive to check your WordPress version compatibility with this plugin each.<br />
Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.indolance.com/ultimate-wp-plugins-to-help-you-make-money-with-blogging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
