Validation

2009-06-22 Thread Nate Brunette
When I validate the cakephp.org pages, it comes back with html and css errors. I was hoping to start developing with cakephp, but I don't think I will be able to if it creates validation errors like this. Any reason for this? --~--~-~--~~~---~--~~ You received thi

JqCMS

2009-06-22 Thread thedilab
I am developing a jQgrid based Content Management System which is using Cakephp as the backend framework. I have put up a project page at http://www.the-di-lab.com/?page_id=47. And I am looking forward your advices and help on this project. And Hope I can make something useful and handy for all

Cake causes CPU Spike

2009-06-22 Thread PD
Hello Everyone, I am developing a simple cake application which is causing CPU spikes. I dont know what I am doing wrong. I have pasted my controller code below. class DatasyncController extends AppController { public $uses = array('LiveServer', 'LivePhone', 'SyncLog', 'Server', 'Phone

Disabling default cakephp routes

2009-06-22 Thread Novice Programmer
Hello Guys, I am having an EntitiesController with an action view which expects the uid as a parameter(uid of the entity to be viewed). I have created a route in the configuration file for this situation like: Router::connect('/:entity_uid', array('controller' => 'entities', 'action' => 'view'),

An example of a Facebook Connect Integration to a cakePHP app ?

2009-06-22 Thread Ashu
I am looking to use facebook connect to my cakePHP based app. Is there any tutorial or example for the same. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email

Re: automatically adding a

2009-06-22 Thread lefty
If only i had a clue what you mean !? :) in the first controler you want to save the second ? thx anyway lefty --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to

Custom app, Expiring logins help

2009-06-22 Thread Louie Miranda
Guys, Where do I need to place a filter that if... if ($username == OK) { if ($expiration < date_required) { proceed } else { issue error } } else { invalid login } Will I place this on the app_controller.php? and use beforefilter() ? -- Louie Miranda (lmira...@gmail.com) http://www

Re: German Umlaut in form->end

2009-06-22 Thread Braindead
Thanks for the help. I guess it's a problem with the encoding, because either "Löschen" nor "Löschen" work. :-( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cak

RE: Makes no sense

2009-06-22 Thread Dave Maharaj :: WidePixels.com
I actually added the percent to the db, but even though it works its not the best solution as this is a search function so a user searches and the results each get a percent inserted into the dbbut that seems like a lot of overhead for the db...constantly updating the percent field every time

Re: Makes no sense

2009-06-22 Thread kdubya
Dave, Keep in mind that Paginate is like doing a $this->Model->find(). The options setup in the $paginate variable in the controller are setting up the arguments to a find-like SQL query on your database. Every time a new page is requested (by the user clicking on the next page link) causes a new

How to paginate w/ a hasMany condition

2009-06-22 Thread Kyle Decot
I am building a search form and I want the user to be able to select a checkbox to only show results that has photos. My model uses a hasMany = ("Photo"); How do I write my conditions array? I've tried the following but get an "Invalid use of group function". $conditions [] = "COUNT(Photo) > 0";

Using cake bake,finding .profile file

2009-06-22 Thread keanoppy
" On the PC, it will depend on what console application you’re running (e.g., C:\msys\1.0\etc\)." i'm using windows xp...can't find this .profile file to use the bake feature any help? --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Makes no sense

2009-06-22 Thread Dave Maharaj :: WidePixels.com
I am doing 2 things to an array: combine 2 single arrays into one array matching up the keysworks perfect then sort the combined array based on the percent $combined = Set::sort($combined, '{n}.percent', 'DESC'); then extracting id in the sorted order from the combined array before sendi

Code Snippets for Gedit

2009-06-22 Thread cem
Any one has the code snippets for Gedit ? I searched the interenet but the only link I found is Broken . And the site is down . --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, s

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

Re: transactions + redirect doesn't work!

2009-06-22 Thread Adam Royle
What I am saying is you can't redirect to another page in the same transaction. If you really need to do something over multiple page loads, then you should save this data in temporary tables or in the session, and then add it all to the real tables on the final page. Transactions are meant to

Re: German Umlaut in form->end

2009-06-22 Thread Mark
just encode all your templates with utf8 and you can normally type "äöü" etc On 22 Jun., 19:37, Carlos Gonzalez Lavin wrote: > To be a bit more file text-encoding safe, u could use the html entity ö > > 2009/6/21 AD7six > > > > > On Jun 21, 5:50 pm, Braindead wrote: > > > Hi, how can I use a G

Re: transactions + redirect doesn't work!

2009-06-22 Thread Marcel
Mateo San Román wrote: > Thank you for you quick answer. > Any way to do that operation in a standard way? Depending on what you like to do put the SQL in a model. I think/hope that cake does not make new connections for each model method call ;) --~--~-~--~~~---~--

Re: transactions + redirect doesn't work!

2009-06-22 Thread Mateo San Román
Thank you for you quick answer. Any way to do that operation in a standard way? Thanks, Mateo On 22 jun, 00:45, "Adam Royle" wrote: > Yes. You must start and end atransactionwith the same mysql connection. > MySQL connections are automatically closed once the page has finished > executing. Ared

Re: Dynamic use of MySQL views

2009-06-22 Thread VisionIzoizo
Adam, you genius, it works perfectly, thanks a lot! Cheers to you man, Mauro On Jun 19, 2:32 am, Adam Royle wrote: > Does this work? > > $this->Item->setSource($locationId.'_items'); > > Cheers, > Adam > > On Jun 19, 12:43 pm, VisionIzoizo wrote: > > > Hi, I have one big table named 'items'. I

Re: make form at flash

2009-06-22 Thread taufiq ridha
Did it possible too, if we used for as2 carlos? thanks On Jun 23, 2:59 am, taufiq ridha wrote: > Hai carlos, can u give me something details info for do that, > some tutorial link maybe, that's will be great, > i don't know befor that is possible to make login form from flash, but > still used a

Re: make form at flash

2009-06-22 Thread taufiq ridha
Hai carlos, can u give me something details info for do that, some tutorial link maybe, that's will be great, i don't know befor that is possible to make login form from flash, but still used auth component from cakephp, thanks On Jun 23, 12:42 am, Carlos Gonzalez Lavin wrote: > Of course it ca

autocomplete result list scroll focus

2009-06-22 Thread Adriano Varoli Piazza
Using the ajax helper to provide an autocomplete list of results, and giving a result list back as the rendered view, if you use the mouse (and even the mouse wheel) to scroll results, all is well. Using the arrow keys, on the other hand, has the nasty effect of awkwardly scrolling the view: if I

pre production check off list

2009-06-22 Thread justclint
I remember seeing a check off list of things to do before making your app live (ie: set degub to 0). But I cant seem to find it anymore. Can some one point me in the right direction where this info is. Thanks! Clint --~--~-~--~~~---~--~~ You received this message

Order by question

2009-06-22 Thread Dave Maharaj :: WidePixels.com
I have an array which I have re-ordered to meet the sites needs after a find so it now looks like this: Simply page Id's Array ( [0] => 4 [1] => 52 [2] => 50 [3] => 48 [4] => 43 [5] => 41 [6] => 38 [7] => 36 [8] => 16 [9] => 47 [10] => 46 [11] => 37

Re: How to to something after successful login (like callback) ?

2009-06-22 Thread u2ix
> seehttp://book.cakephp.org/view/395/autoRedirect > > regards, > > AD oh much thanks. i wonder why I never saw that. But now it works, wonderful thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group.

Re: automatically adding a

2009-06-22 Thread Carlos Gonzalez Lavin
Im a bit of a newbie to cake... but im guessing this could work after u save the First: $new_thing = array('Second' => array('first_id' => $this->First->id)); $this->Second->save($new_thing); 2009/6/19 lefty > > how to automatically create() a "thingy" :) in another model ? > > Say you have 2

