Thursday, February 3, 2011

More php

So I got bored and whipped up 4 new things in PHP. After refreshing myself on a bit of SQL, I got to work and made a simple business site. It has editable pages via an admin panel which you can also use to upload images and add them into the pages. It is pretty much, a very simple and barebones blog system for small businesses. I'll probably make it generic enough to be rolled out whenever someone wants a similar system.


http://jonno.9ch.in/doors


The problem with this is that the client I did it for, had their own terrible hosting and domain (that's the www.example.com) name that won't update to point at it! Otherwise it was pretty simple after fixing problems with the layout of tables.

The second one was a Ticket Support system. It's basically a bug tracker, where if someone has a problem with some of our software, they can go there and submit a ticket, which will appear on a list for them and me. The idea being that I read the report and any comments and get around to fixing the problem. It also has a todo and FAQ system tacked on.

The third application I made is a text bulletin board system (there are a gazillion different sites like this). It's pretty simple, but getting the threads and comments to display just right took a while. Plus it has emergency raptors. You can see it here:


http://jonno.9ch.in/bbs/


The best feature I would say, is the uncrackable trip codes using Blowfish encryption. Normal trip codes (as seen on 4chan and similar sites) can easily be cracked on any modern computer within a few minutes. So you too can assume the identity of your favourite tripfagging poster.

The other thing I made was a Photo gallery, I originally set it up to store photos locally and use a database to manage them, but I then looked into the Picasa API which allows you to access the images from a picasa photo gallery. But getting this right has been a major problem, (mostly because the example code given only shows how to get the names of the images and not the images themselves). Rather frustrating really. Although I did find a nice slideshow to show them in which can easily integrate with flickr (you give it an album ID and it will use the images in that album in the slideshow). But picasa is a lot harder than that. You can view it here:

http://jonno.9ch.in/gallery/

All 4 of these make extensive use of a MySQL server. Which is a relational database management system that accepts 'queries' and will return a state from the server in the form a table similar to the kind of spreadsheet you might see in Excel. Or it will return an error if you made a syntactic mistake in your query, or a confirmation to say that the database has been updated. This made things a lot easier, because it avoids alternatives of constructing your own database or managing a convoluted system of files and folders. It's also quite fast (at the expense of consuming a lot of RAM) and the whole system is completely standardised and well documented. In fact, I should probably update the TPFC website to use MySQL...

No comments:

Post a Comment