Yii Framework Forum: Konfigurasi Bootstrap di Yii - Yii Framework Forum

Jump to content

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

Konfigurasi Bootstrap di Yii Rate Topic: -----

#1 User is offline   Hadyan 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 28-June 12

Posted 30 June 2012 - 07:19 AM

Halo salam kenal, saya baru terjun di Yii. Oleh karena itu, saya ingin bertanya mengenai konfigurasi bootstrap di Yii, saya sudah pernah mencoba untuk mengikuti instruksi , akan tetapi saya masih bingung dan belum mengerti, bisa tolong dibantu? terima kasih.
0

#2 User is offline   Hadyan 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 28-June 12

Posted 30 June 2012 - 07:22 AM

View PostHadyan, on 30 June 2012 - 07:19 AM, said:

Halo salam kenal, saya baru terjun di Yii. Oleh karena itu, saya ingin bertanya mengenai konfigurasi bootstrap di Yii, saya sudah pernah mencoba untuk mengikuti instruksi , akan tetapi saya masih bingung dan belum mengerti, bisa tolong dibantu? terima kasih.


Sebagai catatan, Instruksi yang saya ikuti berasal dari www.cniska.net/yii-bootstrap/setup.html
0

#3 User is offline   ahmadroni 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 250
  • Joined: 14-June 09
  • Location:Yogyakarta-Indonesia

Posted 01 July 2012 - 06:03 PM

View PostHadyan, on 30 June 2012 - 07:22 AM, said:

Sebagai catatan, Instruksi yang saya ikuti berasal dari www.cniska.net/yii-bootstrap/setup.html


itu setting di config/main.php monggo dicoba
Hospital Cost Management System and
Hospital Management Information System
0

#4 User is offline   rulsyah 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 01-August 11

Posted 01 July 2012 - 09:29 PM

Dear friend...

1. yii bootstrap di extract dulu ke folder protected/extensions/bootstrap .
2. protected/config/main.php di setting dulu seperti yg di www.cniska.net/yii-bootstrap/setup.html
3. coba di-refresh, kalau tampilan standard yii sudah 'rada' berubah dari biasanya, berarti yii-bootstrap sudah loaded. supaya lebih pasti, nyalain CWebLogRoute.
4. ubah file protected/view/layout/main.php , hapus berbagai css yg berhubungan dengan theme standard. css class nya juga ikuti standard bootstrap.
5. seharusnya sudah bisa di coba tuh komponen yii bootstrap nya.
0

#5 User is offline   tyo 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 03-July 12

Posted 07 July 2012 - 10:55 AM

View Postrulsyah, on 01 July 2012 - 09:29 PM, said:

Dear friend...

1. yii bootstrap di extract dulu ke folder protected/extensions/bootstrap .
2. protected/config/main.php di setting dulu seperti yg di www.cniska.net/yii-bootstrap/setup.html
3. coba di-refresh, kalau tampilan standard yii sudah 'rada' berubah dari biasanya, berarti yii-bootstrap sudah loaded. supaya lebih pasti, nyalain CWebLogRoute.
4. ubah file protected/view/layout/main.php , hapus berbagai css yg berhubungan dengan theme standard. css class nya juga ikuti standard bootstrap.
5. seharusnya sudah bisa di coba tuh komponen yii bootstrap nya.



gan saya udah ngikutin cara di atas , tapi kok js nya gak jalan ya ?
contohnya dropdown , tabs dll yg berhubungan dengan js gak jalan
0

#6 User is offline   kokoadi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 47
  • Joined: 03-December 08

Posted 08 July 2012 - 10:44 AM

Coba hapus isi folder asset
0

#7 User is offline   tyo 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 03-July 12

Posted 08 July 2012 - 12:05 PM

View Postkokoadi, on 08 July 2012 - 10:44 AM, said:

Coba hapus isi folder asset


udah saya hapus gan , kok masih tetap gak bisa ya ?? saya ikutin aturan script ini :


<?php $this->widget('bootstrap.widgets.BootNavbar', array(
    'fixed'=>false,
    'brand'=>'Project name',
    'brandUrl'=>'#',
    'collapse'=>true, // requires bootstrap-responsive.css
    'items'=>array(
        array(
            'class'=>'bootstrap.widgets.BootMenu',
            'items'=>array(
                array('label'=>'Home', 'url'=>'#', 'active'=>true),
                array('label'=>'Link', 'url'=>'#'),
                array('label'=>'Dropdown', 'url'=>'#', 'items'=>array(
                    array('label'=>'Action', 'url'=>'#'),
                    array('label'=>'Another action', 'url'=>'#'),
                    array('label'=>'Something else here', 'url'=>'#'),
                    '---',
                    array('label'=>'NAV HEADER'),
                    array('label'=>'Separated link', 'url'=>'#'),
                    array('label'=>'One more separated link', 'url'=>'#'),
                )),
            ),
        ),
        '<form class="navbar-search pull-left" action=""><input type="text" class="search-query span2" placeholder="Search"></form>',
        array(
            'class'=>'bootstrap.widgets.BootMenu',
            'htmlOptions'=>array('class'=>'pull-right'),
            'items'=>array(
                array('label'=>'Link', 'url'=>'#'),
                '---',
                array('label'=>'Dropdown', 'url'=>'#', 'items'=>array(
                    array('label'=>'Action', 'url'=>'#'),
                    array('label'=>'Another action', 'url'=>'#'),
                    array('label'=>'Something else here', 'url'=>'#'),
                    '---',
                    array('label'=>'Separated link', 'url'=>'#'),
                )),
            ),
        ),
    ),
)); ?>



