Re: Loading components from actions

2008-10-28 Thread Turnquist, Jonah

I can see your argument but I do not think it applies to me.  You must
realize my current project it simply a dummy project to learn the
CakePHP framework better and to define for myself a set of good
practices and methods for future projects when I might be working for
a client.  Whether I ever run/deploy this project is not a priority to
me.  It is my nature to question everything.  I will not fall into a
habit of using a certain practice unless I am sure it is the most
optimal practice there is for the given type of problem.  I have now
found (or created rather) a more optimal solution for my problem, and
I will use it until I am enlightened by a better one.

On Oct 28, 8:29 am, LunarDraco <[EMAIL PROTECTED]> wrote:
> Because solving it now, is solving a problem that doesn't yet exist.
> If you can not run/deploy your app then that is the first problem you
> need to resolve.
> And between now and the time you figure out the problem to run/deploy
> your app this startup issue may never be the problem.
> So solving it now is going to delay you getting a functional app.
>
> On Oct 27, 4:41 pm, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > No, it does not work for components that take use of startup()
> > shutdown() or initialize()
>
> > Sure, there will be worse bottlenecks, but why not solve this one now
> > instead of later?
>
> > I have created a ComponentLoaderComponent that will do my bidding for
> > the meantime.
>
> > I am assuming cake has no built in commands to load components on run-
> > time then.  I have created a ticket for this.
>
> > Thanks for your help (*not being sarcastic)
>
> > On Oct 27, 3:10 pm, teknoid <[EMAIL PROTECTED]> wrote:
>
> > > Have you tried to use it? Does it work? Does it do what you need?
>
> > > ... as far as best practices go, it's best to build something and then
> > > worry about optimization.
>
> > > I assure you that you'll run into a lot more interesting and demanding
> > > issues before you get to the point where the bottleneck of your
> > > application will depend on when/where your Email component is
> > > instantiated.
>
> > > On Oct 27, 5:52 pm, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > > > Erm... yes that will work, kind of, but then initialize(), startup()
> > > > and shutdown() will not be called in the component (at least I don't
> > > > see how they could... am I wrong?).
>
> > > > I did not do any speed tests, but I would not like components to be
> > > > instantiated unless needed (for instance what if the email component
> > > > had a very heavy startup() method?  I am trying to develop good
> > > > practices).
>
> > > > My code seems more logical this way.  Here is a pseudocode code
> > > > example
>
> > > > register action:
> > > > --if registration data validates {
> > > > save user
> > > > load email component
> > > > send email to confirm given email address
> > > > --}
>
> > > > This way the email component is not loaded until the app is 100% sure
> > > > it will even be sure.
>
> > > > ...unless maybe cake will handle this potential speed problem for me
> > > > in some way I can not imagine? I am in doubt but anyone is free to
> > > > inform me.
>
> > > > On Oct 27, 2:35 pm, teknoid <[EMAIL PROTECTED]> wrote:
>
> > > > > Well, it does... but did you remember to:
> > > > > $email = new EmailComponent; ?
>
> > > > > p.s. what "speed reasons" did you run into?
>
> > > > > On Oct 27, 5:21 pm, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > > > > > I've come across a need to load a component via the action for speed
> > > > > > reasons.
>
> > > > > > My case:
> > > > > > I have a user controller with view(), login(), and register()
> > > > > > actions.  I need the email component in, and only in, the register()
> > > > > > action.  So using var $components = array(etc); is not something I
> > > > > > want to do for speed reasons.  I do not want the component loaded 
> > > > > > for
> > > > > > actions that do not use it.
>
> > > > > > Looking at the docs it looks like this should work:
> > > > > > App::import('Component', 'Email');
>
> > > > > > But it doesn't. (??)
>
> > > > > > So how can this be done?
>
> > > > > > Thanks,
> > > > > > Jonah
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Loading components from actions

2008-10-27 Thread Turnquist, Jonah

No, it does not work for components that take use of startup()
shutdown() or initialize()

Sure, there will be worse bottlenecks, but why not solve this one now
instead of later?

I have created a ComponentLoaderComponent that will do my bidding for
the meantime.

I am assuming cake has no built in commands to load components on run-
time then.  I have created a ticket for this.

Thanks for your help (*not being sarcastic)

On Oct 27, 3:10 pm, teknoid <[EMAIL PROTECTED]> wrote:
> Have you tried to use it? Does it work? Does it do what you need?
>
> ... as far as best practices go, it's best to build something and then
> worry about optimization.
>
> I assure you that you'll run into a lot more interesting and demanding
> issues before you get to the point where the bottleneck of your
> application will depend on when/where your Email component is
> instantiated.
>
> On Oct 27, 5:52 pm, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > Erm... yes that will work, kind of, but then initialize(), startup()
> > and shutdown() will not be called in the component (at least I don't
> > see how they could... am I wrong?).
>
> > I did not do any speed tests, but I would not like components to be
> > instantiated unless needed (for instance what if the email component
> > had a very heavy startup() method?  I am trying to develop good
> > practices).
>
> > My code seems more logical this way.  Here is a pseudocode code
> > example
>
> > register action:
> > --if registration data validates {
> > save user
> > load email component
> > send email to confirm given email address
> > --}
>
> > This way the email component is not loaded until the app is 100% sure
> > it will even be sure.
>
> > ...unless maybe cake will handle this potential speed problem for me
> > in some way I can not imagine? I am in doubt but anyone is free to
> > inform me.
>
> > On Oct 27, 2:35 pm, teknoid <[EMAIL PROTECTED]> wrote:
>
> > > Well, it does... but did you remember to:
> > > $email = new EmailComponent; ?
>
> > > p.s. what "speed reasons" did you run into?
>
> > > On Oct 27, 5:21 pm, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > > > I've come across a need to load a component via the action for speed
> > > > reasons.
>
> > > > My case:
> > > > I have a user controller with view(), login(), and register()
> > > > actions.  I need the email component in, and only in, the register()
> > > > action.  So using var $components = array(etc); is not something I
> > > > want to do for speed reasons.  I do not want the component loaded for
> > > > actions that do not use it.
>
> > > > Looking at the docs it looks like this should work:
> > > > App::import('Component', 'Email');
>
> > > > But it doesn't. (??)
>
> > > > So how can this be done?
>
> > > > Thanks,
> > > > Jonah
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Loading components from actions

2008-10-27 Thread Turnquist, Jonah


> This way the email component is not loaded until the app is 100% sure
> it will even be sure.

Sorry, typo

This way the email component is not loaded until the app is 100% sure
it will even be used. << fixed
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Loading components from actions

2008-10-27 Thread Turnquist, Jonah

Erm... yes that will work, kind of, but then initialize(), startup()
and shutdown() will not be called in the component (at least I don't
see how they could... am I wrong?).

I did not do any speed tests, but I would not like components to be
instantiated unless needed (for instance what if the email component
had a very heavy startup() method?  I am trying to develop good
practices).

My code seems more logical this way.  Here is a pseudocode code
example

register action:
--if registration data validates {
save user
load email component
send email to confirm given email address
--}

This way the email component is not loaded until the app is 100% sure
it will even be sure.

...unless maybe cake will handle this potential speed problem for me
in some way I can not imagine? I am in doubt but anyone is free to
inform me.

On Oct 27, 2:35 pm, teknoid <[EMAIL PROTECTED]> wrote:
> Well, it does... but did you remember to:
> $email = new EmailComponent; ?
>
> p.s. what "speed reasons" did you run into?
>
> On Oct 27, 5:21 pm, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > I've come across a need to load a component via the action for speed
> > reasons.
>
> > My case:
> > I have a user controller with view(), login(), and register()
> > actions.  I need the email component in, and only in, the register()
> > action.  So using var $components = array(etc); is not something I
> > want to do for speed reasons.  I do not want the component loaded for
> > actions that do not use it.
>
> > Looking at the docs it looks like this should work:
> > App::import('Component', 'Email');
>
> > But it doesn't. (??)
>
> > So how can this be done?
>
> > Thanks,
> > Jonah
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Loading components from actions

2008-10-27 Thread Turnquist, Jonah

I've come across a need to load a component via the action for speed
reasons.

My case:
I have a user controller with view(), login(), and register()
actions.  I need the email component in, and only in, the register()
action.  So using var $components = array(etc); is not something I
want to do for speed reasons.  I do not want the component loaded for
actions that do not use it.

Looking at the docs it looks like this should work:
App::import('Component', 'Email');

But it doesn't. (??)

So how can this be done?

Thanks,
Jonah
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Alphabetizing SQL Data

2008-10-21 Thread Turnquist, Jonah

the best way to do this is via your sql code not your php code.
You'll probably need to add "ORDER BY `name`' to the end of the sql
statement or something similar.

On Oct 21, 2:57 pm, "Miguel Miranda" <[EMAIL PROTECTED]>
wrote:
> have you tried using order by ?
>
> On Tue, Oct 21, 2008 at 3:11 PM, tapupartforpres <[EMAIL PROTECTED]>wrote:
>
>
>
> > Hello.  I am assuming this is more of a .php question, but it is in
> > Cake's framework.
>
> > I have a site that I took over that had a listing of 50 wineries with
> > their name and URL pulling from the SQL data.  I added 20 additional
> > wineries but are listed with the id of 51-71.  It is pulling the id
> > and listing them in that order.
>
> > My question is how do I list the wineries by name and not by ID.
> > Thanks
>
> >http://wineworksohio.com/
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Getting route-URL for internal controller/action-URL

2008-10-09 Thread Turnquist, Jonah

This interests me.  What if you have two routes set up though, like
so:

Router::connect('/gruppenAA', array('controller' => 'groups', 'action'
=> 'index'));
Router::connect('/gruppenBB', array('controller' => 'groups', 'action'
=> 'index'));

Now what would the below return? '/gruppenAA' or '/gruppenBB'
Router::url(array('controller' => 'groups', 'action' => 'index'))

On Oct 9, 1:58 am, Andreas Hofmann <[EMAIL PROTECTED]>
wrote:
> Ah yeah, works!! Cool, thx!
>
> I tried Router::url() before, but with the URl as a string. with an
> array of controller/action it works like expected!!
>
> Thanks again!!
>
> On 9 Okt., 10:53, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
>
> > I believe what you're looking for is $html->url() or, more direct,  
> > Router::url().http://api.cakephp.org/class_router.html#a34cdc409ebe46302682fb8c242c...
>
> > Also, you should lookup URLs with an array like
> > array('controller' => 'groups', 'action' => 'something')
> > instead of /groups/something. Seems more reliable for reverse lookups  
> > in my experience.
>
> > On 9 Oct 2008, at 17:23, Andreas Hofmann wrote:
>
> > > Hi all,
>
> > > i discovered the whole Router-class-definition, but I found no method,
> > > that matches my needs :)
> > > Is there any way to get the URL of a defined route for an internal
> > > cake-controller/action-URL.
>
> > > For example I have this route defined:
>
> > > Router::connect('/gruppen', array('controller' => 'groups', 'action'
> > > => 'index'));
>
> > > Is there now a way to get this defined URL ('/gruppen') by calling a
> > > function with the params controller/action, like this:
>
> > > Router::theMagicMethodThatMustExist(
> > >  array(
> > >    'controller' => 'groups'
> > >    'action' => 'index'
> > >  )
> > > ); // Should now return '/gruppen'
>
> > > With this I can undock the URLs from the templates/views! Currently
> > > I'm doing stuff like this in a view:
>
> > > $html->link('A Link', '/groups/index');
>
> > > But this sucks, because when I define a route for '/groups/index', I
> > > don't want to change the URL in 1000 view-files and replace '/groups/
> > > index' with '/gruppen' :S Would be nice if there is a method I'm
> > > looking for, to always get a defined route-URL, if there is one! :)
>
> > > Is there such a method out there??
>
> > > Thanks and greetings,
>
> > > Andreas!
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How do you make line breaks appear in views?

2008-10-08 Thread Turnquist, Jonah

The best way to look up php functions is by using the search engine on
the php site at http://us.php.net/

it's a very well written manual.

This is what comes up when you look up nl2br()
http://us.php.net/manual/en/function.nl2br.php

Also, this is the main resource that I learned php with:
http://devzone.zend.com/node/view/id/627

It's a very good set of like 10 different tutorials for php beginners

good luck

