Re: display enum values in dropdown

2006-09-15 Thread John Zimmerman
On 9/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
John you didn't read my suggestion.  It was suggested that they shouldopen a ticket to complain that CakePHP should remove it since the
generateList from enum wasn't part of the core it should be removedfrom the scafolding altogether.Sorry about that.  I see what you were saying after re-reading instead of just skimming.
I agree something should be done for consistency, but removing it from scaffolding would make it nearly impossible for scaffolding to work if you are using enum types.  You would just get an error, thus making it nearly useless as you would be forced to bake it and insert custom code.
Maybe an acceptable alternative would be fore scaffolding to display a warning about things like enums being partially supported with suggestions for solutions after baking.  The error would only be displayed if debug was not set to 0.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: display enum values in dropdown

2006-09-15 Thread [EMAIL PROTECTED]

John you didn't read my suggestion.  It was suggested that they should
open a ticket to complain that CakePHP should remove it since the
generateList from enum wasn't part of the core it should be removed
from the scafolding altogether.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: email component for 1.2.x.x release

2006-09-15 Thread [EMAIL PROTECTED]

PHPNut!  You are crazy!  I cannot believe you are doing an
emailer?!?!?!?!  You are the most awesome coder ever.  Everyone should
shower your greatness with money to push you to create greater things
for all of us ;)  http://www.cakefoundation.org/pages/contribute

In the meantime maestro, I have had great success with the phpmailer in
the wiki tutorials and even added how to make it do attachments.  I
also am using the HTML2FPDF package and phpthumb packages successfully.
 Now all that makes my life much easier!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: email component for 1.2.x.x release

2006-09-15 Thread Larry E. Masters aka PhpNut
Not yet, I have not finished it.-- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut* @access  public*/ 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


email component for 1.2.x.x release

2006-09-15 Thread maestro777

I would like to check out the new email component that will soon be
released with the 1.2.x.x. Does anyone have any instructions or
preferably examples on how to use this? That would be a great help for
me. Thanks in advance.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: display enum values in dropdown

2006-09-15 Thread John Zimmerman
The "Baked ENUM's" snippet has been updated.http://cakeforge.org/snippet/download.php?type=snippet&id=242Here is also a link to one of the tickets submitted to trac with phpnut's explanation.
https://trac.cakephp.org/ticket/1110

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: display enum values in dropdown

2006-09-15 Thread John Zimmerman
On 9/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I would submit it to trac.  Submit them to make CakePHP moregeneralized to support all databases the support for ENUM in the
scaffolding needs to be removed to make it more consitent with the restof the code that is general for all databases.  That way you know touse ENUM (::hack, cough::) you would always have to use custom code.
The issue has been submitted to trac a couple of times and PhpNut has decided that since it was a MySQL specific issue and didn't translate to other databases that the issue would be left to be solved outside of the cake core.
I orginally posted the snippet solution that was working for me, but I am sure there are bugs as some people have reported above.The snippet is meant to be placed in /app/app_model.php, that way you don't have to put it in each individual model.  Make sure to follow the example for use at the end of the snippet.
I will look at some of the issues reported above and update the snippet accordingly.  I think one other person has already updated it with some improvements. 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Web Application authentication

2006-09-15 Thread [EMAIL PROTECTED]

WoW!  That software costs a lot of money.  SourceGuardian does the same
for a fraction of that cost.  I guess it is a possibility that Zend's
product is better than Source Guardian's.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: display enum values in dropdown

2006-09-15 Thread [EMAIL PROTECTED]

I would submit it to trac.  Submit them to make CakePHP more
generalized to support all databases the support for ENUM in the
scaffolding needs to be removed to make it more consitent with the rest
of the code that is general for all databases.  That way you know to
use ENUM (::hack, cough::) you would always have to use custom code.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Table without Model

2006-09-15 Thread [EMAIL PROTECTED]

Yes.  You will find that CakePHP does a lot of things automatically you
just have to know about them.  Refer to the manual on models and you
will find more information and an example.  It could save you some
time.

I finally used the bake.php from command line and it was GREAT!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Browse by category

2006-09-15 Thread Hanzgroove

I'm still trying to get this hierarchy to work. Once I can get this
solved I can move on to building out the rest of the site which should
be a snap but I'm stuck for now until this core part of my app has a
solid solution. Has anyone done anything similar to what I'm trying to
accomplish? If you have, please share any ideas. I'd really appreciate
the help.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Copying a db record

2006-09-15 Thread [EMAIL PROTECTED]

Hi,

Good idea. It doesn't show any warnings, though.

And it only shows one INSERT statements as being executed, yet 3
records are still created.



