Re: Can i get $webroot for a vendor library?

2006-06-24 Thread RosSoft
A good way to have a component in a view: class ImageComponent extends Object { function startup(&$controller) { $this->controller =& $controller; $this->controller->set('image', $this); } function hello() { return "hi!"; } } it will be available in views: echo $

File uploads, image uploads

2006-06-24 Thread linkingarts
I want to populate a row in a database, and upload an image (into a directory, not the db) from the same form. I'd also like to grab the $_FILES[filename][name] param to go into the database. I have NO idea how to do this in Cake - no problem for me otherwise, but I don't even know where to begin

Re: Cross Database Association

2006-06-24 Thread nate
Once again, this is not a bug in Cake, it is a "feature" in PHP's MySQL library. See the link above for the correct changes to make in your DB config. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" grou

Re: How to update multiple divs with one ajax call

2006-06-24 Thread nate
Okay, this is working fine on the following: PC: Firefox 1.5.0.4 Mac: Firefox 1.5.0.4, and 1.0.7 Clearly there's something else at issue here. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To po

Re: Can i get $webroot for a vendor library?

2006-06-24 Thread ginstrom
Logan wrote: > Because i need to used in the view and/or the controller. Probably i'm > missing something. > I'm kind of new to MVC. If I'm not mistaken, you can access components from the view (just not helpers from the controller). If you are serving an image generated on the fly, you could al

Re: Connecting to the database directly and cron jobs

2006-06-24 Thread Langdon Stevenson
Thanks for all of the feedback. This should solve my problems. Regards, Langdon RosSoft wrote: > Also check > http://groups.google.es/group/cake-php/browse_thread/thread/ff3ad3c9e1e40aab/522fa7b6d6c2c20c?q=cron&rnum=2#522fa7b6d6c2c20c --~--~-~--~~~---~--~~ You

Re: Cross Database Association

2006-06-24 Thread [EMAIL PROTECTED]
I recently had this problem as well. I'm using the newest build. I added alternate db credentials and this fixed the issue. So for me the current code base seems not to work. Anyone have any suggestions i should look at to see what the problem could be because i'd like to have this working w/o dif

Re: Doesn't save, but no errors

2006-06-24 Thread jeko
Are you using routes for anything in the users controller? --~--~-~--~~~---~--~~ 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 gr

Re: Mail templates

2006-06-24 Thread Matt
I just so happens that I set up my project with email templates the other day. What I did is created a component called EmailTemplates that contains a separate variable for each template and these variables are assigned values in the startup function. In terms of using the templates, I do somethi

Re: Can i get $webroot for a vendor library?

2006-06-24 Thread Logan
Because i need to used in the view and/or the controller. Probably i'm missing something. I'm kind of new to MVC. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email

Re: Can i get $webroot for a vendor library?

2006-06-24 Thread gwoo
Any particular reason not to use Components? --~--~-~--~~~---~--~~ 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 group, send emai

Re: Can i get $webroot for a vendor library?

2006-06-24 Thread Logan
not the full one. From WWW_ROOT i get '../html', I need '/mysite/html/', the full webroot ;) --~--~-~--~~~---~--~~ 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@googlegrou

Re: Can i get $webroot for a vendor library?

2006-06-24 Thread Samuel DeVore
is it not available from the defines?  WWW_ROOT or WEBROOT_DIROn 6/24/06, Logan <[EMAIL PROTECTED] > wrote:I found out a way by importing the $Dispatcher.function _construct($src = "" { global $Dispatcher;$this->webroot = $Dispatcher->webroot;}Any other clean way for our public? ;) --~--~-

Re: Can i get $webroot for a vendor library?

2006-06-24 Thread Logan
I found out a way by importing the $Dispatcher. function _construct($src = null) { global $Dispatcher; $this->webroot = $Dispatcher->webroot; } Any other clean way for our public? ;) --~--~-~--~~~---~--~~ You received this message because you are subscri

Can i get $webroot for a vendor library?

2006-06-24 Thread Logan
Im developing a library called Image who extends File. Its allow renaming, moving, finding, resizing, deleting images and (specially), printing img tags into the document. It does some job with the image that has to be in the controller but also print the image as html. So you see, can't be a comp

Re: Showing errors in Comment submission on the same page as Post