On Oct 8, 12:59 am, Cody Sortore <[EMAIL PROTECTED]> wrote:
> I've got a decent handle on PHP at least enough to get by.  I'm not
> trying to create some social networking site or anything, just a very
> simple site that has some user comments and what not on it.
>
> I'll admit I've never gone through and actually "learned" PHP most of
> what I've done was starting with PHP-Nuke modifying things, and adding
> in modules to that.  Then I moved to WordPress for most of my sites
> and have modified the site, modified plugins, and made a few
> templates.  And I have a few reference books... which aren't always
> much help if you don't know the terminology.
>
> I'm sorry if I don't have a huge amount of knowledge when it comes to
> terminology, and there's a lot of very basic things such as the nl2br
> kind of stuff that I've missed.  That's what I'm learning, and I'm
> very glad that there are places like this that I can learn and build
> my skills.
>
> I've created some basic sites before with straight out PHP and MySQL
> it's tedious and no fun... I don't code for a living, just need some
> things to work the way I want them to and CakePHP offers that as it is
> much easier to get into than PHP.  Personally I learn best by actually
> doing things, making mistakes, and asking others more experienced what
> I did wrong.  I'm sorry if my n00bish questions are tedious and time
> consuming for you... you don't owe me anything or have to spend the
> time answering them though.  I'm glad that there are people out there
> willing to help me and answer these questions for me so that I can
> learn though since tutorials, and books have only taken me so far...
> sometimes leaving off the basics you might need for simple forms.
>
> On Oct 8, 1:42 am, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > I hope I do not seem mean but I recommend learning the php language a
> > bit better before getting into a framework.
>
> > You sound like you are trying to create a form, and you want the data
> > entered in it to be displayed with  tags instead of newlines
> > which does not output on the browser.  Put the content through the
> > nl2br() function before outputting it to the browser.
>
> > when you hit "enter" in an editor, what it creates is called a
> > "newline".  As you seem to know, if you want a line-break outputted on
> > the browser, you need  instead of the newline.  That is what
> > nl2br() is for.
>
> > On Oct 7, 10:52 pm, Cody Sortore <[EMAIL PROTECTED]> wrote:
>
> > > Thanks, I like the nl2br solution.
>
> > > When you say processing and filtering you do mean like data validation
> > > in the model right?  If so yes... if you're talking about something
> > > else... uh probably not.  Well I do have some $paginate restrictions
> > > in the controller (including a function that only displays approved
> > > comments).
>
> > > On Oct 7, 9:20 pm, BrendonKoz <[EMAIL PROTECTED]> wrote:
>
> > > > Via PHP code, you could also process the data through PHP's nl2br()
> > > > function, which inserts  tags prior to the newline (the newline
> > > > is not removed).  Hopefully you're already processing and filtering
> > > > the user data anyway.
>
> > > > On Oct 7, 7:33 pm, Cody Sortore <[EMAIL PROTECTED]> wrote:
>
> > > > > Okay, I know I sound like a complete n00b right now, and that's fine
> > > > > because I am.  I've really only made applications for myself so far so
> > > > > putting in  tags is no problem... but now that I'm trying to
> > > > > make something for other people to use how to I make it so that when
> > > > > they hit "enter" it will automatically put in a  tag for me?
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: 2 column layout for $form->input() ?

2008-10-07 Thread Turnquist, Jonah

Cake has no solution for this.  css and html however, do.  Instead of
using html->input, use the corresponding function that does not wrap
the form elements in anything, such as html->select or html->text
etc.  Then, use your own css and html to get it to do what you want.

On Aug 18, 5:20 am, Malcolm Krugger <[EMAIL PROTECTED]>
wrote:
> Whenever I user $form->input in templates invariably it outputs one
> below the other
>
> How do I make a 2 column form using $form->input tags ?
>
> Malcolm
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How do you make line breaks appear in views?

2008-10-07 Thread Turnquist, Jonah

I hope I do not seem mean but I recommend learning the php language a
bit better before getting into a framework.

You sound like you are trying to create a form, and you want the data
entered in it to be displayed with  tags instead of newlines
which does not output on the browser.  Put the content through the
nl2br() function before outputting it to the browser.

when you hit "enter" in an editor, what it creates is called a
"newline".  As you seem to know, if you want a line-break outputted on
the browser, you need  instead of the newline.  That is what
nl2br() is for.

On Oct 7, 10:52 pm, Cody Sortore <[EMAIL PROTECTED]> wrote:
> Thanks, I like the nl2br solution.
>
> When you say processing and filtering you do mean like data validation
> in the model right?  If so yes... if you're talking about something
> else... uh probably not.  Well I do have some $paginate restrictions
> in the controller (including a function that only displays approved
> comments).
>
> On Oct 7, 9:20 pm, BrendonKoz <[EMAIL PROTECTED]> wrote:
>
> > Via PHP code, you could also process the data through PHP's nl2br()
> > function, which inserts  tags prior to the newline (the newline
> > is not removed).  Hopefully you're already processing and filtering
> > the user data anyway.
>
> > On Oct 7, 7:33 pm, Cody Sortore <[EMAIL PROTECTED]> wrote:
>
> > > Okay, I know I sound like a complete n00b right now, and that's fine
> > > because I am.  I've really only made applications for myself so far so
> > > putting in  tags is no problem... but now that I'm trying to
> > > make something for other people to use how to I make it so that when
> > > they hit "enter" it will automatically put in a  tag for me?
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Email component won't send

2008-06-30 Thread Turnquist, Jonah

Ok, thanks for the help.  I'm not sure yet if I am going to switch or
not yet, as it does work kinda, just not all the way.  Probably will
later actually

Thanks,
Jonah

