SearchStatus

SearchStatus

A Firefox SEO Toolbar Extension – great for checking on your site(s). Check Google PageRank, Google category, Alexa, Complete.com, incoming and backward links for Google, Yahoo!, and MSN.

Posted in My Bookmarks | Leave a comment

Darren’s Script Archive

Darren’s Script Archive

chatrooms, image galleries, applets, advanced php/mysql systems, website scripts, flash xml, chat, and more – most scripts are $5

Posted in My Bookmarks | Leave a comment

Dodo’s Scripts Collection

Dodo’s Scripts Collection

Dodo’s is a great collection of php scripts and code. Very usable gallery, upload, quiz, mailer, random generator, and other scripts.

Posted in My Bookmarks | Leave a comment

New ClickBank WordPress plugin prerelease

This is the new WordPress plugin for ClickBank users. It allows you to mask or cloak your affiliate links to prevent link hijacking. This is the “prerelease” in that I wanted to get it out and posted, but I haven’t completed the readme file (and a Quick Start Guide). There is a section within the plugin file itself that provides installation and usage instructions. When I finish the additional documentation, that will be added and I’ll update this post.

(If you’re a bot or scraper, or otherwise one of those people that likes to download plugins to provide on your site, don’t waste your time linking to the following file, it will not be the final link when the final release is published.)

Download affiliatecloak.zip

Here are the installation and usage instructions that are included in the file:

INSTALLATION:

  • Copy this file to your /wp-content/plugins/ directory
  • Go to the Plugins tab in your WP admin panel
  • Find “Affiliate Cloaking Device” and click “Activate”