2006-06-24 Thread DJ Spark
Probably you might use requestAction in your articles 'view' function requestAction('/comments/add'); requestAction('/comments/index''); and, in the comments add function, use redirect() to go back to the Article page ... (just like the default delete() function) , using getReferrer(); from th

Proofread my tutorial on contextual help

2006-06-24 Thread Martin
Hi everyone, I just finnished a tutorial in the wiki. Any feedback would be great. Better to catch problems before too many read it :) The tutorial is a walkthrough of a very simple context help I built for my app earlier today. The tut is here: http://wiki.cakephp.org/tutorials:simple_contextu

Re: Doesn't save, but no errors

2006-06-24 Thread tom
I've also updated to the latest stable just to see that wasn't the problem. --~--~-~--~~~---~--~~ 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 unsubsc

Cake Releases RSS

2006-06-24 Thread Joannou Ng
Hi folks, Is there an RSS feed for Cake stable releases? Cheers, Joannou. A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. - Douglas Adams, Mostly Harmless --~--~-~--~~~

Re: Cake Sheet

2006-06-24 Thread nate
We're working on one for the rest of the API as well. --~--~-~--~~~---~--~~ 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 group,

Re: Doesn't save, but no errors

2006-06-24 Thread tom
dumping $this->data at the last possible step (beforeSave()) gives this array: Array ( [User] => Array ( [first_name] => Jonny [last_name] => Greenwood [location] => London [email] => [EMAIL PROTECTED] [password] => 10f507e71

Components and Elements inside a Plugin

2006-06-24 Thread NickW
Does anyone know how to accomplish this? If I place a component or element in the logical place in the plugin folder I get not found errors. But if I place them in the normal Cake location it works fine. --~--~-~--~~~---~--~~ You received this message because you

Re: Where DAO object's should be?

2006-06-24 Thread RosSoft
Take a look at WebModel and RssModel in http://cakeforge.org/snippet/browse.php?by=lang&lang=5 maybe it can help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to

Where DAO object's should be?

2006-06-24 Thread wwwojtas
Hi, I'm new to CakePHP and I have a simple question. Where should I put DAO object's. I don't realy understand why Model object are used to get data (isn't they only the model?) I would like to get data from databases, xml, simple files, through SOAP, etc. and use model as data beans. DAO object

Re: Add

2006-06-24 Thread RosSoft
HeadHelper is your choice :) just set $helpers=array( , 'Head' ); in your AppController, and print_registered()?> in your layout. then in your views, you can do $head->register_js('myjsfile') or $head->register_jsblock('some_javascript_instructions'); (also you can use HeadHelper in your own

Re: Passing data from modelA to ModelB.

2006-06-24 Thread Carlos Mauricio Samour
what I want too do is that every time I add a record to the Table Transacction increaso o decrease the quantity_onhand value of the table Onhand. On 6/23/06, bigdog <[EMAIL PROTECTED]> wrote: > > Would an intermediate table solve your problem to communicate with > Transactions and Onhand? > > I

Add

2006-06-24 Thread [EMAIL PROTECTED]
Hi - we have a customized default.thtml layout file with all of the common navigation to be displayed at the top of each page. Lots of the individual views that use this layout use external javascripts and they need

Re: Doesn't save, but no errors

2006-06-24 Thread bigdog
What is loaded into your $this->data array? Check this array for possible problems. --~--~-~--~~~---~--~~ 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 T

Re: n00b with ACM questions

2006-06-24 Thread Ryan J. Peterson
We are looking to get 1.0 out sometime in July. :-) Ryan >Hi > >When is 1.0 coming out? > >thx :) > > >> > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email

Re: HABTM recursively

2006-06-24 Thread Christian.Tietze
I found out that recursion seems to work well. There is a query in debug mode 2, but the values are wrong; more precisely, the Comment.author_id is tested with NULL. Querying for a user only results in all his comments included in the result as supposed. Querying for a news item, which queryies f

Re: Connecting to the database directly and cron jobs

2006-06-24 Thread RosSoft
Also check http://groups.google.es/group/cake-php/browse_thread/thread/ff3ad3c9e1e40aab/522fa7b6d6c2c20c?q=cron&rnum=2#522fa7b6d6c2c20c --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to th

Re: HABTM recursively

2006-06-24 Thread Martin
It all works as it should in my current app. What I have done (since v1.0) is to pass the recursive value as a parameter to find like this: $me = $this->User>find("id = $myID",null,null,3); // cake 1.0 changed recursive The last parameter is the level of recursion for the find (3). All my models