On Jun 30, 3:07 pm, r0mk1n <[EMAIL PROTECTED]> wrote:
> no, you can use it anywhere you want ( with correct options of
> course )
>
> On Jul 1, 1:03 am, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > Question, will using SMTP as you suggested still work once I upload it
> > to dreamhost?
>
> > On Jun 30, 3:00 pm, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > > I can use mail() with localhost.  I set up the php.ini to do it and it
> > > works fine.  I also got it to work with the email component, but only
> > > if I don't contain < or > characters, that is my problem.
>
> > > On Jun 30, 2:55 pm, r0mk1n <[EMAIL PROTECTED]> wrote:
>
> > > > this string "$this->smtpOptions . " must be:
> > > > $this->Email->smtpOptions = array(  'port'=> 25, 'host' =>
> > > > 'yourSMTPServer', 'username'=>'yourUserName',
> > > > 'password'=>'yourSMTPPassword', 'timeout' => 30 );
>
> > > > Sorry :(
>
> > > > On Jul 1, 12:53 am, r0mk1n <[EMAIL PROTECTED]> wrote:
>
> > > > > you are trying to send via PHPs mail function ( default method in
> > > > > Email component ), but you can`t do it from localhost ;)
> > > > > better way - send via SMTP
>
> > > > > 1. you need to setup smtp delivery:
>
> > > > > $this->Email->delivery = 'smtp';
>
> > > > > 2. setup SMTP params:
>
> > > > > $this->smtpOptions = array(  'port'=> 25, 'host' => 'yourSMTPServer',
> > > > > 'username'=>'yourUserName', 'password'=>'yourSMTPPassword', 'timeout'
> > > > > => 30 );
>
> > > > > 3. Sending  ;)
>
> > > > > To get SMTP settings you need to get email relay information from your
> > > > > hosting support (server, username and password)
>
> > > > > P.S. with standart component you can`t send your emails via relay
> > > > > servers that using TLS or SSL connections ( like gmail.com ), to do
> > > > > this you need using some like ShiftMailer
>
> > > > > On Jun 30, 11:14 pm, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > > > > > Update:  I figured out I can get it to work if I remove all < and >
>
> > > > > > $this->Email->from = 'No Reply ';
> > > > > > $this->Email->replyTo = No Reply '';
> > > > > > $this->Email->return = No Reply '';
>
> > > > > > changed to this:
>
> > > > > > $this->Email->from = 'noreply@'.env('HTTP_HOST');
> > > > > > $this->Email->replyTo = 'noreply@'.env('HTTP_HOST');
> > > > > > $this->Email->return = 'noreply@'.env('HTTP_HOST');
>
> > > > > > Now it works, but of course now I can't supply a name.  Is there a
> > > > > > better solution?
>
> > > > > > On Jun 30, 12:09 am, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Ok, I went through the email component code and removed the '@' 
> > > > > > > sign
> > > > > > > from the mail function to show error messages, and so now it gives
> > > > > > > this error:
>
> > > > > > > Warning (2): mail() [function.mail]: SMTP server response: 550 
> > > > > > > 5.1.0
> > > > > > > <=?UTF-8?B??= <[EMAIL PROTECTED]>> '@' or '.' expected after 
> > > > > > > '=?UTF-8?
> > > > > > > B??=' [CORE\cake\libs\controller\components\email.php, line 667]
>
> > > > > > > And this is what it ran (I put a little echo in it to see what it 
> > > > > > > was
> > > > > > > putting into the mail() function) to get the error:
> > > > > > > mail(poppitypopATgmailDOTcom, =?UTF-8?B?
> > > > > > > V2VsY29tZSB0byBvdXIgcmVhbGx5IGNvb2wgdGhpbmc=?=, content stuff 
> > > > &g

Re: Email component won't send

2008-06-30 Thread Turnquist, Jonah

Question, will using SMTP as you suggested still work once I upload it
to dreamhost?

On Jun 30, 3:00 pm, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
> I can use mail() with localhost.  I set up the php.ini to do it and it
> works fine.  I also got it to work with the email component, but only
> if I don't contain < or > characters, that is my problem.
>
> On Jun 30, 2:55 pm, r0mk1n <[EMAIL PROTECTED]> wrote:
>
> > this string "$this->smtpOptions . " must be:
> > $this->Email->smtpOptions = array(  'port'=> 25, 'host' =>
> > 'yourSMTPServer', 'username'=>'yourUserName',
> > 'password'=>'yourSMTPPassword', 'timeout' => 30 );
>
> > Sorry :(
>
> > On Jul 1, 12:53 am, r0mk1n <[EMAIL PROTECTED]> wrote:
>
> > > you are trying to send via PHPs mail function ( default method in
> > > Email component ), but you can`t do it from localhost ;)
> > > better way - send via SMTP
>
> > > 1. you need to setup smtp delivery:
>
> > > $this->Email->delivery = 'smtp';
>
> > > 2. setup SMTP params:
>
> > > $this->smtpOptions = array(  'port'=> 25, 'host' => 'yourSMTPServer',
> > > 'username'=>'yourUserName', 'password'=>'yourSMTPPassword', 'timeout'
> > > => 30 );
>
> > > 3. Sending  ;)
>
> > > To get SMTP settings you need to get email relay information from your
> > > hosting support (server, username and password)
>
> > > P.S. with standart component you can`t send your emails via relay
> > > servers that using TLS or SSL connections ( like gmail.com ), to do
> > > this you need using some like ShiftMailer
>
> > > On Jun 30, 11:14 pm, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > > > Update:  I figured out I can get it to work if I remove all < and >
>
> > > > $this->Email->from = 'No Reply ';
> > > > $this->Email->replyTo = No Reply '';
> > > > $this->Email->return = No Reply '';
>
> > > > changed to this:
>
> > > > $this->Email->from = 'noreply@'.env('HTTP_HOST');
> > > > $this->Email->replyTo = 'noreply@'.env('HTTP_HOST');
> > > > $this->Email->return = 'noreply@'.env('HTTP_HOST');
>
> > > > Now it works, but of course now I can't supply a name.  Is there a
> > > > better solution?
>
> > > > On Jun 30, 12:09 am, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > > > > Ok, I went through the email component code and removed the '@' sign
> > > > > from the mail function to show error messages, and so now it gives
> > > > > this error:
>
> > > > > Warning (2): mail() [function.mail]: SMTP server response: 550 5.1.0
> > > > > <=?UTF-8?B??= <[EMAIL PROTECTED]>> '@' or '.' expected after '=?UTF-8?
> > > > > B??=' [CORE\cake\libs\controller\components\email.php, line 667]
>
> > > > > And this is what it ran (I put a little echo in it to see what it was
> > > > > putting into the mail() function) to get the error:
> > > > > mail(poppitypopATgmailDOTcom, =?UTF-8?B?
> > > > > V2VsY29tZSB0byBvdXIgcmVhbGx5IGNvb2wgdGhpbmc=?=, content stuff here ,
> > > > > From: =?UTF-8?B??= Reply-To: =?UTF-8?B??= Return-Path: =?UTF-8?B??= X-
> > > > > Mailer: CakePHP Email Component Content-Type: text/plain;
> > > > > charset=UTF-8 Content-Transfer-Encoding: 7bit, )'
>
> > > > > So I conclude the problem is the ?UTF-8?B??.  Which is probably
> > > > > something I can not fix myself.  This is a bug.  Could someone make a
> > > > > ticket for this?  hehe, I really have no idea how to use trac,
> > > > > otherwise I would do it myself...
>
> > > > > On Jun 28, 5:11 am, "b logica" <[EMAIL PROTECTED]> wrote:
>
> > > > > > Note the "=?UTF-8?B??=" bits. There seems to be a lot of that going
> > > > > > on. I don't know if anyone's figured out the cause yet but I suggest
> > > > > > you check Trac.
>
> > > > > > On Fri, Jun 27, 2008 at 11:19 PM, Turnquist, Jonah <[EMAIL 
> > > > > > PROTECTED]> wrote:
>
> > > > > > > I am having a problem with the email component.  I am trying to 
> > > > > > > get it
> > > > > > > to send a simple text email.  I have set up the layouts and
> > > > > > > templates.  But for some reason it will not send.  nor will it 
> > > > > > > throw
> > > > > > > an error.  I am using WAMP, and set up the php.ini to send email
> > > > > > > correctly as far as I can tell.  The funny thing is that the php
> > > > > > > mail() function DOES work, just not the email component.
> > > > > > > Here is the code in the 
> > > > > > > controller:http://bin.cakephp.org/view/2104639841
> > > > > > > could somone glance at it?
>
> > > > > > > Thanks,
> > > > > > > Jonah
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Email component won't send

2008-06-30 Thread Turnquist, Jonah

I can use mail() with localhost.  I set up the php.ini to do it and it
works fine.  I also got it to work with the email component, but only
if I don't contain < or > characters, that is my problem.

On Jun 30, 2:55 pm, r0mk1n <[EMAIL PROTECTED]> wrote:
> this string "$this->smtpOptions . " must be:
> $this->Email->smtpOptions = array(  'port'=> 25, 'host' =>
> 'yourSMTPServer', 'username'=>'yourUserName',
> 'password'=>'yourSMTPPassword', 'timeout' => 30 );
>
> Sorry :(
>
> On Jul 1, 12:53 am, r0mk1n <[EMAIL PROTECTED]> wrote:
>
> > you are trying to send via PHPs mail function ( default method in
> > Email component ), but you can`t do it from localhost ;)
> > better way - send via SMTP
>
> > 1. you need to setup smtp delivery:
>
> > $this->Email->delivery = 'smtp';
>
> > 2. setup SMTP params:
>
> > $this->smtpOptions = array(  'port'=> 25, 'host' => 'yourSMTPServer',
> > 'username'=>'yourUserName', 'password'=>'yourSMTPPassword', 'timeout'
> > => 30 );
>
> > 3. Sending .... ;)
>
> > To get SMTP settings you need to get email relay information from your
> > hosting support (server, username and password)
>
> > P.S. with standart component you can`t send your emails via relay
> > servers that using TLS or SSL connections ( like gmail.com ), to do
> > this you need using some like ShiftMailer
>
> > On Jun 30, 11:14 pm, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > > Update:  I figured out I can get it to work if I remove all < and >
>
> > > $this->Email->from = 'No Reply ';
> > > $this->Email->replyTo = No Reply '';
> > > $this->Email->return = No Reply '';
>
> > > changed to this:
>
> > > $this->Email->from = 'noreply@'.env('HTTP_HOST');
> > > $this->Email->replyTo = 'noreply@'.env('HTTP_HOST');
> > > $this->Email->return = 'noreply@'.env('HTTP_HOST');
>
> > > Now it works, but of course now I can't supply a name.  Is there a
> > > better solution?
>
> > > On Jun 30, 12:09 am, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > > > Ok, I went through the email component code and removed the '@' sign
> > > > from the mail function to show error messages, and so now it gives
> > > > this error:
>
> > > > Warning (2): mail() [function.mail]: SMTP server response: 550 5.1.0
> > > > <=?UTF-8?B??= <[EMAIL PROTECTED]>> '@' or '.' expected after '=?UTF-8?
> > > > B??=' [CORE\cake\libs\controller\components\email.php, line 667]
>
> > > > And this is what it ran (I put a little echo in it to see what it was
> > > > putting into the mail() function) to get the error:
> > > > mail(poppitypopATgmailDOTcom, =?UTF-8?B?
> > > > V2VsY29tZSB0byBvdXIgcmVhbGx5IGNvb2wgdGhpbmc=?=, content stuff here ,
> > > > From: =?UTF-8?B??= Reply-To: =?UTF-8?B??= Return-Path: =?UTF-8?B??= X-
> > > > Mailer: CakePHP Email Component Content-Type: text/plain;
> > > > charset=UTF-8 Content-Transfer-Encoding: 7bit, )'
>
> > > > So I conclude the problem is the ?UTF-8?B??.  Which is probably
> > > > something I can not fix myself.  This is a bug.  Could someone make a
> > > > ticket for this?  hehe, I really have no idea how to use trac,
> > > > otherwise I would do it myself...
>
> > > > On Jun 28, 5:11 am, "b logica" <[EMAIL PROTECTED]> wrote:
>
> > > > > Note the "=?UTF-8?B??=" bits. There seems to be a lot of that going
> > > > > on. I don't know if anyone's figured out the cause yet but I suggest
> > > > > you check Trac.
>
> > > > > On Fri, Jun 27, 2008 at 11:19 PM, Turnquist, Jonah <[EMAIL 
> > > > > PROTECTED]> wrote:
>
> > > > > > I am having a problem with the email component.  I am trying to get 
> > > > > > it
> > > > > > to send a simple text email.  I have set up the layouts and
> > > > > > templates.  But for some reason it will not send.  nor will it throw
> > > > > > an error.  I am using WAMP, and set up the php.ini to send email
> > > > > > correctly as far as I can tell.  The funny thing is that the php
> > > > > > mail() function DOES work, just not the email component.
> > > > > > Here is the code in the 
> > > > > > controller:http://bin.cakephp.org/view/2104639841
> > > > > > could somone glance at it?
>
> > > > > > Thanks,
> > > > > > Jonah
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Email component won't send

2008-06-30 Thread Turnquist, Jonah

Update:  I figured out I can get it to work if I remove all < and >

$this->Email->from = 'No Reply ';
$this->Email->replyTo = No Reply '';
$this->Email->return = No Reply '';

changed to this:

$this->Email->from = 'noreply@'.env('HTTP_HOST');
$this->Email->replyTo = 'noreply@'.env('HTTP_HOST');
$this->Email->return = 'noreply@'.env('HTTP_HOST');

Now it works, but of course now I can't supply a name.  Is there a
better solution?

On Jun 30, 12:09 am, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
> Ok, I went through the email component code and removed the '@' sign
> from the mail function to show error messages, and so now it gives
> this error:
>
> Warning (2): mail() [function.mail]: SMTP server response: 550 5.1.0
> <=?UTF-8?B??= <[EMAIL PROTECTED]>> '@' or '.' expected after '=?UTF-8?
> B??=' [CORE\cake\libs\controller\components\email.php, line 667]
>
> And this is what it ran (I put a little echo in it to see what it was
> putting into the mail() function) to get the error:
> mail(poppitypopATgmailDOTcom, =?UTF-8?B?
> V2VsY29tZSB0byBvdXIgcmVhbGx5IGNvb2wgdGhpbmc=?=, content stuff here ,
> From: =?UTF-8?B??= Reply-To: =?UTF-8?B??= Return-Path: =?UTF-8?B??= X-
> Mailer: CakePHP Email Component Content-Type: text/plain;
> charset=UTF-8 Content-Transfer-Encoding: 7bit, )'
>
> So I conclude the problem is the ?UTF-8?B??.  Which is probably
> something I can not fix myself.  This is a bug.  Could someone make a
> ticket for this?  hehe, I really have no idea how to use trac,
> otherwise I would do it myself...
>
> On Jun 28, 5:11 am, "b logica" <[EMAIL PROTECTED]> wrote:
>
> > Note the "=?UTF-8?B??=" bits. There seems to be a lot of that going
> > on. I don't know if anyone's figured out the cause yet but I suggest
> > you check Trac.
>
> > On Fri, Jun 27, 2008 at 11:19 PM, Turnquist, Jonah <[EMAIL PROTECTED]> 
> > wrote:
>
> > > I am having a problem with the email component.  I am trying to get it
> > > to send a simple text email.  I have set up the layouts and
> > > templates.  But for some reason it will not send.  nor will it throw
> > > an error.  I am using WAMP, and set up the php.ini to send email
> > > correctly as far as I can tell.  The funny thing is that the php
> > > mail() function DOES work, just not the email component.
> > > Here is the code in the controller:http://bin.cakephp.org/view/2104639841
> > > could somone glance at it?
>
> > > Thanks,
> > > Jonah
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Email component won't send

2008-06-30 Thread Turnquist, Jonah

Ok, I went through the email component code and removed the '@' sign
from the mail function to show error messages, and so now it gives
this error:

Warning (2): mail() [function.mail]: SMTP server response: 550 5.1.0
<=?UTF-8?B??= <[EMAIL PROTECTED]>> '@' or '.' expected after '=?UTF-8?
B??=' [CORE\cake\libs\controller\components\email.php, line 667]

And this is what it ran (I put a little echo in it to see what it was
putting into the mail() function) to get the error:
mail(poppitypopATgmailDOTcom, =?UTF-8?B?
V2VsY29tZSB0byBvdXIgcmVhbGx5IGNvb2wgdGhpbmc=?=, content stuff here ,
From: =?UTF-8?B??= Reply-To: =?UTF-8?B??= Return-Path: =?UTF-8?B??= X-
Mailer: CakePHP Email Component Content-Type: text/plain;
charset=UTF-8 Content-Transfer-Encoding: 7bit, )'

So I conclude the problem is the ?UTF-8?B??.  Which is probably
something I can not fix myself.  This is a bug.  Could someone make a
ticket for this?  hehe, I really have no idea how to use trac,
otherwise I would do it myself...


On Jun 28, 5:11 am, "b logica" <[EMAIL PROTECTED]> wrote:
> Note the "=?UTF-8?B??=" bits. There seems to be a lot of that going
> on. I don't know if anyone's figured out the cause yet but I suggest
> you check Trac.
>
> On Fri, Jun 27, 2008 at 11:19 PM, Turnquist, Jonah <[EMAIL PROTECTED]> wrote:
>
> > I am having a problem with the email component.  I am trying to get it
> > to send a simple text email.  I have set up the layouts and
> > templates.  But for some reason it will not send.  nor will it throw
> > an error.  I am using WAMP, and set up the php.ini to send email
> > correctly as far as I can tell.  The funny thing is that the php
> > mail() function DOES work, just not the email component.
> > Here is the code in the controller:http://bin.cakephp.org/view/2104639841
> > could somone glance at it?
>
> > Thanks,
> > Jonah
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Routing: "/recipe-your_slug_here" instead of "/recipe/your_slug_here"

2008-06-27 Thread Turnquist, Jonah

I do not think /jobs/london would rank in google better than /jobs-
london. /jobs-in-london on the other hand probably would.

I suck at routes, haven't written a working one yet. soo..

On Jun 27, 1:06 pm, Jaime <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> For certain routes it could be useful to have "-" or any other
> separator instead of "/".
>
> So something like /jobs/london could become /jobs-london or even /jobs-
> in-london (using "-in-" as separator), which usually ranks better in
> search engines (as it's thought to be a main page, not a sub-
> subdirectory). And sounds to me a little more semantic.
>
> It's not a very important, but could be nice to hear if someone has
> worked that out. Anyway, I think the "/" slash is hardcoded in
> route.php, so maybe it's not trivial.
>
> :-)
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Email component won't send

2008-06-27 Thread Turnquist, Jonah

I am having a problem with the email component.  I am trying to get it
to send a simple text email.  I have set up the layouts and
templates.  But for some reason it will not send.  nor will it throw
an error.  I am using WAMP, and set up the php.ini to send email
correctly as far as I can tell.  The funny thing is that the php
mail() function DOES work, just not the email component.
Here is the code in the controller: http://bin.cakephp.org/view/2104639841
could somone glance at it?

Thanks,
Jonah
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: constants or config?

2008-06-27 Thread Turnquist, Jonah

Oh, thanks guys, the bootstrap seems to work perfectly.  I could see
how the database method would be helpful as you could easily do some
quick scaffolding, and supply a client with an easy way to change
website settings such as the site name, and little things such as
'posts per page' for instance.  But since the website name is the only
thing I need stored for now, i'll use the constant method.  BTW Lecter
if you updated it with the caching that would be great.  I may use it
some day actually.  In fact, you could actually even make it into a
plugin.

thx
Jonah

On Jun 27, 12:25 pm, francky06l <[EMAIL PROTECTED]> wrote:
> Maybe because it's easier to plug a GUI to store data in database than
> having an editor and an FTP (depends of the user of course) ?:-) ;)
>
> On Jun 27, 4:42 pm, Martin Siniawski <[EMAIL PROTECTED]> wrote:
>
> > Hey Lecter,
>
> > Why would you do it that way instead of using constants? Your method
> > involves only 1 query, so it isn't very expensive, but I don't see the
> > benefit in doing it that way.
>
> > Cheers,
> > Martin
>
> > On Jun 27, 4:28 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote:
>
> > > This might be helpful to you:
>
> > >http://dsi.vozibrale.com/articles/view/simple-db-based-configuration-...
>
> > > I'll need to update the article though, I have a new version ready,
> > > with caching.
>
> > > On Jun 27, 9:20 am, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > > > Hey guys, do you think it would be better to use a php constant to
> > > > store my website name?  Over using the config stuff?
>
> > > > Because a constant would be way faster right?  I would use it on EVERY
> > > > page.
>
> > > > But where would should I define it?
>
> > > > Thanks,
> > > > Jonah
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: constants or config?

2008-06-27 Thread Turnquist, Jonah

Oh, thanks guys, the bootstrap seems to work perfectly.  I could see
how the database method would be helpful as you could easily do some
quick scaffolding, and supply a client with an easy way to change
website settings such as the site name, and little things such as
'posts per page' for instance.  But since the website name is the only
thing I need stored for now, i'll use the constant method.  BTW Lecter
if you updated it with the caching that would be great.  I may use it
some day actually.  In fact, you could actually even make it into a
plugin.

thx
Jonah

On Jun 27, 12:25 pm, francky06l <[EMAIL PROTECTED]> wrote:
> Maybe because it's easier to plug a GUI to store data in database than
> having an editor and an FTP (depends of the user of course) ?:-) ;)
>
> On Jun 27, 4:42 pm, Martin Siniawski <[EMAIL PROTECTED]> wrote:
>
> > Hey Lecter,
>
> > Why would you do it that way instead of using constants? Your method
> > involves only 1 query, so it isn't very expensive, but I don't see the
> > benefit in doing it that way.
>
> > Cheers,
> > Martin
>
> > On Jun 27, 4:28 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote:
>
> > > This might be helpful to you:
>
> > >http://dsi.vozibrale.com/articles/view/simple-db-based-configuration-...
>
> > > I'll need to update the article though, I have a new version ready,
> > > with caching.
>
> > > On Jun 27, 9:20 am, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > > > Hey guys, do you think it would be better to use a php constant to
> > > > store my website name?  Over using the config stuff?
>
> > > > Because a constant would be way faster right?  I would use it on EVERY
> > > > page.
>
> > > > But where would should I define it?
>
> > > > Thanks,
> > > > Jonah
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



