RT @JohnSimpsonNews: Depressing to hear @andrealeadsom echoing the Soviet view of broadcasting - that its duty is to be 'patriotic' - i.e.…
Blog posts tagged “php”
This is what I coded last night, an engine for search suggestions.
Believe it or not, the table being searched contains only four rows (now at least), but the goal was to be able to make awful spelling mistakes and still get matches. I think I've 80% succeeded in doing so - there are still some optimizations that could be made, I'm sure.
Read more to check the code!
INSTANT UPDATE: My coding readability standards have changed slightly since this post.
This is a function that I wrote in the last half hour to solve a small problem: coding an auto notification system that notifies admins about how many new posts are awaiting moderation. Preferring nice english numbers such as twenty-seven, I put my coding skills to the test, and this is what I came up with:
For those that are interested, this software is no longer in beta status and is at version 2.0. The URL is the same, but there are less issues than this post implies.
I've never used twitter and never will do, ever, and that's just a fact. I don't have the time, and if I did, I'd use that time for something more worthwhile :)
BUT - and this is the subject of this post - I am developing my own version of twitter. However, it's for a very small scale site belonging to my friend's minecraft server (which is actually running on my server), but it works on the same basic concept: have a wall (...)
This has been superseded by a new rewrite. See relevant blog post.
If you looked to your left, you'd see a new 'Random songs' block. This isn't a default drupal block, it's one I programmed today at much effort! OK, admittedly I'm using the jPlayer jQuery based software to actually play the music, BUT I programmed the rest (ie. generating the random songs without reloading the page, and rendering them into the playlist using jPlayer's API).
Basically this is how it works:
There's a PHP script on the server which queries from a MySQL database containing songs - it generates 4 random so(...)
I completely revamped this site from the ground up, hope you like the changes.
Basically I was operating a wordpress-based site before, as I hadn't been enlightened to the greatness of Drupal. Drupal kicks Wordpress' arse, seriously.
Two major changes are that I've completely changed the picture gallery, and I'm now hosting the videos directly from my server (instead of youtube) [IE users can fuck off, HTML5 only I'm afraid], using flash for now. Not sure how long this'll last...if I actually get any sort of traffic I'm (obviously) gonna have to go back to youtube - I've only got a domes(...)
It turns out it's easier to kill something (almost) with software than with hardware! At least for me it is :)
I replaced the ageing and *crap* "450W" no-name PSU from the server a few days ago with a great Corsair one (Corsair are the best), after a scare about crashing every few days (ie. if I'd left the PSU in there, the whole thing would have blown up before long).
So, with all running smoothly again, I decided to do a little server smashing with PHP and GD.....
Well, that wasn't my original plan. My original plan was to build something with PHP that would generate a visual graph (...)