<?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>Many Interests BLOG &#187; download</title>
	<atom:link href="http://blog.darsain.net/tag/download/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.darsain.net</link>
	<description>Too many things, too little time</description>
	<lastBuildDate>Sat, 03 Jul 2010 14:47:20 +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>Password generator [UPDATE]</title>
		<link>http://blog.darsain.net/71/password-generator/</link>
		<comments>http://blog.darsain.net/71/password-generator/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 22:29:04 +0000</pubDate>
		<dc:creator>Darsain</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Interwebz]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.darsain.net/?p=71</guid>
		<description><![CDATA[Recently, many websites has fall due to lack of security, and many of them stored users passwords in pain text (rather no comment here), pretty useless md5, or unsalted sha1.
In every of those cases it is highly dangerous for users, since lack of security in here can cause the new owner of their private data [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, <a href="http://igigi.baywords.com/">many websites has fall</a> due to lack of security, and many of them stored users passwords in pain text (rather no comment here), <a href="http://www.md5decrypter.com/">pretty</a> <a href="http://www.md5encryption.com/">useless</a> <a href="http://www.md5decrypter.co.uk/">md5</a>, or unsalted sha1.</p>
<p>In every of those cases it is highly dangerous for users, since lack of security in here can cause the new owner of their private data to crack their passwords, thus be able to steal their identity on other places of teh interwebz. Good, strong, and different passwords for any website could solve this problem, but who would be able to memorize that&#8230; That&#8217;s why I have created this little web app, called <b>Password generator</b>.</p>
<p><span id="more-71"></span></p>
<p>Application can be found on this permanent URL: <a href="http://password.darsain.net">password.darsain.net</a></p>
<h2>What problem is this solving</h2>
<p>The functionality is simple. You need only one master password, and the domain name of a website you want to get your new password for, and it will generate you a 64 letters long unbreakable hash, which you can use as a password (for funny webs with max password length requirements, there are 40, and 16 letters long versions). If password like this will be again hashed into random website database, it is not important if they are salting or not, hash from such password can not be broken (I reserve 10 years long expiration date for this statement :P ).</p>
<p>Of course, when hacker have already got the access to database, you can&#8217;t do anything about protecting your account from being hacked on this hypothetical website. But you can minimize the damage from such event. Imagine, that he would get to your password you are using on every place on the Internet. Pretty awesome situation, isn&#8217;t it? :) And exactly the damage out of the boundaries of this hypothetical website is the issue that this Password generator is solving.</p>
<h2>How is it working</h2>
<p><a href="http://blog.darsain.net/wp-content/uploads/2010/01/password-generator.jpg" title="password-generator" rel="lightbox[71]"><img src="http://blog.darsain.net/wp-content/uploads/2010/01/password-generator-300x216.jpg" alt="" title="password-generator" width="300" height="216" class="alignright size-medium wp-image-72" /></a></p>
<p>I would like to think, that the UI of this little application is self explanatory :) The background, however, is not.</p>
<p>That is why you should always beware such websites, as they are pretty often used for <a href="http://en.wikipedia.org/wiki/Phishing">phishing</a>. To ensure the security, the whole generation and algorithms are done in your browser by JavaScript. No data whatsoever are send to any server, or simply everywhere else except your monitor screen.</p>
<p>The only disadvantage is, that &#8211; from some reason &#8211; I could shut this web application down, and you will be unable to regenerate your passwords. For issue like this, as everything is done with JavaScript and HTML (+ a little bit of unimportant flash), you can just simply save the whole website to your hard drive and run it from there without any problems. Well, there is one little issue with flash player permissions when running on localhost, so Copy to clipboard button may not work, unless you&#8217;ll set <a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.html">this flash player setting</a> to <b>Always allow</b>.</p>
<p>If you don&#8217;t know hot to save whole website so it will be actually working, here are the downloads for you.</p>
<a href="http://blog.darsain.net/?file_id=12" class="download-item">
  <img src="http://blog.darsain.net/wp-content/plugins/downloads-manager/img/icons/archive.png" alt="icon">
  <h3>Single mht file for Opera and IE</h3>
  <span>255.77KB</span> <span>145x</span>
</a> <a href="http://blog.darsain.net/?file_id=13" class="download-item">
  <img src="http://blog.darsain.net/wp-content/plugins/downloads-manager/img/icons/archive.png" alt="icon">
  <h3>Archive with all application files</h3>
  <span>121.28KB</span> <span>148x</span>
</a>
<h2>Update:</h2>
<p>Guys, do not use this. This password system idea is great, convenient, but in real world highly counter-productive, even useless. The security of websites on the internets is so bad, that they will simply not let you to have secure passwords like this. Almost every website out there have some restrictions, like having short passwords (max 16~ chars long), consisting only from alphanumeric characters, etcetera&#8230; From everywhere I&#8217;ve tried this, the only place where it worked was Google!</p>
<p>The best thing to do right now, is not to have any account anywhere at all&#8230; if a website is forcing you to register to download or view something they are offering for free, than just flip the finger, and either close the tab, register with some one time account, or in case of Firefox users -> download the spectacular <a href="https://addons.mozilla.org/en-US/firefox/addon/6349"><b>BugMeNot</b></a> plugin.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.darsain.net/71/password-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MyGallery 1.1 update</title>
		<link>http://blog.darsain.net/64/mygallery-1-1-update/</link>
		<comments>http://blog.darsain.net/64/mygallery-1-1-update/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 22:30:14 +0000</pubDate>
		<dc:creator>Darsain</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Freebies]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[MyGallery]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[Webdesign]]></category>

		<guid isPermaLink="false">http://blog.darsain.net/?p=64</guid>
		<description><![CDATA[As I&#8217;ve found some bugs in it, and I didn&#8217;t consider files uploading enough comfortable, I&#8217;ve decided to update this little thingy. New version is creating less mess on FTP (js &#038; style folders were moved into system), few bugs are fixed, few functionality clearance, but most important thing is new file uploader. I&#8217;ve implemented [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;ve found some bugs in it, and I didn&#8217;t consider files uploading enough comfortable, I&#8217;ve decided to update this little thingy. New version is creating less mess on FTP (js &#038; style folders were moved into system), few bugs are fixed, few functionality clearance, but most important thing is new file uploader. I&#8217;ve implemented the GREAT <a href="http://www.uploadify.com/">jQuery Uploadify</a> plugin, which is creating THE most comfortable file uploading experience EVAR! :)</p>
<p><span id="more-64"></span></p>
<h3>New upload feature preview</h3>
<p><a href="http://blog.darsain.net/wp-content/uploads/2009/10/mygallery-uploadify.jpg" title="mygallery-uploadify" rel="lightbox[64]"><img src="http://blog.darsain.net/wp-content/uploads/2009/10/mygallery-uploadify-560x387.jpg" alt="mygallery-uploadify" title="mygallery-uploadify" width="560" height="387" class="alignleft size-large wp-image-65" /></a><br />
By calling files selection by flash, you can choose multiple files at once (or whole folder with Ctrl+a), which is not possible only with HTML~JS. That means, that you do not have to select all files one by one, and smash your head on keyboard after 101st image. All files are than inserted into an upload queue, which is triggered by the &#8220;Upload files&#8221; button. Everything is take care of by AJAX, so there is no need for site reloading, and you can see how you gallery is filling with images :)</p>
<a href="http://blog.darsain.net/?file_id=9" class="download-item">
  <img src="http://blog.darsain.net/wp-content/plugins/downloads-manager/img/icons/external.png" alt="icon">
  <h3>Demo presentation</h3>
  <span>1.09KB</span> <span>337x</span>
</a> <a href="http://blog.darsain.net/?file_id=10" class="download-item">
  <img src="http://blog.darsain.net/wp-content/plugins/downloads-manager/img/icons/archive.png" alt="icon">
  <h3>Application files</h3>
  <span>7.64KB</span> <span>197x</span>
</a>
<h3>Bugs &#038; suggestions</h3>
<p>Report all bugs here as comments (or as comments on main MyGallery page on www.darsain.net).</p>
<p>If you have some suggestion, or feature requests &#8230; same way as with bugs :) just write them down here.</p>
<h3>Future plans</h3>
<p>In the next update I would like to jump straight to version 2.0, because I want to redesign the whole thing, and change app structure. I would love to recreate it to looks and function more like Deviantart Portfolio application.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.darsain.net/64/mygallery-1-1-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thumbnail generation functions in PHP</title>
		<link>http://blog.darsain.net/61/thumbnail-generation-functions-in-php/</link>
		<comments>http://blog.darsain.net/61/thumbnail-generation-functions-in-php/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 20:06:00 +0000</pubDate>
		<dc:creator>Darsain</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[thumbnail]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.darsain.net/?p=61</guid>
		<description><![CDATA[First, lets take a look on what problem will this tutorial solve, so you can decide if you want to read more :)
We will write 2 functions for creating thumbnails from random image (png, jpg, gif). First function will take thumbnail width and height set by you, and cut the &#8220;most important&#8221; part from the [...]]]></description>
			<content:encoded><![CDATA[<p>First, lets take a look on what problem will this tutorial solve, so you can decide if you want to read more :)</p>
<p>We will write 2 functions for creating thumbnails from random image (png, jpg, gif). First function will take thumbnail width and height set by you, and cut the &#8220;most important&#8221; part from the image (I&#8217;m assuming, that you are creating thumbnails of websites, so center top is the area I&#8217;m talking about) according to thumbnail ratio, and resize it into your thumbnail in exact size that you&#8217;ve set. Second function will take max thumbnail width and height set by you, and resize the image so it will fit your max values, but with preserving its original resolution ratio.</p>
<p><span id="more-61"></span></p>
<h1>1.) Generate thumbnail of exact size</h1>
<p>This function will cut the biggest possible top center of image, so it can be resized into width and height you need without deforming it. The advantage of this method is, taht all thumbnails have same resolution, therefore they can be easily styled on website, and it just looks better. Disadvantage is, that sometimes, it could cut the important part of image.<br />
For better understanding, click on the image below.</p>
<p><a href="http://blog.darsain.net/wp-content/uploads/2009/10/thumb-cut-explanation.jpg" title="thumb-cut-explanation" rel="lightbox[61]"><img src="http://blog.darsain.net/wp-content/uploads/2009/10/thumb-cut-explanation-560x253.jpg" alt="thumb-cut-explanation" title="thumb-cut-explanation" width="560" height="253" class="alignleft size-large wp-image-62" /></a></p>
<p>Lets define the function:</p>
<p><strong>create_thumb( string <em>$source_path</em>, string <em>$destination_path</em>, int <em>$thumb_width</em>, int <em>$thumb_height</em> [, int <em>$quality</em> [, int <em>$overwrite</em>]] )</strong></p>
<h3>Parameters:</h3>
<ul>
<li><strong>$source_path</strong>: Path to source image (jpg, jpeg, png, gif).</li>
<li><strong>$destination_path</strong>: Thumbnail destination path. It has to have *.jpg extension, as all thumbnails will be generated in jpg.</li>
<li><strong>$thumb_width</strong>: Final thumbnail width.</li>
<li><strong>$thumb_height</strong>: Final thumbnail height.</li>
<li><strong>$quality</strong>: JPG compression quality (bigger: better quality,larger file). Range 0-100 (optimal 85).</li>
<li><strong>$overwrite</strong>: Set as true if you wan this function to overwrite thumbnail if it already exists.</li>
</ul>
<p>Lets start with code. I&#8217;m lazy to comment every line, so I&#8217;ll just paste the whole function with comments in code :) Also, I was asked about cut size and coordinates calculation, but I don&#8217;t know what is there to explain. If you suck in math,  than just copy paste it and live your miserable life :)</p>
<pre class="brush: php;">
function create_thumb( $source_path, $destination_path, $thumb_width, $thumb_height, $quality=85, $overwrite=true ) {

    // If overwrite is set to FALSE and destination file allready exists, than return FALSE and quit execution
    if( file_exists( $destination_path ) &amp;&amp; is_file( $destination_path ) &amp;&amp; $overwrite == false ) return false;

    // Needed definitions
    $allowed_extensions = array( 'jpg', 'jpeg', 'png', 'gif' );

    $pathinfo = pathinfo( $source_path );

    // Check if source file exists, and is in array of allowed extensions.
    // Otherwise return FALSE
    if( file_exists( $source_path ) &amp;&amp; in_array( strtolower( $pathinfo['extension'] ), $allowed_extensions ) )
    {

      // Get needed data about source image
      list( $original_width, $original_height, $type, $attr ) = getimagesize( $source_path );

      // Calculate cut size and coordinates
      $thumb_ratio = $thumb_width / $thumb_height;
      $original_ratio = $original_width / $original_height;

      if( $thumb_ratio &gt; $original_ratio )
      {

          $cut_width  = $original_width;
          $cut_height = ( $original_width * $thumb_height ) / $thumb_width;

          $cut_x = 0;
          $cut_y = 0;

      }
      elseif( $thumb_ratio &lt; $original_ratio )
      {

          $cut_width  = ( $original_height * $thumb_width ) / $thumb_height;
          $cut_height = $original_height;

          $cut_x = ( $original_width - $cut_width ) / 2;
          $cut_y = 0;

      }
      else
      {

          $cut_width  = $original_width;
          $cut_height = $original_height;

          $cut_x = 0;
          $cut_y = 0;

      }

      // Create final image layout
      $final_image = imagecreatetruecolor( $thumb_width, $thumb_height );

      // Is gif
      if( $pathinfo['extension'] == 'gif' )
      {
      	$source_image = imagecreatefromgif( $source_path );
      }
      // Is png
      elseif( $pathinfo['extension'] == 'png' )
      {
      	$source_image = imagecreatefrompng( $source_path );
      }
      // Is jpg, jpeg
      else
      {
      	$source_image = imagecreatefromjpeg( $source_path );
      }

      // Cut, resize source, and create final image
      imagecopyresampled( $final_image, $source_image, 0, 0, $cut_x, $cut_y, $thumb_width, $thumb_height, $cut_width, $cut_height );

      // Return TRUE if the thumbnail was created. Otherwise FALSE
      if ( imagejpeg( $final_image, $destination_path, $quality ) )
      {
        return true;
      }
      else
      {
        return false;
      }

    }
    else
    {
      return false;
    }

}
</pre>
<p>As you may notice, this function will always create a .jpg image. You can easily modify that to generate the same image type as source, but .jpg is simply the best choice for thumbnail, and it is not creating such mess on ftp as various image types. (If you are uploading animated gif, the first frame will be your thumbnail)</p>
<h1>1.) Generate thumbnail by original image resolution ratio</h1>
<p>This function will generate a thumbnail, which will fit into max thumbnail width and max height set by you, but also it will preserve the resolution image ratio of original, so it will be not deformed. Advantages and disadvantages of this method are exact opposite of previous one. Whole image is preserve in minified version, but on website, it could looks awful. Depends on how and where you are planning to use these thumbnails.<br />
For better understanding, click on the image below.</p>
<p><a href="http://blog.darsain.net/wp-content/uploads/2009/10/thumb-ratio-cut-explanation.jpg" title="thumb-ratio-cut-explanation" rel="lightbox[61]"><img src="http://blog.darsain.net/wp-content/uploads/2009/10/thumb-ratio-cut-explanation-560x253.jpg" alt="thumb-ratio-cut-explanation" title="thumb-ratio-cut-explanation" width="560" height="253" class="alignleft size-large wp-image-63" /></a></p>
<p>Definition and parameters are exactly same, just function is called <strong>create_ratio_thumb</strong>. Differences are highlighted.</p>
<pre class="brush: php; highlight: [19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,46,65];">
function create_ratio_thumb( $source_path, $destination_path, $thumb_width, $thumb_height, $quality=85, $overwrite=true ) {

    // If overwrite is set to FALSE and destination file allready exists, than return FALSE and quit execution
    if( file_exists( $destination_path ) &amp;&amp; is_file( $destination_path ) &amp;&amp; $overwrite == false ) return false;

    // Needed definitions
    $allowed_extensions = array( 'jpg', 'jpeg', 'png', 'gif' );

    $pathinfo = pathinfo( $source_path );

    // Check if source file exists, and is in array of allowed extensions.
    // Otherwise return FALSE
    if( file_exists( $source_path ) &amp;&amp; in_array( strtolower( $pathinfo['extension'] ), $allowed_extensions ) )
    {

      // Get needed data about source image
      list( $original_width, $original_height, $type, $attr ) = getimagesize( $source_path );

      // Calculate final thumbnail resolution
      $thumb_ratio = $thumb_width / $thumb_height;
      $original_ratio = $original_width / $original_height;

      if( $thumb_ratio &gt; $original_ratio )
      {

          $final_width  = round( ( $thumb_height * $original_width) / $original_height );
          $final_height = $thumb_height;

      }
      elseif( $thumb_ratio &lt; $original_ratio )
      {

          $final_width  = $thumb_width;
          $final_height = round( ( $thumb_width * $original_height ) / $original_width );

      }
      else
      {

          $final_width  = $thumb_width;
          $final_height = $thumb_height;

      }

      // Create final image layout
  		$final_image = imagecreatetruecolor( $final_width, $final_height );

  		// Is gif
  		if( $pathinfo['extension'] == 'gif' )
  		{
  			$source_image = imagecreatefromgif( $source_path );
  		}
  		// Is png
  		elseif( $pathinfo['extension'] == 'png' )
  		{
  			$source_image = imagecreatefrompng( $source_path );
  		}
  		// Is jpg, jpeg
  		else
  		{
  			$source_image = imagecreatefromjpeg( $source_path );
  		}

  		// Resize source, and create the final image
  		imagecopyresampled( $final_image, $source_image, 0, 0, 0, 0, $final_width, $final_height, $original_width, $original_height );

      // Return TRUE if the thumbnail was created. Otherwise FALSE
      if ( imagejpeg( $final_image, $destination_path, $quality ) )
      {
        return true;
      }
      else
      {
        return false;
      }

    }
    else
    {
      return false;
    }

}
</pre>
<p>And that would be our tutorial on creating thumbnails :) Check out the demo, where you can try to generate thumbnail from your own image, or download the tutorial files. (and don&#8217;t forget to set chmod 0777 to destination folder)</p>
<a href="http://blog.darsain.net/?file_id=7" class="download-item">
  <img src="http://blog.darsain.net/wp-content/plugins/downloads-manager/img/icons/external.png" alt="icon">
  <h3>Demo presentation</h3>
  <span></span> <span>355x</span>
</a> <a href="http://blog.darsain.net/?file_id=8" class="download-item">
  <img src="http://blog.darsain.net/wp-content/plugins/downloads-manager/img/icons/archive.png" alt="icon">
  <h3>Tutorial files</h3>
  <span>10.30KB</span> <span>214x</span>
</a>
]]></content:encoded>
			<wfw:commentRss>http://blog.darsain.net/61/thumbnail-generation-functions-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New free web template: Dark Lineage</title>
		<link>http://blog.darsain.net/59/new-free-web-template-dark-lineage/</link>
		<comments>http://blog.darsain.net/59/new-free-web-template-dark-lineage/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 11:06:15 +0000</pubDate>
		<dc:creator>Darsain</dc:creator>
				<category><![CDATA[Freebies]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://blog.darsain.net/?p=59</guid>
		<description><![CDATA[As I&#8217;ve mentioned in the last article, I&#8217;ve found two old PSD files, which could be used as freebies for you. The first one was already released MMO icons, and second one is the &#8220;Dark Lineage&#8221; web template. I really hope, that this one is my last work around Lineage 2 theme. I&#8217;m kinda sick [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;ve mentioned in the last article, I&#8217;ve found two old PSD files, which could be used as freebies for you. The first one was already released MMO icons, and second one is the &#8220;Dark Lineage&#8221; web template. I really hope, that this one is my last work around Lineage 2 theme. I&#8217;m kinda sick of it by now :)</p>
<p><span id="more-59"></span></p>
<h2>Preview:</h2>
<p><a href="http://blog.darsain.net/wp-content/uploads/2009/10/Dark-Lineage.jpg" title="Dark-Lineage" rel="lightbox[59]"><img src="http://blog.darsain.net/wp-content/uploads/2009/10/Dark-Lineage-560x425.jpg" alt="Dark-Lineage" title="Dark-Lineage" width="560" height="425" class="alignleft size-large wp-image-60" /></a></p>
<a href="http://blog.darsain.net/?file_id=5" class="download-item">
  <img src="http://blog.darsain.net/wp-content/plugins/downloads-manager/img/icons/archive.png" alt="icon">
  <h3>Template files</h3>
  <span>7.65KB</span> <span>266x</span>
</a> <a href="http://blog.darsain.net/?file_id=6" class="download-item">
  <img src="http://blog.darsain.net/wp-content/plugins/downloads-manager/img/icons/photoshop.png" alt="icon">
  <h3>PSD files</h3>
  <span>7.65KB</span> <span>201x</span>
</a>
]]></content:encoded>
			<wfw:commentRss>http://blog.darsain.net/59/new-free-web-template-dark-lineage/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Free MMORPG games icons</title>
		<link>http://blog.darsain.net/57/free-mmorpg-games-icons/</link>
		<comments>http://blog.darsain.net/57/free-mmorpg-games-icons/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 14:41:48 +0000</pubDate>
		<dc:creator>Darsain</dc:creator>
				<category><![CDATA[Freebies]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[icons]]></category>
		<category><![CDATA[mmorpg]]></category>

		<guid isPermaLink="false">http://blog.darsain.net/?p=57</guid>
		<description><![CDATA[Recently, I&#8217;ve found two a bit older PSD files, that can be used on free stuff for you guys :) The first one is pack of MMO games icons in resolution of 132 x 132 pixels. I&#8217;ll be glad, if you&#8217;ll find it useful, but remember: MMO games are killers of real life, which is [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I&#8217;ve found two a bit older PSD files, that can be used on free stuff for you guys :) The first one is pack of MMO games icons in resolution of 132 x 132 pixels. I&#8217;ll be glad, if you&#8217;ll find it useful, but remember: MMO games are killers of real life, which is way better than any virtual reality ;) Don&#8217;t waste too much time in there, all right? :)</p>
<p><span id="more-57"></span></p>
<h2>Preview:</h2>
<p><a href="http://blog.darsain.net/wp-content/uploads/2009/10/Untitled-1.jpg" title="Untitled-1" rel="lightbox[57]"><img src="http://blog.darsain.net/wp-content/uploads/2009/10/Untitled-1.jpg" alt="Untitled-1" title="Untitled-1" width="528" height="264" class="alignleft size-full wp-image-58" /></a></p>
<h2>Downloads:</h2>
<a href="http://blog.darsain.net/?file_id=3" class="download-item">
  <img src="http://blog.darsain.net/wp-content/plugins/downloads-manager/img/icons/archive.png" alt="icon">
  <h3>15 Icons pack</h3>
  <span>7.67KB</span> <span>170x</span>
</a> <a href="http://blog.darsain.net/?file_id=4" class="download-item">
  <img src="http://blog.darsain.net/wp-content/plugins/downloads-manager/img/icons/photoshop.png" alt="icon">
  <h3>PSD source file</h3>
  <span>7.65KB</span> <span>186x</span>
</a>
]]></content:encoded>
			<wfw:commentRss>http://blog.darsain.net/57/free-mmorpg-games-icons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Darsain.net update, and new templates policy!</title>
		<link>http://blog.darsain.net/49/darsain-net-update-and-new-templates-policy/</link>
		<comments>http://blog.darsain.net/49/darsain-net-update-and-new-templates-policy/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 17:15:23 +0000</pubDate>
		<dc:creator>Darsain</dc:creator>
				<category><![CDATA[Darsain network]]></category>
		<category><![CDATA[Freebies]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[Webdesign]]></category>

		<guid isPermaLink="false">http://blog.darsain.net/?p=49</guid>
		<description><![CDATA[After starting up a blog, I&#8217;ve decided to cancel site news, as this is where I&#8217;ll be informing about big updates on the main website. Therefore, a slight mainpage change was needed. Recent works were transformed into slideshow, new CMS function, which you couldn&#8217;t care less :) But the biggest new thing is the new [...]]]></description>
			<content:encoded><![CDATA[<p>After starting up a blog, I&#8217;ve decided to cancel site news, as this is where I&#8217;ll be informing about big updates on the main website. Therefore, a slight mainpage change was needed. Recent works were transformed into slideshow, new CMS function, which you couldn&#8217;t care less :) But the biggest new thing is the new Templates policy, which is &#8211; <strong>Everything is for FREE!</strong></p>
<p><span id="more-49"></span></p>
<p>The templates count is a bit lower (as much of them sucked,&#8230; the others suck just a little bit less :) ), some of them probably can&#8217;t be used at all (SMF templates, because they are for old forum versions ), but there are some yeah-its-all-right-i-guess ones either, so, check it out, it will not hurt you :)</p>
<h3>List of free web templates:</h3>
<ul>
<li>Perfect World</li>
<li>Lineage 2 Vampire</li>
<li>Lineage 2 Van Halisha</li>
<li>Atmosph</li>
<li>Ragnarok SMF</li>
<li>Health</li>
<li>Lineage 2 Crossroader</li>
<li>Lineage 2 &#8211; SMF</li>
<li>Lineage 2 &#8211; Orbis Unum</li>
</ul>
<p>You can download them here: <a href="http://www.darsain.net/index.php?act=browse&#038;section=2">Darsain.net &#8211; Templates</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.darsain.net/49/darsain-net-update-and-new-templates-policy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple animated toggle with jQuery</title>
		<link>http://blog.darsain.net/38/simple-animated-toggle-with-jquery/</link>
		<comments>http://blog.darsain.net/38/simple-animated-toggle-with-jquery/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 20:11:00 +0000</pubDate>
		<dc:creator>Darsain</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[animated toggle]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.darsain.net/?p=38</guid>
		<description><![CDATA[We all know about jQuery. Powerful and very popular JavaScript framework with many useful and great plugins. But the variety of plugins has created one bad behavior among webdevelopers. When they need to create some effect, or function, they are often looking for solution in plugins, instead of trying to do that on their own. [...]]]></description>
			<content:encoded><![CDATA[<p>We all know about jQuery. Powerful and very popular JavaScript framework with many useful and great plugins. But the variety of plugins has created one bad behavior among webdevelopers. When they need to create some effect, or function, they are often looking for solution in plugins, instead of trying to do that on their own. This simple search for simplified coding is creating mess in code, and forcing you to compromises in your layout, styling, or even website design. In this tutorial, we will create few lines of code, that can replace very popular plugin called Animated Collapsible DIV, or most of the plugins creating tabs.</p>
<p><span id="more-38"></span></p>
<a href="http://blog.darsain.net/?file_id=1" class="download-item">
  <img src="http://blog.darsain.net/wp-content/plugins/downloads-manager/img/icons/external.png" alt="icon">
  <h3>Demo presentation</h3>
  <span></span> <span>474x</span>
</a> <a href="http://blog.darsain.net/?file_id=2" class="download-item">
  <img src="http://blog.darsain.net/wp-content/plugins/downloads-manager/img/icons/archive.png" alt="icon">
  <h3>Tutorial files</h3>
  <span>24.93KB</span> <span>247x</span>
</a>
<p>First, we need to decide, how the animation will be triggered, and by what object. I&#8217;ve choose the solution of creating your own attributes (yeah, now you can&#8217;t masturbate over 100% W3C validation result you hypocritical bastard ;)), so the triggering object can be almost any tag. Animation will start after click on any object with my custom attribute &#8220;toggle&#8221;, and animated will be object with id equals toggle value. The whole HTML will look like this:</p>
<pre class="brush: xml;">
&lt;a href=&quot;#&quot; toggle=&quot;myObject&quot;&gt;Click me&lt;/a&gt;

&lt;div id=&quot;myObject&quot;&gt;
content ...
&lt;/div&gt;
</pre>
<p>Easy, huh? And as I already wrote, you can add this custom attribute to any object, like this:</p>
<pre class="brush: xml;">
&lt;a href=&quot;#&quot; toggle=&quot;myObject&quot;&gt;Click me&lt;/a&gt;
&lt;div toggle=&quot;myObject&quot;&gt;Click me&lt;/div&gt;
&lt;span toggle=&quot;myObject&quot;&gt;Click me&lt;/span&gt;
&lt;h1 toggle=&quot;myObject&quot;&gt;Click me&lt;/h1&gt;

&lt;div id=&quot;myObject&quot;&gt;
content ...
&lt;/div&gt;
</pre>
<p>All objects with attribute &#8220;toggle&#8221;, which is addressing to triggered object ID, are live buttons now.</p>
<p><strong><em>&#8220;But, what if I need to show one object, but close few others with some group, or something?&#8221;</em></strong></p>
<p>Nothing can be easier. We can add to targeted object another custom attribute called &#8220;group&#8221;, and give it the name of group as a value, so all the objects with this group will slide up, when another object is sliding down. Here is the HTML:</p>
<pre class="brush: xml;">
&lt;a href=&quot;#&quot; toggle=&quot;bread1&quot;&gt;I want some bread&lt;/a&gt;

&lt;div id=&quot;bread&quot; group=&quot;breakfast&quot;&gt;
content ...
&lt;/div&gt;

&lt;a href=&quot;#&quot; toggle=&quot;bread2&quot;&gt;What about milk?&lt;/a&gt;

&lt;div id=&quot;milk&quot; group=&quot;breakfast&quot;&gt;
content ...
&lt;/div&gt;
</pre>
<p>So, now, when we know how we want this to work, we can jump to creating our jQuery snippet.<br />
We need to trigger the click() function, when any object with the attribute &#8220;toggle&#8221; is clicked.</p>
<pre class="brush: jscript;">
$(&quot;[toggle]&quot;).click( function() {

});
</pre>
<p>Now, we need to define some variables to work with. Read the descriptions next to them.</p>
<pre class="brush: jscript;">
$(&quot;[toggle]&quot;).click( function() {

  var targetObjId = $(this).attr(&quot;toggle&quot;); // get the ID of targeted object from &quot;toggle&quot; attribute value
  var targetObj = $(&quot;[id=&quot;+targetObjId+&quot;]&quot;); // find and target the needed object into variable
  var targetObjGroup = $(targetObj).attr(&quot;group&quot;); // check, if tehre is any group reference on targeted object

});
</pre>
<p>We have our variables, so lets do some magic and finish the snippet. Again, read the comments in code.</p>
<pre class="brush: jscript;">
$(&quot;[toggle]&quot;).click( function() {

  var targetObjId = $(this).attr(&quot;toggle&quot;);
  var targetObj = $(&quot;[id=&quot;+targetObjId+&quot;]&quot;);
  var targetObjGroup = $(targetObj).attr(&quot;group&quot;);

  if( targetObjGroup ) // if there is some reference to group, run this
  {
      $(&quot;[group=&quot;+targetObjGroup+&quot;]&quot;).not(targetObj).slideUp(); // slide up (hide) all objects with refered group, but not our targetObj
      $(targetObj).slideDown(); // slide down (animated show function) our targetObj
  }
  else // if  there is no reference for group, run this
  {
      if( $(targetObj).is(&quot;:hidden&quot;) ) $(targetObj).slideDown(); // if our targetObj is hidden, slide him down
      else $(targetObj).slideUp(); // in other case, slide him up
  }

  return false; // in case that triggering object is an &lt;a&gt; tag, we don't want to href=&quot;&quot; got executed by browser

});
</pre>
<p>And thats it. This 19 lines of code can simply replace the whole Animated Collapsible DIV plugin. Interesting huh?</p>
<p>But this is not over yet :) In case, that you want to use this snippet as a tabs switcher, you have to do some changes, but you want to leave this snipped like it is, so simply copy paste it, and change the attribute to &#8220;showtab&#8221;. Here is the new snipped, with highlighted lines and explanations.</p>
<pre class="brush: jscript; highlight: [1,3,9,10,14,15];">
$(&quot;[showtab]&quot;).click( function() { // changed attribute

  var targetObjId = $(this).attr(&quot;showtab&quot;); // changed attribute
  var targetObj = $(&quot;[id=&quot;+targetObjId+&quot;]&quot;);
  var targetObjGroup = $(targetObj).attr(&quot;group&quot;);

  if( targetObjGroup )
  {
      $(&quot;[group=&quot;+targetObjGroup+&quot;]&quot;).not(targetObj).hide(); // in case of hiding tab, we don want to animate sliding, so it wouldn't mess with height of surrounding elements
      $(targetObj).fadeIn(); // fadeIn() animation is way better in tabs switching
  }
  else
  {
      if( $(targetObj).is(&quot;:hidden&quot;) ) $(targetObj).fadeIn(); // in case, that there is only one tab, just toggle it
      else $(targetObj).fadeOut();
  }

  return false;

});
</pre>
<p>If you need to change style of triggering button after click, just create a css class called &#8220;active&#8221; with needed changes, and toggle this class to button after if().</p>
<pre class="brush: jscript;">
$(&quot;[toggle]&quot;).click( function() {

  var targetObjId = $(this).attr(&quot;toggle&quot;);
  var targetObj = $(&quot;[id=&quot;+targetObjId+&quot;]&quot;);
  var targetObjGroup = $(targetObj).attr(&quot;group&quot;);

  if( targetObjGroup )
  { ... }
  else
  { ... }

  $(this).toggleclass('active'); // &lt;- thats what I'm talking about

  return false;

});
</pre>
<p>Or add this class with addclass(), and remove with removeclass() whenever in code you need.</p>
<p>I hope, that this tutorial will be useful for someone, and remember: Try to create some functions &#038; features yourself before finding the solution among plugins. That way, you will gain more experience, and know-hows.</p>
<p>As bonus, here are 2 simple snippets for &#8220;show&#8221; and &#8220;hide&#8221; attributes, for better understanding.</p>
<pre class="brush: jscript;">
$(&quot;[show]&quot;).click( function() {

  var targetObjId = $(this).attr(&quot;show&quot;);
  var targetObj = $(&quot;[id=&quot;+targetObjId+&quot;]&quot;);

  $(targetObj).slideDown();

});

$(&quot;[hide]&quot;).click( function() {

  var targetObjId = $(this).attr(&quot;hide&quot;);
  var targetObj = $(&quot;[id=&quot;+targetObjId+&quot;]&quot;);

  $(targetObj).slideUp();

});
</pre>
<p>If you have any questions, do not hesitate to ask. Comments are always welcome.</p>
<a href="http://blog.darsain.net/?file_id=1" class="download-item">
  <img src="http://blog.darsain.net/wp-content/plugins/downloads-manager/img/icons/external.png" alt="icon">
  <h3>Demo presentation</h3>
  <span></span> <span>474x</span>
</a> <a href="http://blog.darsain.net/?file_id=2" class="download-item">
  <img src="http://blog.darsain.net/wp-content/plugins/downloads-manager/img/icons/archive.png" alt="icon">
  <h3>Tutorial files</h3>
  <span>24.93KB</span> <span>247x</span>
</a>
]]></content:encoded>
			<wfw:commentRss>http://blog.darsain.net/38/simple-animated-toggle-with-jquery/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
