_selectedArray missing from cakePHP 1.2?

2008-06-19 Thread alan
It would appear that the function -_selectedArray() is missing from cakephp 1.2 How should I gather the selected options for a HABTM association then? === cakephp 1.1 examples: === http://api.cakephp.org/1.1/class_controller.html#9acfedd26fc4259442b36690862115ee $this-set('cCategories',

Dynamic Javascript hasMany Form Fields

2008-06-19 Thread Duro
Alright. So up until now I have been super happy with Cake vs. Ruby on Rails. I have found an equivelent, or often better way of doing things. But now I'm stuck. I'm trying to create a form which is for a model that hasMany WebAddresses. I'm trying to use javascript to give the user the ability

Re: Question about Containable behavior..

2008-06-19 Thread Sudhir Porwal
@ Smelly_Eddie Thanks for the reply but It wouldn't help. I specifically mentioned the use of containable behavior Smelly_Eddie wrote: Absolutely. $this-tble1-recursive=1; $this-findAll('`tablw2`.`f1` LIKE \'%$val1.%'\' etc. ') On Jun 18, 2:00 am, jaanu2121 [EMAIL PROTECTED] wrote:

SessionHelper::check

2008-06-19 Thread raynor21
Hello all, I'm new here and to CakePHP! I keep running into the error: Warning (512): Method SessionHelper::check does not exist [CORE/ cake/libs/view/helper.php, line 148]. Any ideas on how to fix this? Thank you! --~--~-~--~~~---~--~~ You received this message

SessionHelper::check

2008-06-19 Thread raynor21
Hello all, I'm very new to CakePHP, and I am getting: Warning (512): Method SessionHelper::check does not exist [CORE/cake/libs/view/ helper.php, line 148]. Does anyone know how to fix this? Thank you. --~--~-~--~~~---~--~~ You received this message because you

SessionHelper::check

2008-06-19 Thread raynor21
Hello all, I'm new here and to CakePHP! I keep running into the error: Warning (512): Method SessionHelper::check does not exist [CORE/ cake/libs/view/helper.php, line 148]. Any ideas on how to fix this? Thank you! --~--~-~--~~~---~--~~ You received this message

Re: Empty session files with session.auto_start 1

2008-06-19 Thread xvaib
I updated from 1.2.0.6311 beta to 1.2.0.7125 RC1 and it now works with either session.auto_start 1 or session.auto_start 0. I don't know what changed between the two updates but it's ok for now :) Thanks to the Cake dvp team. On Jun 18, 6:13 pm, xvaib [EMAIL PROTECTED] wrote: Hello, I must

Re: Sharing tmp with other applications

2008-06-19 Thread acoustic_overdrive
Hi Dave, Thanks for the tip - I didn't realise that. I will give that a try. If I set that do you think the TMP constant is ignored? or is it still used for logs? Jamie On Jun 17, 9:05 pm, DaveMahon [EMAIL PROTECTED] wrote: Actually, there's an even easier way - and the official one to boot!

then use ajax upload file (jquery form), and set content-type utf-8 return data come in tag pre

2008-06-19 Thread rhrn
then i use ajax upload file (jquery form), and set content-type utf-8 return data come in tag pre there i can fix it? thx --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send

Re: New server where strings get utf8 encoded before being saved to MySQL. Any hints for me?

2008-06-19 Thread [EMAIL PROTECTED]
Thought that, for reference, I'd add some of the things that is needed when converting an existing app/database to utf-8 (utf8). Actually altering the table definitions, and connection configurations does not save data already inserted when the charset was set all wrong. How to convert existing

Re: 1.2 RC1 Release Notes - wood and trees

2008-06-19 Thread leo
When the trunk is updated there has been an announcement made here on the list as well as the bakery.  The latest announcement, a link to which is posted here and on the main page of the cakephp site... That's okay if you were looking when the link was posted or if you know where else to look

Re: Hansel and Gretel do Cake

2008-06-19 Thread leo
That's great! Just what I'm looking for. Thanks. --~--~-~--~~~---~--~~ 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

Re: Problem with hasOne and belongsTo using non-standard foreignKeys

