July 2005

You are currently browsing the monthly archive for July 2005.

Unless you live in a cave (I’m not judging) then you’ve probably heard of Dan Brown. If you haven’t heard of Dan Brown then you’ve probably heard of “The Da Vinci Code”. If you’ve heard of neither then I suggest you watch less TV and stop collecting porn from the internet. (I’m still not judging).

I won’t blog on about how fantastic the Da Vince Code is (it really is) or how mind-blowing the concepts where (they really were) or offer my thoughts on the validity of Dan Brown’s research for the book (not enough time in the day). Nope. This is about one of his earlier novels: Deception Point.

If you’ve not read it, then stop reading this puerile obfuscation of the written language (that’s this blog by the way) and go read it now.

If you need a little tease (still not judging) then reads on…. (Please affect your best “Deep Movie Trailer Voice”).

There are no direct spoilers here, but if you prefer not to know anything about this book, turn away now. Not looking at your computer screen now? That’s a bit silly.

President Zach Herney is in trouble. He’s taking a beating in the polls for the forthcoming presidential election. A stoic supporter of NASA, he’s backed and funded from tax payers money a string of expensive NASA blunders.

His rival, the ruthless Senator Sedgewick Sexton, is riding a wave of unrest from the American people he’s stirred by condemning the billions of tax payers money that’s been wasted on failed NASA projects and he’s all but guaranteed the presidency.

As the situation gets even more desperate for the President, a new NASA satellite detects evidence of an astonishing object buried deep in the Arctic ice: a meteorite containing the fossilized remains of extra terrestrial life. The floundering space agency appears to have struck gold and will silence all their critics with their find.

The President dispatches Senator Sexton’s daughter, NRO intelligence analyst Rachel to the Arctic to verify the find. She’s accompanied by a team of NASA and civilian experts, including the charismatic “Amazing Seas” presenter Michael Tolland. Their every move is watched by the mysterious Delta Force taking orders from “the controller”.

However, things start to unravel quickly when Rachel uncovers that the object isn’t all that it appears to be. A shocking discovery that will plunge the country into controversy.

Before Rachel can make her findings known she realizes that her discovery puts her life, and the lives of others in danger. Fleeing for her life with Michael Tolland and Corky Marlinson - a NASA scientist - in the dangerous Arctic conditions they have only one hope for survival: to find out who’s behind the deception.

Back in Washington, the election grows closer and the stakes get higher. William Pickering, the NRO director is frustrated with NASA’s regular security leaks which put their technological advances into the hands of the highest bidder. The NASA administrator, an ex-Pentagon man is fighting to keep NASA from being restructured as part of the governments intelligence community joining the FBI and the CIA. The President, taking advice from his sly senior advisor Marjorie Tench, prepares to tell the world of NASA’s discovery.

Sounds good, doesn’t it? It is. Dan Brown has really done is research and although you’re entertained, you also learn a fair bit about the Arctic, meteorites and fossils. His technical detail is on par with Tom Clancy although it’s not as dry as some of Clancy’s work. His real flair is in involving the reader. This is a book that you won’t want to put down.

Now, go read it.

It’s still early days, but here’s something I’ve thrown together this afternoon.

Originally, I was going to write a quick and dirty script to compare two ipb_template.xml files together and show a list of differences. I would re-format those differences and post them with a release announcement showing exactly which template bits had changed and which HTML bits had changed.

I then considered how useful this would be in a general sense. Wouldn’t it be nice if you could upload any ipb_template.xml file and have it compared to the current master HTML templates? Not only is this useful for just comparing changes between version releases, it’s also handy to generate a list of the actual HTML edits to your own custom skins for safe keeping.

This is the result. It’s fairly scrappy at the moment and the interface will be cleaned up as well as previous comparison results saved to the DB for hard reference.

This feature didn’t take too long to put together as I had already written a difference engine for IP.Dynamic - although the current difference engine won’t work for safe_mode enabled folks; something that will be working on as our adventure continues.

ACP Diff Overview (JPG)
ACP Diff View Bit (JPG)

[IPB 2.1] API

A party inside?
A persons IQ?

Nope. Application Programming Interface. This exciting term encapsulates the ability to interfere with a program without having intimate knowledge of the program’s code. Good idea, I say.

With this in mind, I’ve started work on IPB 2.1’s API. Now, fundamentally IPB has core classes, of which an API layer is wrapped around then and then another layer wrapped around that called ‘HTTP-API’. The HTTP-API wrapper will allow one to fire off commands via the wonders of POST or GET. When correctly configured, you’ll be able to update your member’s signature with a command as insanely easy as “httpapi.php?api=members&-save-signature=hax&id=32&apikey=hilariously
longkeyhere’. This further abstracts one from the realities of getting one’s hands dirty with nasty old PHP code.

