Tag: notes

The New Clearfix Method

Posted on December 6, 2009 in Presentation by Jeff Starr

Say goodbye to the age-old clearfix hack and hello to the new and improved clearfix method..

The clearfix hack, or “easy-clearing” hack, is a useful method of clearing floats. I have written about the original method and even suggested a few improvements. The original clearfix hack works great, but the browsers that it targets are either obsolete or well on their way. Specifically, Internet Explorer 5 for Mac is now history, so there is no reason to bother with it when using the clearfix method of clearing floats.

Continue Reading

Pimp Your 404: Presentation and Functionality

Posted on November 2, 2009 in Function, Presentation by Jeff Starr

I have been wanting to write about 404 error pages for quite awhile now. They have always been very important to me, with customized error pages playing a integral part of every well-rounded web-design strategy. Rather than try to re-invent the wheel with this, I think I will just go through and discuss some thoughts about 404 error pages, share some useful code snippets, and highlight some suggested resources along the way. In a sense, this post is nothing more than a giant “brain-dump” of all things 404 for future reference. Hopefully you will find it useful in pimping your own 404.

When requested page is not found by server, error message is returned; this is the essence of the 404 — Ancient Chinese proverb

Continue Reading

Farewell to Alex King’s Popularity Contest Plugin

Posted on June 8, 2009 in WordPress by Jeff Starr

I finally broke down and uninstalled Alex King’s once-great “Popularity Contest” plugin for WordPress.

The plugin had been installed here at Perishable Press for over two years, and had provided fairly consistent and apparently accurate statistics.

Unfortunately, there were serious errors involved with the plugin way back during the WordPress-2.3 upgrade that were never addressed by the plugin author. There was an interim version of the plugin that had patched the error until an official update was released, but sadly and almost two years later this has not happened. I don’t know about you, but I really don’t like running abandoned plugins on my site.

Continue Reading

Monitoring Internet Activity for Windows and Mac

Posted on June 24, 2008 in Technology by Jeff Starr

Monitoring your computer’s Internet activity is a powerful tool, enabling you to:

  • keep an eye on background processes
  • reveal viruses and other malware
  • expose unauthorized access
  • monitor running programs
  • log process activity

..and much more. The best part? It’s super-easy. Here’s how I do it on Windows XP:

  1. Open the command prompt and type “netstat -n 5 > scan.txt
  2. After a minute or two (or any amount of time), press Ctrl+C to stop monitoring
  3. Type “scan.txt” to open the log file and check the results

Continue Reading

WordPress Tip: Careful with that Autosave, Eugene

Posted on March 17, 2008 in WordPress by Jeff Starr

After upgrading WordPress from version 2.0.5 to 2.3.3, I did some experimenting with the “post autosave” feature. The autosave feature uses some crafty ajax to automagically save your post every 2 minutes (120 seconds by default). Below the post-editing field, you will notice a line of text that displays the time of the most recent autosave, similar to the following:

[ Screenshot: WordPress Autosave Message (Saved at 2:34:02.) ]

Surely, this relatively new feature provides an added layer of protection against lost work, but all is not perfect (yet) in the world of automatically saved content.

Several months ago, I lost several hours of work because the autosave feature completely failed to work, despite the periodically reassuring “Saved at..” message. After working for several hours with a false sense of security, WordPress choked and my post had vanished. In shock, I scoured the database for any trace of my recent efforts, but to no avail. The entire post had disappeared into the void. Utterly devastated and disillusioned, I decided to investigate the so-called “autosave” feature, learn what had happened, and take steps to avoid such travesty in the future. Here is a summary of my investigation..

Continue Reading

What is My WordPress Feed URL?

Posted on March 9, 2008 in WordPress by Jeff Starr

[ ~{*}~ ] For future reference, this article covers each of the many ways to access your WordPress-generated feeds. Several different URL formats are available for the various types of WordPress feeds — posts, comments, and categories — for both permalink and default URL structures. For each example, replace “http://domain.tld/” with the URL of your blog. Note: even though your blog’s main feed is accessible through many different URLs, there are clear benefits to using a single, consistent feed URL throughout your site.

