Search Results

Search found 13276 results on 532 pages for 'yii framework'.

Page 3/532 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • widget within module in Yii

    - by Karolis
    I'm trying to create a widget within the module and then load that widget from 'outside' of the module. More particularly I'm using user module written by someone else. I don't want to have a separate page for displaying a login form, therefore I tried to make a CPortlet/widget (confusion) displaying the login form. Basically, I've moved the code from LoginController into that widget. Then I try to display the widget on some random page by <?php $this->widget('user.components.LoginForm'); ?> However, I get an error CWebApplication does not have a method named "encrypting". in UserIdentity class in this line: else if(Yii::app()->controller->module->encrypting($this->password)!==$user->password) This happens, because I'm basically trying to execute this code within context of the app and not the module. Thus the "Yii::app()-controller-module" trick doesn't really work as expected. What am I doing wrong:-\ Is there a better way to achieve this. I.e. display that login form in some other page, which is normally displayed by accessing login controller within user module (user/login) or is a widget the right way of doing it? Thanks.

    Read the article

  • Validation framework for .NET Compact Framework 3.5.

    - by Michal Drozdowicz
    Do you know of a fast and simple entity validation framework that could be used in a Compact Framework project? I've done some experiments with FluentValidation (using db4o System.Linq.Expressions, but it's rather slow) and EViL (but it seems a bit half-baked). Can you suggest any other or maybe point me to some resources on how to design such a framework so that it's both easy to use and performant?

    Read the article

  • Heroku + Yii "Application runtime path is not valid"

    - by JStriedinger
    I'm trying to deploy a Yii webapp into Heroku but, it keep throwing at me a weird error: Application runtime path "/app/www/protected/runtime" is not valid. Please make sure it is a directory writable by the Web server process. Makes no sense and I know is something to do with Heroku because in my local machine it works fine. Does anyone what does this means? what do I need to do in Heroku ti fix this?? Many thanks.

    Read the article

  • Yii file upload issue

    - by user1289853
    Couple of months ago,I developed a simple app using YII,one of the feature was to upload file. The feature was working well in my dev machine,couple of days ago client found the file upload feature is not working in his server since deployment. And after that I test my dev machine that was not working too. My controller looks: public function actionEntry() { if (!Yii::app()->user->isGuest) { $model = new TrackForm; if (isset($_POST['TrackForm'])) { $entry = new Track; try { $entry->product_image = $_POST['TrackForm']['product_image']; $entry->product_image = CUploadedFile::getInstance($model, 'product_image'); if ($entry->save()) { if ($entry->product_image) { $entry->product_image->saveAs($entry->product_image->name, '/trackshirt/uploads'); } } $this->render('success', array('model' => $model)); // redirect to success page } } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } } else { $this->render('entry', array('model' => $model)); } } } Model is like below: <?php class Track extends CActiveRecord { public static function model($className=__CLASS__) { return parent::model($className); } public function tableName() { return 'product_details'; } } My view looks: <?php $form = $this->beginWidget('CActiveForm', array( 'id' => 'hide-form', 'enableClientValidation' => true, 'clientOptions' => array( 'validateOnSubmit' => true, ), 'htmlOptions' => array('enctype' => 'multipart/form-data'), )); ?> <p class="auto-style2"><strong>Administration - Add New Product</strong></p> <table align="center" style="width: 650px"><td class="auto-style3" style="width: 250px">Product Image</td> <td> <?php echo $form->activeFileField($model, 'product_image'); ?> </td> </tr> </table> <p class="auto-style1"> <div style="margin-leftL:-100px;"> <?php echo CHtml::submitButton('Submit New Product Form'); ?> </div> <?php $this->endWidget(); ?> Any idea where is the problem?I tried to debug it but every time it returns Null. Thanks.

    Read the article

  • Reading data from an Entity Framework data model through a WCF Data Service

    - by nikolaosk
    This is going to be the fourth post of a series of posts regarding ASP.Net and the Entity Framework and how we can use Entity Framework to access our datastore. You can find the first one here , the second one here and the third one here . I have a post regarding ASP.Net and EntityDataSource. You can read it here .I have 3 more posts on Profiling Entity Framework applications. You can have a look at them here , here and here . Microsoft with .Net 3.0 Framework, introduced WCF. WCF is Microsoft's...(read more)

    Read the article

  • Developing your Data Access Layer with ADO.NET Entity Framework 4

    Entity Framework has evolved in the light of feedback. ADO.NET Entity Framework 4 is now better able to accommodate different development methodologies. A welcome improvement is the way that, the application designer now has a range of options in the way that Entity Framework creates the Data Access layer. Prasanna returns to Simple-Talk to explain the significance of the changes.

    Read the article

  • Enhancing performance in Entity Framework applications by precompiling LINQ to Entities queries

    - by nikolaosk
    This is going to be the tenth post of a series of posts regarding ASP.Net and the Entity Framework and how we can use Entity Framework to access our datastore. You can find the first one here , the second one here , the third one here , the fourth one here , the fifth one here ,the sixth one here ,the seventh one here ,the eighth one here and the ninth one here . I have a post regarding ASP.Net and EntityDataSource . You can read it here .I have 3 more posts on Profiling Entity Framework applications...(read more)

    Read the article

  • Web framework for IPad and common desktop browsers?

    - by Chris
    We are developing a web-based, commercial point-of-sale application. We'd like the same web site to work well on an Ipad as well a desktop browsers. We're looking for a web framework that makes the site look good on an IPad, but also makes the site work well in a desktop browser such as Chrome, IE, or Firefox on Windows or a Mac. I found quite a few at 18 Mobile Frameworks and Development Tools for Creating iPhone Apps Most of them, such as JQTouch, help a web site look and act more like a native IPhone application but they don't emphasize the cross platform/browser experience. The exception seems to be Sproutcore, which seems to be a full-fledged javascript MVC application framework. I did have trouble getting some of the demos to work under Chrome, but what did work looks good. What framework(s) have you actually used to develop web sites to work on an Ipad and desktop browser? If you didn't use a framework, how did you get it to work well under both environments?

    Read the article

  • Need advice on framework design: how to make extending easy

    - by beginner_
    I'm creating a framework/library for a rather specific use-case (data type). It uses diverse spring components, including spring-data. The library has a set of entity classes properly set up and according service and dao layers. The main work or main benefit of the framework lies in the dao and service layer. Developers using the framework should be able to extend my entity classes to add additional fields they require. Therefore I made dao and service layer generic so it can be used by such extended entity classes. I now face an issue in the IO part of the framework. It must be able to import the according "special data type" into the database. In this part I need to create a new entity instance and hence need the actual class used. My current solution is to configure in spring a bean of the actual class used. The problem with this is that an application using the framework could only use 1 implementation of the entity (the original one from me or exactly 1 subclass but not 2 different classes of the same hierarchy. I'm looking for suggestions / desgins for solving this issue. Any ideas?

    Read the article

  • Difference between Zend Framework 1.8 and 1.11 [closed]

    - by user985482
    Hi I have about 6 months of PHP experience and now I am thinking of starting of learning Zend Framework. I learn best usually from books and I noticed on amazon that the most recent release is for the version 1.8. Zend Framework 1.8 Web Application Development Since the curent version is 1.11 will this be a problem in the future? What is the difference beetween the versions. Can anyone recommend a more recent book for this framework?

    Read the article

  • Different Approaches of Entity Framework

    Entity Framework provides three different approaches to deal with the model, and each one has its own pros and cons. Ambily Kavumkal Kamalasanan discusses the advantages of the Model, Database, and Code First approaches to modeling in Entity Framework 5.0. Entity Framework still has its share of issues and is not widely accepted yet - but through contributing to its ongoing development the community can make it more stable and increase its adoption.

    Read the article

  • Creating my own PHP framework

    - by onlineapplab.com
    Disclaimer: I don't want to start any flame war so there will not be no name of any framework mentioned. I've been using quite many from the existing PHP frameworks and my experience in each case was similar: everything is nice a the beginning but in the moment you require something non standard you get into lot of problems to fix otherwise simple issues. In case of frameworks following the MVC design pattern there are some issues with the implementation of each layer for example there is a lot of codding used for model and data access with using ORM and presentation is not much more than pure phtml. Some frameworks use their own wrappers for existing PHP functionality and in some cases severely limiting original functionality. Depending on framework you can have additional problems like lack of documentation, slow or non existent development cycle and last but not least speed. While ago I made my own framework which while doing it's job and being used for few different applications after couple of years more of experience with PHP doesn't seem to be perfect piece of codding. I could write my own framework and use additional experience I've gathered during these years to make it better on the other hand I'm aware that there is quite many better programmers working on creating/upgrading existing frameworks. So does it make at all nay sense to write my own PHP framework if there is so many possibilities to choose from?

    Read the article

  • Can I refresh a Yii CGridView from js?

    - by Brian Dunn
    When a "Create" modal dialog is submitted via XHR Then the rows in a Yii CGridView should be refreshed. I've tried to achieve this by rendering the new gridview in the XHR "create" action and then inserting it into the page via $("#list").html(response), but rendering a CGridView causes jQuery <script> include tags to be registered for inclusion, and so when I introduce those tags into the page they reload jQuery, which wipes out my live event handlers, so a bunch of stuff breaks. Which has me thinking, "the GridView knows how to refresh itself. heck, it does all the time on sort or page." So I can click a sort button in the GridView from js, but thats less than Ideal. I'd prefer to say $("#list").gridview('reload') or $.fn.gridview.reload("#list") or some such sense. Or do the way cool thing that is soo much simpler that you thought of just now.

    Read the article

  • Yii problem in blog tutorial

    - by Kani
    When i login occurs following problem. PHP Error Description include(User.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory Source File D:\Badrakh\xampp\htdocs\yii\framework\YiiBase.php(395) 00383: * @return boolean whether the class has been loaded successfully 00384: */ 00385: public static function autoload($className) 00386: { 00387: // use include so that the error PHP file may appear 00388: if(isset(self::$_coreClasses[$className])) 00389: include(YII_PATH.self::$_coreClasses[$className]); 00390: else if(isset(self::$classMap[$className])) 00391: include(self::$classMap[$className]); 00392: else 00393: { 00394: if(strpos($className,'\\')===false) 00395: include($className.'.php'); 00396: else // class name with namespace in PHP 5.3

    Read the article

  • How to raise CComponent event in Yii

    - by srigi
    Let's assume I have Component (say Graph like Yahoo Finance) rendered on the page. Component view template contains bunch of a_hrefs which I wanto to switch period in graph. I created Event and Event handler in Component. I have two questions: How to raise event on Graph Component via those a_hrefs (should they be part of Graph?)? How to redraw Graph without loosing curent page context (section, filter - specified as $_GET values)? My Graph Component look like this: Yii::import('zii.widgets.CPortlet'); class Graph extends CPortlet { private $_period; /* ********************** * * COMPONENT PROPERTIES * * ********************** */ public function getPeriod() { return $this-_period; } public function setPeriod($period) { $this-_period = $period; } /* ********************** * * GENERIC * * ********************** */ public function init() { parent::init(); // assign event handlers $this-onPeriodChange = array($this, 'handlePeriodChange'); } protected function renderContent() { $this-render('graph'); } /* ********************** * * EVENTS * * ********************** */ public function onPeriodChange($event) { $this-raiseEvent('onPeriodChange', $event); } /* ********************** * * EVENT HANDLERS * * ********************** */ public function handlePeriodChange($event) { // CODE } }

    Read the article

  • How to add javascript to YII correctly?

    - by RD.
    I want to create several javascript function that will be needed on different pages. Most will be relevant only to one page, but some to several. I know if I add general conversion functions, it would be a good idea to just create a new javascript file and put all these generic functions into that one file. Bringing me to my first question: Where would you store the generic javascript file? In "protected"? Which subfolder? Then, I need to address the placement of other javascript code. If I have javascript that will only be used on one page, should I use this technique or should I stick to a similar approach as above? The emphasis is on doing it correctly. I want to fall exactly in line with the yii framework.

    Read the article

  • In yii how to access other tables fields

    - by user1636115
    I am creating project in yii framework. I am having table as- Qbquestion QbquestionOption -questionId -optionId -question -questionId -userId -option -isPublished -isAnswer In QbquestionOption controller i want to access Qbquestion tables fields. I had written quesry as- $Question=Qbquestion::model()->findAllByAttributes(array("questionId"=>$number)); where $number is some random number. When i am using its fields as= $Question-isPublished then its giving error as "trying to get access to property of non-object" Statement var_dump($Question) is showing all record and all values of Qbquestion table. So how can i access records? Please help me

    Read the article

  • Array structure returned by Yii's model

    - by user1104955
    I am a Yii beginner and am running into a bit of a wall and hope someone will be able to help me get back onto track. I think this might be a fairly straight forward question to the seasoned Yii user. So here goes... In the controller, let's say I run the following call to the model- $variable = Post::model()->findAll(); All works fine and I pass the variable into the view. Here's where I get pretty stuck. The array that is returned in the above query is far more complex than I anticipated and I'm struggling to make sense of it. Here's a sample- print_r($variable); gives- Array ( [0] => Post Object ( [_md:CActiveRecord:private] => CActiveRecordMetaData Object ( [tableSchema] => CMysqlTableSchema Object ( [schemaName] => [name] => tbl_post [rawName] => `tbl_post` [primaryKey] => id [sequenceName] => [foreignKeys] => Array ( ) [columns] => Array ( [id] => CMysqlColumnSchema Object ( [name] => id [rawName] => `id` [allowNull] => [dbType] => int(11) [type] => integer [defaultValue] => [size] => 11 [precision] => 11 [scale] => [isPrimaryKey] => 1 [isForeignKey] => [autoIncrement] => 1 [_e:CComponent:private] => [_m:CComponent:private] => ) [post] => CMysqlColumnSchema Object ( [name] => post [rawName] => `post` [allowNull] => [dbType] => text [type] => string [defaultValue] => [size] => [precision] => [scale] => [isPrimaryKey] => [isForeignKey] => [autoIncrement] => [_e:CComponent:private] => [_m:CComponent:private] => ) ) [_e:CComponent:private] => [_m:CComponent:private] => ) [columns] => Array ( [id] => CMysqlColumnSchema Object ( [name] => id [rawName] => `id` [allowNull] => [dbType] => int(11) [type] => integer [defaultValue] => [size] => 11 [precision] => 11 [scale] => [isPrimaryKey] => 1 [isForeignKey] => [autoIncrement] => 1 [_e:CComponent:private] => [_m:CComponent:private] => ) [post] => CMysqlColumnSchema Object ( [name] => post [rawName] => `post` [allowNull] => [dbType] => text [type] => string [defaultValue] => [size] => [precision] => [scale] => [isPrimaryKey] => [isForeignKey] => [autoIncrement] => [_e:CComponent:private] => [_m:CComponent:private] => ) ) [relations] => Array ( [responses] => CHasManyRelation Object ( [limit] => -1 [offset] => -1 [index] => [through] => [joinType] => LEFT OUTER JOIN [on] => [alias] => [with] => Array ( ) [together] => [scopes] => [name] => responses [className] => Response [foreignKey] => post_id [select] => * [condition] => [params] => Array ( ) [group] => [join] => [having] => [order] => [_e:CComponent:private] => [_m:CComponent:private] => ) ) [attributeDefaults] => Array ( ) [_model:CActiveRecordMetaData:private] => Post Object ( [_md:CActiveRecord:private] => CActiveRecordMetaData Object *RECURSION* [_new:CActiveRecord:private] => [_attributes:CActiveRecord:private] => Array ( ) [_related:CActiveRecord:private] => Array ( ) [_c:CActiveRecord:private] => [_pk:CActiveRecord:private] => [_alias:CActiveRecord:private] => t [_errors:CModel:private] => Array ( ) [_validators:CModel:private] => [_scenario:CModel:private] => [_e:CComponent:private] => [_m:CComponent:private] => ) ) [_new:CActiveRecord:private] => [_attributes:CActiveRecord:private] => Array ( [id] => 1 [post] => User Post ) [_related:CActiveRecord:private] => Array ( ) [_c:CActiveRecord:private] => [_pk:CActiveRecord:private] => 1 [_alias:CActiveRecord:private] => t [_errors:CModel:private] => Array ( ) [_validators:CModel:private] => [_scenario:CModel:private] => update [_e:CComponent:private] => [_m:CComponent:private] => ) ) [sorry if there's an easier way to show this array, I'm not aware of it] Can anyone explain to me why the model returns such a complex array? It doesn't seem to matter what tables or columns or relations are used in your application, they all seem to me to return this format. Also, can someone explain the structure to me so that I can isolate the variables that I want to recover? Many thanks in advance, Nick

    Read the article

  • "Admin module" taking over [Yii framework]

    - by Flavius
    Hi I have an "admin" module and I want it to serve "dynamic controllers", i.e. to provide a default behaviour for controllers which don't really exist ("virtual controllers"). I've invented a lightweight messaging mechanism for loose communication between modules. I'd like to use it such that when e.g. ?r=admin/users/index is requested, it will call the "virtual controller" "UserController" of AdminModule, which would, by default, use this messaging mechanism to notify the real module "UsersModule" it can answer to the request. I thought about simulating this behaviour in AdminModule::init(), but at that point I have no way of deciding whether the action can be processed by a real controller or not, or at least I don't know how to do it. This is because of the way Yii works: bottom-up, the controller is the one that renders the view AND the application layout (or the module's, if it exists), for example. I don't think the module even has a word to say about handling a given controller+action or not. To recap, I'm looking for a kind of CWebModule::missingController($controllerId,$actionId), just like CController::missingAction($actionId), or a workaround to simulate that. That would possibly be in CWebModule::init() or somewhere where I can find out whether the controller actually exists, in which case it's his job to handle it the $actionID and $controllerID whether the module $controllerID exists (I didn't type it wrong, in r=admin/users/index, "users" is the actual module, as specified in the application's config).

    Read the article

  • Facebook failing on XFBML call using Yii Framework

    - by Wenzi
    I have used this same call in other IFRAME Facebook apps, but it gives me nothing at all in terms of output. I am trying it on Yii and getting nothing. <script type="text/javascript"> window.onload = function() { FB_RequireFeatures(["XFBML"], function() { FB.init('xxxxxx', 'xd_receiver.htm'); FB.XFBML.Host.get_areElementsReady().waitUnitlReady(function() { document.getElementById("container").style.visibility = "visible"; }); }); }; </script> <script type="text/javascript"> function publish() { FB_RequireFeatures(["Connect"], function() { FB.init('xxxxxx', 'xd_receiver.htm'); FB.ensureInit(function() { FB.Connect.streamPublish(); }); }); } </script> <fb:serverFbml style="width: 755px;"> <script type="text/fbml"> <fb:fbml> <fb:request-form action="http://apps.facebook.com/ixxxx" method="POST" invite="true" type="rrrrr" content="rrrrr <?php echo htmlentities("<fb:req-choice url=\"http://apps.facebook.com/XXXX\" label=\"Authorize My Application\"") ?>" > <fb:multi-friend-selector showborder="false" actiontext="Invite your friends to use SuperThief."> </fb:request-form> </fb:fbml> </script> </fb:serverFbml>

    Read the article

  • Yii user rights extension

    - by jailed abroad
    i have installed the yii rights extension and here is my code after installation, database tables are created after installation. 'modules'=>array( // uncomment the following to enable the Gii tool 'rights'=>array( 'superuserName'=>'Admin', // Name of the role with super user privileges. 'authenticatedName'=>'Authenticated', //// Name of the authenticated user role. 'userIdColumn'=>'id',// Name of the user id column in the database. 'userNameColumn'=>'username', // Name of the user name column in the database. 'enableBizRule'=>true, // Whether to enable authorization item business rules. 'enableBizRuleData'=>false, //Whether to enable data for business rules. 'displayDescription'=>true, // Whether to use item description instead of name. ' // Key to use for setting success flash messages. 'flashErrorKey'=>'RightsError', / Key to use for setting error flash messages. // 'install'=>true, // Whether to install rights. 'baseUrl'=>'/rights', // Base URL for Rights. Change if module is nested. 'layout'=>'rights.views.layouts.main', // Layout to use for displaying Rights. 'appLayout'=>'application.views.layouts.main', //Application layout. 'cssFile'=>'rights.css', // Style sheet file to use for Rights. ' 'install'=>false, // Whether to enable installer. 'debug'=>false, ), 'gii'=>array( 'class'=>'system.gii.GiiModule', 'password'=>'1234', // If removed, Gii defaults to localhost only. Edit carefully to taste. 'ipFilters'=>array('127.0.0.1','::1'), ), ), But when i type url http://localhost/rightsTest/index.php/rights then it says There must be at least one superuser! I have tried many things but unable to find answer. Thanks for your help.

    Read the article

  • Why does deploying a .NET Compact Framework assembly cause .NET Desktop Framework assemblies to be d

    - by Matthew Belk
    I am trying to get one of my developers set up to work on a fairly large .NETCF project. When we try to simply deploy the solution and all of its projects to a target device, deploying one of the projects triggers several assemblies from the desktop framework to be copied from the GAC to the device. What on earth could cause this? The assemblies from the "big" framework are ones like System.DirectoryServices, System.Design, and a bunch of others.

    Read the article

  • Controller instantiation in Yii framework by directory and namespace

    - by Einoras Bružas
    Yii framework supports modules and also subdirectories in controllers directory, so path to some specific action could be /index.php?r=module/controller/action or /index.php?r=subdirectoryInControllerDir/controller/action. My goal here is to have multiple subdirectories in controllers dir. Inside these folders I would create Controllers with the same names as parent ones using namespaces. However if I wrote namespace mynamespace; class MyController extends \MyController { } Yii would load MyController instead of mynamespace\MyController; Any suggestions here?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >