[MODULE] AutoAdmin CMS Framework

I’m glad to present my application to the esteemed community.

This is AutoAdmin CMS Framework. It’s a solution for web projects with free designed databases. It really does for portals as well as for “turnkey websites”. Easy-to-Learn and easy-to-use.

I have really used it for years and at last have ported to Yii.


Good way get to know this CMS FrameWork is to explore its Showroom.

I’ll be happy to answer your questions and of course to discuss the application’s conception and certain solutions inside it.


Alexander Palamarchuk


The best way for quick start is to download the special exemplary pack. It contains full directories structure, configs, controllers and SQL dump. Just try to use it as your usual web project.[/size]

The AutoAdmin CMS was widened with the AutoAdminGIS extension.

Now you can edit GIS data, entering coordinates directly or dragging point, polyline and polygon shapes right on Google Maps!

Our project’s editorial team is extremely enjoying! So I wish for you!

I am very excited to use your extensions!

I’ve had a project in the works for over a year, it’s all based on GIS data. A good friend and I have gathered large amounts of data and so much of it is GIS. 6 months ago Yii was beyond my comprehension but i’ve worked with it everyday for months now and have a good grasp of it.

I knew that Yii was it, I just didn’t know (still don’t…lol) how to present all of the data.

Anyway, thanks again and I’m sure I will have lots of questions!

You’re welcome! Don’t hesitate at all, even of private messages.

First Question :)



        'basePath' => dirname(__FILE__).'/../modules/autoadmin',

        'wwwDirName' => 'www',  //your DocumentRoot

        //Optional params:

        'authMode' => true, //Switch built-in authorization system

        'openMode' => false,    //If true resets all limits on rights

        'logMode' => false, //Switch log mode



Is this actually supposed to read like this?


Yes, that’s a mistake, came from demo version. I’ve corrected it, thanks.

I’m a little confused about the steps of the install. I dont like being a bother and normally I would just keep reading for days until I get it. I think I have read about everything there is this time :) Hopefully my questions will help another newbie down the road.

I’m on a newly created app just for the occasion.


[*]Put the distributive files into [protected/extensions] folder of your Yii application.

[*]Edit the config: add the AutoAdmin module and set urlManager rules (see below).

[*]Create any folder in [www] (your DocumentRoot) directory to serve as the point of entrance by web (e.g. /_admin/).

[*]Create module folder [autoadmin] in [protected/modules] directory using a standart Yii module structure, but without module class (which inherites CWebModule) - it will be included from the extension.


  1. Unzipped yii-autoadmin_1.03.zip, renamed to autoadmin and moved it to protected/extensions.

  2. Edit the config.




        	'basePath' => dirname(__FILE__).'/../modules/autoadmin',

        	'wwwDirName' => 'folder',  //your DocumentRoot






			// If removed, Gii defaults to localhost only. Edit carefully to taste.





and this is where I go wrong…







				// autoadmin urls starts below here

				'<controller:aa[a-z]+>/<action:\w+>' => 'autoadmin/<controller>/<action>',

				'<controller:\w+>/foreign-<key:\w+>' => 'autoadmin/<controller>/foreign<key>',

				//Module paths should be configured in a standart way

				'/' => 'autoadmin/default/index',

				'<controller:\w+>' => 'autoadmin/<controller>/index',

				'<controller:\w+>/<action:\w+>' => 'autoadmin/<controller>/<action>',



I read that a separate config is recommended and I understand why. What is the best way to add a separate config file for AutoAdmin? I read up on it a little, seems to be straight forward enough.

hollowdevelopers.com/2011/05/14/yii-framework-separate-configurations-for-different-environments/ Only my second post, I can’t use links yet. Sorry.

Would this work?

  1. Create a folder in your document root. For the sake of this, I just created ‘folder’ in the document root.

  2. Create module folder autoadmin using the standard yii module architecture but without module class.

Step 4 - so it goes webroot/folder/protected/modules/autoadmin

