Welcome!
DevBits is a collection of web development articles, tutorials, code, templates & resources. If you want to know more, there's a little background on the about page.
Latest Updates
Please Help Fix The Web
Posted In : Home | News, August 15th 2012
Something I'll do more of as I update DevBits, will be post some thoughts around other sites and services, and mostly I'd expect this to be what I feel are useful resources. On this occasion, what I want to talk about can be useful for many, but only with your help.
FixtheWeb was born a couple of years ago now. The goal of the project is to tackle the issue of web accessibility for disabled people. In simple terms, to help educate web masters around the importance of a web that's accessible to all. By doing this it also acts as a service to address reported accessibility problems, and provide feedback to people struggling to view or navigate certain web sites.
I volunteered to help with the project some time back, and while I have to admit there's been some long periods where I've not actively been checking for new reports, throughout most of the time I have they are normally of a similar site type, or from the same small handful of reporters. The limited number of people submitting issues suggests there's not enough knowledge of, or not enough confidence in the project. If people are not picking up reports, acting on them and providing feedback then that awareness and confidence isn't going to grow, and it will fail.
Please spend a few minutes looking at the F.A.Q for the project. You'll see that it's easy to get involved, and only asks for as little or as much time as you want to give. A more widely accessible web is a good thing for everybody. Disabled people have the ease of access to information that's available to so many, and web masters reach a more complete audience.
Nested Quote Tags
Posted In : Code | PHP, August 13th 2012
I need to test posting PHP code to the home page so .. This has been helpful for a few people. A small snippet that manages the output of nested quote strings, such a below.
[quote=user1]Parent Quote[quote=user2]Child Quote[/quote][/quote]
We just check all instances of a quote, and replace them individually.
<?php
$str = '[quote=user1]parent quote[quote=user2]child quote[/quote][/quote]';
$pre = '';
while($pre != $str)
{
$pre = $str;
$str = preg_replace("/\[quote=(.+?)\](.*?)\[\/quote\]/si","<pre>Originally posted by $1\n$2</pre>", $str);
}
print $str;
?>
OSVDB Vulnerability Archive
Posted In : Archive | Retired, August 13th 2012
As part of my (rather slow) progress to update this site. In addition to getting any half finished content completed and posted, I'm also archiving any old data.
Here is part of the OSVDB vulnerability data from the home page feed - about 1,600 entries. I need to recover and merge this with another old database, which has the remaining 60% or so of records. Once I've done that, I will get the entries ordered by date and searchable.
Selecting A Web Host
Posted In : Articles, May 14th 2012
It doesn't matter how much time you might spend writing decent content for your website, optimising your code or dedicating hours to producing quality services or information, if you can't find a stable platform to host your site then most of that time is wasted.
I may at some point expand on this article. For now we'll talk about resources, location, finding a real company, domain registration and special requirements.
Embracing Social Media
Posted In : Home | News, April 14th 2012
I've never been a fan of the social media craze. I don't use Facebook, Myspace etc. I only have a twitter account because the BlackBerry app forced me to register in order to view others feeds, annoyingly. I've never posted anything to it.
One part of the madness I've decided I should embrace as a minimum, is letting you submit pages from this site to the likes of Reddit, Digg and Delicious. So here they are, just those three for the moment - over on the right of the page under the W3C buttons.
I edited the underlying code for each a little, as I don't want a huge amount of JavaScript in my pages, but I tested and they should work ok. I'll not go on about the fact I had to sign up to each just to do that, more accounts I don't want, oh well.
Time For Some Updates
Posted In : Home | News, April 12th 2012
As some will be aware, this site hasn't really had any decent updates for a while. Recently, I've slowly started to fix some of the bugs and plan out a general idea of how I see things going forward. I've made my changelog visible for anybody that wants to keep-up, and outside of the bits in that list, the main focus will be:
1. Complete and upload the collection of half-finished articles and tutorials that I have lying around.
2. Either update or remove anything that's outdated. For example, I think there's even some tutorials using PHP functions that are now depreciated! Bear in mind I wrote much of this stuff around 2002-2003!
As point two stretches right across the tutorials, articles, code examples and files, it should keep me busy for a while. I might even get round to enabling comments again to gather some feedback.