constants or config?

2008-06-27 Thread Turnquist, Jonah

Hey guys, do you think it would be better to use a php constant to
store my website name?  Over using the config stuff?

Because a constant would be way faster right?  I would use it on EVERY
page.

But where would should I define it?

Thanks,
Jonah
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: table driven select box example for cakePHP ver 1.2.0.xxxxx

2008-06-25 Thread Turnquist, Jonah

I am totaling agreeing with you Wayne.  I started learning cakePHP
about 2 weeks ago and it is very hard to learn from the
documentation.  What I basically had to do was read it like 3 times,
because what it was trying to tell me didn't always make sense because
I did not understand other things that were not said until later in
the documentation that were required to understand the first thing.

Blech, it definitely would be great if some more people put more time
into it.

On Jun 25, 12:50 pm, Wayne Madison <[EMAIL PROTECTED]>
wrote:
> Yes! This discussion thread is about Documentation.
>
> The Current Documentation is "good". On a scale of 1 to 10, it is a 5.
>
> I say this for a number of reasons.
>
> 1. It contains deprecated items that are not noted as such.
> 2. Alternative / Preferred methods to deprecated items are not
> provided.
> 3. It provides items without specific examples which can be used and
> tested by users.
> 4. It does not provide specific methods to solve specific fundamental
> web application problems.
>
> My goal of this thread was to present a problem an a web application
> builder(user) brings to the Documentation.
>
> The application builder brings a general question to the
> Documentation.
>
> For Example:1)  How do I add a select option driven by a database
> table to my View(form)?
>                     2)  How do I eliminate a label on a form eliment?
>                     3)  How do I change the label on a select
> option?
>
> Are the direct and explicit answers to these types of questions beyond
> the scope of this Documentation?
>
> The application builder has followed the cakePHP instructions to build
> their application in accordance with cakePHP methodology and
> practice.
>
> The Methods, Controllers and Views were built with cake.php Bake and
> tested with scaffold.
>
> This was accomplished in short order!
>
> Thanks cakePHP!
>
> Some of the boring repetitive work is out of the way.
>
> Now the CUSTOMIZATION work begins.
>
> How do I add a select option driven by a database table to my
> View(form)?
>
> The developer finds a solution in the Documentation use
> generateList().
>
> The developer applies generateList() to the application.
>
> Many trials and failures follow.
>
> Finally, the developer finds that generateList()  is deprecated.
>
> The notes in the Documentation regarding the deprecation of the
> generateList() are missing?
>
> Time Wasted!
>
> There are no notes on an alternative method!
>
> More frustration.
>
> More time.
>
> More research.
>
> CakePHP gurus provide the following:
>
> 1) Use "find" and "Set::combine". Those components are in the
> documentation.
>
> or
>
> 2) Download X,Y or Z web application and decontruct.
>
> Deconstruction!
>
> Yes!
>
> More research.
>
> More time.
>
> CakePHP users will try components 2,3, 4 or more times before an error
> isn't kicked out because there is a lack of specific examples.
>
> Did the guru say "find", "find(''list"), find("all"), "findAll()",
> "generateList(), etc. etc. etc. which one? They are all in the
> Documentation.
>
> How many times does a user have to test "find", "find(''list"),
> find("all"), "findAll()", "generateList(), etc. etc. etc. before they
> find that the solution to this fundamental form requirement, "a select
> option" based upon a database doesn't produce the desired results.
>
> Why?
>
> That component requires the use of another component.
>
> Remember? Set::combine?
>
> More time.
>
> More research.
>
> More testing.
>
> Do you remember the web developers original question which brought
> them to the Documentation?
>
> How is a select option based upon a database table added to a
> View(form)?
>
> How much time does a user spend to find the component(s) needed to
> answer this basic web application question?
>
> How much time does a user spend to find out how, when and where to use
> those components with what dependencies (Model, Controller and View)
> are required?
>
> More research!
>
> More testing!
>
> Is providing, in the documentation, the answer to this type of
> question beyond the scope of the Documentation?
>
> I don't think that it is.
>
> Therefore, I rate the Documentation a 5.
>
> The Documentation at this time is more of a compendium, repository,
> alphabetical list of all of the neat things (components) that CakePHP
> developers have built.
>
> Cool.
>
> Some of the components in the Documentation are deprecated. Some are
> not. Some deprecated items are noted as such and provide alternatives.
> Some aren't and don't. Some components have examples on how to they
> are to be used. Some don't.
>
> What ever time a user saves by using cakePHP framework will be spent
> and then some on research and testing?
>
> That is until the developer has built their own repository of
> solutions to common requirements such as how to add a selection option
> to a View(form).
>
> Why?
>
> While the components to a solution are in the documentation, the
> solution is not and

Re: simple noob problem with database fetching

2008-06-24 Thread Turnquist, Jonah

Hey guys, I actually found a (better) solution by accident.  Check
this link for anyone else that is interested:

http://cakebaker.42dh.com/2008/05/18/new-core-behavior-containable/



On Jun 24, 12:09 pm, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
> Yeah I guess I'm going to need to do a lot of thinking about this.
> Thanks.  And thanks for the link Renan, it actually helped.  I now see
> there is a 'fields' option in the hasMany field, maybe I could use the
> bind() or bindModel() function to temporarily change that setting
> before using find().  I'll try it if I end up needing this again.
>
> On Jun 24, 12:56 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]>
> wrote:
>
> > Your routes are really a matter of preference and your decision would
> > depend on the structure of your site and your plans for the future.
> > Think carefully how you want to expand one day and see what's the best
> > way to start.
>
> > On Jun 24, 1:39 am, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > > I actually figured out I don't need to do this.  But I am still
> > > curious.
>
> > > Does it make more sense to you guys that a category page would be at
>
> > > scripts/category/
> > > or
> > > /categories/view:scripts/
>
> > > ??
> > >  And also /entries/index redirects to /categories/scripts which lists
> > > all the categories
>
> > > Note I have one of these for all types of entries: scripts, examples
> > > and tutorials
>
> > > Hmm... maybe I should just use a tree category system and scripts,
> > > examples and tutorials could be the top level categories.  than in the
> > > future I could also add classes, cakephp helpers and etc  wow writing
> > > really helps me brainstorm
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: simple noob problem with database fetching

2008-06-24 Thread Turnquist, Jonah

Yeah I guess I'm going to need to do a lot of thinking about this.
Thanks.  And thanks for the link Renan, it actually helped.  I now see
there is a 'fields' option in the hasMany field, maybe I could use the
bind() or bindModel() function to temporarily change that setting
before using find().  I'll try it if I end up needing this again.

On Jun 24, 12:56 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]>
wrote:
> Your routes are really a matter of preference and your decision would
> depend on the structure of your site and your plans for the future.
> Think carefully how you want to expand one day and see what's the best
> way to start.
>
> On Jun 24, 1:39 am, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > I actually figured out I don't need to do this.  But I am still
> > curious.
>
> > Does it make more sense to you guys that a category page would be at
>
> > scripts/category/
> > or
> > /categories/view:scripts/
>
> > ??
> >  And also /entries/index redirects to /categories/scripts which lists
> > all the categories
>
> > Note I have one of these for all types of entries: scripts, examples
> > and tutorials
>
> > Hmm... maybe I should just use a tree category system and scripts,
> > examples and tutorials could be the top level categories.  than in the
> > future I could also add classes, cakephp helpers and etc  wow writing
> > really helps me brainstorm
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: simple noob problem with database fetching

2008-06-23 Thread Turnquist, Jonah


I actually figured out I don't need to do this.  But I am still
curious.

Does it make more sense to you guys that a category page would be at

scripts/category/
or
/categories/view:scripts/

??
 And also /entries/index redirects to /categories/scripts which lists
all the categories

Note I have one of these for all types of entries: scripts, examples
and tutorials

Hmm... maybe I should just use a tree category system and scripts,
examples and tutorials could be the top level categories.  than in the
future I could also add classes, cakephp helpers and etc  wow writing
really helps me brainstorm
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: simple noob problem with database fetching

2008-06-23 Thread Turnquist, Jonah


I actually figured out I don't need to do this.  But I am still
curious.

Does it make more sense to you guys that a category page would be at

scripts/category/
or
/categories/view:scripts/

??
 And also /entries/index redirects to /categories/scripts which lists
all the categories

Note I have one of these for all types of entries: scripts, examples
and tutorials

Hmm... maybe I should just use a tree category system and scripts,
examples and tutorials could be the top level categories.  than in the
future I could also add classes, cakephp helpers and etc  wow writing
really helps me brainstorm
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: simple noob problem with database fetching

2008-06-23 Thread Turnquist, Jonah

Ok thanks.  I think you misunderstood the first question though
>>> How do I limit the columns from the second quarry?

I meant how do you limit which columns are returned, for instance, I
want to return 'name', 'created' and 'description' from the table, but
not 'content'

On Jun 23, 3:37 pm, "Renan Gonçalves" <[EMAIL PROTECTED]> wrote:
> > How do I limit the columns from the second quarry?
>
> You set limit propertie in your hasMany relationship, like:
>
> $this->Category->hasMany['Script']['limit'] = 10;
> $this->Category->find...
>
> Also, why is cake not doing a join, but instead two separate quarries?
>
> > wouldn't that be faster?
>
> Joins are used in belongsTo and hasOne relationship.
>
> []'s
>
> On Mon, Jun 23, 2008 at 7:14 PM, Turnquist, Jonah <[EMAIL PROTECTED]>
> wrote:
>
>
>
>
>
> > Ok, now I have another question.  I understand that I can set 'fields'
> > to return only some of the table columns of the categories table.  But
> > how do I limit the columns returned from the Scripts/Entries table
> > which also gets pulled because of my hasMany definition?
>
> > 1       SELECT `Category`.`name`, `Category`.`id` FROM `categories` AS
> > `Category` WHERE `Category`.`id` = 2 LIMIT 1
>
> > 2       SELECT `Script`.`id`, `Script`.`title`, `Script`.`description`,
> > `Script`.`content`, `Script`.`category_id`, `Script`.`user_id`,
> > `Script`.`created`, `Script`.`modified` FROM `scripts` AS `Script`
> > WHERE `Script`.`category_id` IN (2)
>
> > How do I limit the columns from the second quarry?  Doing this
> > prevented it from pulling `created` from Categories:
> > $this->set('category', $this->Category->read('name')); //(it still
> > pulls the id though, so I am assuming you can not prevent that)
> > //or (seems to do the same thing)
> > $this->set('category', $this->Category->find(array('id' => $id),
> > 'name'));
>
> > Also, why is cake not doing a join, but instead two separate quarries?
> > wouldn't that be faster?
>
> > I would think this would work:
> > $this->set('category', $this->Category->find( array('id' => $id),
> > array('Category.name', 'Script.title', 'Script.description') ));
> > But it doesn't! grr
>
> > Thanks,
> > Jonah
>
> --
> Renan Gonçalves - Software Engineer
> Cell Phone: +55 11 8633 6018
> MSN: [EMAIL PROTECTED]
> São Paulo - SP/Brazil
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: simple noob problem with database fetching

2008-06-23 Thread Turnquist, Jonah

Ok thanks.  I think you misunderstood the first question though
>>> How do I limit the columns from the second quarry?

I meant how do you limit which columns are returned, for instance, I
want to return 'name', 'created' and 'description' from the table, but
not 'content'

