Fixed with this, but my god it's ugly.
?php
class Employee extends AppModel {
var $name = 'Employee';
function afterFind($results)
{
foreach ($results as $key = $val)
{
if($_SERVER['REQUEST_URI'] == '/employees/') {
} else {
$results[$key]['Employee']['name_ext'] =
$val['Employee']['name'] . ',
And it just keeps getting worse... help please.
?php
class Employee extends AppModel {
var $name = 'Employee';
function afterFind($results)
{
foreach ($results as $key = $val)
{
if($_SERVER['REQUEST_URI'] == '/employees/'|$_SERVER['REQUEST_URI'] ==
'/employees/index') {
} else {
you are trying to access the file directly.
You url should be something like http://localhost/cake/hello
This assumes that you have mod_rewrite working.
Otherwise you can uncomment BASE_URL around line 40 in /app/config/
core.php
then access like http://localhost/cake/index.php/hello
It's been said before, but not nearly
enough: Thanks to all the developers of CakePHP, I greatly appreciate
your efforts, and will wait patiently new things to come out. Until
then, I will live inhttp://api.cakephp.org/and learn as much as I
can, and contribute where I can. I hope the
I agree with all. Cake is awesome and I love it. I have already donate
for Cake and I will also do this every month. It's great! Thanks to
all developers and to all that are in this community.
Keep up a good work!
Cheers!
--~--~-~--~~~---~--~~
You received this
Hi Bakers,
i am making my first steps in the exciting cake world and i am facing
now a bit trickier problem. I suggest that the problem is not
that tricky if you are more experienced than i, so i think you could
maybe have some good hints for me.
The problem is the following:
I am creating a
Hi korcs
I think that the answer to your problem probably lies with using hasMany
and belongsTo associations, and models for each of your article tables,
and a model for each of the junction tables. This is the standard
approach in Cake for allowing extra fields in join tables. If the
Hi Joshua,
I'm new to cake so I may not be 100% right, but why not you create a
beforeDelete() method in your Photo model? Use this delete the
associated image file.
Steven
On Mar 17, 4:06 am, Joshua McFarren [EMAIL PROTECTED] wrote:
Let me preface this by saying that I'm pretty new to
It can be done without $ajax-observeField, and it's better because IE
doesn't know the ID of a SELECT (or maybe I'm not capable of doing it
right):
?php e($javascript-codeBlock(function fnSearch(el) { new
Ajax.Updater('content', '.$html-url(/services/index).',
{asinchronous:true,
I'm not very sure of what the cause of your problem might be, so I'm
just gonna suggest some things you can check.
- Is .htaccess in the folder of your cake directory in your server
root?
- Have you made sure the .htaccess files are in the app and webroot
directories?
In any case I don't think
Isn't it a small world
This is from something I did, No change in the controller but I've
modified the below views, the key is to set the user id as the id of the
li tag in autocomplet, and then have
a 'user_id' input and a touch of javascritpt in the send view to update
the id field,
Hi,
I am looking for the best way to format an ID field every time it
appears, without having to specifcally tell it to. Let me explain a
bit further:
I have a table called Projects, each project has an ID (numeric auto
increment) so a typical output from a db call would be:
ID, Project Name,
Hi all,
I have this problem I have no idea how to solve, or if it is even
solvable. Anyways I have a following directory structure:
/dir/cake - cake lib dir
/dir/app1 - app1 dir
/dir/app2 - app2 dir
/dir/app1webroot - webroot for app1
/dir/app1webroot/app2webroot - webroot for app2
I can't
Hi there
trying to download
http://cakeforge.org/frs/?group_id=23release_id=179
but cakeforge.org does not seem to be responding to me.
Are there any mirrors by chance?
Thx,
Martin
--~--~-~--~~~---~--~~
You received this message because you are subscribed
my app in www.example.com/cake/app
On Mar 16, 4:18 pm, Ámon Tamás [EMAIL PROTECTED] wrote:
Where is your app? In the cake/app?
(My english is poor too :)
tekcorap írta:
Hi masters,
I have one question. my cake directory is under my root directory
( e.g.www.example.com/cake). and
hi all,
i'm new to cakephp. i've read through most of the manual and have
completed the blog tutorial. i've got a decent feel for the basic
idea, but i'm confused about the best way to implement a menu. i'd
like to have the same menu on each page. i've coded the menu, and
could put it into the
On Mar 17, 2007, at 9:47 AM, Stacey wrote:
hi all,
i'm new to cakephp. i've read through most of the manual and have
completed the blog tutorial. i've got a decent feel for the basic
idea, but i'm confused about the best way to implement a menu. i'd
like to have the same menu on each
Thanks - works now :-)
On Mar 17, 1:34 pm, Martin [EMAIL PROTECTED] wrote:
Hi there
trying to download
http://cakeforge.org/frs/?group_id=23release_id=179
but cakeforge.org does not seem to be responding to me.
Are there any mirrors by chance?
Thx,
Martin
try to play with the Model's function afterFind
A quick try, in your model:
function afterFind($results) {
foreach ($results as $result_id = $result) {
$results[$result_id]['Model']['id'] = 'FLW' . $result['Model']
['id'];
}
}
On 17 mar, 13:30, Mike Digital Egg [EMAIL PROTECTED] wrote:
Ditto all above.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For
On 17 mar, 04:19, gwoo [EMAIL PROTECTED] wrote:
you are trying to access the file directly.
You url should be something likehttp://localhost/cake/hello
This assumes that you have mod_rewrite working.
Otherwise you can uncomment BASE_URL around line 40 in /app/config/
core.php
then access
I'm new to cake so I may not be 100% right, but why not you create a
beforeDelete() method in your Photo model? Use this delete the
associated image file.
This looked promising until i realized that I need the $id to get the
file path of the photo and delete it. I would need to put something
All ok but you must return $results ;-)
function afterFind($results) {
foreach ($results as $result_id = $result) {
$results[$result_id]['Model']['id'] = 'FLW' . $result['Model'] ['id'];
}
return $results; //
}
-Messaggio originale-
Da: cake-php@googlegroups.com
Looking at the Api the beforedelete function is cahined from the del
function del($id = null, $cascade = true) {
00957 if ($id) {
00958 $this-id = $id;
00959 }
00960
00961 $id = $this-id;
00962
00963 if ($this-exists() $this-beforeDelete()) {
As
Show me some love ;)
On Mar 17, 6:38 pm, yolabingo [EMAIL PROTECTED] wrote:
Ditto all above.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to
true that.
On Mar 17, 2:38 pm, yolabingo [EMAIL PROTECTED] wrote:
Ditto all above.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To
Got both the blog tutorial and the hello world tutorials working. Did
them by the book and they worked.
Thanks again for the suggestions.
Peter -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To
Hi bingo
I have searched over almost every where but didn't find any
description on how to set page title when using ajax. I load most of
my view using ajax (using JQuery). I tried setting pageTitle variable
in controller as well as in view but not seems to change the page
title.
Given
28 matches
Mail list logo