PHP Tutorials
Force Login to View WordPress Blog Pages
I was recently working on a private / "closed" website that featured WordPress. User management is a must and content can only be seen if the user is logged in. I was shocked to find that WordPress didn't provide an option to accomplish this task. Luckily...
WordPress JSON API Plugin
Ever since I moved to a mostly-JavaScript job, I've become more and more enamored with the simplicity and usefulness of JSON. Now I want everything available in JSON format, and when I encounter a service which doesn't provide a JSON API, I have a...
Object Indexing vs. Array Collection
The Setup & Goal Let's say that we have one large text document and we have a a bunch of keywords that we want to parse the document for. We don't care how many times times the keyword appears -- we just care that it's been used.
Change Category Slug within WordPress
When I first started this blog, I set the category "slug" to "sugar." Why sugar? Because a lot of a good thing is candy; thus, a bunch of MooTools tutorials is as sweet as sugar. While I get a giggle out of calling my categories sugar...
Build HTML Tables From MySQL Tables with PHP
I was recently completing a project which required that I build a series of HTML tables which would represent all of the tables within a MySQL database. I didn't have anything created but after a few minutes I had exactly what I needed. Hopefully this helps...
Create Bit.ly Short URLs Using PHP: API Version 3
Bit.ly is a great URL shortening service. I love their reliability, shortness of the URL, and the information they provide about a given URL. Recently Bit.ly updated their API to version 3 so I thought I'd update my original Bit.ly post.
iPad Detection Using JavaScript or PHP
The hottest device out there right now seems to be the iPad. iPad this, iPad that, iPod your mom. I'm underwhelmed with the device but that doesn't mean I shouldn't try to account for such devices on the websites I create. In Apple's...
Automatically Generate a Photo Gallery from a Directory of Images: Updated
Two years ago Chris Coyier wrote an outstanding tutorial detailing how you can generate a photo gallery based on the images within two directories: a thumbnails directory and an originals directory. I've decided to take his tutorial a step further by...
Using MooTools ScrollSpy to Load More Items via JSON/AJAX
Last July I wrote an epic dominant unbelievable fantastic outstanding awesome NetTuts post called Create a Twitter-Like "Load More" Widget Using CSS, HTML, JSON, and jQuery or MooTools where I used a MooTools/AJAX/JSON system for loading additional items when the user clicks a "Load...
ID Your Body Using PHP
It seems like every part of a website needs to be dynamic. Dynamic, database-driven pages, dynamic JavaScript, dynamic CSS, etc. All this dynamism can make it difficult to style or script a page easily. One way I've learned to combat the rigidness of...