Yeah its partially a halloween design.
For everyone with their panties in a twist, it will be changed back
soon. We can all resume being _serious_ about a framework with many
food based puns.
-Mark
On Nov 2, 7:23 am, Adrenalin wrote:
> I think that is funny, cakephp rockz ! ;)
>
>
>
> On Mon,
One more note, MonkeyGirl, and I'm sure we're already on the same
page, but the syntax should be $this->ModelName->reorder(); Using the
categories example from http://book.cakephp.org/view/228/Basic-Usage
, the syntax to reorder the entire tree by name is $this->Category-
>reorder();
On Nov 2, 9
On catch all page action check if URL is valid or at least not too
wrong (like /style.css). If request isn't valid, display error page.
On Nov 2, 10:46 am, TimG wrote:
> I am using this:
> Router::connect('(?!admin|items|images)(.*)', array
> ('controller'=>'displays', 'action'=>'index'));
>
> H
Option C does seem to be your best bet. I don't see anything wrong
with something like this in AppModel:
function validateSingle($field, $value = null) {
$this->validate = array($field => $this->validate[$field]);
$this->data[$this->alias][$field] = $value;
return $thi
Maybe I should have put in baby steps for you to follow.
1. Click edit
2.Save
3. Save redirects you back to index.
4.Look no new content
5.Click new or edit
6.Save
7.Back to index
8.No new content , add or edit new content and nothing shows up until you
hit refresh...(the index is cached)i know on
I think you must convert array structure before save call. saveAll
function determine the way must be used for actual save before
beforeSave is called. So saveAll thinks that it should save one record
of one structure, but then you change it to many records of other
structure. So save fails. Make
Also note that one issue with your reorderAll() function is that it
loops through all non-empty parent IDs. The only problem with this is
that top-level items WILL have an empty parent.
On Nov 3, 10:27 am, Kerr wrote:
> To be more specific in addressing, "I'm also still not
> sure if reorder() r
He doesn't need to. Auth redirects only come into play on login,
logout and when the user isn't authorised. Presumable Dave has allowed
unauthorised access to
RegistrationsController::pending_email_confirmation()
On Nov 3, 6:47 am, Simon wrote:
> did you set auth redirect to false ??
>
> On Nov
OK, this one confused me. You have to hit refresh to reload a
webpage... like everyone else?
And I've never seen $this->disableCache() before. Since 1.1 I've been
using $this->cacheAction = false;
On Nov 3, 8:48 am, "Dave" wrote:
> I need some help figuring out caching. A lot of the site I am w
To be more specific in addressing, "I'm also still not
sure if reorder() recurses as far as it can, or just one level. " --
Yes, it will recurse the tree until it finds no children in all
affected branches.
On Nov 2, 8:25 pm, Kerr wrote:
> Hi, I've been playing around with thetreefunctionality
Hi, I've been playing around with the tree functionality as well.
Looking at the code, you'll notice that the reorder method calls
itself recursively. If you want to reorder the entire tree, simply
pass no arguments... e.g.
$this->reorder();
Overall, I'm pretty impressed so far with how easy
I need some help figuring out caching. A lot of the site I am working on is
dynamic and I do not want to cache the constantly changing data / actions.
I have added Cache to app_controller, even to individual controllers,
added nocache blocks in the views, $this->disableCache(); in controllers
I use https://www.nearlyfreespeech.net/ over 2 years and am more then
contented.
Excellent scalable hosting service.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email
I'm trying to set login functionality at home.ctp
I have problem with error "Notice (8): Use of undefined constant -
assumed ' ' [APP/views/layouts/default.php, line 49]"
which from this code"create('User', array('action'
=> 'login')); ?>"
also after click "login" botton goes to user/login pag
Any idea how to use this approach with pagination?
Chad
On Mon, Nov 2, 2009 at 7:11 PM, Pablo Viojo wrote:
> You can do something using subqueries (but if you're quering the same table
> on main and sub query, it will not perform well)
> I recommend to do two queries instead.
> Regards,
>
> Pab
You can do something using subqueries (but if you're quering the same table
on main and sub query, it will not perform well)
I recommend to do two queries instead.
Regards,
Pablo Viojo
pvi...@gmail.com
http://pviojo.net
¿Que necesitas?
http://needish.com
On Mon, Nov 2, 2009 at 8:49 PM, Chad C
Just fixed it.
I was passing the $id to the action, but I hadn't added the hidden id
fields to the form, so that each element knew what to update.
So the two things I had to add were:
- hidden id field for the Album
- hidden id field for each track that was already part of the Album
(i.e. in my
Is there anyway to get all the row information with all those ids or
does it require another query to get row details for returned ids?
Thanks,
Chad
On Mon, Nov 2, 2009 at 6:36 PM, Pablo Viojo wrote:
> Something like this may help:
> SELECT domain_id, search_engine_id, MAX(id) FROM table GROUP
Something like this may help:
SELECT domain_id, search_engine_id, MAX(id) FROM table GROUP BY domain_id,
search_engine_id
Regards,
Pablo Viojo
pvi...@gmail.com
http://pviojo.net
¿Que necesitas?
http://needish.com
On Mon, Nov 2, 2009 at 8:29 PM, Chad Casselman wrote:
>
> I have a table that
Well in most cases then not, if your on, says a users profile, you
would submit to that page. Within that page you would check if a
$_POST exists and then perform the add friend logic.
On Nov 2, 8:44 am, Jonas Hartmann
wrote:
> Given someone mails you a link with html images that tries to
> fet
I have a table that looks like:
id created modifieddomain_id pages search_engine_id
92 2009-11-02 14:32:11 2009-11-02 14:32:11 2 19990 3
90 2009-11-02 14:32:11 2009-11-02 14:32:11 2 725 1
89 2009-11-02 14:32:10 2009
did you set auth redirect to false ??
On Nov 2, 2:37 pm, "Dave" wrote:
> For #2 in my login function I have
>
> if ($this->Auth->user('confirmed') == '0') {
> $this->Session->destroy();
> $this->redirect(array('controller' => 'registrations',
> 'action
For #2 in my login function I have
if ($this->Auth->user('confirmed') == '0') {
$this->Session->destroy();
$this->redirect(array('controller' => 'registrations',
'action' => 'pending_email_confirmation'));
}
Dave
-Original Message
1. is save the last login without the auth redirect = to false
2. if the email is not verified redirect them
if you have any sloutions please share
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To
I also set the upload_max_filesize and post_max_size to 128M
and the available memory size to 256M
Probably not going to make the shared host happy, but phpinfo is
reporting these values as having been set.
It's a mystery.
I am going to try and replicate the problem on a clean install to try
an
oh yes, as I mentioned, I have also set a simple php script that is
outside of the cake "jursadiction" and rewrite / routing mechanism but
still hosted on the same shared host
to just vardump the POSTed data, and that works absolutely fine.
On Nov 2, 8:09 pm, Tonu Tusk wrote:
> Hi OK, well it
Hi OK, well it is on a shared host so don't know how much luck I can
get on accessing their logs.
I have debug on level 2.
I have stripped my controller back now so that it unconditionally just
prepares the data to pass to the view to display the form.
Everything is ok with that.
I have written
http://httpd.apache.org/docs/2.0/mod/core.html#limitrequestbody
upload_max_filesize and post_max_size in your php.ini file.
Each name/value is limited to 1024 characters, if the form type is not
multipart.
Also look at memory size available for script ... the default 16M is not
enough, as cake i
It's not just you, I am also missing this feature. I hope this is
coming soon.
Jaime schrieb:
> Hi all,
>
> Am I crazy, or it is impossible to search inside the new ticket system
> at http://code.cakephp.org/tickets? Wanted to report an issue, but I'm
> unable to filter the ticket list to check w
Also, check apache logs. There may be some valuable info there.
On Mon, Nov 2, 2009 at 17:04, John Andersen wrote:
>
> If you haven't, turn on debug and tell us the debug information that
> you can see, look also at the source!
>
> Please provide the code for the Controller action in which the f
If you haven't, turn on debug and tell us the debug information that
you can see, look also at the source!
Please provide the code for the Controller action in which the failure
occur, so that we may be able to assist you better!
Enjoy,
John
On Nov 2, 6:22 pm, Tonu Tusk wrote:
> Hi, This is
Helpers are used in Views and if you pass data from the Controller to
the View, then the Helper has access to the data.
The View has no direct access to Model data.
That is why I suggested using requestAction in an Element to get the
needed data.
Enjoy,
John
On Nov 2, 7:50 pm, dtirer wrote:
Hi John, thanks for the info. I'll give that a whirl
A general question: do helpers have access to Model data, or would
you need to import the Model into the helper to access data like
that?.
Im just getting into Helpers, Components, etc so I'm trying to figure
out when its best to use each
O
Based on the information you provided (not enough):
One possible solution is to have a separate Element to create the
link, when the database contains the specific record.
The element will use requestAction to query the database for the
specific record, and display/not display the link depending
Hi, This is going to sounds a bit vague to start with, but I basically
have a form that has a lot of input boxes in it
( > 500 text input boxes) and when this is posting back to the
controller I get the WSOD.
I have turned off all of my actual processing code in my controller
and it did all work
Given someone mails you a link with html images that tries to fetch
http://domain.tld/users/add_friend/5
- now the user is logged into a web client that fetches that URL.
How do you protect your cake application to not modify data. HTML wise
this should be a PUT or POST method not a GET met
So here's my scenario. On a particular page, I want to display a link.
However, I only want to display this link if a particular record
exists in the database.
Firstly, do helpers have access to DB/Model info?
If so, should I make a helper to check if the records exists in the
DB?
Whats the bes
Had to add some facts:
I removed AppModel's beforeFind and beforeSave (I forgot to write
Config.language, which is used by Translate Behavior). So forget about
these lines.
Another important thing is, that field_a and field_b in my real world
app are named equal. But tested it also with different
A very cool, didnt even think about doing it that way, had even
started to look at mysql triggers to do it.
Thankyou robustsolution!
Tony
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post
Hi guys,
i'm trying to combine Containable and Translate Behavior.
My setup:
Models:
A hasMany B
A Translate = 'field_a'
B belongsTo A
B Translate = 'field_b'
Controllers:
A->contain('B');
A->read(null, $id);
AppModel:
beforeFind:
$this->locale = 'de_de';
beforeSave:
$this->locale = 'de_de';
you dont need to create a controller class for the settings table
just create a model for the settings table
In case user is not created with its settings (in the same add form),
do the following
in the User model put this
function afterSave($created) {
if($created)
{
$this->Setting->create();
Hi Guys,
I am creating an application that hold user names / passwords and
settings.
So I have 2 tables in a DB, users and settings
They have a hasOne relationship.
I have come up to a little problem, When a new user is created i want
to have a row in the settings table created too. is this po
nice approach... euromark.
On Nov 1, 9:23 am, "euromark (munich)"
wrote:
> way to complicated
>
> dont sanitize it
> and use h() for output (text, varchar)
>
> that is way more handy than any other approach
>
> On 1 Nov., 06:44, Kyle Decot wrote:
>
> > Try echo $form->input("description",ar
I meant cakePHP is working as it should be
On Nov 2, 2:56 pm, robustsolution wrote:
> I have a linux based hosting account on fasthosts.co.uk and PHP is
> working as it should be.
> even though I am using it right now for testing from time to time and
> it is fine.
>
> I think the things we shou
I have a linux based hosting account on fasthosts.co.uk and PHP is
working as it should be.
even though I am using it right now for testing from time to time and
it is fine.
I think the things we should ask about are:
-is htaccess enabled and is Apache allowing mod rewrite rule?
-since most of us
Prof.No Time
try to take a coffee cup and get relaxed, this is my current solution/
tips/tricks for the moment
1)put this in your AppController class
final protected function _logout() {
if (!empty($this->Cookie)) {
//this ensures if you were using the Cookie component al
On 2 nov, 12:47, "Prof. No Time" wrote:
> Thanks so so much AD7six,
>
> Your suggestion of Router::url() worked like magic but for the second
> suggestion on the query, I tried it and the debug dump gave me this:
>
> SELECT `AppSetting`.`id`, `AppSetting`.`name`, `AppSetting`.`value`,
> `AppSet
Hello everyone,
let me quickly explain my situation and what i'm trying to achieve.
I have a User model with 5 fields having validation rules, out of
these 5, 3 are required ( required => true, and they also have the
notEmpty rule )
I would like to pre-validate each field, one by one, from the
this depends on how the other php site (the server site) is prepared
to receive credentials...
in general it is a bad practice to pass credentials through URL for
many security reasons...
On Nov 2, 2:22 am, badz lee wrote:
> Hi CakeTeam,
>
> Need your guys advice how to encapsulate link or hide
Dear appel268576,
It seems your edit form does not include the id of each child record,
that is why when you submit, new records are creating as if you are in
create mode!!!
have a nice baking day
--~--~-~--~~~---~--~~
You received this message because you are sub
You probably did not understand SQL / IN.
FOO IN (1,2,3) means FOO can be 1 OR 2 OR 3 or to express it other
ways FOO is contained in the list afterwards.
While I am not sure which is faster and what the "internal"
differences are, the result (should be) is the same.
I am not sure if you can en
My idea: You can encapsulate complex writes by modifing your function
save() of models you create and you can encapsulate complex reads by
creating SQL VIEWS.
Other than that: 100 tables? for what? Clean database design based on
an ERD does NOT depend on applications running ORM-Layers or in MVC-
Even if I remove the unique key from table, Cake is not inserting. In
logs I have:
START TRANSACTION
COMMIT
No other SQL queries, any INSERT nor UPDATE.
On 2 Lis, 11:59, Robert P wrote:
> And is "key" unique, but not validated against?
>
> Since there are no IDs included, saveAll() will try t
Hi there.
I have a bit of an issue.
I am working on creating a post model that handles multiple postmeta
data for easily creating scalable forms.
I have the two models
post:
var $hasMany = array('Meta' =>
array('className' => 'Meta',
'foreignKey' => 'pos
hi, you can use the bakery (http://bakery.cakephp.org/) u will find
tutorials and codes there , download this great free ebook
http://www.pseudocoder.com/free-cakephp-book/ it is about tips and tricks in
cakephp
or this links for cakephp core developers
-> http://kevin.vanzonneveld.net/
-> http:/
I am probably going to sound like an ass, but CakePhp is extremely
popular and Google will give you loads of links.
If that doesn't help you, did you visit Cakephp.org?
I mean, really visit?
There's the Bakery, The Chaw, Cake code, ...
On Nov 2, 6:45 am, Simon wrote:
> Hii,
>
> Plz Give me some
Hi,
I played around with this a little more. It turned out that the
problem is tied to the standard encryption of the cookie.
If I turn encryption off, it works. I didn't notice that in the first
place, because the old cookies were not deleted...
I encrypt the values now myself, as a work-around
Thanks so so much AD7six,
Your suggestion of Router::url() worked like magic but for the second
suggestion on the query, I tried it and the debug dump gave me this:
SELECT `AppSetting`.`id`, `AppSetting`.`name`, `AppSetting`.`value`,
`AppSetting`.`created`, `AppSetting`.`modified` FROM `app_sett
True, thanks for the tip.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubsc
I think that is funny, cakephp rockz ! ;)
On Mon, Nov 2, 2009 at 10:14 AM, Shadab Shaikh wrote:
> Its look like horror film related website,probably due to celebration of
> Halloween, but the theme/graphics does not match with the purpose and
> concern of the website. Most weird graphics so far
Possibly a little easier right now, but a mess to maintain.
If the user has to add the Event first, then go through date by date
reloading every time, then that's because you built the system that
way. From my perspective it's easier to normalise and simplify now
than it is to future-proof someth
And is "key" unique, but not validated against?
Since there are no IDs included, saveAll() will try to create the
entries which could be why it fails. Try copying the generated queries
from the SQL log and running them from phpMyAdmin for more detailed
error messages.
On Nov 2, 6:16 pm, red wro
Because I thought it would make things too complicated. The user would
have to add an event first, then add several days to it. Doing it all
in once seems me easier.
I actually found the right code:
foreach ($this->data['Event'] as $event) {
$event['name'] = $this->data['Event'][0]['name'
Why not normalise the database, and simply move the dates to a new
EventDate model?
Event hasMany EventDate
I don't see why in this case you would purposefully populate the table
with redundant data.
On Nov 2, 6:22 pm, Octavian wrote:
> Hi,
>
> I'm trying to add new events. An event can have m
Hi,
I'm trying to add new events. An event can have more than one date,
but always has the same name/description. So this same info is only
entered once in the add form, but dates can be added dynamically to
the form. Controller should insert for each date a new event with a
different date but th
Oh, the table structure is:
settings(id, key, value, created, modified)
key & value are of course VARCHARS.
On 2 Lis, 11:04, red wrote:
> Hi,
> I've pasted code here:http://bin.cakephp.org/saved/52122
>
> The problem is that the saveAll() doesn't work at all. Ok, it's
> invoked and $this->da
On 2 nov, 06:45, Simon wrote:
> Hii,
>
> Plz Give me some useful links to refer the cakephp codes for my
> project other than cakephp manual.
>
> thanking you,
> Simon
I like this one: http://tinyurl.com/yk2ork6
--~--~-~--~~~---~--~~
You received this
Hi,
I've pasted code here:
http://bin.cakephp.org/saved/52122
The problem is that the saveAll() doesn't work at all. Ok, it's
invoked and $this->data is modified, but saveAll() does not save any
records and debug($this->data) after success of saveAll() shows the
old structure of $this->data. What
On 2 nov, 04:08, "Prof. No Time" wrote:
> Please people, I seriously need answers to the following questions. I
> need them treated as numbered please.
> Regards,
>
> Questions:
> 1. When shall cake PHP be fully PHP 5 compatible and all the PHP 4 OOP
> be gone since PHP 5.3 is already throwing
Its look like horror film related website,probably due to celebration of
Halloween, but the theme/graphics does not match with the purpose and
concern of the website. Most weird graphics so far ! It should be changed
asap !
Shadab
On Mon, Nov 2, 2009 at 1:33 PM, tobi_one wrote:
>
> Sorry for th
Hi,
I can't really help you with your questions on the basis of
experience, but I believe that cake should handle that pretty well and
alot of optimizations can also be done on database side. But I already
read about the possibility of lazy loading models in cake, maybe this
is something you coul
Hi there,
How to request permission to attach files to tickets in trac?
I've made a small fix to sqlite3 driver (http://trac.cakephp.org/ticket/3003)
to use "select..as" queries. As I could'nt update the ticket
so I pasted it to bin:
http://bin.cakephp.org/view/2044269319
Hope it could be usef
Sorry for that multithread. I did not see any related thread, when
posting.
The "RIP" Cakephp graphics still feels weird to me, even though it
maybe halloween... But then, we don't celebrate Halloween over here!
Cheers,
tobi_one
On 1 Nov., 18:54, SERKAN TURAN wrote:
> *Halloween* :)
>
> On Sun
Hi John,
thanks for your response!
I tried just a single key and it does not work either. I tried various
cookie settings, but none of them seem to have an influence on this
issue. The current cookie settings I'm using is just
$this->Cookie->name = 'somename';
$this->Cookie->time = '2 weeks'; /
74 matches
Mail list logo