On Jun 23, 3:37 pm, "Renan Gonçalves" <[EMAIL PROTECTED]> wrote:
> > How do I limit the columns from the second quarry?
>
> You set limit propertie in your hasMany relationship, like:
>
> $this->Category->hasMany['Script']['limit'] = 10;
> $this->Category->find...
>
> Also, why is cake not doing a join, but instead two separate quarries?
>
> > wouldn't that be faster?
>
> Joins are used in belongsTo and hasOne relationship.
>
> []'s
>
> On Mon, Jun 23, 2008 at 7:14 PM, Turnquist, Jonah <[EMAIL PROTECTED]>
> wrote:
>
>
>
>
>
> > Ok, now I have another question.  I understand that I can set 'fields'
> > to return only some of the table columns of the categories table.  But
> > how do I limit the columns returned from the Scripts/Entries table
> > which also gets pulled because of my hasMany definition?
>
> > 1       SELECT `Category`.`name`, `Category`.`id` FROM `categories` AS
> > `Category` WHERE `Category`.`id` = 2 LIMIT 1
>
> > 2       SELECT `Script`.`id`, `Script`.`title`, `Script`.`description`,
> > `Script`.`content`, `Script`.`category_id`, `Script`.`user_id`,
> > `Script`.`created`, `Script`.`modified` FROM `scripts` AS `Script`
> > WHERE `Script`.`category_id` IN (2)
>
> > How do I limit the columns from the second quarry?  Doing this
> > prevented it from pulling `created` from Categories:
> > $this->set('category', $this->Category->read('name')); //(it still
> > pulls the id though, so I am assuming you can not prevent that)
> > //or (seems to do the same thing)
> > $this->set('category', $this->Category->find(array('id' => $id),
> > 'name'));
>
> > Also, why is cake not doing a join, but instead two separate quarries?
> > wouldn't that be faster?
>
> > I would think this would work:
> > $this->set('category', $this->Category->find( array('id' => $id),
> > array('Category.name', 'Script.title', 'Script.description') ));
> > But it doesn't! grr
>
> > Thanks,
> > Jonah
>
> --
> Renan Gonçalves - Software Engineer
> Cell Phone: +55 11 8633 6018
> MSN: [EMAIL PROTECTED]
> São Paulo - SP/Brazil
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: simple noob problem with database fetching

2008-06-23 Thread Turnquist, Jonah

Ok, now I have another question.  I understand that I can set 'fields'
to return only some of the table columns of the categories table.  But
how do I limit the columns returned from the Scripts/Entries table
which also gets pulled because of my hasMany definition?

1   SELECT `Category`.`name`, `Category`.`id` FROM `categories` AS
`Category` WHERE `Category`.`id` = 2 LIMIT 1

2   SELECT `Script`.`id`, `Script`.`title`, `Script`.`description`,
`Script`.`content`, `Script`.`category_id`, `Script`.`user_id`,
`Script`.`created`, `Script`.`modified` FROM `scripts` AS `Script`
WHERE `Script`.`category_id` IN (2)

How do I limit the columns from the second quarry?  Doing this
prevented it from pulling `created` from Categories:
$this->set('category', $this->Category->read('name')); //(it still
pulls the id though, so I am assuming you can not prevent that)
//or (seems to do the same thing)
$this->set('category', $this->Category->find(array('id' => $id),
'name'));

Also, why is cake not doing a join, but instead two separate quarries?
wouldn't that be faster?

I would think this would work:
$this->set('category', $this->Category->find( array('id' => $id),
array('Category.name', 'Script.title', 'Script.description') ));
But it doesn't! grr

Thanks,
Jonah

--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: partial recursion?

2008-06-21 Thread Turnquist, Jonah

ok, sounds good to me! Thanx

Jonah

On Jun 21, 6:40 am, Ian Zepp <[EMAIL PROTECTED]> wrote:
> As a general rule, cake needs to know the DB table layouts in order to
> perform queries. As you've seen, unbinding the model associations
> prevents Cake from joining the tables at query time.
>
> RE the describe, however, I wouldn't worry about it for two reasons:
>
> (a) DESCRIBE is essentially a no-cost operation to the DB server. The
> table schema is already stored in memory, so it is returning results
> instantly with o overhead.
> (b) DESCRIBE is cached in a production environment. Only in a dev
> environment are the results not cached, and hence re-fetched each time,
> so that if you make changes to the table schema they are immediately used.
>
> Turnquist, Jonah wrote:
> > Should not have posted so fast.  I seem to have found a solution:
>
> > $this->Script->unbindModel(
> >    array('belongsTo' => array('Category'))
> > );
>
> > That temporally removes the relationship.  Works perfectally to remove
> > the extra join.  But it still performs quarry #2, "DESCRIBE
> > `categories`".  humph.  Why does it do that?
>
> > Thanks,
> > Jonah
>
> > On Jun 20, 9:54 pm, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
> >> BTW i am using CakePHP 1.2
>
> >> On Jun 20, 9:33 pm, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> >>> Ok, so I have a Scripts table, holding php script entries (tutorials),
> >>> a Categories table, and a Users table.  Each script has a category and
> >>> a user.  I have all the hasMany belongsTo etc set up properly.
> >>> On my /scripts page, under the index action it lists all of the
> >>> scripts, displaying the script title, and it's user that created it,
> >>> but not it's category.  So it should not even fetch category data.  So
> >>> this is what it needs to fetch:
> >>> [0] => Array
> >>>     (
> >>>         [Script] => Array
> >>>             (
> >>>                 [id] => 1
> >>>                 [title] => DB connect
> >>>                 [created] => 2001-06-18 16:05:40
> >>>                 [description] => This class that will connect to the
> >>> database test
> >>>             )
> >>>          [User] => Array
> >>>             (
> >>>                 [name] => man
> >>>                 [id] => 1
> >>>             )
> >>>     )
> >>> The find() code that is working and doing the above:
> >>> $this->set('scripts', $this->Script->find('all', array(
> >>>         //'recursive' => -1, //this is commented out
> >>>         'fields' => array('Script.id', 'Script.title', 'Script.created',
> >>> 'Script.description', 'User.name', 'User.id'),
> >>>         )
> >>> ));
> >>> Setting the 'fields' option kept it from returning any categories
> >>> data.
> >>> This successfully returns the correct data.  BUT, when I looked at the
> >>> quarries, I saw a problem:
> >>> 1)   DESCRIBE `scripts`
> >>> 2)   DESCRIBE `categories`  //not needed!
> >>> 3)   DESCRIBE `users`
> >>> 4)   SELECT `Script`.`id`, `Script`.`title`, `Script`.`created`,
> >>> `Script`.`description`, `User`.`name`, `User`.`id` FROM `scripts` AS
> >>> `Script` LEFT JOIN `categories` AS `Category` ON
> >>> (`Script`.`category_id` = `Category`.`id`) LEFT JOIN `users` AS `User`
> >>> ON (`Script`.`user_id` = `User`.`id`) WHERE 1 = 1  //excessive!
> >>> You see, it is doing a left join on categories in quarry #4, and
> >>> quarry #2 is not even needed.  I understand joins can be slow.  Thus I
> >>> am asking how can I get rid of it
> >>> I tried setting the option 'recursive' => -1 (you can see it commented
> >>> out), but that obviously stops it from collecting the user data too.
> >>> So I guess what I need is a partial recursion?  So it performs
> >>> recursion to the Users table but not the Categories table?  How can
> >>> this be done? any ideas?
> >>> Thanks,
> >>> Jonah (is very new to cake BTW, try not to use big words lol
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: partial recursion?

2008-06-20 Thread Turnquist, Jonah

Should not have posted so fast.  I seem to have found a solution:

$this->Script->unbindModel(
array('belongsTo' => array('Category'))
);

That temporally removes the relationship.  Works perfectally to remove
the extra join.  But it still performs quarry #2, "DESCRIBE
`categories`".  humph.  Why does it do that?

Thanks,
Jonah

On Jun 20, 9:54 pm, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
> BTW i am using CakePHP 1.2
>
> On Jun 20, 9:33 pm, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > Ok, so I have a Scripts table, holding php script entries (tutorials),
> > a Categories table, and a Users table.  Each script has a category and
> > a user.  I have all the hasMany belongsTo etc set up properly.
>
> > On my /scripts page, under the index action it lists all of the
> > scripts, displaying the script title, and it's user that created it,
> > but not it's category.  So it should not even fetch category data.  So
> > this is what it needs to fetch:
>
> > [0] => Array
> >     (
> >         [Script] => Array
> >             (
> >                 [id] => 1
> >                 [title] => DB connect
> >                 [created] => 2001-06-18 16:05:40
> >                 [description] => This class that will connect to the
> > database test
> >             )
>
> >          [User] => Array
> >             (
> >                 [name] => man
> >                 [id] => 1
> >             )
>
> >     )
>
> > The find() code that is working and doing the above:
>
> > $this->set('scripts', $this->Script->find('all', array(
> >         //'recursive' => -1, //this is commented out
> >         'fields' => array('Script.id', 'Script.title', 'Script.created',
> > 'Script.description', 'User.name', 'User.id'),
> >         )
> > ));
>
> > Setting the 'fields' option kept it from returning any categories
> > data.
>
> > This successfully returns the correct data.  BUT, when I looked at the
> > quarries, I saw a problem:
> > 1)   DESCRIBE `scripts`
> > 2)   DESCRIBE `categories`  //not needed!
> > 3)   DESCRIBE `users`
> > 4)   SELECT `Script`.`id`, `Script`.`title`, `Script`.`created`,
> > `Script`.`description`, `User`.`name`, `User`.`id` FROM `scripts` AS
> > `Script` LEFT JOIN `categories` AS `Category` ON
> > (`Script`.`category_id` = `Category`.`id`) LEFT JOIN `users` AS `User`
> > ON (`Script`.`user_id` = `User`.`id`) WHERE 1 = 1  //excessive!
>
> > You see, it is doing a left join on categories in quarry #4, and
> > quarry #2 is not even needed.  I understand joins can be slow.  Thus I
> > am asking how can I get rid of it
>
> > I tried setting the option 'recursive' => -1 (you can see it commented
> > out), but that obviously stops it from collecting the user data too.
> > So I guess what I need is a partial recursion?  So it performs
> > recursion to the Users table but not the Categories table?  How can
> > this be done? any ideas?
>
> > Thanks,
> > Jonah (is very new to cake BTW, try not to use big words lol
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: partial recursion?

2008-06-20 Thread Turnquist, Jonah

BTW i am using CakePHP 1.2

On Jun 20, 9:33 pm, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
> Ok, so I have a Scripts table, holding php script entries (tutorials),
> a Categories table, and a Users table.  Each script has a category and
> a user.  I have all the hasMany belongsTo etc set up properly.
>
> On my /scripts page, under the index action it lists all of the
> scripts, displaying the script title, and it's user that created it,
> but not it's category.  So it should not even fetch category data.  So
> this is what it needs to fetch:
>
> [0] => Array
>     (
>         [Script] => Array
>             (
>                 [id] => 1
>                 [title] => DB connect
>                 [created] => 2001-06-18 16:05:40
>                 [description] => This class that will connect to the
> database test
>             )
>
>          [User] => Array
>             (
>                 [name] => man
>                 [id] => 1
>             )
>
>     )
>
> The find() code that is working and doing the above:
>
> $this->set('scripts', $this->Script->find('all', array(
>         //'recursive' => -1, //this is commented out
>         'fields' => array('Script.id', 'Script.title', 'Script.created',
> 'Script.description', 'User.name', 'User.id'),
>         )
> ));
>
> Setting the 'fields' option kept it from returning any categories
> data.
>
> This successfully returns the correct data.  BUT, when I looked at the
> quarries, I saw a problem:
> 1)   DESCRIBE `scripts`
> 2)   DESCRIBE `categories`  //not needed!
> 3)   DESCRIBE `users`
> 4)   SELECT `Script`.`id`, `Script`.`title`, `Script`.`created`,
> `Script`.`description`, `User`.`name`, `User`.`id` FROM `scripts` AS
> `Script` LEFT JOIN `categories` AS `Category` ON
> (`Script`.`category_id` = `Category`.`id`) LEFT JOIN `users` AS `User`
> ON (`Script`.`user_id` = `User`.`id`) WHERE 1 = 1  //excessive!
>
> You see, it is doing a left join on categories in quarry #4, and
> quarry #2 is not even needed.  I understand joins can be slow.  Thus I
> am asking how can I get rid of it
>
> I tried setting the option 'recursive' => -1 (you can see it commented
> out), but that obviously stops it from collecting the user data too.
> So I guess what I need is a partial recursion?  So it performs
> recursion to the Users table but not the Categories table?  How can
> this be done? any ideas?
>
> Thanks,
> Jonah (is very new to cake BTW, try not to use big words lol
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



partial recursion?

2008-06-20 Thread Turnquist, Jonah

Ok, so I have a Scripts table, holding php script entries (tutorials),
a Categories table, and a Users table.  Each script has a category and
a user.  I have all the hasMany belongsTo etc set up properly.

On my /scripts page, under the index action it lists all of the
scripts, displaying the script title, and it's user that created it,
but not it's category.  So it should not even fetch category data.  So
this is what it needs to fetch:

[0] => Array
(
[Script] => Array
(
[id] => 1
[title] => DB connect
[created] => 2001-06-18 16:05:40
[description] => This class that will connect to the
database test
)

 [User] => Array
(
[name] => man
[id] => 1
)

)

The find() code that is working and doing the above:

$this->set('scripts', $this->Script->find('all', array(
//'recursive' => -1, //this is commented out
'fields' => array('Script.id', 'Script.title', 'Script.created',
'Script.description', 'User.name', 'User.id'),
)
));

Setting the 'fields' option kept it from returning any categories
data.

This successfully returns the correct data.  BUT, when I looked at the
quarries, I saw a problem:
1)   DESCRIBE `scripts`
2)   DESCRIBE `categories`  //not needed!
3)   DESCRIBE `users`
4)   SELECT `Script`.`id`, `Script`.`title`, `Script`.`created`,
`Script`.`description`, `User`.`name`, `User`.`id` FROM `scripts` AS
`Script` LEFT JOIN `categories` AS `Category` ON
(`Script`.`category_id` = `Category`.`id`) LEFT JOIN `users` AS `User`
ON (`Script`.`user_id` = `User`.`id`) WHERE 1 = 1  //excessive!

You see, it is doing a left join on categories in quarry #4, and
quarry #2 is not even needed.  I understand joins can be slow.  Thus I
am asking how can I get rid of it

I tried setting the option 'recursive' => -1 (you can see it commented
out), but that obviously stops it from collecting the user data too.
So I guess what I need is a partial recursion?  So it performs
recursion to the Users table but not the Categories table?  How can
this be done? any ideas?

Thanks,
Jonah (is very new to cake BTW, try not to use big words lol
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: how do I handle foreign keys??

2008-06-20 Thread Turnquist, Jonah

Ok, it works now.  I guess $uses is what I was missing.  Thanks

On Jun 20, 8:08 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Fri, Jun 20, 2008 at 10:33 PM, Turnquist, Jonah <[EMAIL PROTECTED]> wrote:
>
> > Eh, it did not work.  And I read those pages, it does not seem to tell
> > me.  Do I need to do this manually using find() to find all the
> > categories and than pass those to the input through 'options' or will
> > cake do some magic because of my $belongsTo definition?  Also, if I do
> > it manually, how would I call the Categories modal from the Scripts
> > controller?  This obviously did not work in my Scripts controller:
> > $this->Category->find('all', array('recursive' => -1));
>
> It looks to me like you're trying to generate a list of things for
> your form.  If so, try this from your scripts controller:
>
> $this->Entry->Category->recursive = -1;
> $results = $this->Entry->Category->find('list');
>
> Make sure that you've set the $uses variable in your Scripts
> controller to tell it you want to use Entry.
>
> class ScriptsController extends AppController {
>      var $uses = array('Entry', ...)
>      ...
>
> }
>
> Hope that helps.
>
> --
> Chris Hartjes
> Internet Loudmouth
> Motto for 2008: "Moving from herding elephants to handling snakes..."
> @TheKeyBoard:http://www.littlehart.net/atthekeyboard
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: how do I handle foreign keys??

2008-06-20 Thread Turnquist, Jonah

Eh, it did not work.  And I read those pages, it does not seem to tell
me.  Do I need to do this manually using find() to find all the
categories and than pass those to the input through 'options' or will
cake do some magic because of my $belongsTo definition?  Also, if I do
it manually, how would I call the Categories modal from the Scripts
controller?  This obviously did not work in my Scripts controller:
$this->Category->find('all', array('recursive' => -1));

Thanks,
Jonah

On Jun 20, 12:40 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]>
wrote:
> Try using $form->select('Entry.category_id', ...)
>
> http://manual.cakephp.org/view/182/formhttp://api.cakephp.org/class_form_helper.html#5171e675468c9665db0653c...
>
> Any if you get stuck, read this one too:
>
> http://groups.google.com/group/cake-php/browse_thread/thread/fb6b71db...
>
> On Jun 20, 2:35 am, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > 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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: simple noob problem with database fetching

2008-06-20 Thread Turnquist, Jonah

Ok, now I understand.  You've helped me greatly!

Jonah

On Jun 20, 4:37 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote:
> No, because in the first case, the first param is not supposed to be
> 'all':
>
> As you already know, the first param is "$conditions", so in the first
> case, $conditions should simply be null as you _don't have_ any
> conditions.
>
> There are some examples in the cookbook:
>
> http://book.cakephp.org/view/449/find
>
> On Jun 20, 12:44 pm, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > So how would I use the first case (for future reference)?  Why did the
> > one below not work?  Isn't the one below the first case?
>
> > $this->set('categories', $this->Category->find('all', array(), null,
> > -1));
>
> > Thanks
>
> > On Jun 20, 1:50 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote:
>
> > > There are two "styles" of using find() if you look at the description
> > > of Model->find():
>
> > > 1. Where you use all the params:
>
> > > find(array('name' => 'Thomas Anderson'), array('name', 'email'),
> > > 'field3 DESC', 2);
>
> > > 2. Where you can basically use just the first two:
>
> > > find('all', array('conditions' => array('name' => 'Thomas Anderson'),
> > > 'fields' => array('name', 'email'), 'order' => 'field3 DESC',
> > > 'recursive' => 2, 'group' => 'type'));
>
> > > I don't think the other two params are checked in the latter case
> > > (doesn't seem logical anyway).
>
> > > On Jun 20, 9:57 am, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > > > It worked.  But why?  I did check the api, and it said this should do
> > > > it:
>
> > > > $this->set('categories', $this->Category->find('all', array(), null,
> > > > -1));
>
> > > > The definition:
>
> > > > Model::find     (       $        conditions = null,
> > > >                 $       fields = array(),
> > > >                 $       order = null,
> > > >                 $       recursive = null
> > > >         )
>
> > > > Shouldn't both codes do the same thing?  is this a bug?
>
> > > > On Jun 20, 12:47 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]>
> > > > wrote:
>
> > > > > $this->set('categories', $this->Category->find('all',
> > > > > array('recursive' => -1)));
>
> > > > > That should do it. ;-)
>
> > > > >http://api.cakephp.org/class_model.html#e60758f27fa8486a063b8cc424bad741
>
> > > > > Always check the API and/or The Cookbook before asking here, it will
> > > > > make your development a lot faster an less painful.
>
> > > > > Happy baking!
>
> > > > > On Jun 20, 9:05 am, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > > > > > Ok, I have a scripts table, a categories table and a users table.
>
> > > > > > The scripts table $belongsTo = array('Category', 'User');
>
> > > > > > The categories table $hasMany = array('Script');
>
> > > > > > I have not made a modal or page for the users yet.
>
> > > > > > I have a index page for the categories.  This page shows all of the
> > > > > > categories as a linked list. Here is the controller code:
> > > > > >         function index() {
> > > > > >                 $this->set('categories', 
> > > > > > $this->Category->find('all'));
> > > > > >         }
>
> > > > > > And in the view I have it display (loop through) all the categories
> > > > > > and it works perfectally.
>
> > > > > > The problem: it is pulling more data from the database than is
> > > > > > needed.  This is what it is pulling (it is pulling the scripts also 
> > > > > > as
> > > > > > you can see):
>
> > > > > > Array
> > > > > > (
> > > > > >     [0] => Array
> 

Re: simple noob problem with database fetching

2008-06-20 Thread Turnquist, Jonah

So how would I use the first case (for future reference)?  Why did the
one below not work?  Isn't the one below the first case?

$this->set('categories', $this->Category->find('all', array(), null,
-1));

Thanks

On Jun 20, 1:50 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote:
> There are two "styles" of using find() if you look at the description
> of Model->find():
>
> 1. Where you use all the params:
>
> find(array('name' => 'Thomas Anderson'), array('name', 'email'),
> 'field3 DESC', 2);
>
> 2. Where you can basically use just the first two:
>
> find('all', array('conditions' => array('name' => 'Thomas Anderson'),
> 'fields' => array('name', 'email'), 'order' => 'field3 DESC',
> 'recursive' => 2, 'group' => 'type'));
>
> I don't think the other two params are checked in the latter case
> (doesn't seem logical anyway).
>
> On Jun 20, 9:57 am, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > It worked.  But why?  I did check the api, and it said this should do
> > it:
>
> > $this->set('categories', $this->Category->find('all', array(), null,
> > -1));
>
> > The definition:
>
> > Model::find     (       $        conditions = null,
> >                 $       fields = array(),
> >                 $       order = null,
> >                 $       recursive = null
> >         )
>
> > Shouldn't both codes do the same thing?  is this a bug?
>
> > On Jun 20, 12:47 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]>
> > wrote:
>
> > > $this->set('categories', $this->Category->find('all',
> > > array('recursive' => -1)));
>
> > > That should do it. ;-)
>
> > >http://api.cakephp.org/class_model.html#e60758f27fa8486a063b8cc424bad741
>
> > > Always check the API and/or The Cookbook before asking here, it will
> > > make your development a lot faster an less painful.
>
> > > Happy baking!
>
> > > On Jun 20, 9:05 am, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > > > Ok, I have a scripts table, a categories table and a users table.
>
> > > > The scripts table $belongsTo = array('Category', 'User');
>
> > > > The categories table $hasMany = array('Script');
>
> > > > I have not made a modal or page for the users yet.
>
> > > > I have a index page for the categories.  This page shows all of the
> > > > categories as a linked list. Here is the controller code:
> > > >         function index() {
> > > >                 $this->set('categories', $this->Category->find('all'));
> > > >         }
>
> > > > And in the view I have it display (loop through) all the categories
> > > > and it works perfectally.
>
> > > > The problem: it is pulling more data from the database than is
> > > > needed.  This is what it is pulling (it is pulling the scripts also as
> > > > you can see):
>
> > > > Array
> > > > (
> > > >     [0] => Array
> > > >         (
> > > >             [Category] => Array
> > > >                 (
> > > >                     [id] => 1
> > > >                     [name] => cat1
> > > >                     [created] =>
> > > >                 )
>
> > > >             [Script] => Array
> > > >                 (
> > > >                     [0] => Array
> > > >                         (
> > > >                             [id] => 1
> > > >                             [title] => DB connect
> > > >                             [description] => This class that will
> > > > connect to the database test
> > > >                             [content] => content here
> > > >                             [category_id] => 1
> > > >                             [user_id] => 1
> > > >                             [created] => 2001-06-18 16:05:40
> > > >                             [modified] => 2008-06-18 19:58:29
> > > >                         )
> > > >                 )
> > > >         )
> > > &g

Re: simple noob problem with database fetching

2008-06-20 Thread Turnquist, Jonah

It worked.  But why?  I did check the api, and it said this should do
it:

$this->set('categories', $this->Category->find('all', array(), null,
-1));

The definition:

Model::find (   $conditions = null,
$   fields = array(),
$   order = null,
$   recursive = null
)

Shouldn't both codes do the same thing?  is this a bug?

On Jun 20, 12:47 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]>
wrote:
> $this->set('categories', $this->Category->find('all',
> array('recursive' => -1)));
>
> That should do it. ;-)
>
> http://api.cakephp.org/class_model.html#e60758f27fa8486a063b8cc424bad741
>
> Always check the API and/or The Cookbook before asking here, it will
> make your development a lot faster an less painful.
>
> Happy baking!
>
> On Jun 20, 9:05 am, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > Ok, I have a scripts table, a categories table and a users table.
>
> > The scripts table $belongsTo = array('Category', 'User');
>
> > The categories table $hasMany = array('Script');
>
> > I have not made a modal or page for the users yet.
>
> > I have a index page for the categories.  This page shows all of the
> > categories as a linked list. Here is the controller code:
> >         function index() {
> >                 $this->set('categories', $this->Category->find('all'));
> >         }
>
> > And in the view I have it display (loop through) all the categories
> > and it works perfectally.
>
> > The problem: it is pulling more data from the database than is
> > needed.  This is what it is pulling (it is pulling the scripts also as
> > you can see):
>
> > Array
> > (
> >     [0] => Array
> >         (
> >             [Category] => Array
> >                 (
> >                     [id] => 1
> >                     [name] => cat1
> >                     [created] =>
> >                 )
>
> >             [Script] => Array
> >                 (
> >                     [0] => Array
> >                         (
> >                             [id] => 1
> >                             [title] => DB connect
> >                             [description] => This class that will
> > connect to the database test
> >                             [content] => content here
> >                             [category_id] => 1
> >                             [user_id] => 1
> >                             [created] => 2001-06-18 16:05:40
> >                             [modified] => 2008-06-18 19:58:29
> >                         )
> >                 )
> >         )
> >     [1] => Array
> >         (
> >             [Category] => Array
> >                 (
> >                     [id] => 2
> >                     [name] => Second Category
> >                     [created] =>
> >                 )
>
> >             [Script] => Array
> >                 (
> >                     [0] => Array
> >                         (
> >                             [id] => 2
> >                             [title] => shoutbox
> >                             [description] => this is an easy to
> > install shoutbox
> >                             [content] => content goes here
> >                             [category_id] => 2
> >                             [user_id] => 2
> >                             [created] => 2008-06-05 22:29:09
> >                             [modified] => 2008-06-19 15:54:19
> >                         )
> >                 )
> >         )
> > )
>
> > When all I really need is this:
>
> > Array
> > (
> >     [0] => Array
> >         (
> >             [Category] => Array
> >                 (
> >                     [id] => 1
> >                     [name] => cat1
> >                     [created] =>
> >                 )
> >         )
>
> >     [1] => Array
> >         (
> >             [Category] => Array
> >                 (
> >                     [id] => 2
> >                     [name] => Second Category
> >                     [created] =>
> >                 )
>
> >         )
>
> > )
>
> > I do not need nor want it to pull the scripts!
&g

simple noob problem with database fetching

2008-06-20 Thread Turnquist, Jonah

Ok, I have a scripts table, a categories table and a users table.

The scripts table $belongsTo = array('Category', 'User');

The categories table $hasMany = array('Script');

I have not made a modal or page for the users yet.


I have a index page for the categories.  This page shows all of the
categories as a linked list. Here is the controller code:
function index() {
$this->set('categories', $this->Category->find('all'));
}

And in the view I have it display (loop through) all the categories
and it works perfectally.

The problem: it is pulling more data from the database than is
needed.  This is what it is pulling (it is pulling the scripts also as
you can see):

Array
(
[0] => Array
(
[Category] => Array
(
[id] => 1
[name] => cat1
[created] =>
)

[Script] => Array
(
[0] => Array
(
[id] => 1
[title] => DB connect
[description] => This class that will
connect to the database test
[content] => content here
[category_id] => 1
[user_id] => 1
[created] => 2001-06-18 16:05:40
[modified] => 2008-06-18 19:58:29
)
)
)
[1] => Array
(
[Category] => Array
(
[id] => 2
[name] => Second Category
[created] =>
)

[Script] => Array
(
[0] => Array
(
[id] => 2
[title] => shoutbox
[description] => this is an easy to
install shoutbox
[content] => content goes here
[category_id] => 2
[user_id] => 2
[created] => 2008-06-05 22:29:09
[modified] => 2008-06-19 15:54:19
)
)
)
)

When all I really need is this:

Array
(
[0] => Array
(
[Category] => Array
(
[id] => 1
[name] => cat1
[created] =>
)
)



[1] => Array
(
[Category] => Array
(
[id] => 2
[name] => Second Category
[created] =>
)

)

)

I do not need nor want it to pull the scripts!

It is doing both these quarries:

SELECT `Category`.`id`, `Category`.`name`, `Category`.`created` FROM
`categories` AS `Category` WHERE 1 = 1

SELECT `Script`.`id`, `Script`.`title`, `Script`.`description`,
`Script`.`content`, `Script`.`category_id`, `Script`.`user_id`,
`Script`.`created`, `Script`.`modified` FROM `scripts` AS `Script`
WHERE `Script`.`category_id` IN (1, 2, 3)

But I really only need the first listed quarry.  It seems to me that
the $recursive argument of find() should do it but it is not working
for me.  I tried setting $recursive = -1

I feel like there is some simple option that needs to be set somewhere
and that's it.  Any ideas?

Thanks,
Jonah
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



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:

Add Entry
create('Entry');
echo $form->input('category_id');
echo $form->end('Submit');
?>

Model:


Category modal:
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



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 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 the helper.  That does not mean I should not optimize
> > other areas besides the database.  Also I do not want the Time helper
> > loaded into all the actions because they are not used there, and that
> > is bad organization, and organization is what cakePHP is about,
> > right?  So why not try to be organized.
>
> My point was that there are probably other things that are more likely
> to affect the performance of your application than loading the Time
> helper for every action in a controller.
>
> And how can you say that "it does not matter if the database is slower
> than the loading of the helper"?!?  Of course it matters.  How can
> someone who is so concerned about "speed" ignore such a thing as the
> "speed" at which you get data from a database?
>
> In the interest of avoiding further douchebaggery, I will agree to
> disagree with you on the topic of premature optimization.  Glad that
> Mr. Snook found the answer for you.  My solution was missing a step,
> but I have no idea if it was going to work:
>
> App::Import('Helper', 'Time');
> $timeHelper = new TimeHelper();
> $this->set('timeHelper', $timeHelper);
>
> and then in your view you could reference the helper via $timeHelper.
>
> Like I said, it *looks* good but no idea if it would work.
>
> --
> Chris Hartjes
> Internet Loudmouth
> Motto for 2008: "Moving from herding elephants to handling snakes..."
> @TheKeyBoard:http://www.littlehart.net/atthekeyboard
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Importing a helper

2008-06-18 Thread Turnquist, Jonah

Haha, lol nice,

On Jun 18, 6:32 pm, "Jonathan Snook" <[EMAIL PROTECTED]> wrote:
> > Hey that works.  Thanks.  I'm surprised this is not documented though.
>
> There, now it is:http://manual.cakephp.org/view/99/introduction
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Importing a helper

2008-06-18 Thread Turnquist, Jonah


On Jun 18, 5:41 pm, "Jonathan Snook" <[EMAIL PROTECTED]> wrote:
> While I haven't tried it, maybe give this a go in your action:
>
> function myaction(){
>
> $this->helpers[] = 'Time';
>
> }
>
> (I'm not entirely sure when helpers are instantiated but that seems
> like a viable solution.


Hey that works.  Thanks.  I'm surprised this is not documented though.

BTW if anyone else knows any other ways also do tell, as this method
might not work in later versions of cake.

from "Chris Hartjes"
> Your answer shows that you do not understand the question.  It's not
> about RAM, it's about performance.  It's likely that it will take more
> resources to talk to your database than to hold the time helper in
> memory.

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 the helper.  That does not mean I should not optimize
other areas besides the database.  Also I do not want the Time helper
loaded into all the actions because they are not used there, and that
is bad organization, and organization is what cakePHP is about,
right?  So why not try to be organized.

Thanks,
Jonah


--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Importing a helper

2008-06-18 Thread Turnquist, Jonah


> Did you try this in your index controller (assuming you are using 1.2):
>
> App::import('Helper', 'Time');
> $timeHelper = new TimeHelper;

No, I have not tried that.  I am using 1.2.  It still does not work
though. Here's my code:

controller:
class ScriptsController extends AppController {
function index() {
App::import('Helper', 'Time');
$timeHelper = new TimeHelper;
$this->set('scripts', $this->Script->find('all'));
}
[...]

View:
[...]
nice($script['Script']['created']); ?>
[...]

I got this error though:
Notice (8): Undefined variable: timeHelper [APP\views\scripts
\index.ctp, line 31]

> If you seriously think that having the Time helper included when your
> controller is loaded and being available for every action will reduce
> the speed of the application in any appreciable way, I doubt your
> ability to determine the choke points of an application.

If it does not slow it down why don't all the helpers just all get
loaded automatically?  I mean, the Time helper is 538 lines of code.
It must slow it down to load that into RAM and deal with it.

Thanks,
Jonah
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Importing a helper

2008-06-18 Thread Turnquist, Jonah

hello again guys

I grew a question (type: noobQuestion, cakeVersion: 1.2)

I need to include the Time helper in the 'index' action of the
'scripts' controller page.  I understand I can put this in the
controller:

var $helpers = array('Time');

But that would include it into all the actions, not just the 'index'
action which I need.  How do I include it into in index action alone?
I always worry about speed.  Also, can I include it from the view?
that would be best, as it is only used in the view.  How do i do this?

PS don't say I am to lazy to figure it out for myself, I tried.

Thanks,
Jonah
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Model Validation help

2008-06-06 Thread Turnquist, Jonah

Looking back over my last reply I think I might have sounded a bit
rude, sorry about that

I did the search as you said and found one instance of the function,
but was not able to make sense of it.  I did do some googling and
found this page though: http://grahambird.co.uk/cake/

quote from page:
What will Cake do for me?

Some of the things Cake does so you don’t have to:
* [...]
* automatically escapes data saved to the database (to prevent SQL
injection attacks)

That's all I needed to know.  Thanks for the help anyways

On Jun 6, 8:50 pm, "b logica" <[EMAIL PROTECTED]> wrote:
> Huh? Is it too difficult to open the file and search for the word 'escape'?
>
> I agree that Cake's inner workings are bloody mysterious, but if
> you're using PHP--period--"you should very well know" how to search a
> file for a method.
>
> On Fri, Jun 6, 2008 at 10:31 PM, Turnquist, Jonah <[EMAIL PROTECTED]> wrote:
>
> > If you are using cakephp and publish websites to the internet, you
> > should very well know if it is secure.  My question is do I have to do
> > something to the data before saving it to the database manually to
> > keep it mysql injection safe or does cake take care of that?
>
> > For instance do I need to use mysql_real_escape_string() with cake?
>
> > I  will look at the code too but as I can barely code with cake at
> > this point I doubt I will be able to understand it's inner workings
> > very well at this point either.
>
> > Thanks guys,
> > Jonah
>
> > On Jun 6, 5:18 pm, "b logica" <[EMAIL PROTECTED]> wrote:
> >> All of the various database frontends are in 
> >> cake/libs/model/datasources/dbo/
>
> >> On Fri, Jun 6, 2008 at 4:18 PM, Turnquist, Jonah <[EMAIL PROTECTED]> wrote:
>
> >> > Thank you! That was exactally what I was looking for.  That should
> >> > work nicely.
>
> >> > Still looking for the answer to this question though:
>
> >> > Also, does cakephp take care of mysql injection checking automagically
> >> > or do I have to call mysql_real_escape_string for everything
> >> > manually?   Or is there something else?
>
> >> > Thanks,
> >> > Jonah
>
> >> > On Jun 6, 7:02 am, Daniel Hofstetter <[EMAIL PROTECTED]> wrote:
> >> >> Hi Jonah,
>
> >> >> > Problem:
> >> >> > What if data is sent through that should NOT be stored in table?  How
> >> >> > do I stop that?  For example, say I had a column named
> >> >> > "do_not_store_data_here" in the table.  For some reason I do not want
> >> >> > any data stored there.  I can't think of any particular cases where I
> >> >> > would want to do that at the moment but just go with me.
>
> >> >> > I am asking how can I stop people from injecting data into there?  I
> >> >> > mean, they could easily inject it by sending post data with the key
> >> >> > data[Script][do_not_store_data_here].
>
> >> >> Have a look at the third parameter of Model::save(), it allows you to
> >> >> specify the fields which can be written.
>
> >> >> Hope that helps!
>
> >> >> --
> >> >> Daniel Hofstetterhttp://cakebaker.42dh.com
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Model Validation help

2008-06-06 Thread Turnquist, Jonah

If you are using cakephp and publish websites to the internet, you
should very well know if it is secure.  My question is do I have to do
something to the data before saving it to the database manually to
keep it mysql injection safe or does cake take care of that?

For instance do I need to use mysql_real_escape_string() with cake?

I  will look at the code too but as I can barely code with cake at
this point I doubt I will be able to understand it's inner workings
very well at this point either.

Thanks guys,
Jonah

On Jun 6, 5:18 pm, "b logica" <[EMAIL PROTECTED]> wrote:
> All of the various database frontends are in cake/libs/model/datasources/dbo/
>
> On Fri, Jun 6, 2008 at 4:18 PM, Turnquist, Jonah <[EMAIL PROTECTED]> wrote:
>
> > Thank you! That was exactally what I was looking for.  That should
> > work nicely.
>
> > Still looking for the answer to this question though:
>
> > Also, does cakephp take care of mysql injection checking automagically
> > or do I have to call mysql_real_escape_string for everything
> > manually?   Or is there something else?
>
> > Thanks,
> > Jonah
>
> > On Jun 6, 7:02 am, Daniel Hofstetter <[EMAIL PROTECTED]> wrote:
> >> Hi Jonah,
>
> >> > Problem:
> >> > What if data is sent through that should NOT be stored in table?  How
> >> > do I stop that?  For example, say I had a column named
> >> > "do_not_store_data_here" in the table.  For some reason I do not want
> >> > any data stored there.  I can't think of any particular cases where I
> >> > would want to do that at the moment but just go with me.
>
> >> > I am asking how can I stop people from injecting data into there?  I
> >> > mean, they could easily inject it by sending post data with the key
> >> > data[Script][do_not_store_data_here].
>
> >> Have a look at the third parameter of Model::save(), it allows you to
> >> specify the fields which can be written.
>
> >> Hope that helps!
>
> >> --
> >> Daniel Hofstetterhttp://cakebaker.42dh.com
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Routing

2008-06-06 Thread Turnquist, Jonah

Thank you for these links, I am reading them now.  It's starting to
become more clear, I'll add another reply if any other questions come
up.

On Jun 6, 6:34 am, AD7six <[EMAIL PROTECTED]> wrote:
> On Jun 6, 8:25 am, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
>
>
> > What I want:
>
> > /scripts/
> > to route to
> > /scripts/view
>
> > Simple.  What I have:
>
> > Router::connect('/scripts/*', array('controller' => 'scripts',
> > 'action' => 'view'));
>
> > This works for urls such as /scripts/2
>
> > But /scripts/2fsdfsdfe will also work as /scripts/2 which it shout not
>
> > Also now /scripts/ with a trailing slash does not work as expected
>
> > grrr I'm starting to consider going back to codeigniter... they
> > allowed for regular expressions...
>
> Won't help for the next problem if you avoid reading their docs too 
> ;)http://book.cakephp.org/view/46/routes-configuration
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Model Validation help

2008-06-06 Thread Turnquist, Jonah

Thank you! That was exactally what I was looking for.  That should
work nicely.

Still looking for the answer to this question though:

Also, does cakephp take care of mysql injection checking automagically
or do I have to call mysql_real_escape_string for everything
manually?   Or is there something else?

Thanks,
Jonah

On Jun 6, 7:02 am, Daniel Hofstetter <[EMAIL PROTECTED]> wrote:
> Hi Jonah,
>
> > Problem:
> > What if data is sent through that should NOT be stored in table?  How
> > do I stop that?  For example, say I had a column named
> > "do_not_store_data_here" in the table.  For some reason I do not want
> > any data stored there.  I can't think of any particular cases where I
> > would want to do that at the moment but just go with me.
>
> > I am asking how can I stop people from injecting data into there?  I
> > mean, they could easily inject it by sending post data with the key
> > data[Script][do_not_store_data_here].
>
> Have a look at the third parameter of Model::save(), it allows you to
> specify the fields which can be written.
>
> Hope that helps!
>
> --
> Daniel Hofstetterhttp://cakebaker.42dh.com
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Model Validation help

2008-06-06 Thread Turnquist, Jonah

Ok, so i've been experimenting with model validation.  It all seems
very cool, except I am seeing some holes.

>From the tutorial this is what I have in the controller:
http://bin.cakephp.org/view/2080892837

Problem:
What if data is sent through that should NOT be stored in table?  How
do I stop that?  For example, say I had a column named
"do_not_store_data_here" in the table.  For some reason I do not want
any data stored there.  I can't think of any particular cases where I
would want to do that at the moment but just go with me.

I am asking how can I stop people from injecting data into there?  I
mean, they could easily inject it by sending post data with the key
data[Script][do_not_store_data_here].

Or say I am sending POST data with $_POST['foo'].  I am using the
$_POST['foo'] to decide which page to redirect the user to after he
submits a post on his blog.  I also happen to have a column in the
table named 'foo', but I do not want to store 'foo' there.  What can I
do in a situation like that?

Also, does cakephp take care of mysql injection checking automagically
or do I have to call mysql_real_escape_string for everything manually?

Thanks a ton,
Jonah

--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Routing

2008-06-06 Thread Turnquist, Jonah

What I want:

/scripts/
to route to
/scripts/view

Simple.  What I have:

Router::connect('/scripts/*', array('controller' => 'scripts',
'action' => 'view'));

This works for urls such as /scripts/2

But /scripts/2fsdfsdfe will also work as /scripts/2 which it shout not

Also now /scripts/ with a trailing slash does not work as expected


grrr I'm starting to consider going back to codeigniter... they
allowed for regular expressions...

--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Static pages

2008-06-02 Thread Turnquist, Jonah

Hmm ok thanks!  I'll stick with this for now.

> $Route->connect ('(?!admin|items|images)(.*)',
> array('controller'=>'pages', 'action'=>'display'));

A question though, why does the above code also have 'items|images'?
I understand the admin| part but why the items/images?  What pages are
those?

On Jun 2, 9:09 am, "b logica" <[EMAIL PROTECTED]> wrote:
> On Mon, Jun 2, 2008 at 12:59 AM, Turnquist, Jonah <[EMAIL PROTECTED]> wrote:
>
> > I tried this one:http://snook.ca/archives/cakephp/static_pages_cakephp12/
>
> > It did not work.  I saved the file in app/error.php and it didn't seem
> > to effect a thing.  I had a test.ctp vew in both the /views and /views/
> > pages directory (I wasn't sure where it was supposed to be so I tried
> > both) and they did not load.
>
> I think I tried that as well (can't say for sure because that's a bad
> link) with no luck.
>
> > So then I tried this 
> > method:http://bakery.cakephp.org/articles/view/taking-advantage-of-the-pages...
> > It works!  Someone commented though that it will mess up admin routing
>
> This is the method my version is based on. For the admin route issue,
> there's a fix in the comments:
>
> $Route->connect ('(?!admin|items|images)(.*)',
> array('controller'=>'pages', 'action'=>'display'));
>
> But there was another reason why I had to specify each directory (and
> its index page). I can't remember why just now.
>
> > (haven't learned what that is yet).  So I am not sure if I should
> > search for a different method.  Does anyone know any good ones?  That
> > does not require a route for each static page?
>
> I think the above is it. If one wants to avoid spelling out each file,
> and a "pages" prefix is (understandably) unwanted, then a wildcard
> pattern is pretty much all that's left. I can't imagine any other way
> to do it. It's the same whether the pages are static ctp files or
> retrieved from the DB.

--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Static pages

2008-06-02 Thread Turnquist, Jonah

I tried this one: http://snook.ca/archives/cakephp/static_pages_cakephp12/

It did not work.  I saved the file in app/error.php and it didn't seem
to effect a thing.  I had a test.ctp vew in both the /views and /views/
pages directory (I wasn't sure where it was supposed to be so I tried
both) and they did not load.

So then I tried this method: 
http://bakery.cakephp.org/articles/view/taking-advantage-of-the-pages-controller
It works!  Someone commented though that it will mess up admin routing
(haven't learned what that is yet).  So I am not sure if I should
search for a different method.  Does anyone know any good ones?  That
does not require a route for each static page?

On Jun 1, 8:51 am, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> This may be worth reading:
>
> http://bakery.cakephp.org/articles/view/custom-urls-from-the-site-roothttp://bakery.cakephp.org/articles/view/taking-advantage-of-the-pages...http://snook.ca/archives/cakephp/static_pages_cakephp12/
>
> Regards,
> - Dardo Sordi.
>
> On Sat, May 31, 2008 at 2:00 PM, Turnquist, Jonah <[EMAIL PROTECTED]> wrote:
>
> > Hey I'm just starting to learn cakephp and have a question...  I was
> > wondering what the best way to handle static pages and the home page
> > is.  This is what I've done:
>
> > In the routes file I added:
> > Router::connect('/', array('controller' => 'pages'));
>
> > And I commented out these two lines:
> > //Router::connect('/', array('controller' => 'pages', 'action' =>
> > 'display', 'home'));
> > //Router::connect('/pages/*', array('controller' => 'pages', 'action'
> > => 'display'));
>
> > So now the top directory (the home page) routes to PagesController-
> >>index(); and it uses the view pages/index.ctp
> > Furthermore if I want a static /about page I create the route:
> > Router::connect('/about', array('controller' => 'pages/about'));
> > And now /about routes to PagesController->about(); and uses the view
> > at pages/about.ctp
>
> > Using this method I have to create a new route for every static page
> > as well as add an event for each static page in the PagesController.
>
> > Is this the best method or is there a better way?  I feel like I just
> > made this way of doing static pages up and it's not the way they are
> > meant to be handled.
>
> > Also on an unrelated note, how do I find threads that I previously
> > made in google groups?  Yesterday I made a new post and it took 6
> > hours to appear.  And to see if it had any replies I have to search
> > through the Topic list
>
> > 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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Static pages

