Yiibooster Installation Steps

Hi All,

I have already spent two days to resolve the yiibooster config issuse…but didnt get the solution till now…need help.

Problem:Getting error “Alias ‘path.alias.to.booster.components.Bootstrap’ is invalid. Make sure it points to an existing directory or file”

I did the configuration but did not able to resolve it…

My main.php

================

Yii::setPathOfAlias(‘bootstrap’, dirname(FILE).’/../extensions/bootstrap’);

Yii::setPathOfAlias(‘yiibooster’, dirname(FILE).’/../extensions/yiibooster’);

// This is the main Web application configuration. Any writable

// CWebApplication properties can be configured here.

return array(

    'theme'=>'bootstrap', // requires you to copy the theme under your themes directory


  	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',


'name'=>'yii project',





// preloading 'log' component


'preload'=>array(


        'log',


        'bootstrap'),





// autoloading model and component classes


'import'=>array(


	'application.models.*',


	'application.components.*',


            'ext.YiiMailer.YiiMailer',


            'bootstrap.*',


            'yiibooster.*',


),





'modules'=>array(


	// uncomment the following to enable the Gii tool


	


	'gii'=>array(


		'class'=>'system.gii.GiiModule',


		'password'=>'testunity',


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


		'ipFilters'=>array('127.0.0.1','::1'),


                    'generatorPaths'=>array(


                            'bootstrap.gii',


                    ),


            ),


            'admin',


            


),





// application components


'components'=>array(


	'user'=>array(


		// enable cookie-based authentication


		'allowAutoLogin'=>true,


	),


            'bootstrap' => array(


                     'class' => 'bootstrap.components.Bootstrap'


                ),


            'bootstrap' => array(


                    'class' => 'path.alias.to.booster.components.Bootstrap'),

=======================================================================================

and extracted the yiibooster into extension folder.

Please guide me to resolve this issue.

Thanks

Ranjan

I will just explain how I setup YiiBooster.

Step1. Extract yii booster to extensions. Rename the folder from yiibooster-<version_number> to just yiibooster.

Step2. in config/main/ before return array


Yii::setPathOfAlias('booster', dirname(__FILE__) . DIRECTORY_SEPARATOR . '../extensions/yiibooster');



Inside components array add:


'bootstrap' => array(

            'class' => 'booster.components.Bootstrap',

        ),

Step3. Any controllers where I want to use Bootstrap widgets, I will just write the following in that controller:


public function filters()

    {

        return array(

            //<any other filters here>

            array('booster.filters.BootstrapFilter - delete')

        );

    }

Step4. call any widgets you like now as:


$this->widget(

                'booster.widgets.TbSelect2', array(

            'asDropDownList' => false,

            'name' => 'clevertech',

            'options' => array(

                'tags' => array('clever', 'is', 'better', 'clevertech'),

                'placeholder' => 'type clever, or is, or just type!',

                'width' => '40%',

                'tokenSeparators' => array(',', ' ')

            )

                )

        );



Simple!

Step3. Any controllers where I want to use Bootstrap widgets, I will just write the following in that controller:

public function filters()

{


    return array(


        //&lt;any other filters here&gt;


        array('booster.filters.BootstrapFilter - delete')


    );


}

may you give me example about the filters ?

sorry if my english is bad, thanks

I have tried all the steps and got such error


include(Booster.php): failed to open stream: No such file or directory

please help me how can I check the namespace path correctness?

Step1:

Change this


'bootstrap' => array(

            'class' => 'booster.components.Bootstrap',

        ),

to


'bootstrap' => array(

            'class' => 'booster.components.Booster',

        ),

Step2:

and add in config/main/ just after components array


'preload'=>array('bootstrap'),

This tutorial might help


http://rubahmania.wordpress.com/2014/10/09/yii-cara-instal-yiibooster/