sorting records with order by and group by

2009-10-05 Thread vekija
Hi, I'm having a problem with sorting the recordset with order by and group by statements. Would appreciate any help. There are 2 models, Team and Vote (Team has many Votes) and I want to order teams based on the number of votes they got. Here's the find call: $teams = $this-find('all',

Javascript cant find XML view data

2009-10-05 Thread bRuNuShky
Hi, I really need help to understand something...( also finish it) I was reading some notes from http://www.littlehart.net/atthekeyboard/2007/03/13/how-easy-are-web-services-in-cakephp-12-really-easy/ . about web service So after read this I work my own test... I created controller function

Re: Multiple controller for 1 layout

2009-10-05 Thread vekija
You could use requestAction http://book.cakephp.org/view/434/requestAction but beware of the performance impact it might have On Oct 4, 9:39 pm, f m franck.d...@gmail.com wrote: I'd like to know how to display in a single layout, the result of 2 or more controllers ? Thanks for your help

Re: Field Naming conventions and hasmany records

2009-10-05 Thread vekija
You'll have to save the topic first and then fetch it's id. From the cookbook: If neither of the associated model records exists in the system yet (for example, you want to save a new User and their related Profile records at the same time), you'll need to first save the primary, or parent model.

Re: Cross-site element with AJAX ? ? ? How can I ? ? ?

2009-10-05 Thread Dr. Loboto
This call should produce request to http://yourdomain.ext/Countries/getCountries always. And it will work only if cake installed into root of your domain. If it is not so, you see some other request in firebug. On Oct 5, 12:40 pm, DatacenterHellas merianosni...@gmail.com wrote: Is a reqular

Re: AJAX layout again

2009-10-05 Thread Dr. Loboto
Error in code. missed } in beforeFilter. What do you see in default layout? Error? Or only DUMMY text? Never set debug to 0 in beforeFilter, do it in afterFilter or you never see actual errors. On Oct 4, 11:51 pm, Cергей Inhbgkbyu rakoth...@gmail.com wrote: Hello 2all! I'm stuck with simple

Re: AJAX layout again

2009-10-05 Thread Cергей Inhbgkbyu
On Mon, Oct 5, 2009 at 2:50 PM, Dr. Loboto drlob...@gmail.com wrote: Error in code. missed } in beforeFilter. Sorry, It is on next row. Just cropped it. What do you see in default layout? Error? Or only DUMMY text? STRICT errors( about strftime ) and DUMMY at the end. Never set debug to 0 in

Best Place to Post CakePHP Jobs

2009-10-05 Thread BobbyGriffin
I was wondering if you guys had any advice for the best place to find CakePHP developers. (Note: I am not trying to be spammy and post my job here, but I figured perhaps others could lend some guidance) I am currently trying to fill a CakePHP Developer position, but it seems that 99% of the

Re: Cross-site element with AJAX ? ? ? How can I ? ? ?

2009-10-05 Thread DatacenterHellas
The CakePHP is already installed into the root of my domain ! And the request that I see is this ! ! ! Ok take a look of real responce ! my site run into my computer in Virtual Host under this domain : http://www.rea.dch/ AJAX requests from Firebug when I type my domain like this :

Re: Cross-site element with AJAX ? ? ? How can I ? ? ?

2009-10-05 Thread DatacenterHellas
Problem solved ! ! ! ! I had to add / before the controller name for each AJAX request ! ! ! Thanks for your responces ! ! ! ! ! :D --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this

Re: Javascript cant find XML view data

2009-10-05 Thread Bert Van den Brande
Have you edited your routes.php file to match the pattern '/mycontroller/myfunction/1' ? You need something like this : $Route-connect('/mycontroller/myfunction/*', array('controller' = 'mycontroller', 'action' = 'myfunction')); On Mon, Oct 5, 2009 at 8:12 AM, bRuNuShky marcelo.stan...@gmail.com

Re: Moving webroot outside of the app folder..

