Yii Framework Forum: [Extension] Yiistrap - Yii Framework Forum

Jump to content

  • (5 Pages)
  • +
  • « First
  • 2
  • 3
  • 4
  • 5
  • You cannot start a new topic
  • You cannot reply to this topic

[Extension] Yiistrap The brand new version of the Yii-Bootstrap extension Rate Topic: -----

#61 User is offline   BigZ 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 28-June 11

Posted 03 October 2013 - 08:24 PM

Great extension, as always.

Any guidelines on how to use TbHtml::navbarSearchForm ?

Does it have a 'visible' property? like other items in a TbNav


Thanks,
0

#62 User is offline   qtriangle 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 06-October 13

Posted 06 October 2013 - 05:10 AM

Hello YiiStrap team,
It looks like a great extension.
I started building a new site today, and started from bootstrap extension.
After I did setup for Bootstrap extension, I saw that it is not longer supported.
So I did setup for YiiStrap.
The setup process explained at getyiistrap looks simple.
I have done all the things explained.
Now when I load my application I get the message "Alias 'bootstrap.helpers.TbHtml' is invalid. Make sure it points to an existing directory or file."

The file protected/extensions/boostrap/helpers/TbHtml.php is very well present in the server.

Any help will be appreciated.

This is my main.php config file:

<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'Test site',


	// preloading 'log' component
	'preload'=>array('log'),

    // path aliases
   'aliases' => array(
        'bootstrap' => realpath(__DIR__ . '/../extensions/bootstrap'), // change this if necessary
    ),

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
        'bootstrap.helpers.TbHtml',
	),

	'modules'=>array(
		// uncomment the following to enable the Gii tool
		
		/*'gii'=>array(
			'class'=>'system.gii.GiiModule',
			'password'=>'Enter Your Password Here',
			// If removed, Gii defaults to localhost only. Edit carefully to taste.
			'ipFilters'=>array('127.0.0.1','::1'),
		),*/

        'gii' => array(
            'generatorPaths' => array('bootstrap.gii'),
        ),
		
	),

	// application components
	'components'=>array(

        'bootstrap' => array(
            'class' => 'bootstrap.components.TbApi',   
        ),

		'user'=>array(
			// enable cookie-based authentication
			'allowAutoLogin'=>true,
		),
		// uncomment the following to enable URLs in path-format
		/*
		'urlManager'=>array(
			'urlFormat'=>'path',
			'rules'=>array(
				'<controller:\w+>/<id:\d+>'=>'<controller>/view',
				'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
				'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
			),
		),
		*/
		'db'=>array(
			'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
		),
		// uncomment the following to use a MySQL database
		'db'=>array(
			'connectionString' => 'mysql:host=localhost;dbname=mmvnew',
			'emulatePrepare' => true,
			'username' => 'root',
			'password' => 'root',
			'charset' => 'utf8',
		),
		'errorHandler'=>array(
			// use 'site/error' action to display errors
			'errorAction'=>'site/error',
		),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
				// uncomment the following to show log messages on web pages
				
				array(
					'class'=>'CWebLogRoute',
				),
				
			),
		),


	),

	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=>array(
		// this is used in contact page
		'adminEmail'=>'admin@test.com',
	),

);



0

#63 User is offline   qtriangle 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 06-October 13

Posted 07 October 2013 - 09:59 AM

anyone? pls help.
0

#64 User is offline   MistaMoh 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 18
  • Joined: 23-August 13

Posted 07 October 2013 - 10:19 AM

I compared with my working config file but found nothing wrong in yours.

Where do you get the error message? Is it at app configuration?
0

#65 User is offline   qtriangle 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 06-October 13

Posted 07 October 2013 - 11:24 AM

You can see screenshot at oi42.tinypic.com/2a0det5.jpg
Thanks in advance.
0

#66 User is offline   MistaMoh 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 18
  • Joined: 23-August 13

Posted 07 October 2013 - 11:43 AM

Yes it is in the config. Since your alias is well declared, I only see two possible causes :
1. The relative part of your path is wrong (is your main config file in its original spot or any folder directly under protected?)
2. The absolute part is wrong. Did you correctly rename your unzipped folder (in your sanity check from your first post you typed boostrap- missing t).

