Welcome Guest, Not a member yet? Register   Sign In
Use codeigniter with another CMS
#1

[eluser]Khoa[/eluser]
Hi,

I'm not sure whether this topic has been asked before, but I couldn't find it, so just open it here.

Here is what I want to do with CI but dunno whether it is possible or what is the best way to achieve it.

1. Scenario:

I'm working for a client to create a website. As usual, some components of the website are dynamic, some are not. For example, the website will have login/logout and some functions related to payment. But it also has other static pages such as about us, contact us, testimonials...

2. What I want:

On one hand, I want to use CI for the dynamic parts, and basically CI will drive the whole flow of the website because I love its MVC framework.

On the other hand, I want the client to be able update the text on the website by themselves via some sort of CMS. For sure I don't want the client to dig into the application/views folder of CI and update the text they want via a HTML editor. I'm thinking of using an open source CMS such as concrete5, joomla or CMS made simple. Haven't decided yet.

3. How?

So, the question is: how can I combine Codeigniter framework with a third party CMS? How can I use 2 sort of systems together so that I, on one hand, can benefit from the MVC framework of CI and the client, on the other hand, can benefit from the easy to update content provided by another CMS?

What do you think about this? Is it possible? Or I am going the wrong track here? How do you deal with this issue when you develop a website and want the client to be able to update the site by themselves?

Thanks for any help or experience that anyone can share.

Khoa
#2

[eluser]rogierb[/eluser]
This is what I did in a similar situation.

I created a controller called CMS. I created a table called content. In the controller the client could edit content(with zinha) but only the pages that were already there. Since he was used to static pages, this was a hugh step forward;-) Yeah right...

A CMS would be better but most clienst find a CMS to difficult;-)

If you find a way to use CI together with for instance Joomla!, please share. That would be a nice combo.

Not really what you asked for....
#3

[eluser]Khoa[/eluser]
Thanks for sharing rogierb, you said:

"In the controller the client could edit content(with zinha) but only the pages that were already there."

So will the html codes be stored inside the DB or stored as physical html (php) files? I assume it is inside the table content that you mentioned right? But if that is the case, does it mean we need to build a simplified version of a CMS? Because I think user needs some mean of interface to do this right? So will it be a bit of too complicated for a single project?

Correct me if I'm misunderstanding.

I think they can be connected via the DB, but, not too sure how to do that yet :-)
#4

