<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Webmaster Sucks</title>
	
	<link>http://www.webmastersucks.com</link>
	<description>Here I share stuff I used to suck at as a novice webmaster..</description>
	<lastBuildDate>Mon, 13 Jun 2011 06:39:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/WebmasterSucks" /><feedburner:info uri="webmastersucks" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>WebmasterSucks</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Sort VARCHAR as INT in MySQL</title>
		<link>http://feedproxy.google.com/~r/WebmasterSucks/~3/wmQOe3VEsQk/</link>
		<comments>http://www.webmastersucks.com/sort-varchar-as-int-in-mysql/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 06:39:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[mysql cast]]></category>
		<category><![CDATA[sort integer]]></category>
		<category><![CDATA[sort mysql]]></category>
		<category><![CDATA[sort varchar]]></category>
		<category><![CDATA[sort varchar integer]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=293</guid>
		<description><![CDATA[
			
				
			
		
Sometimes we can user VARCHAR for integer values. But when we need sort them, we have got big problem. Because VARCHAR&#8217;s are string and it is sorting like a string.
Example:
1a 2a 3a 10b 20b 30b 15c 25c 35c (VARCHAR)
1a 10b 15c 2a 20b 25c 3a 30b 35c (Sorted)
We need
1a 2a 3a 10b 15c 20b 25c [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fsort-varchar-as-int-in-mysql%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fsort-varchar-as-int-in-mysql%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Sometimes we can user VARCHAR for integer values. But when we need sort them, we have got big problem. Because VARCHAR&#8217;s are string and it is sorting like a string.</p>
<p>Example:</p>
<p>1a 2a 3a 10b 20b 30b 15c 25c 35c (VARCHAR)</p>
<p>1a 10b 15c 2a 20b 25c 3a 30b 35c (Sorted)</p>
<p>We need</p>
<p>1a 2a 3a 10b 15c 20b 25c 30b 35c (Sorted integer)</p>
<p>We can do it with mysql CAST</p>
<blockquote>
<pre>SELECT vNumber FROM table ORDER BY CAST(`vNumber` AS SIGNED)</pre>
</blockquote>
<pre>Reverse order
<blockquote>
<pre>SELECT vNumber FROM table ORDER BY CAST(`vNumber` AS SIGNED) DESC</pre>
</blockquote>
<pre>
Other possible conversion types you may need are:
<ul>
<li>BINARY[(N)]</li>
<li>CHAR[(N)]</li>
<li>DATE</li>
<li>DATETIME</li>
<li>DECIMAL[(M[,D])]</li>
<li>SIGNED [INTEGER]</li>
<li>TIME</li>
<li>UNSIGNED [INTEGER]</li>
</ul>

You can find more about CAST -&gt; <a href="http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html#function_cast" target="_blank">MySQL docs here</a>.
</pre>
</pre>

<p><a href="http://feedads.g.doubleclick.net/~a/cu62Thzifv-K0_p8z9z-In_steo/0/da"><img src="http://feedads.g.doubleclick.net/~a/cu62Thzifv-K0_p8z9z-In_steo/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/cu62Thzifv-K0_p8z9z-In_steo/1/da"><img src="http://feedads.g.doubleclick.net/~a/cu62Thzifv-K0_p8z9z-In_steo/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/WebmasterSucks/~4/wmQOe3VEsQk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/sort-varchar-as-int-in-mysql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.webmastersucks.com/sort-varchar-as-int-in-mysql/</feedburner:origLink></item>
		<item>
		<title>Recursive Category Listing</title>
		<link>http://feedproxy.google.com/~r/WebmasterSucks/~3/2C2eb13kHUk/</link>
		<comments>http://www.webmastersucks.com/recursive-category-listing/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 11:49:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[categories php]]></category>
		<category><![CDATA[category list]]></category>
		<category><![CDATA[recursive function]]></category>
		<category><![CDATA[recursive functions php]]></category>
		<category><![CDATA[recursive php]]></category>
		<category><![CDATA[str_repeat]]></category>
		<category><![CDATA[str_repeate php]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=290</guid>
		<description><![CDATA[
			
				
			
		
Webmasters allways use category trees, i wrote a function about creating category trees with using recursive function.

&#60;?php
header('Content-Type: text/html; charset=UTF-8');

include($_SERVER['DOCUMENT_ROOT'].&#34;/mysql.inc.php&#34;);

function categories($firstCategory,$node)
{
	$kQ = mysql_query(&#34;SELECT * FROM categories WHERE category= &#34;.$firstCategory);
	if(mysql_num_rows($kQ) &#62; 0)
	{
		echo(str_repeat(&#34;\t&#34;,$node+1).&#34;&#60;ul&#62;\n&#34;);
		$node++;
		while($k = mysql_fetch_array($kQ))
		{
			//str_repeat is for &#34;view source&#34; format, we set TAB character for readable HTML
			echo(str_repeat(&#34;\t&#34;,$node).&#34;&#60;li&#62;&#34;.($node+1).&#34; &#34;.$k[&#34;name&#34;].&#34;&#60;/li&#62;\n&#34;);

			// Recursive, call function it self
			categories($k[&#34;id&#34;], $node);
		}
		echo(str_repeat(&#34;\t&#34;,$node).&#34;&#60;/ul&#62;\n&#34;);
	}
}
categories(0,-1);
?&#62;

Output :

Food

Fruits

Apple
Banana


Vegetables

Tomatoes
Aborgin




Drinks

Soft

Fruit Juice

Apple Juice
Strawberry Juice


Milk





]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Frecursive-category-listing%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Frecursive-category-listing%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Webmasters allways use category trees, i wrote a function about creating category trees with using recursive function.</p>
<pre class="brush: php; title: ;">
&lt;?php
header('Content-Type: text/html; charset=UTF-8');

include($_SERVER['DOCUMENT_ROOT'].&quot;/mysql.inc.php&quot;);

function categories($firstCategory,$node)
{
	$kQ = mysql_query(&quot;SELECT * FROM categories WHERE category= &quot;.$firstCategory);
	if(mysql_num_rows($kQ) &gt; 0)
	{
		echo(str_repeat(&quot;\t&quot;,$node+1).&quot;&lt;ul&gt;\n&quot;);
		$node++;
		while($k = mysql_fetch_array($kQ))
		{
			//str_repeat is for &quot;view source&quot; format, we set TAB character for readable HTML
			echo(str_repeat(&quot;\t&quot;,$node).&quot;&lt;li&gt;&quot;.($node+1).&quot; &quot;.$k[&quot;name&quot;].&quot;&lt;/li&gt;\n&quot;);

			// Recursive, call function it self
			categories($k[&quot;id&quot;], $node);
		}
		echo(str_repeat(&quot;\t&quot;,$node).&quot;&lt;/ul&gt;\n&quot;);
	}
}
categories(0,-1);
?&gt;
</pre>
<p><strong>Output :</strong></p>
<ul>
<li>Food
<ul>
<li>Fruits
<ul>
<li>Apple</li>
<li>Banana</li>
</ul>
</li>
<li>Vegetables
<ul>
<li>Tomatoes</li>
<li>Aborgin</li>
</ul>
</li>
</ul>
</li>
<li>Drinks
<ul>
<li>Soft
<ul>
<li>Fruit Juice
<ul>
<li>Apple Juice</li>
<li>Strawberry Juice</li>
</ul>
</li>
<li>Milk</li>
</ul>
</li>
</ul>
</li>
</ul>

<p><a href="http://feedads.g.doubleclick.net/~a/5SRi8T2-jqvHAxrclewpqAazf2A/0/da"><img src="http://feedads.g.doubleclick.net/~a/5SRi8T2-jqvHAxrclewpqAazf2A/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/5SRi8T2-jqvHAxrclewpqAazf2A/1/da"><img src="http://feedads.g.doubleclick.net/~a/5SRi8T2-jqvHAxrclewpqAazf2A/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/WebmasterSucks/~4/2C2eb13kHUk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/recursive-category-listing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.webmastersucks.com/recursive-category-listing/</feedburner:origLink></item>
		<item>
		<title>Tracking Advertisement Campaigns</title>
		<link>http://feedproxy.google.com/~r/WebmasterSucks/~3/8o6UebSmh78/</link>
		<comments>http://www.webmastersucks.com/tracking-advertisement-campaigns/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 15:38:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[campaign tagging]]></category>
		<category><![CDATA[campaign tracking]]></category>
		<category><![CDATA[campaing track]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[google analytics track]]></category>
		<category><![CDATA[marketing campaign tracking]]></category>
		<category><![CDATA[msn]]></category>
		<category><![CDATA[paid-search]]></category>
		<category><![CDATA[track url]]></category>
		<category><![CDATA[tracking campaign]]></category>
		<category><![CDATA[utm_campaign]]></category>
		<category><![CDATA[utm_content]]></category>
		<category><![CDATA[utm_medium]]></category>
		<category><![CDATA[utm_source]]></category>
		<category><![CDATA[utm_term]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=285</guid>
		<description><![CDATA[
			
				
			
		
We can track easily with using google analytics for all advertising campaings. We use utm_source, utm_medium, utm_campaing, utm_content and utm_term for tracking..
utm_medium is using for particular marketing; email, affiliate, paid search etc.
utm_source is our basic source which is we used to advertising; google adwords, facebook ads etc.
utm_campaing is your advertising campaing name, you will see this [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Ftracking-advertisement-campaigns%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Ftracking-advertisement-campaigns%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a rel="attachment wp-att-286" href="http://www.webmastersucks.com/tracking-advertisement-campaigns/google-analytics/"><img class="alignright size-full wp-image-286" title="google analytics" src="http://www.webmastersucks.com/uploads/google-analytics.png" alt="" width="256" height="256" /></a>We can track easily with using google analytics for all advertising campaings. We use utm_source, utm_medium, utm_campaing, utm_content and utm_term for tracking..</p>
<p><strong>utm_medium</strong> is using for particular marketing; email, affiliate, paid search etc.</p>
<p><strong>utm_source</strong> is our basic source which is we used to advertising; google adwords, facebook ads etc.</p>
<p><strong>utm_campaing</strong> is your advertising campaing name, you will see this name in google analytics; %20 discount, Free shipping etc.</p>
<p>And URL example for following</p>
<ul>
<li>utm_medium=banner-adv</li>
<li>utm_source=adwords</li>
<li>utm_campaign=free-membership</li>
<li>utm_content=300-250-fire</li>
</ul>
<p>http://www.webmastersucks.com/?utm_medium=banner-adv&amp;utm_source=adwords&amp;utm_campaign=free-membership&amp;utm_content=300-250-fire</p>
<p>From now on we can track our campaing in Google Analytics easily..</p>

<p><a href="http://feedads.g.doubleclick.net/~a/n7P4nae0DG4_x9Byb6rmqbHQHzA/0/da"><img src="http://feedads.g.doubleclick.net/~a/n7P4nae0DG4_x9Byb6rmqbHQHzA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/n7P4nae0DG4_x9Byb6rmqbHQHzA/1/da"><img src="http://feedads.g.doubleclick.net/~a/n7P4nae0DG4_x9Byb6rmqbHQHzA/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/WebmasterSucks/~4/8o6UebSmh78" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/tracking-advertisement-campaigns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.webmastersucks.com/tracking-advertisement-campaigns/</feedburner:origLink></item>
		<item>
		<title>Optimize PHP Codes Tricks</title>
		<link>http://feedproxy.google.com/~r/WebmasterSucks/~3/cihm8D1XS3E/</link>
		<comments>http://www.webmastersucks.com/optimize-php-codes-tricks/#comments</comments>
		<pubDate>Mon, 06 Dec 2010 10:44:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[code optimize]]></category>
		<category><![CDATA[optimize php code]]></category>
		<category><![CDATA[optimize tricks]]></category>
		<category><![CDATA[optimizing php]]></category>
		<category><![CDATA[php code optimize]]></category>
		<category><![CDATA[php optimize]]></category>
		<category><![CDATA[php optimizing]]></category>
		<category><![CDATA[php tricks]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=281</guid>
		<description><![CDATA[
			
				
			
		


Use echo, not print,
Unset your variable when your job is over that variable, especially for large arrays,
Don&#8217;t use require_once,
Use full paths for includes,
str_replace is faster than ereg_replace but strtr is fastest.. If you can, use strtr,
Close your database connections when you are finish your process,
Using $table['id'] is faster than $table[id],
Use caching systems (memcache etc.)

For more [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Foptimize-php-codes-tricks%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Foptimize-php-codes-tricks%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<div><a rel="attachment wp-att-282" href="http://www.webmastersucks.com/optimize-php-codes-tricks/php/"><img class="alignright size-full wp-image-282" title="php" src="http://www.webmastersucks.com/uploads/php.gif" alt="" width="120" height="67" /></a></div>
<ol>
<li>Use <strong>echo</strong>, not <strong>print</strong>,</li>
<li>Unset your variable when your job is over that variable, especially for large arrays,</li>
<li>Don&#8217;t use require_once,</li>
<li>Use full paths for includes,</li>
<li><strong>str_replace</strong> is faster than <strong>ereg_replace </strong>but <strong>strtr </strong>is fastest.. If you can, use strtr,</li>
<li>Close your database connections when you are finish your process,</li>
<li>Using $table['id'] is faster than $table[id],</li>
<li>Use caching systems (memcache etc.)</li>
</ol>
<p><a href="http://phplens.com/lens/php-book/optimizing-debugging-php.php" target="_blank">For more about php optimizing &gt;</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/-1eyj6Zw1NuvwZpQ1lBM5Hv0QOk/0/da"><img src="http://feedads.g.doubleclick.net/~a/-1eyj6Zw1NuvwZpQ1lBM5Hv0QOk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/-1eyj6Zw1NuvwZpQ1lBM5Hv0QOk/1/da"><img src="http://feedads.g.doubleclick.net/~a/-1eyj6Zw1NuvwZpQ1lBM5Hv0QOk/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/WebmasterSucks/~4/cihm8D1XS3E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/optimize-php-codes-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.webmastersucks.com/optimize-php-codes-tricks/</feedburner:origLink></item>
		<item>
		<title>Break Categories to Columns in Wordpress</title>
		<link>http://feedproxy.google.com/~r/WebmasterSucks/~3/XHyP-JTLtlY/</link>
		<comments>http://www.webmastersucks.com/break-categories-to-columns-in-wordpress/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 12:36:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[breaking categories in wordpress]]></category>
		<category><![CDATA[categories wordpress]]></category>
		<category><![CDATA[wordpress categori split]]></category>
		<category><![CDATA[wordpress categories]]></category>
		<category><![CDATA[wordpress category]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=278</guid>
		<description><![CDATA[
			
				
			
		
Normally the category list is single column. But you can use this trick to split two columns.
Firstly, find
&#60;?php wp_list_categories(); ?&#62;
Then replace this code like here :
&#60;?php
$cats = explode(&#34;&#60;br /&#62;&#34;,wp_list_categories('title_li=&#38;echo=0&#38;depth=1&#38;style=none'));
$cat_n = count($cats) - 1;
for ($i=0;$i&#60;$cat_n;$i++):
if ($i&#60;$cat_n/2):
$cat_left = $cat_left.'&#60;li&#62;'.$cats[$i].'&#60;/li&#62;';
elseif ($i&#62;=$cat_n/2):
$cat_right = $cat_right.'&#60;li&#62;'.$cats[$i].'&#60;/li&#62;';
endif;
endfor;
?&#62;
&#60;ul class=&#34;left&#34;&#62;
&#60;?php echo $cat_left;?&#62;
&#60;/ul&#62;
&#60;ul class=&#34;right&#34;&#62;
&#60;?php echo $cat_right;?&#62;
&#60;/ul&#62;
After changing this you can stylize your columns with css [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fbreak-categories-to-columns-in-wordpress%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fbreak-categories-to-columns-in-wordpress%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Normally the category list is single column. But you can use this trick to split two columns.</p>
<p>Firstly, find</p>
<pre class="brush: php; title: ;">&lt;?php wp_list_categories(); ?&gt;</pre>
<p>Then replace this code like here :</p>
<pre class="brush: php; title: ;">&lt;?php
$cats = explode(&quot;&lt;br /&gt;&quot;,wp_list_categories('title_li=&amp;echo=0&amp;depth=1&amp;style=none'));
$cat_n = count($cats) - 1;
for ($i=0;$i&lt;$cat_n;$i++):
if ($i&lt;$cat_n/2):
$cat_left = $cat_left.'&lt;li&gt;'.$cats[$i].'&lt;/li&gt;';
elseif ($i&gt;=$cat_n/2):
$cat_right = $cat_right.'&lt;li&gt;'.$cats[$i].'&lt;/li&gt;';
endif;
endfor;
?&gt;
&lt;ul class=&quot;left&quot;&gt;
&lt;?php echo $cat_left;?&gt;
&lt;/ul&gt;
&lt;ul class=&quot;right&quot;&gt;
&lt;?php echo $cat_right;?&gt;
&lt;/ul&gt;</pre>
<p>After changing this you can stylize your columns with css file (style.css)</p>
<pre class="brush: xml; title: ;">
.right {float:left; width:140px;}
.left {float:left; width:140px;}
</pre>

<p><a href="http://feedads.g.doubleclick.net/~a/gmNmItLM4JaUqYLjOsUbSyHKHRQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/gmNmItLM4JaUqYLjOsUbSyHKHRQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/gmNmItLM4JaUqYLjOsUbSyHKHRQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/gmNmItLM4JaUqYLjOsUbSyHKHRQ/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/WebmasterSucks/~4/XHyP-JTLtlY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/break-categories-to-columns-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.webmastersucks.com/break-categories-to-columns-in-wordpress/</feedburner:origLink></item>
		<item>
		<title>Twitter Advertisements</title>
		<link>http://feedproxy.google.com/~r/WebmasterSucks/~3/ot4kBsJngpM/</link>
		<comments>http://www.webmastersucks.com/twitter-advertisements/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 21:02:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Social Networks]]></category>
		<category><![CDATA[beamagpie]]></category>
		<category><![CDATA[featuredusers]]></category>
		<category><![CDATA[tweettornado]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[twitter ads]]></category>
		<category><![CDATA[twitter advertisement]]></category>
		<category><![CDATA[twitterad]]></category>
		<category><![CDATA[twittercard]]></category>
		<category><![CDATA[twitterknowhow]]></category>
		<category><![CDATA[twitterribbons]]></category>
		<category><![CDATA[twittertise]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=275</guid>
		<description><![CDATA[
			
				
			
		
There is some web tools for twitter advertisements.
Here is the list of Twitter Ads :
Twittertise - Advertise on Twitter
Twitterad - Monetize your twitter profile
TwitterCard - Place a 125&#215;125 TwitterCard on your Blog or as an Advertisement
Twitterribbons - Twitter Ribbon Ad generator
TwitterKnowHow - Twitter ribbon ad generator
BeaMagpie - Be a Magpie is an ad network for [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Ftwitter-advertisements%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Ftwitter-advertisements%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>There is some web tools for twitter advertisements.</p>
<p><strong>Here is the list of Twitter Ads :</strong></p>
<li><a href="http://www.twittertise.com/" target="_blank">Twittertise </a>- Advertise on Twitter</li>
<li><a href="http://www.twittad.com/" target="_blank">Twitterad </a>- Monetize your twitter profile</li>
<li><a href="http://www.twittercard.com/" target="_blank">TwitterCard </a>- Place a 125&#215;125 TwitterCard on your Blog or as an Advertisement</li>
<li><a href="http://twitterribbons.com/" target="_blank">Twitterribbons </a>- Twitter Ribbon Ad generator</li>
<li><a href="http://www.twitterribbons.com/" target="_blank">TwitterKnowHow </a>- Twitter ribbon ad generator</li>
<li><a href="http://www.be-a-magpie.com/">BeaMagpie </a>- Be a Magpie is an ad network for Twitter</li>
<li><a href="http://tweettornado.com/" target="_blank">TweetTornado </a>- Fully automated advertising software</li>
<li><a href="http://featuredusers.com/" target="_blank">FeaturedUsers </a>- FeaturedUsers is a Twitter application ad network</li>

<p><a href="http://feedads.g.doubleclick.net/~a/J0-D1Hs5wStOd-heT_Ww0K6Xlk4/0/da"><img src="http://feedads.g.doubleclick.net/~a/J0-D1Hs5wStOd-heT_Ww0K6Xlk4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/J0-D1Hs5wStOd-heT_Ww0K6Xlk4/1/da"><img src="http://feedads.g.doubleclick.net/~a/J0-D1Hs5wStOd-heT_Ww0K6Xlk4/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/WebmasterSucks/~4/ot4kBsJngpM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/twitter-advertisements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.webmastersucks.com/twitter-advertisements/</feedburner:origLink></item>
		<item>
		<title>Resizing All Images in Directory</title>
		<link>http://feedproxy.google.com/~r/WebmasterSucks/~3/8HASQgksifQ/</link>
		<comments>http://www.webmastersucks.com/resizing-all-images-in-directory/#comments</comments>
		<pubDate>Tue, 11 May 2010 10:56:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[directory list]]></category>
		<category><![CDATA[directory list php]]></category>
		<category><![CDATA[resize image]]></category>
		<category><![CDATA[resize image directory]]></category>
		<category><![CDATA[resize image php]]></category>
		<category><![CDATA[resizing image]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=272</guid>
		<description><![CDATA[
			
				
			
		
I need a script for resize all images in one directory. I have create thumbnails for a site. I have not so much time write these code. I found two different code and mixed them. I love PHP, it is very easy to solve problem with little scripts. If you resize in same directory it [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fresizing-all-images-in-directory%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fresizing-all-images-in-directory%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I need a script for resize all images in one directory. I have create thumbnails for a site. I have not so much time write these code. I found two different code and mixed them. I love PHP, it is very easy to solve problem with little scripts. If you resize in same directory it will be resize resized images. If you need in same directory, just resized for temp directory and move it to your real one.</p>
<div>
<ol>
<li><a href="http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php" target="_blank">Resizing image with Php by Simon Jarvis</a></li>
<li><a href="http://www.spoono.com/php/tutorials/tutorial.php?id=10" target="_blank">Directory Listing by Spoono</a></li>
</ol>
<pre class="brush: php; title: ;">
&lt;?
/*
* Class: SimpleImage, Author: Simon Jarvis, Copyright: 2006 Simon Jarvis, Date: 08/11/06
* Link: http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php
* See the GNU General Public License for more details: http://www.gnu.org/licenses/gpl.html
*/

class SimpleImage {
   var $image;
   var $image_type;

   function load($filename) {
      $image_info = getimagesize($filename);
      $this-&gt;image_type = $image_info[2];
      if( $this-&gt;image_type == IMAGETYPE_JPEG ) {
         $this-&gt;image = imagecreatefromjpeg($filename);
      } elseif( $this-&gt;image_type == IMAGETYPE_GIF ) {
         $this-&gt;image = imagecreatefromgif($filename);
      } elseif( $this-&gt;image_type == IMAGETYPE_PNG ) {
         $this-&gt;image = imagecreatefrompng($filename);
      }
   }
   function save($filename, $image_type=IMAGETYPE_JPEG, $compression=75, $permissions=null) {
      if( $image_type == IMAGETYPE_JPEG ) {
         imagejpeg($this-&gt;image,$filename,$compression);
      } elseif( $image_type == IMAGETYPE_GIF ) {
         imagegif($this-&gt;image,$filename);
      } elseif( $image_type == IMAGETYPE_PNG ) {
         imagepng($this-&gt;image,$filename);
      }
      if( $permissions != null) {
         chmod($filename,$permissions);
      }
   }
   function output($image_type=IMAGETYPE_JPEG) {
      if( $image_type == IMAGETYPE_JPEG ) {
         imagejpeg($this-&gt;image);
      } elseif( $image_type == IMAGETYPE_GIF ) {
         imagegif($this-&gt;image);
      } elseif( $image_type == IMAGETYPE_PNG ) {
         imagepng($this-&gt;image);
      }
   }
   function getWidth() {
      return imagesx($this-&gt;image);
   }
   function getHeight() {
      return imagesy($this-&gt;image);
   }
   function resizeToHeight($height) {
      $ratio = $height / $this-&gt;getHeight();
      $width = $this-&gt;getWidth() * $ratio;
      $this-&gt;resize($width,$height);
   }
   function resizeToWidth($width) {
      $ratio = $width / $this-&gt;getWidth();
      $height = $this-&gt;getheight() * $ratio;
      $this-&gt;resize($width,$height);
   }
   function scale($scale) {
      $width = $this-&gt;getWidth() * $scale/100;
      $height = $this-&gt;getheight() * $scale/100;
      $this-&gt;resize($width,$height);
   }
   function resize($width,$height) {
      $new_image = imagecreatetruecolor($width, $height);
      imagecopyresampled($new_image, $this-&gt;image, 0, 0, 0, 0, $width, $height, $this-&gt;getWidth(), $this-&gt;getHeight());
      $this-&gt;image = $new_image;
   }
}
// End of SimpleImage class

/* Directory Listing
Source : http://www.spoono.com/php/tutorials/tutorial.php?id=10
*/

// Define the path as relative
$path = &quot;/home/site/public_html/images/&quot;;

// Using the opendir function
$dir_handle = @opendir($path) or die(&quot;ERROR: Cannot open  &lt;b&gt;$path&lt;/b&gt;&quot;);

echo(&quot;Directory Listing of $path&lt;br/&gt;&quot;);

//running the while loop
while ($file = readdir($dir_handle))
{
   if($file != &quot;.&quot; &amp;&amp; $file != &quot;..&quot;)
   {
	$image = new SimpleImage();
	$image-&gt;load(&quot;images/&quot;.$file);
	$image-&gt;resize(80,60);
	$image-&gt;save(&quot;images2/mini_&quot;.$file);
	echo(&quot;&amp;bull; $file &lt;br&gt;&quot;);
   }
}

//closing the directory
closedir($dir_handle);
?&gt;
</pre>
</div>

<p><a href="http://feedads.g.doubleclick.net/~a/RGCYXfIe6yIkYAcSnB3a3vTRBis/0/da"><img src="http://feedads.g.doubleclick.net/~a/RGCYXfIe6yIkYAcSnB3a3vTRBis/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/RGCYXfIe6yIkYAcSnB3a3vTRBis/1/da"><img src="http://feedads.g.doubleclick.net/~a/RGCYXfIe6yIkYAcSnB3a3vTRBis/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/WebmasterSucks/~4/8HASQgksifQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/resizing-all-images-in-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.webmastersucks.com/resizing-all-images-in-directory/</feedburner:origLink></item>
		<item>
		<title>Google Announce Chromium OS Project</title>
		<link>http://feedproxy.google.com/~r/WebmasterSucks/~3/WqfvFHpsHxg/</link>
		<comments>http://www.webmastersucks.com/google-announce-chromium-os-project/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 06:42:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[chrome os]]></category>
		<category><![CDATA[chrome os project]]></category>
		<category><![CDATA[chromium]]></category>
		<category><![CDATA[chromium os]]></category>
		<category><![CDATA[chromium os project]]></category>
		<category><![CDATA[google chrome]]></category>
		<category><![CDATA[google chrome os]]></category>
		<category><![CDATA[google operating system]]></category>
		<category><![CDATA[google os]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=270</guid>
		<description><![CDATA[
			
				
			
		
Today Google released Chromium OS, the open source project behind Google Chrome OS. Google Chrome OS is an operating system that is intended for people who spend most of their time on the web. It aims to provide a computing experience that is fast, simple and secure. The Chromium OS project as you&#8217;ll see it [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fgoogle-announce-chromium-os-project%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fgoogle-announce-chromium-os-project%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Today Google released Chromium OS, the open source project behind Google Chrome OS. Google Chrome OS is an operating system that is intended for people who spend most of their time on the web. It aims to provide a computing experience that is fast, simple and secure. The Chromium OS project as you&#8217;ll see it today is comprised of the code that has been developed thus far, our early experiments with the user interface, and detailed design docs for many parts that are under active development.</p>
<p><strong>Fore more information and announcement:</strong></p>
<p><a href="http://chrome.blogspot.com/2009/11/announcing-chromium-os-open-source.html http://googletesting.blogspot.com/2009/11/testing-chrome-os.html" target="_blank">http://chrome.blogspot.com/2009/11/announcing-chromium-os-open-source.html</a><br />
<a href="http://googletesting.blogspot.com/2009/11/testing-chrome-os.html" target="_blank"> http://googletesting.blogspot.com/2009/11/testing-chrome-os.html</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/9veoqww7Z3E1BTqlZEvLRP_zsh8/0/da"><img src="http://feedads.g.doubleclick.net/~a/9veoqww7Z3E1BTqlZEvLRP_zsh8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/9veoqww7Z3E1BTqlZEvLRP_zsh8/1/da"><img src="http://feedads.g.doubleclick.net/~a/9veoqww7Z3E1BTqlZEvLRP_zsh8/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/WebmasterSucks/~4/WqfvFHpsHxg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/google-announce-chromium-os-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.webmastersucks.com/google-announce-chromium-os-project/</feedburner:origLink></item>
		<item>
		<title>Google Create New Programming Language : GO</title>
		<link>http://feedproxy.google.com/~r/WebmasterSucks/~3/0S3yLiQ2Hbo/</link>
		<comments>http://www.webmastersucks.com/google-create-new-programming-language-go/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 12:11:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[go lang]]></category>
		<category><![CDATA[golang]]></category>
		<category><![CDATA[golang.me]]></category>
		<category><![CDATA[google programming]]></category>
		<category><![CDATA[the go programming language]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=267</guid>
		<description><![CDATA[
			
				
			
		
Google Engineers create new programming language &#8220;Go&#8221;. In first look it is look like C++ or Java. We will see, how it will be.
More details :
http://www.golang.me/google-launches-its-own-programming-language-go/
]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fgoogle-create-new-programming-language-go%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fgoogle-create-new-programming-language-go%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Google Engineers create new programming language &#8220;Go&#8221;. In first look it is look like C++ or Java. We will see, how it will be.</p>
<p>More details :<br />
<a href="http://www.golang.me/google-launches-its-own-programming-language-go/">http://www.golang.me/google-launches-its-own-programming-language-go/</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/LsbzoxToC3qoLvbO4obJ8fbOi-c/0/da"><img src="http://feedads.g.doubleclick.net/~a/LsbzoxToC3qoLvbO4obJ8fbOi-c/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/LsbzoxToC3qoLvbO4obJ8fbOi-c/1/da"><img src="http://feedads.g.doubleclick.net/~a/LsbzoxToC3qoLvbO4obJ8fbOi-c/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/WebmasterSucks/~4/0S3yLiQ2Hbo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/google-create-new-programming-language-go/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.webmastersucks.com/google-create-new-programming-language-go/</feedburner:origLink></item>
		<item>
		<title>Turn Off Autocomplete Form in Internet Explorer</title>
		<link>http://feedproxy.google.com/~r/WebmasterSucks/~3/w02zfeXLfcU/</link>
		<comments>http://www.webmastersucks.com/turn-off-autocomplete-form-in-internet-explorer/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 09:01:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Html & Javascript]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[autocomplete]]></category>
		<category><![CDATA[autocomplete form]]></category>
		<category><![CDATA[autocomplete internet explorer]]></category>
		<category><![CDATA[close autocomplete]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[turn off auto complete]]></category>
		<category><![CDATA[turn off autocomplete]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=265</guid>
		<description><![CDATA[
			
				
			
		
A webmastersucks user ask me &#8220;The only problem is that IE will store the MD5 ] password when it &#8220;saves&#8221; the password. Have you been able to overcome that?&#8221;. Solution is really simple, just we can use autocomplete attribute in form tag. It will be close autocomplete in form. It will better in password protected [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fturn-off-autocomplete-form-in-internet-explorer%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fturn-off-autocomplete-form-in-internet-explorer%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>A webmastersucks user ask me &#8220;The only problem is that IE will store the MD5 ] password when it &#8220;saves&#8221; the password. Have you been able to overcome that?&#8221;. Solution is really simple, just we can use autocomplete attribute in form tag. It will be close autocomplete in form. It will better in password protected sites.</p>
<pre class="brush: xml; title: ;">&lt;form name=&quot;form&quot; method=&quot;post&quot; autocomplete=&quot;off&quot;&gt;....&lt;/form&gt;</pre>

<p><a href="http://feedads.g.doubleclick.net/~a/BSYLovj2JJ4gNty867Imxhy68PM/0/da"><img src="http://feedads.g.doubleclick.net/~a/BSYLovj2JJ4gNty867Imxhy68PM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/BSYLovj2JJ4gNty867Imxhy68PM/1/da"><img src="http://feedads.g.doubleclick.net/~a/BSYLovj2JJ4gNty867Imxhy68PM/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/WebmasterSucks/~4/w02zfeXLfcU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/turn-off-autocomplete-form-in-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.webmastersucks.com/turn-off-autocomplete-form-in-internet-explorer/</feedburner:origLink></item>
	</channel>
</rss>

