crisu83 / yiistrap

Twitter Bootstrap for the Yii PHP framework.
http://www.getyiistrap.com
BSD 3-Clause "New" or "Revised" License
286 stars 176 forks source link

Bootstrap 3.2 support #263

Closed karlingen closed 9 years ago

karlingen commented 10 years ago

Any plans on implementing v3.2?

marcovtwout commented 10 years ago

Use the bs3-branch.

bmsrox commented 9 years ago

@marcovtwout i can not to configure bs3. I followed the tutorial using a composer in yii 1.1.16. can i help me?

marcovtwout commented 9 years ago

https://github.com/crisu83/yiistrap/blob/bs3/README.md

bmsrox commented 9 years ago

i saw this, but doesn't works

bmsrox commented 9 years ago

Invalid Bootstrap path and CDN URL not set. Set vendor.twbs.bootstrap.dist alias or cdnUrl parameter in the configuration file.

jayala commented 9 years ago

In your config/main.php file you should declare

'aliases' => array(
    'bootstrap' => realpath(__DIR__ . '/../extensions/bootstrap'),
),
bmsrox commented 9 years ago

Now shows this error

Notice: Undefined property: CWebApplication::$bootstrap

bmsrox commented 9 years ago

the problem is here

'bootstrap' => array( 'class' => '\TbApi', ),

jayala commented 9 years ago

Well, your configuration looks like you are using Composer. If not try this:

'import' => array(
    ...
    'bootstrap.helpers.*',
),
...
'components' => array(
    ...
    'bootstrap' => array(
        'class' => 'bootstrap.components.TbApi',
    ),
),
bmsrox commented 9 years ago

If i put 'class' => 'bootstrap.components.TbApi'

show me the error

Invalid Bootstrap path and CDN URL not set. Set vendor.twbs.bootstrap.dist alias or cdnUrl parameter in the configuration file.

else shows the error above

jayala commented 9 years ago

My apologies, I gave you the wrong configuration try with this:

'aliases' => array(
    'vendor.twbs.bootstrap.dist' => realpath(__DIR__ . '/../vendor/twbs/bootstrap/dist'),
),
'components' => array(
    'bootstrap' => array(
        'class' => '\TbApi',
    ),
),

That is asuming you are using Composer.

bmsrox commented 9 years ago

does not works :(

jayala commented 9 years ago

Then you should install Composer..

bmsrox commented 9 years ago

I am using composer .. but with or without composer does not work

jayala commented 9 years ago

Ok, are you sure you have your composer.json like this?:

{
    "name": "myvendor/myapp",
    "require": {
        "php": ">=5.1.0",
        "yiisoft/yii": "1.1.*",
        "crisu83/yiistrap": "dev-bs3"
    }
}
bmsrox commented 9 years ago

i already did it.

bmsrox commented 9 years ago

@crisu83 can you help ?

crisu83 commented 9 years ago

I'm afraid I cannot do much with the details you've provided, maybe you could tell us what the error is that you are getting and provide us with both your application configuration and composer.json (gist/pastebin please).

syntaxc commented 9 years ago

I came across the same problem when installing yiistrap.

The problem for me was that I did not have Bootstrap installed! I found two solutions. 1) Use Bootstrap from a public CDN. ( Eg https://maxcdn.bootstrapcdn.com ) To set this up just ADD a single line in your config/main.php

    'components'=>array(
              ...
              'bootstrap'=>array(
                             ...
                             'cdUrl'=>"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/",
              ),
     ),

2) You can host Bootstrap yourself. Download Bootstrap from getbootstrap.com Extract into /protected/vendor/twbs/bootstrap/dist

crisu83 commented 8 years ago

You have a typo on your example, it should be cdnUrl not cdUrl.