Quantcast
Channel: Yii Framework Forum
Browsing all 18717 articles
Browse latest View live

Model Scopes And Rbac

Hi everyone Is there a way to combine scope and RBAC ? I want to make a dynamic scope to returns Model records according to permissions of current user for example public function scopes() { return...

View Article


Restingir Dados De Search Com Criteria

CREATE TABLE `tb_grupo` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nome` varchar(80) DEFAULT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `ativo` int(11) NOT NULL DEFAULT '0',...

View Article


Image may be NSFW.
Clik here to view.

Url管理组件

url管理组件主要提供2个功能: 1、根据用户输入的url,解析出处理这个请求的路由——由哪个Controller的哪个Action来处理,同时将url中的部分参数添加到$_GET参数中。在每个web框架中都需要一个这样的组件来进行路由分发的工作。 2、根据路由和参数数组创建出url。在视图层可以对url进行硬编码,即直接写死url地址,但是这往往缺乏灵活性,为后期的维护带来成本。 array(...

View Article

Image may be NSFW.
Clik here to view.

Authenticate With (Usergroups Module)

Hi everyone! I want to use a full scale user management system, so I choose the UserGroups module to do so. Now everything is working fine. I can login like usual, but when I'm logged in, I want in...

View Article

关于Model中的Rules验证

嗯,我有 一个问题,比如用她的模型rules验证的时候,会返回具体的错误信息,那么成功的时候就没有任何信息,但前台也需要一个验证成功后的反馈,具体的是错误用红色的样式显示,成功用绿色的样式显示,我就没有想到什么方法可以显示成功的样式

View Article


DB Read-Write-Splitting

/** * 实现数据库的主从分离,该类会维护多个数据库的配置:一个主数据库配置,多个从数据库的配置。 * 具体使用主数据库还是从数据库,使用如下规则: * 1、CDbCommandExt的prepare方法会根据sql语句是读还是写,来调用CDbConnectionExt的getPdoInstance方法,来获取主数据库或者从数据库链接,默认使用主数据库 *...

View Article

Can't Connect The External Library Into Yii.

Hi to all! So, here is what is my problem: I need to properly connect PHPRtfLite (Lib is here...) with Yii Framework. PHPRtfLite is a library, which can generate .rtf documents. I need it, because the...

View Article

Image may be NSFW.
Clik here to view.

Formatting Clistview Correctly

Hi I am working on a CListView that has me stumped. I am trying to format a single CListView into 3 columns, Below I've attached a picture of my list of States I've grabbed from my Database Table, I am...

View Article


Cjuitabs Showing Multiple Tabs In Content

Hi Everyone, i noticed when adding "id" to CJuiTabs using the following format, some tabs render multiple tabs in the content rather than just the active one. Here is the code:...

View Article


How To Save Tabular Input To Db?

Hi, I've been working through the tutorial on updating tabular input (http://www.yiiframew...1/en/form.table) and I've got the front end part working. I don't know how to write the controller though so...

View Article

Cdbcriteria Compare With Value Of 0.

Hello, I am trying to use CDbCriteria()->compare attribute to filter out data. Here is an example of a dropdown, one of my filters use with the name 'numbers'. 0 => "Zero", 1 => "One", 2 =>...

View Article

Internationalisierung Und Cookies Nach Login

Hi, meine Webseite ist auf drei Sprachen verfügbar und diese werden über 3 TLDs ausgeliefert. Nun meldet sich der Benutzer auf example.DE and wechselt auf example.COM Wie kann ich nun das Cookie auf...

View Article

How To Translate Cmenu Items

Hi everyone, After a few months of trying yii im finally getting confortable with it, but im having a very basic problem, or at least I think so.. I know i can use the Yii::t function through my...

View Article


Formatar A Url

Olá pessoal. Estou com dúvidas para formatar minha url, para deixa-la amigável. Na minha tabela eu tenho um campo slug, que é unique (não podendo se repetir valor), fiz a chamada pelo controller, só...

View Article

Gii Wildcard

Gii doesnt accept wilcards like '*' on crud generator? i have around 30 models that were generated with the * wildcard. But can't generate crud the same way?

View Article


[EXTENSION] multimodelform/jqrelcopy

I start a topic here, better than to discuss all the stuff about cloning fields at the extension pages.

View Article

Extensão Busca Endereço Por Cep

Olá pessoal, Postei uma extensão para buscar endereço por CEP: http://www.yiiframew...n/yii-correios/ O principal diferença desta extensão quanto a outras soluções disponíveis por ai, é que ela não usa...

View Article


Image may be NSFW.
Clik here to view.

How To Create/save More Model Inputs ?

Hi all, I'm trying this document. http://www.yiiframework.com/wiki/29/ My database is My problem is $model->attributes=$_POST['Resimler'] array is always EMPTY! How can inputs values...

View Article

Set hostInfo and baseUrl

Hi, I'm trying to generate absolute urls in a console application. Qiang said I need to set the request->hostInfo and request->baseUrl properties. This is what my console config looks like...

View Article

Namespaces in Yii 2.0?

will Yii 2.0 use Namespaces? http://www.php.net/manual/en/language.namespaces.rationale.php

View Article
Browsing all 18717 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>