2009-10-05 Thread number9
Hi There, Thankyou for the reply - I didn't actually edit that in the end, I managed to get it working following the details of this blog post: http://www.ninjavspenguin.com/blog/2007/01/21/cakephp-install-multiple-subdirectories-500-error/ I also included an index.php with the path to the

Re: WEBHOST limitation installation problems

2009-10-05 Thread Smelly Eddie
I suggets you change your webhost. Mod_rewrite is used by many modern php applications, and any provider worth their salt will allow for it. If you do decide to switch I highly recommend DreamHost. They have great support, shell access, and all the standard apache modules. Use the promo code

Re: secure link using hmtl-link helper..

2009-10-05 Thread iFeghali
that is the only solution i found so far: http://bakery.cakephp.org/articles/view/component-for-forcing-a-secure-connection --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send

Re: sorting records with order by and group by

2009-10-05 Thread Bert Van den Brande
Do you mean that you executed the query from the Cake debug information directly on your mysql-server ? If that is the case I have no idea where the difference in results is coming from ... On Mon, Oct 5, 2009 at 8:32 AM, vekija vedran.konto...@gmail.com wrote: Hi, I'm having a problem with

Image Gallery Design Help

2009-10-05 Thread KevinM2k
Hi, I am creating a custom image gallery, I have categories and sub categories, then images within each one. I am pretty new to cakephp and I am trying to find out how is the best way of dealing with the administration area. For example lets say I create my new photo album under a category of

Re: sorting records with order by and group by

2009-10-05 Thread vekija
yes, that is the case... thanx anyway On Oct 5, 2:55 pm, Bert Van den Brande cyr...@gmail.com wrote: Do you mean that you executed the query from the Cake debug information directly on your mysql-server ? If that is the case I have no idea where the difference in results is coming from ...

Re: cakephp don't execute model trigger plugin's

2009-10-05 Thread Bert Van den Brande
Can't find anything wrong that would relate to LikecontentSection::beforeSave() not being executed. A quick debug using XDebug should help you solve this :) On Sun, Oct 4, 2009 at 4:29 PM, AgBorkowski andrzejborkow...@gmail.comwrote: for eg. ?php class SectionsController extends

SSL and hosting setup

2009-10-05 Thread designv...@gmail.com
Hi there, Can anyone answer this quick query for me, my hosting has a separate 'httpsdocs' folder for SSL stuff, if I wanted to use SSL within my cake app, using 'requireSecure' how would I go about it? I have it working so it redirects to the 'httpsdocs' directory if I go to an action that is

Different Admin routing based on a role field

2009-10-05 Thread Bidibule
Hi all! I'm in trouble guys ! :) I want to make differents admin routing based on the user role. Mainly, I have 2 roles : admin and logged user So no problem about using Auth Component and the 'admin' prefix for my views. (admin_index eg) But I think it will be cool to have another prefix for

Re: SSL and hosting setup

2009-10-05 Thread Andras Kende
You could ask hosting company to symlink the httpsdocs to httpdocs ... Andras Kende On Oct 5, 2009, at 9:43 AM, designv...@gmail.com wrote: Hi there, Can anyone answer this quick query for me, my hosting has a separate 'httpsdocs' folder for SSL stuff, if I wanted to use SSL within my

paginator, containable - sort() does not work for not directly related fields

2009-10-05 Thread Melanie Sommer
Hello, I have a very nested belongsTo/hasMany structure of my models: A belongsTo C B belongsTo C C belongsTo D D belongsTo E F belongsTo E G belongsTo E In E/index I want to list all E with the respective titles of all related models. EsController looks like this:

Re: Javascript cant find XML view data

2009-10-05 Thread bRuNuShky
Hi, Mmmm ok but this is to redirect the call to an specific controller action... actually its works fine ... outside the javascript call anyway I try what you said but javascript still have problems to find the page... for more details http://mysite.com/mycontroller/myfunction/1 return an

Re: Multiple pagination same view

