I wrote about this on my blog, but wanted to post it here too.
I wrote about this on my blog, but wanted to post it here too.
In this post I am going to describe a solution to make your yii-based web application safe from illegal content injections.
In this tutorial we will be setting up a content type to be ordered by weight using the JUI Sortable plugin.
Hello,
If you want to give extra attention for some specific delete actions and you don't want to override whole yii.confirm JS method here is what you can do:
(I've only put the ActionColumn part of the GridView here to just give you the idea)
From: http://lacot.org/ and me.
Assume that you have teachers and students model.
Add these lines in /config/main.php
'components'=>array(
.........
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=database1',
'emulatePrepare' => true,
'username' => 'root',
'password' => 'itsasecret',
'charset' => 'utf8',
),
'db2'=>array(
'class' => 'CDbConnection',
'connectionString' => 'mysql:host=localhost;dbname=databa...
I have a table (account) which contains "General Ledger" accounts. Each account has its own account_description - such as 'inventory', 'sales', etc.
In order to nicely display flash Messages, create view like this called views/site/dialog.php :
It is convenient to use the same identification attribute, say info
, in all of the active records of your application. It should be a virtual read-only attribute defined by a getter method, its label being the model name.
Say, you want to write a test for a component which provides a caching feature. How would you know, that some method of your component returns a cached result? With the solution described here you can inspect all log outputs. So you could search the logs for accesses to the DB to really make sure, that the result was served from cache.
Today i want to share with you is "How can we write HTML Code in view files? I am writing this article because many times we can not use CActiveForm to design our form...
Suppose you want to refresh a form or any content when a single row of CGridView is selected
Here is my experiment inspired by my own question and others from the forum.
Often happens to have the need of change a part of the page with ajax.
Apostle provides a nifty facility for sending app-generated, transactional emails from your application including Wordpress-like mail formatting and full tracking (delivery, opening, clicking etc.) of all emails sent. No need to set up email facilities on your app server!
This tutorial shows you how to safely remove records between relationships.
Here's a quick tip to dump the SQL for query.
Upon creating my Yii2 Members System, I have ran into a few snags along the way that forced me to extend and bend Yii2 to my will.