Re: app attempting to insert records rather than update

2009-06-22 Thread Jon Chin
Thanks, Brian for all your input. I agree, the code was pretty difficult to understand. After spending tons of time staring at the code, I realized there was a simpler and more correct way to do it. I rewrote it and it's working for the most part now. I still have to work out a few kinks, t

Re: make form at flash

2009-06-22 Thread Carlos Gonzalez Lavin
Of course it can, google as3 and urlrequest (which is a type of as3 object used for this)... you pritty much just specify the url you're sending the stuff to, the sending method (POST in this case), each var your sending and the value. 2009/6/22 taufiq ridha > > Hello, guys... > anyone any advic

CakePHP Freelance Programmer opportunity (Argentina)

2009-06-22 Thread CONNAXIS - Santiago Pauni
Connaxis (http://www.connaxis.com) is looking for Senior CakePHP programmers for a freelance project of up to 160 hrs., in Buenos Aires to end August 1st 2009. The workplace would be our offices downtown, and you should also have advanced experience with XHTML/CSS and jQuery, and preferrably knowl

Re: German Umlaut in form->end

2009-06-22 Thread Carlos Gonzalez Lavin
To be a bit more file text-encoding safe, u could use the html entity ö 2009/6/21 AD7six > > > > On Jun 21, 5:50 pm, Braindead wrote: > > Hi, how can I use a German Umlaut in form->end('Löschen')? > > You've accidentally pasted the answer in your question > > > --~--~-~--~~---

Re: open $html link in new window

2009-06-22 Thread Carlos Gonzalez Lavin
Cheats against stuff that should work and doesn't (like IE css cheats), that's all good (would be better to just throw IE away altogether... if only), but IMO those guidelines were made by the w3c for a reason... it is actually a bit annoying to have another tab open when the user prolly didn't wan

Re: conditions with date in hasMany

2009-06-22 Thread brian
On Mon, Jun 22, 2009 at 12:44 PM, abest11 wrote: > > I understand that I can specify conditions when I do a find call. > But I want it to filter the associated model automatically. > > If I am misunderstanding, can you explain what the use of the > 'conditions' key is in the hasMany association as

Re: conditions with date in hasMany

2009-06-22 Thread abest11
I understand that I can specify conditions when I do a find call. But I want it to filter the associated model automatically. If I am misunderstanding, can you explain what the use of the 'conditions' key is in the hasMany association as described here http://book.cakephp.org/view/82/hasMany On

Re: conditions with date in hasMany

2009-06-22 Thread brian
You shouldn't have conditions in there. You're describing an association between 2 models, not options for eg. pagination. Jobs that are > 2 weeks old should still be associated with Recruiter (I'm guessing is the other model). Put those conditions in the controller's $paginate var or whatever fi

Re: Problem with Media Plugin of David Persson

2009-06-22 Thread davidpersson
Have a look at the Attachment Model's validation property. To make http transfers work you must explicitly allow all http transfers by specifying 'http://' in the location validation rule or - if you only want to allow transfers from certain domains - use 'http:// example.org' instead. var $va

RE: Array Help

2009-06-22 Thread Dave Maharaj :: WidePixels.com
Thanks... Works like a charm! Had to change it to: $combined = array(); foreach ($id as $key=>$value) { $combined[$key] = array('id'=>$value , 'percent'=>$percent[$key]); }

Re: view not echoing

2009-06-22 Thread brian
On Sun, Jun 21, 2009 at 1:20 PM, dflow wrote: > > i have done some tutorials > the scaffold works fine > > when i want to create my own view > nothing is echoed here is the controller: >  class ProductsController extends AppController { >  var $name = 'Products'; > >  //var $scaffold; >  function

Re: open $html link in new window

2009-06-22 Thread brian
On Mon, Jun 22, 2009 at 11:24 AM, Carlos Gonzalez Lavin wrote: > That's just cheating the validation... the idea of forcing links to open on > an external page breaks some usability/accesibility guidelines (specifically > the fact that the user should be the one deciding where he wants to opens >

conditions with date in hasMany

2009-06-22 Thread abest11
Hi, Im a newbie to Cake, so apologies in advance if this is a silly question. I am trying to use a simple hasMany model association with a condition on a date field, so that only "Jobs" created in the last two weeks are returned. In my model, I have: var $hasMany = array( 'Job' => array

Re: Blog tutorial - I get a blank page

2009-06-22 Thread cshehadi
This was resolved finally. the problem was that we still had an old rpm of mod_auth_mysql on our RedHat ES 3 server. Apparently this was causing some sort of conflict with php 5.2.9. I'm not entirely sure what the conflict is, but removing the rpm from our system resolved the problem and CakeP

Re: open $html link in new window

2009-06-22 Thread Carlos Gonzalez Lavin
That's just cheating the validation... the idea of forcing links to open on an external page breaks some usability/accesibility guidelines (specifically the fact that the user should be the one deciding where he wants to opens his links), which is why it was left out of the xhtml specification. 20

Re: view not echoing

2009-06-22 Thread Pablo Viojo
try it! debug($products); Saludos, Pablo Viojo pvi...@gmail.com http://pviojo.net (#260 y creciendo!) Ayudar nos hace felices! http://needish.com - http://helperman.org On Mon, Jun 22, 2009 at 4:53 AM, dflow wrote: > > i get > >

Re: tableCells and bgcolor doesn't work for me

2009-06-22 Thread nsens...@hotmail.com
I've tried in both ways and nothing happens, maybe I'm thinking that I'm using the default cakephp template and it has its own styles, and the new row style it's not recognize by cake On Jun 19, 10:22 am, Rick wrote: > Looking at the docs for $html->tableCells the call is expecting all of >

Multiple tree's

2009-06-22 Thread Mech7
Is it possible to have multiple trees with the behaviour like doctrine has: http://www.doctrine-project.org/documentation/manual/1_1/en/hierarchical-data#nested-set:multiple-trees --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

Re: Bootstrap variable

2009-06-22 Thread Stu
I know that you probably set that variable up in Bootstrap for a good reason, but for Conventions over Configuration you should (if possible) set this up in the app_controller: $site_new = '/'.$_SERVER["HTTP_HOST"].'/abc'; $this->set('site_new', $site_new); --~--~-~--~~~-

Re: handling MySql errors

2009-06-22 Thread toka...@gmail.com
Hi Richard, thanks for your post. Now I realize that it may be more user friendly to not display that button and it will avoid all that stuff. Thanks Tomas On Jun 22, 3:04 pm, Richard wrote: > Hi - IMO, the best approach is to check for child records before you attempt > to delete the parent da

app cannot find CakePHP controller?

2009-06-22 Thread Ernesto
hello. i'm getting a weird error that i can't resolve... here's my routes.php config (comments removed) 'orders', 'action' => 'index')); ?> here's the response from mywebserver/ordersapp (app root) Missing Controller Error: CakePHPController could not be found. Error: Create the class Ca

Re: Array Help

2009-06-22 Thread kdubya
Try something like this (assuming the two arrays you mentioned are called $id and $percent respectively): $combined = array(); foreach ($id as $key=>$value) { $combined[$key] = array('id'=>$value), 'percent'=>$percent[$key]); } --~--~-~--~~~---~--~~ You received

Re: handling MySql errors

2009-06-22 Thread Richard
Hi - IMO, the best approach is to check for child records before you attempt to delete the parent data. I would even go as far as doing this before even rendering the delete link, preventing your end user trying to do something they can't in the first place. For what its worth, I personally prefer

Re: Bootstrap variable

2009-06-22 Thread Stu
You could try: define('site_new', '/'.$_SERVER["HTTP_HOST"].'/abc'); or, I'm pretty sure you read config vars like this: Configure::read('site_new'); http://book.cakephp.org/view/42/The-Configuration-Class#read-413 Good luck! --~--~-~--~~~---~--~~ You received

handling MySql errors

2009-06-22 Thread toka...@gmail.com
Hi, I am wondering how to handle and recognize MySQL type of errors...in cake. For EXAMPLE.. I have integrity checks (ON DELETE) designed on DB server - when I do delete on some item who has its childs...it is not allowed by DBso in debug mode in cake i get following.. SQL Error: 1451: Cann

Re: who is 'Cake' : some basic oop cake nonunderstanding

2009-06-22 Thread lefty
hi ken. yes it does :) thx --~--~-~--~~~---~--~~ 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+unsubs

Re: set not working

2009-06-22 Thread andy
Is 'type' a possible value for $this->params['action']? Rather than setting the 'test' variable, have you tried to echo something from that action just to be sure the routing is correctly taking you to there? On Jun 21, 6:37 pm, thatsgreat2345 wrote: > When I use $this->set in my controller it d

make form at flash

2009-06-22 Thread taufiq ridha
Hello, guys... anyone any advice for make login form with flash, and cake php, or simple thing makes flash can POST some variable to cakephp? Thanks for advance :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Problems with saving data through an associated model

2009-06-22 Thread logout
Hi folks, I have this problem: When I save through the model like this: $this->CurrencyRate->save($rate); (in the CurrencyRates controller) I get this resulting SQL statement: INSERT INTO `currency_rates` (`currency_id`, `rate`, `created`) VALUES (10, 1.15, 'here goes the current timestamp an

Re: Problem with Media Plugin of David Persson

2009-06-22 Thread byqsri
This is the $validationErrors: Array ( [Photo] => Array ( [file] => location ) ) On 20 Giu, 15:36, davidpersson wrote: > Hi Marco, > > You did the right thing with changing the format of $this->data, > because the hasOne Relationship needs it to be in that form

Re: view not echoing

2009-06-22 Thread dflow
i get the hello echo and underneath Array what should i see with the debug? On Jun 22, 7:59 am, Pablo Viojo wrote: > debug(...) is your friend! always! > Saludos, > > Pablo Viojo > pvi...@gmail.comhttp://pviojo.net > (#260 y creciendo!) > > --

Re: slug of choice

2009-06-22 Thread aman batra
No, Actually what i was saying is that i generate slug with the Title of the post. Now say i have another page from where i will redirect user to the post action page by taking the name of the user. How can i make the name as the Uid of the post and title remains unchanged as in above example it r

Re: slug of choice

2009-06-22 Thread Fran Iglesias
El 22/06/2009, a las 9:03, aman batra escribió: > What should be the approach over this.. I m using the sluggable > behavior to generate the slug for the post. Perhaps... - make the slug field editable in the ass/edit actions - If the slug field is left blank by the user, create the slug pro

slug of choice

2009-06-22 Thread aman batra
Hello, I am using the title of any post to act as a slug for the post but now I want to add a functionality that user can use anything he likes as the slug of his post without changing the title of the post For example :- www.abcd.com/beautiful-life is the slug which gets generated now and "beau