2009-10-05 Thread Rawna
Hi, I'm also wondering how do you do that? Anyone? On Aug 28, 3:36 am, ML mlaut...@gmail.com wrote: Does anyone know how to have multiple blocks (multiple tables for example) of paginated data on the same page? There seems to be 2 issues: 1) the navigation section ($paginator-next, etc)

Re: Javascript cant find XML view data

2009-10-05 Thread Bert Van den Brande
Have you set debug to 1 or 2 in core.php ? 'Page not found' is the default error message you get from if anything at all goes wrong while rendering the requested page. Setting debug to 1 or 2 will show you more information on the reason why the page can't be rendered. On Mon, Oct 5, 2009 at

Re: Field Naming conventions and hasmany records

2009-10-05 Thread brian
On Mon, Oct 5, 2009 at 2:52 AM, vekija vedran.konto...@gmail.com wrote: You'll have to save the topic first and then fetch it's id. From the cookbook: If neither of the associated model records exists in the system yet (for example, you want to save a new User and their related Profile

Re: AJAX layout again

2009-10-05 Thread Marcelo Andrade
On Sun, Oct 4, 2009 at 1:51 PM, Cергей Inhbgkbyu rakoth...@gmail.com wrote: (..)  2 class MenusController extends AppController {  7     var $components = array( 'RequestHandler' ); (..)  30     function ajax_test( $par ){  31         $this-layout=ajax; In that case, you don't need to set

Create / Insert / Save from Model

2009-10-05 Thread Dave Maharaj :: WidePixels.com
I have a rather large function during user registration. Depending on the role they are registering as i create records for that specific role populating their profile and additional required tables with id's for the new user. The 2 roles require different tables so i currently have an if

Re: Create / Insert / Save from Model

2009-10-05 Thread Miles J
Of course you can do it from the Model. It doesn't matter where that logic is placed. On Oct 5, 8:51 am, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I have a rather large function during user registration. Depending on the role they are registering as i create records for that

Re: Best Place to Post CakePHP Jobs

2009-10-05 Thread Miles J
You can try www.withcake.com, thats the only other job site I know. On Oct 5, 1:11 am, BobbyGriffin bobbygrif...@gmail.com wrote: I was wondering if you guys had any advice for the best place to find CakePHP developers.  (Note:  I am not trying to be spammy and post my job here, but I figured

Re: Cross-site element with AJAX ? ? ? How can I ? ? ?

2009-10-05 Thread Miles J
So your doing 3 AJAX calls, within another AJAX call? Whats the point of that? On Oct 5, 2:47 am, DatacenterHellas merianosni...@gmail.com wrote: Problem solved ! ! ! ! I had to add / before the controller name for each AJAX request ! ! ! Thanks for your responces ! ! ! ! ! :D

image path in javascript file

2009-10-05 Thread emmexx
I'm trying to use colorpickerjs in cakephp but I have some trouble with the image files used by this tool. http://code.google.com/p/colorpickerjs/ The javascript file of the tool references all images with the following code: this.options = Object.extend({ IMAGE_BASE : img/ },

Re: Different Admin routing based on a role field

2009-10-05 Thread vekija
add this to your router file Router::connect('/user/:controller/:action/*', array('prefix' = 'user', 'user' = true)); this will require your actions in the controller to be prefixed as well. In case you want to share actions between the roles but have separate views, you can add a custom

Re: Javascript cant find XML view data

2009-10-05 Thread bRuNuShky
Hi, Bert Thanks... !!! .. I was using level 1 in debug... but don't consider that up this to 2 will give me any details in this particular case... (I missing the point that although it's call through javascript debug will show somethign) ...also I foget that I set debug to 0 in the

Re: image path in javascript file

2009-10-05 Thread vekija
when you call colorpicker function, add options hash as a second parameter {IMAGE_BASE: 'img/'}. Change the path to one where your images are, but if you store them in your app's image folder it should most likely be /img/. Note the leading and trailing slashes, leading one tells the script to

RequestAction: how to pass form data, form errors and paginate url options FROM along

2009-10-05 Thread j0n4s.h4rtm...@googlemail.com
Hello, I have a ProfilesController that got an action view and a ShoutsController that got the actions index and shouts // In ProfilesController function view($id = null) { if (!$id) { $this-Session-setFlash(__('Invalid Profile.', true));

Re: RequestAction: how to pass form data, form errors and paginate url options FROM along

2009-10-05 Thread brian
Ordinarily, I'd suggest you dump the requestAction() calls and put the logic in your model and call it from there. But you need to paginate, so it has to be in the controller. In that case, you could put the pagination logic in ProfilesController. As for the shout_to() method, you could probably

Re: RequestAction: how to pass form data, form errors and paginate url options FROM along

2009-10-05 Thread brian
On Mon, Oct 5, 2009 at 2:47 PM, brian bally.z...@gmail.com wrote: Ordinarily, I'd suggest you dump the requestAction() calls and put the logic in your model and call it from there. But you need to paginate, so it has to be in the controller. In that case, you could put the pagination logic in

Re: Access Classes In Layout Help??

2009-10-05 Thread hahmadi82
How would I request action on the update_select function below which is in my cars_controller? I'm not sure how you requestAction inside the ajax-observeField call: $yearoptions = array('url' = 'update_select','update' = 'years'); echo $ajax-observeField('makes',$yearoptions); brian-263

Re: RequestAction: how to pass form data, form errors and paginate url options FROM along

2009-10-05 Thread j0n4s.h4rtm...@googlemail.com
First of all thanks for your efforts, then I have to add that I want direct calls to work so all three should work: a.) /profiles/view/5 b.) /shouts/shout_to/5 c.) /shouts/index a.) should just include b.) and c.) without code duplication... and that's why I went for requestAction. If I cannot