Continue Reading

Lessons Learned Concerning the Clearfix CSS Hack

Posted on February 5, 2008 in Presentation by Jeff Starr

I use the CSS clearfix hack on nearly all of my sites. The clearfix hack — also known as the “Easy Clearing Hack” — is used to clear floated divisions (divs) without using structural markup. It is very effective in resolving layout issues and browser inconsistencies without the need to mix structure with presentation. Over the course of the past few years, I have taken note of several useful bits of information regarding the Easy Clear Method. In this article, I summarize these lessons learned and present a (slightly) enhanced version of the clearfix hack..

Continue Reading

WordPress Core Hacks Used at Perishable Press

Posted on December 3, 2007 in Perishable, WordPress by Jeff Starr

One of the necessary evils associated with creating a highly customized WordPress-powered site involves the inevitable necessity to hack the WordPress core. WordPress is built for mass-consumption and tends to cater to the largest audience possible, making it necessary to bend and poke around the corners to get WordPress to function in a more specific or specialized capacity.

Of course, there is a major downside to tweaking core WordPress files: upgrading. The overambitious WordPress peeps are constantly rolling out upgrade after upgrade, many of which are required security fixes, patches, or whatever. The point is that editing the WordPress core on your current version of WordPress requires that you edit each and every subsequent upgrade, for each and every one of your sites.

Over time, I have realized the importance of documenting core changes for any sites that require them. Having a concise record of the files and code involved with each hack greatly facilitates the entire upgrade process. Without such a reference, subtle changes may be forgotten and key hacks may be overlooked. Here at Perishable Press, my former Core Hacks Log served me well from WordPress 1.5 to 2.0, however, much of it no longer applies to the new WordPress 2.3 configuration. Since the latest site overhaul, I have dramatically reduced the overall number of required core edits.

Continue Reading

Notes and Tips for Better Social Bookmarking

Posted on September 26, 2007 in Blogging, Pleasure by Jeff Starr

For those of you still hiding your bookmarks within the dark confines of your browser’s “favorites” menu, may I suggest stepping into the “here and now” with a fresh new approach: social bookmarking. Hopefully, most of my readers are already familiar with the many wonders of managing and sharing your bookmarks online, but for those who may still be questioning the whole idea, allow me to expound briefly on several of the immediate benefits:

Universal access to your bookmarked sites
Forget about time-wasting browser extensions that fumble to synchronize your business; manage your collection online at a great site such as del.icio.us and enjoy quick access to a definitive set of bookmarks from virtually anywhere in the world.
Better organization of your bookmarks
Drop the resource-hogging browser extensions that supposedly enhance the organizational efficiency of your collection; many social bookmarking sites employ user-defined tagging architecture to provide unlimited flexibility for organizing your bookmarks.
Don’t be tight with your bookmarks
Sharing information is the wave of the future! Help others locate the information they need by sharing your favorite sites with others. Social bookmarking sites like del.icio.us provide a simple way to keep select sites private, so get over yourself and get sharing!
One-click backups of your entire collection
Last but not least is the drop-dead simple method that most social-bookmarking sites provide for backing up or exporting your entire bookmark collection. For example, with a single click, del.icio.us exports your entire collection via a nice little html file. Fresh. Delivered.

Ahh.. so much better. If you still don’t believe me, then just stop reading here and go home. However, if you are totally feeling the whole social bookmarking movement, then read on, my friend — I have a few sweet little tips that I would like to share with you..

Continue Reading

CSS Throwdown: Preload Images without JavaScript

Posted on July 22, 2007 in Presentation by Jeff Starr

Clean, easy, effective. You don’t need no stinking JavaScript to preload your images. Nope. Try some tasty CSS and (X)HTML instead! Here’s how.. (only two steps!)

Step 1 — Place this in your CSS file:

div#preloaded-images {
   position: absolute;
   overflow: hidden;
   left: -9999px; 
   top: -9999px;
   height: 1px;
   width: 1px;
}

