As you might know, YOURLS development is now hosted on Github. It's now easy to download the current development snapshot, since Github provides an archive/master.zip. But not so long ago, YOURLS dev was hosted on Google Code, where there is no such convenient way to download the current SVN trunk as a .zip archive. To […][...] → Read more
Archive for the "Code" Tag
I was having a look at my Profile page on WordPress.org and wondered how many downloads all my plugins had. Start Menu, Accessories, Calculat.. HEY? What am I doing here? Bookmarklet Fun The following Javascript snippet will do the job for you: < View plain text > javascript (function () { var total […][...] → Read more
I've been speaking lately with folks from Spamhaus about anti spam measure in YOURLS and a YOURLS plugin for this. Currently the #1 result in Google for "spamhaus PHP" is a post on Lockergnome which gets it totally wrong and provides a script that does not work, so here is a PHP script that does […][...] → Read more
Ho haï, blog, long time no see! :) I was checking stuff on various URL shorteners and noticed is.gd has one interesting feature: you can generate short URLs that are "pronounceable" (no "vgfhgt"). This is a great little touch: a random but pronounceable word will be more memorable and the probability for typos is reduced, […][...] → Read more
Often when viewing a Twitter profile, the same comment pops into my mind: "Does this person follow me?". That's a basic information Twitter profiles still fail to clearly show. There's a neat site you may know already, doesfollow.com, which lets you know if user1 follows user2 in a very simple way: check http://doesfollow.com/user1/user2 (example). Simple, […][...] → Read more
Lately, every time I manually flagged a comment as spam, I started to have the impression that they all were posted on the same post, namely an old announcement for my plugin "Absolute Comments". An SQL query later, my impression was confirmed: this blog post *is* a spam magnet: I suspect that some particular keywords […][...] → Read more
There's a cool (and underused by plugins) API in WordPress: the Transients API. Transients are temporary options, ie options set with an expiration time. Anytime you're storing options and they have a short life span, you should use transients instead.[...] → Read more
I've recently moved to WordPress an active community site which is run and moderated by several editors and administrators. Each post gets dozens of comments, and I wanted to highlight those made by staff members. What not to do If you've googled a bit for a solution on how to identify authors' or admins' comments, […][...] → Read more
Short intro for readers who don't follow me or this blog's feed: I've been a judge in the annual WordPress Plugin Competition, and as such I have reviewed a number of plugins. Read more about this. As promised, I'm going to share a list of the most common mistakes, errors, misunderstandings, bad habits or wrong […][...] → Read more
In the upcoming WordPress 2.8 there's an interesting function set meant to help authors manage their plugin custom options. In a nutshell: whitelist your options, define how you want them to be validated, and just lean back and rely on the API to handle everything for you. Your new best friend is function register_setting(), and […][...] → Read more