Archive for PHP/JavaScript (3 posts)

Bits of useful PHP or JavaScript that I’ve either modified or developed all by myself. Includes WordPress hacks.

Post contents are hidden. Show post contents:

Page 1 of 1

Single and double quotes in PHP

I don’t know why this took me so long, but I just discovered that in PHP, there is a difference between double and single quotes. For example, the two variables below actually behave slightly differently:
$var1 = ’string\\t1′;
$var2 = “string\\t2″;
echo $var1; would produce string\t1, whereas
echo $var2; produces string 2 — with a tab character between the ‘g’ [...]

Read the rest of this entry

Remove inline uploader from WordPress — a plugin

After installing WordPress 2.0, I found the inline uploader began to get on my nerves. I don’t use it, and I wanted rid of it. I was going to write a plugin to remove all the unnecessary crap that comes with WP 2.0, but I don’t understand the source code well enough to do it [...]

Read the rest of this entry

Two hacks: SPG and WordPress

Just a brief post whose purpose is simply to include links to two articles I wrote about hacking Simple Photo Gallery and WordPress in the “PHP/JavaScript” category.

Removing the URL prefix from Simple PHP Gallery
Inserting the date and time edits are made into posts on WordPress

Update: Just simplified the article, and added one for enhanced SPG.
That’s [...]

Read the rest of this entry