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 $
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
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
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
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
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
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
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
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
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
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
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
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? ;)
--~--~-
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
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
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
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
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
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
--~--~-~--~~~
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,
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
--~--~-~--~~---
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
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
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
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
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
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
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
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
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.
--~--~-~--~~~---~--
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
47 matches
Mail list logo