Hi There,
Does anyone know how to read stdin using a custom Command in the Yii framework?
I am busy writing a script to process incoming mails through a php script but need functionality from within the Yii framework as well. By default Yii passes the command line arguments in a variable to your run() method when you extend the CCon...
How to include Javascript or CSS file in Yii Framework.
I want to create a page on my site that has a little javascript application running,so i want to include .js and css files in a specific view..
...
I just started learning AJAX and Yiiframework. What are the steps to create AJAX login form in Yii?
Thank you.
...
i wonder why the creator of prado created a new framework called yii.
wasnt prado the right way to go? does this mean that i shouldnt even consider prado over yii?
is yii also component based?
...
I build a website application using Yii Framework.
I want to use model with query like this:
SELECT u.id, u.username, u.score, (SELECT COUNT(ownerId) FROM post p WHERE p.ownerId = u.id) AS totalPost
FROM users u
ORDER BY u.score DESC, totalPost DESC LIMIT 10
Please help me to convert the query into models in Yii Framework ...
...
i'm currently learning the yii framework and have read their documentation.
but i still don't understand the components. what are these. they talk about component events and behaviors.
could someone explain these terms for me and give me real app examples of what a component, its events and behaviors could be?
would be helpful!
...
in the yii documentation it says:
foreach($_POST['LoginForm'] as $name=>$value)
{
if($name is a safe attribute)
$model->$name=$value;
}
what does the array LoginForm come from? which attribute is it coupled to?
...
Hi.
I'm writing an "Account" module which should take care of everything about accounts: registration, login/logout, user administration, password recovery, account activation, etc.
So I thought it would be best to reuse whatever the module's DefaultController::actionRegister() generates to show on the main page.
So my question is: ho...
Yii does not provide a translation message file for the en_us language. Instead, we are expected to rely on the core messages to be correct.
If I was successful in finding where the core messages are held, I still wouldn't want to mess with the core file because, A. it is ill-advised and B. future version revisions would overwrite my c...
hello,
I have a CActiveRecord model, and I need to change safe attributes list in that model.
I have defined the safeAttributes method inside my model, like the following :
public function safeAttributes()
{
return array(
'name, bio',
);
}
the problem is 'bio' is not being considered in my safe attribute assign. I tried t...
Hi There,
Is there anyone here who might be familiar with web services in the yii framework?
I declared the following test method:
/**
* Send a single SMS message
*
* @param string $username Username
* @param string $password Password
* @param string $identifier Valid Identifier to use
* @param string $mobileNumber Mob...
I'm trying to insert some data into a table using the Yii Framework together with the PDO object and get the following error
I'm building the query using this code
$connection = CActiveRecord::getDbConnection();
$sql="INSERT INTO sms_logs (to, from, message,error_code,date_send) VALUES (:to,:from,:message,:error_code,:date_sen...
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 reques...
Say I have this line of code in the view.
<?php echo CHtml::activeTextField($model,'start_time'); ?>
start_time is a UNIX timestamp. When just displaying it in a view I can apply functions like date() on it. Where should I apply the formatting when I'm displaying it in a form, by using the above line of code? (This case of timestamps/...
I recently started to build a custom keyword search using Yii 1.1.x
The search works 100%. But as soon as I sort the columns and use pagination in the admin view the search gets lost and all results are shown. So with otherwords it's not filtering so that only the search results show. Somehow it resets it.
In my controller my code look...
Hi,
I find Yii great framework, and the example website created with yiic shell is a good point to start... however it doesn't cover the topic of multi-language websites, unfortunately. The docs covers the topic of translating short messages, but not keeping the multi-lingual content ...
I'm about to start working on a website which nee...
I am trying to follow loosely I might add the blog tutorial
It is probably because I am working of the svn trunk.
I call the sql tables tbl_user tbl_role etc as described in the tutorial but the controller ends up to be TblUserController and the view folder is called tblUser tblRole.
In the tutorial only the models take the table prefix...
I am trying to add a language to the url with following syntax:
http://www.example.com/en/site/page/view/about
What I have so far works with short urls like:
http://www.example.com/en/site/contact
but not with long once as in my first example
Here is what I have so far:
/config/main.php
'urlManager'=>array(
'class'=>'appl...
I have to develop a site which has to accomodate around 2000 users a day and speed is a criterion for it. Moreover, the site is a user oriented one where the user will be able to log in and check his profile, register for specific events he/she wants to participate in. The site is to be hosted on a VPS server.Although I have pretty good ...
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...