Jump Menu : Content | Explore | Search | Home | Sitemap | Contact | Login | Access.

Articles tagged with “code

More Killer CSS Reset Styles
Just a note to let everyone know that I have updated my previous CSS reference article, A Killer Collection of Global CSS Reset Styles. The updated version features two more excellent CSS resets, as well as the updated Meyer reset and a link to Eric’s official ...
Pimping the Details, Part 1: Post Content
In today’s highly competitive blogosphere, every edge counts. There are many aspects of a site or blog that can be easily acquired. Fancy themes may be purchased, nifty plugins are freely downloaded, and even snazzy content is immediately available. Indeed, setting up a decent-looking blog is so easy that virtually anyone can do it. Even so, just spend a little time ...
Lessons Learned Concerning the Clearfix CSS Hack
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 ...
Optimizing Google Analytics Performance
It has occurred to me lately that I no longer use Google Analytics for Perishable Press. Instead, I find myself keeping an eye on things using Mint almost exclusively. So, the question now is: do I continue serving the GA JavaScript to keep the profile active just in case I ever need the additional stats? I mean, Mint already does a ...
What is the Difference Between XHTML 1.0 Strict and XHTML 1.1?
As some of you (e.g., Louis) may have noticed during the recent site redesign, I decided to switch the default doctype from XHTML 1.0 Strict to XHTML 1.1. Just in case you were wondering, XHTML 1.1 is different than XHTML 1.0 in three important ways 1: On every element, the ...
6 Ways to Customize WordPress Post Order
Recently, reader Luke Knowles asked how to customize the sort order of his posts in WordPress. Looking into a solution to this question proved quite enlightening. Within moments I was able to discern 4 methods for modifying post order, and then several days later I discovered 2 additional custom sorting techniques. After updating the ...
Optimize WordPress: Pure Code Alternatives for 7 Unnecessary Plugins
In this article, my goal is to help you optimize WordPress by replacing a few common plugins with their correspondingly effective code equivalents. As we all know, WordPress can be a very resource-hungry piece of software, especially when running a million extraneous plugins. Often, many common plugins are designed to perform relatively simple tasks, such as redirect ...
5 Easy Ways to Display Syntax Highlighted PHP Code
A great to way to share your PHP code with visitors is to display it directly in the browser with automatically generated syntax highlighting. Here is a screenshot showing an example of syntax-highlighted PHP code: Displaying your ...
Prevent JavaScript Elements from Breaking Page Layout when Following Yahoo Performance Tip #6: Place Scripts at the Bottom
By now, everyone is familiar with the Yahoo Developer Network’s 14 “best-practices” for speeding up your website. Certainly, many (if not all) of these performance optimization tips are ideal for high-traffic sites such as Yahoo or Google, but not all of them are recommended for smaller sites such as Perishable Press. Nonetheless, throughout the ...
A Killer Collection of Global CSS Reset Styles
Using CSS to style semantically meaningful (X)HTML markup is an important key to modern web design practices. In a prefect world, every browser would interpret and apply all CSS rules in exactly the same way. However, in the imperfect world in which we live, quite the opposite frequently happens to be the case: many ...
htaccess Combo Pack: WordPress Permalinks and non-www Redirect
WordPress users employing permalinks via htaccess to optimize their dynamic URLs transform complicated-looking links such as: http://example.com/blog/index.php?page=33 ..into search-engine friendly links such as: http://example.com/blog/post-title/ Every rewritten URL relies on a common set of htaccess rules to transform the links. The htaccess rules for all WordPress permalinks look like this for root WP installations: # BEGIN WordPress RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
Bare-Bones HTML/XHTML Document Templates
In this post I have assembled a concise collection of conforming, bare-bones document templates for the following doctypes: Document Templates XHTML 1.0 XHTML 1.0 Strict XHTML 1.0 Transitional XHTML 1.0 Frameset XHTML Basic 1.0 XHTML 1.1 XHTML 1.1 XHTML Basic 1.1 HTML 4.01 ...
Rethinking Structural Design with New Elements in HTML 5
[ Keywords: html, design, markup, structure, elements, header, footer, article, section, header, nav ] HTML 5, also known as Web Applications 1.0, provides new markup elements that will change the way you design your web pages. The new elements replace commonly used divisions in web documents, facilitating an even greater degree of separation between structure (HTML) and presentation (...
Unicode Character Reference for Bloggers
[ Keywords: unicode, utf-8, encoding, character, reference, quote, copyright, bullet ] Virtually every article written here at Perishable Press requires at least one or two “special” characters. Some of these characters — such as quotation marks, hyphens, and dashes — are very common, while others — such as the copyright symbol, bullet, and arrow — happen less frequently. As a blogger, I find myself repeatedly using a select ...
Computer Flashback: Windows 98 Run Commands
[ Keywords: windows, 98se, 98, run, commands, command, dos, ms-dos, msconfig, regedit ] 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 Friendliest Link Targets in the Neighborhood
[ Keywords: link, target, blank, replace, self, parent, top ] The target attribute for anchor elements () specifies the location in which the referenced document should load. For example, to open a link in a new window, we would use a target value of _blank. Although this is a commonly employed technique, the target attribute has ...
URL Character Codes
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):     %3E #     %23 %     %25 {     %7B }     %7D |     %7C \     %5C ^     %5E ~     %7E [     %5B ]     %5D `     %60 ;     %3B /     %2F ?     %3F : ...
Fun with the DOS Command Prompt
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 ...
DOS Fundamentals
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 ...
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: Embed Windows Media Player via object and classid Here is the general format for including .wmv files in web pages using classid: ...
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): function formfocus() { document.getElementById('element').focus(); } window.onload = formfocus; ...and corresponding (X)HTML markup (abbreviated for clarity): In this example, the first form element ...
Basic DOS Commands
DOS (Disk Operation System) is a tool which allows you to control the operation of the IBM PC. DOS is software which was written to control hardware. Here is a summary of some essential DOS commands. Change Drive To change the default drive indicated at the DOS prompt, type the letter of the drive followed by a colon (:). For example, to change the drive from "X" to "Y&quot: X:\> Y: [enter] Change Directory Use the CHDIR (CD) command to change the ...
One Link to Open Them All
Welcome to Perishable Press! This article explains several methods for opening multiple frames with a single link. For more excellent (X)HTML information, check out the (X)HTML tag archive. If you like what you see, I encourage you to subscribe to Perishable Press for a periodic dose of online ...
Greenwich Mean Time (GMT) Formats
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 ...
Optimize Convoluted Code via JavaScript
Search engines loathe crawling through convoluted lines of code. Oceans of complex JavaScript scare away the priceless indexing and archiving efforts of most major search engines, which will generally abort a crawl upon encountering such mess. The good news is that search engines actually do not deploy JavaScript, so it is possible to use JavaScript to hide those miles of messy code by using the fundamental document.write function. Place this function in an external JavaScript file, “navmenu.js”: function navMenu() ...
Execute External WordPress Functions
To execute WordPress functions in an external directory (i.e., outside of the WordPress install directory), it is necessary to include a call to “wp-blog-header.php” at the top of the external file. For example, if your WordPress-powered blog is located in a subdirectory called “blog” and the external file is in the domain root (e.g., the external file is located directly in http://domain.com/), add the following code to the top of the external file: This may be generalized ...
A Complete CSS Template File
To help maintain consistency when developing new CSS-styled websites, we have created a complete CSS template file. The file contains every HTML/XHTML tag known to man. This includes tags such as BASEFONT and CENTER, which have been deprecated; tags such as COMMENT and MARQUEE, which are exclusive to Internet Explorer; tags such as SPACER and SERVER, which are exclusive to Netscape Navigator; and even tags such as !DOCTYPE and BASE, which are included merely for the sake ...
Geek Code Nonsense
I found this interesting: Enlighten Encode Decode Apparently, I am defined as: GFA d-@ s:- a C++ U@ P@ L@ E@ W+++ !N !o K--? w@ O@ M@ !V PS@ PE@ Y@ PGP@ t !5 !X R@ tv-- b+ DI !D G@ e+ h@ r+++ y+++
Google Analytics Invitation
Earlier this year, we decided to implement the much-hyped Google Analytics visitor-tracking and optimization tool. The free service offers enterprise-level statistics capabilities and provides “high-end web analytics” and works with or without Google AdWords. Sounds great, however the service is available through invitation only. Skeptical that we would ever hear anything, we decided to submit a request anyway. Several months later, after having completely forgotten about signing ...
Title Attributes for WordPress Post Navigation
Improve accessibility by adding title attributes to your WordPress userspace. This article applies specifically to WordPress 2.0.2, but may be generalized to any WP 2.0+ version. By default, WordPress navigation links omit the title attributes for both page and post views. Title attributes for links provide additional information that can improve the accessibility of your website. This is especially true when images or text symbols exclusively are used for navigation. To add title attributes to WordPress page-view links (e.g., links ...
Permalink Enlightenment
I recently enabled the permalinks feature for a fresh WordPress 2.0.2 upgrade. The process required several hours of research and approximately 90 minutes to fully implement. This brief article summarizes the process and applies to at least the following setup: WordPress 2.0.2 Apache Server with mod_rewrite enabled The ability to access/modify your .htaccess file(s) You have decided to use the /%year%/%monthnum%/%day%/%postname%/ permalink format (actually, any format will work; simply swap your preferred format for the one mentioned here) You may also be ...
Lightbox Notes
To add Lightbox functionality to any single image: Add rel="lightbox" to the anchor tag. Add a title="" attribute to the anchor tag. Add an alt="" attribute to the image tag. To add Lightbox functionality to any series of images: Add rel="lightbox[value]" to the anchor tag of each image. Add a title="" attribute to the anchor tag of each image. Add an alt="" attribute to the image tag of each image. Any set of pictures with the same rel="lightbox[value]" will display with nav buttons.
Business is No Object
Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2000 Microsoft Corp. H:\>ping localhost Pinging mozilla.biz [127.0.0.1] with 32 bytes of data: Reply from 127.0.0.1: bytes=32 time
JavaScript Notes Plus
Welcome to Perishable Press! This article covers a plethora of useful JavaScript tips and tricks. For more excellent JavaScript information, check out the JavaScript tag archive. If you like what you see, I encourage you to subscribe to Perishable Press for a periodic dose of online enlightenment ;) Nifty JavaScript Design Tricks Clickable divs Standard design practice dictates that the ...
WordPress RDF Source Makeover
Beautiful Source-Code Output, Part 1: Whip your WordPress RDF Code into Submission Update: This article applies specifically to WordPress 2.0.2, but may be generalized to any WP 2.0+ version. I love looking at beautiful source-code output. However WordPress tends to spit code out in random chunks, often leaving spaces, line breaks, and tabs littered throughout the source output. This messes things up. Lists don’t look like lists and logically written code often appears scattered along the page carelessly. Often, ...
WordPress Notes Plus
Welcome to Perishable Press! This article covers many different aspects of WordPress functionality, including customizing quicktags, deleting the cache, numbering comments & posts, changing password text, and displaying archive menus. Note that this article was written for previous versions (i.e., less than 2.0) of WordPress. Discrepancies may exist between the code presented in this post and that of more recent versions of WordPress. Nonetheless, this information is presented for ...
Electric Sheep and the ASCII Matrix
Electric Sheep Paying homage to Philip K. Dick’s novel Do Androids Dream of Electric Sheep? via collective screensaver morphology: electricsheep.org. Plus, be sure to experience this moving ASCII rendition of the “bullet-dodging” scene from The Matrix: ASCII Matrix Scene.
Secret Search Codes
Secret Search Codes: x@777 notes | notes posts (via search) notes | notes posts (via tag) service | web services (via tag) links | online resources (via tag) private | offline resources (via link) summon | key posts (via tag) update | update material (via tag) upgrade | wp upgrade material (via tag) theme | wp themes (via tag) plugin | wp plugins (via tag) rrr | error posts (via tag)
Summon Notes Plus
Summon some notes via Summon Notes Plus: x@777 Fun with Downlevel Conditional Comments XHTML Document Header Resource Stupid htaccess Tricks Online Service Essentials Online Color Resources Stupid htaccess Tricks WordPress Notes Plus JavaScript Notes Plus Robots Notes Plus HTTP Error Codes PHP Notes Plus Lightbox Notes

• Up •


Set CSS to lite theme
Set CSS to dark theme