Hi we have some queries regarding localization/.po files
1> We want to detect the missing strings or strings which are not being captured for L10N. how we can detect that? is that any method or command to update the strings
2> Locale files (.po) for "cn-zh" or another Locale are not complete (missing strings)
3> String has been captur...
I have these lines in my view file
////////////////////////////
$a = 5;
showme()
showme()
{
global $a;
echo $a;
}
////////////////////////////////
Problem: $a is not accessible in showme() function.
I have no choice to pass $a as argument and
no choice to move function from view.
and it should be accessible in function through ...
Hi,
I have a table structure like this
admins table habtm rights table belongs to rights_groups
In view I need to print like this as checkbox
Rights_group Name1
Rights1
Rights2
Rights_group Name2
Rights3
Rights4
View code (Since I have to give the group name, I need to loop through
the records)
$checked =...
Hi,
Here's an example...
I'm using a table to manage all of my Statuses with the tree behavior. I have a Book model which has a status for it's condition and one for it's availability. So the Book model HABTM Statuses even thought it can only have one condition and one availability.
Is there a way to use the $paginator->sort('Conditio...
I am configuring/creating a new web server and have run into an issue that I cannot seem to resolve.
I am using Cakephp with Apache2 unfortunately on a Windows environment.
When I enable the mod-expires module on our apache instance it causes a delay in the presentation of the new record that was saved before the redirect. It's acting ...
I have been looking at the cookbook - 7.3.3 Automagic Form Elements trying to find a way for radio buttons to line up horizontally rather than vertical. I have been looking at the 'div' => 'class_name' $options also the "$options[‘between’], $options[‘separator’] and $options[‘after’]" but have been unsuccessful. Is there a "cake" way ...
I managed to get this to work a while back, but on returning to the cakephp project I had started it seems that whatever changes I've made to nginx recently (or perhaps a recent update) have broken my rewrite rules.
Currently I have:
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
...
I am just learning CakePHP, so excuse me
I am using CakePHP 1.2.5 Auth component with UsersController. User model contains two tables:
class User extends AppModel {
var $name = 'User';
var $belongsTo = 'Company';
}
When login() is called, I see the data being retrieved in the SQL log (LEFT JOIN is being executed), so the mod...
hi,
i need to write function that searches & replaces key in multi-dimensional array in following manner:
input array:
[0] => Array
(
[Foo] => sometext
[Foo2] => Array
(
[lorem] => 1
[Avatar2] => Array
(
[meta_key] => avatar2
[...
I could've sworn I've done the tutorial correctly, but I am getting an error message and my aros_acos table is empty.
What I've already done:
On this page: http://book.cakephp.org/view/646/Creating-ACOs
I've run "cake acl create aco root controllers" and it returned "New Aco 'controllers' created.". I've also added "$this->Auth->actio...
I'm getting funny behavior with CakePHP in my register new user form. It's a pretty basic username, email and password form.
When the user types out and incomplete form it looks like this:
http://imgur.com/fcpS5.png
Of course creation of the new user fails because the password and email fields are empty. When the form errors are show...
I have an array that looks like:
Array (
[63] => 0
[64] => 1
[65] => 1
[66] => 0 )
Is there a way to extract the keys for all the values that are equal to 1 (in this case I just want 64 and 65) using Set::extract or Set::remove or some other method?
...
Hi Guys,
I am trying to get some data to display from an Array in Cakephp, the Array has all the data from a find() output and other parts of the data output fine.
The data i am trying to access is the name field inside company , the code i am using is echo $quote['Company']['name'] but it returns and error saying that the index is un...
I just implemented Adam Shaw's popular calendar called 'fullcalendar' (http://arshaw.com/fullcalendar/) using CodeIgniter. But I require addition and other operations on events from my database. I was able to find one CakePHP plugin with the same purpose from here, http://bakery.cakephp.org/articles/view/events-plugin.
Since I'm not in...
Did anybody successfully integrate xajax with CakePHP? I've found 'Cakex plugin', but I'd like to hear some options.
...
When I call mysql_fetch_row() or mysql_fetch_array(), any column that is NULL is not in the returned array.
Is this a feature?
Context:
I am using CakePHP to get data using Model::find().
EDIT
The issue is that when I use the SQL statement:
SELECT col_1, col_2 FROM table where col_1 is defined as VARCHAR NOT NULL and col_2 as VARC...
I'm trying to group by date of birth and count based on the results, using CakePHP. Here's my query.
$data = $this->User->find('all', array(
'fields' => array(
"DATE_FORMAT(NOW(), '%Y') - DATE_FORMAT(User.dob, '%Y') - (DATE_FORMAT(NOW(), '00-%m-%d') < DATE_FORMAT(User.dob, '00-%m-%d')) AS age",
'COUNT(id)'
),
...
In Rails and CakePHP1.2, forms tend to include input elements with names like the following:
<input name="comment[author]" />
Is there a formal name for the notation used in the "name" attribute?
Likewise, in CakePHP1.1 I do believe that the same would have looked like this:
<input name="comment/author" />
Again, is there a formal...
In my application, I have a number of controllers with the same prefix. For the sake of example, let's say they are:
my_posts
my_users
my_letters
The URLs generated for these are obviously:
/my_posts/view/1
/my_users/add
/my_letters/whatever
I'd like to set up some custom routing so that I can use the URLs like this:
/my/posts/vie...
I have a method in my users controller similar to:
function members($type = null, $category = null) { ... }
Both params are optional and can be used together or on their own.
So with the following route.
Router::connect('/members/*', array('controller' => 'users', 'action' => 'members'));
http://example.com/users/members successfu...