This is the code that is being used, but this does not work for sites
using layouts as the $this->set('domain',...) only picks up the last
item that it is set to and not both.
Is there a way to get both to work? So the default layout which uses "-
layout-default.po" and the view to uses "-views-p
This is the code that is being used, but this does not work for sites
using layouts as the $this->set('domain',...) only picks up the last
item that it is set to and not both.
Is there a way to get both to work? So the default layout which uses "-
layout-default.po" and the view to uses "-views-p
Speaking of which...
I have multiple connections in my database.conf. Running a 'cake
schema generate' always quits with "Error: Missing database table 'x'
for model 'y'". Even doing 'schema -connection alt -name Model
generate' quits with the same message. Depending on which '-
connection
Koolthnx Mark
On Sep 30, 1:03 am, mark_story <[EMAIL PROTECTED]> wrote:
> In 1.2 there is a builtin Schema shell (console app) that can manage
> things like ALTER statements that need to be run on a db between runs.
> To my knowledge it doesn't insert records. From a prompt cd into cake/
This is somewhat related to
http://groups.google.com/group/cake-php/browse_thread/thread/ea2bac4072e36cc6/c59d9cb45cf43a81?lnk=gst&q=Warning+Configure+include#c59d9cb45cf43a81
If you receive the following error
Warning: Configure::include core.php configure.include failed to open
stream: No suc
Stabs into the dark:
a) your local PHP has a lower debug level than your production server,
i.e. your local system doesn't complain about missing indexes but your
server does
b) the associated model can't be fetched because your database setup
is different/misconfigured
Hope that helps,
Da
On Mon, Sep 29, 2008 at 8:47 PM, Damelinks <[EMAIL PROTECTED]> wrote:
>
> Goodday Everybody, I set cookie by using the codes below
>
To destroy Cookies you have to eat them and preferably wash them down with milk
Other than that have Cake instead -
http://book.cakephp.org/view/180/Using-the-Com
Hello people,
I have a strange problem i ran into with CakePHP. On my local machine
all works fine. When I upload the complete project to my webhost, the
problems begin.
For example: when I query posts from the database. All fields of this
posts are shown fine (for example $post['Post']['title']
Hello All, I have a form that is filled with radio buttons which each
represents a time. What is the best way to loop through these radio
buttons enabling and disabling depending on other factors? Does this
go in the controller and if so, how do I go about this? Any links or
pointers would great
Hey All,
I have a model, hasMany associated-model, and I'm finding when using
the beforeFind callback inside associated-model, it is called more
times than I'm expecting. For each associated record found it is
called (with results like [0][associated-model]), and then for all
the records togeth
Source: http://www.smartwebby.com/PHP/cookies.asp
Reset a cookie by specifying its name only
Syntax:
setcookie('cookiename');
Example:
setcookie("test");
On 29 Sep., 17:18, Damelinks <[EMAIL PROTECTED]> wrote:
> Goodday Everybody, I set cookie by using the codes below
>
> $cookie_expire =
You're right, multiple "plain jane" inserts are significantly slower
than one large INSERT statement. Some quick comparisons showed a huge
difference between inserting 1000 rows at once and doing each
individually.
There's a handful of ways to try and get around this, anything from
disabling the
Just wanted to add that I have cleared the cache, as well as disabled
it.
On Sep 29, 5:57 pm, Ryan <[EMAIL PROTECTED]> wrote:
> I am working on a new app and everything was playing nicely until I
> added a simple app_controller.php in order to take advantage of the
> Firecake helper:
>
> class A
What type of acl authorization are you using?
Crud/model/action?
On 29 Sep, 14:51, Robson <[EMAIL PROTECTED]> wrote:
> Few weeks ago we introduced application to our customer.
> It all went just fine untill now .
> System's rights are based on built-in CAKE-PHP ACL Behaviour.
> Today i got a cal
I am working on a new app and everything was playing nicely until I
added a simple app_controller.php in order to take advantage of the
Firecake helper:
Now I am getting errors:
Notice (8): Undefined property: ItemsController::$Item [APP/
controllers/items_controller.php, line 6]
Fatal error:
atomic 'true', doesn't mean it's going to build the INSERT as
described above, in one call.
saveAll() is going to do multiple inserts, but within a transaction,
which ensures data integrity.
On Sep 29, 3:29 pm, Bruno Bergher <[EMAIL PROTECTED]> wrote:
> Inserting 100 records all at once will alw
Hi,
> but when you change the picture, the old picture is still stuck in the
> cache, so to see the new pic the user needs to push F5... I can't
> figure out how to "refresh" the page automatically.
>
> any ideas?
Simplest way is to add some random query string at the end of the url,
like
http:/
I'm using the form helpers for month, day & year to record several
start and end dates. What I'd like is for each respective helper to
create an array of months, days & years. I don't think there's a way
to do that with the helper the way it is, is there?
Right now $form->month('Model.field', dat
> i still have problem witch home.pl fucking shit
>
> http://www.aeonmedia.eu/
> http://www.aeonmedia.eu/aeonmedia
;-)
I see you made it work?
Regards,
Piotr
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP
Hi,
> CakePHP will not working on home.pl - there is not rewrite engine (if
> i good remember, they are working on it ;)), try ovh.pl - cheap with
> great polish support
Well, that was not my decision, I just had to install cake there since
the customer already owned server with all e-mail accou
In 1.2 there is a builtin Schema shell (console app) that can manage
things like ALTER statements that need to be run on a db between runs.
To my knowledge it doesn't insert records. From a prompt cd into cake/
console and try cake schema help. That will give you a list of
commands supported by
Inserting 100 records all at once will always be better regarding data
consistency.
If something wrong happens with the DB server between two calls, how
you you tell the application where to pick up next?
By inserting them all at one (usgin Model::saveAll()) with the
'atomic' property set to the
Nice hint :-)
It is not intended behavior by design, it is just way how current
implementation works. Anyway - you're not first one who brought this
question up, so I think we will keep it working this way (related test
case will be added soon), so you can rely on it without worries.
--~--~---
Hey Peter,
CakePHP will not working on home.pl - there is not rewrite engine (if
i good remember, they are working on it ;)), try ovh.pl - cheap with
great polish support
regards, mike
On Sep 28, 2:07 pm, "3lancer.eu" <[EMAIL PROTECTED]> wrote:
> > just clear your app/tmp/cache folder.always wo
I imagine it should work if you use different join tables for each HABTM
relationship. Regardless of cakephp this is what I imagine you'd need in
this situation (imagine what would happen if a user is both a friend and
an admirer of another user).
var $hasAndBelongsToMany = array(
i still have problem witch home.pl fucking shit
http://www.aeonmedia.eu/
http://www.aeonmedia.eu/aeonmedia
i have this rools
if (strpos('aeonmedia.eu', $_SERVER['SERVER_NAME']) !== false) {
ini_set('include_path', '/aeonmedia/..:/aeonmedia:.');
define('APP_PATH', '/aeonme
Built in schema shells?i dont follow...can u elaborate on that?
On Sep 29, 6:38 pm, mark_story <[EMAIL PROTECTED]> wrote:
> Couldn't you use the builtin Schema shell to do your migrations? and
> not have to muck with YAML?
>
> -Mark
>
> On Sep 29, 3:13 am, forrestgump <[EMAIL PROTECTED]> wro
it was fixed in https://trac.cakephp.org/ticket/5025, have same
problem with my lithuanian chars.
On Sep 26, 7:50 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hari,
>
> I would like to use validation with 1.2. I need something like
> alpanumeric, but it seems it does not accept non latin
Looks like you might have a composite primary key for the ARRAY error?
As far as i know cake does not support this, you would have to create
a new unq primary key I think.
On Sep 22, 1:18 am, chrisbdaemon <[EMAIL PROTECTED]> wrote:
> Hey, I'm trying to migrate a site's database from MySQL to P
Hello!
Is there a way to make a validation rule be applied only within a certain
date? For examplo, in 10/10/2008 the rule will be used, but next day,
10/11/2008, the rule will not be used. The way I need it, there are two
rules, one of them would be used for two days, and the other one will be
Hello!
I'm new to cakePHP and I would like to make a custom validate rule. I made a
page where there is a form with fields such as "name", "adress", etc. In the
field "City" there is only ONE city that is not allowed to apply - say,
"Forbidden City". I need a rule that is similar to "EqualTo", b
thank you, it works.
On Sep 29, 6:47 pm, Daniel Hofstetter <[EMAIL PROTECTED]> wrote:
> Hi Jérémy,
>
> > I am very new with CakePHP and I am trying to set up an authentication
> > system using the Auth component provided.
>
> > How can I show the logged user's name on a view ? Let's say the user
Thank your for your quick reply. I've seen your other posts and they
were really helpful :)
> var $actsAs = array('Translate' => array(
> 'title' => 'Titles',
> 'abstract' => 'Abstracts',
> 'text' => 'Texts'
> ));
OK, maybe that's worth it, but I'd loose that appreciated
abstraction.
Hi Jérémy,
> I am very new with CakePHP and I am trying to set up an authentication
> system using the Auth component provided.
>
> How can I show the logged user's name on a view ? Let's say the user
> John logged in successfully, I would like to put something like
> "Logout [John]" in the defau
I don't think containable will do this for you. Supplying additional
conditions to containments only further restricts the associations of
the initial find. Currently your code is doing the following
find all DealerAddresses in region 64. For each DealerAddress you
found only return the relate
Hi Paolo,
> How can I print/display SQL Query String in the view area? Like
> "SELECT `posts`.`id`, `posts`.`title` ... FROM `posts` WHERE ..".
> Thanks
In app/config/core.php set debug to 2.
--
Daniel Hofstetter
http://cakebaker.42dh.com
--~--~-~--~~~---~--~
It is price for performance and as simple db query as possible.
If you need to know (with multiple preferred locales set) which
translatios are missed, you will have to bind hasMany associations for
translated fields, like
var $actsAs = array('Translate' => array(
'title' => 'Titles',
'ab
The manual says I could overdefined any built-in validate rule.
So I added alphaNumeric function to the app_model.php
function alphaNumeric($check){
//alphaNumeric felüldefiniálása a magyar ékezetek kezelése érdekénben
$_this =& Validation::getInstance();
$_this->__reset(
Hello,
I am newbie to this workgroup, have tried to search about problem but
cant find any solutions.
My problem is that cake didnt clear-update my cache file. For ex:
//Here i cache my action
function view_page(slug = null){
...
$this->cacheAction = "+1 day";
}
//Here trying to update r
Goodday Everybody, I set cookie by using the codes below
and the cookie was actually set and are working as espected but I am
trying to destroy the cookie using the codes below.
but it is not destroying the cookies. Please I need your help
because
I am using the cookies for users authenta
Dear All,
Forgive me if this is covered elsewhere. I'm playing with cakePHP as
an alternative to Rails and am getting to grips with it by creating a
really simple social network app.
I've got some nice authentication and user profiles sorted and that's
all displaying great but now I've come to a
Have you had a look at the Cookie component? More info at
http://book.cakephp.org/view/177/Cookies
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googleg
Hello,
I'm trying to use TranslateBehavior for my project. I describe my
model like that:
class Service extends AppModel {
var $name = 'Service';
var $actsAs = array('Translate' => array('title', 'abstract',
'text'));
// table services also has fields like id, parent_id, order,
cr
LunarDraco wrote:
>
>
> Here are the changes I made
> Auth.php
> at about line 300 look for this:
> if ($loginAction == $url) {
> if (empty($controller->data) ||
> !isset($controller->data[$this-
>>userModel])) {
> if (!$this->Session->check
Hi,
I am very new with CakePHP and I am trying to set up an authentication
system using the Auth component provided.
How can I show the logged user's name on a view ? Let's say the user
John logged in successfully, I would like to put something like
"Logout [John]" in the default layout. How can
Note: Google Groups seemed to have eaten my first attempt, I hope this
isn't a repost!
I am also stuck on this hashing issue with my existing database.
However, I can't figure out how to create an appropriate object. Could
someone take a look at the component I created and help me find what's
mis
I'm still stuck on this same issue because I don't know how to
properly create an object. The custom controller I created doesn't
seem to cut it. Since I've been stuck on this for days any help would
be greatly appreciated!! Thanks!
/* My custom controller: */
App::import(array('Router', 'Securi
Hello there,
How can I print/display SQL Query String in the view area? Like
"SELECT `posts`.`id`, `posts`.`title` ... FROM `posts` WHERE ..".
Thanks
Paolo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"C
How can I print the SQL Query String in the controller class.
Ex. "SELECT `posts`.`id` FROM
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php
Few weeks ago we introduced application to our customer.
It all went just fine untill now .
System's rights are based on built-in CAKE-PHP ACL Behaviour.
Today i got a call from the customer that users keep reporting "not
having enough rights".
Acos table is massive (15k records) and grows, so an
hi iam rasheed from hyderabad,india
i am new to cakephp and never done any paypal integration.
i am using paypal component(BY Mariano Iglesias), i am able to include
PEAR and paypal component in to my application but i am completely
clue less about it's implementation in my application
please he
Cakephp Acl behavior sems not to work correctly. Application after few
weeks of working on production server has some of Acos broken (in fact
all tree structure is corrupted).
Can Acl system be used to repair a damaged tree (basing on the
parent_id fields)?
Or maybe some1 has got algorithm (cake
Goodday Everybody, I set cookie by using the codes below
and the cookie was actually set and are working as espected but I am
trying to destroy the cookie using the codes below.
but it is not destroying the cookies. Please I need your help
because
I am using the cookies for users authenta
You're trying to make it do two different things. Named parameter
format is:
/profiles/username:mustan9
"Normal" parameter format is:
/profiles/mustan9.
The latter has nothing to do with CakePHP's notion of 'named
parameters'. Please refer to
http://book.cakephp.org/view/46/Routes-Configura
I wasn't clear enough. It does not loose the data. It just won't
provide the controller with the data since it expects each step to be
totally isolated from previous ones. The session-storage is really
only designed to populate the form-fields of each step should you wish
choose to go backwards. I
I am trying out the Containable behaviour but am not getting the
correct result (or at least my expected result!).
I have a DealerAddress model (for their head office) which is
associated to a DealerBranchAddress model (for their branch address)
and I want to be able to return all dealers in a sp
Hi I was migrating an appilcation on mine to 1.2. Everything works
fine, except for the select fields in forms. I would like to know hoew
to remove labels from the list. Another problem (i'll try to explain
as better as I can) is with data. I've a table with 3 fields, name,
last_name, ID. In my ta
I've been debugging this code, and I'm confused as to how Routing is
suppose to work with named parameters.
In the Router.php file in the function mapRouteElements there is this
logic.
if (!strpos($route[0], '*') && (!empty($pass) || !empty($named))) {
return false;
}
This will return false f
Hello,
I noticed after migrating from the alpha version of 1.2, that in RC2
controllers dump html no matter what you do to try and stop it.
For example:
in the beforeFilter I type die('asd') and I would expect it to just
type asd on the page and debug info (depends on settings), but what I
get
I find it strange that this wizard looses its varibales/data during
the steps. If it would be like this, you shouldn't see data when you
go back to a previous step. You shuold loose everything. If you move
your debug value to 3, you're able to see data in your session. So I
could see that in third
You can also use this:
Router::url(array('controller'=>'users','action'=>'activate',$key),
true);
Note the second parameter, "true", which will make the Router return
the full URL.
Internally, it is using FULL_BASE_URL as teknoid suggested, but I
think it's cleaner to let the Router take care o
Couldn't you use the builtin Schema shell to do your migrations? and
not have to muck with YAML?
-Mark
On Sep 29, 3:13 am, forrestgump <[EMAIL PROTECTED]> wrote:
> OK i made some changed to the code as follows
> UP:
> create_table:
> users:
> username:
> type: varcha
Clapping hands for everyone who shoveled the cookbook! :)
NB: For those of you who don't listen to Tom Waits:
Roar, roar, the thunder and the roar
Son of a bitch is never coming back here no more
Moon in the window and a bird on the pole
Can always find a millionaire to shovel all the coal
Clap
Polymorphic behavior on bakery helped me .. just fyi.. in case some one else
is also stuck in such a situation.
Thanks.
On Mon, Sep 29, 2008 at 1:15 PM, grigri <[EMAIL PROTECTED]> wrote:
>
> Doesn't really seem much point.
>
> When retrieving an `Entity`, cake will as for the join to be performe
FYI: I haven't used that behaviour at all. :)
The errors you pasted look like encoding issues. You might be
encrypting data into a field that can't handle the input.
mypassword is a good varchar(255) but my password ciphered might
require a blob or at least some other charset.
When I wrote my o
Hi Rich
Thanks for that !! One more question..
If I want to change the
($this->UserFavourite->save($this->data)) {
where the controller gets the info from the view..
echo $form->input('user_id');
echo $form->input('item_id');
I want the controller not to go the t
I could probably do this easily in sessions BUT I don't want to
reinvent Cakes wheels. So, I have added
addCrumb('Register', '/users/register');?> in the
register.ctp view. and added the the getCrumbs();?> in the
default.ctp layout. It only displays the current view and does not
remember the path
I just noticed that the component restes the wizard before sending you
to the receipt. How I am supposed to show a receipt for a transaction
I no linger have access to, I don't know.
There is apparently also an afterComplete() action that the component
looks for just before resetting. I guess th
You were ofcause absolutely right. The problem was my field in the
database, which was too small. Changed it from VAR(11) to VAR(100) and
the problem was solved.
Thank you very much.
/Anders
On Sep 29, 1:21 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> FYI: I haven't used that behaviour
That is sort of the problem I had.
The component does not to my knowledge handle this at the moment. I
modified it to merge the data from each step so that each step would
contain the data from all steps. On the last step (or in
beforeReceipt) I can then finally save the end-result.
I was in nee
My problem is that this form, divided in more pages, saves its data
all in a unique table. So, if I save data in DB at each step, at the
end I have 3 new entries with 3 steps.
On 29 Set, 13:07, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> If you are referring to the component by jaredhoyt the
If you are referring to the component by jaredhoyt then yes the
tutorial can be a little fuzzy on some points. It works great, though.
Just make sure you read both pages of the article and the comments and
any fuzzy bits should be taken care of.
You have to create a receipt method (i.e. a place t
Thanks, that removed the PHP errors.
I still have some problems with the behaviour though. It correctly
encrypts the data, but even though autoDecrypt is set to true, it
doesn't decrypt the data. In the log the behaviour outputs:
2008-09-29 11:53:40 Error: CipherBehavior::_unpackValue Enclosed s
> - What happens if user uploads a file and does not submit the
> form the file will be uploaded
I am not sure what you mean byt this... so I'll more on to the other
questions.
> - How can I use an ajax progress bar in cake ? Not swf upload
> please I sdont want flash in my site .
>
Hi all,
I'm installing this component on my application to have a multi-page
form. Everything work, but I really don't know how to save data in the
database. The problem is that I can't find the session variables saved
during the steps. The other thing I don't understand is if I need to
create a f
This is my ajax link that I am using:
echo $ajax->link($html->image('/img/portfolio/small/' .
$portfolio['Portfolio']['picture'], array('alt' =>
$portfolio['Portfolio']['title'])), '/portfolios/view/' .
$portfolio['Portfolio']['id'], array('update'=> 'case_study',
'complete' => 'Effect.Appear(\'c
Yahoo (guidelines on caching and optimisations) suggests that you
never replace a picture under the same name.
So when updating your design, for example, you would link your logo to
"logo-1.1.gif" or something similar.
They particularly suggest this "versioning" type of setup for logos
and other p
Thanks for the link.
I already found the problem: I sanitized all data before writing it to
the database thus the dash was escaped and the validation failed as it
should.
Juergen
On 29 Sep., 09:44, "glenda guo" <[EMAIL PROTECTED]> wrote:
> You can reference this
> pagehttp://cakebaker.42dh.com/2
Seems like I found the solution at:
http://bakery.cakephp.org/articles/view/p28n-the-top-to-bottom-persistent-internationalization-tutorial
On the bottom of the page in Comments no. 26 it explains how to use
multiple .po files.
On Sep 29, 4:46 pm, exo_duz <[EMAIL PROTECTED]> wrote:
> Dr. Tari
the default form action parameter is add ,as below, you just need to assign
it
echo $form->create('
>
> EmployeesAccreditation', array('action' => 'edit'));
On Sun, Sep 28, 2008 at 7:58 PM, jojiju <[EMAIL PROTECTED]> wrote:
>
> hi all,
>I have tables employees and accreditations and join ta
Dr. Tarique,
I have done that and have successfully made the default pot files from
the CAKE console script.
The only problem now is that it does not seem to pick it up on the
page. I have kept all the names the same such as "-app-views-pages-
default.po" and put all the files within /app/locale
Doesn't really seem much point.
When retrieving an `Entity`, cake will as for the join to be performed
so that both entries will be retrieved in a single query.
To only retrieve the `User` on a condition in the `Entity` table,
you'd have to first retrieve the `Entity` and then (sometimes)
retrie
You can reference this page
http://cakebaker.42dh.com/2007/01/03/validation-with-cakephp-12/
On Mon, Sep 29, 2008 at 3:22 PM, JuergenRiemer <[EMAIL PROTECTED]>wrote:
>
> Hi,
>
> afaik dashes are allowed in email adresses; why does the validation
> module let them fail? do I overlook sg here, I am
use javascript
http://grizzlyweb.com/webmaster/javascripts/refresh.asp
On Sep 29, 12:37 pm, rocket <[EMAIL PROTECTED]> wrote:
> sup guys
> i have an upload script, that lets you upload your profile pic.
>
> but when you change the picture, the old picture is still stuck in the
> cache, so to
Does the Program and Broadcaster relationship type is
hasAndBelongsToMany?
In this case, you need to create hasAndBelongsToMany relationshipship in
Program model, when you want to get the Broadcast data, you can use
$array['Program']['Broadcast'][
0- (sizeof9$array['Program']['Broadcast']) -1]
sup guys
i have an upload script, that lets you upload your profile pic.
but when you change the picture, the old picture is still stuck in the
cache, so to see the new pic the user needs to push F5... I can't
figure out how to "refresh" the page automatically.
any ideas?
--~--~-~--~
Hi,
afaik dashes are allowed in email adresses; why does the validation
module let them fail? do I overlook sg here, I am a bit puzzled since
this validation should be quite well elaborated by now and I found
just one post in that concern that wasn't really answered.
Validation fails with and wit
OK i made some changed to the code as follows
UP:
create_table:
users:
username:
type: varchar
length: 100
index: true
password:
type: varchar
length: 100
query:
users: INSERT INTO users SET username = 'admin'
Can someone tell me what is wrong with the following YAML code ? \
UP:
create_table:
users:
id:
type: integer
length: 11
primary: true
autoincrement: true
username:
type: varchar
length: 100
inde
89 matches
Mail list logo