Re: multiple requests via ajax in cake

2009-08-04 Thread Sidney
When doing a lot of AJAX you can run into session problems. Try changing the Security.level setting in core.php to medium from high. This worked for me in a similar situation. HTH. On Aug 3, 1:14 pm, Fabrizio Marmitt wrote: > again > > I'm having some problems with "cake" to make several r

Re: Additional checks at login (email validated)

2009-07-21 Thread Sidney
Brilliant! That works perfectly, thanks Dardo for your super fast help. [and sorry for not finding it in the cookbook myself. D'oh] Sid. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to th

Additional checks at login (email validated)

2009-07-21 Thread Sidney
In my app I require users to register with a valid email address, which I send an email to with a link to a confirmation page. This page checks the validity of the ticket (hash) embedded on the link and sets a Validated flag on the user record. This works fine (although the email looks a little ug

Breadcrumb doesn't show parent without specifying it

2009-06-22 Thread Sidney
Hi All, After some searching and looking into the html crumbs helper source code, it seems I totally misunderstood (and overestimated) the functionality, and would just like to a) confirm I now understand correctly now, and b) share this with any other misguided souls. I thought that all that was

Are admin routes worthwhile? No automagic with Auth

2009-05-26 Thread Sidney
Hi All, This is a general question - I have read the manual, and got the code working. In my app I have a need for some admin functions e.g. reset password and change user status (banned/vip etc). So I set up admin prefix routing by uncommenting Configure::write ('Routing.admin', 'admin'); in

Re: Objects vs. arrays

2009-05-25 Thread Sidney
Interesting stuff. I have been trying to write fat models and get away from putting all the logic in the controller, but I was incorrectly passing the 'active record' as a parameter! It always _felt_ wrong, and now you have shown my the right way. At least I wasn't dumb enough to pass the id to th

Re: Getting kicked out by auth when displaying blobs

2009-04-14 Thread Sidney
Without discussing the pros/cons of whether to use blobs in the 1st place, one point to note is that with caching, the binary data will get served from the file system in most cases anyway. On Apr 15, 9:08 am, Rufus wrote: > The images are from 4-20k max and it seems pretty darn speedy. Also > t

Re: Grabbing only records with associated records in a linked table

2009-04-07 Thread Sidney
You should take a look at Containable (I love it, along with Set::extract). You can specify what data to retrieve (for efficiency) and apply the type of condition you need i.e. there must be a PageSnippet attached. HTH On Apr 7, 9:40 am, mattalexx wrote: > Page is also attached to a bunch of oth

Re: Adding/Deleting HABTM on existing records

2009-04-01 Thread Sidney
Thanks guys, that's much nicer. On Mar 31, 10:55 pm, RyOnLife wrote: > That's how I handle my deletes. > > If you don't want to read the existing relationships before your save > (meaning you don't want Cake to delete existing relationships before > inserting new ones), in the models where you

Adding/Deleting HABTM on existing records

2009-03-30 Thread Sidney
Hi, I have searched this forum and read the manuals, and finally got my code working, BUT am I doing this right or have I just found a cludge by dumb luck? I have 2 tables Questions and Games joined correctly thru games_questions table. Users can attach or detach Questions from a Game (drag 'n dr

Re: Simple chat between two persons? Please help

2009-03-26 Thread Sidney
I use the ajax chat plugin by Matt Curry (search the bakery for a link). It's easy to set-up and you can create as many "chats" as you want: echo $ajaxChat('chat1'); HTH On Mar 25, 11:37 pm, Dardo Sordi Bogado wrote: > http://tinyurl.com/c8wmcx > > On Wed, Mar 25, 2009 at 7:28 AM, Anna P wrot

Re: Ajax requests destroy sessions

2009-03-03 Thread Sidney
Try changing your security level to medium from high. That worked for me and many others. Ajax and sessions are a common problem. On Mar 3, 5:43 am, jc_mich wrote: > Hi > > I'm trying to render an element after an ajax request. After the request is > successfully accepted by the controller the s

Re: how to set current time for local computer

2009-03-03 Thread Sidney
Glad you got your solution Vikas. I am trying to design a solution for a broader, similar problem: My site is available globaly, and runs Games according to a date/time schedule (think online Poker). I can record the schedule according to GMT as a base, but I want to show users when the game wil

Re: isn't a form in the view supposed to find the correct action?

2009-02-18 Thread Sidney
; > > > > Sindey, Marcelo is right. The default action for a form is to post to > > the $controller->add() method. You have to override it for other > > actions > > > On Feb 18, 12:00 am, Sidney wrote: > > > I think the default action is to self-post i.e. t

Re: isn't a form in the view supposed to find the correct action?

2009-02-17 Thread Sidney
I think the default action is to self-post i.e. the form post/get goes to the same controller/action that served the view with the form on it. This is a normal design convention and seems logical to me (although quite a noob myself). Perhaps I misunderstand your question? On Feb 17, 8:01 am, Marc

Re: how to set css for internet explorer

2009-02-15 Thread Sidney
I recommend switching to a css framework if layout is your problem, such as bluepages or 960 grid. There are lots out there, and lot of reviews too to help you choose. Personally I chose bluepages, and it works well with prototype/scriptalicious. IMO the best way to switch is to load the framewor

Re: How long run the sql statement?

2009-02-10 Thread Sidney
You can get a lot of performance info from almost all the main DB engines (commands vary) that can help identify where new indexes would improve things. Otherwise I guess you have to look into cake internals to figure out how it gets this data for debug level 2 and massage it to fit your needs.

Re: Call Ajax from Javascript Function

2009-01-28 Thread Sidney
I'm not sure if it's 'recommended', but I found quite quickly that the scope of the $ajax helper becomes too limited (you just can't get enough code into the array param). The solution is then to start coding javascript using prototype functions directly and take full control. Prototype makes aja