yii-extensions

Yii: why my default index of controller is not working?

给你一囗甜甜゛ 提交于 2019-12-10 18:20:30
问题 I am a Yiibie, stuck in a problem. I have installed yii users and rights. It gives me error whenever I try to run localhost/webapp/table it gives an error which is "Error 404 The system is unable to find the requested action "list" , but when I try to run localhost/webapp/table/index it shows me the view of index action which is working fine. Here is my config/main.php <?php // uncomment the following to define a path alias // Yii::setPathOfAlias('local','path/to/local-folder'); // This is

How to edit variable and compile .less with Bootstrap in Yii Framework?

…衆ロ難τιáo~ 提交于 2019-12-10 16:48:14
问题 I am using the php Framework Yii and I want to use it in combination with the Twitter Bootstrap Framework. I did exactly the same steps like here: http://www.cniska.net/yii-bootstrap/setup.html for setting it up. How can I change the default values for all the colors and so on? I changed it in the "variables.less" and it compiled successful even the bootstrap.less and the style.less, but nothing changed. Sorry that I am such a newbie but could you tell which file I have to change and compile

Yii booster: how to render a cgridview inside a relation table row?

天涯浪子 提交于 2019-12-08 09:48:11
问题 I'm using boostrap library on Yii via yii-booster I've created a relation table view The related view is a TbGriView itself Vhen in a row i click on the link on the 'related' column, the row expands itself, and render a TbGridview inside it. The problem is that the internal gridview cannot be sorte, paged or filtered, because each action on it causes that the entire container grid will empty Note - external grid as a id of 'extenalgrid' - each internal grid has as id like 'internalgrid-$rowId

yii ajax xupload form submit is not working

ⅰ亾dé卋堺 提交于 2019-12-08 06:03:48
问题 Q1 : form submitting is not working. Q2 : how to limit upload files (e.g 1 - 5 files only) status : create a form with ajax upload xupload My model (fadepreciation.php) public function afterSave( ) { $this->addImages( ); parent::afterSave( ); } public function addImages( ) { //If we have pending images if( Yii::app( )->user->hasState( 'images' ) ) { $userImages = Yii::app( )->user->getState( 'images' ); //Resolve the final path for our images $path = Yii::app( )->getBasePath( )."/../images

Yii2 Scroll Pager with overflow scroll

橙三吉。 提交于 2019-12-07 11:02:35
问题 i am using Yii2 with a scroll pager extension: http://kop.github.io/yii2-scroll-pager/ However, when you set the scroll for a div, instead of the whole screen, ajax is not loading any additional items when you scroll down. Here's my code: echo ListView::widget([ 'dataProvider' => $newsDataProvider, 'itemOptions' => ['class' => 'item'], 'itemView' => '_news_item_view', 'pager' => [ 'class' => \kop\y2sp\ScrollPager::className(), 'negativeMargin' => '200', 'triggerText' => 'Load More news',

Yii-rights params/data for bizrule

和自甴很熟 提交于 2019-12-07 05:59:50
问题 Scenerio: Using Yii-rights + Yii-user module in my project. In Rights, I generated operations based on my controller action, under update I added a child UpdateOwn. For UpdateOwn, the bizrule is suppose to be a simple comparison that the logged in user's ID is equal to $model->user_id field. Problem: I understand yii checkaccess allow you to pass in variables as parameters and comparing with your defined bizrule. But how does it work for Yii-rights module? How or what are the data/params

How to upgrade Yii 1.x to Yii 2.0

ぐ巨炮叔叔 提交于 2019-12-06 23:23:59
问题 How to upgrade Yii 1.x version to Yii 2.0 latest release version? I am using ubuntu OS , Process to updating my old Yii to new Yii release version 2.0? 回答1: The Yii2 guide has excellent documentation in this regard see Upgrade from v1 I recently migrated couple of moderately complex applications from Yii 1.x to Yii 2.0. There are two ways to go about it , either you can run Yii 1.x and Yii 2 at the same time see using-yii-2-with-yii-1. Then migrate part by part, while it is possible it was

Upsert embedded document in yiimongodbsuite

烈酒焚心 提交于 2019-12-06 04:39:29
问题 I need to perform an upsert command in yiimongodbsuite. I tried $model = new Murls(); $model->userid=$userid; $model->title=$title; $model->edits[0] = new Medithtml(); $model->edits[0]->path= $htm; $model->edits[0]->html=$path; $model->edits[0]->ci=$ci; $model->update(array('_id'=>$rec->_id ),array('userid', 'title','edits' ), true ); But this shows an error. Murls model is defined as follows class Murls extends EMongoDocument { public $userid; public $title; public $edits; public static

Yii2 installing extension from private git server - framework not see it

…衆ロ難τιáo~ 提交于 2019-12-06 04:11:24
问题 I've created my yii2 extension. I keep it on my private git server. I managed the extension to be downloaded through composer using following code: "repositories": [ { "type": "package", "package": { "name": "author/yii2-user", "version": "dev-master", "source": { "url": "ssh://git@my.server.pl/srv/git/user.git", "type": "git", "reference": "origin/master" } } } ], and "author/yii2-user": "*", in require section. It all works fine but there is one problem. After downloading extension,

loading Yii Bootstrap in a module only

人盡茶涼 提交于 2019-12-06 02:57:40
问题 I'm try to load the Yii Bootstrap extension in the admin module only but it's not working. I'm assuming I need to preload it or initiate it somehow... Thanks! class AdminModule extends CWebModule { public function init() { // import the module-level models and components $this->setImport(array( 'admin.models.*', 'admin.components.*', 'ext.bootstrap.components.Bootstrap', )); } public function beforeControllerAction($controller, $action) { if(parent::beforeControllerAction($controller, $action