Fields in a form

2009-10-05 Thread Dave Maharaj :: WidePixels.com
Is there a way to get a list of fields in a form when a page is loaded? I would like to (try) to build my own custom component for AJAX forms to check form fields. I tried pulling code from the security component with no luck. Any ideas? Thanks Dave

Re: image path in javascript file

2009-10-05 Thread emmexx
On 5 Ott, 19:12, vekija vedran.konto...@gmail.com wrote: when you call colorpicker function, add options hash as a second parameter {IMAGE_BASE: 'img/'}. Change the path to one where your images are, but if you store them in your app's image folder it should most likely be /img/. Thank you

Re: Access Classes In Layout Help??

2009-10-05 Thread hahmadi82
Nevermind, I got it all to work. Thank you guys a ton! I learned so much and I finally achieved what I was looking for. One last question if it's not too much a bother... Our website uses JQuery and for this ajax observeField thing to work I use a javascript-link('prototype'). However, if

Re: Fields in a form

2009-10-05 Thread Miles J
I don't think there is a way to do that (or atleast I dont know how to). However you can check the _Token index within the Session and decrypt is using the same methods that Cakes Security component does. On Oct 5, 2:50 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: Is there a

Re: Field Naming conventions and hasmany records

2009-10-05 Thread #2Will
OK, cool thanks. The comment is saving properly now. so i have this: echo $form-textarea('ForumComment.comment', array('rows'=5)); if ($form-isFieldError('ForumCommentComment')){ echo $form-error('ForumCommentComment'); } if the comment

Are Hashed values unique?

2009-10-05 Thread Jas
I've got an Email confirmation/validation process working for new users, the user receives an email with a link and this link has a hash value. I am just wondering if it were possible that one word could have the same hash as another? Using either of these hash methods sha1/sha256/md5? If so

PHP tracking when an external domain uses an image from your server

