I’ve had an idea. I’ve been having lots of ideas lately but this one has been in my head for a while. There are lots of Content Management Systems or CMS’ out there, software that you use to build and maintain a website. They come in all shapes, sizes, and complexities. I have observed there is a missing niche among all of these CMS’. Something that is simple to use for non-computer people, and offer the basics without going overboard with complexity or features. This WordPress blog I’m typing on now is a good example. In fact WordPress has become very popular as a CMS for small websites where you just need to make a few pages.
That is where my inspiration came from. Our SCCA webpage could use a CMS like that. And a friend of mine runs a videography business where he wants to be able to update his site frequently. You could just use WordPress for these sites, but why drag along all the blog oriented code when you aren’t going to use it. Plus I believe WordPress could use a good tune-up. It is still written for the no-longer-supported PHP4.
So I started writing my own little CMS in my spare time. It’s very slow going. It’s hard to get something really going when you are doing it two hours at a time. and of course I’ve been running into some snags and doing a lot of learning. One of those snags turned out to be database access. I saw that I would be writing a bunch of similar queries. So I wrote a lightweight database abstraction layer to automate some of that SQL creation. This database layer is based on PHP5’s PDO, meaning it has an object oriented interface and I can use it to connect to many different databases, assuming the SQL I write is compatible.
I don’t want to re-invent the wheel so I looked at two frameworks that do something similar, Zend_Db and Solar_Sql for ideas. They both take a different approach on how to handle prepared statements and how to pass the data into them. I tried to take the middle road and support both. The solution which I came up with, I recently found out won’t work. So I’ve got to give it a big re-think. It’s thing like this that are slowing the project down. Plus the stop-starting from lack of time. I didn’t want to talk too much about this project until it was more together. but based on this “little” setback I realized that it’s going to take a lot longer then I hoped for this thing to see the light of day. So I might as well talk about it online. I certainly haven’t been autocrossing this summer. :-(
I had to write a custom function in Excel for work. So I had to use Visual Basic for Applications. Using that language feels like the going back to the stone age after getting pretty familiar with PHP. I kept thinking “I could do this in five minutes in PHP.” You have to worry about type casting, or rather type conversion, constantly. I had
CDbl everywhere. And you can’t easily do a dictionary array. And it was the lack of sensible type conversion that did me in. My function kept complaining about incorrect types. I ended up finally finding code for what I needed to do online. I didn’t see any obvious differences that would have caused the error. So be glad for PHP being as good as it is.
Last weekend I rolled out an upgrade to phpBB3 for my local SCCA region’s discussion forum. That includes a theme customized to match our region color of yellow. I have added on several extra features to extend the functionality of the software. One of which is a Topic Preview that show you an excerpt of the first post when you hover over the link to said post. I am now actually the developer/maintainer of that MOD. I could and should write a few blog posts dedicated to that subject. I place of blog posts you can read about it in my discussion forum.
The conversion went well. We convinced our host to move us to a server with PHP 5 and MySQL 5 prior to the conversion. The old version of MySQL that was used didn’t have UTF-8 support and the developers had to do a bunch of kludging to get UTF-8 support. Although we really don’t need the UTF-8 stuff that is the way the software is written so everything should be on the same page. And unless you’ve been living in a cave PHP 4 will be de-supported in August. So I wanted to start this version of the forum off right instead of having to convert a kludged database. That meant creating a new database. I wasn’t sure if I could do that though. I was under the impression I had to do the upgrade in the old database. The documentation or info in the support forums didn’t help me find the answer I was looking for.
Well after starting the install based on doing it in the old database I figured out that you could make a new DB and still transfer everything over. So I killed what I was doing and started over with a fresh MySQL 5.0 DB using MySQLi drivers. 😀 The overall reaction has been positive. There was of course some growing pains just because it was new. I found a problem with my Topic Preview MOD in that it has a flicker in IE (I knew about that) but also in IE sometimes the preview box covers the topic link so you can’t click on it. That I didn’t know about, but I realized I should be doing more cross browsing testing. I have done a lot of searching for a solution to this problem but can’t find anyone with the exact same issue. I finally recently found someone with a similar situation who figured out the issue happens when text has to be wrapped in the preview box. I consider this a bug in IE because Firefox handles it just fine.
I also found an issue with posted images. There is a section of the Admin interface that allows you to set a max width for images. I thought that the board would use CSS to resize images to a the max size. But what it does is check the dimensions of the image and prevents you from posting if they are larger that the max. That is inconvenient at the least and with so many computer illiterate people on our forums unacceptable. I pretty much have a solution mapped out that involves assigning a class to all images in posts. But after modifying the phpbb template file that deals with bbcode the changes aren’t showing up. And phpBB.com hasn’t been any help so far. I’ll be posting up in my discussion forum once I gt it figured out.
I’ve been busy lately with some geeky projects. Well one is kinda autocross related. :-p My SCCA Region runs a discussion forum as part of the website. Since I have some coding knowledge I volunteered to help put with the website and got put in charge of that. We use phpBB software. It’s free, its stable, pretty popular, and with lots of user submitted extensions (Mods) and styles. And they have recently released version 3 of their software. It is a total re-write of the code with numerous enhancements both for the users and admins. We want to roll this out but first I wanted to make skin for the new software using our region colors. Our current skin is the default one that comes with the board. The new default skin has too much bright blue for me. And I wanted something a little different. I hope to roll that out soon. Using our “region color” was tough because it is yellow. Yes, yellow. It is really hard to work with. Really hard. But I am close to something usable that everyone can agree on.
I’ve also installed some mods to extend the functionality a bit. And I have modded the code a bit myself, as well as helping to get the Topic Preview mod working. I’ll be posting up these mods in the discussion forum on this site, which is run on… you guessed it, phpBB3, soon. Then I will be posting them in the Mod Development forum on phpBB.com. IN addition to that I’ve been woking on some updates to this website. I need to create a new portal or front page for paulgarvin.net. I can’t decide if I want to have a dedicated portal or just use this blog for the front page. Hhhmmm. AND… I’ve been working on something I wanted to do for a while, put weather info on the website. I’m re-writing an older WordPress plugin that I found. More about that in another post. Oh the off-season. And of course there is the wedding stuff which you can read about over on our wedding blog.