Yiibooster Make it gorgeous. Do it Fast.
#221
Posted 16 January 2013 - 12:13 PM
I'm working on a print layout for one page, but bootstrap css is interfering with my work.
How can I tell YiiBooster NOT to include the bootstrap CSS on this particular page I'm working on?
Thank you.
#222
Posted 16 January 2013 - 09:48 PM
#223
Posted 16 January 2013 - 10:28 PM
_hyde, on 16 January 2013 - 09:48 PM, said:
The same way you resize all the other form element, too. Use the proper class in htmlOptions.
$form->dropDownListRow($model, 'dropdown', array('1', '2', '3'), array('class'=>'span4'));span1, span2, span3, span4, span5, etc.
Of course you could also use your own class or the "style" attribute.
#224
Posted 16 January 2013 - 11:40 PM
I have done a slight modification in TbCarousel to include fancybox which is as
public $fancybox=false;
// modification in renderItems function
$img= CHtml::image($item['image'], $item['alt'], $item['imageOptions']);
if($this->fancybox){
echo CHtml::link($img, $item['image'], array('rel'=>'fancybox'));
}else{
echo $img;
}
I know that this could be done by extending it but if included then still not bad...
#226
Posted 18 January 2013 - 06:40 PM
I am trying to instal Yiibooster and have followed the installation steps but when I run the application the below error is shown, please help
Bootstrap and its behaviors do not have a method or closure named "register".
D:\xampp\htdocs\yii\framework\base\CComponent.php(265)
253 public function __call($name,$parameters)
254 {
255 if($this->_m!==null)
256 {
257 foreach($this->_m as $object)
258 {
259 if($object->getEnabled() && method_exists($object,$name))
260 return call_user_func_array(array($object,$name),$parameters);
261 }
262 }
263 if(class_exists('Closure', false) && $this->canGetProperty($name) && $this->$name instanceof Closure)
264 return call_user_func_array($this->$name, $parameters);
265 throw new CException(Yii::t('yii','{class} and its behaviors do not have a method or closure named "{name}".',
266 array('{class}'=>get_class($this), '{name}'=>$name)));
267 }
268
Thanks for great extension!
#227
Posted 19 January 2013 - 07:50 PM
I have weird problem. I use modal rather than open a new page to add detail to transaction. It works fine on MAMP(MacOs) and Ubuntu server. When the button is clicked it will called the javascript to submit the form. However, when I run it from XAMPP(Windows 7 and XP, XAMPP 1.7.3 and XAMPP 1.8.1) there is no action when the button is clicked. It looks like no action is done. Although, the visual event detect the attachment.
It gave me a lot of headache since the same code cannot run just in windows while my client use windows temporarily before moving to the linux server.
Anyone can help?
Thanks in advance.
#228
Posted 20 January 2013 - 12:46 AM
Daniel, on 19 January 2013 - 07:50 PM, said:
I have weird problem. I use modal rather than open a new page to add detail to transaction. It works fine on MAMP(MacOs) and Ubuntu server. When the button is clicked it will called the javascript to submit the form. However, when I run it from XAMPP(Windows 7 and XP, XAMPP 1.7.3 and XAMPP 1.8.1) there is no action when the button is clicked. It looks like no action is done. Although, the visual event detect the attachment.
It gave me a lot of headache since the same code cannot run just in windows while my client use windows temporarily before moving to the linux server.
Anyone can help?
Thanks in advance.
Hi,
We need more info. But to be clear, it has nothing to do with the end user browser? So could be an issue with some IE versions?
There might be some more useful information on the page with the issue if you uncoment this line in the config file under:
protected >> config >> main.php
array(
'class'=>'CWebLogRoute',
),Also, if it was say an email that you were trying to send in the modal, if the mail server was not set up, that might be an issue.
Cheers!
#229
Posted 21 January 2013 - 07:35 AM
Rendering ListView within a Tab and my script is:
<?php $this->widget('bootstrap.widgets.TbTabs', array(
'type'=>'tabs',
'placement'=>'above', // 'above', 'right', 'below' or 'left'
'tabs'=>array(
array('label'=>'Section 1', 'content'=>$this->widget('bootstrap.widgets.TbListView',array(
'dataProvider'=>$dataProvider,
'itemView'=>'//container/_view',
)), 'active'=>true),
array('label'=>'Section 2', 'content'=>'<p>Howdy, I\'m in Section 2.</p>'),
array('label'=>'Section 3', 'content'=>'<p>What up girl, this is Section 3.</p>'),
),
)); ?>
But its generating Error:
Error 500
Object of class TbListView could not be converted to string
How can i resolve this error.
Thanks in advance for any instruction.
#230
Posted 22 January 2013 - 03:17 AM
bit0123, on 21 January 2013 - 07:35 AM, said:
Rendering ListView within a Tab and my script is:
<?php $this->widget('bootstrap.widgets.TbTabs', array(
'type'=>'tabs',
'placement'=>'above', // 'above', 'right', 'below' or 'left'
'tabs'=>array(
array('label'=>'Section 1', 'content'=>$this->widget('bootstrap.widgets.TbListView',array(
'dataProvider'=>$dataProvider,
'itemView'=>'//container/_view',
)), 'active'=>true),
array('label'=>'Section 2', 'content'=>'<p>Howdy, I\'m in Section 2.</p>'),
array('label'=>'Section 3', 'content'=>'<p>What up girl, this is Section 3.</p>'),
),
)); ?>
But its generating Error:
Error 500
Object of class TbListView could not be converted to string
How can i resolve this error.
Thanks in advance for any instruction.
Check this out.
widget() has 3 parameters and the last one, $captureOutput, is set to false by default and the return will be directly sent for display but TbTabs' content must be a string hence you have to set the third parameter (true):
array('label'=>'Section 1', 'content'=>$this->widget('bootstrap.widgets.TbListView',array(
'dataProvider'=>$dataProvider,
'itemView'=>'//container/_view',
), true), 'active'=>true),
#232
Posted 22 January 2013 - 04:21 PM
i'm newbie to yii & i'm trying to install booster as well described in the home page but without sucess.
the extension works, i generated CRUDs using 'bootstrap.gii' but i steel having the classic blueprint theme. there is my view output :
... <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="language" content="en" /> <!-- blueprint CSS framework --> <link rel="stylesheet" type="text/css" href="/thouraya_booster/css/screen.css" media="screen, projection" /> <link rel="stylesheet" type="text/css" href="/thouraya_booster/css/print.css" media="print" /> <!--[if lt IE 8]> <link rel="stylesheet" type="text/css" href="/thouraya_booster/css/ie.css" media="screen, projection" /> <![endif]--> <link rel="stylesheet" type="text/css" href="/thouraya_booster/css/main.css" /> <link rel="stylesheet" type="text/css" href="/thouraya_booster/css/form.css" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet" type="text/css" href="/thouraya_booster/assets/b50f179f/css/bootstrap.css" /> <link rel="stylesheet" type="text/css" href="/thouraya_booster/assets/b50f179f/css/bootstrap-responsive.css" /> <link rel="stylesheet" type="text/css" href="/thouraya_booster/assets/b50f179f/css/bootstrap-yii.css" /> <link rel="stylesheet" type="text/css" href="/thouraya_booster/assets/b50f179f/css/jquery-ui-bootstrap.css" /> <script type="text/javascript" src="/thouraya_booster/assets/f74bdb93/jquery.js"></script> <script type="text/javascript" src="/thouraya_booster/assets/b50f179f/js/bootstrap.bootbox.min.js"></script> <script type="text/javascript" src="/thouraya_booster/assets/b50f179f/js/bootstrap.js"></script> <title>My Web Application</title> </head>
i tried to add manually the bootsrtap theme as it use to be with chris's bootstrap extention but i'm getting this error message 'Bootstrap and its behaviors do not have a method or closure named "register".'
i tried to manually modify the layouts/main.php exchanging the blueprint loading css by
<?php echo Yii::app()->bootstrap->registerCoreCss(); ?>but it dosn't work
i even tried a chmod777 for if access is denied to some css file and the extension is then replacing it by the yii's default one.
here is how my config file looks like:
...
// preloading 'log' component
'preload'=>array(
'log',
'bootstrap',
),
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
),
'modules'=>array(
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'root',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
'ipFilters'=>array('127.0.0.1','::1'),
'generatorPaths' => array(
'bootstrap.gii'
),
),
),
// application components
'components'=>array(
'bootstrap' => array(
'class' => 'ext.bootstrap.components.Bootstrap',
'responsiveCss' => true,
),
...
i don't know if i'm missing something somewhere.
#233
Posted 24 January 2013 - 07:28 AM
I am trying to use the TbImageColumn in one of my grids, but I can't figure out how imagePathExpression is supposed to be written. Anyone who knows?
#234
Posted 24 January 2013 - 08:15 AM
skukje, on 24 January 2013 - 07:28 AM, said:
I am trying to use the TbImageColumn in one of my grids, but I can't figure out how imagePathExpression is supposed to be written. Anyone who knows?
Hey, not sure which part you are stuck on, but this is how I got it working. I had some issues which is why someone will see it and LOL, haven't gotten around to fixing it, but for now its doing what I need it to do (show images in the column).
The important line is this one:
$content = "<img src='".Yii::app()->request->baseUrl."/images/".CHtml::encode($data->image_name)."' />";
So basically insert into the image source the full path, so hence the
Yii::app()->request->baseUrl, followed by in my case the folder that contains the images, followed by i guess the image name in the model, which will be automatically the image for each record you display.
Hope that helps...
Here it is in context of what I had to do (again try not to laugh toooo hard.......)
protected function renderDataCellContent($row, $data)
{
$content = $this->emptyText;
if ($this->imagePathExpression && $imagePath = $this->evaluateExpression($this->imagePathExpression, array('row' => $row, 'data' => $data)))
{
$this->imageOptions['src'] = $imagePath;
$content = CHtml::tag('img', $this->imageOptions);
}
elseif ($this->usePlaceHoldIt && !empty($this->placeHoldItSize))
{
$content = CHtml::tag('img', array('src'=>'http://placehold.it/' . $this->placeHoldItSize));
}
elseif ($this->usePlaceKitten && !empty($this->placeKittenSize))
{
$content = "<img src='".Yii::app()->request->baseUrl."/images/".CHtml::encode($data->image_name)."' />";
}
echo $content;
}
#235
Posted 24 January 2013 - 11:12 AM
How do I change the Bootstrap version of jquery and jquery ui? Is this possible?
I want to set accordion heightStyle: "content". But this is availbale in jquery ui 1.10 and above.
Thanks!
#236
Posted 25 January 2013 - 05:00 AM
johnsnails, on 24 January 2013 - 08:15 AM, said:
Thank you for your reply, but I'd rather not change the widget code if I don't have to. I really want to use the feature as it's supposed to be used, but it's quite hard with no documentation showing it. Any help would be appreciated!
#237
Posted 25 January 2013 - 05:10 AM
skukje, on 25 January 2013 - 05:00 AM, said:
Hmm, I thought you were supposed to, it had placeholders to some default image, so figured if i change that, that was what I was supposed to do.
Would also be interested in the correct way to do this, if what I did is shunned upon.
#238
Posted 27 January 2013 - 04:55 AM
Very grateful if someone can provide some pointers!
#239
Posted 29 January 2013 - 06:40 PM
I saw the YiiBoost website, so I downloaded it. Now what? Are there user directions or perhaps a tutorial?
Remember -- I am a ROTE beginner.
I have been learning/using Yii for a couple of months.
Thanks for any guidance.
Mike
#240
Posted 30 January 2013 - 02:22 AM
mikeklon, on 29 January 2013 - 06:40 PM, said:
I saw the YiiBoost website, so I downloaded it. Now what? Are there user directions or perhaps a tutorial?
Remember -- I am a ROTE beginner.
I have been learning/using Yii for a couple of months.
Thanks for any guidance.
Mike
Everything is quite well described in http://yii-booster.c...ng-started.html

Help
This topic is locked















