All resources offered by this website are collected through the internet and exchanged between peers for personal study. Все ресурсы, предлагаемые на этом сайте, собранные через Интернет и обмен между коллегами для личного исследования.
Easy Share Here..

Archive for April, 2010

Quick info Social Bookmarks inbuilt Automatic Thumbnails Ready For Adsense Preview Download (216 Kb) Add to Del.icio.us Add to digg Add to FURL Add to reddit Add to Technorati Add to Yahoo My Web Add to Ma.gnolia Add to Stumble Upon Add to Google Bookmarks Add to Squidoo Add to BlinkBits Add to Blogmarks Add to Bloglines Add to Netscape Add to Ask Add to Live-MSN Add to Sphinn Add to FaceBook
Quick info Social bookmarks inbuilt Ready for Ads Automatic thumbnails Preview Download (216 Kb) Add to Del.icio.us Add to digg Add to FURL Add to reddit Add to Technorati Add to Yahoo My Web Add to Ma.gnolia Add to Stumble Upon Add to Google Bookmarks Add to Squidoo Add to BlinkBits Add to Blogmarks Add to Bloglines Add to Netscape Add to Ask Add to Live-MSN Add to Sphinn Add to FaceBook
Quick info Social bookmarks inbuilt Ready for Ads Automatic thumbnails Preview Download (216 Kb) Add to Del.icio.us Add to digg Add to FURL Add to reddit Add to Technorati Add to Yahoo My Web Add to Ma.gnolia Add to Stumble Upon Add to Google Bookmarks Add to Squidoo Add to BlinkBits Add to Blogmarks Add to Bloglines Add to Netscape Add to Ask Add to Live-MSN Add to Sphinn Add to FaceBook
Quick info Social bookmarks inbuilt Inbuilt Ajax Gallery Drop Down menu Preview Download (216 Kb) Add to Del.icio.us Add to digg Add to FURL Add to reddit Add to Technorati Add to Yahoo My Web Add to Ma.gnolia Add to Stumble Upon Add to Google Bookmarks Add to Squidoo Add to BlinkBits Add to Blogmarks Add to Bloglines Add to Netscape Add to Ask Add to Live-MSN Add to Sphinn Add to FaceBook
Quick info Social bookmarks inbuilt Ready for Ads Drop D own menu Preview Download (216 Kb) Add to Del.icio.us Add to digg Add to FURL Add to reddit Add to Technorati Add to Yahoo My Web Add to Ma.gnolia Add to Stumble Upon Add to Google Bookmarks Add to Squidoo Add to BlinkBits Add to Blogmarks Add to Bloglines Add to Netscape Add to Ask Add to Live-MSN Add to Sphinn Add to FaceBook

So you want to make your old WordPress themes compatible with newer versions of WordPress. With WordPress 3.0 right around the corner, theme compatibility is something on a lot of people’s minds. It’s pretty simple: do absolutely nothing.

I’ve been making WordPress themes since around WordPress 2.3 was released, and guess what? Those themes still work today and there’s nothing I need to do to keep them working with newer versions of WordPress.

  • Will they have threaded comment functionality (circa 2.7)? Nope, they probably still have “single level” comments though.
  • Will it use post_thumbnails to handle post thumbnails (circa 2.9)? Nope, but not every theme makes use of post thumbnails anyway.
  • Will they have the new navigation menus, custom header and background images introduced in the upcoming WordPress 3.0? Nope, and keep in mind not every theme will have a need for custom background or header images.

Most of these features I would consider optional. With maybe the exception of threaded comments or the new menu system, a lot of themes won’t even need or be designed around things like custom post thumbnails or header images.

So please, stop worrying about if your theme is going to break when you upgrade WordPress. No offense to my plugin developer friends, but 99% of the time WordPress breaks with a core upgrade, it’s a plugin’s fault (and it probably had it coming due to suspect plugin coding practices).

If a theme has a custom function that conflicts with a new WordPress function, the same thing could happen to themes too, so it is possible. This is probably the only “bug” I’ve ever heard of happen with a new core upgrade (and not every theme used the get_categories function).

