April 29, 2012 Design , Icons no responses # , ,

350 Pixel-Perfect And Free Glyphs Icons In PSD

An amazing set of free glyph icons (350 icons), comes as a single PSD file where each item can be scaled to any size without loss of quality.

Such a huge set includes almost any item an application needs from actions to charts or documents.

This icon set is free for both personal and commercial usage.

Website: http://brankic1979.com/icons/
Author: Brankic1979 (small design/dev team mostly focused on WordPress theme development)

April 28, 2012 Development no responses # , ,

301 .htaccess Redirect

To prevent getting 404 File Not Found error (traffic coming from links, bookmarks and search engines) when URLs and paths on site have changed, I use .htaccess 301 redirect. Htaccess redirect is better than the meta refresh or redirect tag because there is no delay as the browser reads the .htaccess file first. Here is how it works.

Go to your site’s root folder, download the .htaccess file to your local computer and edit it with a plain-text editor (ie. Notepad). If you are using FTP Client software and you don’t see any .htaccess file on your server, double check your setting and make sure you have turn on invisible / system files.

To Redirect Certain Page(s):

Redirect 301 /oldpage.html http://www.yoursite.com/newpage.html<br />
Redirect 301 /oldpage2.html http://www.yoursite.com/folder/<br />

To Redirect Entire Site:

Redirect 301 / http://www.new-site.com/<br />

Redirect with dynamic parameters

For example redirecting http://www.domain.com/brands/sony/sonys-new-s-frames-with-avchd-video-playback/ to http://www.domain.com/sony/sonys-new-s-frames-with-avchd-video-playback/

RewriteRule ^(.*)brands/([a-z_A-Z0-9\\-]+)/([a-z_A-Z0-9\\-]+)/$ http://%{HTTP_HOST}/$2/$3/ [R=301,L]
OR
RewriteRule ^(.*)([a-z_A-Z0-9\\-]+)/([a-z_A-Z0-9\\-]+)/([a-z_A-Z0-9\\-]+)/$ http://%{HTTP_HOST}/$2/$3/ [R=301,L]
December 13, 2011 How To's , SEO no responses #

301 Redirect from non-www to www

Do you want to improve your search engine rankings? SEO gurus told you that Google might be penalizing you for duplicate content? How did you get duplicate content, you ask? Unless you specify otherwise, we send www.yourdomain.com and yourdomain.com to the same place. Which is great because some clients automatically add a WWW to every url they type, and others almost never add www even if you tell them to. This way they end up at the correct page, regardless of what else they’ve included in their url.
The problem is that if people are linking to you sometimes with a www and sometimes without, spiders may think you’re trying to get away with publishing the same information twice. So some SEO experts have recommend you create a 301 redirect to send all non-www links to www.
You try it, and to your horror, the page now loops through so many redirect iterations that the site won’t display at all. Or, you try the common syntax and it messes up all your subdomains.
There is hope. Here is a 301 redirect syntax that does not loop, and does not affect your subdomains either.

Continue reading

December 6, 2011 PHP no responses # , ,

Calculate the size, count files & folders of a directory with PHP

Here a PHP Class that calculates the size, number of files & folders of a specific directory.

Continue reading

December 5, 2011 PHP no responses # ,

How to remove a directory and it’s content using PHP

Was recently working on a project where needed to delete a folder and its sub-folders and files. Here is a snippet that can help you to remove a non-empty directory from the server. It’s a recursive function that deletes the directory with its files, folders and sub-folders.
Continue reading

November 30, 2011 JavaScript , jQuery no responses # ,

jQuery: Setting cookies

Setting and clearing cookies with jQuery is really easy but it’s not included in the jQuery core and requires a plug-in. This post shows how to set, get the value of and clear cookies with jQuery.

Continue reading

November 26, 2011 PHP no responses # ,

Easily create a Zip file using PHP

Creating .ZIP archives using PHP can be just as simple as creating them on your desktop. PHP’s ZIP class provides all the functionality you need! To make the process a bit faster for you, I’ve coded a simple create_zip function for you to use on your projects.
Continue reading

November 25, 2011 CSS no responses #

CSS Compression

Method One

This method involves adding a small PHP script to your CSS document and replacing its 

.css

 extension with a 

.php

 extension.

Place the following PHP script into the top of the CSS document that you wish to compress. Then change the 

.css

 extension to 

.php

, to arrive at something similar to: 

compressed-css.php

. Remember to use the new name when referencing the file.

Continue reading

November 25, 2011 PHP no responses # , ,

Fast, Effective PHP Compression With .htaccess

PHP compression is an excellent method of conserving bandwidth and reducing client download times. We have already discussed an excellent method for CSS compression, and in this article we share a super-easy technique for compressing all PHP content without editing a single file.

Using two PHP files and two corresponding lines of

.htaccess

, it is possible to compress your PHP files via gzip-encoding. Browsers and other user-agents capable of interpreting gz-encoded data will employ the compressed content, while other user-agents will utilize the content uncompressed.

Before we begin, it is important to determine if your server employs output buffering. If so, it may not be necessary to compress content via this method. Also, this PHP compression technique requires PHP version 4.0.5 or better.
Continue reading

November 25, 2011 JavaScript no responses # ,

Simple JavaScript API : Countdown JS

Countdown.js  – A simple JavaScript API for producing an accurate, intuitive description of the timespan between two Date instances.

The library calculates the value continuously considering “the time goes on” and keeps generating an accurate output. It can provide the timespan in many formats like milliseconds, seconds, minutes, hours, days, weeks and even millennias.

There are methods for displaying it as an English sentence like “3 years, 6 months, 21 days, 10 hours, and 32 minutes”.

The countdown can be reset easily and there are callbacks both on 

start

and 

end

.

Website: http://countdownjs.org/
Demo: http://countdownjs.org/demo.html

1 14 15 16 17 18 19 20
Stay In Touch