Re: CakePHP screencasts

2006-06-24 Thread Martin
Really good effort. Screencasts are a very nice way for newcommers to get an idea of how to work with CakePHP. It's really not a bad way to run tutorials either. Nice work everyone involved. --~--~-~--~~~---~--~~ You received this message because you are subscrib

Re: Multipurpose classes

2006-06-24 Thread RosSoft
in the folder install/app/vendors/ or in /install/vendors then load the classes through vendor('mydir/myfile') --> it will load vendors/mydir/myfile.php (it looks in the two vendors folders) --~--~-~--~~~---~--~~ You received this message because you are subscrib

custom foreignKey not working in depper associations

2006-06-24 Thread Christian.Tietze
Hi! Please excuse this rather long post; my English isn't that advanced and therefore it's ahrd to explain things the short way. Maybe I'm going to say the same thing twice, using another expression or so, hoping you can get the meaning out of them combined :) To describe my problem: If I show a

Re: CakePHP screencasts

2006-06-24 Thread Marcelo de Moraes Serpa
Great Stuff!On 6/24/06, Larry E. Masters aka PhpNut <[EMAIL PROTECTED]> wrote: I have created a new screencast series Getting Baked on CakePHP. The first episode, Using Debug Messages is available on our screencast page"...In this 15 minute video, we will walk through building a basic cake applicat

Re: Mail templates

2006-06-24 Thread Timm
Thanks alot. I searched for "mail" with the help of the wiki search but nothing turned up. After you pointed out that there are some articles dealing with this topic, I looked at the table of contents on the front page of the wiki and discovered some useful tutorials. --~--~-~--~~---

Multipurpose classes

2006-06-24 Thread Timm
Is there a location where I can place multipurpose classes? For controllers you can use components, for models you can use behaviours. But I have some multipurpose classes (e.g. Encryption service, String generator etc.), which should be accessible from models and controllers. Is there a standard

Re: Connecting to the database directly and cron jobs

2006-06-24 Thread RosSoft
Other approach is something like: http://rossoft.wordpress.com/2006/03/27/poor-mans-cron-component/ --~--~-~--~~~---~--~~ 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@goo

Re: Mail templates

2006-06-24 Thread RosSoft
see the wiki, there're tutorial for sending email using the templates of cake --~--~-~--~~~---~--~~ 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 unsub

Re: model query trouble

2006-06-24 Thread EvgenP
Sorry, my fault! there was a space between COUNT and (*) )) --~--~-~--~~~---~--~~ 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

model query trouble

2006-06-24 Thread EvgenP
Hello! I have this in my model: return $this->execute('SELECT COUNT (*), manufacturers.id, manufacturers.name FROM manufacturers LEFT JOIN products ON manufacturers.id=products.manufacturer_id GROUP BY products.manufacturer_id'); this code works fine in phpMyAdmin, but cake debug info: SELECT

Re: Connecting to the database directly and cron jobs

2006-06-24 Thread Matt
It seems that Rails too, and perhaps MVC frameworks in general, have similiar issues with cron jobs: http://www.rubyinside.com/rails-cron-a-way-to-run-background-tasks-with-your-rails-app-53.htm --~--~-~--~~~---~--~~ You received this message because you are subs

Mail templates

2006-06-24 Thread Timm
I want to send several emails in my Cake PHP app. Is there a way to make use of the existing template system in Cake? I do not want to specify the message body directly in the code. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

CakePHP screencasts

2006-06-24 Thread Larry E. Masters aka PhpNut
I have created a new screencast series Getting Baked on CakePHP. The first episode, Using Debug Messages is available on our screencast page"...In this 15 minute video, we will walk through building a basic cake application using the debug messages. CakePHP provides a simple debugging system that w

Re: Connecting to the database directly and cron jobs

2006-06-24 Thread Langdon Stevenson
I too will soon be requiring this sort of functionality. I would also value a definitive answer to the question. Regards, Langdon Matt wrote: > I've recently started porting a site to CakePHP and have a couple of > questions regarding cron jobs. --~--~-~--~~~---~--

Re: n00b with ACM questions

2006-06-24 Thread sicapitan
Hi When is 1.0 coming out? thx :) --~--~-~--~~~---~--~~ 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 group, send email to [EMA