Tag Archive

Use PHP to Create Symbolic Links without Shell Access

On Unix systems, a symbolic link refers to a file that points to another file or directory. Symbolic links serve as powerful tools for web designers and developers. Using shell access, creating a symbolic link requires only one line of code: ln -s /home/username/public_html/directory1 /home/username/public_html/directory2 Simple enough. Assuming you have access to the linux shell. Unfortunately, many shared hosting environments deny shell access. Fortunately, creating symbolic links — also called “symlinks” — remains a possibility via the PHP symlink() function. Check it out.. Read more »

SEO 101: Best Practices

After studying Peter Kent’s excellent book, Search Engine Optimization for Dummies, several key methods emerged for optimizing websites for the search engines. Although the book is written for people who are new to the world of search engine optimization (SEO), many of the principles presented throughout the book remain important, fundamental practices even for the most advanced SEO-wizards. This article divulges these very useful SEO practices and organizes them into manageable chunks 1. Text Essentials The golden rule for developing a popular website is to create a useful site and share it with as many people as possible. When designing […] Read more »

Go Back via JavaScript and PHP

Use this simple code as a button that will return users to the previous page: <form> <input type=”button” value=”Return to previous page” onClick=”javascript:history.go(-1)” /> </form> Here it is as a simple text link: <p> <a href=”javascript:history.go(-1)” title=”Return to the previous page”>&laquo; Go back</a> </p> You can make things easier by serving PHP and printing the link automatically. Here is the button link: echo “<form><input type=\”button\” value=\”Return to previous page\” onClick=\”javascript:history.go(-1)\”></form>”; And here is the PHP code to print a "Go back" text link: echo “<p><a href=\”javascript:history.go(-1)\” title=\”Return to previous page\”>&laquo; Go back</a></p>”; Better yet, you can kick the accessibility factor […] Read more »

Embed Flash and Video via the object Tag

Embed Windows Media Player via the object tag Here is the general format for including .wmv files in web pages: <object type=”video/x-ms-wmv” data=”” width=”340″ height=”280″> <param name=”src” value=”” /> <param name=”controller” value=”true” /> <param name=”autostart” value=”true” /> </object> Read more »

Maximum and Minimum Height and Width in Internet Explorer

Behold the seventh wonder of the virtual world: max/min-height and max/min-width properties are possible in Internet Explorer! Indeed, by taking advantage of IE’s proprietary CSS attribute, expression, you too can whip IE widths and heights into desirable proportions. The CSS expression attribute enables JavaScript commands to be executed within Internet Explorer. JavaScript via CSS? Thanks, Microsoft! Why is this so great? Well, because in other, standards-compliant browsers, max/min-height and max/min-width properties are easily accomplished with this simple bit of CSS.. Read more »

Rename the Recycle Bin in WinXP

To rename the Recycle Bin in Windows XP, create a new text.txt file in your favorite directory and add the following lines: REGEDIT4 [HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder] “Attributes”=hex:50,01,00,20″CallForAttributes”=dword:00000000 Next, rename the file extension from ".txt" to ".reg" — the other part of the file name may be whatever you prefer (e.g., RecycleBin.reg). Then, double-click the file to have Windows import it into the Registry. Now go right-click your Recycle Bin and use the new option to Rename it. To remove renaming functionality for the Recycle Bin, replicate the same file you created initially, and replace the last line (i.e., the third line) with […] Read more »

Industrial-Strength Spamless Email Links

In our previous article on creating spamless email links via JavaScript, the presented method, although relatively simple to implement, is not the most effective solution available. Spambots, email harvesters, and other online scumbags relentlessly advance their scanning technology, perpetually rendering obsolete yesterday’s methods. In the case of spamless email links created client-side via JavaScript, many spambots now are able to decipher certain email addresses hidden within the JavaScript code itself. Spambots scan JavaScript for keywords such as "email" or "mail", or even character strings containing ".com" or the "@" symbol. Spambots collect and decipher such data and return the favor […] Read more »

Keep it Dark: Hiding and Filtering CSS

Hiding and filtering CSS rules for specifically targeted browsers is often a foregone conclusion when it comes to cross-browser design considerations. Rather than dive into some lengthy dialogue concerning the myriad situations and implications of such design hackery, our current scheduling restraints behoove us to simply cut to the chase and dish the goods. Having said that, we now consider this post a perpetually evolving repository of CSS filters.. Read more »

Delete index.dat on Windows 98SE