To be honest, I’ve never seen a theme completely break, and I probably never will. I’d be interested to hear your thoughts in the comments, what do you think about making themes “compatible” with new versions? Have you ever seen a theme break because of a new WordPress version?

If you want your WordPress theme to take advantage of the new features that will be available once WordPress 3.0 is released, this article has some good info on integrating custom backgrounds, headers, menus, among other things.

Related posts:

  1. Upgrading WordPress Is Easier Than You Think
  2. WordPress Weekend Resources – June 12, 2009
  3. GaMerZ Plugins Now Compatible With WordPress 2.5

Have you ever noticed how sometimes when you hover over an image, it goes blank for a second, and then it loads the hover image? When you roll back over though, everything is seamless.

Here’s an example of what I mean using my Underground ladder image (broken into two pieces).

This is because there are two separate images that need to be loaded, and the second one (on hover) takes extra time to load when the hover effect is triggered.

In this post, I’m going to show you how to eliminate that delay using a CSS technique that loads the entire image at once, and displaying a portion of it.

Combine the Image

The first step to getting this to work is combining both halves of the image into one. You can use your image editor of choice to do this, just copy both of the images, double the height, and paste the inactive one above the active one.

Ladder 1Ladder 2Underground Ladder

The image in the middle should be what you’re going for. Now we move onto the CSS.

The Code

The first step in the CSS is to limit the height of the image to half (basically so only the top ladder shows up).

For purposes of this tutorial, we’ll use a class called .rollover-tut. Since the original ladder image is 153×149, we’ll use this CSS code:

.rollover-tut {
height: 149px;
width: 153px;
display: block;
}

Since we’re making a link, we’ll use the following HTML code:

<a class="rollover-tut" href="#"></a>

At this point, your link should look like the original ladder image, with no hover effect (yet).

Ladder 1

To get the hover effect working, we’ll use a CSS property called background-position on the :hover pseudoclass.

.rollover-tut:hover {
background-position: 0 -149px;
}

With the above CSS code, you’re pretty much moving the background image up 149 pixels (remember, the height of one ladder image, or half of both combined).

An easier way to remember is to use the following hover code instead, which will have the same effect as the above, and you don’t have to remember any numbers (hat tip: Art Webb via the comments):

.rollover-tut:hover {
background-position: bottom left;
}

And here’s what you get:

Notice there’s no delay between the hover effect now, since the entire image is loaded at once.

Conclusion

This same technique can be used for pretty much any background image rollover effect. I’m not sure if any of you have checked out my personal blog design lately, but I make extensive use of it on pretty much every link using a background image (and the submit button on my comment form).

Hope you all enjoyed this CSS tip. If you have any ideas for future CSS tip posts, let me know in the comments.

Related posts:

  1. How to Hide the WordPress Stats Smiley the Right Way

Quick info Magazine Style Ajax/Widgets Content Slider Preview Download (193 Kb) Add to Del.icio.us Add to digg Add to FURL Add to reddit Add to Technorati Add to Yahoo My Web Add to Ma.gnolia Add to Stumble Upon Add to Google Bookmarks Add to Squidoo Add to BlinkBits Add to Blogmarks Add to Bloglines Add to Netscape Add to Ask Add to Live-MSN Add to Sphinn Add to FaceBook
Quick info Magazine Style Ajax/Widgets Content Slider Preview Download (223 Kb) Add to Del.icio.us Add to digg Add to FURL Add to reddit Add to Technorati Add to Yahoo My Web Add to Ma.gnolia Add to Stumble Upon Add to Google Bookmarks Add to Squidoo Add to BlinkBits Add to Blogmarks Add to Bloglines Add to Netscape Add to Ask Add to Live-MSN Add to Sphinn Add to FaceBook
Quick info Magazine Style Ajax/Widgets Content Slider Preview Download (1130 Kb) Add to Del.icio.us Add to digg Add to FURL Add to reddit Add to Technorati Add to Yahoo My Web Add to Ma.gnolia Add to Stumble Upon Add to Google Bookmarks Add to Squidoo Add to BlinkBits Add to Blogmarks Add to Bloglines Add to Netscape Add to Ask Add to Live-MSN Add to Sphinn Add to FaceBook