2 answers
0 votes
Cake equivalent to Joomla's enqueueMessage()
Howdy all, totally new to Cake, was wondering if Cake has an equivalent to Joomla's
JFactory::getApplication()->enqueueMessage( 'Error Message' , 'error' );
Or substitute with notice / info.
1 answer
0 votes
Flash message upon login
I'm using the Auth component for login, so my login action looks like
function login() {
if ($this->Session->read('Auth.User')) {
if ($this->data) {
$name = $this->Auth->user('username');
... 1 answer
0 votes
Translation with setFlash, how to?
Halo, i would like use translations for flash messages, like with form:
('label' => __('company_name', true))
Is it posiible with flash messages?
$this->Session->setFlash( __('company_name', true));
Thanks for any reply
4 answers
1 vote
setFlash not working
Hi, I'm having a problem with the setFlash. I have this piece of code included in my layout...
<?php
if ($session->check('Message.flash')) {
$session->flash();
}
?>
However none of my messages are showing up, any ideas?
1 answer
0 votes
How to overcome Uninitialized string offset error message
Hi there Im getting the following error when I try to do multiple saves and just change one if multiple checkboxes have been selected. The error message is this:
Notice (8): Uninitialized string offset: 1...
2 answers
0 votes
Database design for private messages
Which will be the optimal design for the private messaging system like in facebook, that you will see messages like in forum. I was thinking of two tables:
First table
messages
----------
id
subject
Second...
1 answer
0 votes
Facebook style message schema/relationships
I'm trying to decide the best way to approach a facebook style message system.
Would the best way to approach it to be a Message belongsTo User (for the sender), User HABTM Message (for the recipient)
Or would it be better to have a User HABTM...
2 answers
0 votes
Error message: "not a valid Mysql-link resource"
Hello everyone! I am new to CakePHP and am enjoying learning about its features. I am trying to run the Blog example but am getting the above error. Here are the details:
1. I downloaded CakePHP 1.3.0 and extracted it to a subdirectory inside...
1 answer
0 votes
Flash message from view?
Hello I would like to ask, is possible call flash message from view?
For example, if variable sended to view is empty, call flash message function like_:
$this->Session->setFlash(__('Message', true));
Thanks for any advice..
2 answers
0 votes
session helper doesn't work
Hello,
I have a problem with $session helper, I don't see any flash message in views, neither login fail message, nothing, even if i put $session-flash(). I tried debug($session-read('Auth'); and the result is empty, but debug($_SESSION['Auth']')...
1 answer
0 votes
__('Translation for validation messages') ?
How can I use translations for validation error messages?
Thank you!
2 answers
0 votes
How to modify default validation error messages
Does anyone know how to change the default error messages that appear after form validation. For example, I get "This field cannot be left blank", but I would prefer "This field is required". I know I can customise the error message for each...
1 answer
0 votes
custom cakephp error messages not showing
I have created a custom page for error messages in my web application.
I have created these two files in the views/errors/ directory named 'missing_action.ctp' and 'missing_controller.ctp'.
On server the error message is shown as follows:
2 answers
1 vote
Validation messages at the top of the input field, not at the bottom
Hi,
Is there a way to display validation error mesages ABOVE the input field, bot below?
Thanks,
Dan
0 answers
0 votes
I have no form error messages
Hello,
Here's my problem. I've been searching for more than a day a solution to this issue, with no success.
I can't get my form error messages to appear in the view. I use the __('text', true) function to display my error messages in the form view...
0 answers
0 votes
Javascript to display setFlash message
Instead of showing the message $this->Session->setFlash(__('Data has been saved', true)); in my controller how can I make a javascript to do that?
<script>
alert('Message');
</script>
0 answers
0 votes
Getting messages from validation
I have a model (Newsletter):
class Newsletter extends AppModel {
var $name = 'Newsletter';
var $useTable = 'newsletter';
var $primaryKey = 'id_news';
var $validate = array(
'name' => array(
'rule' => 'notEmpty',
'on' =>... 0 answers
0 votes
Error Messages from another controller
In my application, Project hasMany Uploads.
When you view a project (projects/view/10), you are capable of uploading a file.
The approach I'm using is: file upload form goes to uploads/add, then uploads/add save (or don't, if not valid) and...
1 answer
0 votes
helpers form create inputDefaults how to style error messages?
Hi,
there is way to style defaults for input fields according to: http://book.cakephp.org/view/1639/options-inputDefaults
echo $this->Form->create('User', array(
'inputDefaults' => array(
'label' => false,
'div' => false,
#... 1 answer
0 votes
How to use schema data in the validation
Hi,
I am going to write some code with cake 1.3.x and MySQL 5 which validates an input data from form with field length of the table field in the database.
I have found that the schema can be retrieved using $Model-schema(), but still I have no...






