Posts in the category "Site" and its subcategories.

Uninvited

Darn, I got a WordPress.com invite back in September but as I was about to redeem it now, I found out it expired in seven days. Back then I didn’t think I’d need an extra blog (where I can’t be as big a control freak as here) especially as I’m having hard time keeping this updated. I didn’t know what I was signing up for when I entered my email. Now I was going to do a little research for my article on WordPress… but it said “whoops, sorry, invite expired.”

Oh well, perhaps I should retry my invitation lottery luck but I’m sure now I’m trampled on by flocks.

I hope the article offer hasn’t expired even though I have been a terrible employee (I don’t care if I’m freelance/volunteer, terrible employee is a terrible employee). I’m just glad I’m writing again, because I’ve been such a procrastinator. It’s scary to write publicly about something you know you don’t know enough about (enough = everything). Am I being too tough on myself? :laugh:

Desperate Spammers

Ahhh… hilarious. Some poor sod is trying to write JavaScript alert popups in comments. His (no offense guys, but I bet it’s a he) newest attempt is a recursive function. Clever.

*raspberry*

WordPress code

Someone at the WP Forums asked how one would list 5 most recent posts but not the current post if it was one of the most recent ones… So, this is what my brain spouted out:

<?php
if( get_query_var(‘p’) ) {
$current = get_query_var(‘p’);
} else {
$postname = get_query_var(‘name’);
$current = $wpdb->get_var(“SELECT ID from $wpdb->posts WHERE post_name = ‘$postname'”);
}
print “<ul>”;
$count = 0;
$posts = get_posts(‘numberposts=6’);
foreach ($posts as $post) :
setup_postdata($post);
global $id;
if ( $count < 5 and $id != $current ) { ?>
<li><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></li>
<?php
$count++;
}
endforeach;
print “</ul>”;
} ?>

Mighty Nitpicker strikes again

From a WP forum thread:

target=”_new” is deprecated

target=”_new” is annoying

AAAAAAAGH! Target=”_new” doesn’t exist. It’s _blank. If you want a name a window “new” (or have a frame by that name), you should leave the underscore (_) out.

I’m so kind I didn’t write this in the forum… :wink:

Anniversary

One year ago, almost exactly (if I had remembered this on Monday), I started using WordPress. I’m very glad I ventured from the old and familiar environment of Perl in the form of Greymatter to the scary world of databases and PHP in the form of WP. WP has been very easy to use, customise and tweak. After the theme system came in 1.3 it’s been a breeze to upgrade (some people complain about the frequent upgrades. I don’t) especially now that I remember to “document” my core tweaking.

I’m too tired to write anything grandiose. I love WP. I’ve never had any problems with it (well, little error messages or layout-gone-crazy just don’t make me shake in my boots unlike some, it seems).

Happy anniversary!

Being sneaky

I hope you got this blog bookmarked (or blogrolled in some way) because I removed the direct link from the domain index page. Why? Probably for no good reason, but I just don’t want my texts find their way into wrong eyes… :P

Awww

These sort of comments just make my little forum volunteer heart flutter.

With the help of my new hero “Minna” over at the WordPress forums I have a new navigation look. I grabbed the necessary css from Michael Heilemann at Binary Bonsai. Minna helped me step by step with changes at the forum.

Thanks Minna!

Trackbacks are back

Whether or not anyone would ever trackback me, trackbacks are back. However, only genuine trackbacks are let through the moderation, I won’t allow site advertisements that really have nothing to do with my post specifically.

WP 1.5.1

22 minutes into the new WP version and I’ve got it installed. Yay.

Only one thing:
Plugin list
That’s the plugin list and green shows which are activated. I mean, GAG! Look at that green! And blue links! I don’t like blue, but if it’s gotta be blue (I KNOW there are a few admin “themes”) then it can’t have green — at least not that kind of green.

*goes to tweak the admin stylesheet*

Ah, a bit better. I thought about leaving all the rows as plain grey (or white) but figured maybe distinguishing activated plugins comes in handy when I’m in a real hurry or suddenly can’t read……….
Plugin list after tweak

Now, where was the other green ghastly thing I caught a glimpse of…

Note to self: The next time you upgrade, remember to save a copy of admin quicktag hacking… AND remember to check which plugin files are in wp-admin

Exclude pingbacks from comments RSS

A weird character in Jafer’s pingback title (or site title, actually) messed with my comment feed, so I decided to exclude pingbacks (as I won’t allow trackbacks) from my comments feed. I tweaked wp-commentsrss2.php file (found in the root WP folder), around lines 36 and 44:

AND $wpdb->comments.comment_approved = ‘1’ AND $wpdb->comments.comment_type != ‘pingback’

Comments are of type ” (null) and trackbacks are ‘trackback’, so I think putting comment_type = ” would work as well and you wouldn’t have to put a != (not equals) for both pingbacks and trackbacks.

[edit: May 9] That was a short-lived hack. WP1.5.1. solves the problem with odd characters causing grief for RSS feed readers [/edit]