2008-06-19 Thread Robert
My bad - stupid mistake. Thanks for help! Robert On 18 Cze, 20:18, floob [EMAIL PROTECTED] wrote: Hey Robert, You've got it a bit backwards.  If Item contains all the foreign keys, then Item _belongsTo_ ItemType and ItemStatus.  Type and Status would both haveOne Item  From the book's

Re: email headers visible in content of message?

2008-06-19 Thread Pierre MARTIN
Hello aranworld, I've got the same kind of problem (http://bin.cakephp.org/view/ 743099631). Thus I'm interested in your solution ... and if this is a bug to fix, I hope somebody will read these page. If somebody needs further information, I'll be there. Pierre MARTIN On 18 juin, 18:08,

Re: Sharing tmp with other applications

2008-06-19 Thread Marcin Domanski
can't you just symlink the directories ? On Thu, Jun 19, 2008 at 10:02 AM, acoustic_overdrive [EMAIL PROTECTED] wrote: Hi Dave, Thanks for the tip - I didn't realise that. I will give that a try. If I set that do you think the TMP constant is ignored? or is it still used for logs? Jamie

Re: Sharing tmp with other applications

2008-06-19 Thread acoustic_overdrive
Hi Marcin, Sorry I'm not that up to speed with linux filesystems but I'll have a go at explaining... The files are stored on an NFS server which has two mountpoints on the webserver, one of which is writable (where my tmp stuff is) and the other is read-only (where the rest of my application

Re: database question

2008-06-19 Thread dr. Hannibal Lecter
Does this help in any way: http://manual.cakephp.org/view/70/primary-keys-used-as-uuids ? On Jun 18, 7:24 pm, Novice Programmer [EMAIL PROTECTED] wrote: Hello all, This is more of a database question but since this group contains a lot of db experts as well, I am throwing it here as well..

Re: Sharing tmp with other applications

2008-06-19 Thread acoustic_overdrive
Well I asked and no symlinks allowed unfortunately. He says symlinks can be used to gain access to the root of the machine. On Jun 19, 11:02 am, acoustic_overdrive [EMAIL PROTECTED] wrote: Hi Marcin, Sorry I'm not that up to speed with linux filesystems but I'll have a go at explaining...

Re: C(R)UD for LDAP Data Source

2008-06-19 Thread Toppka
Hi, Thanks a lot! It' works :) Problem was in $useTable value (not mentioned in blog post at all). Name of the model added to search string if it's empty and therefore ldap_search() returns empty set. By the way, $additionalFilter not applicable to version of ldap source from you blog,

Re: AppController methods in CakePHP 1.2

2008-06-19 Thread Aidan Lister
So renaming / deleting this file should be documented at http://book.cakephp.org/edit/18/application-extensions ? I hope the cakephp developers understand the security implications of this change ... The majority of authentication models used in CakePHP relied on AppController's beforeFilter ...

Re: AppController methods in CakePHP 1.2

2008-06-19 Thread AD7six
On Jun 19, 12:33 pm, Aidan Lister [EMAIL PROTECTED] wrote: So renaming / deleting this file should be documented athttp://book.cakephp.org/edit/18/application-extensions? don't touch the cake folder and no. I hope the cakephp developers understand the security implications of this

Re: Redirect to current - multiple actions on page

2008-06-19 Thread [EMAIL PROTECTED]
Hi, Just to make sure: You have tried the AuthComponent in CakePHP? It redirects you back to the last page visited automatically. It uses the referer value and should not direct you back to an ajax-snippet but to the last proper url (as seen in the browsers address bar). If it does not do what

Re: Broken CSS after uncommenting App.baseUrl

2008-06-19 Thread Jasp182
I hate to say it, but I think the answer is that you no longer need to un-comment that line: config/core.php Configure::write('App.baseUrl', env('SCRIPT_NAME')); I think the latest version just works out of the box without mod_rewrite. I didn't find it documented anywhere, and I would think

Re: AppController methods in CakePHP 1.2

2008-06-19 Thread dr. Hannibal Lecter
I think it's quite possible that these things happen because people forget to clear their app cache, not because cake has a bug. It seems highly unlikely that this sort of thing will happen only to the few and after update. On Jun 19, 12:33 pm, Aidan Lister [EMAIL PROTECTED] wrote: So renaming

Re: Redirect to current - multiple actions on page

2008-06-19 Thread [EMAIL PROTECTED]
Hi Martin, Thanks for the reply. I am using the Auth component, but the problem is that my login action is in an Ajax updated lightbox. When the login tries to redirect from that lightbox, it only redirects within the lightbox, not the whole page. Do you know if this is possible? Thanks! On Jun

Strange 404 Error

2008-06-19 Thread Abhimanyu Grover
I'm trying to access a URL, on which Cake shows me a 404. Its a bit strange behavior... URL is http://localhost/my_project/controller1/function1/param1/gigapromoters.com%2Fblog Whenever param2 is an encoded URL it shows me the 404, but when its a simple string or something it would work fine,

Re: Redirect to current - multiple actions on page

2008-06-19 Thread dr. Hannibal Lecter
I think you will need to create your own handler for that. For example, you might do something like document.location.href = document.location.href; to refresh the page after you receive response from your AJAX login. On Jun 19, 2:33 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Martin,

Re: Redirect to current - multiple actions on page

2008-06-19 Thread [EMAIL PROTECTED]
I got it sorted!! I overlooked the fact that I only need to know the previous URL in my login and logout actions. So I don't need to set the URL for each controller action, I just use $this- redirect($_SERVER['HTTP_REFERER']) instead. Much easier! Thanks for the replies! On Jun 19, 1:39 pm, dr.

Re: Importing a helper

2008-06-19 Thread Chris Hartjes
On Wed, Jun 18, 2008 at 9:15 PM, Turnquist, Jonah [EMAIL PROTECTED] wrote: I do not understand I did not give an answer I gave another question, the question mark indicating that. Does the RAM not effect performance? also, it does not matter if the database is slower than the loading of

Re: Redirect to current - multiple actions on page

2008-06-19 Thread dr. Hannibal Lecter
You can also use $this-redirect($this-referrer()): http://api.cakephp.org/class_controller.html#e87c8e6edf53aadc511e3d050d71a494 On Jun 19, 2:46 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I got it sorted!! I overlooked the fact that I only need to know the previous URL in my login and

Root URL when not using mod_rewrite

2008-06-19 Thread acoustic_overdrive
I'm re-coding a site to work without mod_rewrite, and have come across one problem: I need to use absolute URLs because the generated code is going into HTML emails, and I've been using $html-url('/',true) to generate an absolute URL to the base of the site, and then appending image names which

Re: email headers visible in content of message?

2008-06-19 Thread ianh
Now you come to mention it, I get exactly the same thing as listed in http://bin.cakephp.org/view/743099631 where emails sent as text include headers. No idea why at the moment! ianh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Ajax in Cakephp

2008-06-19 Thread joselee
I have an ajaxed Cakephp 1.1 application, I want to move it into cakephp 1.2.0.71 to enjoy new features, I get some Javscript error each time i load the application, could it be the versions of the scriptaculous 1.8.1 and prototype 1.6.0.1 libs, please help

Re: Does SimpleTest v1.01 break Test Suite v1.2.0.0??

2008-06-19 Thread mGee
Thanks for submitting the ticket. I had no idea that there WAS in fact a bug or it was something that I was doing wrong, so submitting a ticket didn't make much sense to me until I knew for sure. Thanks again. Peace Mike On Jun 18, 4:08 pm, Chris Hartjes [EMAIL PROTECTED] wrote: On Wed, Jun

Re: Does SimpleTest v1.01 break Test Suite v1.2.0.0??

2008-06-19 Thread mGee
Thanks barduck. Peace Mike On Jun 18, 4:01 pm, barduck [EMAIL PROTECTED] wrote: Well, I can't help much because I am also currently having a lot of problems with the test suite, so for what it's worth - I think SimpleTest 1.0.1 works because many of the tests do pass without errors.

Re: Ajax in Cakephp

2008-06-19 Thread Chris Hartjes
On Thu, Jun 19, 2008 at 8:19 AM, joselee [EMAIL PROTECTED] wrote: I have an ajaxed Cakephp 1.1 application, I want to move it into cakephp 1.2.0.71 to enjoy new features, I get some Javscript error each time i load the application, could it be the versions of the scriptaculous 1.8.1 and

Re: Does SimpleTest v1.01 break Test Suite v1.2.0.0??

2008-06-19 Thread Chris Hartjes
On Thu, Jun 19, 2008 at 8:19 AM, mGee [EMAIL PROTECTED] wrote: Thanks for submitting the ticket. I had no idea that there WAS in fact a bug or it was something that I was doing wrong, so submitting a ticket didn't make much sense to me until I knew for sure. Thanks again. There's no harm

Re: Dynamic Javascript hasMany Form Fields

2008-06-19 Thread francky06l
Seems the solution would be to leave an empty block, maybe with an hidden field in every block. When deleting, remove all fields from block, except the hidden one.. Not sure I correctly understood the problem though.. On Jun 19, 3:51 am, Duro [EMAIL PROTECTED] wrote: Alright. So up until now I

Strange server environment variables (ORIG_SCRIPT_NAME vs PHP_SELF)

2008-06-19 Thread Jon Arne
I was seeing some very strange routing behavior yesterday, when i tried to upload an update of my cake application to my production server. I went trough the regular mod_rewrite and index.php dance, but couldn't find out what was wrong since the old version of my application is still working,

Re: email headers visible in content of message?

2008-06-19 Thread aranworld
Well, good to know I'm not alone! When I send email from my local computer via SMTP, I don't get this problem, but when I send it from my remote host using whatever mailer they have, that is when I get the problems cropping up. -Aran On Jun 19, 5:59 am, ianh [EMAIL PROTECTED] wrote: Now you

application design issues [modular structure with view caching]

2008-06-19 Thread gbk *
hi, and sorry for my bad english. my application has common parts which are visible on each page or a group of pages (search box, login / logout menu, etc.). i've implemented them using app_controller beforeRender with view elements. it works well and i think it's flexible because of object

Wiki

2008-06-19 Thread koko
Hello, could anyone reupload or recreate this page http://groups.google.com/group/cake-php/web/create_a_wiki_with_cakephp.zip I need these files ... thanks for the help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: reset Session variables without any visible cause

2008-06-19 Thread Yuriy K.
The same problem... It's happening when I have broken images (with 404 response code) on the page. When there are no 404's -- everything is fine. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To

Re: Darkauth failing on 1.2 RC1

2008-06-19 Thread theChrisWalker
The error is saying that $this-controller-{$this-user_model_name} is not an object. This means that the value of $this-user_model_name is not the correct name of the User model in your controller, or that your controller has not loaded the User model. Someone else has emailed me with a

Re: 1.2 RC1 Release Notes - wood and trees

2008-06-19 Thread theChrisWalker
You would have to be beyond the need for release notes to extrapolate this comment from that document: Please read the release notes regarding LIKE and other SQL operators. That should be:  $conditions = array(or=(array( 'edifici LIKE %?%' = $searchText, 'adreca

Re: database question

2008-06-19 Thread Novice Programmer
Hello Hannibal, I actually want to store some meaningful text as UUID so that it is search engine optimized. I am taking file names as UUID but then same users can upload files having same name, due to this problem i am finding the UUID in the database to generate a unique filename.. i hope i

Re: Best Upgrade Path

2008-06-19 Thread theandystratton
@leo and @Chris thanks a lot for the input/suggestions. Good call on the diff on files in app/config/ ! On Jun 18, 10:05 am, leo [EMAIL PROTECTED] wrote: Maybe it's naïve of me, but I just copy the new cake directory over the old cake directory (well actually everything but app). I would

Problem with FCKEditor

2008-06-19 Thread Warringer
Hello. I'm a newb in Baking Cakes. :p And I have a problem setting up the FCKEditor in Cake 1.2. I have used the code for setting up FCK from the Bakery (http:// bakery.cakephp.org/articles/view/using-fckeditor-with-cakephp) the version for 1.2 of course. Now I have the problem that the

Newbie (pls help) : Call to undefined method FormHelper::create()

2008-06-19 Thread norbs
Comment: - I followed the online manual in coding the Post Blog example and an error occured in the add view. What is wrong with this code? Please help...!!! Error Report: - Fatal error: Call to undefined method FormHelper::create() in C: \web\www\cake\app\views\posts\add.ctp on line

Re: database question

2008-06-19 Thread Novice Programmer
with respect to users lies another issue.. i want to allow anonymous uploads as well.. Thanks. On Thu, Jun 19, 2008 at 10:07 PM, dr. Hannibal Lecter [EMAIL PROTECTED] wrote: Well, are your user IDs unique? Maybe you can include it somewhere in your file UUID. I'm sorry I don't have a better

2 Applications shared/seperate databases.

2008-06-19 Thread Siebren Bakker
I have a website that I am building. It contains 2 cake applications, the main website at http://someiste.com, and a beta version of the website at beta.somesite.com. Each of these websites are currently accessing the same tables from the same databse. I would like to split some of the tables to

Re: Strange 404 Error

2008-06-19 Thread b logica
I think it's likely that there's an error somewhere. Try setting debug to 2. When it's set to 0 you'll get 404s whenever an error occurs. On Thu, Jun 19, 2008 at 8:35 AM, Abhimanyu Grover [EMAIL PROTECTED] wrote: I'm trying to access a URL, on which Cake shows me a 404. Its a bit strange

Re: Importing a helper

2008-06-19 Thread Turnquist, Jonah
Ok, thanks man. I will try out your method again when I get back from weight training class. Jonah On Jun 19, 5:48 am, Chris Hartjes [EMAIL PROTECTED] wrote: On Wed, Jun 18, 2008 at 9:15 PM, Turnquist, Jonah [EMAIL PROTECTED] wrote: I do not understand I did not give an answer I gave

Re: email headers visible in content of message?

2008-06-19 Thread b logica
Are both computers using the same OS? I wonder if the problem is with newlines Windows. On Thu, Jun 19, 2008 at 10:09 AM, aranworld [EMAIL PROTECTED] wrote: Well, good to know I'm not alone! When I send email from my local computer via SMTP, I don't get this problem, but when I send it

Help with changing a little piece of markup

2008-06-19 Thread Vlad
I can't believe FormHelper gives you so much control over markup except a little thing called the error message. I have wasted three hours now trying to figure out how to make the generated error message's markup from div class=error-messageMessage/div to li class=errorMessage/li. That's all that

Re: Darkauth failing on 1.2 RC1

2008-06-19 Thread Mark Davis
Hi Chris, I've had this same error with DarkAuth, and it appears the component variables aren't being set. For example, in the startup method for the component the controller and here variables should be set: $this-controller = $controller; $this-here =

Re: email headers visible in content of message?

2008-06-19 Thread aranworld
In my case the emails look good when they are sent from the Windows machine, but look bad when sent from a Linux machine. To make matters more confusing, I don't see the headers in Yahoo mail, but I do see them in gmail and outlook. -Aran On Jun 19, 10:12 am, b logica [EMAIL PROTECTED] wrote:

Re: Help with changing a little piece of markup

2008-06-19 Thread gbk *
have you tried $form-error with wrap option? from the api docs: 'wrap' mixed Whether or not the error message should be wrapped in a div. If a string, will be used as the HTML tag to use. On jún. 19, 19:11, Vlad [EMAIL PROTECTED] wrote: I can't believe FormHelper gives you so much control

Re: Sharing tmp with other applications

2008-06-19 Thread Stephen Orr
I can't be the only one thinking this while reading this thread - but it sounds like the server operator is excessively paranoid, keeping the system locked down far beyond what it needs to be. I'd suggest finding an alternate place to host your sites, it just sounds like this is going to cause

Re: Help with changing a little piece of markup

2008-06-19 Thread Vlad
Thank you. Worked like a charm. I have another question though, related to errors. In the cookbook it says that if you want to use error messages using L10n, then you need to define them in the view, on the 'error' option of the field. The problem is, when I do this the only thing that happens

Re: HABTM on multiple DB

2008-06-19 Thread floob . spam
You can set which Database a Model uses in the Model itself, using the $useDbConfig variable. http://book.cakephp.org/view/66/models#usedbconfig-435 . On Thu, Jun 19, 2008 at 8:33 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is it possible set a HABTM relation between table on different

FormHelper select range

2008-06-19 Thread nnj
Hi Guys, I have several form elements of the type: select from 1 to 99. Is there a way to generate a select element without having to list 99 integers? i.e. start: 1, end: 99, increment: 1 Thanks! --~--~-~--~~~---~--~~ You received this message because you are

Re: FormHelper select range

2008-06-19 Thread Samuel DeVore
yes - On Thu, Jun 19, 2008 at 10:59 AM, nnj [EMAIL PROTECTED] wrote: Hi Guys, I have several form elements of the type: select from 1 to 99. Is there a way to generate a select element without having to list 99 integers? i.e. start: 1, end: 99, increment: 1 Thanks!

Re: FormHelper select range

2008-06-19 Thread Joel Perras
http://ca.php.net/range $form-input('name', array('type'='select', 'options'=range(1,99,1))); Remember that CakePHP is still PHP, just nicer ;-) -Joel. On Jun 19, 1:59 pm, nnj [EMAIL PROTECTED] wrote: Hi Guys, I have several form elements of the type: select from 1 to 99.  Is there a way

complex findAll()

2008-06-19 Thread Fahad
i wil make it easy by showing an example. lets say, i have only 5 records in my database table. and they all have an ID field of 1, 2, 3, 4, and 5. i want the findAll() to work in such a way so that i can start the number of records at a given ID. for example, i want the records returned by

Re: Darkauth failing on 1.2 RC1

2008-06-19 Thread Mark Davis
It appears the controller bug has been fixed in the latest nightly build of CakePHP. On Jun 19, 1:47 pm, Mark Davis [EMAIL PROTECTED] wrote: Hi Chris, I've had this same error withDarkAuth, and it appears the component variables aren't being set. For example, in the startup method for the

Model::validates 'message' not being used when invalid and related issue

2008-06-19 Thread BrendonKoz
I'm having issues with my custom validation method in one of my models. I'm attempting to save multiple records from a single form at the same time using Transactions. In my call to saveAll in my controller, I have also tried setting the 'options'['validate'] parameter to 'only' for testing.

Re: complex findAll()

2008-06-19 Thread Joel Perras
A similar question had been posed on the mailing list a week or so ago: http://tinyurl.com/467kx7 The short answer is that if you are using MySQL, you can use ORDER BY FIELD(id, 2,3,4,5,1). -Joel. On Jun 19, 5:17 pm, Fahad [EMAIL PROTECTED] wrote: i wil make it easy by showing an example.

Re: Sharing tmp with other applications

2008-06-19 Thread acoustic_overdrive
Well I must admit I'm wondering why so much fuss, but this application was commissioned to run on their internal network and so unfortunately I have no choice but to comply! I decided against changing the path in Cache::config in the end, because logs and my thumbnail cache also need to be

Re: Darkauth failing on 1.2 RC1

2008-06-19 Thread uniacid
Still seem to be having the issue, I tried updating through svn (@ rev 7217) but I don't think it's fixed my particular issue. Chris I'm using this in my dark_auth component var $user_model_name = 'User'; for my user model name and models/ user.php: ?php class User extends AppModel { var

Re: 2 Applications shared/seperate databases.

2008-06-19 Thread Grant Cox
You could just have a second database connection - to the same database but with a different prefix. Then in the models for the beta site application set the appropriate var $useDbConfig to point to the beta tables. On Jun 20, 2:54 am, Siebren Bakker [EMAIL PROTECTED] wrote: I have a website

how do I handle foreign keys??

2008-06-19 Thread Turnquist, Jonah
I have a 'entries' table and a 'categories' table. I am creating an 'add' page to add a new entry, and I want to be able to select the category that the entry goes into. View: h1Add Entry/h1 ?php echo $form-create('Entry'); echo $form-input('category_id'); echo $form-end('Submit'); ? Model:

Re: how do I handle foreign keys??

2008-06-19 Thread Turnquist, Jonah
Also i should note that right now it's just showing a text box, no drop down --~--~-~--~~~---~--~~ 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

Re: Share Common Code

2008-06-19 Thread Ian Zepp
Pass an object to view that has the methods you need. Ketan Patel wrote: I am baffled right now with a simple question. I want some specific functions to be available in the controllers as well as the views. What's the best way to do this? I don't want to duplicate same code in components as

Missing database table

2008-06-19 Thread KURT
Below is the codes that I have done. ?php class Product extends AppModel { var $name = 'Product'; var $belongsTo = array ('Dealer' = array( 'className' = 'Dealer', 'conditions' = '', 'order'

image upload - anything over than phpThumb

2008-06-19 Thread koala kid
Hi all, I've tired in vain all day to upload an image via a form to my site. I've tried using the phpThumb Component (http://bakery.cakephp.org/ articles/view/phpthumb-component) and also manually via $_FILES. I keep getting an error such as the one below, which is from the component: [0] =

Re: image upload - anything over than phpThumb

2008-06-19 Thread Corie
I would first try testing with no additional components and just use a href=http://us2.php.net/manual/en/function.move-uploaded- file.phpmove_uploaded_file/a. Once you confirm it works start debugging components. I've had success using Image Toolbox, also in the bakery. -Corie On Jun 19, 7:44 

Sub directories within Cake

2008-06-19 Thread Drew
Hi Everyone, I am new to cake and just got my first application up and running. It took me a few hours but I definately see a lot of potential out of this. One thing I was curious about, is it still possible to have subdirectories? One thing I tend to like to do is split the admin folder into

Which find to use on controller?

2008-06-19 Thread Louie Miranda
I am still confused which find* on my controller to use. Basically, all I wanted to do is... $this-set('news', $this-Article-find*($paramsFornews)); $this-set('article', $this-Article-find*($paramsForarticle)); $this-set('gallery', $this-Article-find*($paramsForgallery)); Array ( [0] = Array

Re: Which find to use on controller?

2008-06-19 Thread Louie Miranda
Anyway.. tried this.. $this-Post-find('articles', array('conditions'= array('Post.category_id' = 1))); But, could not get the correct parameters working. I'll check again the book. On Fri, Jun 20, 2008 at 11:09 AM, Louie Miranda [EMAIL PROTECTED] wrote: I am still confused which find* on my

Re: Which find to use on controller?

2008-06-19 Thread Chris Hartjes
On Thu, Jun 19, 2008 at 11:17 PM, Louie Miranda [EMAIL PROTECTED] wrote: Anyway.. tried this.. $this-Post-find('articles', array('conditions'= array('Post.category_id' = 1))); But, could not get the correct parameters working. I'll check again the book. $this-Post-find('all',

Validate doesn't work on User model?

2008-06-19 Thread calzone
This is strange. And I'm convinced there must be a typo somewhere, but I'm not seeing it. I'm on 1.2 and the symptoms are: var $validate works just fine on another model I have, Rating, for a ratings table. var $validate doesn't work at all on my User model: var $validate = array( 'username'

Re: Which find to use on controller?

2008-06-19 Thread Louie Miranda
Thanks! I also tried this and it did work. $this-set('articles', $this-Post-findAllBycategoryId(1)); $this-set('publications', $this-Post-findAllBycategoryId(2)); $this-set('news', $this-Post-findAllBycategoryId(4)); Louie On Fri, Jun 20, 2008 at 11:24 AM, Chris Hartjes [EMAIL PROTECTED]

Re: Sub directories within Cake

2008-06-19 Thread Daniel Hofstetter
Hi Drew, I think you are looking for routes: http://book.cakephp.org/view/39/configuration#routes-configuration-46 Hope that helps! -- Daniel Hofstetter http://cakebaker.42dh.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the