Wiki

Sorted by viewsX
Displaying 531-540 of 696 result(s).

Instanciar clase hija basada en campo de modelo padre (CActiveRecord)

Created about a year ago by robregonmHow-tos0 comments – viewed 5,147 times – ( +2 ) – version 1.1
[EN] [ES]

How to display Dependent drop-down value using ajax call with dynamically

Created 2 months ago by Ankit ModiTutorials2 comments – viewed 5,127 times – ( +1 / -2 ) – version all
Hi Friends, In this tutorial I write a code display dependent drop-down value using ajax call.

Alternative wildcard characters CDbCriteria

Created 2 years ago by maigretHow-tos0 comments – viewed 5,118 times – ( +3 ) – version 1.1
In SQL, wildcard characters can be used in "LIKE" expressions; the percent sign (%) matches zero or more characters, and underscore (_) a single character. Sometimes users are not familiar with these or they are using different ones like (*) and (+) similar to regular expressions. My colleages do so and then i decided to add this feature by extending CbCriteria. Especially adding a new parameter $wildcard_chars to the method addSearchCondition to replace them if needed with standard SQL characters:

Tarpit for bad bots

Created 2 years ago by mitherealHow-tos4 comments – viewed 5,114 times – ( +1 ) – version 1.1
I recently built a tarpit for bad bots.
tags: tarpit, bots

Syncing sessions between Yii and KCFinder

Created about a year ago by Thanasis FotisHow-tos7 comments – viewed 5,068 times – ( +1 ) – version 1.1
Info: As KCFinder's documentation mentions, if your application (Yii in our case) session handling is using the PHP environment configuration - meaning no change in session handling at all, then no change is needed also on KCFinder side to be able to use this session and thus have this simple interface between your Yii webapp and KCFinder. If that's your case then you probably need not read the rest of this article but rather just make sure that before a user attempts to upload or browse your server a session variable is already set for him (or her) with his specific configuration already waiting for KCFinder there. What can this session interface be useful for? For example, for having per-user upload directory. You could have uploadURL variable established in the session variable to contain the user's id. When an upload or browse use case will occur, the client side will trigger the KCFinder completely decoupled from the Yii application. Yet, since you've already synced your user-specific-configuration with KCFinder via the session, KCFinder will pick it up and use it.
tags: File upload

How to use GridView with AJAX

Created 5 months ago by Antonio RamirezHow-tos0 comments – viewed 5,027 times – ( +4 ) – version 2.0
With the adoption of PJax on Yii2 things  have change quite a bit with GridView when it comes to work with them in AJAX mode. It will probably be confusing at the beginning, but then you will soon realize how powerful the new approach is.
tags: yii2, pjax, widget

New Relic Error Alert with Yii

Created about a year ago by simon604Tips2 comments – viewed 4,999 times – ( +5 )
Introduction

How to Display tooltp(qtip) on CGridview dynamic

Created about a year ago by Ankit ModiTips1 comment – viewed 4,982 times – ( -1 )
Hi Friends,

Making friends' configs, DB credentials and paths with version control

Created about a year ago by Alexander PalamarchukTips1 comment – viewed 4,964 times – ( +2 / -1 ) – version 1.1
In many cases developers of one project use their own local environments for coding. There may be a common test platform and, of course, production. All these environments usually have different DB credentials and directory structures (first of all, path to YII framework directory). Another feature is debugging. It's convenient to turn it on for local environments, eventually - on the test server and never (generally speaking) - on the production.
tags: config

Named scope - Get orphan AR without losing primary key

Created 4 years ago by cmaTutorials0 comments – viewed 4,946 times – version 1.1
Sometime, in a many-to-many relation, you need to retrieve AR that aren't linked. In practice, AR with null value in the join table. So you implements a criteria like this :