<?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>PC Hacks</title>
	<atom:link href="http://hackspc.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://hackspc.com</link>
	<description></description>
	<lastBuildDate>Thu, 02 Sep 2010 10:37:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Disable Auto Hide Windows Taskbar Forever</title>
		<link>http://hackspc.com/disable-auto-hide-windows-taskbar-forever/</link>
		<comments>http://hackspc.com/disable-auto-hide-windows-taskbar-forever/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 10:37:41 +0000</pubDate>
		<dc:creator>Ivan</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Windows  Tips]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://hackspc.com/?p=6164</guid>
		<description><![CDATA[This tutorial might not be very useful but whoever needs it, here it is.  Sometimes some user may keep setting the auto hide and personally you may find it annoying. So in that case, you would like to set it so that it permanently stays there.
Hopefully, there is one another method, that is, making separate [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial might not be very useful but whoever needs it, here it is.  Sometimes some user may keep setting the auto hide and personally you may find it annoying. So in that case, you would like to set it so that it permanently stays there.<span id="more-6164"></span></p>
<p>Hopefully, there is one another method, that is, making separate user account for you. But still I am going to teach you how you can disable the auto hide feature of Windows Taskbar.</p>
<p>Though it is possible to disable autohide feature from Registry editor, we are not going to do this. Because tweaking registry may risk your current computer status. Instead, we’ll be using Local Group Policy editor.</p>
<p>Open <strong>Local Group Policy Editor</strong> by going to <strong>RUN </strong>&gt; and typing <strong>gpedit.msc</strong>.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/a7.jpg"><img class="aligncenter size-full wp-image-6163" src="http://hackspc.com/wp-content/uploads/2010/08/a7.jpg" alt="" width="410" height="220" /></a></p>
<p>In the left column, go to <strong>User Configuration</strong> &gt; <strong>Administrative Templates</strong> &gt; <strong>Start Menu and Taskbar</strong>.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/b6.jpg"><img class="aligncenter size-full wp-image-6162" src="http://hackspc.com/wp-content/uploads/2010/08/b6.jpg" alt="" width="244" height="420" /></a></p>
<p>In the right column, look for <strong>Prevent Changes to Taskbar and Start Menu Settings</strong> under <strong>Setting </strong>column<strong>.</strong></p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/c4.jpg"><img class="aligncenter size-full wp-image-6161" src="http://hackspc.com/wp-content/uploads/2010/08/c4.jpg" alt="" width="347" height="246" /></a></p>
<p>Double Click to Open it. By default, it is set to <strong>Not Configured</strong> and choose <strong>Enabled</strong>.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/d4.jpg"><img class="aligncenter size-full wp-image-6160" src="http://hackspc.com/wp-content/uploads/2010/08/d4.jpg" alt="" width="340" height="335" /></a></p>
<p>Next Click on <strong>OK</strong>, and then <strong>close</strong> Policy Editor Window.</p>
<p>Whenever someone wants to access the Taskbar property, he’ll be denied.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/e4.jpg"><img class="aligncenter size-full wp-image-6159" src="http://hackspc.com/wp-content/uploads/2010/08/e4.jpg" alt="" width="242" height="86" /></a></p>
<p style="text-align: center"><a href="http://hackspc.com/wp-content/uploads/2010/08/f4.jpg"><img class="aligncenter size-full wp-image-6158" src="http://hackspc.com/wp-content/uploads/2010/08/f4.jpg" alt="" width="500" height="107" /></a></p>
<p>To re-enable it, follow same procedure and Click on either Not-configured or Disabled radio button and Press OK.</p>
<p>Hope you loved it.</p>
<p><em>This was guest post by suraj kayastha where he writes about technology in </em><a href="http://hacktweak.co.cc/"><em>HackTweak.co.cc</em></a><em> and </em><a href="http://hacktutors.info/"><em>Hacktutors.info</em></a><em>.</em><!--more--></p>
]]></content:encoded>
			<wfw:commentRss>http://hackspc.com/disable-auto-hide-windows-taskbar-forever/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Convert Image In To Text Using PHP Script</title>
		<link>http://hackspc.com/convert-image-in-to-text-using-php-script/</link>
		<comments>http://hackspc.com/convert-image-in-to-text-using-php-script/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 12:44:35 +0000</pubDate>
		<dc:creator>Ivan</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://hackspc.com/?p=6136</guid>
		<description><![CDATA[Ever wanted to create those text made roses and heart shapes that you see in Facebook and Myspace? You might be wondering how they create such. However there are some websites that does the job, you may still be curios to do it by yourself. They convert your image file in to a text which [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left">Ever wanted to create those text made roses and heart shapes that you see in Facebook and Myspace? You might be wondering how they create such. However there are some websites that does the job, you may still be curios to do it by yourself. They convert your image file in to a text which exactly renders as an image. If you are still unclear what I am talking about then see how this JPEG image is manipulated to text.<span id="more-6136"></span></p>
<p><a href="http://www.webdezine.co.cc"><img class="size-full wp-image-6134   aligncenter" src="http://hackspc.com/wp-content/uploads/2010/08/IMG_A1.jpg" alt="" width="260" height="80" /></a><br />
<a href="http://hackspc.com/wp-content/uploads/2010/08/IMG_B1.jpg"><img class="size-medium wp-image-6135  aligncenter" src="http://hackspc.com/wp-content/uploads/2010/08/IMG_B1-300x128.jpg" alt="" width="300" height="128" /></a><br />
First <a href="http://webdezine.elementfx.com/image.php">view the demo here.</a></p>
<p style="text-align: left">You might be surprised that this manipulation can be done just by PHP code not more than 30 lines.<br />
We&#8217;ll do this just by a PHP code.</p>
<p style="text-align: left">Let me show you how can you use PHP imagecreatefromjpeg() function to manipulate the pixeleted image in ASCII character form.<br />
First of all let&#8217;s summarize what we&#8217;ll do.</p>
<p style="text-align: left">First, we&#8217;ll create a variable pointing the location of the image. Now we&#8217;ll feed that image location variable to imagecreatefromjpeg() function like this:</p>
<blockquote><p><code>$locate= 'http://website.com/image.jpg';<br />
$image = imagecreatefromjpeg("$locate");</code></p></blockquote>
<p style="text-align: left">Now the imagecreatefromjpeg() function manipulates the image details like RGB color coding, white pixels etc.</p>
<p style="text-align: left">Since our PHP code have the details of the image, we&#8217;ll add conditional tag what to do next if the image have been manipulated by the imagecreatefromjpeg() function. In the conditional statement we&#8217;ll fetch the RGB value, get the brightness situation and finally put a ASCII character along with the brightness.</p>
<p style="text-align: left">What our code needs to do is loop through each row in the image, and within each row it needs to also loop through each column. This means we&#8217;re accessing each pixel one-by-one, which is what we need. Then, for each pixel in the image, we need to grab the red, green, and blue color values of the pixel, add them all together.</p>
<p style="text-align: left">By default, we&#8217;ll define the ASCII keys as array for the brightness. For example, [@#+*;:, ] we&#8217;ve increasing brightness symbol from @ which denotes the extreme dark and a white space at last which denote extreme white.</p>
<p style="text-align: left">The darker part will be replaced by @ and white part will be replaced by white space, while other characters will denote the level of brightness in eight characters.</p>
<p style="text-align: left">Have a look at the PHP code below:</p>
<blockquote><p><code>echo '&lt;PRE STYLE="font: 1px/1px Courier New;"&gt;';</code></p>
<p><code>$asciichars = array("@", "#", "+", "*", ";", ":", ",", ".", "`", " ");</code></p>
<p><code>$width = imagesx($image);</code></p>
<p><code>$height = imagesy($image);</p>
<p>for($y = 0; $y &lt; $height; ++$y) {</p>
<p>for($x = 0; $x &lt; $width; ++$x) {</p>
<p>$thiscol = imagecolorat($image, $x, $y);</p>
<p>$rgb = imagecolorsforindex($image, $thiscol);</p>
<p>$brightness = $rgb['red'] + $rgb['green'] + $rgb['blue'];</p>
<p>$brightness = round($brightness / 85);</p>
<p>$char = $asciichars[$brightness];</p>
<p>echo $char;</p>
<p>}</p>
<p>echo "\n";</p>
<p>}<br />
echo '&lt;/PRE&gt;';</p>
<p></code><code>}</code></p></blockquote>
<p>And finally we&#8217;ll print the result.</p>
<p>The final code will be like this:</p>
<blockquote><p><code>&lt;?php</code></p>
<p><code>$locate= ‘http://website.com/image.jpg’;</code></p>
<p><code>$image = imagecreatefromjpeg("$locate");</code></p>
<p><code>if ($image) {</p>
<p>echo '&lt;PRE STYLE="font: 1px/1px Courier New;"&gt;';</p>
<p>$asciichars = array("@", "#", "+", "*", ";", ":", ",", ".", "`", " ");</p>
<p>$width = imagesx($image);</p>
<p>$height = imagesy($image);</p>
<p>for($y = 0; $y &lt; $height; ++$y) {</p>
<p>for($x = 0; $x &lt; $width; ++$x) {</p>
<p>$thiscol = imagecolorat($image, $x, $y);</p>
<p>$rgb = imagecolorsforindex($image, $thiscol);</p>
<p>$brightness = $rgb['red'] + $rgb['green'] + $rgb['blue'];</p>
<p>$brightness = round($brightness / 85);</p>
<p>$char = $asciichars[$brightness];</p>
<p>echo $char;</p>
<p>}</p>
<p>echo "\n";</p>
<p>}</p>
<p>echo '&lt;/PRE&gt;';</p>
<p>}</p>
<p></code><code>?&gt;<br />
</code></p></blockquote>
<p>Just copy it to your notepad and save it as image.php. Before saving define the location of picture.<br />
You can also create a form to specify the location of the image and input the form value in $locate variable.<br />
Posibilities are endless, who knows one can start his own website only with this script.<br />
Again, <a href="http://webdezine.elementfx.com/image.php">view the demo here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://hackspc.com/convert-image-in-to-text-using-php-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learn Real Hacking With Real Hacking Game</title>
		<link>http://hackspc.com/learn-real-hacking-with-real-hacking-game/</link>
		<comments>http://hackspc.com/learn-real-hacking-with-real-hacking-game/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 12:38:21 +0000</pubDate>
		<dc:creator>Ivan</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Hacks]]></category>

		<guid isPermaLink="false">http://hackspc.com/?p=6132</guid>
		<description><![CDATA[If you are very new in hacking world, before going to the article, I suggest you to read Learn How To Hack With The Hacker’s Underground Handbook before reading further article.

If you are already known to the hacking world then, welcome to the virtual simulation world of hacking environment.
If you really need some easy platform [...]]]></description>
			<content:encoded><![CDATA[<p>If you are very new in hacking world, before going to the article, I suggest you to read <a href="http://hackspc.com/learn-how-to-hack-with-the-hackers-underground-handbook/">Learn How To Hack With The Hacker’s Underground Handbook</a> before reading further article.<br />
<span id="more-6132"></span></p>
<p>If you are already known to the hacking world then, welcome to the virtual simulation world of hacking environment.</p>
<p>If you really need some easy platform to practice hacking then I think this article will be a great help for you. Yes I am talking about the real hacking game, Hack The Game.</p>
<p>HackTheGame is a free 1MB file game which will introduce you to the real hacking word.</p>
<p>The real hack able DOS environment makes you feel like that you have finally accessed to US Defense system.</p>
<p>The game becomes much more interesting and fun because of the addition of sounds. The sounds includes typing and several warning announcement.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/za.jpg"><img class="aligncenter size-full wp-image-6125" src="http://hackspc.com/wp-content/uploads/2010/08/za.jpg" alt="" width="323" height="270" /></a></p>
<p>The user interface of HackTheGame is very friendly and easy. Just open the program and select your language, input any ID you may like.</p>
<p>There are several missions of this game. You’ll get the briefing of each mission in your inbox.</p>
<p style="text-align: center"><a href="http://hackspc.com/wp-content/uploads/2010/08/zb.jpg"><img class="aligncenter size-full wp-image-6124" src="http://hackspc.com/wp-content/uploads/2010/08/zb.jpg" alt="" width="400" height="199" /></a></p>
<p>The mail itself includes several hints and processes.</p>
<p style="text-align: center"><a href="http://hackspc.com/wp-content/uploads/2010/08/zc.jpg"><img class="aligncenter size-full wp-image-6123" src="http://hackspc.com/wp-content/uploads/2010/08/zc.jpg" alt="" width="425" height="255" /></a></p>
<p>If you find sounds irritating then, you can go to settings menu and disable sounds. But I bet you, enabling sounds makes your game play experience very easy.</p>
<p style="text-align: center"><a href="http://hackspc.com/wp-content/uploads/2010/08/ze.jpg"><img class="aligncenter size-full wp-image-6122" src="http://hackspc.com/wp-content/uploads/2010/08/ze.jpg" alt="" width="365" height="174" /></a></p>
<p>I bet you’ll love this game.</p>
<p>No installation is needed to run this game and it is obviously safe to use because it utilizes local files which in game play acts as a remote files. You don’t have to worry about your security. If you doubt it, then play it offline.</p>
<p>This game can be downloaded from here, <a href="http://www.webdezine.co.cc/p/download-hackthegame-v121.html">HackTheGame</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://hackspc.com/learn-real-hacking-with-real-hacking-game/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Login to Windows Live Messenger using any email account</title>
		<link>http://hackspc.com/login-to-windows-live-messenger-using-any-email-account/</link>
		<comments>http://hackspc.com/login-to-windows-live-messenger-using-any-email-account/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 16:38:33 +0000</pubDate>
		<dc:creator>Ivan</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://hackspc.com/?p=6141</guid>
		<description><![CDATA[Everybody has hotmail account, don’t they? I created my first email account in Hotmail 9 Years ago. MSN Hotmail and Yahoo were the heroes of free web mail system at that time, and still they are. Later in 2004, Gmail showed up with large email space capability. The only famous messenger was ICQ. Later Hotmail [...]]]></description>
			<content:encoded><![CDATA[<p>Everybody has hotmail account, don’t they? I created my first email account in Hotmail 9 Years ago. MSN Hotmail and Yahoo were the heroes of free web mail system at that time, and still they are. Later in 2004, Gmail showed up with large email space capability. The only famous messenger was ICQ. Later Hotmail introduced MSN messenger, now they’ve named it Windows Live Messenger which we are using at the current date.<span id="more-6141"></span></p>
<p>Since you have lots of email account in several domains, it is necessary to run their own messenger. Try to log in using your Gmail or Yahoo account, messenger will return with 80048821 error saying, Windows Live ID or Password is incorrect, because Gmail is not domain of MSN.</p>
<p style="text-align: center"><a href="http://hackspc.com/wp-content/uploads/2010/08/h1.jpg"><img class="aligncenter size-full wp-image-6144" src="http://hackspc.com/wp-content/uploads/2010/08/h1.jpg" alt="" width="418" height="130" /></a></p>
<p>But after following this trick, you won’t have to open install multiple web messengers. Let met guide you how you can access Windows Live Messenger using your own email account which is not a domain of MSN. You’ll be able to login using Gmail, Yahoo or any email account you have.</p>
<p>Go to <a href="http://www.passport.net/">http://www.passport.net</a>, after the page is loaded scroll down to Sign up today. As shown in figure, click on <strong>Get Started Now</strong> link of <strong>Use an e-mail address you already have</strong>.</p>
<p style="text-align: center"><a href="http://hackspc.com/wp-content/uploads/2010/08/a6.jpg"><img class="aligncenter size-full wp-image-6151" src="http://hackspc.com/wp-content/uploads/2010/08/a6.jpg" alt="" width="426" height="200" /></a></p>
<p>Now fill up the form with the email address you want to sign up using Windows Live Messenger and other necessary information and click on <strong>Continue</strong> button.</p>
<p style="text-align: center"><a href="http://hackspc.com/wp-content/uploads/2010/08/b5.jpg"><img class="aligncenter size-full wp-image-6150" src="http://hackspc.com/wp-content/uploads/2010/08/b5.jpg" alt="" width="475" height="261" /></a></p>
<p>In next page, retype the email address as shown in the left.</p>
<p style="text-align: center"><a href="http://hackspc.com/wp-content/uploads/2010/08/c3.jpg"><img class="aligncenter size-full wp-image-6149" src="http://hackspc.com/wp-content/uploads/2010/08/c3.jpg" alt="" width="471" height="312" /></a></p>
<p>Now, it will inform you to confirm your account in next page. Click on <strong>Continue </strong>button.</p>
<p style="text-align: center"><a href="http://hackspc.com/wp-content/uploads/2010/08/d3.jpg"><img class="aligncenter size-full wp-image-6148" src="http://hackspc.com/wp-content/uploads/2010/08/d3.jpg" alt="" width="519" height="170" /></a></p>
<p>Now you may close the page.</p>
<p>Next, we’ll need to confirm our mail. They’ll send you a confirmation link in the email address that you’ve specified earlier during form fill up.</p>
<p>Login to your Gmail or any email account using respective domain and look for Verification mail from Windows Live Team.</p>
<p style="text-align: center"><a href="http://hackspc.com/wp-content/uploads/2010/08/e3.jpg"><img class="aligncenter size-full wp-image-6147" src="http://hackspc.com/wp-content/uploads/2010/08/e3.jpg" alt="" width="433" height="40" /></a></p>
<p>Read the mail properly and click on the confirmation link</p>
<p style="text-align: center"><a href="http://hackspc.com/wp-content/uploads/2010/08/f3.jpg"><img class="aligncenter size-full wp-image-6146" src="http://hackspc.com/wp-content/uploads/2010/08/f3.jpg" alt="" width="582" height="125" /></a></p>
<p>Wait a minute! Confirmation is not over yet, you’ll have to login with the new email address and password that you’ve filled up earlier in the form.</p>
<p>For the successful confirmation, you’ll be welcomed to this page.</p>
<p style="text-align: center"><a href="http://hackspc.com/wp-content/uploads/2010/08/i1.jpg"><img class="aligncenter size-full wp-image-6143" src="http://hackspc.com/wp-content/uploads/2010/08/i1.jpg" alt="" width="517" height="149" /></a></p>
<p>Now try to login using your Gmail or any email account from Windows Live messenger.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/g2.jpg"><img class="aligncenter size-full wp-image-6145" src="http://hackspc.com/wp-content/uploads/2010/08/g2.jpg" alt="" width="264" height="402" /></a></p>
<p>Note: If you have not confirmed properly you’ll be notified.</p>
<p style="text-align: center"><a href="http://hackspc.com/wp-content/uploads/2010/08/j1.jpg"><img class="aligncenter size-full wp-image-6142" src="http://hackspc.com/wp-content/uploads/2010/08/j1.jpg" alt="" width="495" height="50" /></a></p>
<p>If you see this screen at the top of your Windows Live Messenger, make sure that you&#8217;ve confirmed properly.</p>
<p>Hope this tutorial was really helpful to you.</p>
]]></content:encoded>
			<wfw:commentRss>http://hackspc.com/login-to-windows-live-messenger-using-any-email-account/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create a wordpress Upcomming Events Widget- A step by step tutorial</title>
		<link>http://hackspc.com/how-to-create-a-wordpress-upcomming-events-widget-a-step-by-step-tutorial/</link>
		<comments>http://hackspc.com/how-to-create-a-wordpress-upcomming-events-widget-a-step-by-step-tutorial/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 10:25:51 +0000</pubDate>
		<dc:creator>Ivan</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://hackspc.com/?p=6076</guid>
		<description><![CDATA[This Wordpress tutorial is targeted to those who are struggling for being a good Wordpress developer. This tutorial will be delivered in simplest term so that a newbie can easily understand what is going on the screen. After following this step by step tutorial, you’ll able to do following things:

Create a very basic Wordpress widget [...]]]></description>
			<content:encoded><![CDATA[<p>This Wordpress tutorial is targeted to those who are struggling for being a good Wordpress developer. This tutorial will be delivered in simplest term so that a newbie can easily understand what is going on the screen. After following this step by step tutorial, you’ll able to do following things:<span id="more-6076"></span></p>
<ol>
<li>Create a very basic Wordpress widget acceptable for even version Wordpress 3.0.1</li>
<li>Create a basic upcoming events widget which lists the scheduled articles.</li>
</ol>
<p>Wordpress is created in PHP. So, you must know the basic coding knowledge in PHP. Except default Wordpress widgets, you’ll need to create a separate plugin to add separate thirdparty widget to your wordpress blog.</p>
<p>We are going to create a basic plugin first.</p>
<p>Before we start the coding part, lets go to Wordpress Admin panel and explore through the plugin control panel.</p>
<p>To go to Plugin control panel, at the left sidebar, click on Plugins.</p>
<p style="text-align: center"><a href="http://hackspc.com/wp-content/uploads/2010/08/a5.jpg"><img class="aligncenter size-full wp-image-6084" src="http://hackspc.com/wp-content/uploads/2010/08/a5.jpg" alt="" width="550" height="153" /></a></p>
<p>This is the place where you can activate/disactivate or install/remove plugins. By default Wordpress stores all the plugin files in wp-content/plugin folder.</p>
<p>For each plugin, you can see various definations. The basic definations needed are, plugin name, plugin URI, description, author name, version and author’s website.</p>
<p>These all will be defined inside the plugin php code.</p>
<p>Let me show you how you can set the details of plugin and start the coding for new plugin.</p>
<p>Open up notepad, a very simple yet powerful text editor by Microsoft.</p>
<p>We must begin every PHP code by &lt;?php  and end the code by ?&gt;</p>
<blockquote><p><code>&lt;?php</p>
<p>/*</p>
<p>Plugin Name: Comming up</p>
<p>Plugin URI: http://www.hackspc.com</p>
<p>Description: Up comming posts</p>
<p>Author: suraZ Kayastha</p>
<p>Version: 1.0</p>
<p>Author URI: http://youcanhack.blogspot.com</p>
<p>*/</code></p></blockquote>
<p>These are actually PHP comments held between /* */ but wordpress fetches these section for details about the plugin.</p>
<p>Wordpress Plugins are all about PHP functions (the division of codes that work for specific part).</p>
<p>Lets see what we can do with the functions to create a plugin that will load a new widget.</p>
<blockquote><p><code></p>
<p>/* Function that will deliver all the necessary code contents in the sidebar */</p>
<p>function commingup_widget() {}</p>
<p>/* Function that is called by wordpress when the plugin is activated. It registers new widget called Coming Up */</p>
<p>function init_commingup(){</p>
<p>register_sidebar_widget("commingup", "commingup_widget");</p>
<p>}</p>
<p>/* Tells WordPress to call init_commingup when plugin is loaded */</p>
<p>add_action("plugins_loaded", "init_commingup");</p>
<p></code></p></blockquote>
<p>Confused? Let me clear you what those codes do. The first function, commingup_widget(),  here is what will be displayed on the sidebar. Whatever HTML/PHP code you put here will be displayed as a sidebar widget. It can be links, texts or any other dynamic contents.</p>
<p>The second function, init_commingup(), is called by WordPress if the plugin is activated. It calls a WordPress function that will register a new widget which will be called &#8220;Coming Up&#8221; which will call our new widget.</p>
<p>Add action just tells WordPress to call the second function when the plugin is loaded.</p>
<p>That is done, you’ve successfully created a plugin that will deliver a new blank widget.</p>
<p>You may be wondering how you can place dynamic contents in your newly created widget plugin.</p>
<p>This is so simple to do if you know little bit PHP and HTML coding.</p>
<p>Now let’s forget what we’ve done above.</p>
<p>And let me show you the idea to get things ready for your widget.</p>
<p>Consider the following loop that will show the posts that are marked as scheduled posts.</p>
<blockquote><p><code>&lt;?php query_posts('showposts=5&amp;post_status=future'); ?&gt;</p>
<p>&lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&gt;</p>
<p>&lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;</p>
<p>&lt;span&gt;&lt;?php the_time('j F Y'); ?&gt;&lt;/span&gt;&lt;/p&gt;</p>
<p>&lt;?php endwhile;</p>
<p>else: ?&gt;&lt;p&gt;No future events scheduled.&lt;/p&gt;</p>
<p>&lt;?php endif; ?&gt;</code></p></blockquote>
<p>The above code is just a basic posts loop that we have in your index.php page. Only the difference is, it is modified to view only title and scheduled date. Post_status=future makes is so much special. Hence all the posts except scheduled one are filtered out.</p>
<p>You can directly put the above code in any part of index.php. But, we are creating a widget right?</p>
<p>So we’ll modify that code to fit as a widget.</p>
<p>Here is the modified part of it:</p>
<blockquote><p><code>echo '&lt;li&gt;&lt;h2&gt;Comming up&lt;/h2&gt;';</p>
<p>echo '&lt;ul&gt;';</p>
<p>query_posts('showposts=10&amp;post_status=future');</p>
<p>if ( have_posts() ) : while ( have_posts() ) : the_post();</p>
<p>echo '&lt;li&gt;&lt;h4&gt;'; the_title(); echo '&lt;/h4&gt;';</p>
<p>echo '&lt;span&gt;'; the_time('j F Y'); echo '&lt;/span&gt;&lt;/li&gt;';</p>
<p>endwhile;</p>
<p>else: echo '&lt;p&gt;No future events scheduled.&lt;/p&gt;';</p>
<p>endif;</p>
<p>echo '&lt;/ul&gt;&lt;/li&gt;';</code></p></blockquote>
<p>We’ll place the above code in function commingup_widget().</p>
<p>When we combine the description code and the functions we’ll get the following setup of code.</p>
<blockquote><p><code>&lt;?php</p>
<p>/*</p>
<p>Plugin Name: Comming up</p>
<p>Plugin URI: http://youcanhack.blogspot.com</p>
<p>Description: Up comming posts</p>
<p>Author: suraZ Kayastha</p>
<p>Version: 1.0</p>
<p>Author URI: http://youcanhack.blogspot.com</p>
<p>*/</p>
<p>function commingup_widget() {</p>
<p>echo '&lt;li&gt;&lt;h2&gt;Comming up&lt;/h2&gt;';</p>
<p>echo '&lt;ul&gt;';</p>
<p>query_posts('showposts=10&amp;post_status=future');</p>
<p>if ( have_posts() ) : while ( have_posts() ) : the_post();</p>
<p>echo '&lt;li&gt;&lt;h4&gt;'; the_title(); echo '&lt;/h4&gt;';</p>
<p>echo '&lt;span&gt;'; the_time('j F Y'); echo '&lt;/span&gt;&lt;/li&gt;';</p>
<p>endwhile;</p>
<p>else: echo '&lt;li&gt;&lt;p&gt;No future events scheduled.&lt;/p&gt;';</p>
<p>endif;</p>
<p>echo '&lt;/ul&gt;&lt;/li&gt;';</p>
<p>}</p>
<p>function init_commingup(){</p>
<p>register_sidebar_widget("commingup", "commingup_widget");</p>
<p>}</p>
<p>add_action("plugins_loaded", "init_commingup");</p>
<p>?&gt;</code></p></blockquote>
<p>See that? All the codes are enclosed in &lt;?php ?&gt;. Now all we need to do is save it as PHP file. Name it anything you want, I named it commingup.php.</p>
<p>Upload it to wp-content/plugins/commingup.</p>
<p>Go to plugin control panel in wordpress and activate it.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/d2.jpg"><img class="aligncenter size-full wp-image-6087" src="http://hackspc.com/wp-content/uploads/2010/08/d2.jpg" alt="" width="528" height="60" /></a></p>
<p>Now navigate to widget control panel, Right sidebar &gt; Appearance &gt; Widgets.</p>
<p>There you go, you’ll see the widget that you’ve just created.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/e2.jpg"><img class="aligncenter size-full wp-image-6088" src="http://hackspc.com/wp-content/uploads/2010/08/e2.jpg" alt="" width="476" height="196" /></a></p>
<p>Click and drag it to the sidebar.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/f2.jpg"><img class="aligncenter size-full wp-image-6089" src="http://hackspc.com/wp-content/uploads/2010/08/f2.jpg" alt="" width="360" height="111" /></a></p>
<p>Now reload your Wordpress website. If you have any scheduled post then it will list it as an upcoming event.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/c2.jpg"><img class="aligncenter size-full wp-image-6086" src="http://hackspc.com/wp-content/uploads/2010/08/c2.jpg" alt="" width="329" height="196" /></a></p>
<p>If nothing is scheduled then it will print “No future events scheduled”.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/b4.jpg"><img class="aligncenter size-full wp-image-6085" src="http://hackspc.com/wp-content/uploads/2010/08/b4.jpg" alt="" width="390" height="195" /></a></p>
<p>If you have any confusion, then comment us. We’ll have full support for this widget in our blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://hackspc.com/how-to-create-a-wordpress-upcomming-events-widget-a-step-by-step-tutorial/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>View PSD and other image files without installing Photoshop</title>
		<link>http://hackspc.com/view-psd-and-other-image-files-without-installing-photoshop/</link>
		<comments>http://hackspc.com/view-psd-and-other-image-files-without-installing-photoshop/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 13:07:03 +0000</pubDate>
		<dc:creator>Ivan</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Graphics]]></category>

		<guid isPermaLink="false">http://hackspc.com/?p=6065</guid>
		<description><![CDATA[Yesterday, I requested my friend to send me the snapshot of the PSD file of the Wordpress design. But he claimed that his Photoshop CS2 has expired. He thought of going to his friend and copying the snapshot and again sending back to me. Photoshop Document itself was large size, therefore I asked for the [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I requested my friend to send me the snapshot of the PSD file of the Wordpress design. But he claimed that his Photoshop CS2 has expired. He thought of going to his friend and copying the snapshot and again sending back to me. Photoshop Document itself was large size, therefore I asked for the snapshot. If I was going to accept his idea, then I would have to wait whole day for just a snapshot.<span id="more-6065"></span></p>
<p>Rather I suggested him certain idea to view PSD files without the need of Photoshop. And that is what I want to share with my visitors as well.</p>
<p>With IrfanView, a 1.3 MB image viewing freeware utility, you can open almost all the images without need of any high level software. Here is <a href="http://www.irfanview.com/main_formats.htm">a list of image</a> files that I can open.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/a3.jpg"><img class="aligncenter size-full wp-image-6066" src="http://hackspc.com/wp-content/uploads/2010/08/a3.jpg" alt="" width="515" height="448" /></a></p>
<p>IrfanView is a freeware utility, licensed under End User License Agreement (EULA).</p>
<p>It is not only a viewer; rather you can edit the pictures there. Basically it supports cropping, cut, paste, copy, drawing tools, eraser tools etc. IrfanView is plug-in enabled, that means they have plug-in to make it more accessible and useful.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/b2.jpg"><img class="aligncenter size-full wp-image-6067" src="http://hackspc.com/wp-content/uploads/2010/08/b2.jpg" alt="" width="531" height="430" /></a></p>
<p><a href="http://www.irfanview.com/">Click here to download IrfanView</a></p>
<p>This is guest post from suraZ. His other interesting posts can be read on <a href="http://youcanhack.blogspot.com/">You Can Hack</a> and <a href="http://hacktutors.info/">Hacktutors</a> blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://hackspc.com/view-psd-and-other-image-files-without-installing-photoshop/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Only Retrieve First Image Of The Post In Mainpage If It Exists – Wordpress Hack</title>
		<link>http://hackspc.com/only-retrieve-first-image-of-the-post-in-mainpage-if-it-exists-%e2%80%93-wordpress-hack/</link>
		<comments>http://hackspc.com/only-retrieve-first-image-of-the-post-in-mainpage-if-it-exists-%e2%80%93-wordpress-hack/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 11:44:51 +0000</pubDate>
		<dc:creator>Ivan</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://hackspc.com/?p=6059</guid>
		<description><![CDATA[I am going to apply a small hack to the trick suggested by wprecipes.com to display the first image from the post in a mainpage.
Let’s summarize what they’ve done.
First they’ve created a function that retrives the first image of the post if the image is not found, then it will show default.jpg image from the [...]]]></description>
			<content:encoded><![CDATA[<p>I am going to apply a small hack to the trick suggested by <a href="http://www.wprecipes.com/how-to-get-the-first-image-from-the-post-and-display-it">wprecipes.com</a> to display the first image from the post in a mainpage.<span id="more-6059"></span></p>
<p>Let’s summarize what they’ve done.</p>
<p>First they’ve created a function that retrives the first image of the post if the image is not found, then it will show default.jpg image from the defined location.</p>
<blockquote><p><code>function catch_that_image() {</code></p>
<p><code>global $post, $posts;</code></p>
<p><code>$first_img = '';</p>
<p>ob_start();</p>
<p>ob_end_clean();</p>
<p>$output = preg_match_all('/&lt;img.+src=[\'"]([^\'"]+)[\'"].*&gt;/i', $post-&gt;post_content, $matches);</p>
<p>$first_img = $matches [1] [0];</p>
<p>if(empty($first_img)){ //Defines a default image</p>
<p>$first_img = "<span style="color: #ff6600">/images/default.jpg</span>";</p>
<p>}</p>
<p>return $first_img;</p>
<p></code><code>}</code></p></blockquote>
<p><em>Code exactly copied from wprecipes.com</em></p>
<p>The above code snippet is to be copied in functions.php file located at the themes root folder. If it doesn’t exists, then you can create one using notepad, and paste the above code enclosed in following format:</p>
<blockquote><p><code>&lt;?php</code></p>
<p><code>Wprecipes.com’s function code goes here</code></p>
<p><code> </code><code>?&gt;</code></p></blockquote>
<p>Now to load the image anywhere in your main page or any other page just places the following code within the posts loop.</p>
<blockquote><p><code>&lt;?php echo catch_that_image() ?&gt;</code></p></blockquote>
<p>The above PHP function code must like somewhere near to &lt;?php the_content(); ?&gt; or &lt;?php the_excerpt(); ?&gt;</p>
<p>Consider it in the following example loop.</p>
<blockquote><p><code>&lt;?php if (have_posts()) : ?&gt;</code></p>
<p><code>&lt;?php while (have_posts()) : the_post(); ?&gt;</code></p>
<p><code>&lt;!-- Title of the post --&gt;</p>
<p>&lt;h2&gt;</p>
<p>&lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark" title="Permanent Link to &lt;?php the_title(); ?&gt;"&gt;</p>
<p>&lt;?php the_title(); ?&gt;</p>
<p>&lt;/a&gt;</p>
<p>&lt;/h2&gt;</p>
<p>&lt;!-- date and author of the post --&gt;</p>
<p>&lt;small&gt;</p>
<p>&lt;?php the_time('F jS, Y') ?&gt; by &lt;?php the_author() ?&gt;</p>
<p>&lt;/small&gt;</p>
<p>&lt;p&gt;</p>
<p>&lt;!-- Thumbnail of the first image --&gt;</p>
<p>&lt;img src="<span style="color: #ff0000">&lt;?php echo catch_that_image() ?&gt;</span>" /&gt;</p>
<p>&lt;!-- Summary content of the post --&gt;</p>
<p>&lt;?php the_content(); ?&gt;</p>
<p>&lt;/p&gt;</p>
<p>&lt;?php endwhile; ?&gt;</p>
<p></code><code>&lt;?php endif; ?&gt;</code></p></blockquote>
<p>You’ll get following type of screen in your post loop.</p>
<p style="text-align: center"><a href="http://hackspc.com/wp-content/uploads/2010/08/a2.jpg"><img class="aligncenter size-full wp-image-6060" src="http://hackspc.com/wp-content/uploads/2010/08/a2.jpg" alt="" width="521" height="398" /></a></p>
<p>The upper post contains the first image of the post. The lower content is not showing any images rather than a alternate tag. It is because we don’t have any image in the second post, by default from functions.php, functions will be redirected to no image and browser will try to load default image. If browser is unable to find /images/default.jpg, which we have specified in functions.php it will show no image but alternative title, you must upload default.jpg in the specific location to get the default image.</p>
<p>But using default image might not be dynamic and useful if most of your post doesn’t contain any images. Then we’ll have to seek extra tweaks to show nothing in place of default image.</p>
<p>Let me show you how can you accomplish this using extra function.</p>
<p>First, we’ll create a function that will scan for presence of any image in the specific post, then we’ll define what it must do if image is there and what it must do if image is not there. It can be accomplished by using conditional tags.</p>
<p>Here is the function to scan image, add this in functions.php just above, <strong>?&gt; </strong>(i.e. exactly above the PHP code end tag)</p>
<blockquote><p><code>function image_scan( $args = array() ) {</code></p>
<p><code>if ( !$post_id )</code></p>
<p><code>global $post;</p>
<p>preg_match_all( '|&lt;img.*?src=[\'"](.*?)[\'"].*?&gt;|i', $post-&gt;post_content, $matches );</p>
<p>if ( isset( $matches ) ) $image = $matches[1][0];</p>
<p>if ( $matches[1][0] )</p>
<p>return array( 'image' =&gt; $image );</p>
<p>else</p>
<p>return false;</p>
<p></code><code>}<br />
</code></p></blockquote>
<p>Now we’ll use PHP conditional tag in index.php or any page where we want this to take effect on.</p>
<blockquote><p><code>&lt;?php  if (image_scan('TRUE')) {  ?&gt; Show image &lt;?php } ?&gt;</code></p>
<p><code>The final code will be like this after applying the the image_scan condition.</code></p>
<p><code>&lt;?php if (have_posts()) : ?&gt;</p>
<p>&lt;?php while (have_posts()) : the_post(); ?&gt;</p>
<p>&lt;!-- Title of the post --&gt;</p>
<p>&lt;h2&gt;</p>
<p>&lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark" title="Permanent Link to &lt;?php the_title(); ?&gt;"&gt;</p>
<p>&lt;?php the_title(); ?&gt;</p>
<p>&lt;/a&gt;</p>
<p>&lt;/h2&gt;</p>
<p>&lt;!-- date and author of the post --&gt;</p>
<p>&lt;small&gt;</p>
<p>&lt;?php the_time('F jS, Y') ?&gt; by &lt;?php the_author() ?&gt;</p>
<p>&lt;/small&gt;</p>
<p>&lt;p&gt;</p>
<p>&lt;!-- Thumbnail of the first image --&gt;</p>
<p><span style="color: #ff9900">&lt;?php  if (image_by_scan('TRUE')) { ?&gt;</span></p>
<p>&lt;img src="<span style="color: #ff0000">&lt;?php echo catch_that_image() ?&gt;</span>" /&gt;</p>
<p><span style="color: #ff9900">&lt;?php } ?&gt;</span></p>
<p>&lt;!-- Summary content of the post --&gt;</p>
<p>&lt;?php the_content(); ?&gt;</p>
<p>&lt;/p&gt;</p>
<p>&lt;?php endwhile; ?&gt;</p>
<p></code><code>&lt;?php endif; ?&gt;<br />
</code></p></blockquote>
<p>Now you’ll have only thumbnails of first images if it exists, otherwise it shows no image.</p>
<p style="text-align: center"><a href="http://hackspc.com/wp-content/uploads/2010/08/b1.jpg"><img class="aligncenter size-full wp-image-6061" src="http://hackspc.com/wp-content/uploads/2010/08/b1.jpg" alt="" width="530" height="379" /></a></p>
<p>Hope this tutorial was helpful.</p>
]]></content:encoded>
			<wfw:commentRss>http://hackspc.com/only-retrieve-first-image-of-the-post-in-mainpage-if-it-exists-%e2%80%93-wordpress-hack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Transfer Your Joomla Website From One Host To Another</title>
		<link>http://hackspc.com/transfer-your-joomla-website-from-one-host-to-another/</link>
		<comments>http://hackspc.com/transfer-your-joomla-website-from-one-host-to-another/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 21:06:28 +0000</pubDate>
		<dc:creator>Suraj Kayastha</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://hackspc.com/?p=6041</guid>
		<description><![CDATA[Ever wanted to shift your joomla site from one host to another better host? There are lots of thirdparty joomla extensions to transfer your joomla web contents, but the layout may remain same. You can transfer the joomla with your whole layout and widgets same as in previous host.
Backup your database
First you’ll need to backup [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wanted to shift your joomla site from one host to another better host? There are lots of thirdparty joomla extensions to transfer your joomla web contents, but the layout may remain same. You can transfer the joomla with your whole layout and widgets same as in previous host.<span id="more-6041"></span></p>
<p><strong>Backup your database</strong></p>
<p>First you’ll need to backup your database from phpmyadmin. Go to your phpmyadmin from control panel. Then at the left sidebar, select the database your joomla is based on.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/a1.jpg"><img class="aligncenter size-full wp-image-6042" src="http://hackspc.com/wp-content/uploads/2010/08/a1.jpg" alt="" width="178" height="123" /></a></p>
<p>After you select the database, you’ll get list of tables.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/b.jpg"><img class="aligncenter size-full wp-image-6043" src="http://hackspc.com/wp-content/uploads/2010/08/b.jpg" alt="" width="201" height="188" /></a></p>
<p>At the right column, select on export tab.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/c.jpg"><img class="aligncenter size-full wp-image-6044" src="http://hackspc.com/wp-content/uploads/2010/08/c.jpg" alt="" width="441" height="136" /></a></p>
<p>In next page, <strong>under View dump (schema) of database</strong><strong></strong>, <strong>Export</strong>, click on select all.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/d.jpg"><img class="aligncenter size-full wp-image-6045" src="http://hackspc.com/wp-content/uploads/2010/08/d.jpg" alt="" width="242" height="227" /></a></p>
<p>Below this, you’ll have large options of formats available to export in. Choose SQL.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/e.jpg"><img class="aligncenter size-full wp-image-6056" src="http://hackspc.com/wp-content/uploads/2010/08/e.jpg" alt="" width="145" height="114" /></a></p>
<p>Under <strong>Save as File</strong>, give the filename and choose the compression method if you have larger size of database.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/f.jpg"><img class="aligncenter size-full wp-image-6046" src="http://hackspc.com/wp-content/uploads/2010/08/f.jpg" alt="" width="477" height="126" /></a></p>
<p>Then at the most right corner, click on GO button.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/g.jpg"><img class="aligncenter size-full wp-image-6047" src="http://hackspc.com/wp-content/uploads/2010/08/g.jpg" alt="" width="234" height="106" /></a></p>
<p>Then you’ll have a text format of the database.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/h.jpg"><img class="aligncenter size-full wp-image-6048" src="http://hackspc.com/wp-content/uploads/2010/08/h.jpg" alt="" width="371" height="289" /></a></p>
<p>Select all and copy it in Notepad. Save it as “database.txt” with Unicode formatting.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/i.jpg"><img class="aligncenter size-full wp-image-6049" src="http://hackspc.com/wp-content/uploads/2010/08/i.jpg" alt="" width="347" height="121" /></a></p>
<p>Now you have successfully backed up your data. Next you’ll be copying the core contents of the joomla site.</p>
<p><strong>Copying the files to another host.</strong></p>
<p>This is nothing harder; it is like just copying and pasting. Copy the contents from the source host and paste it to another host by using any FTP client favorable to you. You can also use windows inbuilt ftp client.</p>
<p>Since you are using joomla and using different host than previous one, delete the configuration.php file from the root of the webhost. Get the installation folder of the joomla version you were using and upload it to your new host again, as you might have deleted it from your previous host for security reasons.</p>
<p>Now we have the files ready.</p>
<p><strong>Preparing for transfer.</strong></p>
<p>Next, you’ll again login to phpmyadmin control panel and manually create a new database. To create a new database, in your phpmyadmin main page, type the database name exactly same that you had before.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/j.jpg"><img class="aligncenter size-full wp-image-6050" src="http://hackspc.com/wp-content/uploads/2010/08/j.jpg" alt="" width="480" height="99" /></a></p>
<p>Click on create button.</p>
<p><strong>Installing again</strong></p>
<p>To fix the host configuration, you’ll need to re-install joomla. Reinstalling joomla will create completely new website and you haven’t created any tables yet in your new database.</p>
<p>In your web browser browse to the main page and install it as usually with no sample data installed. Even though you install sample data, it doesn’t matter as you will be droping all the tables later.</p>
<p>After you the installation is complete, either rename or replace or remove installation folder. You’ll have new configuration.php in your root folder where joomla is installed.</p>
<p><strong>Deleting the database</strong></p>
<p>We installed joomla again only for the configuration.php. Now we won’t need the new tables created in this database. Therefore we’ll be removing it.</p>
<p>To remove all the tables, choose the database as before. In the right column at the end of the table list, click on Check All.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/k.jpg"><img class="aligncenter size-full wp-image-6051" src="http://hackspc.com/wp-content/uploads/2010/08/k.jpg" alt="" width="381" height="210" /></a></p>
<p>Now at in <strong>with selected</strong> dropdown list, select drop.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/l.jpg"><img class="aligncenter size-full wp-image-6052" src="http://hackspc.com/wp-content/uploads/2010/08/l.jpg" alt="" width="361" height="101" /></a></p>
<p>In next confirmation window, click on Yes button.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/m.jpg"><img class="aligncenter size-full wp-image-6053" src="http://hackspc.com/wp-content/uploads/2010/08/m.jpg" alt="" width="300" height="137" /></a></p>
<p>There you go, you’ve successfully cleared all the contents in your database. At the moment, your website won’t work, so better not browsing it.</p>
<p><strong>Recovering your previous database</strong></p>
<p>Again choose the database you’ve just emptied,  at the right column choose import tab.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/n.jpg"><img class="aligncenter size-full wp-image-6054" src="http://hackspc.com/wp-content/uploads/2010/08/n.jpg" alt="" width="169" height="58" /></a></p>
<p>In next page, click on choose file and upload the backed up database. Before uploading make sure you’ve chosen the right format. We’ve saved database.txt in utf-8 format. Hence we must select utf-8 format in the dropdown list.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/08/o.jpg"><img class="aligncenter size-full wp-image-6055" src="http://hackspc.com/wp-content/uploads/2010/08/o.jpg" alt="" width="258" height="73" /></a></p>
<p>Leave rest of the things as default and click on Go button.</p>
<p>You’ll be notified if the database has been successfully uploaded.</p>
<p>Now you’ve successfully completed transferring your blog. You’ll see everything similar as before.</p>
<p>Note:  You might have problem in administration page login if you have typed different username and password. The Username and Password that you used at the time of installation gets deleted. As you upload the backed up database, your previous administer username and password will be recovered instead. Therefore try logging in username and password as you had in your previous host.</p>
<p>This come the end of the tutorial. Hope you enjoyed it. If you have any questions then comment us.</p>
]]></content:encoded>
			<wfw:commentRss>http://hackspc.com/transfer-your-joomla-website-from-one-host-to-another/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Mouse Hover Tips To Beautify Your Web Templates</title>
		<link>http://hackspc.com/css-mouse-hover-tips-to-beautify-your-web-templates/</link>
		<comments>http://hackspc.com/css-mouse-hover-tips-to-beautify-your-web-templates/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 11:42:37 +0000</pubDate>
		<dc:creator>Suraj Kayastha</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://hackspc.com/?p=6029</guid>
		<description><![CDATA[Beautiful web template is what everyone expects to have in their site. Moreover making it is much more challenging. Previously websites were designed in tabled form. Later the tabled forms were replaced by Cascading Style Sheets (CSS).
CSS is the versatile method to design website, while HTML as the platform. Today, for interactive websites, mostly flash [...]]]></description>
			<content:encoded><![CDATA[<p>Beautiful web template is what everyone expects to have in their site. Moreover making it is much more challenging. Previously websites were designed in tabled form. Later the tabled forms were replaced by Cascading Style Sheets (CSS).<span id="more-6029"></span></p>
<p>CSS is the versatile method to design website, while HTML as the platform. Today, for interactive websites, mostly flash based movie files are used. However Flash is not based on any HTML program. Plus, it needs additional plug-in and applets in browser to view the flash based website. This is the main backward feature of flash based websites.</p>
<p>However with the release of new HTML 5 and CSS, it is now possible to achieve interactive websites more versatile than Flash based interactive websites.</p>
<p>Today, in this post, we’ll discuss about few methods that we can apply in HTML and CSS only to achieve highly dynamic and interactive web templates.</p>
<p><strong>Using pseudo classes</strong></p>
<p>CSS pseudo-classes are used to add special effects to some selectors. For example, some popular and widely used pseudo classes are:</p>
<p>:link, :visited, :hover, :active.</p>
<p>Following example demonstrates the use of pseudo class in &lt;a &gt; tags.</p>
<blockquote><p><code>a:link {color:#FF0000;}      /* unvisited link */<br />
a:visited {color:#00FF00;}  /* visited link */<br />
a:hover {color:#FF00FF;}  /* mouse over link */<br />
a:active {color:#0000FF;}  /* selected link */</code>
</p></blockquote>
<p>It can also be applied to lists and divisions to add more hover effects to the web page.</p>
<p>For example, the following images shows how it can be applied to divisions to add content highlight effect.</p>
<p style="text-align: center"><a href="http://hackspc.com/wp-content/uploads/2010/08/a.jpg"><img class="aligncenter size-full wp-image-6028" src="http://hackspc.com/wp-content/uploads/2010/08/a.jpg" alt="" width="414" height="177" /></a></p>
<p>We’ used hover to one of the class for division.</p>
<p>Here is the basic CSS code:</p>
<blockquote><p><code>&lt;style&gt;</p>
<p>.home {</p>
<p>Background:#333;</p>
<p>}</p>
<p>.home:hover {</p>
<p>background:#0C6;</p>
<p>}</p>
<p>&lt;/style&gt;</code></p></blockquote>
<p>And for the HTML part:</p>
<blockquote><p><code>&lt;div&gt;</p>
<p>Every contents located here will have mouse highlighting effect.</p>
<p>&lt;/div&gt;<br />
</code></p></blockquote>
<p><strong>Method to add image link hover effect</strong></p>
<p>Bascially, we apply background image to a:link and another background image to a:hover to have background image hover effect in CSS. It is ok with all of the browsers as most of them supports it.</p>
<p>But incase you are using large size image then you’ll have a problem here. What exactly the above method does is that, whenever the link is in normal state (i.e. mouse is not over the link) the browser will in default load the background image specified in a:link CSS class, but when mouse is hovered over the link, it will load background image from a:hover class. If the image is larger in size then it will take time to load.</p>
<p>Let us discuss alternative method which will load both of the images at the of page load.</p>
<p>Look at the HTML code below:</p>
<blockquote><p><code>&lt; a href="link.html"&gt;</p>
<p>&lt;img alt="image" src="images/image.png" class="nohover" /&gt;</p>
<p>&lt;img alt="imagehover" src="images/image.png" class="hover" /&gt;</p>
<p>&lt;/a&gt;</code></p></blockquote>
<p>We have two images inside &lt;a&gt; tag each of the image have specific class defined.</p>
<p>We can hide one of the image when hovering with the help of CSS.</p>
<blockquote><p><code><br />
img.nohover {</p>
<p>border:0</p>
<p>}</p>
<p>img.hover {</p>
<p>border:0;</p>
<p>display:none</p>
<p>}</p>
<p>a:hover img.hover {</p>
<p>display:inline</p>
<p>}</p>
<p>a:hover img.nohover {</p>
<p>display:none</p>
<p>}</p>
<p></code></p></blockquote>
<p>In above four different CSS functions, at first when no mouse is hovered over the link image, the image defined with class “nohover” will take in action, resulting only one image to be viewed. In other words, one image is set to hidden while other one is set to visible. We do this by the help of display:none;</p>
<p>Now when a link image is hovered, we’ll apply display:none; to the image that must be hidden when hovered. And for the one that must be visible, we’ll apply display:inline;</p>
<p>Copy and try the above codes. Play with it, you&#8217;ll learn more when you research it yourself.</p>
<p>This works in all the version of browsers, so you won’t have cross browser compatibility problem.</p>
<p>The rise of CSS3 have made more thing possible, the above tutorial is classified under CSS 2.1 version.</p>
<p>In this way you can utilize the pseudo class hover to make your web page much more user friendly and interactive.</p>
]]></content:encoded>
			<wfw:commentRss>http://hackspc.com/css-mouse-hover-tips-to-beautify-your-web-templates/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hacking CSS For Rounded Colors In All Browsers No Images And No Javascript</title>
		<link>http://hackspc.com/hacking-css-for-rounded-colors-in-all-browsers-no-images-and-no-javascript/</link>
		<comments>http://hackspc.com/hacking-css-for-rounded-colors-in-all-browsers-no-images-and-no-javascript/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 19:02:19 +0000</pubDate>
		<dc:creator>Suraj Kayastha</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://hackspc.com/?p=6010</guid>
		<description><![CDATA[There are lots of tricks to get rounded/curved corners for our CSS websites. For example, you may want rounded corner for a box. You may easily think of using images and aligning it top left, top right, bottom left and bottom right. It sounds easy, but is way too complicated as we’ll need to create [...]]]></description>
			<content:encoded><![CDATA[<p>There are lots of tricks to get rounded/curved corners for our CSS websites. For example, you may want rounded corner for a box. You may easily think of using images and aligning it top left, top right, bottom left and bottom right. It sounds easy, but is way too complicated as we’ll need to create large number of blank divisions. Also another minus point can be, it is little bit harder to crop the exact pixel of the corner. Consequently, we’ll have something irregular display of corners and the plain line.<span id="more-6010"></span></p>
<p>Also we’ve another technique, border-radius, which is supported from CSS3. But CSS3 is not supported in enemy of web developers, i.e. Internet Explorer. However CSS3 is partially supported in other popular browsers like Chrome, Firefox, Safari, etc.</p>
<p>The main problem here became the internet explorer. Even Internet Explorer 8 doesn’t support CSS3 rounded corners. However, it is expected in Internet Explorer 9.</p>
<p>Now, instead of trying images and CSS3, we’ll focus on CSS2 as every of the browsers supports it.</p>
<p>Before creating rounded corners we must technically have pixel to pixel knowledge about rounded corners.</p>
<p>Rounded corners are created from pixels. Imagine a bunch of few lines combining to form a rounded corner. To get clearer, refer to following example:</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/07/a13.jpg"><img src="http://hackspc.com/wp-content/uploads/2010/07/a13.jpg" alt="" width="246" height="150" class="aligncenter size-full wp-image-6012" /></a></p>
<p>The above illustration is the illustrated microscopic view of rounded corner in raster image.</p>
<p>Again when the lines come closer together, then it looks like this:</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/07/b14.jpg"><img src="http://hackspc.com/wp-content/uploads/2010/07/b14.jpg" alt="" width="154" height="129" class="aligncenter size-full wp-image-6013" /></a></p>
<p>Finally when all of the line combines then it gives a pixilated image of rounded corner.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/07/c9.jpg"><img src="http://hackspc.com/wp-content/uploads/2010/07/c9.jpg" alt="" width="156" height="131" class="aligncenter size-full wp-image-6014" /></a></p>
<p>In normal view, a rounded corner will look like the image below:</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/07/d9.jpg"><img src="http://hackspc.com/wp-content/uploads/2010/07/d9.jpg" alt="" width="147" height="34" class="aligncenter size-full wp-image-6015" /></a></p>
<p>We are going to work on the same principle.</p>
<p>Assume that you want rounded corner of about 6 pixel, then you’ll need 7 different lines of 1 pixel height with several width.</p>
<p>As you can see the first line illustrated image above, the height is made constant with few gaps and the width keeps increasing by 1px or few more pixels.</p>
<p>For your easy, again refer to following illustration.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/07/e8.jpg"><img src="http://hackspc.com/wp-content/uploads/2010/07/e8.jpg" alt="" width="503" height="442" class="aligncenter size-full wp-image-6016" /></a></p>
<p>The first line is 93px long, and second line is 2px more than first one. After that the width of the line is kept increasing by 1px till it gives 99px.</p>
<p>Note:  For larger radius, you’ll need larger number of lines.</p>
<p>Now we’ll do the CSS trick here which is applicable as CSS2.</p>
<p>We’ll create 6 spans with different classes. We’ll name the class as class1, class2, class3, class 4, class5, class6. And we’ll put each line in each span class. But we are not going to place image, we’ll be instead using background color for each span.</p>
<p>You might question right here, why 6 classes only when we have 7 lines in above image. Well, this is because, the last two lines have similar width and we can set the height to make it as two lines.</p>
<p>Again to define the width of each span, we’ll use margin, where the actual width remains same but the background color will skip the marginal areas. And we’ll again set the height of each span.</p>
<p>OK, now let me show you how this can be accomplished in CSS script.</p>
<p>We will first set default values for all the classes that lies in span.</p>
<blockquote><p><code>.class1, .class2, .class3, .class4, .class5, .class6 {</p>
<p>display:block;</p>
<p>overflow:hidden;</p>
<p>}</code></p></blockquote>
<p>This will make each span as a block instead of inline content and set the overflow hidden.</p>
<p>We’ll now set the width of each line. But we are not using width CSS code as we actually will have dynamic div wrapping this. So we are doing only pixels work here not a line. Therefore, we’ll use margin.</p>
<p>Here is a code for each class,</p>
<blockquote><p><code>.class1 {</p>
<p>Height:1px</p>
<p>Background:#ddd;</p>
<p>Margin:0 6px; /* this will make the first line of the rounded corner 6px smaller than normal maximum line width */</p>
<p>}</p>
<p>.class2 {</p>
<p>Height:1px</p>
<p>Background:#ddd;</p>
<p>Margin:0 4px; /* this will make the second line of the rounded corner 4px smaller than normal maximum line width */</p>
<p>}</p>
<p>.class3 {</p>
<p>Height:1px</p>
<p>Background:#ddd;</p>
<p>Margin:0 3px; /* this will make the third line of the rounded corner 6px smaller than normal maximum line width */</p>
<p>}</p>
<p>.class4 {</p>
<p>Height:1px</p>
<p>Background:#ddd;</p>
<p>Margin:0 2px; /* this will make the fourth line of the rounded corner 2px smaller than normal maximum line width */</p>
<p>}</p>
<p>.class5 {</p>
<p>Height:1px</p>
<p>Background:#ddd;</p>
<p>Margin:0 1px; /* this will make the fifth line of the rounded corner 2px smaller than normal maximum line width */</p>
<p>}</p>
<p>.class6 {</p>
<p>Height:2px /* this will double the line */</p>
<p>Background:#ddd;</p>
<p>Margin:0 0; /* this will make the last line of the rounded exactly the maximum width of the wrapper */</p>
<p>}<br />
</code></p></blockquote>
<p>Now we’ll be coding for XHTML.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/07/f7.jpg"><img src="http://hackspc.com/wp-content/uploads/2010/07/f7.jpg" alt="" width="442" height="248" class="aligncenter size-full wp-image-6017" /></a></p>
<blockquote><p><code>&lt;div class=”outerwrapper”&gt;</p>
<p>&lt;span&gt;&lt;/span&gt;&lt;span class="class2"&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="class4"&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="class6"&gt;&lt;/span&gt;</p>
<p>&lt;div class="content"&gt;</p>
<p>Rounded Corner here!!</p>
<p>&lt;/div&gt;</p>
<p>&lt;span&gt;&lt;/span&gt;&lt;span class="class5"&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="class3"&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="class1"&gt;&lt;/span&gt;</p>
<p>&lt;/div&gt;</code></p></blockquote>
<p>The bottom rounded corner must have reversed order of span class. Like we have class1 then class 2 then class 3 then class 4 up to class 6 for the top rounded corner. We’ll need exactly reverse, class6 then class5 &#8230; for the bottom rounded corner.</p>
<blockquote><p><code>Finalized style sheet:</p>
<p>&lt;style&gt;</p>
<p>.outerwrapper {</p>
<p>Width:960px;  /* whatever width you set here, the rounded corner will automatically adjust itself to it.</p>
<p>}</p>
<p>.class1, .class2, .class3, .class4, .class5, .class6 {</p>
<p>display:block;</p>
<p>overflow:hidden;</p>
<p>}</p>
<p>.class1 {</p>
<p>Height:1px</p>
<p>Background:#ddd;</p>
<p>Margin:0 6px; /* this will make the first line of the rounded corner 6px smaller than normal maximum line width */</p>
<p>}</p>
<p>.class2 {</p>
<p>Height:1px</p>
<p>Background:#ddd;</p>
<p>Margin:0 4px; /* this will make the second line of the rounded corner 4px smaller than normal maximum line width */</p>
<p>}</p>
<p>.class3 {</p>
<p>Height:1px</p>
<p>Background:#ddd;</p>
<p>Margin:0 3px; /* this will make the third line of the rounded corner 6px smaller than normal maximum line width */</p>
<p>}</p>
<p>.class4 {</p>
<p>Height:1px</p>
<p>Background:#ddd;</p>
<p>Margin:0 2px; /* this will make the fourth line of the rounded corner 2px smaller than normal maximum line width */</p>
<p>}</p>
<p>.class5 {</p>
<p>Height:1px</p>
<p>Background:#ddd;</p>
<p>Margin:0 1px; /* this will make the fifth line of the rounded corner 2px smaller than normal maximum line width */</p>
<p>}</p>
<p>.class6 {</p>
<p>Height:2px /* this will double the line */</p>
<p>Background:#ddd;</p>
<p>Margin:0 0; /* this will make the last line of the rounded exactly the maximum width of the wrapper */</p>
<p>}</p>
<p>.content {</p>
<p>Padding:5px;</p>
<p>Background:#ddd;</p>
<p>}</p>
<p>&lt;/style&gt;</code></p></blockquote>
<p>Apply the above code and see the result in every browser. It is supported in every browser, as we have used nothing complicated here.</p>
<p><a href="http://hackspc.com/wp-content/uploads/2010/07/g5.jpg"><img src="http://hackspc.com/wp-content/uploads/2010/07/g5.jpg" alt="" width="263" height="140" class="aligncenter size-full wp-image-6018" /></a></p>
<p>Hope this was helpful.</p>
]]></content:encoded>
			<wfw:commentRss>http://hackspc.com/hacking-css-for-rounded-colors-in-all-browsers-no-images-and-no-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
