Yii Framework Forum: Yiibooster Installation Steps - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Yiibooster Installation Steps Getting issue while installing yiibooster Rate Topic: -----

#1 User is offline   ranjan 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 24-November 13

Posted 29 March 2014 - 01:15 PM

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
1

#2 User is offline   riyazMuhammed 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 43
  • Joined: 13-September 12
  • Location:Bangalore

Posted 16 April 2014 - 01:42 AM

View Postranjan, on 29 March 2014 - 01:15 PM, said:

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!
1

#3 User is offline   ikhsanww 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 09-July 14

Posted 11 July 2014 - 01:37 AM

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')
);
}

may you give me example about the filters ?
sorry if my english is bad, thanks
0

#4 User is offline   javaharut 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 02-May 14
  • Location:Yerevan

Posted 21 July 2014 - 03:26 PM

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?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users