This brief tutorial on removing (and replacing) the "index.dat" file applies to any Windows OS running on MS-DOS. Although I haven’t researched this officially, it appears that all Windows versions released prior to Windows 2000 are running on the 16-bit MS-DOS kernel. Conversely, Win2000 and WinXP operate on a 32-bit kernel and thus do not utilize MS-DOS. Thus, this method focuses on removing the index.dat from machines running Windows 95, 98, and 98SE. As you may be aware, Internet Explorer utilizes a file called "index.dat". The index.dat file serves a log that documents every domain visited through Internet Explorer. Deleting […] Read more »

Path to Outlook Express Files on WinXP

Trying to backup your Outlook Express .dbx files on Windows XP may prove difficult if you can’t find them. Well, fret no more, my friend. Here is the generalized path to the Outlook Express folder, which contains all of the .dbx files for a particular user. Copy, paste, and shortcut: C:\Documents and Settings\[username]\Local Settings\Application Data\Identities\{12345678-1234-ABCD-EFGH-1234567890AB}\Microsoft\Outlook Express * [username] = each user will should have their set of .dbx files. * {12345678-1234-ABCD-EFGH-1234567890AB} = represents a unique alphanumeric string. Read more »

Embed External Content via iframe and div

By using an <iframe></iframe> within a <div></div>, it is possible to include external web content in most any web document. This method serves as an excellent alternative to actual frames, which are not as flexible and definitely not as popular. Indeed, with CSS, the placement, sizing, and styling of div’s provides endless possibilities for embedding external or even internal web content into pages that would otherwise require the use of frames, Flash, or JavaScript. This method works on any modern browser, as well as any old browser that understands both <div></div> and <iframe></iframe> tags. Simply add the following code to […] Read more »

Auto-Focus Form Elements with JavaScript

After digging through the WordPress source code, I stumbled upon this very useful JavaScript method for auto-focusing form elements upon page load. Here is the JavaScript code (place within the document head): <script type=”text/javascript”> function formfocus() { document.getElementById(‘element’).focus(); } window.onload = formfocus; </script> …and corresponding (X)HTML markup (abbreviated for clarity): <form> <input id=”element” /> <input /> <input /> </form> In this example, the first form element (identified by id=”element”) will be automatically focused when the document loads, thus facilitating the process of entering data in the form. This technique would serve users well on login pages (wink, wink;), or anywhere […] Read more »

Roll your own Apache Rewrite Log

Roll your own Apache Rewrite log! Rocking your own rewrite log is super-helpful for testing .htaccess rewrite rules, WordPress permalinks, etc. For more information, check the source. Rewrite log via http.conf Twist one up via the Apache configuration file by placing this code at the foot of your http.conf (remember to edit the path): # Roll your own Rewrite log # Log details via scale of 1 to 9 # 1 = few details, 5 = enough details, 9 = too much detail RewriteEngine On RewriteLog “/absolute/path/to/your/wwwroot/public_html/rewrite.log” RewriteLogLevel 5 via htaccess ..doesn’t work. Example Here is an example indicating the […] Read more »

WordPress on Crack: Tips for Faster Post Publishing

Apparently, article posting is painfully slow on 2-ish versions of WordPress. Indeed, we finally got tired of waiting several minutes every time we published, saved, or edited a post. After a bit of research, reading through countless complaints and suggested remedies, several key methods began to emerge. And, after taking the time to implement them, we have definitely enjoyed an substantial decrease in time required to publish, save, or edit posts. Please note that everyone’s site is configured differently. These are the tricks that helped us to speed up publishing, but they may not have the same effect for everyone. […] Read more »

Add RSS Feed Link Icons to WordPress Category Listings

This brief tutorial explains two methods for adding RSS feed link icons to category listings. Let’s say that you have a list of category links, where each link targets a specific category view. Now let’s say that, next to each category link, you would like to provide a icon that links to that particular category’s syndicated feed. So, rather than cluttering up your page with two sets of category links — one for category views and another for category feeds — consolidate links and simplify your site by providing both sets of links in a logical, streamlined format. Method One: […] Read more »

Firefox CSS Magic

Consider this post an evolving receptacle for Firefox-specific CSS tricks. Change the color of highlighted text *::-moz-selection { background: #FF3C00; /* the background color of the highlight */ color: #FFF; /* the color of the text within the highlight */ } Change the opacity of an element div#division { /* choose either attribute */ -moz-opacity: 0.99; /* possible values: 0-1 */ -moz-opacity: 99%; /* possible values: 0%-99% */ } Control item selection of an element div#division { /* choose one of the following values */ -moz-user-select: none; /* no content within the element may be selected */ -moz-user-select: all; /* […] Read more »

Latest Tweets Two excellent tools for optimizing images for the Web: and