However, before we get all carried away with that, we first need a good solid API structure which interfaces with the IPS classes without re-creating too much code. Our utopian fantasy would involve lots of naked women, I mean, it would involve being able to write a whole suite of API classes and then write a framework called IPB that uses them. However, this is still a relatively distant dream simply because the average forum system is one big bad-ass hack. Programming theory and the reality of cramming 350 accounts on a P4 web server don’t often run along the same lines. The average forum system (and indeed, the average web application) takes advantage of several short-cuts to reduce the number of loaded classes and queries. This isn’t ideal but the having your program banned is less desirable.

So, I’ve had to suffer a little duplication. Originally I had planned to make the Posts API directly load class_post.php functions but class_post.php is only really set up to deal with the current logged in member (something that will be addressed in IPB 3.0) and thus not useable. Fortunately, I’ve been able to make use of class_post in other areas, such as topic rebuilding, forum rebuilding, stats rebuilding, topic tracking and forum tracking meaning the only real duplication we have is with the actual data insertion. Good enough until I go through the code during IPB 3.0’s development cycle.

Here’s how easy it is to add a reply to a post:

$api = new api_topics_and_posts();
$api->set_author_by_name(’matt’);
$api->set_post_content(”Hello World! :D”);
$api->set_topic_id( 100 );
$api->create_new_reply();

And topics…

$api->set_author_by_name(’matt’);
$api->set_post_content(”Hello World! :D”);
$api->set_forum_id( 10 );
$api->set_topic_title(’Hello World’);
$api->create_new_topic();

Busy Week

Well, that was a busy week.

Two BETA releases, over two dozen bug fixes and I still made time to move my blog from Typepad’s hosted service to a fresh MT installation on IPS hosting.

There’s not a lot to report at this stage. BETA testing is going well and with fewer bugs that I expected considering the huge amount of changes since IPB 2.0.4. I wanted to make another beta release so that I didn’t have to face a forum full of re-posted bug reports this coming Monday. The bugs that have been fixed are easy to find and will definitely result in someone else discovering them and posting them. Fast releases always keeps the blood pumping too.

Next week will see everything bar the ACP language packs finished which will allow me to go back to IP.Dynamic which I’m looking forward to doing. We (Charles, Lindy, Josh and I) have been using it at a secret location for reasons I won’t disclose and we’ve all got some ideas and ways to improve it. I also need to upgrade some core coding to bring it up to IPB 2.1 level which won’t take long.

See you next week…

I’ve finally finished this feature off. Hoo-rah.

I’ve renamed it to "ACP Restriction Permissions" as it better suits the way the interface works. Basically, any admin in a group which has ACP access has full unrestricted access to the ACP. This only changes when they are added to the restrictions list. When first added, they don’t have access to any area of the ACP.

The restrictions can be at tab level (Management, Look and Feel, etc), root feature level (Members, Forums, Template Editing, etc) and at sub-feature level (Add member, edit members, add forums, recount forums, etc) or a mixture of all three.

This means that if you just want an admin to manage skins, you can do this at the "Look and Feel" tab level. If you also wish to only allow them to edit existing skin sets, you can do so at feature and sub-feature level.

I won’t bore you with how it works, back-end and database wise; apart from saying the actual PHP sources are picked through for permission checks and the database is built up from that which makes developing easier as I don’t have to manually keep a list up to date.

The front end is mostly javascript and Ajax. I think this is a good example of how Ajax can take what would otherwise be a complex interface and make it much easier. Without such a system you’d have to rely on a series of page loads and a lot more PHP work to save state between pages.

You’ll notice that the sub-feature level rows are auto-saved when another tab or feature tab is clicked. There is an optional manual save which turns red when a change has been made.

acp-perms.mov (Quicktime .mov 4.8mb)

UPDATED (12-July-05: New interface components) acp-perms2.mov (Quicktime .mov 2.2mb)

UPDATED (Again: Added quick links to allow perms for entire section) acp-perms.jpg

London

I feel compelled to comment on today’s events.

I don’t want to add speculation, or claim to know all the facts. News is still coming in and there are no hard figures on the number of fatalities and casualities and it still hasn’t been confirmed, at the time of writing, exactly how many explosive devices there were.

I feel compelled to comment on the wholly British way London has responded to the cowardly and shameful attacks on an unsuspecting public. It’s often in such unimaginable situations that the real strength of a nation shines through. We saw the fierce pride and resolve that America displayed after the tragic 9/11 attacks and how the world grieved with the American people.

The British stiff upper lip is being throughly tested today. Eye witness reports are coming in from those who were trapped underground after the explosions ripped through the underground carriages. For the most part, people remained calm, removed the odd window for ventilation and waited for the live track to be switched off before being led back to a platform where the local church was handing out cups of tea. Such an ironic display of our national stereotype brings some comfort in another wise horrific time.

I can’t begin to make sense of today’s attack. Seeing familiar places, such as King’s Cross, swamped with emergency services leading out the walking wounded is as shocking as it is surreal. The fall-out from today’s events is going to be far reaching.

For anyone who has family or friends in London, I hope they are safe and well.

About Me

Me
I'm a web developer (PHP / MySQL / DOM) based in the UK. I am the co-founder and C.S.A of Invision Power Services, Inc.

Last.fm Chart

XBox Live

Spam Monitor