Here is where the dumb question comes in. Do I generate an autoadmin module with gii or what do I put in here? It has me confused since step 1 I copied autoadmin to protected/extensions/autoadmin

I know this post is long. Thank you again for making the extensions and helping the new guy out. 6 months now I’ve been lurking and reading, not posted once for fear of asking them new guy questions. The gis extension has me all fired up though and excited. So i’m just gonna ask the new guy questions and get over my fear :D

Do you have a default install with autoadmin and yii archived somewhere so I could download it and see how it’s supposed to be structured?

Thanks, Brandon2, You made me think of clarity of the instruction. So I’ve fully updated it in attempt to solve all your problems. Try it again, please.

I think I’m almost there. Could you post an example for the contents of /www/_admin/index.php ? The updated file structure helped a lot

First of all, you should realize that AutoAdmin is a module. Absolutely typical Yii module. But with one difference: the main module class AutoAdminModule.php is included from the extension dir. The only difference!

Thus you can edit the same config file that you use for all other controllers and modules.

The way described in Help is a way to separate the CMS (AutoAdmin) config file from the main public config. You can do it right in /www/_admin/index.php checking url and requiring an alternate config. But the more reliable way is to enclose this “separate-folder logic” in an additional folder indeed. It’s the /www/_admin/ indeed (or any other that you like).

So look, this is the main /www/index.php structure:


define('YII_DIR', 'yii');

define('YII_PROTECTED', 'protected');

$yii=dirname(__FILE__).'/../../'.YII_DIR.'/framework/yii.php';  //Note: my YII distributive is placed outside web-project dir (1 level up).





And for /www/_admin/index.php it’s nearly the same:


define('YII_DIR', 'yii');

define('YII_PROTECTED', 'protected');

$yii=dirname(__FILE__).'/../../../'.YII_DIR.'/framework/yii.php'; //one more level up

$config=dirname(__FILE__).'/../../'.YII_PROTECTED.'/config/autoadmin.production.php'; //one more level up and the alternate file




The both .htaccess files are equal:

IndexIgnore */*

RewriteEngine on


RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . index.php 

After that you have a site inside a site. An internal one actions from http://www.yourdomain.com/_admin/ , whereas an external - http://www.yourdomain.com/ .

I’m glad to report about version 1.1 release.

You needn’t configure special URL rules or scripts paths anymore. Just include module section and enjoy.

Actions (web-interfaces) for other side of many-to-many relationships now can be generated automatically if you do not describe them especially.

Now, in 1.1.3 we have WYSIWIG editor field.

Note that the tutorial has been strongly updated, a lot of mistakes were fixed.

Thanks, Alexander! I’ve been using your extension for about a week, it brings me a lot of benefit.

But there’s a problem. Correct me if I unserstand incorrectly.

array('avatar', 'image', 'Avatar', array('show', 'null', 'popup'=>true, 'directoryPath'=>'/img/avatars')),

If I do so, images upload to


dir, but altogether. If I set directoryPath as a dynamic param


images names will be stored in DB withoud this directory path, only their names, so I won’t be able to access them. Also I can’t use function with filename as argument

'directoryPath'=>'/img/avatars'.mb_substr($filename, 0, 3)

cause I don’t know where’s this $filename.

It’s a problem. There are too many pictures in my project to store them in one folder.

Need help!!



option for ‘file’ and ‘image’ fields. It would be stored to DB and takes part in a directory tree of files placing.

i keep getting this error whenever i try to update or add an entry:

Parse error: syntax error, unexpected end of file in C:\wamp\www\ebi\protected\extensions\autoAdmin\views\edit.php on line 132

The line 132 is a PHP closing tag:

Do you use the latest version?

Have you tried this exemplary pack?

If so that’s strange. Send me your module code and DB structure dump.

i just downloaded the example pack and im testing it, thats when i got the error.

i just downloaded from the link you posted and still the same error

Ok. It might be caused by a couple of fresh short open tags. Re-download the extension (or the exemplary pack), now it must be all right.

I enabled short open tags on my php and the error is gone… Thanks.