Posts by tag: php

Displaying Random NextGEN Gallery Images

In NextGEN Gallery plugin for WordPress prior to version 2.0, it was possible to display a limited number of random images from one specific gallery — like so: This would output eight random thumbnails from the gallery with ID 25, each time different pictures when the page is refreshed. Unfortunately (“thanks” to the company which […]

VKFacebookGoogle+OdnoklassnikiTwitterLiveJournalShare

Coding Style: Vertical Alignment Sucks

No, it doesn’t! — another opinion That’s right, vertical alignment sucks. Big time. Call me names and throw stuff at me, but it’s like a plaque, it’s everywhere, and I really, really don’t understand why. Get ready, this is going to get emotional. I am talking about something like this: Folks who “format” their code […]

VKFacebookGoogle+OdnoklassnikiTwitterLiveJournalShare

Stray Quotes Z3

Stray Quotes Z version 1.9.9.z3 has been released! Changes since last version: exclusion of invisible quotes from stray-all shortcode’s output when using multiple categories; fixed corrupted character encoding in search box on “Manage” page after search request submission (affected accented, Cyrillic and other “non-A-Z” letters); fixed a couple of initialization issues producing PHP notices. To […]

VKFacebookGoogle+OdnoklassnikiTwitterLiveJournalShare

Randomized Post Loop in WordPress

This simple WordPress plugin gives you A Random Post Loop (which you can use to replace any loop on your blog, including The Loop) populated with an arbitrary number of random posts chosen by criteria you specify. It works in the same way as WP_Query::query(), with (so far) one significant difference: it allows you to […]

VKFacebookGoogle+OdnoklassnikiTwitterLiveJournalShare

Stray Quotes Z

This is an adjusted version of Stray Random Quotes plugin (version 1.9.9) originally written by ico for displaying and rotating quotes and expressions anywhere on a WordPress blog: The reason I forked it is the apparent “offlinety” of the author since July 2009: no new posts on his blog, no updates to his plugins, no […]

VKFacebookGoogle+OdnoklassnikiTwitterLiveJournalShare

Unwanted Escaping Backslashes in WordPress 2.9

After an update of a WordPress installation (2.8.5 to 2.9.1), I noticed that one of the plugins, Stray Random Quotes, stopped working properly: each time I submitted or updated a quote containing apostrophes or quotation marks, it came with escaping backslashes in front of these characters. A couple of teacups later I figured out what […]

VKFacebookGoogle+OdnoklassnikiTwitterLiveJournalShare

Shoot Yourself in the Foot

Maybe you’ve seen one of those funny quick guides to programming languages based on Bjarne Stroustrup’s “foot shooting”, like the one I found on Michael Thompson’s blog (this is the most complete list of languages I’ve seen so far). Read it first if you haven’t. Here’s my two cents. PHP: You shoot yourself in the […]

VKFacebookGoogle+OdnoklassnikiTwitterLiveJournalShare

Categories

Tags

Ads I

Think About It

“When I let go of what I am, I become what I might be.” — Lao Tzu

Ads II

Puns & Slips

“Вчера вроде бы нашёл вторую половинку... Всю ночь мерил -- не моя.”