PHP development framework YiiFramework tutorial (21) UI component custom Captcha example
The Yii built-in Captcha can basically meet most of the requirements. if you have special requirements on the verification code, you can customize Captcha.
It is implemented by extending CCaptchaAction. In this example, a verification code function is defined to randomly generate addition and subtraction less than 10.
T
To the users of Photoshop software to explain the detailed analysis of the design of TV theme UI icon production tutorial.
Tutorial Sharing:
First, let's look at the original image, a small 400*300.
Create a new 1000*800 document, add a gradient adjustment layer, make a #b4b097 to #4e473a 90-degree radial gradient, set the zoom
that is displayed when a file appears twice'htmlOptions'=>array('size'=>25),)); ?>endWidget(); ?>findFiles() as $filename): ?>Yii::app()->baseUrl.'/'.Yii::app()->params['uploadDir'].$filename,array('rel'=>'external'));?>
Use CMultiFileUpload to upload files with the extension jpg | png. you can define some options by configuring CMultiFileUpload. for details, see
Modify the corresponding Controller/Action.
class SiteController extends CController{/*** Index action is the default action in a con
:(master) ? >node index.js
Open Browser, enter http://localhost:3000/static/index.html
So far, you've already configured the official demo locally. Of course, you can do it. This is built on the server.
Writing Documents and publishing
Writing API documentation using Swagger Editor
Swagger Editor is a YAML-based syntax, but don't be afraid to watch the official demo for 10 minutes.
Exporting Test.json DocumentsHow to Export
Put the Test.j
For the users of Photoshop software to share the concise map theme of the creation of the UI icon tutorial.
Tutorial Sharing:
New document, here I use 800*600 pixel, draw a rounded rectangle, color #e8e8e8.
Adds a layer style to this rounded rectangle.
Copies a rounded rectangle, changes the layer'
To give you illustrator software users to detailed analysis of the design of the UI to share the production tutorial.
Tutorial Sharing:
The first approach is similar to PS, press Cmd+r, display the ruler, and then click the ruler, drag the guide from the ruler, and align it to the object you want to align to, as shown in the figure:
To the users of Photoshop software for detailed analysis to share the production of a realistic Calendar UI icon tutorial.
Tutorial Sharing:
All right, the above information is the entire content of the detailed tutorial on creating a realistic c
Give your Photoshop software users a detailed explanation to share a tutorial on the design of a propeller fan theme UI icon.
Tutorial Sharing:
First, let's build a 1667*1250,300dpi canvas. The entire tutorial is divided into five sections on the right, each part is grouped after completion,
To the users of Photoshop software for detailed analysis to share the production of a realistic Calendar UI icon tutorial.
Tutorial Sharing:
All right, the above information is the entire content of the detailed tutorial on creating a realistic c
ButtonInteractable: To avoid interacting with the button, you can set it to falseTransition: admin button in normal condition, press, go through when the display stateThe None button works correctly but does not show up under the circumstancesColortint color Multiplier Color multiplier for each button's hueFade Duration fade-out time (seconds) transitions between required statesSpriteswap for picturesAnimation animation can be clicked Auto Generate Animation automatically generate an animation a
the small object property. As shown in the following:
To inherit CWidget and overwrite its init () and run () methods, you can define a new small object:
Class Mywidget extends
cwidget
{public
function init ()
{
//This method will be called by Ccontroller::beginwidget ()
}
Public function run ()
{
//This method will be called by Ccontroller::endwidget ()
}
A widget can have its own view
Download Custom Post Type ui>>To add a custom post type UI to a new style the simplest thing for a novice is to start adding an article type after downloading the installation and enabling it in the plugin bar.Add, you can see the left column more "product":You can also create the type after which the Import/export->get code snippet under the CPT UI menu is paste
To give you Photoshop software users to elaborate on the design of a QQ theme UI icon production tutorial.
Tutorial Sharing:
New document, I use the size of 800*600 pixels, please feel free to do a gradient background, with rounded rectangle tool to draw a rounded rectangle, I use the color is #1a181a!
Subtract with two ellipse
Php Chinese network (www.php.cn) provides the most comprehensive basic tutorial on programming technology, introducing HTML, CSS, Javascript, Python, Java, Ruby, C, PHP, basic knowledge of MySQL and other programming languages. At the same time, this site also provides a large number of online instances, through which you can better learn programming... CMaskedTextField is a format input box. you can specify a Mask to restrict the text formats that us
writing Dailog.
HTML code
JS Code
The Jquery-ui dialog box
is set $ ("#dialog-message"). Dialog ({
autoopen:false,
width:400,
resizable:false,
And then how is the pass parameter into the dialog box
First, define the Click event Pop-up dialog box
/**
* Pop-up dialog box and pass the parameter * *
(' #table tbody '). On (' Click ', ' #dialog_link ', function () {
var table = $ (' #table ') . DataTable ();
var data =
Development Tutorial (starrating) UI component by modifying it, and the user score is valid only if the verification code entered is correct, avoiding automatic scoring by the machine.
The first is to modify the Datamodel, add a property verifycode to hold the user input verification code, and add Ccaptchavalidator validation.
Classdatamodel extends Cformmodel{public $rating;p ublic $verifyCode;p ublic fun
PHP development framework YiiFramework tutorial (17) UI component TabView example
CTabView is used to display Tab pages. The basic way to use TabView is to configure the tabs attribute. the following attributes can be configured for each Tab.
Title: tag question.
Content: the content displayed by the tag.
View: The label displays the View Name. if both the Content is specified, the Content is displayed.
Url
PHP development framework YiiFramework tutorial (13) UI component ContentDecorator example
Similar to Layout in Yii Framework in Java Swing, nesting is also allowed, which is implemented through CContentDecorator. However, you do not need to directly use CContentDecorator in the code, but use it in the definition of layout.
$ This-> beginContent ('path/to/view ');//... Content to be decorated$ This-> endCon
, ') '), Array (' text ' = = ') ID ' = ' 8 ', ' haschildren ' = ' = ', ' Children ' =>array (Array (' text ' = ' + ' id ' = ' + ') ', ' haschildren ' = FA LSE,), array (' text ' = ' + ' id ' = ' + ', ' HasChildren ' + false)))));
This adds a link to the text for each node, and also shows the click events using the jquery response node, which is done through the client javascripts.
Modify the View definition
$cs =yii::app ()->clientscript; $cs->registerscript (' Menutreeclick ', "jQuery (' #menu-
Cclipwidget provides the ability to record "macros", and the content defined between Init and run of Cclipwidget can be stored in the controller's clip variable and replayed back to any other location.
Cclipwidget encapsulates the basic usage of beginclip and endclip for Cbasecontroller Beginclip and Endclip,cbasecontroller as follows:
First define Clip
$this->beginclip (' clipid ');//... display the clip contents$this->endclip ();
And then we need to use this clip.
echo $this->clips[' clipid '
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.