Validate $html->radio how to ?

2007-07-13 Thread salahuddin pasha (salahuddin66)
hello there, I am trying to validate radio (where I did not set any default value) Gender: radio('Bloodbank/gender',array('Male','Female')) ?> tagErrorMsg('Bloodbank/gender', 'gender is required') ?> in model var $validate = array(

Re: bug either in expects function or recursive -- not sure where

2007-07-13 Thread Grant Cox
Expects has a second parameter, which is whether the associations are returned to normal after the next query using them. Set this to false, as your deep recursive causes a number of findAll calls to be made. --~--~-~--~~~---~--~~ You received this message becaus

Re: Cache Elements for Different Users

2007-07-13 Thread Humble Groups
Awesome. I was looking for a way to do that. Thanks for the input. On 7/5/07, Ketan Patel <[EMAIL PROTECTED]> wrote: > > > Found a way to do it using cake without modifying the core libs. This > is a workaround, but does the job. > > $this->element('tagCloud', array('cache'=>'+1 day', 'plugin'=> >

Re: Using renderElement with Smarty

2007-07-13 Thread Humble Groups
You should use like this {$view->renderElement()} or {$view->element()} renderElement is a method in View Class, if you access $this in smarty template it will be pointing to Smarty object. On 7/13/07, poncjusz <[EMAIL PROTECTED]> wrote: > > > Does anyone know how to use method renderElement i

Re: Cache Elements for Different Users

2007-07-13 Thread Ketan Patel
Well, technically when you cache something, you are creating a cache file which is a static html file. So if you have 1,000 users then it would create 1,000 separate cache files. This would not slow down if you have enough space on machine, as you would read in one file only per user. It is advisa

Re: PHP 4 = Dead

2007-07-13 Thread CraZyLeGs
Yep. On 13 juil, 22:07, Felix Geisendörfer <[EMAIL PROTECTED]> wrote: > > PHP 4 = Dead > > We'll talk in 2 years again when PHP4 is still holding the major market > share. > > -- Felix > -- > My Blog:http://www.thinkingphp.org > My Business:http://www.fg-webdesign.de > >

Nested Lists

2007-07-13 Thread ablock
I have the following structure articles that have a topic and an author and I would like to display this in a nested list with the following structure: Topic --Author --article --article ... ... ... Just using MySQL I would do this using a group_by's and group_concat's and have

Re: Redirect after authentification?

2007-07-13 Thread Vincent Fleuranceau
On 13 juil, 23:51, kionae <[EMAIL PROTECTED]> wrote: > I just store it in a session variable. Any function that requires a > user to be logged in gets a line fo code like: > > $this->Session->write('redirect', '/forums/index'); > $this->checkSession(); > $this->Session->delete('redirect'); > Th

Re: Advanced config problem

2007-07-13 Thread CakeSpork
Hey, I had been struggling with this this week, though my errors lay somewhere else for the majority of the time. You seems to have some weird setup here, though it might very well be me. dirname($X) gives the directory name of $X, so (dirname(DS."work".DS."agroec".DS."trunk") doesn't do what you

Re: PHP 4 = Dead

2007-07-13 Thread Felix Geisendörfer
> PHP 4 = Dead We'll talk in 2 years again when PHP4 is still holding the major market share. -- Felix -- My Blog: http://www.thinkingphp.org My Business: http://www.fg-webdesign.de Mech7 wrote: > Well allmost in december it is no longer supported. > > http://php.net/ >

Re: Different layout for admin route?

2007-07-13 Thread Travis Cline
On Jul 12, 6:07 pm, Geoff Ford <[EMAIL PROTECTED]> wrote: > I would use a beforeFilter and test for $this->params['admin']; > > function beforeFilter(){ > if (isset($this->params['admin'])) { > $this->layout = 'admin_layout_name'; > } > > } > > Geoff > --http://lemoncake.wordpress.com Yea

Re: Redirect after authentification?

2007-07-13 Thread kionae
I just store it in a session variable. Any function that requires a user to be logged in gets a line fo code like: $this->Session->write('redirect', '/forums/index'); $this->checkSession(); $this->Session->delete('redirect'); This results in the user either getting redirected to the login page

Caching Several Elements On A Home Page Based Upon The User...

2007-07-13 Thread inVINCable
Hey guys, I have set up my home page with 4 elements (this uses four request actions as well) and I have been reading the groups, and the tutorial on the bakery about how elements should be cached to prevent less strain on the server. The problem with my cached elements are, that they are generate

Undefined variable: paginator

2007-07-13 Thread Contrid
Hi there, I'm getting the error : Undefined variable: paginator I have an element. Inside this element, I use requestAction(); to call upon a Controller action. This action checks if it was requested by check for $this -> params['requested']. If it was requested, it simply returns the data. Pro

PHP 4 = Dead

2007-07-13 Thread Mech7
Well allmost in december it is no longer supported. http://php.net/ Today it is exactly three years ago since PHP 5 has been released. In those three years it has seen many improvements over PHP 4. PHP 5 is fast, stable & production-ready and as PHP 6 is on the way, PHP 4 will be discontinued.

Re: Cache Elements for Different Users

2007-07-13 Thread inVINCable
Ketan Patel, I am attempting to do the exact same thing and am running into trouble. How exactly are you setting the $userid variable? What I have done is in my view, set it up like this, $session->read('User.id), so the user id is set there, and then something like $this- >element('tagCloud', arr

Re: Bakery Article : How to use ACL in 1.2.x

2007-07-13 Thread cakeFreak
Great Article! I was just wondering whether instead of building the aros for every single user, it is possible to build the aros (and then acos) for user groups instead. You get the usergroup from the Auth->user session data, ACL checks if the group of that user is allowed a specific ACo and so

Re: Bakery Article : How to use ACL in 1.2.x

2007-07-13 Thread francky06l
Thanks a lot. I have also implemented the Auth component and have to enhance it somehow. Maybe I am not very "bright", I understand the concept of "record" access, however it seems that a lot of application uses ACL on Controller/action. Thanks anyway, ACL is a bit tuff to learn, but I am sure th

Advanced config problem

2007-07-13 Thread Cacho
Hi all I'm new to CakePHP and decided to make an "advanced" install following manual instructions because I've all my projects in a folder where I keep it with subversion so, core cake has nothing to do there. Well, I decided to keep cake install in c:\cakephp. My project is in C:\work\agroec\

Redirect after authentification?

2007-07-13 Thread Vincent Fleuranceau
Hi all, I'm new to CakePHP (and MVC in general). And so far I'm very happy wiht it. I've just followed the blog tutorial and I've combined it with the simple authentification example from the manual. It works well so far, but... I would like to know if there is a (simple) way to redirect the us

Re: deleting records using a checkboxes

2007-07-13 Thread Ketan Patel
hashkash wrote: > Hi, > The user selects multiple checkboxes and hits the delete button to > delete. > Thats where i get stuck. > Just to check if i can get the values of the checkboxes i did this. > My checkbox name is the user id itself. > function delete() > { > $j=1; > //print_r((

Re: Bakery Article : How to use ACL in 1.2.x

2007-07-13 Thread Ketan Patel
francky06l wrote: > Great articles, really good timing since I am investigating the ACL in > 1.2. > > I have seen in the db_acl.php a AcoAction object, but no idea to use > it. I want to use ACL to control the access to controller/action, > however the "actions" defined in the acos_aros table doe

HTTP_ACCEPT_LANGUAGE and Locale Question

2007-07-13 Thread wilson
Hiya, It seems from reading about translations in the forum, that we're to use the browser's HTTP_ACCEPT_LANGUAGE variable to switch between translations stored in the /app/locale/language/. Correct? This makes sense, but why is the default language in the locale directory 'eng' rather than 'en

Re: Problem with afterFind in model - ~Undefined index ...

2007-07-13 Thread Chris Hartjes
On 7/13/07, oleonav <[EMAIL PROTECTED]> wrote: > > Why this is I don't know, does somebody have any clues? Did you try doing a debug($results) to see what is actually in that array? PHP is quite truthful when it tells you that an index for an array does not exist. -- Chris Hartjes Senior Devel

Re: uploading *.mp3 files 1.2

2007-07-13 Thread Tane Piper
Have you checked your php.ini file? You need to make sure that the Max file size for uploads is high enough for your files. The default is 2mb, so your mp3s are probably bigger than this. There is actually no error checking for this, so it may create a db entry even if the file does not upload

Using renderElement with Smarty

2007-07-13 Thread poncjusz
Does anyone know how to use method renderElement in smarty templates? I'm using SmartyView described in Bakery (http://bakery.cakephp.org/ articles/view/how-to-use-smarty-with-cake-smartyview) but when I try to call: {php} $this->renderElement('element'); {/php} I get Fatal error: Call to undefine

Problem with afterFind in model - ~Undefined index ...

2007-07-13 Thread oleonav
Following examples in the group I added a afterFind function in my Contacts model like this: function afterFind($result){ $result = parent::afterFind($result); foreach($result as $key => $val) { $result[$key]['Contact']['fullname'] = str_replace(' ',' ', $val['Co

Re: uploading *.mp3 files 1.2

2007-07-13 Thread Pablo Viojo
Try debugging the upload process, echo and print_r are very good friends ;) Regards, Pablo On 7/13/07, aerosmith <[EMAIL PROTECTED]> wrote: > > > I've tried this ... bet take a look at the mime types that I added. > > 'audio/mp3' , 'audio/mpeg', 'audio/x-mpeg', 'audio/mp3', 'audio/x- > mp3', 'aud

Re: uploading *.mp3 files 1.2

2007-07-13 Thread aerosmith
I've tried this ... bet take a look at the mime types that I added. 'audio/mp3' , 'audio/mpeg', 'audio/x-mpeg', 'audio/mp3', 'audio/x- mp3', 'audio/mpeg3', 'audio/x-mpeg3', 'audio/mpg', 'audio/x-mpg', 'audio/x-mpegaudio' and in the extension I added '.mp3' Is there something wrong with the mime

Re: php Warnings running locally

2007-07-13 Thread francky06l
Check if the tmp directory exists at the location "D:\INSTANTRAILS\", maybe create it. On Jul 13, 2:58 pm, RVince <[EMAIL PROTECTED]> wrote: > I'm running Cake on my local machine (wherein php has been insrtalled > with, cough, InstantRails) except I have amended the php.ini to be: > > error_repo

Re: uploading *.mp3 files 1.2

2007-07-13 Thread Pablo Viojo
Try setting allowed_mime and allowed_ext options -- Pablo Viojo [EMAIL PROTECTED] http://pviojo.net On 7/13/07, aerosmith <[EMAIL PROTECTED]> wrote: > > > I'm working on a project that enables users to upload articles with > photos and mp3 files. I used the upload behavior to upload the images >

uploading *.mp3 files 1.2

2007-07-13 Thread aerosmith
I'm working on a project that enables users to upload articles with photos and mp3 files. I used the upload behavior to upload the images and create thumbnails ... it worked fine. but it seems that this behavior supports only jpg, gif, and png files. can someone help me please. --~--~-~

How to update a form field using Ajax

2007-07-13 Thread [EMAIL PROTECTED]
Hello guys, I'm new to AJAX so I'd like you to tell me how can I achieve the following using Cake's Ajax helper: I have a search box which returns me a list of coincidences, I have managed to return this list using ajax helper and beside the coincidence entry a radio button in order to select th

Re: soap server

2007-07-13 Thread francky06l
The Rossoft blog http://rossoft.wordpress.com/2006/02/17/web-services-in-cakephp-complex-types/ On Jul 13, 4:16 pm, pigeon <[EMAIL PROTECTED]> wrote: > thanks, i did try google cache but i couldnt retrieve the last file :( --~--~-~--~~~---~--~~ You received this

Re: Bakery Article : How to use ACL in 1.2.x

2007-07-13 Thread francky06l
Great articles, really good timing since I am investigating the ACL in 1.2. I have seen in the db_acl.php a AcoAction object, but no idea to use it. I want to use ACL to control the access to controller/action, however the "actions" defined in the acos_aros table does not fit all the needs. I cou

bug either in expects function or recursive -- not sure where

2007-07-13 Thread bingo
hi bakers, I think I found a bug in model.php. I have table structure as follows blogs -- HABTM -- authors I am trying to build a tree starting from a blog. The tree should look like this Blog (Starting point) |--Author |-- Blog |--Author |--Aut

Re: cakephp 1.2 ACL problem

2007-07-13 Thread Pillow
On 13 Lip, 16:11, Ketan Patel <[EMAIL PROTECTED]> wrote: > I have written an article on 'How to use Acl in 1.2x' which is pending > approval on bakery. I don't know if you could access it, though the > url ishttp://bakery.cakephp.org/articles/view/how-to-use-acl-in-1-2-x > > Let me know if it help

Re: About {n}

2007-07-13 Thread Feris Thia
On 7/13/07, Chris Hartjes <[EMAIL PROTECTED]> wrote: > > Friday is the one day of the week where I try to be not grumpy... ;) You shouldn't then .. ;) Regards, Feris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Being cached ?

2007-07-13 Thread Feris Thia
On 7/13/07, kionae <[EMAIL PROTECTED]> wrote: > > > > I suppose it's worth a shot, if you really think it's something on the > client side. I currently using Opera most of the time. I do download and try Firefox and the view seems ok for edit operation. It did refresh even without autocomplete="

Re: Being cached ?

2007-07-13 Thread kionae
Well, that eliminates the the easy fixes, then. Hmm... The only time I ever had something like that happen with my code was with a password field that FireFox was autofilling with a stored password. I fixed it by setting the autocomplete attribute to off in my form tag, e.g.: I suppose it's

Re: About {n}

2007-07-13 Thread Chris Hartjes
On 7/13/07, Feris Thia <[EMAIL PROTECTED]> wrote: > > > It is very HELPFUL !! > > Thank you Chris for the detail explanation ! > Friday is the one day of the week where I try to be not grumpy... ;) -- Chris Hartjes Senior Developer Cake Development Corporation My motto for 2007: "Just build i

Re: About {n}

2007-07-13 Thread Feris Thia
On 7/13/07, Chris Hartjes <[EMAIL PROTECTED]> wrote:. > > Hope that helps. > It is very HELPFUL !! Thank you Chris for the detail explanation ! wow... doing 2 days intensive learning cakephp and now getting more and more enthusiast with it. Thanks also to the great community it has ! Hope you

Re: ordering items

2007-07-13 Thread Joel Stein
Yeah, I'll have to check out TreeBehavior. I'm sure it's great and all, but to just totally ditch a contributed article without any notification to the author? Kinda lame, imho. I even made a bunch of updates to it, including adding scope, but now I'm hesitant to share it. I suppose I'll take

Re: Being cached ?

2007-07-13 Thread Feris Thia
On 7/13/07, kionae <[EMAIL PROTECTED]> wrote: > > Nothing in particular jumps out at me in the code... have you checked > to make sure that the form data is being stored in $this->data > properly when you submit? No extra or missing arrays within arrays? > Hi kionae, No.. everything is okay. I

Re: About {n}

2007-07-13 Thread Chris Hartjes
It's a notation used by the Set class. Here's an explanation for you, taken from the comments for this post over at "ThinkingPHP and beyond": http://www.thinkingphp.org/2007/02/24/cake-12s-set-class-eats-arrays-for-breakfast/ "{n} indicates that any numerical key will be matched and looped thro

Re: Being cached ?

2007-07-13 Thread kionae
Nothing in particular jumps out at me in the code... have you checked to make sure that the form data is being stored in $this->data properly when you submit? No extra or missing arrays within arrays? On Jul 13, 3:05 am, "Feris Thia" <[EMAIL PROTECTED]> wrote: > On 7/13/07, majna <[EMAIL PROTE

Re: soap server

2007-07-13 Thread pigeon
thanks, i did try google cache but i couldnt retrieve the last file :( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe

Bakery Article : How to use ACL in 1.2.x

2007-07-13 Thread Ketan Patel
Hello All, I have written an article in Bakery on how to use Acl. The url is http://bakery.cakephp.org/articles/view/how-to-use-acl-in-1-2-x I don't know whom to contact for getting the article published. But if some one senior could have a look and let me know the feedback, that would be great.

Re: cakephp 1.2 ACL problem

2007-07-13 Thread Ketan Patel
I have written an article on 'How to use Acl in 1.2x' which is pending approval on bakery. I don't know if you could access it, though the url is http://bakery.cakephp.org/articles/view/how-to-use-acl-in-1-2-x Let me know if it helps you. Ketan --~--~-~--~~~---~--~-

About {n}

2007-07-13 Thread Feris Thia
Hi, What is {n}.Model.field used for ? I find it in generatelist function. Regards, Feris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroup

Re: svn screencast + application deployment

2007-07-13 Thread cakeFreak
Cheers mate for the Capistrano hint! I'll try it out! Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this

Re: When will CakePHP go with full PHP5-powered codebase?

2007-07-13 Thread Chris Hartjes
On 7/13/07, Dinh <[EMAIL PROTECTED]> wrote: > As you may notice, PHP4 is official killed for PHP5 adoption: http://php.net > > So I think it is time to draw a plan to migrate PHP4-compatible CakePHP > codebase to fully PHP5 or PHP6 codebase. I think that lot of > for-compatibility-only code will b

Re: svn screencast + application deployment

2007-07-13 Thread Chris Hartjes
On 7/13/07, cakeFreak <[EMAIL PROTECTED]> wrote: > > Well does Capistrano works even for PHP applications? It does. Here's a link to the best tutorial out there on using Capistrano to deploy your application: http://www.simplisticcomplexity.com/2006/8/16/automated-php-deployment-with-capistran

Re: Cake PHP

2007-07-13 Thread Chris Hartjes
On 7/13/07, badi3 <[EMAIL PROTECTED]> wrote: > > Bonjour, > > Je dois faire le re développement d'un portail web à fort trafic > (1000 de page vu par mois) et je voulais savoir si c'est possible > de gérer ce genre de site avec la framework cakephp. Anything is possible, but there is nothing

Re: Cake PHP

2007-07-13 Thread Gonzalo Servat
On 7/13/07, badi3 <[EMAIL PROTECTED]> wrote: > > > Bonjour, > > Je dois faire le re développement d'un portail web à fort trafic > (1000 de page vu par mois) et je voulais savoir si c'est possible > de gérer ce genre de site avec la framework cakephp. > > > Merci pour votre conseil I love it

php Warnings running locally

2007-07-13 Thread RVince
I'm running Cake on my local machine (wherein php has been insrtalled with, cough, InstantRails) except I have amended the php.ini to be: error_reporting = E_ALL & ~E_NOTICE Yet, when I hit the index.php page that is packaged with Cake (which I have just installed) I get following Warnings, be

Cake PHP

2007-07-13 Thread badi3
Bonjour, Je dois faire le re développement d'un portail web à fort trafic (1000 de page vu par mois) et je voulais savoir si c'est possible de gérer ce genre de site avec la framework cakephp. Merci pour votre conseil Badi --~--~-~--~~~---~--~~ You receiv

Re: Member Methods in Views

2007-07-13 Thread Nick
Cake 1.x does have this wrong although not intentionally, but there is enough flexibility to deal with it. As others noted, it's fundamental to OO design that rather than having functions that are passed data to operate on, the data contains the behaviour and operates upon itself. Message passing

Cake PHP

2007-07-13 Thread badi3
Bonjour, Je dois faire le re développement d'un portail web à fort trafic (1000 de page vu par mois) et je voulais savoir si c'est possible de gérer ce genre de site avec la framework cakephp. Merci pour votre conseil Badi --~--~-~--~~~---~--~~ You receiv

Re: Upload behavior

2007-07-13 Thread AD7six
On Jul 13, 2:47 pm, AD7six <[EMAIL PROTECTED]> wrote: > beforeDelete(&$model) { > if (!parent::beforeSave()) { Holy crossposting typos! beforeSave in both cases for the example. AD --~--~-~--~~~---~--~~ You received this message because you are subscribe

Re: Upload behavior

2007-07-13 Thread AD7six
On Jul 13, 1:38 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote: > On 7/13/07, Gorka <[EMAIL PROTECTED]> wrote: > > > > > imageUpload, videoUpload, docUpload, spreadsheetUpload, ... classes. > > Thoughts? > > IME most often the functions which act on the file at the time of upload are > also ne

Re: cakephp 1.2 ACL problem

2007-07-13 Thread francky06l
If have a difference in my testing for the someone user : $this -> Acl -> Aro -> create(array('parent_id' => 2, 'alias' => 'Someone')); then in the check: $this->Acl->check('Users/Someone', ...); On Jul 13, 1:08 pm, Pillow <[EMAIL PROTECTED]> wrote: > On 13 Lip, 11:39, francky06l <[EMAIL P

Re: Upload behavior

2007-07-13 Thread Gorka
That was my point :) Whatever the nature of the uploaded file is, we might want to act on it differently based on the functionality required by that precise upload operation. That functionality is probably already out there, be it creating a thumbnail, zipping a file or whatever. It is just that

Re: Upload behavior

2007-07-13 Thread Dr. Tarique Sani
On 7/13/07, Gorka <[EMAIL PROTECTED]> wrote: > > > imageUpload, videoUpload, docUpload, spreadsheetUpload, ... classes. > Thoughts? > IME most often the functions which act on the file at the time of upload are also needed in, to coin a phrase, non upload situations. To give an example you create

Re: Error Handling

2007-07-13 Thread Dr. Tarique Sani
On 7/13/07, Ski <[EMAIL PROTECTED]> wrote: > > > With cake I get lots of missing controller and other errors that I > don't wish the public to see - they don't care if it's a missing > controller action or whatever, they just need to see a 404 or a > sitemap. set Debug to 0 and thats what your

Re: Upload behavior

2007-07-13 Thread Gorka
This kind of inheritance would certainly allow the code to be better structured and organized, but still we would need the flexibility to select the kind of processing that should be applied to the files uploaded through the config array, bakers would need to extend imageUpload (or whatever) if th

Error Handling

2007-07-13 Thread Ski
Hi, I am trying to get to the bottom of error handling in cakephp. In previous systems I have worked on I have used set_error_handler to catch php / database errors and email debugging / state information to the site admin, then redirect to a standard error page. With cake I get lots of m

Re: cakephp 1.2 ACL problem

2007-07-13 Thread Pillow
On 13 Lip, 11:39, francky06l <[EMAIL PROTECTED]> wrote: > Using create and save does not seem to fill up the lft / rght fields. No, lft and rght are alright (according to MPTT rules). These are my tables: acos: ++---+---+-++--+-- + | id | pa

Re: Upload behavior

2007-07-13 Thread Tijs Teulings
On 13-jul-2007, at 12:47, Gorka wrote: > >> Or maybe even 'MiUploadBehavior extends UploadBehavior', and a >> call to >> beforeSave{mime}{Type} is made if the method exists etc.. > > Though this might enforce convention over configuration approach, I > see two possible issues with it. First, so

Re: Cake1.2 Validation fails but no messages shown..

2007-07-13 Thread Mike Green
Thanks for your help. Its probably worth me putting something on the trac about it then, unless a kind dev on the list wants to take a look for me :) Best regards Mike On 13/07/07, Dr. Tarique Sani <[EMAIL PROTECTED]> wrote: > > > On 7/13/07, Mike Green <[EMAIL PROTECTED]> wrote: > > > > I'm u

Re: bad images url

2007-07-13 Thread d'plus
On 13 Lip, 11:57, Ski <[EMAIL PROTECTED]> wrote: > Hi, > > Try using the html helper - it takes a path to your image - relative > to webroot/img as the first argument and generates an tag. > > Any attributes you want to set in the tag - border, etc. you > specify using an array as the 2nd

Re: Upload behavior

2007-07-13 Thread Dr. Tarique Sani
On 7/13/07, AD7six <[EMAIL PROTECTED]> wrote: > > > > > On Jul 13, 11:23 am, Gorka <[EMAIL PROTECTED]> wrote: > > I agree that file uploading should be made as generic as possible, and > > enabling some callbacks for file processing should be a great bonus. > > Hmm, > > I'm currently pondering "Ima

Re: Upload behavior

2007-07-13 Thread Gorka
> Or maybe even 'MiUploadBehavior extends UploadBehavior', and a call to > beforeSave{mime}{Type} is made if the method exists etc.. Though this might enforce convention over configuration approach, I see two possible issues with it. First, some file types have several mime types -or better, mime

Re: Cake1.2 Validation fails but no messages shown..

2007-07-13 Thread Dr. Tarique Sani
On 7/13/07, Mike Green <[EMAIL PROTECTED]> wrote: > > > I'm using Development: 1.2.0.5427alpha (July 9, 2007), or at least > thats the tar.gz I downloaded. Is it possible that I've got an out of > date version? I assume there is no newer alpha release so is it > possible that his fixes did not make

Re: When will CakePHP go with full PHP5-powered codebase?

2007-07-13 Thread AD7six
On Jul 13, 12:37 pm, Dinh <[EMAIL PROTECTED]> wrote: > As you may notice, PHP4 is official killed for PHP5 adoption:http://php.net > > So I think it is time to draw a plan to migrate PHP4-compatible CakePHP > codebase to fully PHP5 or PHP6 codebase. I think that lot of > for-compatibility-only c

deleting records using a checkboxes

2007-07-13 Thread hashkash
Hi, The user selects multiple checkboxes and hits the delete button to delete. Thats where i get stuck. Just to check if i can get the values of the checkboxes i did this. My checkbox name is the user id itself. function delete() { $j=1; //print_r(($this->params['form']['check']['3']))

Re: Upload behavior

2007-07-13 Thread AD7six
On Jul 13, 11:23 am, Gorka <[EMAIL PROTECTED]> wrote: > I agree that file uploading should be made as generic as possible, and > enabling some callbacks for file processing should be a great bonus. Hmm, I'm currently pondering "ImageUploadBehavior extends UploadBehavior" where upload behavior

When will CakePHP go with full PHP5-powered codebase?

2007-07-13 Thread Dinh
As you may notice, PHP4 is official killed for PHP5 adoption: http://php.net So I think it is time to draw a plan to migrate PHP4-compatible CakePHP codebase to fully PHP5 or PHP6 codebase. I think that lot of for-compatibility-only code will be dropped and CakePHP will run much faster. Lot of PHP

Re: Paginating the results after creating a dummy model to filter HABTM results?

2007-07-13 Thread AD7six
On Jul 13, 10:39 am, inVINCable <[EMAIL PROTECTED]> wrote: > Hey AD7six, > > I searched the entire model file and several of the main cake files > and cannot seem to find the bindAll parameter you are talking about. bindModel* sorry for the typo, but come on ;) https://trac.cakephp.org/browser

Re: Cake1.2 Validation fails but no messages shown..

2007-07-13 Thread Mike Green
Hi I'm using Development: 1.2.0.5427alpha (July 9, 2007), or at least thats the tar.gz I downloaded. Is it possible that I've got an out of date version? I assume there is no newer alpha release so is it possible that his fixes did not make it into this release? Many thanks Mike On 13/07/07, D

Re: Cake1.2 Validation fails but no messages shown..

2007-07-13 Thread Dr. Tarique Sani
On 7/13/07, Mike Green <[EMAIL PROTECTED]> wrote: > > > HOWEVER > > When I try to create a new channel_action (table2), which also has the > validation set to "VALID_NOT_EMPTY" in the address field, the save > fails BUT no error message are shown! If I put data in the field and > hit save, everythi

Re: bad images url

2007-07-13 Thread Ski
Hi, Try using the html helper - it takes a path to your image - relative to webroot/img as the first argument and generates an tag. Any attributes you want to set in the tag - border, etc. you specify using an array as the 2nd argument. image('ico_comment.png', array('border' => 0)); ?

Re: cakephp 1.2 ACL problem

2007-07-13 Thread francky06l
I did some testing, and using the same method as you did for creating aro / aco. Actually if you create the aro / acos using the console it works. Using create and save does not seem to fill up the lft / rght fields. use the command line for creating aro such as : cake -app 'yourapp' acl create

Helper dynamically loading other helpers

2007-07-13 Thread mac joost
Hi, In my plugin a web-developer can add custom helpers. Therefore I load the needed helpers dynamically. In the controller, this works fine, but now I want to dynamically load other helpers in my main helper. This doesn't work, since the view class loads all helpers before any helper code is exc

Cake1.2 Validation fails but no messages shown..

2007-07-13 Thread Mike Green
Dear all I have a very simple setup, two tables, linked by id: Table 1: (channels): ID, channel_name, source, number Table 2: (channel_actions): ID, channel_id, action, address Table2 links to Table1 through channel_id->id When I add a new channel (table1) I have set the validation to "VALID_N

Re: Upload behavior

2007-07-13 Thread Tijs Teulings
On 13-jul-2007, at 9:12, AD7six wrote: > > On Jul 12, 1:53 pm, Tijs Teulings <[EMAIL PROTECTED]> wrote: > > Hi Tarique, > > The behavior in cheesecake is almost stripped to the bone, and has > some assumptions built in (where the files will go meaning the use of > WWW_ROOT, each file is a foto, th

Re: Upload behavior

2007-07-13 Thread Gorka
I agree that file uploading should be made as generic as possible, and enabling some callbacks for file processing should be a great bonus. I used uploadBehaviour as published in the Bakery for a recent project and -though it really simplified my work- I had to make some adjustments for it to wor

Re: Updating a via ajax, although getLastInsertId() or $this->Comment->id does not retrieve the last inserted record.. why?

2007-07-13 Thread wralph
The last insert id should be set straight after the call to save. What is the SQL output from the call to save? Is the data getting saved correctly? Try assigning it first before using it in the find query like so (shouldn't matter): $last_id = $this->Comment->getLastInsertId(); $this->set('comm

bad images url

2007-07-13 Thread d'plus
I'm using ver. 1.1. I've got problems with images urls. In my default main controller which loads first all images are ok. But when I go into diffrent controller all images on the website are gone. I'm generating image url like this: What I'm doing wrong? --~--~-~--~~~

Re: Paginating the results after creating a dummy model to filter HABTM results?

2007-07-13 Thread inVINCable
Hey AD7six, I searched the entire model file and several of the main cake files and cannot seem to find the bindAll parameter you are talking about. Do I have to modify code somwhere to get it to work somehow? Thank you. On Jul 10, 8:59 am, AD7six <[EMAIL PROTECTED]> wrote: > On Jul 10, 5:22 p

Why I recieved a request /controller/action/favicon.ico?

2007-07-13 Thread hi and hello
And the cakephp give me a url such as metioned above at a request,why? Is there something configured not right? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send emai

Re: Upload behavior

2007-07-13 Thread Dr. Tarique Sani
On 7/13/07, AD7six <[EMAIL PROTECTED]> wrote: > > > > > The behavior in cheesecake is almost stripped to the bone, and has > some assumptions built in (where the files will go meaning the use of > WWW_ROOT, each file is a foto, the format for the name of the thumb > file etc.). For a photo driven s

cacheing a dynamic menu

2007-07-13 Thread Ski
Hi, I am trying to implement caching for my site and one of the major places needing this is the dynamic menu. Because this appears on every page, the model data for the menu is fetched in the AppController and used in an element included by the default layout. How would I go about ensuri

Re: svn screencast + application deployment

2007-07-13 Thread cakeFreak
Sorry for asking twice Chris! I was just curious! Well does Capistrano works even for PHP applications? about "I like to make sure my changes actually work, " If you branch your code via svn, you can work on the devapp, test the changes and then merge/commit them on the trunk only when they w

Re: Being cached ?

2007-07-13 Thread Feris Thia
On 7/13/07, majna <[EMAIL PROTECTED]> wrote: > > Must be something else. Paste controller code. Hi Majna, This is my code == Product->recursive = 0; $this->set('products', $this->Product->findAll()); }

Re: $this->data what are the possibilities

2007-07-13 Thread Preloader
Ahh, I see, misinterpreted your message ... :-) yes, you're absolutely right! Greets, Christoph On 13 Jul., 09:29, AD7six <[EMAIL PROTECTED]> wrote: > On Jul 12, 1:19 pm, Preloader <[EMAIL PROTECTED]> wrote: > > > Thank you AD and keymaster, this helps me out! > > > @AD: Can you tell me, why I

Re: Being cached ?

2007-07-13 Thread majna
Must be something else. Paste controller code. On Jul 13, 4:49 am, "Feris Thia" <[EMAIL PROTECTED]> wrote: > On 7/13/07, kionae <[EMAIL PROTECTED]> wrote: > > > > > Are you sure the database is actually updating, and you're not just > > being redirected to the list view without seeing an error me

Re: Using a Join Table to Join one table?

2007-07-13 Thread AD7six
On Jul 12, 10:18 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm getting fairly confused on how to do the follow so I'm reaching > out and hoping that someone here can either show me how to do this or > help me solve the problem. > > Problem: I'm building a site navigation that is in a

Re: $this->data what are the possibilities

2007-07-13 Thread AD7six
On Jul 12, 1:19 pm, Preloader <[EMAIL PROTECTED]> wrote: > Thank you AD and keymaster, this helps me out! > > @AD: Can you tell me, why I should not use checkboxes instead of > multiple selects? Hi Christoph, I didn't say that. I said that the means to achieve functional multiple checkboxes !=

Empty data return Fatal Error

2007-07-13 Thread Feris Thia
Hi All, I have a controller and view generated with Bake and has modified the add function(). All seems well, but when I have empty data submitted it returns : Notice: Trying to get property of non-object in C:\wamp\www\cake2\cake\libs\controller\controller.php on line 514 Fatal error: Cannot a

  1   2   >