Yii Core CMS Attempt to create a code base for my own Yii apps
Posted 20 July 2011 - 10:58 AM
You can clone the Hg repo at:
Yii Core CMS repo at bitbucket
### Core module ###
* Settings: I use the class CMS Setting to store all app settings.
* BaseController: Define some extra attributes for CController, to be used through out the web app. Heavily taken from Drupal. Like: $this->page, $this->pageTitle, $this->siteName, $this->siteLogo, $this->siteSlogan (cause Yii use camelCase )
* WebTheme: manage site themes. I learnt Drupal once, so I think its .ini file is quite useful to define different info, like Theme name, description and especially region system. In the application.themes folder, there are 2 themes converted. One from classic theme, and other from Yii themes. Some feature are implement: List available themes, Configure theme settings, and Preview the theme with dummy contents on every region.
* Category and WebMenu: Use Yii Ext ENestedSet behavior to build Tree structure categorize system. To think of it, I really like the Drupal entity system. So in the main content, I have the setting for one content type to choose which Category Tree it should use to categorize its content. After all, it's just a list of Category Name, right?
* Node: The main content, serves as an example of using Tags, Category and CKEditor with CKFinder.
* BlockType and Block: The basic block system. Each block type has many blocks, and blocks can be put in theme regions. To define the block, you can specify the callback and component of each block type, then a viewfile for it to render. Some block type are only to dynamic load a view file. Some other are more complex: it has 2 callback, with the same prefix, one for configure the block, the other for provide the viewfile with data.
Also, there is a Node module that provide some more example of how to extends the content type:
* NodeImage and NodeDocument: Use FileImageBehaviors to add file attachment and images.
* NodeFile: Use MultimodelForm to add multiple files upload, with title and desc for each file.
* NodeComment: Use Yii Ext ECommentable behaviors to add comment support.
ALso, there are some Action in the ext.actions, that can be used to provide some more CRUD features on the future. All of them are extends from CViewAction, so if you put the view in $_GET, you'll see the magic...
That's it for now.
Take a look, and let me know if there's bugs or something I should tweak.
Posted 07 August 2011 - 10:56 PM
At this time, my writing skill is not so good, so I think document the system should quite hard for me.
It is quite easy to use right now, but I really don't like the way menu is being declared manually. I will think of some way to attach menu to node.
Also, I'll wrote an example module to show how to extends some core Model to build various content types.
Posted 08 August 2011 - 01:42 AM
Changing to webapp configuration did not change anything, I still get 404 error when I click the login link.
Just a small advice, if you want anybody to use or help you develop your CMS you have to:
1) Provide minimum steps to make the application work
2) do not hardcode host names
3) Use a language the 'all' understand e.g do not use vi in Western part of the world - There is not so many people that understand Vietnamese
Trust me, I know how hard it is to write a CMS - I did www.pradoportal.dk, using the PRADO framework.
I'll give your CMS another try
Posted 09 August 2011 - 10:45 PM
I'll make a branch out of tip, for Vietnamese, and convert current docs and articles to English if possible.
For now, the system is kind of work.
I'll gradually tune up and add caching.
Also, make a demo module that using core to create various content types.
Posted 18 August 2011 - 12:10 AM
Most graphic artists/designers are totally lost in Drupal and I can say that learning to develop in it was like climbing the face of a cliff. There is no consistency in what little documentation is available and many modules are a crap shoot as to if they will work or are poorly written. My biggest peeve is that very few people actually use the proper terms for concepts and actions.
I still use it, still like it ok, but would love a better solution.
I would like to get rid of all of the stupid forms that need to be filled out. Click, click then click some more.
The area that Drupal is sucking wind on is the end user control panel. It really doesn't have one that is even close to what Wordpress offers.
Back to something constructive. It would be nice to accomplish what Wordpress and Drupal try to without all of the hooks and training wheels most of their audience requires. We need a mean and lean platform that can be passed off to a reasonably trained designer to style. I really don't think that most end clients open up the Drupal environment and make code changes. Drupal must spend at least 40% of its effort to allow that flexibility.
Why is what your doing going to be any better than Drupal 7? The Drupal platform is hundreds of thousands of hours ahead of you. Why reinvent the wheel?
Sorry if I sound negative. I am not meaning to. I think that you might be on to something if it solves the existing Drupal problems in a cost effective way.
Posted 19 August 2011 - 02:50 PM
I just want to take some of drupal, that I think it is neccessary, and easily to adapt them to other projects of mine own.
Development new features from Drupal is way too much complicate for me. I looked at the example module of drupal. Only for some basic CRUD operations, and it makes me mad already. I knew Drupal has alot of flexible code, and alot of code too. Huge modules, contributions, etc.
But for some sort of small projects, Yii more fits.
I just try to write a code base to re-use through out my projects, that's all. I don't think it will bloat up to something as advanced and complex as Drupal, really.
Also, it's some way of experience the power of Yii.