1   DESC `applicants`   32  32  0
2   DESC `divisions`2   2   0
3   DESC `statuses` 2   2   0
4   DESC `schoolyears`  2   2   0
5   DESC `sexes`2   2   0
6   DESC `summerdivisions`  2   2   0
7   DESC `pmprograms`   2   2   0
8   SELECT `Applicant`.`id`, `Applicant`.`schoolyear_id`,
`Applicant`.`lastname`, `Applicant`.`firstname`,
`Applicant`.`date_entry`, `Applicant`.`date_update`,
`Applicant`.`note`, `Applicant`.`status_id`, `Applicant`.`school`,
`Applicant`.`grade_apply`, `Applicant`.`division_id`,
`Applicant`.`application_date`, `Applicant`.`dob`, `Applicant`.`phone`,
`Applicant`.`phone_m_work`, `Applicant`.`phone_f_work`,
`Applicant`.`street`, `Applicant`.`city`, `Applicant`.`state`,
`Applicant`.`country`, `Applicant`.`zip`, `Applicant`.`nc_parent`,
`Applicant`.`nc_street`, `Applicant`.`nc_city`, `Applicant`.`nc_state`,
`Applicant`.`nc_country`, `Applicant`.`nc_zip`, `Applicant`.`nickname`,
`Applicant`.`sex_id`, `Applicant`.`parent`,
`Applicant`.`summerdivision_id`, `Applicant`.`pmprogram_id`,
`Division`.`id`, `Division`.`name`, `Status`.`id`, `Status`.`name`,
`SchoolYear`.`id`, `SchoolYear`.`name`, `Sex`.`id`, `Sex`.`name`,
`SummerDivision`.`id`, `SummerDivision`.`name`, `PMProgram`.`id`,
`PMProgram`.`name` FROM `applicants` AS `Applicant` LEFT JOIN
`divisions` AS `Division` ON `Applicant`.`division_id` =
`Division`.`id` LEFT JOIN `statuses` AS `Status` ON
`Applicant`.`status_id` = `Status`.`id` LEFT JOIN `schoolyears` AS
`SchoolYear` ON `Applicant`.`schoolyear_id` = `SchoolYear`.`id` LEFT
JOIN `sexes` AS `Sex` ON `Applicant`.`sex_id` = `Sex`.`id` LEFT JOIN
`summerdivisions` AS `SummerDivision` ON
`Applicant`.`summerdivision_id` = `SummerDivision`.`id` LEFT JOIN
`pmprograms` AS `PMProgram` ON `Applicant`.`pmprogram_id` =
`PMProgram`.`id` WHERE `Applicant`.`id` = '3580' LIMIT 11   
1   1
9   INSERT INTO `applicants`
(`id`,`schoolyear_id`,`lastname`,`firstname`,`date_entry`,`date_update`,`note`,`status_id`,`school`,`grade_apply`,`division_id`,`application_date`,`dob`,`phone`,`phone_m_work`,`phone_f_work`,`street`,`city`,`state`,`country`,`zip`,`nc_parent`,`nc_street`,`nc_city`,`nc_state`,`nc_country`,`nc_zip`,`nickname`,`sex_id`,`parent`,`summerdivision_id`,`pmprogram_id`)
VALUES
(NULL,'15','Zoposc','Oscar',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL)
 1   0


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Problem with $this->redirect()

2006-09-15 Thread John Zimmerman
On 9/15/06, kacperix <[EMAIL PROTECTED]> wrote:
mod_rewrite is install on 100% and all .htaccess files are valid. But Ihave still this problem. PLEASE HELP.All caps don't really help.But  if you  describe your environment someone can help you sort it out.
What is your Operating System?How did you install Apache/PHP/Database? (i.e. on Windows XAMPP/ WAMP/ individual installers, etc...)What program did you use to extract your cake installation?
If you upgraded your version of cake did you also incorporate updates into the /app directory?Check to make sure all 3 .htaccess files are present and readable by the webserver.  ( i.e. /.htaccess, /app/.htaccess, /app/webroot/.htaccess )


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Copying a db record

2006-09-15 Thread Sohei Okamoto
What is your debug level? Can you turn it to higher and see if there is any warning?I haven't discovered exact cause yet, but I had some problem with excuting same page twicewhen there is session warning about sending header.
Just in case.Sohei

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Problem with $this->redirect()

2006-09-15 Thread kacperix

mod_rewrite is install on 100% and all .htaccess files are valid. But I
have still this problem. PLEASE HELP.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Session problem only with php v 4.x.x

2006-09-15 Thread John Zimmerman
On 9/15/06, Brian French <[EMAIL PROTECTED]> wrote:
A long time ago i spent hours trying to figure out why i was gettingthis only to find out the i had a space outside of the php tags (spacehere ). This is the first thing i look for now when i get a session
error like that. You may want to check to see if you have this too. :-pI can confirm this happened to me as well.  I had separated the top comment in one of my files from the rest of the code.


i.e.

/*
 * My Comments went here
 */
?>


    My code went here
?>
For some reason it did not like the space between the two and gave the
session errors you are seeing.  Combining the php tags fixed my problem.
 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Copying a db record

2006-09-15 Thread [EMAIL PROTECTED]

I tried findById, with the same results.

Here's the var_dump of $this->data using either method (read or
findById):

