Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yii-Bootstrap to version 2.* s'il vous plait #4

Closed
wants to merge 1 commit into from

Conversation

ametad
Copy link
Contributor

@ametad ametad commented May 15, 2013

For my own project I want to use the Bootstrap Module of Crisu83, but this requirement in P3Bootstrap is in the way...

Is it possible to set this requirement a little higher so the version 2.* can be used?

Sincerely,
Ametad

@schmunk42
Copy link
Owner

Hi Ametad,

this is a related issue: phundament/app#52

yii-bootstrap is in a lot of packages:

$ composer.phar depends crisu83/yii-bootstrap
phundament/gii-template-collection requires crisu83/yii-bootstrap (1.*)
phundament/p3admin requires crisu83/yii-bootstrap (>=1.0,<3.0)
phundament/p3bootstrap requires crisu83/yii-bootstrap (1.*)
phundament/p3media requires crisu83/yii-bootstrap (>=1.0,<3.0)
phundament/p3pages requires crisu83/yii-bootstrap (>=1.0,<3.0)
phundament/p3widgets requires crisu83/yii-bootstrap (>=1.0,<3.0)

But maybe we could use (>=1.0,<3.0) also for phundament/p3bootstrap and phundament/gii-template-collection.

Moreover, that I'd really like to skip Version 2 and go straight to http://www.getyiistrap.com which is like Version 3, but with a lot of API changes and some widgets are missing.

@motin: Will check this again.

Best regards,
schmunk

@ametad
Copy link
Contributor Author

ametad commented May 15, 2013

Ok thanks for your quick reply!
I would like that very much: '(>=1.0,<3.0) also for phundament/p3bootstrap and phundament/gii-template-collection'

Would there be no trouble when using version 2.x (but not 3) in the mentioned modules of yours?

@ametad
Copy link
Contributor Author

ametad commented May 15, 2013

You know, just for the mean time when version 3 is not implemented yet.

@schmunk42
Copy link
Owner

Would it be OK for you if we switch from yii-bootstrap 1.x to YiiBooster?

@ametad
Copy link
Contributor Author

ametad commented May 15, 2013

One of the changes is the loading of the CSS en JS. In the early versions this could be done automatically in the your config file:

'bootstrap' => array(
            'class' => 'vendor.crisu83.yii-bootstrap.components.Bootstrap', // assuming you extracted bootstrap under extensions
            'coreCss' => FALSE, // whether to register the Bootstrap core CSS (bootstrap.min.css), defaults to true
            'responsiveCss' => FALSE, // whether to register the Bootstrap responsive CSS (bootstrap-responsive.min.css), default to false
            'yiiCss' => FALSE, //whether to register the Yii-specific CSS missing from Bootstrap.
            'enableJS' => FALSE, // whether to register jQuery and the Bootstrap JavaScript.
            'plugins' => array(
                // Optionally you can configure the "global" plugins (button, popover, tooltip and transition)
                // To prevent a plugin from being loaded set it to false as demonstrated below
                'transition' => TRUE, // disable CSS transitions
                'tooltip' => array(
                    'options' => array(
                        'placement' => 'top', // top or bottom
                    ),
                ),
            // If you need help with configuring the plugins, please refer to Bootstrap's own documentation:
            // http://twitter.github.com/bootstrap/javascript.html
            ),
        ),

But now you only can set 2 attributes: plugins & forceCopyAssets

'bootstrap' => array(
            'class' => 'vendor.crisu83.yii-bootstrap.components.Bootstrap', // assuming you extracted bootstrap under extensions
            'plugins' => array(
                // Optionally you can configure the "global" plugins (button, popover, tooltip and transition)
                // To prevent a plugin from being loaded set it to false as demonstrated below
                'transition' => TRUE, // disable CSS transitions
                'tooltip' => array(
                    'options' => array(
                        'placement' => 'top', // top or bottom
                    ),
                ),
            // If you need help with configuring the plugins, please refer to Bootstrap's own documentation:
            // http://twitter.github.com/bootstrap/javascript.html
            ),
            'forceCopyAssets'=>false, //default is false
        ),

Now you have to publish the CSS and JS in the main layout file explicitly:

        <?php Yii::app()->bootstrap->registerAllCss(); ?>
    <?php Yii::app()->bootstrap->registerCoreScripts(); ?>

@schmunk42
Copy link
Owner

That'd be OK I think.

@ametad
Copy link
Contributor Author

ametad commented May 15, 2013

You were also writing i see now ;-)

I am not familiar to YiiBooster... But at first sight it looks nice!
my main concern would be: does it use the same Bootstrap widgets? I already made a lot of use of Bootstrap and thus if it is different I have to rewrite a lot! That is something I do ratter not.. Maybe if the benefits are great ...

@schmunk42
Copy link
Owner

from @tonydspaniard

YiiWheels has absolutely nothing to do with YiiBooster... YiiBooster holds its own version of bootstrap, not compatible with Yii-Bootstrap at all.

What means that you should not install both extensions in parallel.
But YiiBootster should have all the features/widgets which yii-bootstrap has, like @motin mentioned here.

@ametad
Copy link
Contributor Author

ametad commented May 16, 2013

Not both thus. Oké!

@schmunk42
Copy link
Owner

Please have a look at the referenced issue: phundament/app#62

@schmunk42
Copy link
Owner

Upgraded to YiiBooster

@schmunk42 schmunk42 closed this Jun 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants