Yiibooster

i dowloaded Yii Boilerplate but i donot knew where i have to but it… is it used instead of yii framework folder? or it must included in protected folder? i am confused about how to start because i am a new user in Yii i am come from codeigniter framwork because i found Yii is very powerful framework… any one can help me to how to start Yii Boilerplate

If you are not experienced with Yii, don’t use the boilerplate code.

It’s not targeted at Yii newcomers, not at all.

And that’s why I’m not offering any help but this advice: learn to use Yii first, before attempting to use the boilerplate. It is advanced, and also assumed that you know what you’re doing so that you can tailor it to suit your apps needs.

now i study Yii and i can make controllers, models, views and make crud and customize relations in models.

and i used bootstrap and a css framework(alon without Yii).

is it enough to start using Yii boilerplate?

I’m starting to use it.

Hi, is there any way to force TbActiveForm elements to use label() instead of labelEx()? The purpose is to avoid to show "required" flag beside the input label in search forms and similar. Thanks in advance.

YiiBoilerplate Bootstrap theme loads bootstrap.css twice, one from /css/bootstrap.css, other one from assets folder. Is it okey?

Nope, YiiBoilerplate actually needs to be reloaded but I do not have time at all… I have version 1.0.6 just lying on my computer and not able to even scratch my hair :(

Promise that if i have a couple of hours free will do… hopefully this weekend

EDIT: I want to also write a proper WIKI for you guys to understand the installation process of YiiBoilerplate

hello, everybody

I’m using TbSelect2, it’s perfect, but when I write ajax option for this widget, it doesn’t work, can you

write simple AJAX config for this widget plz?

here is my code (simpler version):




//view


$wConfig                        = array(

            'model'          => $model,

            'attribute'      => 'city_id',

            'asDropDownList' => 1,

            'options'        => array(

                'width'           => '100%',

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

                'closeOnSelect' => false,     

                'ajax' => array( // this config doesn't work - why?

                   'url' => Yii::app()->createUrl('ajax/City'),

                   'dataType'=>'json',

                   'data'=>'js:function(term,page) { return {q: term, page_limit: 3, page: page}; }',

                   'results'=>'js:function(data,page) { return {results: data}; }',

                ),

            ),

            'data'     => array(

                1             => 'Novosibirsk',

                2             => 'Omsk',

                3             => 'Kemerovo',

            ),

            'htmlOptions' => array(

                'id2' => 'city_id',

            ),

        );

        $this->widget('bootstrap.widgets.TbSelect2', $wConfig);


// ajaxController


public function actionCity() {

        $data = array(

            array(

                'id'   => 1,

                'text' => 'Moscow',

            ),

            array(

                'id'   => 2,

                'text' => 'New York',

            ),

        );

        echo CJSON::encode($data);

    }




I just actived the bootstrap theme, nothing else. I think it is not related with installation.

Hi.

Any incompatibilities detected between Yii 1.1.13 and YiiBooster 1.0.5?

Suddenly, the rows of a TbGrid show no data in columns (but the rows are displayed).

This is the HTML produced:




<tbody>

<tr class="odd">

<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>

</tbody>



Regards.

Hi, I’ve been using YiiBooster, and I want to know if there is a way to load a form (Edit: the form has bootstrap widgets) via ajax into a dialog or modal without loosing the visual effects (CSS).

I tried the diferent options for renderPartial(…,false,true), and it seems to load the form properly but the main layout menu and styles are lost, some functionalities too, can someone tell me if I’m missing something??

… sorry for my english :D

Ok. Not sure yet if it’s an incompatibilty or not, but the issue is not happening with Yii 1.1.12/YiiBooster 1.0.5

It sounds to me like you know enough to use it.

I also found the instructions a bit confusing when I got started on the website.

Not having a go a Yiibooster it has made my boss love me like nothing else. Just the initial setup was a bit confusing.

I will assume you know how to create a new yii app though.

So inside the newly created Yii App go into the protected >> extentions folder and create another folder called ‘bootstrap’

Inside there extract the contents of the zip when you visit this link.

https://github.com/clevertech/YiiBooster/zipball/master

So your directory structure should look like the screenshot provided.

Although you will also have a filter folder tucked in there also.

beyond that you need to configuring it using the instructions found on the YiiBooster site

I think that is all you will need!

John, he’s referring to YiiBoilerplate, not YiiBootstrap.

There’s a difference. :)

The boilerplate is great, but it is a complete three tier application (frontend, backend and console) which is a great starting point, but only if you already know Yii basics (and quite a bit beyond that as a matter of fact).

YiiBootstrap is only a small part of what’s included in YiiBoilerplate.

Confusing, I know. ;)

Ah k. My bad, in that case I agree with the original person who replied that they may not be ready.

Just assumed he was trying to get started perhaps not realizing that there was a difference (eg one deviates significantly from the default yii folder structure).

And one sits in the extension folder.

Cheers!

I would just use yii-boost or yii-bootstrap. Above poster is right, Yii-boilerplate is set up 3 tier, its overkill for demo/resume fodder (I think the fact it says boilerplate is a bit misleading this is much more exstensive then just "boilerplate" bolted on).

If you plan on tinkering on your own box or vm box only that’s one thing for yii-bp, but dont expect to migrate straight from dev to say shared hosting (godaddy, or other commercial hosts) to show off your hard earned understanding or your own small bizz without vps or full su rights on the prod machine (at least not without wanting to hang yourself first).

Loving Yii, started just this week, took 3 days for me to get everything good and proper from dev to shared hosting. Working on my first theme, got nice urls, mysql connection gii generated forms from db, and a few other goodies working! I haven’t touched php in 5 years (so new to php5 :) ), had to work in perl the whole time :P.

Don’t feel bad if its a little over your head, I’ve worked with multiple custom MVC perl frameworks for the last 5 years and a web dev for 10, but never worked at a shop that had the set up that the boilerplate setup is going for (even for a team of <3 devs it would be a bit over kill in my mind, let alone one, not ditracting its a damn nice organised setup).

Keep in mind you can always add/upgrade as you go and still keep things somewhat sane (modernizer, what have you). Version control will also really help keep things nice and clean as well, but I know how it feels, you want to start out in the benz first. :)

Good afternoon. Tell me why booster brakes at ajax validation fields, as well as working with CGridView unlike yii-bootstrap?

In the booster - I choose the field and 2-3 seconds only comes the answer, valid value or not, when in yii-bootstrap is instant? Maybe where you probably need to register latency or not?

Understood, if at design - then I realized how assets are copied every time, and if the mode production - all fast! Thank you! ;)

How to use the initSelection to fill the box with values from the database.

For example tags that already belongs to the item.

View


<?php $this->widget('bootstrap.widgets.TbSelect2', array(

	'asDropDownList' => false,

	'model' => $model,

	'attribute' => 'tagIds',

	'options' => array(

		'placeholder' => 'tags',

		'width' => '40%',

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

		'multiple'=>true,

		'maximumSelectionSize'=>4,

		'ajax'=>array(

			'url'=>Yii::app()->createUrl('/tag/suggesttag'),

			'dataType'=>'json',

			'data'=>'js:function(term,page){return{q: term, limit: 10};}',

			'results'=>'js:function(data,page){ return {results: data.tags}; }',

		)

	)

)); ?>

Thanks