array(7) {
  ["Applicant"]=>
  array(32) {
["id"]=>
string(0) ""
["schoolyear_id"]=>
int(15)
["lastname"]=>
string(6) "Zoposc"
["firstname"]=>
string(5) "Oscar"
["date_entry"]=>
NULL
["date_update"]=>
NULL
["note"]=>
NULL
["status_id"]=>
NULL
["school"]=>
NULL
["grade_apply"]=>
NULL
["division_id"]=>
NULL
["application_date"]=>
NULL
["dob"]=>
NULL
["phone"]=>
NULL
["phone_m_work"]=>
NULL
["phone_f_work"]=>
NULL
["street"]=>
NULL
["city"]=>
NULL
["state"]=>
NULL
["country"]=>
NULL
["zip"]=>
NULL
["nc_parent"]=>
NULL
["nc_street"]=>
NULL
["nc_city"]=>
NULL
["nc_state"]=>
NULL
["nc_country"]=>
NULL
["nc_zip"]=>
NULL
["nickname"]=>
NULL
["sex_id"]=>
string(1) "2"
["parent"]=>
NULL
["summerdivision_id"]=>
NULL
["pmprogram_id"]=>
NULL
  }
  ["Division"]=>
  array(2) {
["id"]=>
NULL
["name"]=>
NULL
  }
  ["Status"]=>
  array(2) {
["id"]=>
NULL
["name"]=>
NULL
  }
  ["SchoolYear"]=>
  array(2) {
["id"]=>
string(2) "16"
["name"]=>
string(11) "2006 Summer"
  }
  ["Sex"]=>
  array(2) {
["id"]=>
string(1) "2"
["name"]=>
string(4) "Male"
  }
  ["SummerDivision"]=>
  array(2) {
["id"]=>
NULL
["name"]=>
NULL
  }
  ["PMProgram"]=>
  array(2) {
["id"]=>
NULL
["name"]=>
NULL
  }
}


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: pages_controller

2006-09-15 Thread John Zimmerman
On 9/15/06, Chris Lamb <[EMAIL PROTECTED]> wrote:

On Fri, 15 Sep 2006 00:04:59 -0700, John Zimmerman wrote:> I have modified the default pages controller to add a few tweaks by> first copying it to my app directory.  I then renamed it to> static_controller.php, modifying the code and the views directory
> appropriately.Did you consider extending PageController instead? Being able to stillcall $this->display() is quite useful from a maintainability aspectimho, as this function is quite well known to most Cake'ers.
For my projects I found it much
more maintainable to separate the two controllers.  I wanted to  use
the 'Pages" name for a content management system, so it made sense for
me to just create the static_controller for static pages.
 > The way the default pages controller (which is now my 'static'
> controller) is setup it is not meant to have multiple actions defined.
What's wrong with multiple actions OOI? They will always return 404 ifyou do not have a view for them.With
multiple actions inside of the default pages controller requires you to
write a route entry for each action beyond the display action (as far
as I can tell).  Otherwise the pages/* route will try to send your
parameters to the display action.
I found it much cleaner to separate the two controllers rather than have 1 controller that required another route modification.Also
having that route modification (i.e. pages/dynamic ) or whatever your
new action would be called would cause a static page called '
dynamic.thtml' to no be displayed.  That is fairly minor, but is a
collision none the less.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Copying a db record

2006-09-15 Thread Brian French

what is in the $this->data variable in the copytest function? Is it 
recursive?

I cant remember off the top of my head... does read() return a recursive 
array?
Would using something else like $this->Applicant->findById() possibly 
fix this?

[EMAIL PROTECTED] wrote:
> Thanks for keeping at it!
>
> This option:
> $this->Applicant->save(array('Applicant',$this->data['Applicant']));
> didn't make any changes to the database.
>
> This option:
> $this->Applicant->save($this->data);
> produced the same results as before, 1 good copy of the record,
> sandwiched between 2 new empty records.
>
>
> >
>
>   

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Session problem only with php v 4.x.x

2006-09-15 Thread Brian French

A long time ago i spent hours trying to figure out why i was getting 
this only to find out the i had a space outside of the php tags (space 
here ). This is the first thing i look for now when i get a session 
error like that. You may want to check to see if you have this too. :-p

Brian French

zipman wrote:
> I am on a project and all this time I was developing
> using php 5.1.4. I haven't used any php 4.x.x incompatible code.
> The problem is that I recently learned that the hosted enviroment
> provided only php 4.x.x and I tried to switch ,as I know cakephp is
> compatible with both php 4 and 5.
> The problem is that I keep getting the above warnings with php PHP
> 4.4.3
> even on the main page where it says if the connection to the database
> was successfull or not.
>
> Warning: session_start(): Cannot send session cache limiter - headers
> already sent (output started at /opt/cake/app_model.php:1) in
> /opt/cake/libs/session.php on line 131
>
> Warning: session_start(): Cannot send session cookie - headers already
> sent by (output started at /opt/cake/app_model.php:1) in
> /opt/cake/libs/session.php on line 131
>
> Warning: session_start(): Cannot send session cache limiter - headers
> already sent (output started at /opt/cake/app_model.php:1) in
> /opt/cake/libs/session.php on line 131
>
> (The core files are in /opt as obvious).
>
> This is  a major problem for me, because I am using sessions.
>
> Does anybody know, how I can fix ths problem?
>
>
> >
>
>   

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Session problem only with php v 4.x.x

2006-09-15 Thread zipman

I am on a project and all this time I was developing
using php 5.1.4. I haven't used any php 4.x.x incompatible code.
The problem is that I recently learned that the hosted enviroment
provided only php 4.x.x and I tried to switch ,as I know cakephp is
compatible with both php 4 and 5.
The problem is that I keep getting the above warnings with php PHP
4.4.3
even on the main page where it says if the connection to the database
was successfull or not.

Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at /opt/cake/app_model.php:1) in
/opt/cake/libs/session.php on line 131

Warning: session_start(): Cannot send session cookie - headers already
sent by (output started at /opt/cake/app_model.php:1) in
/opt/cake/libs/session.php on line 131

Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at /opt/cake/app_model.php:1) in
/opt/cake/libs/session.php on line 131

(The core files are in /opt as obvious).

This is  a major problem for me, because I am using sessions.

Does anybody know, how I can fix ths problem?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Copying a db record

2006-09-15 Thread [EMAIL PROTECTED]

Thanks for keeping at it!

This option:
$this->Applicant->save(array('Applicant',$this->data['Applicant']));
didn't make any changes to the database.

This option:
$this->Applicant->save($this->data);
produced the same results as before, 1 good copy of the record,
sandwiched between 2 new empty records.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Re: Copying a db record

2006-09-15 Thread Samuel DeVore

save takes the associated array
either
 $this->Applicant->save($this->data);
or
 $this->Applicant->save(array('Applicant',$this->data['Applicant'));

On 9/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Thanks - it has been pasted.
>
> http://www.cakephp.org/pastes/show/d2e1f32e5bcb2e920a6b1f377027a6a7
>
>
>
> >
>


-- 
==
S. DeVore
(the old fart) the advice is free, the lack of crankiness will cost you

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Problem with $this->set() data in Cached Views?

2006-09-15 Thread [EMAIL PROTECTED]

Hey All,

Just started a couple months ago on cake, so still pretty green.
Wanted to run this by you guys to make sure I'm not missing the boat
here.

I have view caching with the cache helper working with simple pages.
The problem starts when the  tags are added into the
view.

If I wrap  tags around simple php, there is no problem
with time() functions or $_SERVER vars.

The problem starts when i'm accessing variables that are set by the
controller/action.  So if in the controller/action i am doing:
   $this->set('photos', $this->Photo->findAll(x,x,x,x) );

When the cached version of the page runs, the $photos variable is null.
 I looked at the example given by:
http://manual.cakephp.org/chapter/view_cache and that seems to suggest
that variables introduced by $this->set would still be accessible.

Thoughts?

Harrison


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Table without Model

2006-09-15 Thread codecowboy

Do you call the generateList function on a model:
$this->model->generateList(...)?

If so, i have been wasting a lot of time do it another way


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: date format

2006-09-15 Thread M

I solved the problem, I set all the date fields as readonly, and i
plugged in Tigra Calendar.
Works perfectly, as the user now inserts data in the format used by
MySQL with the Tigra tool.

Many thanks for the help.

--M


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Copying a db record

2006-09-15 Thread [EMAIL PROTECTED]

Thanks - it has been pasted.

http://www.cakephp.org/pastes/show/d2e1f32e5bcb2e920a6b1f377027a6a7


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Copying a db record

2006-09-15 Thread nate

Sounds like something else is going wrong.  Try pasting your full
controller code along with a schema dump of the relevant tables to
http://cakephp.org/pastes/


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Copying a db record

2006-09-15 Thread [EMAIL PROTECTED]

Again, thanks for the replies guys. I do appreciate the help!

Unfortunately, neither strategy worked, although they did show
interesting results. Brian's method threw me errors. But Samuel's
solution made the following happen:

Record 1 remains unchanged.
Record 2 created, with the new schoolyear, but no other information was
copied from Record 1 (i.e. last name, first name. etc)
Record 3 created with new schoolyear, and all information copied from
Record 1. (This is the desired result)
Record 4 created, with the new schoolyear, but no other information was
copied from Record 1 (same as Record 2)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Copying a db record

2006-09-15 Thread Brian French




After you get the record, unset $this->Applicant->id:

function copytest($id)
{
		$this->Applicant->id = $id;
		$this->data = ""
		unset($this->data['Applicant']['id']);
		unset($this->Applicant->id = $id;);
		$this->data['Applicant']['schoolyear_id'] = 16;
		$this->Applicant->save($this->data['Applicant']);
}
I didnt test it, but this may help.

Brian French

[EMAIL PROTECTED] wrote:

  Thanks for the reply.

I tried unsetting the 'id' value, but most strangely, the result is
that it changes the original record anyway!

I've tried it a dozen times, just to make sure, but that is indeed what
is happening.

function copytest($id)
{
		$this->Applicant->id = $id;
		$this->data = ""
		unset($this->data['Applicant']['id']);
		$this->data['Applicant']['schoolyear_id'] = 16;
		$this->Applicant->save($this->data['Applicant']);
}

If I pass it $id = 1, then it modifies record 1 in the database and
sets the schoolyear = 16.

If instead, I use this code:

function copytest($id)
{
		$this->Applicant->id = $id;
		$this->data = ""
		$this->data['Applicant']['id'] = null;
		$this->data['Applicant']['schoolyear_id'] = 16;
		$this->Applicant->save($this->data['Applicant']);
}

It leaves record 1 alone, and creates a copy into record 2 with
schoolyear = 16 -- which is exactly what I want, EXCEPT that it also
creates copies into record 3 and record 4, both with schoolyear = 16 as
well.

Any ideas?




  


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---





Re: Re: Copying a db record

2006-09-15 Thread Samuel DeVore

try

function copytest($id)
{
   $this->Applicant->id = $id;
   $this->data = $this->Applicant->read();
   $this->Applicant->id = null;
   unset($this->data['Applicant']['id']);
   $this->data['Applicant']['schoolyear_id'] = 16;
   $this->Applicant->save($this->data['Applicant']);
}

or what I usually do

function copytest($id)
{
   $this->Applicant->id = $id;
   $this->data = $this->Applicant->read();
   $this->Applicant->create();  // create a new record for saving
   unset($this->data['Applicant']['id']);
   $this->data['Applicant']['schoolyear_id'] = 16;
   $this->Applicant->save($this->data['Applicant']);
}


HTH
   sdevore
On 9/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Thanks for the reply.
>
> I tried unsetting the 'id' value, but most strangely, the result is
> that it changes the original record anyway!
>
> I've tried it a dozen times, just to make sure, but that is indeed what
> is happening.
>
> function copytest($id)
> {
> $this->Applicant->id = $id;
> $this->data = $this->Applicant->read();
> unset($this->data['Applicant']['id']);
> $this->data['Applicant']['schoolyear_id'] = 16;
>
> $this->Applicant->save($this->data['Applicant']);
> }
>
>
> If I pass it $id = 1, then it modifies record 1 in the database and
> sets the schoolyear = 16.
>
> If instead, I use this code:
>
> function copytest($id)
> {
> $this->Applicant->id = $id;
> $this->data = $this->Applicant->read();
> $this->data['Applicant']['id'] = null;
> $this->data['Applicant']['schoolyear_id'] = 16;
>
> $this->Applicant->save($this->data['Applicant']);
> }
>
>
> It leaves record 1 alone, and creates a copy into record 2 with
> schoolyear = 16 -- which is exactly what I want, EXCEPT that it also
> creates copies into record 3 and record 4, both with schoolyear = 16 as
> well.
>
> Any ideas?
>
>
> >
>


-- 
==
S. DeVore
(the old fart) the advice is free, the lack of crankiness will cost you

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: display enum values in dropdown

2006-09-15 Thread nate

Oh, and I just re-read your post, and the reason you're getting errors
is because you're putting app_model.php in app/models.  It should be in
app/.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: display enum values in dropdown

2006-09-15 Thread nate

Sorry, the method call above should have been fullTableName(), not
getFullTableName().


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: display enum values in dropdown

2006-09-15 Thread nate


[EMAIL PROTECTED] wrote:
> To be honest, I don't think either are great solutions, because:
>
> - if we put the code in our data model, then only that model can access
> that function, we'd have to duplicate the code for other models that
> might want to use an enum field.

So abstract just the part that grabs the enum, and put it in AppModel.

> - that snippet doesnt work with tables with underscores, to remedy that
> you can $this->table
> rather than doing this...
> $tableName = strtolower(Inflector::pluralize($this->name));

Better yet:
$db =& ConnectionManager::getDataSource($this->useDbConfig);
$tableName = $db->getFullTableName($this, false);

> Also if I create my own AppModel with the getEnumValues method in, that
> resides in my app/models directory, I get errors. It only works when I
> add the method to the cake/app_model.php class.

Hmm, what errors do you get?  To Cake, there is no difference between
loading cake/app_model.php and app/app_model.php.  There must be
something else going wrong.

> Anyway, it would be nice to get this updated in Cake, its a bit
> inconsistent to have the functionality in the scaffolding but not
> available in the model functionality. Is it just a case of submitting a
> new ticket on the trac repository to get it looked at?

Not really.  Enums are a MySQL-specific feature (who said hack? I know
I didn't!) that has no equivalent in any other database platform, and
is technically the wrong way of going about it anyway.  The proper way
is to add constraints to the field, or use a lookup table that maps
symbolic values.

> Cheers
> 
> James


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Pear (Re: wiki parser)

2006-09-15 Thread codecowboy

Can we get back to the original question please???


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Copying a db record

2006-09-15 Thread [EMAIL PROTECTED]

Thanks for the reply.

I tried unsetting the 'id' value, but most strangely, the result is
that it changes the original record anyway!

I've tried it a dozen times, just to make sure, but that is indeed what
is happening.

function copytest($id)
{
$this->Applicant->id = $id;
$this->data = $this->Applicant->read();
unset($this->data['Applicant']['id']);
$this->data['Applicant']['schoolyear_id'] = 16;
$this->Applicant->save($this->data['Applicant']);
}

If I pass it $id = 1, then it modifies record 1 in the database and
sets the schoolyear = 16.

If instead, I use this code:

function copytest($id)
{
$this->Applicant->id = $id;
$this->data = $this->Applicant->read();
$this->data['Applicant']['id'] = null;
$this->data['Applicant']['schoolyear_id'] = 16;
$this->Applicant->save($this->data['Applicant']);
}

It leaves record 1 alone, and creates a copy into record 2 with
schoolyear = 16 -- which is exactly what I want, EXCEPT that it also
creates copies into record 3 and record 4, both with schoolyear = 16 as
well.

Any ideas?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: HowTo Change view template?

2006-09-15 Thread [EMAIL PROTECTED]

Oh! I knew it was something simple! Thanks.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: display enum values in dropdown

2006-09-15 Thread [EMAIL PROTECTED]

To be honest, I don't think either are great solutions, because:

- if we put the code in our data model, then only that model can access
that function, we'd have to duplicate the code for other models that
might want to use an enum field.

- that snippet doesnt work with tables with underscores, to remedy that
you can $this->table
rather than doing this...
$tableName = strtolower(Inflector::pluralize($this->name));
Also if I create my own AppModel with the getEnumValues method in, that
resides in my app/models directory, I get errors. It only works when I
add the method to the cake/app_model.php class.

Anyway, it would be nice to get this updated in Cake, its a bit
inconsistent to have the functionality in the scaffolding but not
available in the model functionality. Is it just a case of submitting a
new ticket on the trac repository to get it looked at?

Cheers

James


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: pages_controller

2006-09-15 Thread [EMAIL PROTECTED]

Chris Lamb: Nice. It worked when I modified the roues.php :) it was not
necessary to call the display function in test function. I had problems
passing variables through the url, so I discarded the idea of modifying
the original pages controller, and did it the same way as John did.

John Zimmerman: I just tried your suggestion and that worked very well.
(renamed pages_controller to static_controler and created my own "new"
pages controller.)

Thanks guys. I was totally stuck with that problem! It is really nice
when people have the patience to help us newbie's.

Best regards.
Asbjørn Morell.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Web Application authentication

2006-09-15 Thread Darian Anthony Patrick

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Zend has a small business discount program that covers Zend Guard:
http://www.zend.com/store/software/zend_small_business_program

Jon Bennett wrote:
>> First post!
> 
> welcome!
> 
>> Okay, what about this:
>> Make a key file on the client server with an expiration date encoded in the
>> key.
>> Have your program check the key's expiration date every time it runs
>> When the key expires, call a page on your site to get a new key with a new
>> expiration date.
>> That way, their site only calls yours once a month. Just don't make the key
>> encoding obvious!
> 
> also like it.
> 
> could you not Zend Guard just this part of the app, and bury it so
> it's not obvious.
> 
> jb
> 

- --
Darian Anthony Patrick <[EMAIL PROTECTED]>
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFCsKtKpzEXPWA4IcRAqrNAJ0V96CkRzPL+D0HKNoOoNIXIt80RwCfa1GB
wMM3by8agR9G1qeDOBDCLZg=
=zG6/
-END PGP SIGNATURE-

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: View what scaffolding does?

2006-09-15 Thread nate

Also, check these out: http://cakephp.org/screencasts

Some great examples of Bake usage.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Web Application authentication

2006-09-15 Thread Jon Bennett

> First post!

welcome!

> Okay, what about this:
> Make a key file on the client server with an expiration date encoded in the
> key.
> Have your program check the key's expiration date every time it runs
> When the key expires, call a page on your site to get a new key with a new
> expiration date.
> That way, their site only calls yours once a month. Just don't make the key
> encoding obvious!

also like it.

could you not Zend Guard just this part of the app, and bury it so
it's not obvious.

jb

-- 

jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: View what scaffolding does?

2006-09-15 Thread John David Anderson (_psychic_)


On Sep 15, 2006, at 8:37 AM, TWIOF wrote:

>
> If you go to:
>
> your_server\htdocs\cake_root_dir\cake\scripts\
>
> using command prompt (win) or the shell on linux (i think) and run
> cake.php you can get it to build the same output as the scaffold, it
> inserts the controller and view in the appropriate directories.

(should be bake.php)

-- John

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: View what scaffolding does?

2006-09-15 Thread TWIOF

If you go to:

your_server\htdocs\cake_root_dir\cake\scripts\

using command prompt (win) or the shell on linux (i think) and run
cake.php you can get it to build the same output as the scaffold, it
inserts the controller and view in the appropriate directories.

Hope that's what you meant.

TWIOF


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Table without Model

2006-09-15 Thread [EMAIL PROTECTED]

Was just wondering if I could, so I wouldn't have to setup models for
them. No problem!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Table without Model

2006-09-15 Thread [EMAIL PROTECTED]

Why would you want to do that?  If you went ahead and gave them models
and controllers then you could use generateList from CakePHP to quickly
make your selectTags for counties and countries.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Help needed with implementing a datagrid

2006-09-15 Thread [EMAIL PROTECTED]

To make sure it degrades build your entire application in HTML first.
Make sure that works.  Then, worry about adding in AJAX.  So, then you
make sure that you add in AJAX to fit the model of HTML working.  So,
things like it will send the requests directly and return the method
whereas in HTML it does a page refresh and a requestaction().

With CakePHP and using the helper it should degrade very nicely.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Web Application authentication

2006-09-15 Thread [EMAIL PROTECTED]

I like it.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



View what scaffolding does?

2006-09-15 Thread [EMAIL PROTECTED]

Hi, I've rendered some pages with the $scaffold commands but I would
like to view what Cake has output has code...how can I?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Table without Model

2006-09-15 Thread [EMAIL PROTECTED]

Hi all,
I have 2 tables in my database which hold lists of counties and
countries. How can I use these in my controllers without creating
models for them??

Thanks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: ADMIN route and password-protection with http authentification

2006-09-15 Thread purepear

Thanks nate.

I did similar thing with Sd_Auth but HTTP authentication sounds
better.. i'll try this one.

I think this is as simple as protecting /admin folder through host's
ControlPanel or .htaccess file. So this topic might help people who
want simple(no database) single user(admin) protection.

Best regards.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Save function executes before it should

2006-09-15 Thread AD7six

Only you have the power for that zipman, there doesn´t appear to be
anything inherantly wrong with your code

Disable js - do you still see 2 updates?

if so put something like log (debug_backtrace()); in your method and
see where you are calling it twice.

HTH,

AD7six


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: pages_controller

2006-09-15 Thread Chris Lamb


Afternoon.

On Fri, 15 Sep 2006 00:04:59 -0700, John Zimmerman wrote:

> I have modified the default pages controller to add a few tweaks by
> first copying it to my app directory.  I then renamed it to
> static_controller.php, modifying the code and the views directory
> appropriately.

Did you consider extending PageController instead? Being able to still
call $this->display() is quite useful from a maintainability aspect
imho, as this function is quite well known to most Cake'ers.


> The way the default pages controller (which is now my 'static'
> controller) is setup it is not meant to have multiple actions defined.

What's wrong with multiple actions OOI? They will always return 404 if
you do not have a view for them.


Regards,

lamby


-- 
 Chris Lamb, Cambs, UK  WWW: http://chris-lamb.co.uk
  Q. Why is top posting bad? GPG: 0x634F9A20
  A. Because it breaks the logical sequence of discussion


signature.asc
Description: PGP signature


Re: Save function executes before it should

2006-09-15 Thread zipman

Do you see any problem?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: what's the matter of include?

2006-09-15 Thread RosSoft

thtml == html if you don't put any  tags
JitZhang ha escrito:

> but some page is html ,no all is thtml!
> 
> http://etrade.webcrew.cn


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Req HRMgr/SAP/SalesMktgIT/PHPProg/S/wEngg/CallCenterExec/UnixProg/DevVB&Orc/MainfrmProf/BussAnalyst/BOAdmin....

2006-09-15 Thread cute.itgirl


  
Hi Dear 
Members,
 
FOLLOWING R THE NEW 
JOBS POSTED THIS WEEK (WEEKLY NEWSLETTER) :
 


  
  
 

  
   
Job Title
Job Posted By
  
HR 
  Manager
Global Talent Search & Consult
  
sap-bw 
  consultant
iGen consulting
  
Sales 
  and Marketing-IT
Naukriguru
  
IT-Sales 
  and marketing
Naukriguru
  
PHP-Programer
Naukriguru
  
SOFTWARE 
  ENGINEERS
NIPSYS TECHNOLOGIES (P) LTD
  
call 
  centre
HCL infosystem ltd
  
SAP-Workflow 
  consultants
Zen Consulting Pte Ltd
  
Unix 
  Programmer
Distributed Software Solutions
  
Developers into 
  VB and Oracle
Melstar Information Technologi
  
Mainframe 
  Professionals
Melstar Information Technologi
  
Business 
  Analysts
Melstar Information Technologi
  
Business 
  Objects Administrator
CSI Consultiong Inc
  
.NET 
  Professionals
Adventures
  
Recruiter
Naukriguru
  
singapore based 
  jobs available
era recruitants p. ltd.
  
kolkata 
  based jobs available
era recruitants p. ltd.
  
Req 
  Developer
ewrqwerqwewr
  
Req 
  Chartered Accountants with min 3 experience
Pradeep Bhandari
  
SAP-BW 
  Consultant
iGen consulting
  
Req 
  Desktop Support Engineer /System Administrator
Brigade Corporation Pvt Ltd
  
Embedded 
  System
Ins e solution
  
Senior 
  IT Requirements @ ITJobZone
ITJobZone
  
Java,J2ee,Weblogic,Oracle.
abcde
  
Urgent 
  Requirement-Datawarehousing
imaatrixx
  
Req VB, 
  VB.net, VBA Expert
fitjobs
  
SAP SOX 
  CONSULTANT
DISTRIBUTED SOFTWARE SOLUTIONS
  
Urgent 
  Opening : Project Lead (Java/Oracle)
CORBUS (India) Pvt. Ltd
  
Sr.Recruter
Vanceva Tech Pvt. Ltd
  
 

 
PLS APPLY ONLINE ON www.net4professionals.com
 

*Looking For Better 
Jobs/Employee?
-Search 
Jobs/Resumes and Apply Online/Call 4 Interview FREE
 
-Browse 
Interveiw Calls Free
-Employers Can Post 5 Jobs Free And Also Win Free 
Gifts
http://www.net4professionals.com
(A2Z HR INFO SERVICES INDIA)THE 
COMPLETE e-JOBS SOLUTIONS PROVIDER...
 
REGARDS
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---





Re: Browse by category

2006-09-15 Thread Jon Bennett

> > /browse/computers/web/programming/php

you could also try using something other than / between each item,
which you could explode in the controller method, eg:

/browse/computers-web-programming-php

that way you don't need to mess about with routes...

jb

-- 


jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: going deeper to a generate list..

2006-09-15 Thread nate

generateList really won't do what you want.

A good place to start is here:
http://wiki.cakephp.org/docs:understanding_associations

You can learn about how to specify conditions to filter associated
models.  You can also go here: http://manual.cakephp.org/chapter/models
and read about $recursive in Section 2, to learn about pulling
associations multiple levels deep.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: populating model data

2006-09-15 Thread Evan

AD7six:
I think it would be really careless on the programmer's part to give an
association the same name as a field in a particular model.  I can't
figure why on earth would you want to have a Comments association and a
comments field at the same time...

And I don't understand the problem with multiple results.  As far as I
understand, the model data is populated with only one row of data.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



going deeper to a generate list..

2006-09-15 Thread symfony

Following problem:
I want to create an filter for ouputting me choosen data..
For example: I have an customer, every customer has many contact
persons and every contact person has many special functions..
Ok, lets look at the tables, which are: customer, contacts and
functions.
The relations are customer->contacts (1:n), contacts->functions (n:m)
the contacts and functions are connected with an
hasandbelongto-connection..

How can i get every customers which has contacts with an special
function (func_id).
I tried it with something like this:
$this->Customer->generateList(Function.id like #value#);
but it didn't work..

By the way: This is a example for using this filter, it should be use
with different connection-types..

can you help me?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Help needed with implementing a datagrid

2006-09-15 Thread green-mamba

Thanks for the feedback, I will look into it.

Just one question - all these javascript actions are very nice, but how
does one make it degrade gracefully if Javascript is switched off? I
mean, if I make the whole 'create a new row' in my table dependent on
Javascript what is going to happen with the users that have it switched
off?

And also...
Is there anyone that HAS integrated some Datagrid component with
CakePHP by now and can make a recommendation?

Christine


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Re: HowTo Change view template?

2006-09-15 Thread Andreas Waidelich

Did you have a look at elements? (http://manual.cakephp.org/chapter/views)

2006/9/15, nate <[EMAIL PROTECTED]>:
>
> // Controller:
>
> function view ( ) {
> $this->render("view_std");
> }
>
>
> >
>


-- 

e> [EMAIL PROTECTED]
w> http://andreas-waidelich.de
m> +49.177.423 09 48

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: HowTo Change view template?

2006-09-15 Thread nate

// Controller:

function view ( ) {
$this->render("view_std");
}


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



HowTo Change view template?

2006-09-15 Thread [EMAIL PROTECTED]

Gurus,

I have what would seem to be very simple question. How do I change the
template that gets used for an action? Instead of the view.thtml
template for the view action, I want to use view_std.thtml,
view_long.thtml, or view_short.thtml depending on some logic. How do I
do this in cakePHP?


Thanks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Copying a db record

2006-09-15 Thread John Zimmerman
On 9/14/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
.clippedWhat I want to do is simple - take the original Applicant record
(schoolyear = 16) and copy them to a new record, with all the samedata, except that the schoolyear = 15.$this->Applicant->id = $id;$this->data = ""
$this->data['Applicant']['id'] = null;$this->data['Applicant']['schoolyear_id'] = 15;$this->Applicant->save($this->data['Applicant']);
What I get are three new records, all of them with the schoolyear = 15.The original record remains.Instead of setting the id to null (i.e. $this->data['Applicant']['id'] = null; )
Try doing this...unset( $this->data['Applicant']['id'] );I don't know exactly what the save() code in the model is doing to create 3 entries because I have not looked, but setting the value to null still leaves that entry in the array defined; it is just set to null.  Using unset() will actually remove it from the array so that when the data is passed to the save command it will look just like it does when you are adding an entry via a normal "add" form.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Browse by category

2006-09-15 Thread John Zimmerman
On 9/14/06, Hanzgroove <[EMAIL PROTECTED]> wrote:
One more thing you might know off the top pf your head. Does cakeprovide a mechanism for examining the url?For example:/browse/computers/web/programming/phpInside of your controller you can do a  pr($this->params);  to see the contents of the params class variable.  From there you should see how to get what you want.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: pages_controller

2006-09-15 Thread John Zimmerman
I think you might be happier if you split the functionality into two different controllers.I have modified the default pages controller to add a few tweaks by first copying it to my app directory.  I then renamed it to static_controller.php, modifying the code and the views directory appropriately.
I then created my own new 'pages_controller.php' which is actually a content management system.The way the default pages controller (which is now my 'static' controller) is setup it is not meant to have multiple actions defined.
On 9/14/06, Chris Lamb <[EMAIL PROTECTED]> wrote:
Evening.On Thu, 14 Sep 2006 14:43:17 -0700, [EMAIL PROTECTED] wrote:> I have added my own function to the pages_controller:>> function test() {
>   $this->set('abc', 'something');> }> The controller does load the correct view! (test.thtml) But the $abc> var is Undefined!What's happening is that the routes are configured so that all URLs in
the form "/pages/" actually call the display() function inpages_controller, regardless of what  is.You can confirm this by putting " die('in test function') " inside
test() - it won't get called.As for a solution. try adding another route in core/routes.php:$Route->connect('/pages/test', array('controller' => 'pages', 'action'=> 'test'));And then modify pages_controller.php:
function test() {$this->set('abc', 'something');$this->display()}Might be a nicer way of doing it, however.Regards,--lamby-- Chris Lamb, Cambs, UK  WWW: 
http://chris-lamb.co.uk  Q. Why is top posting bad? GPG: 0x634F9A20  A. Because it breaks the logical sequence of discussion


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---