Step 2 — Place this at the bottom of your (X)HTML document:

<div id="preloaded-images">
   <img src="http://perishablepress.com/image-01.png" width="1" height="1" alt="" />
   <img src="http://perishablepress.com/image-02.png" width="1" height="1" alt="" />
   <img src="http://perishablepress.com/image-03.png" width="1" height="1" alt="" />
</div>

..and that’s a wrap! All images are preloaded and ready for calling as you please. Completely valid, standards-compliant image preloading via CSS and (X)HTML!!

Computer Flashback: Windows 98 Run Commands

Posted on July 9, 2007 in Technology by Jeff Starr

[ Image: Screenshot of the MS Run Prompt ]

Even with all the fancy-pants new features found in Windows XP and now Vista, Microsoft Windows 98 (Second Edition) remains our favorite Windows-flavored operating system. We love it so much, we still use it on one of our trusty laptops. Over the years, we have discovered several very useful functions available via the command line or even the “Run” prompt (Start → Run...). Anyway, without spending too much time researching or explaining these wonderful tools, we figured posting the information online may prove beneficial at some point in the future. So, without further ado, we present this working repository of helpful MS run commands:

Continue Reading

Smooth Operators: Sharpen your Google Search Skills

Posted on April 10, 2007 in Technology, Websites by Jeff Starr

Coming soon to the World Wide Web: Everything. The perpetually evolving sum of human knowledge available online. Anywhere. Anytime. So, what are you looking for? Information concerning something, somewhere, about somebody.. You know it’s there somewhere. Sure, you could waste time by digging through that immense labyrinth of browser bookmarks, maybe eventually finding that one link that may or may not lead you to the page that you remember.. No thanks. The Web is far too rich in information to limit it with a few bookmarks. Ah yes, tags — that’s it! Social bookmarking to the rescue. Okay now, let’s see, under which tag will I find those two great links on "postmodern existentialism"? Maybe check three or four tags before realizing that several months have passed and that newer, more relevant information is probably available elsewhere on the internet. Hmm..

Continue Reading

Search Engine Registration Notes

Posted on March 3, 2007 in Optimization by Jeff Starr

In his excellent book, Search Engine Optimization for Dummies, Peter Kent explains that many search engines actually get their search results from one (or more) of the larger search engines, such as Google or The Open Directory Project. Therefore, the author concludes that it may not be necessary to spend endless hours registering with thousands of the smaller search sites. Rather, the author provides a brief list of absolutely essential search sites with which it is highly recommended to register. Further, by registering with the following sites, your site will be listed in a significant majority of all search engines.

Continue Reading

URL Character Codes

Posted on February 19, 2007 in Function, Structure by Jeff Starr

URL’s frequently employ potentially conflicting characters such as question marks, ampersands, and pound signs. Fortunately, it is possible to encode such characters via their escaped hexadecimal ASCII representations. For example, we would write "?" as "%3F". Here are a few more URL character codes (case-insensitive):

Continue Reading

Hide Content on Windows 98SE

Posted on February 4, 2007 in Technology by Jeff Starr

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 any access. This "hidden" folder is completely accessible via DOS, and functions as any other "regular" folder. In Windows, the folder will appear with an underscore preceding its given name. For example, using this method to create a hidden folder named "test" will produce a folder that appears as "_test" when viewed via Windows.

Continue Reading

Fun with the DOS Command Prompt

Posted on January 29, 2007 in Technology by Jeff Starr

Note: This article assumes a basic familiarity with the DOS command prompt, and is somewhat of a continuation of our previous article on DOS, Basic DOS Commands. Here, we are exploring a few of the more interesting commands available via the DOS command prompt. For a more complete reference please consult the Windows Help file (Windows XP) by entering

hh.exe ms-its:C:\WINDOWS\Help\ntcmds.chm::/ntcmds.htm

at the command line prompt (or via the Start > Run... dialogue box). For a brief overview of essential DOS commands, characters, devices, and variables, check out DOS Fundamentals.

