Building “The CMS” – Part 1
Hey!
In the first part of the blogging series about my new project, I'll look over the most important features / modules "The CMS" should have - The name of the CMS haven't been decided yet, and is therefore referenced to as "The CMS".
There's a quite long list of features I want implemented, but most of them is backend stuff which is going to make "The CMS" unique, and some of it can therefore not be shared - or at least not yet!
1. System Logs
Logs... Which developer doesn't love a log to tell them what went wrong where and why, when the client says "The thing is broken, I didn't touch anything - I swear!".. yea right. I guess all people that works with computers have heard that line at least 10 times. System logs will help finding the source to the problem either for you as a developer or for the client if he's a bit techie. A fully featured system log monitor to view different levels of errors or messages is just a must - at least for me!
2. Modules
First of all, all modules needs to be able to turned on / off. I want my clients to be able to download modules from a website and easily install them, either by dropping the files into the modules folder or by interface in the control panel haven't quite decided on that yet
2.1 Blog
Every CMS should have a blog. It's just mandatory, not much to talk about here. I'm thinking something like Wordpress with comments for each blog entry with the ability to comment on comment. Depth can be discussed though.
2.2 Forum
I've wanted to make a forum for a long time, but it's going to have a low priority because my current client isn't in need of one. I think I'll get back to this later when it's relevant.
2.3 News
News is lovely. When having a website, you might want to update the users of the site with news about your company or just the site in general. I'm thinking RSS feeds (ATOM, RSS2), email to suibscribers, and a dedicated page for news. User should be able to choose which or all via CP options.
2.4 Gallery
Gallery should support unlimited categories, unlimited nested categories (who the heck needs that, but it should be easy to do so whatever), image into multiple categories and image & category descriptions. The use of effects (defined in gallery layouts?) when browing categories / showing images in large format.
2.5 Articles
Instead of old static HTML, this will be used. Almost all HTML tags should be allowed - pretty much up to the user how these pages should look besides the layouts that's being defined somewhere else in the CP.
2.6 Widgets
Create widget areas to put data from other modules in them. I'm thinking that each module has output functions that represent different widgets. Like the forum could have "newest topics", "latest replies", "newest members" - all which are different widgets and can be placed different places around the site. Instead of having to edit files and hardcode {widget.run('test')} - like I THINK I saw PyroCMS use - I think some clever widget hooking could be put in place, so that you can choose from a list of available places when creating the widget.
2.7 Profile
A module for profile information. This could be post count for forums, blog / news posts, account balance for eShop ect. Might just work as a user control panel for changing email, password ect.
2.8 Memberlist
A list of members on the site. That be feed / mail subscribers, eShop customers, forum users ect.
2.9 Private messaging
When having a decent amount of users, private messaging could come in handy right? This could be a forum-only feature instead of a standalone module - who knows...
2.10 eShop
This could be a seller. I've already been contacted by a friend whose friend might be interested in an eShop, and it's a pretty handy module - could even use it for the company I'm doing with THP44.
3. System Restore
Everyone is able to fuck up once in a while. Having system restore points could be handy when some critical unrecoverable error occurs - god forbid it ever happens. Udi Mosayev has an interesting approach to this. He's using a database table to record every update statement used on another table, holding the old and new field value with the field and table name so he can revert it if needed. This could be a good idea if you need an option to revert the last process e.g. when updating settings in the CP. An issue with this could be when mass updating settings, which could possibly create hundreds of rows within seconds. A cron taking snapshots of stuff like settings every x minute, hour or day could be neater.
A lot is on the drawing board and subject to change. Can't wait till I finish up the E/R diagram and start working on the core
An update
It's been quite a while since I've blogged, and it's mainly due to the massive amount of homework I've had up to my exams.
I've just finished my written exams and is currently having a week to breathe before starting the orals. In the meantime I'm puzzling with a new firm with the friend I did TULM with, THP44. We're currently in contact with the owner of the domain we wish to have for our company, but he was kind at initial contact so it's looking promising.
Our goal with the company is to sell web solutions with a highly customizable CMS, which I'll be blogging a bit about over the summer, starting today.
The meaning of int(size) in MySQL
I've sometimes been confused about the size in int(size) when creating a field in a MySQL table. I stumbled about a blog post of Alexander Kirk that explains the meaning:
Usually you see something like int(11) in CREATE TABLE statements, but you can also change it to int(4). So what does this size mean? Can you store higher values in a int(11) than in an int(4)?
[...]
It's about the display width. The weird thing is, though, that, for example, if you have a value of 5 digits in a field with a display width of 4 digits, the display width will not cut a digit off.
If the value has less digits than the display width, nothing happens either. So it seems like the display doesn't have any effect in real life.
Now ZEROFILL comes into play. It is a neat feature that pads values that are (here it comes) less than the specified display width with zeros, so that you will always receive a value of the specified length. This is for example useful for invoice ids.
So, concluding: The size is neither bits nor bytes. It's just the display width, that is used when the field has ZEROFILL specified.
New project in the works
The two biggest projects for my exam has been finished, with just a few touches and documentation left on TULM.
This means that I'm having more freetime, and I've therefore started a new project based on CodeIgniter v2.0 even though it's not official, but only a dev version.
Hauglin and Sturgeon have both written about this new version and their blog posts can be found here:
http://www.haughin.com/2010/03/11/codeigniter-2-critical-changes-implications/
http://philsturgeon.co.uk/news/2010/03/codeigniter-2
Wether this new project of mine is going to be TexoNovus or MMHQ has not yet been determined, but since they're going to share the backend, the final decision is being put to rest for a while.
Another thing I'm really excited about is a dedicated server. My NAS is currently sitting at 3TB storrage, but only ~400GB is free. After looking at price tags for a new NAS vs a server, I've found that a server can be found for a little less than 50% of a NAS price. Of course a server won't have all the fancy features my current QNAP TS-219P has, but considering the Windows Server 2008 R2 DVD I have and the possibility to completely decide what's going to be installed - I think that's the best way to go.
Alot of the features the QNAP has can be brought to the server. Web server and MySQL is most likely to come from WAMP, which also makes it a whole lot easier to enable and disable certain modules. As far as I know, there's also alot more programs, guides and help to find when it comes to windows servers vs linux.
So.. A windows server for 400-530 EUR vs a NAS for 1150 EUR - I'm going for the windows server
Too much to do, too little time
Am I the only one with too much to do and too little time?
It's so damn stressing to live today < .<
I've the kind of guy that have 200 ideas on his mind, but doesn't have 200 hands to live them out.
Right now I got 4 projects on my mind, which all is rather big;
- TexoNovus, a new CMS
- TULM
- A wallpaper site (Who doesnt love wallpapers?)
- Movie database
THP, which I'm working on TULM with, suggested that I made a website which to manage all his movies and at the same time tell him when a new trailer/movie were released so he could easily get that. It could also be used to let friends know which movies he has, so they could borrow them and maybe even stream them.
I'm really hooked on the idea of a personal movie database - might even be able to easily modify it to a music database too for a web version of my uncles .mdb database.
TULM is a project I think is really cool. When development started, we found an old project called ALP, which was last updated somewhere in the beginning of 2006. Unfortunately the code was so bloaded and lacked organization, that we couldn't use any of it. We did however, get a few cool ideas for TULM, which is using OOP PHP5, istead of ALP's one class that's handling half of the work while single functions is handling the rest.
A wallpaper site, is something I've wanted to make for a while. I was inspired by wallbase. I've tried getting in touch with the owner of the site, but it seems his mail is malfunctioning - so now I'm playing with the idea of making an even more feature-rich wallpaper site than wallbase, but with less AJAX and more permalinks for easier linkage, paging, searching and bookmarking.
God I wish I had more time.. 30 hours in a day instead of 24, or more vacation wouldn't hurt
Dynamic Stylesheet switching
I've recently been in need of a function that dynamically were able to switch stylesheets without reloading the page.
After a lot of searching, I found a post by Rob Glazebrook.
After modifying it a little to my needs, my theme switcher is working like a charm.
You'll need jQuery and jQuery Cookie plugin.
Maybe this post can save you some work and a lot of searching if you need such a feature too
TULM – A little progress
After a few weeks of almost no progress due to homework, a well earned holiday, unfortunately only a week - better than nothing though.
Last night I started on the library that's going to take care of the food ordering service (only available in Denmark in the beginning).
At it's current stage, it's able to query Just-Eat.dk for restaurants in a given zip code and return those.
When one is selected, the menu is retrieved - formatting of the returned menu is the next thing on the todo list.
Alot of things is planned for the upcoming week and we, me and THP44, estimate that in the beginning of the following week (week 8), we'll be at a 50%-ish completion rate - we're currently at 28%.
The planned modules and features planned for coding next week includes, but is not limited to:
- News
- Music player with YouTube intergration
- Food ordering
- Seat reservation
- Caffeine ranking
Our timeschedule for TULM can be found in the link below, please note that parts of the file is written in danish.
TULM Timeschedule
Some of the libraries made for TULM, may be released on this site at a later stage for people interested in the same features TULM is using.
TexoNovus – A new CMS
I'm currently working for a newly started gaming/software development community who's in need of a new website.
I'm therefore developing a new CMS for this purpose.
TexoNovus is, as mentioned in the category description, based on the CodeIgniter framework.
Unfortunately, CodeIgniter handles some things, in a way I don't like, and I've therefore decided to use a modified version of CI 1.7.2 as the base of TexoNovus.
The list of modification planned on the CI framework to fit TN needs is, but not limited to, and subject to change:
- Use templates for better profiling layout
- Settings for profiling; Choose layout, choose which elements to profile
- Log profiles, without displaying them to users
- Benchmark all classes loaded during system initialization
- Group benchmarks via IDs; For system, application, modules
- Move routings to DB for easier use with modules
- Add routings on the fly with control panel
- Enhance error reporting and logging
- Enhance error reporting templates
- Move logging from file to DB
- Log management via control panel
- Use native PHP session variables
- Use a few extra columns in session table for quick access across sessions for stats
- Replace CI template with PBB Template engine
- Support for more hooks
- Enable hook support across modules
- Easy implementation of modules
- Enable modules to use other modules functions
- Easy routing to enable 'seperate' modules like blogs and forums
As I progress in the development of TexoNovus, I'll post updates here on my blog, and you'll be more than welcome to comment, post suggestions or questions.
As mentioned before, TexoNovus is being made for Addicted 24/7 (Check out their site under 'Blogroll') and will be closed source. A beta test will take place, but is not yet decided wether it's going to be public or private, or being hosted on their server or mine.
Stay tuned for updates
PHP Resources
Here's a small list of PHP resources I find useful when developing PHP applications/sites
- RegEx Library
- RegEx Tester
- Method Chaining (PHP5)
- Bitwise Tutorial (Useful for permission system)
- Simple caching
- The best PHP books
- PHP Manual (Its godlike
)
Just a few links others might find useful as well