Big Change In The Database Model Of Mucms

Since 2008, Mucms went through major changes. In fact, before muCMS, my websites were made under Dreamweaver, and that totally sucks.

Then i met Smarty which introduced me to MVC programming, but i found Smarty added an unecessary step, so like Wordpress i programmed a custom framework for Mucms, that happened in the midddle of 2011, now it is freed from Smarty and i am very satisfied.

Really Smarty is a waste of time and i wish i had begun without it.

Now the database model is changing too

Although Wordpress is a great CMS, i find its data model simplistic and not flexible IMHO, but since i don't know WP API, i won't talk too much about it.

MuCMS data model was way simpler than WP's, and i encountered several limitations, like rigid categorization (no multi category), impossible to add new modules to the CMs like adding a directory script etc).

Now i have a central table that manage the urls, all urls are unique, so that's why it is important for them to be manage by one unique table.

the consequence is that i don't need url rewriting anymore, just find the right url, and display the content. the url can be a post url, a category url, a tag page url, a directory entry url, that's not a problem, and that's the beaty of the table. Now i can add as many types of url as i want provided they are not duplicate.

I also refined the hook system (like WP's) so that i can add or remove a hook to customize a webpage behavior or the entire website behavior very easily.

that central table also handle 301 redirect, imagine you chage a url of a page, the table will have the new url information so the cms can esaily redirect you to the new page.


Like wordpress, i am having a hook system here and there in the webpage.

the bcack office also needs a rewrite, because of the new way to handle urls, category.

Last big change, the htaccess file also needs to be rewritten. All these change must take place at once since they are all dependent.

2011-12-28 22:12:16 1 Commentaires

Mucms To Get A Hook System And It's So Cool !!!

Since i started coding 3 years ago, Mucms has come a long way, from using a Smarty emplate to now having a hook system, let me explain.

When i started in 2008, i didn"t know the hassle i had to go through writing a cms, there were so much to learn. But had i known all of these, i hadn't strated write mucms.

Okay, in the last post, i explained why i gave up Smarty, a sub optimal template engine. When you want performance you must shunt the intermediate levelx such as Smarty and any unnecessary stuffs, hence the full php cms i am writing now.

Why hooks are a must have

Second i wanted to make mucms extensible, like wordpress, to allow an easy plugin of addons without rewriting the core code, so i had to make a hook system to make this happen. now that i managed to migrate to a hook powered cms (very early stage), i am more confident in extrending the capabilities of mucms, such as writing a directory module.

So now whenever i want to alter the design or the functionnalities of mucms, all i have to do is write a custom function put it in a hook and that's is... nearly without having to know about the internals of mucms. Ain't it cool?

Why changing the Database model is needed

Because of all of these, i had to improve the data model of mucms, to make it more flexible and generic. I added a few tables and fields here and there, mainly for seo reasons.

I have to work on two front, on the front end and on the back end. The BO is most of the work, because, it's where it all hapens (editing, seooing, analytics...) all those are integrated in the BO.

Taking to the next level

I think there is no limit int eh ways you can improve a cms, for example, when you change a url, to a new url, how about 301 redirection from the old to the new? there are a lot to do and i cannot list them to you since this cms is not made publicn just my thoughts, sorry mucms is not for sale yet.

The reason i blog about my cms

I just wanted to share my thoughts on how to write a good cms. And SEO speaking no cms is natively seo optimized, because SEO is an ever changing beast, you have to keep up with the trends or risk been obsolete. Wordpress has tons of SEO plugins and tweaks, but mucms will have all these natively integrated hopefully.

2011-07-12 11:07:53 5595 Commentaires

Rewrite Of Mucms Getting Rid Of Smarty

I think i cannot go forward much if i kept using Smarty as a template engine for Mucms. The reason is that Smarty adds anoter layer in the rendering of the web pages. For long i wanted to add some features to Mucms, but i couldn't do it knowing i won't have time to properly code new features. frankly speaking, i am not very versed in Smarty, it has an easy learning curve at the beginning but it'll piss you off if you want to do more sophisticated stuffs. Enough, this summer i am rewriting the presentation layer of this cms in php, i will be able to add new features easily.

What's the program?

First i have improved the back office to make it more userfriendly, then i am going to port the smarty templates into php, and then i will add more seo management feature in the back office. Now you can track the spidering of search engines directly in the back office, you'll be able to see which pages are spidered, i use crawltrack to do this.But there's more to come and i will write another post about this later.

Then I will try to implement a hook system, to allow easily adding new functions. I think this is the hard part as i roughly have no knowledge about how to code it, i think i will use a subfolder detection system, and carefully choose where i place the hooks. That's all for now.

2011-05-29 23:05:50 4816 Commentaires

Is Smarty A Viable Solution?

I've been coding MuCMS for two years now, from the start i use Smarty Template Engine, i thought it was cool at that time to code a MVC style CMS B).

Years have passed and i realized that what fustrates me the most with smary was i had to know an additional language alogn with php to maintain this CMS. I've been coding hp for more thant 3 years now and i feel quite comfortable with it. What ican do through php, i do. I think it is better to know one thing very well rather than spreading too thin.

Coding a CMS alone needs you to know HTML, CSS, javascript, php, sql at least. And now with my may side project i don't have time to invest in another language. Smarty seems simple at the beginning but it can be quite comple too. Sometimes i find the code cumbersome.

Why add another not so vital layer on top if it is not necessary? I am thing seriously to rewrite the template (no smarty at all) in php, the gains are interesting : no more intermediate step to render the web page, you hard code the html in php, with some habits it is easily doable, the site will load a little faster.

Since it is a solo project, i don"t need to separate logic from design, what's more a CMS like Wordpress is not based on Smarty.

What do you think of going 100% ?

2011-05-29 23:05:03 6738 Commentaires

What To Be Done Shortly

I've added a comment module and membership modules, but the comments cannot be manage from the BO yet, and the membership modules is not ok, so i am going to fix this.

I should make a sql script to alter the table and remove some fields that are not useful anymore, think about the 'medaillon' field designed to store additional info on a page and maybe the image field because i think it is no relevant to force a blogger to add an image to each post. I may recycle this field to put an extra anchor text instead of the tradition not so seo friendly "continue reading"

Now the BO image uploader can pull a url from the web and store the image to a sepcified folder, but it would be nice to offer simple editing such as cropping, resizing.

2010-08-08 13:08:52 0 Commentaires

Small Changes To Under The Hood

I've been pretty busy currently and still will be for the months to come. I've made some fixes for the date management, until now, the date of publication of a post is coded in year/month/day fashion, the problem is when you publish 2 posts the same day, the fresher won't be at the top of the page, so i needed additional information to segment more by timeline, so i added the time to the date_posted field. Now that solves the ordering by freshness and the RSS feeds are more valid since the parsers show error if you have two exact same date for two posts.

2010-08-08 10:00:00 4737 Commentaires