dari cniska.net/yii-bootstrap/

tapi dropdown nya ko gak bisa ia gan ??
mohon penjelasanya gan
0

#8 User is offline   ricky juniar 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 11-July 10

Posted 25 December 2012 - 11:25 PM

gan, ane masih ada error gini:

NetworkError: 404 Not Found - assets/lib/bootstrap/less/mixins.less


itu gimana ya?
0

#9 User is offline   hadi75 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 05-February 12

Posted 29 December 2012 - 08:18 PM

View Postricky juniar, on 25 December 2012 - 11:25 PM, said:

gan, ane masih ada error gini:

NetworkError: 404 Not Found - assets/lib/bootstrap/less/mixins.less


itu gimana ya?


ada kaitan dgn ini nggak:

Chris83 said:

This means that you need to register its files (css, js) manually. This can be done through the public methods in the Bootstrap component. So now instead of Bootstrap being loaded everywhere you can actually control where you want to load it without any hacks.

0

#10 User is offline   J.J 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 126
  • Joined: 01-April 11

Posted 02 January 2013 - 05:22 AM

View Postricky juniar, on 25 December 2012 - 11:25 PM, said:

gan, ane masih ada error gini:

NetworkError: 404 Not Found - assets/lib/bootstrap/less/mixins.less


itu gimana ya?

Coba cek gan, filenya ada tdk difolder tsb ? Kl tdk ada coba di create dl folder atau filenya.
0

#11 User is offline   zykapratama 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 13-January 11
  • Location:Indonesia

Posted 17 January 2013 - 01:57 AM

View Posttyo, on 08 July 2012 - 12:05 PM, said:

udah saya hapus gan , kok masih tetap gak bisa ya ?? saya ikutin aturan script ini :


<?php $this->widget('bootstrap.widgets.BootNavbar', array(
    'fixed'=>false,
    'brand'=>'Project name',
    'brandUrl'=>'#',
    'collapse'=>true, // requires bootstrap-responsive.css
    'items'=>array(
        array(
            'class'=>'bootstrap.widgets.BootMenu',
            'items'=>array(
                array('label'=>'Home', 'url'=>'#', 'active'=>true),
                array('label'=>'Link', 'url'=>'#'),
                array('label'=>'Dropdown', 'url'=>'#', 'items'=>array(
                    array('label'=>'Action', 'url'=>'#'),
                    array('label'=>'Another action', 'url'=>'#'),
                    array('label'=>'Something else here', 'url'=>'#'),
                    '---',
                    array('label'=>'NAV HEADER'),
                    array('label'=>'Separated link', 'url'=>'#'),
                    array('label'=>'One more separated link', 'url'=>'#'),
                )),
            ),
        ),
        '<form class="navbar-search pull-left" action=""><input type="text" class="search-query span2" placeholder="Search"></form>',
        array(
            'class'=>'bootstrap.widgets.BootMenu',
            'htmlOptions'=>array('class'=>'pull-right'),
            'items'=>array(
                array('label'=>'Link', 'url'=>'#'),
                '---',
                array('label'=>'Dropdown', 'url'=>'#', 'items'=>array(
                    array('label'=>'Action', 'url'=>'#'),
                    array('label'=>'Another action', 'url'=>'#'),
                    array('label'=>'Something else here', 'url'=>'#'),
                    '---',
                    array('label'=>'Separated link', 'url'=>'#'),
                )),
            ),
        ),
    ),
)); ?>



dari cniska.net/yii-bootstrap/

tapi dropdown nya ko gak bisa ia gan ??
mohon penjelasanya gan