Continue Reading

DOS Fundamentals

Posted on January 29, 2007 in Technology by Jeff Starr

A brief overview of essential DOS commands, characters, devices, and variables

Ahh, the fun I have at work while experimenting with the command line. I will be the first to admit that I understand very little of DOS, especially when considering the scope of its functional capacity. Nonetheless, I am taking the time to chronicle a few interesting DOScoveries here in this article, as well as in at least a couple of others (see related articles section at the end of this article).

The first thing that I should mention is that there are at least several different entities commonly referred to as "DOS". Windows 98SE and earlier run on the MS-DOS kernel, which is directly accessible by pressing the F8 key repeatedly (after the beep) during computer startup. Windows 2000, Windows XP, and beyond do not run on the MS-DOS kernel, but do provide two MS-DOS-like programs, the command prompt Cmd.exe, and the MS-DOS emulator Command.com. For more information, you may want to explore the difference between Cmd.exe and Command.com before diving in..

Continue Reading

Industrial-Strength Spamless Email Links

Posted on January 15, 2007 in Function by Jeff Starr

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 with a flood of email spam.

Fortunately, the flexibility of JavaScript enables us to encode our email links as simply or as convoluted as needed. Indeed, our first post on spam-free email links focused on simplicity at the expense of long-term effectiveness, with multiple email addresses requiring multiple instances of the JavaScript function.

In this article we present a technique which obfuscates all email data within the JavaScript itself, making it virtually impossible for current technology to extract accurately any email addresses contained therein. This is a more durable, industrial-strength method for protecting your inbox from the spammers. Although slightly more complicated, this method accommodates multiple email addresses within a single, robust JavaScript function. So, without further ado..

Continue Reading

Keep it Dark: Hiding and Filtering CSS

Posted on January 10, 2007 in Presentation by Jeff Starr

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..

Continue Reading

Embed External Content via iframe and div

Posted on January 2, 2007 in Structure by Jeff Starr

By using an <iframe> within a <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> and <iframe> tags. Simply add the following code to your document and style according to your specific needs:

<div style="position:absolute; left:77; top:77; width:377; height:377; clip:rect(0,381,381,0); background:#FFF;">

 <iframe src="http://www.google.com/" width="377" height="377" marginwidth="0" marginheight="0" frameborder="no" scrolling="yes" style="border-width:2px; border-color:#333; background:#FFF; border-style:solid;">
 </iframe>

</div>

Here is the code again, this time commented with explanatory information:

Continue Reading

Theme Edits for IE7

Posted on October 31, 2006 in Perishable, Websites by Jeff Starr

This post is a working repository of code edits and other changes made to Perishable Press themes in order for them to function properly in Internet Explorer 7 (IE7)..

Jupiter Theme
*:first-child+html div.comwrap {
	overflow: visible;
}
Lithium Theme
*:first-child+html div.comwrap {
	overflow: visible;
}
Casket Theme
Removed html selector from first ruleset.

Greenwich Mean Time (GMT) Formats

Posted on September 25, 2006 in Websites by Jeff Starr

There are currently three formats for expressing date/time in Greenwich Mean Time (GMT). All examples represent the date, "July 04, 2050". The time for all three formats is expressed as "hour:minutes:seconds".

Here is the preferred, standard format1 for the Internet. This format is defined by RFC 1123 (updated from RFC 822):

# RFC 1123 Standard GMT Format
Mon, 04 Jul 2050 07:07:07 GMT

The programming language C uses the ANSI standard format1 in its asctime():

# ANSI Standard GMT Format
Mon Jul 4 07:07:07 2050

The RFC 850 format2 is now obsolete (RFC 1036) and should not be used:

# RFC 850 Standard GMT Format [obsolete]
Monday, 04-Jul-50 07:07:07 GMT

1 Weekday abbreviations: Mon, Tue, Wed, Thu, Fri, Sat, Sun
Month abbreviations: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec

2 Weekday abbreviations: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
Month abbreviations: January, February, March, April, May, June, July, August, September, October, November, December

References