Good luck.
0

#67 User is offline   Ednei 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 36
  • Joined: 16-May 13

Posted 07 October 2013 - 11:55 AM

Hi!

When I use the TbGridView and set the 'filter' => $model , I see the fields to filter the data, but when I insert some text in these fields, the filter does not update the grid. Seems to be missing some script, but I dont know which one!

Someone can help-me, please.

0

#68 User is offline   qtriangle 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 06-October 13

Posted 07 October 2013 - 11:59 AM

1. The relative part of your path is wrong (is your main config file in its original spot or any folder directly under protected?)

It is in protected/config/main.php only


2. The absolute part is wrong. Did you correctly rename your unzipped folder (in your sanity check from your first post you typed boostrap- missing t).

The path I typed in this forum was a typo, but I see the path in application is correct.

Any other ideas?
0

#69 User is offline   Xavier John 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 16-August 13
  • Location:Redmond, WA

Posted 27 October 2013 - 02:13 PM

View Postqtriangle, on 07 October 2013 - 11:59 AM, said:

1. The relative part of your path is wrong (is your main config file in its original spot or any folder directly under protected?)

It is in protected/config/main.php only


2. The absolute part is wrong. Did you correctly rename your unzipped folder (in your sanity check from your first post you typed boostrap- missing t).

The path I typed in this forum was a typo, but I see the path in application is correct.

Any other ideas?


This is how my alias looks like
'bootstrap' => realpath(__DIR__ . '/../../vendor/crisu83/yiistrap'),


My import has
    'bootstrap.helpers.TbHtml',


In config/main.php I also have
require_once( dirname(__FILE__) . '/../helpers/global.php');

0

#70 User is offline   Xavier John 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 16-August 13
  • Location:Redmond, WA

Posted 27 October 2013 - 02:15 PM

bootstrap.widgets.TbNavbar :

How do we get a vertical divider and pull right the nav items?
Like 'Responsive navbar' http://getbootstrap....nts.html#navbar
0

#71 User is offline   Xavier John 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 16-August 13
  • Location:Redmond, WA

Posted 28 October 2013 - 10:58 PM

View PostXavier John, on 27 October 2013 - 02:15 PM, said:

bootstrap.widgets.TbNavbar :

How do we get a vertical divider and pull right the nav items?
Like 'Responsive navbar' http://getbootstrap....nts.html#navbar


Found a solution
	<?php
	$this->widget(
		'bootstrap.widgets.TbNavbar', array(
	    'collapse' => true,
	    'items' => array(
		array(
		    'class' => 'bootstrap.widgets.TbNav',
		    'items' => array(
			array('label' => 'Home', 'url' => array('/site/index')),
			array('label' => 'About', 'url' => array('/site/page', 'view' => 'about')),
			array('label' => 'Contact', 'url' => array('/site/contact')),
		    ),
		),
		array(
		    'class' => 'bootstrap.widgets.TbNav',
		    'items' => array(
			TbHtml::navbarMenuDivider(),
			array('label' => 'Login', 'url' => array('/site/login'), 'visible' => user()->isGuest),
			array('label' => 'Sign Up', 'url' => array('/site/signup'), 'visible' => user()->isGuest),
			array(
			    'label' => 'Logout (' . user()->name . ')',
			    'url' => array('/site/logout'),
			    'visible' => !user()->isGuest,
			),
		    ),
		    'htmlOptions' => array('class' => 'pull-right'),
		),
	    ),
		)
	);
	?>

0

#72 User is offline   VincentBz 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 20-January 13

Posted 03 November 2013 - 02:18 PM

I am having a seemingly trivial issue but I can't figure out what's wrong.

I installed Yiistrap & Yiiwheels on a new app. I updated the main.php config file as suggested but I am getting this error:

"PHP warning
include(Controller.php): failed to open stream: No such file or directory
/Users/vincent/Documents/Sites/yiiroot/framework/YiiBase.php(427)
"

if I remove the changes to main.php then my app works. With the suggested changes to the config file on I keep getting this error.

Any idea?
0

#73 User is offline   VincentBz 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 20-January 13

Posted 03 November 2013 - 04:03 PM

View PostVincentBz, on 03 November 2013 - 02:18 PM, said:

