Re: model associated to the same model

2010-07-26 Thread LunarDraco
http://book.cakephp.org/view/851/Multiple-relations-to-the-same-model On Jul 26, 1:03 am, danix wrote: > ok! I will try it. > > Thanks! > > On 26 jul, 00:41, cricket wrote: > > > On Sun, Jul 25, 2010 at 11:34 AM, danix wrote: > > > Hello, > > > > I've two models: User and Group. Users can be "

Re: Display images outside webroot folder

2010-07-26 Thread LunarDraco
When the images are uploaded do you save any information into your db that associates to the filename on disk? If you do you could use that model's controller and an action like getimage and then use the media helper to return the file. as in myapp/users/getimage/somename This can further be enh

Cant access admin

2010-07-26 Thread Dave Maharaj
No matter what I try I can't access any admin/anything HTTP response is always Failed to load source for: http://sitebuild/admin/users I am logged in, echoed out admin session data so the login works but redirect does not $this->Auth->loginRedirect = array('admin' => true, 'controller' => 'port

Re: CakeFest 2010 - Last chance for cheap tickets!

2010-07-26 Thread Graham Weldon
The early bird prices have come to an end. http://cakefest.org/posts/view/post-12/The_early_bird_gets_the_chop Our accommodation bundle tickets are limited, and we don't have a lot left! So if you planned to come and take advantage of the accommodation bundle, I would suggest you do so as soon as

Re: how to paginate results using ajax

2010-07-26 Thread Vinicius Núñez
Thanks, Norman! I'm going to try it! On 26 jul, 15:35, Norman Paniagua wrote: > Its the same if you paginate a normal web only that you use a javascript > function (i recommend jquery.ajax) and in the controller change the layout > to render the result. > --- > > Norman Paniagua > > 2010/7/26 Vi

Re: PHP 5.2 no longer supported (Implications for cake 2.0) ??

2010-07-26 Thread nurvzy
I agree, it does feel soon, but hopefully this will push [serious] hosting companies to upgrade their PHP installs to 5.3.x, which is a good thing IMHO. On Jul 26, 5:19 pm, cricket wrote: > On Mon, Jul 26, 2010 at 8:21 AM, keymaster wrote: > > I saw this today on php.net: > > > =

how to catch data from table?

2010-07-26 Thread Persivo Cunha
Hi everyone I am doing an add view for 'projects'. An project could have several researchs. This form has a table. In that table, there is a button to add new researchs. After click on add, i open a modalbox, i select an research and i add him to table. All that works fine. After adding, i must f

Re: PHP 5.2 no longer supported (Implications for cake 2.0) ??

2010-07-26 Thread cricket
On Mon, Jul 26, 2010 at 8:21 AM, keymaster wrote: > I saw this today on php.net: > > = > PHP 5.2.14 Released! > > [22-Jul-2010]  This release marks the end of the active support for > PHP 5.2. Following this release the PHP 5.2 series will receive no > f

Re: HABTM Saving

2010-07-26 Thread Norman Paniagua
Try $data['User']['id'] = 1010; $data['Profile'][0]['id'] = 1234; $data['Profile'][1]['id'] = 5678; foreach ($data['Profile'] as $i=>$v): $data['Profile'][$i]['user_id'] = $data['User']['id']; endforeach; $this->User->save($data); $this->User-->Profile->saveAll($data); I dont know if do

Re: Display images outside webroot folder

2010-07-26 Thread cricket
On Mon, Jul 26, 2010 at 7:56 AM, rez...@gmail.com wrote: > thanx > > the project files structure > / > /webroot > /userFiles > /controllers > /models > /vendors > .. > .. > etc > > is userFiles folder outside document root ? Yes, the "root" of your site is the webroot dir (hence the name). Anythi

Login Redirect