USAGE:

  • Go to the “Options” tab in your WP admin panel and select the ClickBank subtab
  • After initial install, you will need to add your affiliate ID
  • Determine if you want links to open in a new window or not and set appropriately
  • Add ClickBank program(s) to your list
  • Once you have at least one program added to the list, you can cloak links in your posts
  • To add a cloaked link, add the following to your post:
    [text-that-is-displayed|program ID #]
    If you wanted the link to read “Learn to make money blogging” and the program ID
    from your list was 5, you would type the following in the WP visual editor:
    [Learn-to-make-money-blogging|5]
    Note: be sure to include the brackets!!
  • If you have a long list of programs, or forgot the id number for a specific program, don’t worry, there is a dropdown list added just below the WP visual editor for writing and editing both posts (currently, this feature shows only in posts, not pages. However, the cloaking device works and may be used in pages, you just can’t see this helper list in the editing area).
Posted in WordPress | Tagged , , | 11 Comments

Displaying one category differently from all others in the WordPress loop

One of the categories of my blog is “My Bookmarks.” This is where I add the contents of my del.icio.us bookmarks to my blog to share with others. However, since these are not really “posts” for the blog, I set them apart using a different style within the WordPress loop. This is a tutorial of how to set that up.

First, one must understand “The Loop.” Here is how WordPress defines The Loop:

The Loop is used by WordPress to display each of your posts. Using The Loop, WordPress processes each of the posts to be displayed on the current page and formats them according to how they match specified criteria within The Loop tags.

The Loop begins with the following code:

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

and ends with:

<?php endif; ?>

Everything in between is how WordPress displays your posts. There are certain tags and WordPress functions that can be used within the loop. We will be using the function in_category().

We will also need to know the ID of the category that will be displayed differently. This can easily be obtained by going to the WordPress admin and selecting Manage > Categories. Then find the ID in the leftmost column. My Bookmarks happens to be ID 13, so that will be used in the example.

I will assume that reader does not know php. If you do, this part will be rudimentary. In order to display Category My Bookmarks (13) differently from all others, we will use what is known as a conditional statement. This means if this is true, do this, otherwise do something else. This is done in php with the following:

<?php if (this condition is true) {

do this

} else {

do this

} ?>

Our condition is to know if we are in the category My Bookmarks and then display differently. Everything else is the same. Your primary display then is the “else” condition. Look at your theme’s index.php (or your theme might use home.php) and select everything between the following:

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

This is going to be the else condition
<?php endwhile; else: ?>

Make note of this. Just after line that begins the loop (if(have_posts())…), you are going to put in a new line to test for our condition of category My Bookmarks (13), change the number 13 to whatever the ID is of the category you are displaying differently:

<?php if (in_category(13)) { ?>

Now you may put whatever you like. As an example, I have displayed how mine is set up:

<div class=”delicious”>
<h4>From my bookmarks:</h4>
<?php the_content(__(‘Read more &raquo;’));?><div style=”clear:both;”>
<p class=”more”><a href=”/category/web/my-bookmarks/”>View my other bookmarks here.</a></p>
</div>
</div>

Notice I have defined a specific class to style this, and have added those CSS definitions to my stylesheet. I have eliminated various post details and the post title, choosing to display all with the title “From My Bookmarks” followed by the content of the post which is put out with the_content(). The last part provides a link to the category archive.

This will be followed by closing our condition of being in the category My Bookmarks and if that is not true, then all others would be displayed using the block we already have. So to close this condition, add the following:

<?php } else { ?>

This should go just before your existing output that we discussed earlier. Leave your original output intact and all other categories will be displayed using that. At the end of this we need to close our new conditional statement. Go to the following line:

<?php endwhile; else: ?>

And just before that put a new line to close our new conditional block:

<?php } ?>

That’s it! Now all of the posts in the category My Bookmarks (or whatever you choose) will display using a special style, and all others will use our themes “standard” style.

Posted in WordPress | Tagged , , | Leave a comment

Lightweight XML and RSS Feed Buttons Using CSS

I can’t claim that this is a completely original idea. I’m certain that somewhere out there someone has come up with the same idea (probably several someones). Here is my way of creating lightweight XML/RSS Feed buttons using only CSS.

The goals in this project were:

  1. Create an XML/RSS feed button without an image file
  2. Use only CSS
  3. Have the end result be smaller in file size than using an image
  4. Be able to have the end result load with the page instead of an extra file

I began by actually downloading an XML button image: xmlrssfeed.gif. The file size of the image is 429 bytes and using an image editor to sample the exact colors of the background and the borders. The colors were as follows:

  • #FF6600 – background
  • #FFC8A4 – border top
  • #7D3302 – border right
  • #3F1A01 – border bottom
  • #FF9A57 – border left

Arial will do fine for the font, and it was obviously bold weight, white in color, and 11 pixels. The image size was 36 x 14.

With this information, I assembled the following CSS to get this button:

XML

 

.cssbutton {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: bold;
    color: #FFFFFF;
    background-color: #FF6600;
    height: 14px;
    width: 36px;
    text-align: center;
    border-top-width: 1px;
    border-right-width: 1px;
    border-bottom-width: 1px;
    border-left-width: 1px;
    border-top-style: solid;
    border-right-style: solid;
    border-bottom-style: solid;
    border-left-style: solid;
    border-top-color: #FFC8A4;
    border-right-color: #7D3302;
    border-bottom-color: #3F1A01;
    border-left-color: #FF9A57;
}

The above CSS is 602 bytes, so at this point, we’re actually heavier than the image itself. Since the goal here is to create a button of shear microscopic file size, every byte matters. So I went through this original CSS and reduced what is redundant, combined what could be combined, eliminated white-space, and used short-cuts when possible. This reduction yields the same result:

XML

 

.cb{
    font:11px Arial,sans-serif;
    font-weight:bold;
    color:#fff;
    background-color:#f60;
    height:14px;
    width:36px;
    text-align:center;
    border:1px solid;
    border-color:#FFC8A4 #7D3302 #3F1A01 #FF9A57;
}

This gets us to 241 bytes, almost half of the size of the image file. That certainly qualifies as an improvement. But we can do better. The above does contain carriage returns and tabs for easy comparison to the original. Eliminating those extra bytes gets the size down to 185 bytes. Now we’re talking.

(Note: From here on, the file sizes do not include carriage returns. However, to make them easier to read in this column, I have displayed them with carriage returns. Running the CSS on a single line with no whitespace improves the file size considerably.)

Further size reduction is certainly possible if you are willing to give up the shading effect of the borders. Here’s an example:

XML

 

This reduces the size to 147 bytes:

.cb{
    font:11px Arial,sans-serif;
    font-weight:bold;
    color:#fff;
    background-color:#f60;
    height:14px;
    width:36px;
    text-align:center;
    border:1px solid#7D3302;
}

Or eliminate the border all together and we get it down to 123 bytes, 28% the size of the image file:

XML

 

.cb{
    font:11px Arial,sans-serif;
    font-weight:bold;
    color:#fff;
    background-color:#f60;
    height:14px;
    width:36px;
    text-align:center;
}

For my money, I like the extra colors on the borders. It makes the text look like the image file and we are still improving the size by almost a 50% reduction.

One thing to remember is that your mileage may vary. In a perfect test environment, such as an HTML file with just these examples and no other CSS, the above code is all we needed. However, to display the examples in this post, I had to add some extra properties to the CSS to overcome the inherited properties of the rest of my page.

Posted in Web | Tagged , | Leave a comment

Stylegala

Stylegala

Stylegala is an online resource and inspiration guide for web agencies, designers and developers who take interest in websites that combine the powers of design, web standards and CSS

Posted in My Bookmarks | Leave a comment

New WP-Members™ version and other updates

I am currently wrapping up an upgrade to the WP-Members™ project. This will culminate in a full 2.1 release candidate before the end of the year. Coupled with that there will also be a completely new plugin released as well. This new plugin will mask/cloak affiliate links for ClickBank users to prevent link hijacking. I am hoping it is well received.

As for Verse-O-Matic, I am already working on some new things there as well. Early (i.e. January) 2008 should see the release of a “verse-pak” which will be a good sized list of verses that can be preloaded into your Verse-O-Matic. This is the single largest request of VOM users – they wish it came with more verses installed so they didn’t have to load their own. Well, I want to keep the flexibility for the end user, so for that specific group, I am going to have an easy to use list that can be loaded hassle-free. After that, the next step will be to have it hook in to the most common existing Verse-of-the-Day feeds (i.e. via RSS). This was the second most common request, so both of those are in development.

Posted in WordPress | Tagged , , | Leave a comment

Redefining this blog

As my fourth year of both blogging with WordPress and tinkering with it comes to a close, I have decided to redefine the focus of this blog. Originally, it was just my personal blog. It grew as an extension of a previous WordPress blog I had that focused on my hobby of amateur and high power rocketry. However, the most popular posts have always been the material that focused on WordPress itself – plugins, themes, etc.

So, for 2008, I am going to move anything that is not specifically related to WordPress off this blog. That may take some time because I will need to make sure that links don’t get broken in the process just in case someone needs information on how to make a duct tape wallet. While I haven’t decided on specifics, I’ll probably redirect everything else via .htaccess. I did that before when I moved everything to this domain and it worked well.

That move will allow this blog to focus on support for my existing plugins, development of new plugins, and WordPress tips & tricks. As a WordPress user from way back, I feel that I have a good handle on the inner workings of WordPress that I can share with others. I don’t recall the exact date I began with WP, but I do specifically recall upgrading my WordPress install to Mingus (released 5/22/2004), I think my first version was Miles (1/25/2004) and that was what inspired me to move away from Blogger. I was excited about the control and the ability to “get under the hood” and tweak my installation with plugins. Then I started making my own plugins and themes and I learned what worked, what didn’t, and why.

As a result of this journey, I have improved my skills in php, css, and MySQL (I was originally an ASP/VB developer way back late last century – but that’s another story).  Where I have strengthened my skillset in WordPress is the knowledge of using WordPress’ hooks, filters, and native functions as much as possible.  I see so many themes and plugins developed that recreate the wheel when they could just as easily rely on WP to do the heavy lifting. If they did this, their product would be more scalable for upgrades. An example of this would be the recent changes that WP made by dropping the category tables and moving to a definable taxonomy.

There was much griping and complaining focused toward WordPress by frustrated users. Unfortunately, this frustration was misdirected. Here is an example of what I saw. Some users were relying heavily on plugins and themes that, instead of relying on WordPress to get the list of categories (i.e. get_categories), they wrote their own sql queries to pull the list. Now in some instances this might be a necessity, but most often, I would say that it’s not.  And that is just one example.  As a result, upgrading was an issue for many. Personally, I found that my upgrade to 2.3.1 from 2.1 went off without a hitch. I attribute this to what I have learned the hard way over the past four years.

But I digress… As I said, the majority of this site’s traffic is coming to posts that are focused on my plugins or on WordPress so I am going to work to expand on that. I’ll probably included what I’ve learned about blogging in general along the way – what works, what doesn’t – specifically when it comes to monetizing. There are some things I’ve tried that worked and some things that were just a complete waste of effort.

I’m looking forward to 2008!

Posted in Web, WordPress | Leave a comment

Font Diner

Font Diner

Cool retro fonts – some free, some not, all great. Look carefully and you’ll probably see some that you recognize – I see them from time to time in ad spreads and on labels. Old Navy is an example. If you like retro, you’ll love Font Diner!

Posted in My Bookmarks | Leave a comment