2008-06-02 Thread Turnquist, Jonah

Ah, thanks guys, Dardo and b logica, I didn't realize cakephp had a
default method of handling static pages.  But the default cakephp way
requires the static pages to reside at the URL /pages/staticPage
too...  I'm still figuring this all out I guess.  I am about to try to
attempt to use this method (thanks Dardo): 
http://snook.ca/archives/cakephp/static_pages_cakephp12/

I like the sound of this method because it does not require making a
new route for every static page.

Now I also understand why my posts were taking so long to appear.
haha.  Hello Chris ;-)

On May 31, 7:52 pm, "b logica" <[EMAIL PROTECTED]> wrote:
> On Sat, May 31, 2008 at 1:00 PM, Turnquist, Jonah <[EMAIL PROTECTED]> wrote:
>
> > Hey I'm just starting to learn cakephp and have a question...  I was
> > wondering what the best way to handle static pages and the home page
> > is.  This is what I've done:
>
> > In the routes file I added:
> > Router::connect('/', array('controller' => 'pages'));
>
> > And I commented out these two lines:
> > //Router::connect('/', array('controller' => 'pages', 'action' =>
> > 'display', 'home'));
> > //Router::connect('/pages/*', array('controller' => 'pages', 'action'
> > => 'display'));
>
> > So now the top directory (the home page) routes to PagesController-
> >>index(); and it uses the view pages/index.ctp
> > Furthermore if I want a static /about page I create the route:
> > Router::connect('/about', array('controller' => 'pages/about'));
> > And now /about routes to PagesController->about(); and uses the view
> > at pages/about.ctp
>
> > Using this method I have to create a new route for every static page
> > as well as add an event for each static page in the PagesController.
>
> One way i handled this was to create a route for each page, like you
> have, but I used wildcards for anything within a directory
>
> Router::connect('/contact', array('controller' => 'pages', 'action' =>
> 'display', 'contact'));
> Router::connect('/links', array('controller' => 'pages', 'action' =>
> 'display', 'links'));
>
> /* /about is a directory so i have an explicit route for index and a wildcard
>  */
> Router::connect('/about', array('controller' => 'pages', 'action' =>
> 'display', 'about/index'));
> Router::connect('/about/*', array('controller' => 'pages', 'action' =>
> 'display', 'about'));
>
> I then modified pagesController::display() like:
>
> /* Allows for custom actions
>  */
> if (method_exists($this, $page))
> {
> $this->$page();
>
> }
>
> $this->render(join('/', $path));
>
> This way, I could have many nested directories. I just had to specify
> the index page for each directory.
>
> It wasn't a big deal for that site because there were very few static
> pages and many controllers. If you plan on adding static pages all the
> time this might be tedious or prone to mistakes. If I was doing it
> over again I might approach it differently but this seems to work
> fine. The current site I'm working on is more CMS-like, with all
> content in the DB.
>
> > Also on an unrelated note, how do I find threads that I previously
> > made in google groups?  Yesterday I made a new post and it took 6
> > hours to appear.  And to see if it had any replies I have to search
> > through the Topic list
>
> I believe that newbies are moderated for some indeterminate period of
> time. Also, your posts won't be dsiplayed in your gMail INBOX (as i
> notice you're using) until someone responds to it. Although, you might
> be able to find it in the google group web page, I'm not sure. But, as
> i said, you're probably just being moderated. That will stop after a
> few posts (unless you irritate Chris ;-)
>
> A couple of times, I've sent a post off only to figure out my problem
> a minute later[1]. I realise that I can just reply to the msg in my
> SENT folder in order to cancel the cry for help.
>
> [1] b.logica's Law of Looking Like a 'Tard Online:
> No matter how many hours one spends gnashing their teeth over
> something, there's a better than even chance that the clue train will
> pull in within 5 minutes of posting a plea for help to a mailing list.
> The odds rise quickly with the degree to which the solution was a
> stupidstupidstupid oversight. Double the odds if one's original post
> explicitly stated that one checked the very damned thing it turned out
> to be.

--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Static pages

2008-05-31 Thread Turnquist, Jonah

Hey I'm just starting to learn cakephp and have a question...  I was
wondering what the best way to handle static pages and the home page
is.  This is what I've done:

In the routes file I added:
Router::connect('/', array('controller' => 'pages'));

And I commented out these two lines:
//Router::connect('/', array('controller' => 'pages', 'action' =>
'display', 'home'));
//Router::connect('/pages/*', array('controller' => 'pages', 'action'
=> 'display'));

So now the top directory (the home page) routes to PagesController-
>index(); and it uses the view pages/index.ctp
Furthermore if I want a static /about page I create the route:
Router::connect('/about', array('controller' => 'pages/about'));
And now /about routes to PagesController->about(); and uses the view
at pages/about.ctp

Using this method I have to create a new route for every static page
as well as add an event for each static page in the PagesController.

Is this the best method or is there a better way?  I feel like I just
made this way of doing static pages up and it's not the way they are
meant to be handled.

Also on an unrelated note, how do I find threads that I previously
made in google groups?  Yesterday I made a new post and it took 6
hours to appear.  And to see if it had any replies I have to search
through the Topic list

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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Should I learn cake 1.1 or 1.2?

2008-05-31 Thread Turnquist, Jonah

This is very helpful, thank you.  I will start right off with 1.2
then.

Thanks!
Jonah

On May 31, 6:51 am, francky06l <[EMAIL PROTECTED]> wrote:
> I would start directly with cake 1.2. It has more functionalities,
> embedded tests and more "automagic" features.
> A lot of us are already running cake 1.2 in production and the
> official release shout be out very soon.
>
> On May 31, 4:25 am, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > I learned the very basics of codeigniter before school started and now
> > that school is out I decided to learn cakephp instead.  However I just
> > realized that there is a 1.1 and 1.2 beta.  Which one should I learn?
> > It seems that if a learn 1.1, by the time that I finish learning it
> > enough to be able to release a website, 1.2 will then be out and I
> > will want to learn that one. Which one should I learn?  I also noticed
> > that they both have separate documentations, which one would be easier
> > to learn from?
>
> > Thanks,
> > Jonah

--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Should I learn cake 1.1 or 1.2?

2008-05-31 Thread Turnquist, Jonah

I learned the very basics of codeigniter before school started and now
that school is out I decided to learn cakephp instead.  However I just
realized that there is a 1.1 and 1.2 beta.  Which one should I learn?
It seems that if a learn 1.1, by the time that I finish learning it
enough to be able to release a website, 1.2 will then be out and I
will want to learn that one. Which one should I learn?  I also noticed
that they both have separate documentations, which one would be easier
to learn from?

Thanks,
Jonah

--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---