New book on WordPress Theme Development: WordPress Themes In Depth
tricks
Tag Archive

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 »

Random Fixinz for Hotmail via Outlook Express

Note: The methods described in this post apply to older versions of Internet Explorer (<6) and Outlook Express (<6), and are provided here for reference purposes only. Fix the "Unable to poll for new messages" error Here is an error message that some Outlook Express users receive when sending or receiving email, or after creating a new email account: Unable to poll for new messages on your HTTP server. Account: ‘Hotmail’ Server: ‘http://services.msn.com/svcs/hotmail/httpmail.asp’ Protocol: HTTPMail Server Response: ‘End tag ‘D:response’ does not match the start tag ‘D:prop’. Port: 0 Secure(SSL): No Error Number: 0xC00CE56D Read more »

Hide Content on Windows 98SE

This brief tutorial on hiding content applies to Windows 95, 98, and 98SE. Although this method may be old hat or even irrelevant, I have found it useful on a number of occasions, and therefore found it worthwhile to include here for the sake of prosperity. On Windows 98SE (and others), it is possible to create a folder that is both listed and inaccessible via the Windows file system. Using an old DOS trick involving an obscure character reference, we create a folder that, when clicked on via Windows, produces a "The File does not Exist" error message, thus denying […] 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 »

Launch Multiple Programs with One Click

Speed up your workflow by launching your favorite programs in one click using batch (.bat) files: Create a folder and add shortcuts to your favorite programs. Rename the shortcuts so that each consists of a single word. Create a text file and change the name to something.bat. Right-click on the .bat ("batch") file and select "Edit". Emulate the following template according to your specific programs. rem comments should begin with rem rem note: this file launches all of my favorite apps! rem note: replace the names below with your own.. @echo off start %SystemRoot%\system32\cmd.exe start firefox http://google.com/ start dreamweaver start […] Read more »

Perishable Press Triple Loop for WordPress

Two of the themes developed by Perishable Press, Apathy and Information, depend on three WordPress loops to operate as intended. For each of these themes, the three loops consist of two "side" loops and one main loop. The side loops each display posts from one specific category, while the main loop displays posts from every category not specified in the side loops. There are many different multi-loop configurations currently available for WordPress users. Needless to say, despite a wide variety of available loop setups, implementing a customized multiple loop frequently requires a great deal of time of energy. Certain loop […] 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 »

Extreme Makeover for Gravatars in WordPress

Strategic Methods for Improving Gravatar Functionality in WordPress Gravatars have become a popular way of adding spice to the "comments" page of many WordPress-powered sites. So popular, in fact, that the gravatar server is often overloaded, bogged down with millions of gravatar requests every second. This immense server load effects user pages everywhere, resulting in slow loading times, unresolved server requests, and missing gravatars. Such broken presentations appear unprofessional, tarnish reputations, and may provoke confusion. This article provides essential solutions for an extreme gravatar makeover.. Read more »

Latest Tweets USP Pro v1.9 now available, many great new features: plugin-planet.com/usp-pro-vers… #wordpress #plugin