2009-10-05 Thread Dustin
I've tried searching for this but no luck, please let me know if you've seen this posted before. I want to let some other sites use my images. (http://example.com/ sample.jpg) and keep track of each time they use the image. So I write track.php to save the request into a DB, then return the

regardin options and default

2009-10-05 Thread $$$
add function in the controller:- $userid = $this-Session-read('UserId'); $this-set(compact('userid')); add.ctp echo $form-input('submitted_by',array('options'=$managers,'default'= $userid)); echo $form-input('submitted_by',array('options'= $managers,'default'='$userid')); this

ACL Issue.. aros_acos table

2009-10-05 Thread Ryan Maule
Hello, I am having trouble with setting up ACLs. My aros and acos tables are properly set up, from what I can tell. I have an admin user that is working correctly. I have a regular user that isn't working.. it only gets access to the index view if _read, _create, _update, _delete are all set

Bug? - Accessing Deep Model Relations In Plugins

2009-10-05 Thread MeanStudios
Greetings, I'm not sure if this is a bug or not but here it goes. If I have 3 models (Layout, Template, Page). Layout has many Page and Template. Page and Template have only one Layout. If I am in the PagesController and I do something like $this-Page-Layout-findById ($id) it should return an

RE: Are Hashed values unique?

2009-10-05 Thread Dave Maharaj :: WidePixels.com
You can use $this-data['User']['confirm_code'] = string::uuid(); The uuid is a 128bit string in the format of 485fc381-e790-47a3-9794-1337c0a8fe68 http://book.cakephp.org/view/573/uuid Dave -Original Message- From: Jas [mailto:mciver.ja...@gmail.com] Sent: October-05-09 11:15 PM

Email error

2009-10-05 Thread Dave Maharaj :: WidePixels.com
I get this error when sending an email with bcc Warning (2) javascript:void(0); : Invalid argument supplied for foreach() [CORE/cake/libs/controller/components/email.php, line 714] $this-Email-delivery = 'smtp'; $this-Email-to = $this-data['User']['email']; $this-Email-bcc =

Creating New User from Separate Controller

2009-10-05 Thread CharlesTMunger
I have a users controller using Auth. I have a add function in the user form which successfully adds users using Auth. I need to be able to add a user from within a separate controller. I.e., I have PaymentController which has function AddPayment. When Payment info is submitted, it contains

Re: Excluding a node from a tree, and adding a parent node

2009-10-05 Thread Rawna
Wow this is very helpful, thanks! On Oct 4, 5:51 pm, brian bally.z...@gmail.com wrote: On Sat, Oct 3, 2009 at 10:44 PM,Rawnaasumaw...@gmail.com wrote: Hi, I'm using Cake's Tree bhavior and I got a couple of questions: 1. How do I exclude a node when generating a a tree list? (i.e. using

Re: How do you install Cake PHP?

2009-10-05 Thread Jenny Caldwell
Thanks so much for your help! On Oct 3, 2:12 pm, Miles J mileswjohn...@gmail.com wrote: Well CakePHP is a framework, its not a script like Wordpress you can install. All you do is move all the files and folders to a destination on your server and setup everything manually. The install

Re: image path in javascript file

2009-10-05 Thread Dr. Loboto
$options = $javascript-object(array ('IMAGE_BASE' = $html-url('/js/ colorpickerjs/img/'))); On Oct 6, 4:52 am, emmexx emmeics...@gmail.com wrote: On 5 Ott, 19:12, vekija vedran.konto...@gmail.com wrote: when you call colorpicker function, add options hash as a second parameter {IMAGE_BASE:

Different Validation for same model.

2009-10-05 Thread #2Will
Hi all, Is it possible to have different validation for a form for the same model, depending on circumstance. ? eg, if a user leavers a comment when not logged in, entering their email address is required - but when logged in it isn't. So in the Admin area, i don't want to require it

Re: Access Classes In Layout Help??

2009-10-05 Thread Bert Van den Brande
It probably is a $ conflict. Try assigning $j or something like that to the JQuery var and see if it resolves your problem. For reference : http://docs.jquery.com/Using_jQuery_with_Other_Libraries On Tue, Oct 6, 2009 at 12:15 AM, hahmadi82 hahmad...@gmail.com wrote: Nevermind, I got it all