I am having a seemingly trivial issue but I can't figure out what's wrong.

I installed Yiistrap & Yiiwheels on a new app. I updated the main.php config file as suggested but I am getting this error:

"PHP warning
include(Controller.php): failed to open stream: No such file or directory
/Users/vincent/Documents/Sites/yiiroot/framework/YiiBase.php(427)
"

if I remove the changes to main.php then my app works. With the suggested changes to the config file on I keep getting this error.

Any idea?


I've found my problem. I declared the "import" array twice. so 2nd time it deleted the first inputs.
0

#74 User is offline   realtebo 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 699
  • Joined: 03-October 12
  • Location:Ferrara

Posted 18 November 2013 - 12:22 PM

How to set 'well' class when using TbForm ?
Il computer non ragiona, ma ha sempre ragione.
Ricordalo quando fai il debug
0

#75 User is offline   realtebo 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 699
  • Joined: 03-October 12
  • Location:Ferrara

Posted 21 November 2013 - 07:59 AM

Here: http://www.getyiistr...e/widgets#forms

the code has a typo:

<?php $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
'layout' => TbHtml::FORM_LAYOUTHORIZONTAL,
)); ?>


The constant name is TbHtml::FORM_LAYOUT_HORIZONTAL, with an add underscore
Il computer non ragiona, ma ha sempre ragione.
Ricordalo quando fai il debug
0

#76 User is offline   <oe> 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 24-November 13

Posted 24 November 2013 - 03:15 AM

Hi!
<?php echo TbHtml :: popover ($ label, $ title, $ content, $ htmlOptions = array ()); ?>

Method works well if $ content as a string, and if the $ content such <img src="" />, then when you click on the button displays <img src="" /> as a string.
How can I fix it to display an image?
0

#77 User is offline   Anni_g 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 18-March 13
  • Location:Berlin, Germany

Posted 14 December 2013 - 12:57 PM

Thanks for the great extension!

Today I switched YII_DEBUG from true to false. TbApi (method registerCoreCss) should now register bootstrap.min.css instead of bootstrap.css but it doesn’t - while bootstrap-responsive.min.css (method registerResponsiveCss) gets registered perfectly. Any ideas what could cause that problem?
0

#78 User is offline   Newbie5000 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 14-December 13

Posted 14 December 2013 - 03:23 PM

Upgrading from Yii Bootstrap to Yiistrap...

I am having a problem with TbHtml::Thumbnails. It generates two adjacent html elements with the same component id, causing conflict with ajax. The first element is a <div>, the second a <ul>. In the example below, my component id is "size_val1".

<div id="size_val1" class="list-view items">
<ul id="size_val1" class="list-view items thumbnails">


Is this a bug or am I doing something wrong?
Many thanks
0

#79 User is offline   Anni_g 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 18-March 13
  • Location:Berlin, Germany

Posted 16 December 2013 - 02:13 PM

View PostAnni_g, on 14 December 2013 - 12:57 PM, said:

Thanks for the great extension!

Today I switched YII_DEBUG from true to false. TbApi (method registerCoreCss) should now register bootstrap.min.css instead of bootstrap.css but it doesn’t - while bootstrap-responsive.min.css (method registerResponsiveCss) gets registered perfectly. Any ideas what could cause that problem?


I finally figured it out:
My application had been created by Yiinitilizr which defined in config.main:
'clientScript' => array(
    'scriptMap' => array(
	'bootstrap.min.css' => false,
	'bootstrap.min.js' => false,
	'bootstrap-yii.css' => false
			)
),

So these scripts wouldn't get registered by Yii::app()->bootstrap->register(). Instead Yiinitilizr had inserted these scripts in layouts.main and I decided to delete them before.
0

#80 User is offline   zeckdude 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 09-January 14

Posted 13 January 2014 - 06:55 PM

Hi All,

I really like the new grid system in Bootstrap 3. I understand that the version of Bootstrap can't just be simply switched out in YiiStrap since lots of the widgets and dependant files rely on it, but I was wondering if the grid system could be swapped out. Is that possible? If so, how?
0

Share this topic:


  • (5 Pages)
  • +
  • « First
  • 2
  • 3
  • 4
  • 5
  • You cannot start a new topic
  • You cannot reply to this topic

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