ni aku ada contoh bootstrap dengan drop down menu
<?php
                $this->widget('zii.widgets.CMenu', array(
                    'htmlOptions' => array('class' => 'pull-right nav'),
                    'submenuHtmlOptions' => array('class' => 'dropdown-menu'),
                    'itemCssClass' => 'item-test',
                    'encodeLabel' => false,
                    'items' => array(
                        array('label' => 'Home', 'url' => array('/post/index')),
                        // array('label' => 'About Themes', 'url' => array('site/page', 'view' => 'about')),
                        array('label' => 'About Themes <span class="caret"></span>', 'url' => '#', 'itemOptions' => array('class' => 'dropdown', 'tabindex' => "-1"),
                            'linkOptions' => array('class' => 'dropdown-toggle', 'data-toggle' => "dropdown"),
                            'items' => array(
                                array('label' => 'About Theme', 'url' => array('site/page', 'view' => 'about')),
                                array('label' => 'Forms', 'url' => array('site/page', 'view' => 'forms')),
                                array('label' => 'Graphs', 'url' => array('site/page', 'view' => 'graphs')),
                                array('label' => 'Interface', 'url' => array('site/page', 'view' => 'interface')),
                                array('label' => 'Tables', 'url' => array('site/page', 'view' => 'tables')),
                                array('label' => 'Typography', 'url' => array('site/page', 'view' => 'typography')),
                        )),
                        array('label' => 'Rights', 'url' => array('/rights/assignment/view'), 'visible' => !Yii::app()->user->isGuest),
                        array('label' => 'Post <span class="caret"></span>', 'url' => '#', 'itemOptions' => array('class' => 'dropdown', 'tabindex' => "-1"),
                            'linkOptions' => array('class' => 'dropdown-toggle', 'data-toggle' => "dropdown"),
                            'items' => array(
                                array('label' => 'Post', 'url' => array('/post/index')),
                                array('label' => 'Create Post', 'url' => array('/post/create')),
                            ), 'visible' => !Yii::app()->user->isGuest),
                        array('label' => 'User <span class="caret"></span>', 'url' => '#', 'itemOptions' => array('class' => 'dropdown', 'tabindex' => "-1"),
                            'linkOptions' => array('class' => 'dropdown-toggle', 'data-toggle' => "dropdown"),
                            'items' => array(
                                array('label' => 'User', 'url' => array('/user/index')),
                                array('label' => 'Create User', 'url' => array('/user/create')),
                            ), 'visible' => !Yii::app()->user->isGuest),
                        array('label' => 'Forum <span class="caret"></span>', 'url' => '#', 'itemOptions' => array('class' => 'dropdown', 'tabindex' => "-1"),
                            'linkOptions' => array('class' => 'dropdown-toggle', 'data-toggle' => "dropdown"),
                            'items' => array(
                                array('label' => 'Forum', 'url' => array('/sforum')),
                                array('label' => 'Forum Admin', 'url' => array('/sforum/admin')),
                            ), 'visible' => !Yii::app()->user->isGuest),
                        array('label' => 'Contact Us', 'url' => array('/site/contact')),
                        array('label' => 'Login', 'url' => array('/site/login'), 'visible' => Yii::app()->user->isGuest),
                        array('label' => 'Logout (' . Yii::app()->user->name . ')', 'url' => array('/site/logout'), 'visible' => !Yii::app()->user->isGuest),
                    ),
                ));
                ?>

coba di utak-atik deh.. ntar kamu bakalan ngerti dengan sendiri...

have fun ! selamat koding...
0

#12 User is offline   Thor 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 17-January 13

Posted 17 January 2013 - 03:57 AM

Saya masih baru sebagai pengguna yii,

Kalau misalnya saya sudah menggunakan template lainnya, lalu ingin install bootstrap hanya untuk komponen-komponennya apakah bisa? Apakah tidak akan mengganggu template yang sedang saya gunakan saat ini?<br />
Terima kasih
0

#13 User is offline   J.J 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 126
  • Joined: 01-April 11

Posted 21 January 2013 - 08:08 PM

View PostThor, on 17 January 2013 - 03:57 AM, said:

Saya masih baru sebagai pengguna yii,

Kalau misalnya saya sudah menggunakan template lainnya, lalu ingin install bootstrap hanya untuk komponen-komponennya apakah bisa? Apakah tidak akan mengganggu template yang sedang saya gunakan saat ini?<br />
Terima kasih


Bisa koq gan, setelah agan setting dan config componentnya, lalu panggil saja component sesuai dengan yang agan perlukan. Agan ga perlu setting layout untuk templatenya.
0

#14 User is offline   ande zake 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 31-December 12

Posted 24 January 2013 - 02:40 AM

View PostThor, on 17 January 2013 - 03:57 AM, said:

Saya masih baru sebagai pengguna yii,

Kalau misalnya saya sudah menggunakan template lainnya, lalu ingin install bootstrap hanya untuk komponen-komponennya apakah bisa? Apakah tidak akan mengganggu template yang sedang saya gunakan saat ini?<br />
Terima kasih


bisa gan, misal agan punya 2 themes...
config main nya, default theme = tema1...

jika pada controller tertentu agan pengen pakek tema lain, overide method init() gan, such that,
public function init(){
            Yii::app()->theme = 'simple';
            parent::init();
        }

0

#15 User is offline   Dimanus 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 11-February 13

Posted 11 February 2013 - 02:39 AM

View Postricky juniar, on 25 December 2012 - 11:25 PM, said:

gan, ane masih ada error gini:

NetworkError: 404 Not Found - assets/lib/bootstrap/less/mixins.less


itu gimana ya?


i found in file /protected/extensions/bootstrap/assets/css/yii.css line 1
string
@import url("../lib/bootstrap/less/mixins.less");

and edit to
@import url("../less/mixins.less");

I think it's bug :)
0

Share this topic:


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

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