Archive for the ‘Miscellaneous’ Category

WordPress 3.1 Helicon ISAPI_Rewrite Rules and Permalink Structure

One of my clients is using WordPress on an IIS server and is using a product called “Helicon” to help with rewrite rules. Having toyed with the HTACCESS and Permalink structure, I couldn’t get any page content to show up except for the home page. It appeared as if the rewriting wasn’t working.. that’s until I wrote this.

  1. In your WordPress admin dashboard, navigate to “Settings -> Permalinks”. Select the “custom structure” radio box and enter in:
    /%postname%/
  2. For the .HTACCESS, copy and paste this in
    # Helicon ISAPI_Rewrite configuration file
    # Version 3.1.0.63
    
    Options +Followsymlinks
    
    RewriteEngine On
    RewriteBase
    RewriteRule /wp-(.*) /wp-$1 [I,L]
    RewriteRule /(.*)$ /index.php/$1 [I,L]
    RewriteRule . /index.php [L]
  3. That’s it! Enjoy using Helicon ISAPI_Rewrite and WordPress Pretty URL’s.

Note: If this didn’t work for you, leave feedback to I can update the guide to better assist in different scenarios and environments.

CodeIgniter HTACCESS remove index.php and add trailing slash

Here is a quick HTACCESS snippet that will add the trailing slash (ex: http://domain.com/mycontroller to http://domain.com/mycontroller/) and will remove the index.php from the URL (ex: http://domain.com/index.php/mycontroller/ to http://domain.com/mycontroller/)

    RewriteEngine On
    RewriteBase /

    # this adds trailing slash
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !(.*)/$
    RewriteRule ^(.*)$ $1/ [R=301,L]

    # this gets rid of index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1

The Web Designer’s Guide to Font Replacement Methods

This article discusses various font replacement techniques, including: Cufon, SIFR, FLIR, Typekit, Fontdeck, @font-face, CSS, Font Spring and others.

via The Web Designer’s Guide to Font Replacement Methods.

Object-relational mapping with Doctrine, Flash Builder, and PHP

Original Article: http://devzone.zend.com/article/11512
Richard Bates | Tuesday, December 22, 2009 reblogged by Tim Selaty

TLS Web Solutions comment:
I am reblogging this article because I found it to be human-readable and informative to those wanting to get started with ORM’s or Doctrine.

Rich Internet applications built with Adobe Flex and Flash Builder have been steadily gaining a foothold in enterprise development for quite some time. As the platform has grown and evolved, PHP has also made amazing progress toward becoming a mature, powerful object-oriented language with rapid adoption and dozens of frameworks and design pattern implementations. As PHP continues to prosper, developers are able to borrow more and more of the things Java has got right, taking one check after another from the “Java-only” column. One outstanding example of this is object-relational mapping (ORM). A few different PHP ORM implementations are available, and all of them have positive attributes. However, after some experimentation, I’ve found that Doctrine is my favorite.

For those who haven’t used ORM before, I don’t expect it to be a hard sale. Before I used ORM, I had wished for it a thousand times in ignorance. ORM is, simply put, a way of mapping the objects you use in development to their representation in relational databases. Doesn’t it just seem natural that your Customer object should have a Sav method that automatically translates the object’s properties into persistent data? Take this pseudo-code as an example: [...] Read More

How to include jQuery dynamically, aka, check to see if it exists

I cannot tell you how many times I’ve walked into a project that required the following:

  1. Fancy JavaScript alerts, dialogs, and validation.
  2. JavaScript assets that will distributed to subsites / satellite sites.
  3. Of these sites, some may or may not already have these assets already defined.

What I’m referring to specifically is jQuery. While building a tasty and user-friendly form.. I needed a way to check to see if jQuery didn’t exist, and if it didn’t include it dynamically by append it to the HEAD tag. This is commonly referred to ‘including jQuery dynamically’. Often times different phrases such as ‘check to see if jQuery is defined’, ‘lazy load jQuery’, ‘!window.jQuery’

Here is the JavaScript code to make the magic happen.

if(!(window.jQuery && window.jQuery.fn.jquery == '1.3.2')) {var s = document.createElement('script');s.setAttribute('src', 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js');s.setAttribute('type', 'text/javascript');document.getElementsByTagName('head')[0].appendChild(s);}

As a recap, here is what the snippet above does. “Check to see if jQuery is defined. If it’s not, grab jQuery from Google’s API and include it in the HEAD tag”.

XZero Classifieds – jQuery Expanding Country List

XZero Scripts has released a great tool for developer looking for a classified script – XZero Community Classifieds.

With an strong and eager community helping to further the development of the script, many people have taken the liberty to release their own mods. One modification we thought would be awesome to give back to the community is the expanding drop-down city list in the right side bar. Interested? Great!

You’re probably asking yourself “what’s the catch”? Truth be told, just a simple 1 file replacement. Follow these steps:

–> Download ‘cities.inc.zip’

Installation

  1. Open ‘cities.inc.zip’ and extract the file ‘cities.inc.php’ to your computer / desktop.
  2. Open your favorite FTP program and upload ‘cities.inc.php’ to the root of your XZero Classifieds installation. This WILL replace the old ‘cities.inc.php’ that came packaged with your original installation.

That’s it!

Enjoy!

Developer Notes

The drop down uses the jQuery framework for its animations. The framework is being remotely downloaded using Google’s JavaScript API script (jsapi).

Download Free jQuery Cities Drop down Mod for XZero Classifieds (1.51kb)
Downloaded 857 times.

Is Content the King Still? (Who’s Taking His Place)

Since the very first blog, written around an ancient campfire somewhere in the moist foothills of Seattle, content has been crowned the undisputed king for ages.

The king ruled over all that was written, be they blogs, articles, ads, fiction, or a killer love letter. All that was copy sat at the feet of the king.

Nothing succeeded without content. Writing without it was cast from the kingdom, banished as self-serving junk mail and the much-loathed “interruption marketing.” Read the rest of this entry »

Setup Gmail with Outlook 2003, Outlook 2007 and Outlook Express

Google Mail, the beloved backbone of many small business email communications. Gmail is seen as more professional than your average ‘@yahoo.com’ and ‘@aol.com’, but it shares the same favored monthly fee, free. One service Yahoo! does not offer for free is POP while Gmail does. POP does not mean anything to you other than a fancy name for soda? Click the “What’s POP?” tab below. This article will describe and provide picture perfect, simple screenshots for configuring Outlook 2003, Outlook 2007 and Outlook Express to download and view your Gmail emails from your computer. Let’s face it, words just aren’t as simple as pictures. Read the rest of this entry »

Favicon – Do It Yourself, The Right Way

Don’t you love it when you’re browsing the internet and all of a sudden you come across the most slick website imaginable… and the one thing that stands out above everything is a kickass favicon?

What’s a favicon you ask? Click the “Faviwhat?” tab below.

The creation:

You have a snazzy logo and want the icon next to the URL bar to match it. How you ask? Sit back, read, enjoy the ride. Oh, and I’ll throw in a couple snapshots too.

In this example, I’ll be using a quickly created logo for demonstrative purposes.

nukleeur

Open the image in Photoshop and select the crop tool.

crop1

Then, type “16px” in both the height and width fields in the top part of the screen. This will allow whatever you select with the crop tool in the next step, to automatically be adjusted and resized to 16×16. The reason why it’s 16×16 is because that is the standard Favicon size most widely accepted by all browsers.

crop2

Select the following area, this EXACT area will be your favicon upon accepting the changes.
Note: Make sure that at the top of your screen you have the ‘delete’ radio button clicked, and that after selecting the area you click the ‘Approve’ check mark on the top right part of Photoshop.

crop3

Now, export it into a web readable format. This is the important part. All favicon’s use a bit depth of 32 colors. Aka, if your cropped image has 60 colors, it’ll actually REMOVE any of those extra colors creating an undesirable effect. Let’s use a promised result by first clicking “Save for Web and Devices” or ALT+CTR+SHIFT+S for short.

crop4

Now, use the following settings and save the file as “favicon.gif”. After you have it saved, rename it to “favicon.ico” and that’s it! You officially created your own favicon using Photoshop from a logo. Not so bad, is it? What do you do with it you ask? Click the “Show it off!” tab above to see and grab the snippets of code that make this shining piece of work display next to the site’s URL.

The snippet, the problem, and the solution

So, we’ve got the icon, but what do we do with it? We insert it into the header of our HTML page.

First, using your favorite FTP Client (we recommend FileZilla) to upload the favicon to the ROOT of your site. Generally, this is the same place as your index.html is stored.

After the icon has been uploaded, we can now tell the webpage that when loaded, to look for this icon and display it in the browser. To do this, we need a snippet of code.

1
<link rel="shortcut icon" href="/favicon.ico" />

What this does is allows the browser to say “Find this particular file starting at the root of the site, check its bit depth… and if all is well.. set this image to be the shortcut and default URL icon for the site”.

Add the snippet above inside the HEAD tag and your site will now use the Favorite Icon (Favicon).

I did all that, why is it not showing?

One answer. Cache.

Most browsers (like FireFox) stores a website’s data, icons, etc in a caching system. When revisiting that site during the current session state it will try to use as many previous resources as possible. This includes CSS, JavaScript.. and as you guessed it.. images. Since your Favicon is indeed an image and your site didn’t have an image about ten minutes ago, it used a blank clear one instead and stored it for later use.

In order to see the updated version go to “Tools -> Clear Private Data” and ONLY check the “Cache” and “Offline Website Data” checkboxes. Then clear it and close FireFox. If it asks you to restore your previous session, start a new one.

Viola!

Enjoy adding that final touch to your already amazing website.

→ Download Source / Examples ←

Source ZIP Includes:

  • Nukleeur Logo
  • Favicon
  • HTML file with Favicon Snippet

What exactly is a Favicon and why don’t I have one already?

Favicon stands for “Favorites Icon”. It’s the little icon beside your site’s name in the favorites list, before the URL in the address bar, as a bookmarked website on the desktop, in the “Links” bar and on the windows taskbar.

If you don’t have one, this is because you have not specified in the HEAD element of your HTML pages to look for a favicon.

Still scratching at your head?

Here is Google’s favicon.

crop5

Page 1 of 11

Latest Posts

The United West

March 29th, 2011 by Tim Selaty

WordPress 3.1 Helicon ISAPI_Rewrite Rules and Permalink Structure

March 6th, 2011 by Tim Selaty

One of my clients is using WordPress on an IIS server and is using a product called “Helicon” (more…)

WordPress 3.1 Upgrade – Frontend Blank Site, Backend Okay (IIS)

March 6th, 2011 by Tim Selaty

Shoot. You just upgraded your WordPress installation to the latest version (3.1 for me) and all of a (more…)

CodeIgniter HTACCESS remove index.php and add trailing slash

February 18th, 2011 by Tim Selaty

Here is a quick HTACCESS snippet that will add the trailing slash (ex: http://domain.com/mycontroller to http://domain.com/mycontroller/) and will (more…)