2010-07-26 Thread Dave Maharaj
I am upgrading from 1.2 to 1.3 and when I try to login I get redirecting forever message. I never changed anything from 1.2 to my 1.3 version so maybe someone can point out my error. Core.php Configure::write('Routing.prefixes', array('admin')); User_controller.php function login() {

HABTM Saving

2010-07-26 Thread sanedevil
For my problem, a User HABTM Profiles A user can select multiple profiles via a screen. I get these values in my controller. I want to "link" all these profiles with the user. Currently i'm doing: $profile_1['Profile']['id'] = 1234; //the profile id $profile_1['Us

deconstruct problem

2010-07-26 Thread simon...@terra.com.br
Hi, I did download the version 1.2.3.8166 of CakePHP. It doesn't allow the cleanUpFields method. I tryied to use this "$this->Metodologia->deconstruct("Metodologia", $this->data['Metodologia']['metodologia']);" for editing a field. My array is this: Array ( [Metodologia] => Array (

Re: how to paginate results using ajax

2010-07-26 Thread Norman Paniagua
Its the same if you paginate a normal web only that you use a javascript function (i recommend jquery.ajax) and in the controller change the layout to render the result. --- Norman Paniagua 2010/7/26 Vinicius Núñez > I'd like to know how to paginate results using ajax, e.g., to paginate > comm

how to paginate results using ajax

2010-07-26 Thread Vinicius Núñez
I'd like to know how to paginate results using ajax, e.g., to paginate comments of a post, as on youtube. class Comments extends AppController { var $name = 'Comments'; } class Comment extends AppModel { var $name = 'Comment'; } class Posts extends AppController { var $name = 'Posts'; } clas

Re: PHP 5.2 no longer supported (Implications for cake 2.0) ??

2010-07-26 Thread Larry E. Masters
CakePHP 2.0 will still work with PHP 5.3. There will not be namespaces or other features of PHP 5.3 in the release. -- Larry E. Masters On Mon, Jul 26, 2010 at 7:21 AM, keymaster wrote: > I saw this today on php.net: > > = > PHP 5.2.14 Released! > >

Re: Getting duplicate result when using paginate

2010-07-26 Thread WhyNotSmile
Thanks for that. Adding in 'DISTINCT' worked... but there is no duplication in the database (id is a unique field). I'm now doing: $userlist = $this->User->find('all', array('conditions' => array('group_id' => 1), 'fields' => array('DISTINCT User.id'))); and that's working fine. However, whe

Re: Element caching using memcache

2010-07-26 Thread Andy Gale
On Mon, Jul 26, 2010 at 1:31 PM, majna wrote: > Andy Gale, > you can't cache elements  and views in cache engine (1.2 or 1.3, > because Cache::read() and Cache::Write is not even used here). > It requires refactoring cache() and clearCache() functions > (basics.php) to implement memcache. > > Also

Re: Element caching using memcache

2010-07-26 Thread majna
Andy Gale, you can't cache elements and views in cache engine (1.2 or 1.3, because Cache::read() and Cache::Write is not even used here). It requires refactoring cache() and clearCache() functions (basics.php) to implement memcache. Also, clearCache() calls form Model class deletes all cached ele

PHP 5.2 no longer supported (Implications for cake 2.0) ??

2010-07-26 Thread keymaster
I saw this today on php.net: = PHP 5.2.14 Released! [22-Jul-2010] This release marks the end of the active support for PHP 5.2. Following this release the PHP 5.2 series will receive no further active bug maintenance. Security fixes for PHP 5.2 might b

Re: Display images outside webroot folder

2010-07-26 Thread Mike Karthauser
On Mon, July 26, 2010 12:56 pm, rez...@gmail.com wrote: > thanx > > the project files structure > / > /webroot > /userFiles > /controllers > /models > /vendors > .. > .. > etc > > is userFiles folder outside document root ? > > whats can I do to make a separated image folder for users ? make a fo

Re: Display images outside webroot folder

2010-07-26 Thread rez...@gmail.com
thanx the project files structure / /webroot /userFiles /controllers /models /vendors .. .. etc is userFiles folder outside document root ? whats can I do to make a separated image folder for users ? On Jul 26, 2:42 pm, Andy Gale wrote: > On Mon, Jul 26, 2010 at 12:37 PM, rez...@gmail.com wro

Re: Display images outside webroot folder

2010-07-26 Thread Andy Gale
On Mon, Jul 26, 2010 at 12:37 PM, rez...@gmail.com wrote: > In my application I upload images in folder outside webroot called > userFiles - in the same level of webroot - and I can't display these > images using html helper > image('/userFiles/my_pic.png')?> > as cake consider all images url in w

Display images outside webroot folder

2010-07-26 Thread rez...@gmail.com
In my application I upload images in folder outside webroot called userFiles - in the same level of webroot - and I can't display these images using html helper image('/userFiles/my_pic.png')?> as cake consider all images url in webroot img Any help plz Check out the new CakePHP Questions site htt

Re: Is there a way to validate cvv of a credit card? on the API it's only the card number?

2010-07-26 Thread Matthew Porter
I think you'll find the CVV must be validated with the card issuer. It's not a simple calculation like CC numbers... HTH On Jul 26, 4:01 pm, Louie Miranda wrote: > I am checking the API for 1.3 and googling some examples if there is a way > for cakephp core to check on the cvv of a credit card nu

Problem with Cake Console

2010-07-26 Thread Mariano C.
I'm trying to setup Acl, so i've to use shell script, but this don't work cause can't establish connection with DB. I've launched sudo -s ./cake bake then typed D for database configuration, setting up parameters and then saved the info in: /Applications/MAMP/htdocs/cakephp/app/config/ database.p

Re: unbindModel not working

2010-07-26 Thread lazlo2019
LOL. Well done. It does first time round, but I had assumed 'my' call to it didn't. Clearly I was wrong. Cheers. On Jul 25, 5:33 pm, cricket wrote: > On Sun, Jul 25, 2010 at 12:25 PM, lazlo2019 wrote: > > Thanks for your reply. > > > I am aware of the behaviour you describe. However, as you can

Re: Object Not Found : Cake 1.3

2010-07-26 Thread Dr. Loboto
It's not routes, it's absence of or not enabled mod_rewrite. http://book.cakephp.org/view/917/Apache-and-mod_rewrite-and-htaccess On Jul 25, 4:43 pm, parag wrote: > I have created a UsersController inside users_controller.php, along > with User class as a model in user.php. > > My Routes config

Re: model associated to the same model

2010-07-26 Thread danix
ok! I will try it. Thanks! On 26 jul, 00:41, cricket wrote: > On Sun, Jul 25, 2010 at 11:34 AM, danix wrote: > > Hello, > > > I've two models: User and Group. Users can be "parent" or "son". > > A parent can have many sons. And a son can belong to one parent. > > > Can I use "hasAndBelongsToMa

Re: COUNT between two Models

2010-07-26 Thread hunny
Check this link http://book.cakephp.org/view/1033/counterCache-Cache-your-count On Jul 26, 8:07 am, saavedrajj wrote: > Hi everybody, I have 2 models: Restaurant and Zone > > app/models/restaurant.php > class Restaurante extends AppModel { > >         var $name = 'Restaurant'; > >         var $b