[eluser]rogierb[/eluser]
Correct, it is a very very simple CMS. All the pages are stored in a table content wich has has the follwing fields:
Code:
CREATE TABLE IF NOT EXISTS `content` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `language` char(2) NOT NULL default 'nl',
  `content_number` int(10) unsigned NOT NULL,
  `title` varchar(100) NOT NULL,
  `intro` text NOT NULL,
  `content` blob NOT NULL,
  `publish_date` date NOT NULL,
  `publish_enddate` date NOT NULL,
  `publish_time` time NOT NULL,
  `published` tinyint(1) unsigned NOT NULL default '0',
  `created_by` int(10) unsigned NOT NULL,
  `created` datetime NOT NULL,
  `modified_by` int(10) unsigned NOT NULL,
  `modified` datetime NOT NULL,
  `ordering` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `NewIndex_1` (`category_id`,`published`,`ordering`,`title`,`created`,`content_number`),
  KEY `content_number` (`content_number`,`category_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ;

The table is a bit overkill for a simple CMS, but I use it for a more complex CMS aswell.

The interface is very simple, just two views. One with a list of the pages, and another view with one input field and two textareas (title, intro, header). So you only have the option to select a page and edit it. I use xinha as an editor. A bit slow but has a lot of functionality.

Whenever I need a simple solution I just copy this solution from an old project;-). It takes about a day to code. I think setting up a CMS and setting up all the pages will take the same amount of time.

As with most CMS, you do need a DB
#5

[eluser]Référencement Google[/eluser]
I don't really understand why would you need CI then. Let's say you use Joomla, then build all dynamics with the Joomla API (it's MVC since 1.5). Or if you really can't leave without CI, then build a CMS under CI. It will be a difficult task but once it's done you'll be able to start all of your projects based on it.

Depending your needs, you should consider Expression Engine, it's a middle way between CI and a CMS and there is absolutly no limitations of what you can do with it, specially with the upcoming 2.0 that will be build on top of CI.
#6

[eluser]Khoa[/eluser]
I see your point Too Pixel, either move completely towards the CMS or using CI right? However, not many CMS supports what Joomla does (I believe) and Joomla is just overcomplicated for simple sites from my 2c experience.

I also thought about building a whole CMS on CI which has the functions just for this kind of purpose. But in my case timing is such a constraint now, so I don't think I can have time for it. I'm thinking of installing a CMS on the hosting in parallel to the CI framework and somehow let the client manage the content of the pages via that CMS and I still develop the website or add in more features using the CI framework as only itself exists. That would be a perfect world. But I think it might get complicated down the track and require a lot of hacking. Do you think it can be possible by making them sharing the DB? Like write the codes in CI that makes use of the CMS DB structure?
#7

[eluser]Référencement Google[/eluser]
Joomla is great, it's sure overcomplicated to manage 2 pages, but it's a very user friendly CMS, many of my clients love to use it and find it very intuitive.

As other alternatives, you should consider maybe using wordpress as a CMS, but would require a lot of hacking. My best bet is to build it with CI. If it's only a simple page manager that you need, it shouldn't take more than 1 or 2 days of work.

Check also about Frog CMS, a PHP conversion of RadRails CMS. The coder does awesome job, I dream that somebody would take on this as an open source public project to convert it to CI. If somebody serious is interested to start a small team to convert it to CI, I would with pleasure start such a project.
#8

[eluser]Khoa[/eluser]
Have you tried to develop the website using Joomla API as you mentioned? Can I do things that I can in CI like form, url helpers, validation, friendly url, session management, login, logout....How are they compared to using CI?
#9

[eluser]Référencement Google[/eluser]
I didn't yet made a custom app using Joomla CMS, the whole I need to do for the moment is more on the templating side by making a custom template for a client. Most of the functionalities that are requested by my clients exists as Joomla components so there's no need to develop from scratch and reinvent the wheel when something nice already exists. It happens that I customize a feature of one component depending the need of a client.

The concept of MVC in Joomla is near the one in CI, it follow some patterns, but like CI you'll need to learn Joomla API and framework (the 1.5 version is based on this framework). As far as I know there is no limitations of what you can do with Joomla. The good thing basing some devs on Joomla (or on another CMS) is that the user management, login, logout etc. are all included and handled for you, so this is a real time saver.

What I can conclude about my experience on Joomla is that it depend the kind of project you are doing. If you build a presentation website with common features, then go for a CMS like that. If the application is particular and have features that can't be find already in the CMS you are using, then go with a CI custom development from A to Z, because mixing a CMS + CI could lead you in hell maintenance problems and instability.

If we had a good CMS based on CI, I would sure prefer build my projects based on it, but as you may know, we webdesigners need to have the job done quickly because clients can't wait, and Joomla permits me to setup a quick website in hours, that would not be possible with CI until we have a CMS. That's also why I pointed you to Expression Engine, because you'll find the concepts that you learned for CI in this great and flexible CMS.
#10

[eluser]Khoa[/eluser]
As I do not know about the Joomla API, it's a bit hard to justify whether it can do what I want or not. I agree with you that trying to run a site built in CI with another CMS would result in a nightmare for maintenance.

The site that I want to do at this stage is very basic actually:

- It has some session management, user account management (simple profile)
- Basic CRUD for the topics related to the site. Nothing really special here.
- I also need to have payment functionality. This is my main concern at the moment. What do you recommend: paypal? direct debit? credit card? any experience? This seems to be a bit "extra feature" compared to normal presentation website. Does Joomla have anything to do with this? (or maybe I should just read their API docs :p)

Everything seems very usual at this stage, but as you might know, requirements might change and new features might be requested.

To be honest, I still wish to build a CMS by myself in CI which I think should not be too difficult. I worked on building a CMS before in another language, so the matter for me now is just time. Will share you guys if I ever...start and when I complete it Big Grin And probably will then join you on the project to convert that Frog into...another Frog :-P




Theme © iAndrew 2016 - Forum software by © MyBB