Written on Thursday, November 29th, 2007 by Jeremy Steele
The fairly popular Nusuni Technorati Links WordPress Plugin has gone over a month now without any updates - here’s why:
I can’t think of any more features that can be added without serious WordPress hacking (like not allowing duplicate links), and there are no more bugs being reported.
Yes, it is that simple.
If someone else wants to work on it - go for it. As far as I’m concerned it seems to be fulfilling its intended purpose perfectly, so now I can spend more time working on webmaster tools, new site features, and the most time-consuming thing I have ever created - a modular, fast, and secure content management system (which I will probably transfer Nusuni Dot Com over to once it gets 99% done).
Written on Wednesday, October 24th, 2007 by Jeremy Steele
Everyone knows you can use tags to help separate your posts and make it easier for your users to find exactly what they are looking for without creating a million categories. That is probably what tags were originally intended for, but they can be useful for other reasons as well:
Feeds For Software/Plugin Updates
WordPress automatically generates a feed for your categories. The URL is /categoryname/feed. It also does the same exact thing for tags. This can be useful for many reasons, but I tend to think it is especially helpful if you distribute software through your blog. You can use this built-in feature to create a feed that people can subscribe to so they get notified of updates immediately. You can even go as far as setting up a FeedBurner feed and e-mail subscription as well.
To see an example of this in action, click here to view the feed for my htaccess generator.
Heck, you could even use this to make a feed for a blog series.
Temporary Categories
A few days ago I did a bit of spring (well.. autumn) cleaning and got rid of categories that had few posts and/or were not updated for a while. Before I deleted them I went through each post in the category and set a tag for the post to the old category’s name. The reason I did that is so if I feel like writing a bunch of posts on the topic again I can quickly and easily get each post and add them back to the category, and there won’t be a bunch of categories with one or two posts on the sidebar. Although chances are I won’t be writing stuff for the categories again - it’s better to be prepared for the future, wouldn’t you agree? And it certainly didn’t take a while to do this either - only a few minutes.
“Best Of”/Hot Articles Lists
This is a relatively new feature here - and it was definitely needed. The reason to keep a “best of” or hot articles list is to showcase the best articles on your blog to new visitors. Doing so will hopefully coax them into subscribing, submitting stuff to social networks, etc. While there are plugins that automatically do this based on criteria like the number of comments and page views - I like keeping a bit of control over what appears. The way I implemented this is by creating a tag for the best posts and adding a quick theme hack to the sidebar:
<li><h2>Best Of Nusuni Dot Com</h2><ul>
<?php
query_posts('tag=best-of-nusuni-dot-com');
if (have_posts()) {
while (have_posts()) { the_post();
echo("<li><a href='" . get_permalink() . "'>". the_title('','',false) . "</a>\n</li>");
}
}
?>
</ul></li>
The ‘tag’ for query_posts() is in the same format as all other slugs. If you don’t feel like having to figure out what the slug is for a particular tag, just make your tag one word like “bestofposts”.
Well, that’s it. Do you use tags? Why or why not?
Written on Friday, October 19th, 2007 by Jeremy Steele
One of the little side-projects I’ve been working on is a little PHP framework. It has been a while since I initially released it, so an update is overdue. The framework is still very alpha and is under a lot of construction.
If you’re interested in checking it out, you can download it here.
Written on Sunday, October 14th, 2007 by Jeremy Steele
I just enabled Gzip compression via a WP-Cache hack. Gzip compression will decrease the amount of data the server needs to send each time someone visits. The homepage here before was around 29 kilobytes, now it is less than 10. I’d call that a nice decrease. So this blog should be quite a bit snappier now
You can enable Gzip compression if you don’t use WP-Cache by using the option in the “Reading” options page.
If you do use WP-Cache (you should use it!), just add this line: “if ( extension_loaded(’zlib’) ) ob_start(’ob_gzhandler’);” immediately above the “foreach ($meta->headers as $header) {” line in the wp-cache-phase1.php file.
I found this hack on chrisstormer.com
And yes, Gzip compression even works on good ol’ lame Internet Explorer.
One thing you should know is this only compresses the HTML your blog sends to each user who views your page, it doesn’t do images, CSS files, etc.
Written on Thursday, October 11th, 2007 by Jeremy Steele
Just for a bit of fun the other night I made a little Javascript Gradient maker. You can view an example of it here. There’s really no actual use for it, but whatever, it’s a nice proof of concept.
Here’s how it works:
- You enter the start and end colors in hex, how many steps (lines) you want it to be (in pixels), and the id of the div.
- It splits the colors up (red, green, blue) then figures out the difference between the start and end.
- It loops through the colors, changes them as needed, and creates a sub-div and makes its background-color the new color
So basically it works by creating a bunch of new DIVs. It is still quite buggy and not 100% accurate - but it’s a fun little script
Here’s the HTML I use:
<div id='gradient1' style='width: 300px;'></div>
<div id='gradient2' style='width: 100%;'></div>
<script language="javascript" type="text/javascript">
perform_gradient("ff0000","0000ff",100,"gradient1");
perform_gradient("ff00ff","00ff00",100,"gradient2");
</script>
And here’s the javascript I use (in an external file):
function perform_gradient(startColor,endColor,height,container_id) {
var startr = parseInt((startColor[0] + startColor[1]),16);
var startg = parseInt((startColor[2] + startColor[3]),16);
var startb = parseInt((startColor[4] + startColor[5]),16);
var endr = parseInt((endColor[0] + endColor[1]),16);
var endg = parseInt((endColor[2] + endColor[3]),16);
var endb = parseInt((endColor[4] + endColor[5]),16);
var diffr = endr - startr;
var diffg = endg - startg;
var diffb = endb - startb;
var intervalr = 0;
var intervalg = 0;
var intervalb = 0;
var curr = startr;
var curg = startg;
var curb = startb;
var i = 0;
var gradientTable = document.getElementById(container_id);
intervalr = Math.round(diffr / height);
intervalg = Math.round(diffg / height);
intervalb = Math.round(diffb / height);
toPrint = "";
while(i < height) {
curr_str = curr.toString(16);
if(curr < 16) {
curr_str = "0" + curr_str;
}
curg_str = curg.toString(16);
if(curg < 16) {
curg_str = "0" + curg_str;
}
curb_str = curb.toString(16);
if(curb < 16) {
curb_str = "0" + curb_str;
}
cur_color = "#" + curr_str + curg_str + curb_str;
//gradientTable.innerHTML += "R:" + curr_str + " G:" + curg_str + " B:" + curb_str + "<br>";
toPrint += "<div style='height: 1px;width: 100%;background-color: " + cur_color + "; padding: 0px; margin: 0px;'><\/div>\n";
curr += intervalr;
curg += intervalg;
curb += intervalb;
i++;
}
gradientTable.innerHTML += toPrint;
}
Update: Heh, apparently this little charm doesn’t work in IE. Funny, it works in every other browser I test 