Open Source Yii CMS - GXC CMS

It works well.I had this old line


error_reporting = E_ALL | E_STRICT

Thnaks you a lot

I add some q&a :

[b]1/- The CORE is the part that will not be changed, it is the part that

is for use only (like yii/framework, but then for CMS functionallity)[/b]

True

[b]

2/ - Every project has it’s own BACKEND / FRONTEND / COMMON but all

projects makes use of the same CORE[/b]

True

In fact, I am thinking about a multi-sites feature but maybe later.

[b]

3/ - FRONTEND and BACKEND has it’s own main config file so different

modules can be used on different ends?[/b]

True

4/ - in COMMON are files used in both FRONTEND and BACKEND

True

[b]5/- COMMON/front_layouts holds the layout for the frontend, you can call

this the theme for the frontend.[/b]

  • COMMON/front_blocks holds Yii Widgets that are called blocks in GXC?

True

front_layouts: The layouts for frontend.

front_blocks: The blocks for frontend. It has files :

  • input: For inputting in backend

  • output: For render information in frontend

  • ClassBlock: Handle Business Stuff.

[b]

content_type[/b]: Define different content types for site.

storages : Different file storages (Save file to local, to Amazon,…)

Hi mr80,

I’ve been studying for couple of days the GXC CMS, looks very good, thanks for sharing with us, now I’m trying to create a frontend block with ajax. The problem is when trying to get response as json format. This is what I did but doesn’t work:




$this->layout_asset=false;

header('Content-type: application/json');

echo json_encode($arr);



Any idea how to solve this issue?

Thank You!

@ florin p:

To solve Ajax Problem with this structure, I added an Ajax page as follow:

Remember to use Display type: empty.

Hope it helps

Hi mr80,

It works with empty type :D. Thanks!

md5 is cryptographically broken, it’s not a good idea to hash passwords using md5.

You could use Whirlpool




	           return md5($password.$salt);




	           return hash('whirlpool',$password.$salt); 

Eventually, you have to extend the hash db column accordingly (md5 outputs 32 chars, whirlpool outputs 128 chars).

thnx…i am also looking for this type example.

Sir im am new using Yii famework and your works is my need on my School project, i follow your instruction on how to install and use you cms, but where can i see you database?thnx.

By the way i read again your instruction and i got it… thank you so much… more power…

Sir Why is that when i go to my localhost/backend/index.php it goes to to this site http://www.gxccms.com/demo/backend/index.php/besite/login

sorry im a new user of yii framework. can you teach me how to edit that to be able i can access my Localhost/backend/index.php thnx sir…

@dhenet5254:

Make sure you changed the common/config.php, common/define.php before running install.

Nice day

@ekerazha :

Thank you bro. I will implement this in the next version.

I was wondering do you have to write the ini file first and then use the gii generator you wrote for building blocks and layouts?

@ametad:

For blocks and layouts file ini is created when generating block with gii.

Only with layout ini file, you have to modify a little bit for its region and display type if necessary.

Nice day

Yii 2.0 based? :D

However, if you rewrite the app above PHP 5.3, I suggest to remove the salt column and just use crypt() http://php.net/manua...ction.crypt.php (with CRYPT_BLOWFISH).

@mr80 thank you so much for replay i can access now… but i cant login to my back end i use user/pass as admin/123456. but username and passsword is in correct.

Thank you very much!

I still got a question about translations on the FRONTEND, I just cannot get it to work… :(

With the provided dropdown() function in the Translation Module, it is trying to set the language with a JQuery script:


<script type="text/javascript">

/*<![CDATA[*/

jQuery(function($) {

$("#mp-translate").change(function(){

$.post(

"/frontend/translate/translate/set",

{"mp-translate":$(this).val(),

"YII_CSRF_TOKEN":"96ea9d5cc192aacc35bcda23cc521a9a55591282"

},

function(){window.top.location.reload();}

)});

});

/*]]>*/

</script> 

As you can see the script points to the TranslateController/actionSet in the FRONTEND folder, but the module only resides in the backend folder. Let’s take a look at the the dropdown() function:


function dropdown(){

        Yii::app()->getClientScript()->registerScript($this->languageKey.'-dropdown','

           $("#'.$this->languageKey.'").change(function(){

                $.post(

                    "'.Yii::app()->createUrl("translate/translate/set").'",

                    {"'.$this->languageKey.'":$(this).val(),

                    "'.Yii::app()->request->csrfTokenName.'":"'.Yii::app()->getRequest()->getCsrfToken().'"  

                    },

                    function(){window.top.location.reload();}

            )});

        ');

        return CHtml::dropDownList($this->languageKey,$this->getLanguage(),

            $this->acceptedLanguages,

            array('id'=>$this->languageKey)

        );

    }

Here you can see that the URL is getting from Yii::app()->createUrl() and therefore the URL is set to the frontend folder in our case.

Do you perhaps have an idea how to nicely fix this, without rewrite Translation Module… Not right away anyway, because of consistency with this module in the future.

Till next time!

@ekerazha:

Thank you. I will update based on your advice.

@ametad:

I’m working on this problem.

Hi all,

I moved the gxccms.com to a new host on Linode.com.

I also setup a new forum for discussion: http://forum.gxccms.com.

Have a nice day guys.

@ametad:

It doesn’t work because I integrate the Translate module with Right Module. I added

public function allowedActions()

{


       return 'set';


}  

in TranslateController and it works.

Committed the core.

Hope it helps