Re: Accessing data from controller in view

2010-04-29 Thread Andrei Mita
That is exactly how I'm using it. Thanks


On Thu, Apr 29, 2010 at 6:11 PM, Jeremy Burns  wrote:

> So why not:
>
> echo 'Modifying profile for ' . $this->data['Profile']['name'];
>
> ?
>
> PS: What's the future like?
>
>
> Jeremy Burns
> jeremybu...@me.com 
>
>
> On 29 Apr 2010, at 16:02, Andrei Mita wrote:
>
> outputs the data:
>
> Array
> (
> [Profile] => Array
> (
> [id] => 1
> [name] => Andrei Mita
> [birth_date] => 2030-09-23
>
>
>
> On Thu, Apr 29, 2010 at 5:50 PM, Jeremy Burns  wrote:
>
>> What happens if you:
>>
>> die(debug($this->data));
>>
>> ... in the view?
>>
>>
>> Jeremy Burns
>> jeremybu...@me.com 
>>
>>
>> On 29 Apr 2010, at 15:42, Andrei Mita wrote:
>>
>> I populate $this->data like this:
>>
>> function edit($id=null){
>> ...
>> if (empty($this->data)) {
>> $this->data = $this->Profile->read(null, $id);
>> ...
>> }
>>
>>
>> On Thu, Apr 29, 2010 at 5:38 PM, Jeremy Burns  wrote:
>>
>>> OK - that might be it then. Only just discovered this functionality -
>>> maybe it's a 1.3 thing.
>>>
>>> What's in $this->data?
>>>
>>>
>>> Jeremy Burns
>>> jeremybu...@me.com 
>>>
>>> On 29 Apr 2010, at 15:33, Andrei Mita wrote:
>>>
>>> 1.2.7 i believe.
>>>
>>>
>>> On Thu, Apr 29, 2010 at 5:32 PM, Andrei Mita wrote:
>>>
 Terribly sorry for the whole controller dump.

 I only meant this:


 Notice (8): Undefined property:  View::$Profile
 [APP/views/profiles/edit.ctp, line 17]

 Fatal error: Call to a member function value() on a non-object in
 /var/www/fotopoetica/app/views/profiles/edit.ctp on line 17


 On Thu, Apr 29, 2010 at 5:24 PM, Andrei Mita wrote:

> In the view?
>
> If yes, I get this:
>
>

>>>
>>> Check out the new CakePHP Questions site http://cakeqs.org and help
>>> others with their CakePHP related questions.
>>>
>>> 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
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>>> at http://groups.google.com/group/cake-php?hl=en
>>>
>>>
>>>
>>> Check out the new CakePHP Questions site http://cakeqs.org and help
>>> others with their CakePHP related questions.
>>>
>>> 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
>>> cake-php+unsubscr...@googlegroups.comFor
>>>  more options, visit this group at
>>> http://groups.google.com/group/cake-php?hl=en
>>>
>>
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> 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
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php?hl=en
>>
>>
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> 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
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php?hl=en
>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this g

Cakephp Ajax is not including the javascripts in the view

2010-04-29 Thread Vijay
Hello All,

I am using the ajax for the internal links in my site.

When i click on the link & the new ctp loads, it is not including the
javascripts that are included in that ctp.
So the effects are not working.

It includes the css but not including the javascript.

Any idea.

Thanks,

Vijay Kumbhar,
CTO, Weboniselab.
9766251100

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: CakePHP Auth Component - Users, Groups & Permissions

2010-04-29 Thread Jeremy Burns
What's wrong with the code there - does it break in 1.3? If so, where? For 
instance, I can see a '$this->Session->del' which will need to be changed to 
'$this->Session->delete'. What errors are you getting?

Jeremy Burns
jeremybu...@me.com


On 30 Apr 2010, at 06:45, hoss7 wrote:

> i want Auth Component - Users, Groups & Permissions for cakephp 1.3
> like this code for cakephp 1.2:
> 
> http://www.studiocanaria.com/articles/cakephp_auth_component_users_groups_permissions_revisited
> 
> i need powerful code.
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


CakePHP Auth Component - Users, Groups & Permissions

2010-04-29 Thread hoss7
 i want Auth Component - Users, Groups & Permissions for cakephp 1.3
like this code for cakephp 1.2:

http://www.studiocanaria.com/articles/cakephp_auth_component_users_groups_permissions_revisited

 i need powerful code.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: getting double Auth info?

2010-04-29 Thread Iqbal Santyaswardan
Oops, I copied/pasted the wrong link... I followed this
http://bakery.cakephp.org/articles/view/phpbb3-api-bridge

On Fri, Apr 30, 2010 at 11:17 AM, Iqbal Santyaswardan wrote:

> Hi,
>
> I had wanted to have a single signon to phpbb, so i followed
> http://www.phpbb.com/kb/article/phpbb3-sessions-integration/ and replaced
> my User model/table/controller/etc to Member.  Since I had trouble making it
> work, I had since commented out the login into phpbb part.  But since I
> still want to look into it in the future someday, I still have my model use
> Member, and I have $this->Auth->userModel = 'Member';
>
> But for some reason in my session I'm getting this:
>
> Array
> (
> [Auth] => Array
> (
> [Member] => Array
> (  // filled by Member model variables
> )
>
> [User] => Array
> (  // filled by Member model variables
>)
>
> )
> )
>
> The Member model was originally User (i just rename it, the table names,
> field names, etc).  Why am I still getting the User array?  Or is this an
> expected behavior?
>
> Regards,
> Iqbal S.
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


getting double Auth info?

2010-04-29 Thread Iqbal Santyaswardan
Hi,

I had wanted to have a single signon to phpbb, so i followed
http://www.phpbb.com/kb/article/phpbb3-sessions-integration/ and replaced my
User model/table/controller/etc to Member.  Since I had trouble making it
work, I had since commented out the login into phpbb part.  But since I
still want to look into it in the future someday, I still have my model use
Member, and I have $this->Auth->userModel = 'Member';

But for some reason in my session I'm getting this:

Array
(
[Auth] => Array
(
[Member] => Array
(  // filled by Member model variables
)

[User] => Array
(  // filled by Member model variables
   )

)
)

The Member model was originally User (i just rename it, the table names,
field names, etc).  Why am I still getting the User array?  Or is this an
expected behavior?

Regards,
Iqbal S.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-04-29 Thread gremlin
I was answering his question. I don't know what his actual situation
is - perhaps he simplified his scenario when he asked his question.
Also the answer is useful to someone else who might have a legit
reason for wanting an alternate folder structure.
Thanks though, for your useful input.

On Apr 29, 8:00 pm, Miles J  wrote:
> Yeah but if you are going to do that, you might as well just use
> plugins, lol.
>
> On Apr 29, 6:38 pm, gremlin  wrote:
>
>
>
> > App::build( array(
> >     'controllers' => array(
> >         DS . join( DS, array( 'parts', 'to', 'your', 'path' ) . DS,
> >         ... other paths for controller lookup
> >     ),
> > ));
>
> > should work for you. I am not sure if you need to set the "normal"
> > path as one of the array items or not. Play around and let us know.
>
> > On Apr 29, 10:12 am, Miles J  wrote:
>
> > > Well its simple. You cant put controllers within subfolders. Cake
> > > doesn't support it.
>
> > > If you want to put controllers within subfolders, you have to make it
> > > a plugin.
>
> > > On Apr 29, 7:38 am, Matthew  wrote:
>
> > > > Here is my basic file structure
>
> > > > app/controllers ->
> > > >                      /categories/categories_controller.php
> > > >                      /news/news_controller.php
> > > >                      /users/users_controller.php
>
> > > > First attempt (default controller paths):
> > > > $controllerClasses = App::objects('controller');
> > > > debug($controllerClasses);
>
> > > > Result:
> > > > Array
> > > > (
> > > >     [0] => Pages
> > > >     [1] => App
> > > > )
>
> > > > (These are found in cake/libs/controller)
>
> > > > Second attempt (passing controller paths):
>
> > > > $App =& App::getInstance();
> > > > $paths = $App->controllers;
> > > > debug($paths);
>
> > > > $controllerClasses = $App->objects('controller',$paths);
> > > > debug($controllerClasses);
>
> > > > Result:
> > > > Array
> > > > (
> > > >     [0] => /home/pokey/public_html/cakephp/app/controllers/
> > > >     [1] => /home/pokey/public_html/cakephp/app/
> > > >     [2] => /home/pokey/public_html/cakephp/cake/libs/controller/
> > > > )
>
> > > > Array
> > > > (
> > > >     [0] => Pages
> > > >     [1] => App
> > > > )
>
> > > > It doesn't appear to be finding controllers recursively which doesn't
> > > > make sense because they are supposed to be in sub-folders.
>
> > > > Check out the new CakePHP Questions 
> > > > sitehttp://cakeqs.organdhelpotherswith their CakePHP related questions.
>
> > > > 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
> > > > cake-php+unsubscr...@googlegroups.com For more options, visit this 
> > > > group athttp://groups.google.com/group/cake-php?hl=en
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers 
> > > with their CakePHP related questions.
>
> > > 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
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > > athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Displyaing two models data in a view

2010-04-29 Thread Jeremy Burns
Rather than walk through your code correcting it, I can give some hints and 
point you at the guide - because the answers are all there and it is the best 
way of learning.

1) You need to link your models appropriately: 
http://book.cakephp.org/view/1039/Associations-Linking-Models-Together
2) When you have done that, you can build an array in your controller that 
contains all of the data you need by doing the right find: 
http://book.cakephp.org/view/1017/Retrieving-Your-Data. Also look at the 
Containable behaviour because it will help you build the right find: 
http://book.cakephp.org/view/1323/Containable
3) When you do this, your array will have elements for each model
4) When you create the view, name the form inputs with the matching model name 
and field name (e.g. $this->Form->input('Model.field_name');
5) When the form data is submitted you'll see that $this->data is a structured 
array with elements named after your models.
6) Save the data using the correct save method; saveAll if the array is 
structured correctly or by looping through your $this->data and using save as 
many times as you need: http://book.cakephp.org/view/1031/Saving-Your-Data. Pay 
attention to the array format expected by each different save method because 
they are not all the same.

Jeremy Burns
jeremybu...@me.com


On 30 Apr 2010, at 04:37, aveev wrote:

> 
> Hi, I'm designing travel document application. Here's the process:
> A person submits his/her data. Applicant data will be saved in applicants
> table. 
> For those whose data is already approved, the data will be saved in
> approved_applicants table. 
> After saving applicant data to approved_applicants table, we assign him/her
> a travel document by inserting a record in documents table with newly
> created approved applicant id as foreign key
> here are the related tables:
> CREATE TABLE `applicants` (
>  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
>  `name` varchar(30) NOT NULL,
>  `pob` varchar(25) DEFAULT NULL,
>  `dob` date NOT NULL,
>  `file_num` varchar(10) NOT NULL,
>  PRIMARY KEY (`id`)
> )
> 
> CREATE TABLE `documents` (
>  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
>  `document_number` varchar(10) NOT NULL,
>  `approved_applicant_id` int(10) DEFAULT NULL,
>  `status` varchar(15) DEFAULT NULL,
>  `app_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
> CURRENT_TIMESTAMP,
>  `created` timestamp NOT NULL DEFAULT '-00-00 00:00:00',
>  `modified` timestamp NOT NULL DEFAULT '-00-00 00:00:00',
>  PRIMARY KEY (`id`)
> ) 
> 
> CREATE TABLE `approved_applicants` (
>  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
>  `name` varchar(30) NOT NULL,
>  `pob` varchar(25) DEFAULT NULL,
>  `dob` date NOT NULL,
>  `file_num` varchar(10) NOT NULL,
>  PRIMARY KEY (`id`)
> )
> 
> So what I want to ask is how I can display applicant data and travel
> document in one page ?
> If we submit this form. the applicant data will be saved to
> approved_applicants table and a record in documents table will be inserted.
> 
> What I've already done is I put this code in ApprovedApplicant controller
> function result() {
>   
>   if(!empty($this->data)) {
>   //is this the right way to pass document data to the 
> view ?
>   $docs =
> $this->Document->find('first',array('conditions'=>array('Document.document_type_id'=>1,'status'=>'new'),
> 'fields'=>array('MIN(document_number) as max_doc')));
>   
>   $this->set('docs',$docs);
>   $this->data =
> $this->Applicant->find('first',array('conditions'=>array('Applicant.reg_num'=>
> $this->data['Applicant']['reg_num'])));
>   } else {
>   
> $this->redirect(array('controller'=>'applicants','action'=>'search'));
>   }
>   }
> 
>   function process() {
>   if(array_key_exists('confirm',$this->params['form'])) {
>   //save applicant data to approved applicants 
> table
>   //insert new record in documents table with 
> newly created approved
> applicant id as foreign key
>   }
>   } else {
>   
>   }
>   }
> 
> 
> 
> result.ctp
>
>   echo $form->create('Applicant', array('action'=>'process'));
>   echo $form->input('name');
>   echo $form->input('pob');
>   echo $form->input('dob');
>   echo $form->input('address');
>   echo $form->submit('confirm', array('name'=>'confirm', 'div'=>false));
>   echo $form->submit('cancel', array('name'=>'cancel', 'div'=>false));
>   
>   echo $form->end();
> 
>   //document output should be here ??
> ?>
> Any help will be greatly appreaciated
> I use cake 1.2
> Thanks
> -- 
> View this message in context: 
> http://old.nabble.com/Displyaing-two-models-data-in-a-view-tp28408236p28408236.html
> Sent from the CakePHP mail

Re: Using html5 video tag.

2010-04-29 Thread tristan_ph
You may use HtmlHelper->tag()

$this->Html->tag(__('your browser does not support the video tag',
true), array('src' => '/video.ogv', array('controls' => 'controls'));

On Apr 29, 10:03 pm, Phil  wrote:
> Hi!
>
> I'm trying to add a video file into my cakephp project using the html5
>  tag. If i write a simple html file with this code:
>
> 
> your browser does not support the video tag
> 
>
> If works properly in firefox. But if I try to the next code to my .ctp
> file in cakephp, firefox shows the player but is not playing the
> video:
>
> 
> your browser does not support the video tag
> 
>
> The video.ogv is in the webroot folder.
>
> Thanks.
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: i need ajax shopping cart with cakephp

2010-04-29 Thread Jeremy Burns
For a shortcut there is Kaching - http://code.google.com/p/kaching-php/ - I 
haven't tried it and don't know to what extent it uses Ajax.

Jeremy Burns
jeremybu...@me.com
On 29 Apr 2010, at 21:47, Jonathon Musters wrote:

> Please do write it for us. And have it slice bread as an extra lol
> 
> 
> On 4/29/10, thatsgreat2345  wrote:
>> U then make one are we supposed to just write it all for you
>> 
>> On Apr 29, 11:54 am, hoss7  wrote:
>>> i need ajax shopping cart with cakephp
>>> 
>>> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
>>> with their CakePHP related questions.
>>> 
>>> 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
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>>> athttp://groups.google.com/group/cake-php?hl=en
>> 
>> Check out the new CakePHP Questions site http://cakeqs.org and help others
>> with their CakePHP related questions.
>> 
>> 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
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>> 
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Displyaing two models data in a view

2010-04-29 Thread aveev

Hi, I'm designing travel document application. Here's the process:
A person submits his/her data. Applicant data will be saved in applicants
table. 
For those whose data is already approved, the data will be saved in
approved_applicants table. 
After saving applicant data to approved_applicants table, we assign him/her
a travel document by inserting a record in documents table with newly
created approved applicant id as foreign key
here are the related tables:
CREATE TABLE `applicants` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(30) NOT NULL,
  `pob` varchar(25) DEFAULT NULL,
  `dob` date NOT NULL,
  `file_num` varchar(10) NOT NULL,
  PRIMARY KEY (`id`)
)

CREATE TABLE `documents` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `document_number` varchar(10) NOT NULL,
  `approved_applicant_id` int(10) DEFAULT NULL,
  `status` varchar(15) DEFAULT NULL,
  `app_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
CURRENT_TIMESTAMP,
  `created` timestamp NOT NULL DEFAULT '-00-00 00:00:00',
  `modified` timestamp NOT NULL DEFAULT '-00-00 00:00:00',
  PRIMARY KEY (`id`)
) 

CREATE TABLE `approved_applicants` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(30) NOT NULL,
  `pob` varchar(25) DEFAULT NULL,
  `dob` date NOT NULL,
  `file_num` varchar(10) NOT NULL,
  PRIMARY KEY (`id`)
)

So what I want to ask is how I can display applicant data and travel
document in one page ?
If we submit this form. the applicant data will be saved to
approved_applicants table and a record in documents table will be inserted.

What I've already done is I put this code in ApprovedApplicant controller
function result() {

if(!empty($this->data)) {
//is this the right way to pass document data to the 
view ?
$docs =
$this->Document->find('first',array('conditions'=>array('Document.document_type_id'=>1,'status'=>'new'),
'fields'=>array('MIN(document_number) as max_doc')));

$this->set('docs',$docs);
$this->data =
$this->Applicant->find('first',array('conditions'=>array('Applicant.reg_num'=>
$this->data['Applicant']['reg_num'])));
} else {

$this->redirect(array('controller'=>'applicants','action'=>'search'));
}
}

function process() {
if(array_key_exists('confirm',$this->params['form'])) {
//save applicant data to approved applicants 
table
//insert new record in documents table with 
newly created approved
applicant id as foreign key
}
} else {

}
}



result.ctp
create('Applicant', array('action'=>'process'));
echo $form->input('name');
echo $form->input('pob');
echo $form->input('dob');
echo $form->input('address');
echo $form->submit('confirm', array('name'=>'confirm', 'div'=>false));
echo $form->submit('cancel', array('name'=>'cancel', 'div'=>false));

echo $form->end();

//document output should be here ??
?>
Any help will be greatly appreaciated
I use cake 1.2
Thanks
-- 
View this message in context: 
http://old.nabble.com/Displyaing-two-models-data-in-a-view-tp28408236p28408236.html
Sent from the CakePHP mailing list archive at Nabble.com.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-04-29 Thread Miles J
Yeah but if you are going to do that, you might as well just use
plugins, lol.

On Apr 29, 6:38 pm, gremlin  wrote:
> App::build( array(
>     'controllers' => array(
>         DS . join( DS, array( 'parts', 'to', 'your', 'path' ) . DS,
>         ... other paths for controller lookup
>     ),
> ));
>
> should work for you. I am not sure if you need to set the "normal"
> path as one of the array items or not. Play around and let us know.
>
> On Apr 29, 10:12 am, Miles J  wrote:
>
>
>
> > Well its simple. You cant put controllers within subfolders. Cake
> > doesn't support it.
>
> > If you want to put controllers within subfolders, you have to make it
> > a plugin.
>
> > On Apr 29, 7:38 am, Matthew  wrote:
>
> > > Here is my basic file structure
>
> > > app/controllers ->
> > >                      /categories/categories_controller.php
> > >                      /news/news_controller.php
> > >                      /users/users_controller.php
>
> > > First attempt (default controller paths):
> > > $controllerClasses = App::objects('controller');
> > > debug($controllerClasses);
>
> > > Result:
> > > Array
> > > (
> > >     [0] => Pages
> > >     [1] => App
> > > )
>
> > > (These are found in cake/libs/controller)
>
> > > Second attempt (passing controller paths):
>
> > > $App =& App::getInstance();
> > > $paths = $App->controllers;
> > > debug($paths);
>
> > > $controllerClasses = $App->objects('controller',$paths);
> > > debug($controllerClasses);
>
> > > Result:
> > > Array
> > > (
> > >     [0] => /home/pokey/public_html/cakephp/app/controllers/
> > >     [1] => /home/pokey/public_html/cakephp/app/
> > >     [2] => /home/pokey/public_html/cakephp/cake/libs/controller/
> > > )
>
> > > Array
> > > (
> > >     [0] => Pages
> > >     [1] => App
> > > )
>
> > > It doesn't appear to be finding controllers recursively which doesn't
> > > make sense because they are supposed to be in sub-folders.
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers 
> > > with their CakePHP related questions.
>
> > > 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
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > > athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-04-29 Thread gremlin
App::build( array(
'controllers' => array(
DS . join( DS, array( 'parts', 'to', 'your', 'path' ) . DS,
... other paths for controller lookup
),
));

should work for you. I am not sure if you need to set the "normal"
path as one of the array items or not. Play around and let us know.

On Apr 29, 10:12 am, Miles J  wrote:
> Well its simple. You cant put controllers within subfolders. Cake
> doesn't support it.
>
> If you want to put controllers within subfolders, you have to make it
> a plugin.
>
> On Apr 29, 7:38 am, Matthew  wrote:
>
>
>
> > Here is my basic file structure
>
> > app/controllers ->
> >                      /categories/categories_controller.php
> >                      /news/news_controller.php
> >                      /users/users_controller.php
>
> > First attempt (default controller paths):
> > $controllerClasses = App::objects('controller');
> > debug($controllerClasses);
>
> > Result:
> > Array
> > (
> >     [0] => Pages
> >     [1] => App
> > )
>
> > (These are found in cake/libs/controller)
>
> > Second attempt (passing controller paths):
>
> > $App =& App::getInstance();
> > $paths = $App->controllers;
> > debug($paths);
>
> > $controllerClasses = $App->objects('controller',$paths);
> > debug($controllerClasses);
>
> > Result:
> > Array
> > (
> >     [0] => /home/pokey/public_html/cakephp/app/controllers/
> >     [1] => /home/pokey/public_html/cakephp/app/
> >     [2] => /home/pokey/public_html/cakephp/cake/libs/controller/
> > )
>
> > Array
> > (
> >     [0] => Pages
> >     [1] => App
> > )
>
> > It doesn't appear to be finding controllers recursively which doesn't
> > make sense because they are supposed to be in sub-folders.
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Plugins in 1.3

2010-04-29 Thread #2Will
ta for getting back to me.

1. ok, ta.  i missed that bit of migrations.
2. if i try to goto the page the javascript is trying to get, i get a
can't find controller error:

localhost/status/google_analytics/visits/

=>

 Error:  GoogleAnalyticsController could not be found.

Error: Create the class GoogleAnalyticsController below in file: app/
controllers/google_analytics_controller.php




So its not realising i have a plugin called status?  This happens if
with my settings left in routes or cleared out competely (none of them
refer to status)

any more ideas?


On Apr 29, 7:46 pm, Sam Sherlock  wrote:
> 1) with plugins in 1.3 you have to rename the folder
>
> vendors => webroot.  see the migration guide
>
> 2) not sure - what do the logs show?  might be routes. might be that your
> using some code that has been depreciated in 1.3
>
> - S
>
> On 29 April 2010 09:35, #2Will  wrote:
>
>
>
> > Hi,
>
> > Do plugins in cake1.3 need to be configured like it shows in the new
> > bootstrap file even if they are in the standard /app/plugins folder?
>
> > My $html->css links no longer find the files stored in the /app/
> > plugins/status/vendors/css folder.
>
> > also, this:
>
> > $.get("/status/google_analytics//" + $("# > echo $key ?>-span").val(), function(data) {
> >                        $("#").html(data);
> >                });
>
> > creates some sort of wierd redirect blank screen after flashing up
> > something momentarily.  i think because it can't find the file in that
> > path.
>
> > This all worked tickedy boo  in 1.2.6 yesterday. so i guess is
> > something im missing in the upgrade to 1.3
>
> > Thanks!
>
> > Will
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.comFor
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


DebugKit

2010-04-29 Thread Ed Propsner
Could anyone tell me where I went wrong with debugkit? The installation was
straightforward enough that it seemed impossible to screw up.

Anyhow, it returns all the data that would be expected but it also returns a
ton of warnings, ie:

*Warning*: Missing argument 2 for DebugKitDebugger::_output(),

It repeats this error for args 3, 4, 5, etc. then starts displaying notices,
ie:

*Notice*: Undefined variable: kontext

It repeats this process several times over.

Also, I can only get it work if I have debug to set on 2,
debug 1 returns all the errors I just described and nothing else.

Did I screw something up in Cake to make debugkit freak out or am
I botching the installation of debugkit?

Thanks,

-Ed

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: 1.3 Session issue

2010-04-29 Thread Miles J
Its public $components, not public $component.

On Apr 29, 2:10 pm, Sam Sherlock  wrote:
> Have you got the code doubled?? within the app controller?
>
> - S
>
> On 29 April 2010 20:16, Jørn  wrote:
>
>
>
> > Hi,
>
> > i'm having trouble getting sessions to work in 1.3.
>
> > I've understodd that I need to load the component and helper manually
> > in the AppController.
> > However I get this error-message when trying to load the component
> > with var $component = array('Session');
>
> > Fatal error: Cannot redeclare AppController::$components in 
> > app_controller.php
>
> > any ideas?
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.comFor
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Bakery...arrogance or plain lack of attention

2010-04-29 Thread jacmoe
I was maybe a bit too harsh, but Mr. Wadhwani failed to notice that we
are indeed trying to fix the issues, and that this is not borne out of
arrogance.
I understand that he's pissed off, of course.
And that he's letting out some steam.

> So if you look your questions to me you will notice that it does breed
> arrogance.
> Accept that the bakery has problems, fix it or get rid of it. Plain
> and simple.
> Having said that I am not planning to write any more for the bakery
> and I do hope other programmers follow suit.

The Bakery in it's current state is far from foolproof, as you might
have noticed. :)


On Apr 29, 9:19 pm, John Andersen  wrote:
> Jacmoe, I can't agree with you!
> Jayesh W did not complain about the Bakery itself, but about the
> process of having submitted an article, which was then deleted,
> without a reviewer having informed of the reason for it!
> That should never happen!
>    John
>
> On Apr 29, 6:51 pm, jacmoe  wrote:> Good riddance.
> > I don't think I've seen such an arrogant attitude in the CakePHP
> > community before.
>
> > I mean: this has been amply covered in this 'topic', and the topic I
> > started.
>
> > Accept the fact that CakePHP is an open source, open community
> > project, or get lost.
>
> > If you paid for the service, then you would have a reason for being
> > upset.
> > But you didn't.
>
> [snip]
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: 1.3 Session issue

2010-04-29 Thread Sam Sherlock
Have you got the code doubled?? within the app controller?

- S



On 29 April 2010 20:16, Jørn  wrote:

> Hi,
>
> i'm having trouble getting sessions to work in 1.3.
>
> I've understodd that I need to load the component and helper manually
> in the AppController.
> However I get this error-message when trying to load the component
> with var $component = array('Session');
>
> Fatal error: Cannot redeclare AppController::$components in 
> app_controller.php
>
> any ideas?
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: How to make a search form with Cakephp

2010-04-29 Thread Sam Sherlock
you need logic to make the form function


this is quite old - may require code to be updated
http://bakery.cakephp.org/articles/view/sphinx-behavior

I found this whilst searching for that (above) - not sure how finished it is
the readme is blank
http://github.com/dogmatic/cakephp_search_plugin/blob/master/controllers/components/search.php


if its simple you may be able to use google site search or yahoo BOSS (I
don't have exp of those within cake) - I think Matt Curry made a yahoo boss
plugin

- S



On 29 April 2010 19:49, John Andersen  wrote:

> I know that you are asking for a form, but isn't what you really want,
> the processing of the search form, when it has been submitted?
> I can show a search form, which is in progress of being made, maybe it
> can give you some ideas.
> http://jaa.myftp.org:28871/enquiries/article
> Enjoy,
>   John
>
> Ps. my server is online only between 09:00 and 22:00 latvian time (may
> be extended if I am working)
>
> On Apr 29, 5:51 pm, viis  wrote:
> > i was more looking for a real life sample of a search form - any would
> > do
> >
> > there is no real life Cakephp search forms available,
> >
> > there are simple search forms and samples for beginners , but these
> > are useless for real life complicated searches
> >
> > On 28 apr, 19:13, John Andersen  wrote:
> >
> >
> >
> > > So it seems to me that you know what your search form should contain -
> > > now, what have you done in order to code it? Please show your current
> > > version of the search view! That way we may better be able to point
> > > you in the right direction :)
> > > Enjoy,
> > >John
> >
> > > On Apr 28, 8:35 am, viis  wrote:
> >
> > > > How to write a search form with Cakephp , selecting results from
> > > > database
> >
> > > > so that one can select certain fields and if none of the fields have
> > > > been selected then all results from the database are selected:
> >
> > > > SEARCH  FORM  fields:
> >
> > > > 1)  Select location: dropdown ( 1. all 2. New York 3. London )
> >
> > > > 2)  Type: dropdown ( 1. all, 2. blue, 3. yellow, 4. green )
> >
> > > > 3)  Select min and max price :  min ( textarea insert minimum price
> > > > number - default value - 0 )  to  ( textarea insert max price number
> )
> >
> > > > 4)  Show results with images: checkbox ( check if search results
> > > > should include results with images or not )
> >
> > > > 5)  Sort by:  dropdown ( 1. none 2. price desc 3. price asc 4.
> > > > location 5. latest added )
> >
> > > > 6)  Search ( search text link )
> >
> > > > Check out the new CakePHP Questions
> sitehttp://cakeqs.organdhelpothers with their CakePHP related questions.
> >
> > > > 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
> > > > cake-php+unsubscr...@googlegroups.comFor
> > > >  more options, visit this group athttp://
> groups.google.com/group/cake-php?hl=en
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others
> with their CakePHP related questions.
> >
> > > 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
> > > cake-php+unsubscr...@googlegroups.comFor
> > >  more options, visit this group athttp://
> groups.google.com/group/cake-php?hl=en
> >
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> with their CakePHP related questions.
> >
> > 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
> > cake-php+unsubscr...@googlegroups.comFor
> >  more options, visit this group athttp://
> groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Bakery...arrogance or plain lack of attention

2010-04-29 Thread Graham Weldon
Lets keep this civil, people.

Jayesh, I do hope that you consider writing for the bakery or other CakePHP
related resources again. Each contribution that is made by the community is
a valuable addition to the resource base that is already largely community
built. We appreciate every piece of information that can be shared and
co-operatively built.
While not having detailed information about deletion of material from the
bakery, I can only suggest that this is a gross oversight by one of our
moderators. This should *never* happen. We in fact encourage review, and
reporting of all submitted articles such that we both educate the user to
produce quality material for submission, as well as maintain a high standard
for articles to ensure users looking for documentation and examples are not
presented with methods that are non-standard or against the CakePHP
conventions.

John is absolutely correct here, what has been described should never
happen.

Jayesh, can you let me know the title of your post. I can trace down whether
this is retrievable or not. I hope very much that it is, and I apologise for
this mixup. Feel free to also contact me directly, off list, if you prefer.

Cheers,
Graham Weldon (aka. Predominant)




On Fri, Apr 30, 2010 at 5:19 AM, John Andersen wrote:

> Jacmoe, I can't agree with you!
> Jayesh W did not complain about the Bakery itself, but about the
> process of having submitted an article, which was then deleted,
> without a reviewer having informed of the reason for it!
> That should never happen!
>   John
>
> On Apr 29, 6:51 pm, jacmoe  wrote:
> > Good riddance.
> > I don't think I've seen such an arrogant attitude in the CakePHP
> > community before.
> >
> > I mean: this has been amply covered in this 'topic', and the topic I
> > started.
> >
> > Accept the fact that CakePHP is an open source, open community
> > project, or get lost.
> >
> > If you paid for the service, then you would have a reason for being
> > upset.
> > But you didn't.
> >
> [snip]
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: i need ajax shopping cart with cakephp

2010-04-29 Thread Jonathon Musters
Please do write it for us. And have it slice bread as an extra lol


On 4/29/10, thatsgreat2345  wrote:
> U then make one are we supposed to just write it all for you
>
> On Apr 29, 11:54 am, hoss7  wrote:
>> i need ajax shopping cart with cakephp
>>
>> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
>> with their CakePHP related questions.
>>
>> 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
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: i need ajax shopping cart with cakephp

2010-04-29 Thread thatsgreat2345
U then make one are we supposed to just write it all for you

On Apr 29, 11:54 am, hoss7  wrote:
> i need ajax shopping cart with cakephp
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: RSS feed display

2010-04-29 Thread calvin
What is the problem you are having? If the problem is that your
default layout is being rendered, thus breaking the RSS, then you just
need to call $this->layout = 'rss' or just use the RequestHandler
component: http://book.cakephp.org/view/549/Controller-Code .

On Apr 28, 11:43 pm, aboxy  wrote:
> Hello all,
>
> I am totally new to php as well as cakephp. I am stuck at a very
> simple issue,hope someone can help me here.
> I have an RSS feed which gets generated outside of my php application.
> I have a route defined as '/feed' which maps to a controller[rss] and
> action[feed]. Action has a simple logic to call my web service which
> return generated RSS feed. I get all the data but am not sure how to
> display it. I simply have echo the response in the view but that does
> not seem to fix it.
>
> If I run my web service directly, my browser detects the feed. Any
> help is much appreciated.
>
> thanks
> aboxy
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


1.3 Session issue

2010-04-29 Thread Jørn
Hi,

i'm having trouble getting sessions to work in 1.3.

I've understodd that I need to load the component and helper manually
in the AppController.
However I get this error-message when trying to load the component
with var $component = array('Session');

Fatal error: Cannot redeclare AppController::$components in 
app_controller.php

any ideas?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Bakery...arrogance or plain lack of attention

2010-04-29 Thread John Andersen
Jacmoe, I can't agree with you!
Jayesh W did not complain about the Bakery itself, but about the
process of having submitted an article, which was then deleted,
without a reviewer having informed of the reason for it!
That should never happen!
   John

On Apr 29, 6:51 pm, jacmoe  wrote:
> Good riddance.
> I don't think I've seen such an arrogant attitude in the CakePHP
> community before.
>
> I mean: this has been amply covered in this 'topic', and the topic I
> started.
>
> Accept the fact that CakePHP is an open source, open community
> project, or get lost.
>
> If you paid for the service, then you would have a reason for being
> upset.
> But you didn't.
>
[snip]

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: httpSocket->request

2010-04-29 Thread John Andersen
No you don't, according to the CakePHP book! The request method
expects an array!
Enjoy,
   John

On Apr 29, 12:04 pm, emanuele  wrote:
> Hi fellows, I was wandering if I need to use urlencode() in order to fill
> the $request array for the httpSocket->request method. Any Idea?
>
> --
> Emanuele Gringeri
> Computer Engineer
> University of Pisa
> Be my mirror, my sword and shield
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: how to get all the action names, controllers names viewed by a user after the user login

2010-04-29 Thread John Andersen
You track it using the log or a database table.
Enjoy,
   John

On Apr 29, 3:13 pm, ram prasath <85.pras...@gmail.com> wrote:
> Hi Friends ,
>
> Hi any 1 tel me how to get all the controllers/action viewed by the
> user after he loged in once..
>
> Thanks In Advance
>
> Ram Prasath
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


i need ajax shopping cart with cakephp

2010-04-29 Thread hoss7
i need ajax shopping cart with cakephp

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: render multiple views within single layout

2010-04-29 Thread John Andersen
See the CakePHP book regarding elements and their usage:
http://book.cakephp.org/view/97/Elements

Use Elements to present parts of the interface, that can be used in
more than one page/view.
So if your main action is "upload_photos", then in your
"upload_photos" view, you can invoke an element named "edit_progress"
and thus present both of your parts.
Enjoy,
   John

On Apr 29, 5:42 pm, gautam lakum  wrote:
> Hi all bakers,
>
> I have coded like this to render two views in a single controller.
>
> $this->render('upload_photos','layout1');
> $this->viewPath = 'ideas';
> $this->render('edit_progress',null);
>
> But the problem is it renders layout1 completely after rendering
> upload_photos, and then it renders the edit_progress view file along
> with rendering layout2.
> So in a single page, I am getting both layouts and both view files. I
> want upload_photos and edit_progress rendered in layout1's  $content_for_layout; ?> area.
>
> Help me please.
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: How to make a search form with Cakephp

2010-04-29 Thread John Andersen
I know that you are asking for a form, but isn't what you really want,
the processing of the search form, when it has been submitted?
I can show a search form, which is in progress of being made, maybe it
can give you some ideas.
http://jaa.myftp.org:28871/enquiries/article
Enjoy,
   John

Ps. my server is online only between 09:00 and 22:00 latvian time (may
be extended if I am working)

On Apr 29, 5:51 pm, viis  wrote:
> i was more looking for a real life sample of a search form - any would
> do
>
> there is no real life Cakephp search forms available,
>
> there are simple search forms and samples for beginners , but these
> are useless for real life complicated searches
>
> On 28 apr, 19:13, John Andersen  wrote:
>
>
>
> > So it seems to me that you know what your search form should contain -
> > now, what have you done in order to code it? Please show your current
> > version of the search view! That way we may better be able to point
> > you in the right direction :)
> > Enjoy,
> >    John
>
> > On Apr 28, 8:35 am, viis  wrote:
>
> > > How to write a search form with Cakephp , selecting results from
> > > database
>
> > > so that one can select certain fields and if none of the fields have
> > > been selected then all results from the database are selected:
>
> > > SEARCH  FORM  fields:
>
> > > 1)  Select location: dropdown ( 1. all 2. New York 3. London )
>
> > > 2)  Type: dropdown ( 1. all, 2. blue, 3. yellow, 4. green )
>
> > > 3)  Select min and max price :  min ( textarea insert minimum price
> > > number - default value - 0 )  to  ( textarea insert max price number )
>
> > > 4)  Show results with images: checkbox ( check if search results
> > > should include results with images or not )
>
> > > 5)  Sort by:  dropdown ( 1. none 2. price desc 3. price asc 4.
> > > location 5. latest added )
>
> > > 6)  Search ( search text link )
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers 
> > > with their CakePHP related questions.
>
> > > 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
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > > athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-04-29 Thread Miles J
Well its simple. You cant put controllers within subfolders. Cake
doesn't support it.

If you want to put controllers within subfolders, you have to make it
a plugin.

On Apr 29, 7:38 am, Matthew  wrote:
> Here is my basic file structure
>
> app/controllers ->
>                      /categories/categories_controller.php
>                      /news/news_controller.php
>                      /users/users_controller.php
>
> First attempt (default controller paths):
> $controllerClasses = App::objects('controller');
> debug($controllerClasses);
>
> Result:
> Array
> (
>     [0] => Pages
>     [1] => App
> )
>
> (These are found in cake/libs/controller)
>
> Second attempt (passing controller paths):
>
> $App =& App::getInstance();
> $paths = $App->controllers;
> debug($paths);
>
> $controllerClasses = $App->objects('controller',$paths);
> debug($controllerClasses);
>
> Result:
> Array
> (
>     [0] => /home/pokey/public_html/cakephp/app/controllers/
>     [1] => /home/pokey/public_html/cakephp/app/
>     [2] => /home/pokey/public_html/cakephp/cake/libs/controller/
> )
>
> Array
> (
>     [0] => Pages
>     [1] => App
> )
>
> It doesn't appear to be finding controllers recursively which doesn't
> make sense because they are supposed to be in sub-folders.
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: datasoruces hierarchical

2010-04-29 Thread emanuele
ok sorry... but A bit less of sarcasm?
so..
thank u
On Thu, Apr 29, 2010 at 5:46 PM, AD7six  wrote:

>
>
> On Apr 29, 5:25 pm, emanuele  wrote:
> > Hi,
> > Is it possible to create  hierarchicy datasoruces?
> >
> > I ve the following situation:
> >
> > class MyDataS1 extends Datasource {
> >
> > }
> >
> > and want a secondo datasource
> >
> > class MyDataS2 extends MyDataS1{
> >
> > }
> >
> > any chance to have it working?
>
> Unbelievably and after years of tireless development I found a project
> that has exactly this functionality! http://bit.ly/ae7v9K
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
Emanuele Gringeri
Computer Engineer
University of Pisa
Be my mirror, my sword and shield

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Bakery...arrogance or plain lack of attention

2010-04-29 Thread jacmoe
Good riddance.
I don't think I've seen such an arrogant attitude in the CakePHP
community before.

I mean: this has been amply covered in this 'topic', and the topic I
started.

Accept the fact that CakePHP is an open source, open community
project, or get lost.

If you paid for the service, then you would have a reason for being
upset.
But you didn't.

On Apr 29, 6:16 am, Jayesh Wadhwani  wrote:
> Like I said it does seem to breed arrogance.
>
> Writing for the bakery needs time and effort. When developers put in
> such an effort they are doing that to disburse their knowledge to
> other developers. Their efforts should be lauded and not taken lightly
> or their work criticized.
>
> So if you look your questions to me you will notice that it does breed
> arrogance.
>
> Accept that the bakery has problems, fix it or get rid of it. Plain
> and simple.
>
> Having said that I am not planning to write any more for the bakery
> and I do hope other programmers follow suit.
>
> -Jayesh
>
> On Apr 25, 11:46 pm, jacmoe  wrote:
>
>
>
>
>
> > That doesn't give you carte blanche to be arrogant, does it?
>
> > What have you done for CakePHP if I may ask? :)
>
> > A couple of weeks ago I posted this 
> > topic:http://groups.google.com/group/cake-php/browse_thread/thread/e3a1f469...
> > With the title 'Let's get rid of TheBakery'.
>
> > I volunteered as a moderator, but there's still lots of things to do.
> > And the software itself needs some fixing.
>
> > Feel free to fork it.
>
> > I would probably delete the article as well, if there haven't been any
> > response in three months - I don't know what article it was, since I
> > concentrate on removing spam rather than approving articles.
> > Due to my newness to CakePHP mostly.
>
> > So: what have you done for CakePHP ? :D
>
> > Cheers
>
> > Jacob
>
> > On Apr 25, 11:42 am, Jayesh Wadhwani  wrote:
>
> > > TheBakeryis supposed to be a place where cakePHP developers exchange
> > > ideas which in turn enhances the framework.
>
> > > I recently published a helper and it languished for pending review for
> > > weeks on end. I visited the IRC and other than rude and arrogant
> > > answers there was not much help.
>
> > > I did not receive any emails as to why there was a delay.
>
> > > Today I log in and see this message.. "This article has been deleted
> > > and is not available for publication. Review TheBakeryPublishing
> > > Guidelines to understand why this article was deleted."
>
> > > Brilliant reviewer! Don't you think it would be a better to tell me
> > > what is the exact problem so that I can correct it. According to
> > > guidelines I do get 60 days. Right!
>
> > > So, what is it? The reviewers just do not care, are plain lazy or just
> > > purely arrogant.
>
> > > If cakePHP has grown to such as level that it cannot handle thebakery
> > > and breeds arrogance then I suggest that you get rid of it.
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers 
> > > with their CakePHP related questions.
>
> > > 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
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > > athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-04-29 Thread Matthew
Here is my basic file structure

app/controllers ->
 /categories/categories_controller.php
 /news/news_controller.php
 /users/users_controller.php

First attempt (default controller paths):
$controllerClasses = App::objects('controller');
debug($controllerClasses);

Result:
Array
(
[0] => Pages
[1] => App
)

(These are found in cake/libs/controller)

Second attempt (passing controller paths):

$App =& App::getInstance();
$paths = $App->controllers;
debug($paths);

$controllerClasses = $App->objects('controller',$paths);
debug($controllerClasses);

Result:
Array
(
[0] => /home/pokey/public_html/cakephp/app/controllers/
[1] => /home/pokey/public_html/cakephp/app/
[2] => /home/pokey/public_html/cakephp/cake/libs/controller/
)

Array
(
[0] => Pages
[1] => App
)

It doesn't appear to be finding controllers recursively which doesn't
make sense because they are supposed to be in sub-folders.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: datasoruces hierarchical

2010-04-29 Thread AD7six


On Apr 29, 5:25 pm, emanuele  wrote:
> Hi,
> Is it possible to create  hierarchicy datasoruces?
>
> I ve the following situation:
>
> class MyDataS1 extends Datasource {
>
> }
>
> and want a secondo datasource
>
> class MyDataS2 extends MyDataS1{
>
> }
>
> any chance to have it working?

Unbelievably and after years of tireless development I found a project
that has exactly this functionality! http://bit.ly/ae7v9K

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Finds using OR or AND

2010-04-29 Thread AD7six


On Apr 29, 3:28 pm, slippy  wrote:
> I want to be able to pass an array of id's into a find and also
> specify if the results found should contain all of the id's or any of
> them.

how can a field contain more than one value. Good luck getting more
than 0 results with that.

(id = 1 AND id = 2)

Try starting with the sql that gives you want you want - if you
haven't got that you've got some research to do before asking
(although you'll find it's quite obvious) how to do the same via a
model find call.

AD

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Bakery...arrogance or plain lack of attention

2010-04-29 Thread AD7six


On Apr 29, 6:16 am, Jayesh Wadhwani  wrote:
> Like I said it does seem to breed arrogance.
>
> Writing for the bakery needs time and effort. When developers put in
> such an effort they are doing that to disburse their knowledge to
> other developers. Their efforts should be lauded and not taken lightly
> or their work criticized.
>
> So if you look your questions to me you will notice that it does breed
> arrogance.
>
> Accept that the bakery has problems, fix it or get rid of it.

Thanks for volunteering - all help is much appreciated.

ktnxby

AD

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: wordpress integration without seperate url

2010-04-29 Thread Andy Dirnberger
I think mex is talking about dropping WordPress right into the webroot
folder with the ultimate goal being to have http://www.example.com/users
going to UsersController in Cake and http://www.examples.com/some-post/
going to WordPress. The problem is, .htaccess would have no easy way
of knowing for which system to rewrite the URL. There needs to be
something in the URL to trigger one system over the other.

The only solution I can think of that isn't a complete nightmare of
rewrite rules is to not use mod_rewrite with WordPress, and put in
rewrite rules for things like p= and s=. And if you wanted to use
WordPress's home page you'd need to add a rule for /.

On Apr 29, 10:18 am, Andrei Mita  wrote:
> What do you mean by "dont want it to be on a seperate url like /blog"?
>
> You don't want it to be domain.com/blog ?
>
>
>
>
>
> On Thu, Apr 29, 2010 at 4:35 PM, meximex  wrote:
> > no solutions
>
> > On 23 Apr., 09:19, meximex  wrote:
> > > hi,
> > > i would like to include wordpress into my cakephp application but i
> > > dont want it to be on a seperate url like /blog.
>
> > > reasons for that are that the users looses his session inside the
> > > site, looses the usermenu (i know i could do that by ajax..)
>
> > > isnt there a way to just "include" the blog files?
>
> > > btw. i am looking for a forum that can be "included" very easy
> > > too... ;-)
>
> > > regards,
> > > mex
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others
> > with their CakePHP related questions.
>
> > > 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
> > > cake-php+unsubscr...@googlegroups.com > >  om>For more options, visit this group athttp://
> > groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.com > om>For more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


datasoruces hierarchical

2010-04-29 Thread emanuele
Hi,
Is it possible to create  hierarchicy datasoruces?

I ve the following situation:

class MyDataS1 extends Datasource {
}

and want a secondo datasource

class MyDataS2 extends MyDataS1{
}

any chance to have it working?

-- 
Emanuele Gringeri
Computer Engineer
University of Pisa
Be my mirror, my sword and shield

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Accessing data from controller in view

2010-04-29 Thread Jeremy Burns
So why not:

echo 'Modifying profile for ' . $this->data['Profile']['name'];

?

PS: What's the future like?

Jeremy Burns
jeremybu...@me.com


On 29 Apr 2010, at 16:02, Andrei Mita wrote:

> outputs the data:
> 
> Array
> (
> [Profile] => Array
> (
> [id] => 1
> [name] => Andrei Mita
> [birth_date] => 2030-09-23
> 
> 
> 
> On Thu, Apr 29, 2010 at 5:50 PM, Jeremy Burns  wrote:
> What happens if you:
> 
> die(debug($this->data));
> 
> ... in the view?
> 
> 
> Jeremy Burns
> jeremybu...@me.com
> 
> 
> On 29 Apr 2010, at 15:42, Andrei Mita wrote:
> 
>> I populate $this->data like this:
>> 
>> function edit($id=null){
>> ...
>> if (empty($this->data)) {
>> $this->data = $this->Profile->read(null, $id);
>> ...
>> }
>> 
>> 
>> On Thu, Apr 29, 2010 at 5:38 PM, Jeremy Burns  wrote:
>> OK - that might be it then. Only just discovered this functionality - maybe 
>> it's a 1.3 thing.
>> 
>> What's in $this->data?
>> 
>> 
>> Jeremy Burns
>> jeremybu...@me.com
>> 
>> On 29 Apr 2010, at 15:33, Andrei Mita wrote:
>> 
>>> 1.2.7 i believe.
>>> 
>>> 
>>> On Thu, Apr 29, 2010 at 5:32 PM, Andrei Mita  wrote:
>>> Terribly sorry for the whole controller dump.
>>> 
>>> I only meant this:
>>> 
>>> 
>>> Notice (8): Undefined property:  View::$Profile 
>>> [APP/views/profiles/edit.ctp, line 17]
>>> 
>>> Fatal error: Call to a member function value() on a non-object in 
>>> /var/www/fotopoetica/app/views/profiles/edit.ctp on line 17
>>> 
>>> 
>>> On Thu, Apr 29, 2010 at 5:24 PM, Andrei Mita  wrote:
>>> In the view?
>>> 
>>> If yes, I get this:
>>> 
>>> 
>>> 
>>> 
>>> Check out the new CakePHP Questions site http://cakeqs.org and help others 
>>> with their CakePHP related questions.
>>>  
>>> 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
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
>>> http://groups.google.com/group/cake-php?hl=en
>> 
>> 
>> Check out the new CakePHP Questions site http://cakeqs.org and help others 
>> with their CakePHP related questions.
>>  
>> 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
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
>> http://groups.google.com/group/cake-php?hl=en
>> 
>> 
>> Check out the new CakePHP Questions site http://cakeqs.org and help others 
>> with their CakePHP related questions.
>>  
>> 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
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
>> http://groups.google.com/group/cake-php?hl=en
> 
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>  
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en
> 
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>  
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Accessing data from controller in view

2010-04-29 Thread Lucca Mordente
echo $this->data['Profile']['name'] should output what you want!

On 29 abr, 12:02, Andrei Mita  wrote:
> outputs the data:
>
> Array
> (
>     [Profile] => Array
>         (
>             [id] => 1
>             [name] => Andrei Mita
>             [birth_date] => 2030-09-23
>
>
>
>
>
> On Thu, Apr 29, 2010 at 5:50 PM, Jeremy Burns  wrote:
> > What happens if you:
>
> > die(debug($this->data));
>
> > ... in the view?
>
> > Jeremy Burns
> > jeremybu...@me.com 
>
> > On 29 Apr 2010, at 15:42, Andrei Mita wrote:
>
> > I populate $this->data like this:
>
> > function edit($id=null){
> > ...
> >             if (empty($this->data)) {
> >                 $this->data = $this->Profile->read(null, $id);
> > ...
> > }
>
> > On Thu, Apr 29, 2010 at 5:38 PM, Jeremy Burns  wrote:
>
> >> OK - that might be it then. Only just discovered this functionality -
> >> maybe it's a 1.3 thing.
>
> >> What's in $this->data?
>
> >> Jeremy Burns
> >> jeremybu...@me.com 
>
> >> On 29 Apr 2010, at 15:33, Andrei Mita wrote:
>
> >> 1.2.7 i believe.
>
> >> On Thu, Apr 29, 2010 at 5:32 PM, Andrei Mita wrote:
>
> >>> Terribly sorry for the whole controller dump.
>
> >>> I only meant this:
>
> >>> Notice (8): Undefined property:  View::$Profile
> >>> [APP/views/profiles/edit.ctp, line 17]
>
> >>> Fatal error: Call to a member function value() on a non-object in
> >>> /var/www/fotopoetica/app/views/profiles/edit.ctp on line 17
>
> >>> On Thu, Apr 29, 2010 at 5:24 PM, Andrei Mita wrote:
>
>  In the view?
>
>  If yes, I get this:
>
> >> Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> >> others with their CakePHP related questions.
>
> >> 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
> >> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> >> athttp://groups.google.com/group/cake-php?hl=en
>
> >> Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> >> others with their CakePHP related questions.
>
> >> 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
> >> cake-php+unsubscr...@googlegroups.com >>  om>For more options, visit this group at
> >>http://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > athttp://groups.google.com/group/cake-php?hl=en
>
> >  Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> > others with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.com > om>For more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Accessing data from controller in view

2010-04-29 Thread Andrei Mita
I did it: echo $this->data['Profile']['name'] solved the problem.
I was using $session->params['path']['url']['url'] in some other place but
it didn't cross my mind to use it for data.

Thanks for your time.


On Thu, Apr 29, 2010 at 6:02 PM, Andrei Mita  wrote:

> outputs the data:
>
> Array
> (
> [Profile] => Array
> (
> [id] => 1
> [name] => Andrei Mita
> [birth_date] => 2030-09-23
>
>
>
>
> On Thu, Apr 29, 2010 at 5:50 PM, Jeremy Burns  wrote:
>
>> What happens if you:
>>
>> die(debug($this->data));
>>
>> ... in the view?
>>
>>
>> Jeremy Burns
>> jeremybu...@me.com 
>>
>>
>> On 29 Apr 2010, at 15:42, Andrei Mita wrote:
>>
>> I populate $this->data like this:
>>
>> function edit($id=null){
>> ...
>> if (empty($this->data)) {
>> $this->data = $this->Profile->read(null, $id);
>> ...
>> }
>>
>>
>> On Thu, Apr 29, 2010 at 5:38 PM, Jeremy Burns  wrote:
>>
>>> OK - that might be it then. Only just discovered this functionality -
>>> maybe it's a 1.3 thing.
>>>
>>> What's in $this->data?
>>>
>>>
>>> Jeremy Burns
>>> jeremybu...@me.com 
>>>
>>> On 29 Apr 2010, at 15:33, Andrei Mita wrote:
>>>
>>> 1.2.7 i believe.
>>>
>>>
>>> On Thu, Apr 29, 2010 at 5:32 PM, Andrei Mita wrote:
>>>
 Terribly sorry for the whole controller dump.

 I only meant this:


 Notice (8): Undefined property:  View::$Profile
 [APP/views/profiles/edit.ctp, line 17]

 Fatal error: Call to a member function value() on a non-object in
 /var/www/fotopoetica/app/views/profiles/edit.ctp on line 17


 On Thu, Apr 29, 2010 at 5:24 PM, Andrei Mita wrote:

> In the view?
>
> If yes, I get this:
>
>

>>>
>>> Check out the new CakePHP Questions site http://cakeqs.org and help
>>> others with their CakePHP related questions.
>>>
>>> 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
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>>> at http://groups.google.com/group/cake-php?hl=en
>>>
>>>
>>>
>>> Check out the new CakePHP Questions site http://cakeqs.org and help
>>> others with their CakePHP related questions.
>>>
>>> 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
>>> cake-php+unsubscr...@googlegroups.comFor
>>>  more options, visit this group at
>>> http://groups.google.com/group/cake-php?hl=en
>>>
>>
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> 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
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php?hl=en
>>
>>
>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> 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
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Accessing data from controller in view

2010-04-29 Thread Andrei Mita
outputs the data:

Array
(
[Profile] => Array
(
[id] => 1
[name] => Andrei Mita
[birth_date] => 2030-09-23



On Thu, Apr 29, 2010 at 5:50 PM, Jeremy Burns  wrote:

> What happens if you:
>
> die(debug($this->data));
>
> ... in the view?
>
>
> Jeremy Burns
> jeremybu...@me.com 
>
>
> On 29 Apr 2010, at 15:42, Andrei Mita wrote:
>
> I populate $this->data like this:
>
> function edit($id=null){
> ...
> if (empty($this->data)) {
> $this->data = $this->Profile->read(null, $id);
> ...
> }
>
>
> On Thu, Apr 29, 2010 at 5:38 PM, Jeremy Burns  wrote:
>
>> OK - that might be it then. Only just discovered this functionality -
>> maybe it's a 1.3 thing.
>>
>> What's in $this->data?
>>
>>
>> Jeremy Burns
>> jeremybu...@me.com 
>>
>> On 29 Apr 2010, at 15:33, Andrei Mita wrote:
>>
>> 1.2.7 i believe.
>>
>>
>> On Thu, Apr 29, 2010 at 5:32 PM, Andrei Mita wrote:
>>
>>> Terribly sorry for the whole controller dump.
>>>
>>> I only meant this:
>>>
>>>
>>> Notice (8): Undefined property:  View::$Profile
>>> [APP/views/profiles/edit.ctp, line 17]
>>>
>>> Fatal error: Call to a member function value() on a non-object in
>>> /var/www/fotopoetica/app/views/profiles/edit.ctp on line 17
>>>
>>>
>>> On Thu, Apr 29, 2010 at 5:24 PM, Andrei Mita wrote:
>>>
 In the view?

 If yes, I get this:


>>>
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> 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
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php?hl=en
>>
>>
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> 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
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php?hl=en
>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: How to make a search form with Cakephp

2010-04-29 Thread viis
i was more looking for a real life sample of a search form - any would
do

there is no real life Cakephp search forms available,

there are simple search forms and samples for beginners , but these
are useless for real life complicated searches




On 28 apr, 19:13, John Andersen  wrote:
> So it seems to me that you know what your search form should contain -
> now, what have you done in order to code it? Please show your current
> version of the search view! That way we may better be able to point
> you in the right direction :)
> Enjoy,
>    John
>
> On Apr 28, 8:35 am, viis  wrote:
>
>
>
>
>
> > How to write a search form with Cakephp , selecting results from
> > database
>
> > so that one can select certain fields and if none of the fields have
> > been selected then all results from the database are selected:
>
> > SEARCH  FORM  fields:
>
> > 1)  Select location: dropdown ( 1. all 2. New York 3. London )
>
> > 2)  Type: dropdown ( 1. all, 2. blue, 3. yellow, 4. green )
>
> > 3)  Select min and max price :  min ( textarea insert minimum price
> > number - default value - 0 )  to  ( textarea insert max price number )
>
> > 4)  Show results with images: checkbox ( check if search results
> > should include results with images or not )
>
> > 5)  Sort by:  dropdown ( 1. none 2. price desc 3. price asc 4.
> > location 5. latest added )
>
> > 6)  Search ( search text link )
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Accessing data from controller in view

2010-04-29 Thread Jeremy Burns
What happens if you:

die(debug($this->data));

... in the view?

Jeremy Burns
jeremybu...@me.com


On 29 Apr 2010, at 15:42, Andrei Mita wrote:

> I populate $this->data like this:
> 
> function edit($id=null){
> ...
> if (empty($this->data)) {
> $this->data = $this->Profile->read(null, $id);
> ...
> }
> 
> 
> On Thu, Apr 29, 2010 at 5:38 PM, Jeremy Burns  wrote:
> OK - that might be it then. Only just discovered this functionality - maybe 
> it's a 1.3 thing.
> 
> What's in $this->data?
> 
> 
> Jeremy Burns
> jeremybu...@me.com
> 
> On 29 Apr 2010, at 15:33, Andrei Mita wrote:
> 
>> 1.2.7 i believe.
>> 
>> 
>> On Thu, Apr 29, 2010 at 5:32 PM, Andrei Mita  wrote:
>> Terribly sorry for the whole controller dump.
>> 
>> I only meant this:
>> 
>> 
>> Notice (8): Undefined property:  View::$Profile 
>> [APP/views/profiles/edit.ctp, line 17]
>> 
>> Fatal error: Call to a member function value() on a non-object in 
>> /var/www/fotopoetica/app/views/profiles/edit.ctp on line 17
>> 
>> 
>> On Thu, Apr 29, 2010 at 5:24 PM, Andrei Mita  wrote:
>> In the view?
>> 
>> If yes, I get this:
>> 
>> 
>> 
>> 
>> Check out the new CakePHP Questions site http://cakeqs.org and help others 
>> with their CakePHP related questions.
>>  
>> 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
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
>> http://groups.google.com/group/cake-php?hl=en
> 
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>  
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en
> 
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>  
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Finds using OR or AND

2010-04-29 Thread Lucca Mordente
To retrieve ANY of the results with any of the id's, just call:
$data = array(38,48);
$this->Cand->find('list',array(
'conditions' => array('Cand.code_id' =>$data)
);

Otherwise, if you want all of them, you can call a count() with the
same conditions to see how many rows it returns and then compare with
your id's array size.
If they both have the same size, means that all id's were retrieved
(considering that id is a primary key or, at least, a unique index)

hope this help!
Lucca Mordente

On 29 abr, 10:28, slippy  wrote:
> I want to be able to pass an array of id's into a find and also
> specify if the results found should contain all of the id's or any of
> them.
>
> Thanks
>
> Alex
>
> On 29 Apr, 12:04, "Dr. Loboto"  wrote:
>
>
>
>
>
> > 'Cand.code_id' => $data provides Cand.code_id IN (1, 2, 3) that is
> > equivalent to Cand.code_id = 1 OR Cand.code_id = 2 OR Cand.code_id =
> > 3. So there is no need in OR. Query like "Cand.code_id = 1 AND
> > Cand.code_id = 2 AND Cand.code_id = 3" is useless. So there is no need
> > in AND. So what do you want?
>
> > On Apr 29, 3:39 pm, slippy  wrote:
>
> > > Hi,
>
> > > I want to be able to choose if the find should do an AND or OR on a
> > > find using an array but I can't get it to take the same array
>
> > > The way I have been able to do it is like this:
>
> > > //AND
> > > $this->Cand->find('list',array(
> > > 'conditions' => array('AND' => array('Cand.code_id' => array(38, 49)))
> > > );
> > > //OR
> > > $this->Cand->find('list',array(
> > > 'conditions' => array('OR' => array('Cand.code_id' => 38,
> > > 'Cand.code_id' => 49,)),
> > > );
>
> > > But is there a way of doing it like this:
>
> > > $this->Cand->find('list',array(
> > > 'conditions' => array($conditional => array('Cand.code_id' =>$data))
> > > );
>
> > > Thanks
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers 
> > > with their CakePHP related questions.
>
> > > 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
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > > athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Accessing data from controller in view

2010-04-29 Thread Jeremy Burns
Why not install the debug kit - it shows you all of your variables - might 
expose something? I use it all the time now.

Jeremy Burns
jeremybu...@me.com


On 29 Apr 2010, at 15:33, Andrei Mita wrote:

> 1.2.7 i believe.
> 
> 
> On Thu, Apr 29, 2010 at 5:32 PM, Andrei Mita  wrote:
> Terribly sorry for the whole controller dump.
> 
> I only meant this:
> 
> 
> Notice (8): Undefined property:  View::$Profile [APP/views/profiles/edit.ctp, 
> line 17]
> 
> Fatal error: Call to a member function value() on a non-object in 
> /var/www/fotopoetica/app/views/profiles/edit.ctp on line 17
> 
> 
> On Thu, Apr 29, 2010 at 5:24 PM, Andrei Mita  wrote:
> In the view?
> 
> If yes, I get this:
> 
> 
> 
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>  
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Accessing data from controller in view

2010-04-29 Thread Andrei Mita
I populate $this->data like this:

function edit($id=null){
...
if (empty($this->data)) {
$this->data = $this->Profile->read(null, $id);
...
}


On Thu, Apr 29, 2010 at 5:38 PM, Jeremy Burns  wrote:

> OK - that might be it then. Only just discovered this functionality - maybe
> it's a 1.3 thing.
>
> What's in $this->data?
>
>
> Jeremy Burns
> jeremybu...@me.com 
>
> On 29 Apr 2010, at 15:33, Andrei Mita wrote:
>
> 1.2.7 i believe.
>
>
> On Thu, Apr 29, 2010 at 5:32 PM, Andrei Mita wrote:
>
>> Terribly sorry for the whole controller dump.
>>
>> I only meant this:
>>
>>
>> Notice (8): Undefined property:  View::$Profile
>> [APP/views/profiles/edit.ctp, line 17]
>>
>> Fatal error: Call to a member function value() on a non-object in
>> /var/www/fotopoetica/app/views/profiles/edit.ctp on line 17
>>
>>
>> On Thu, Apr 29, 2010 at 5:24 PM, Andrei Mita wrote:
>>
>>> In the view?
>>>
>>> If yes, I get this:
>>>
>>>
>>
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php?hl=en
>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


render multiple views within single layout

2010-04-29 Thread gautam lakum
Hi all bakers,

I have coded like this to render two views in a single controller.

$this->render('upload_photos','layout1');
$this->viewPath = 'ideas';
$this->render('edit_progress',null);

But the problem is it renders layout1 completely after rendering
upload_photos, and then it renders the edit_progress view file along
with rendering layout2.
So in a single page, I am getting both layouts and both view files. I
want upload_photos and edit_progress rendered in layout1's  area.

Help me please.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Accessing data from controller in view

2010-04-29 Thread Andrei Mita
line 17:  Form->value('Profile.name'));?>

I'm on 1.2.7 stable.


On Thu, Apr 29, 2010 at 5:34 PM, Jeremy Burns  wrote:

> What does line 17 look like? What version are you on?
>
>
> Jeremy Burns
> jeremybu...@me.com 
>
> On 29 Apr 2010, at 15:32, Andrei Mita wrote:
>
> Terribly sorry for the whole controller dump.
>
> I only meant this:
>
> Notice (8): Undefined property:  View::$Profile
> [APP/views/profiles/edit.ctp, line 17]
>
> Fatal error: Call to a member function value() on a non-object in
> /var/www/fotopoetica/app/views/profiles/edit.ctp on line 17
>
>
> On Thu, Apr 29, 2010 at 5:24 PM, Andrei Mita wrote:
>
>> In the view?
>>
>> If yes, I get this:
>>
>>
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php?hl=en
>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Accessing data from controller in view

2010-04-29 Thread Jeremy Burns
OK - that might be it then. Only just discovered this functionality - maybe 
it's a 1.3 thing.

What's in $this->data?

Jeremy Burns
jeremybu...@me.com

On 29 Apr 2010, at 15:33, Andrei Mita wrote:

> 1.2.7 i believe.
> 
> 
> On Thu, Apr 29, 2010 at 5:32 PM, Andrei Mita  wrote:
> Terribly sorry for the whole controller dump.
> 
> I only meant this:
> 
> 
> Notice (8): Undefined property:  View::$Profile [APP/views/profiles/edit.ctp, 
> line 17]
> 
> Fatal error: Call to a member function value() on a non-object in 
> /var/www/fotopoetica/app/views/profiles/edit.ctp on line 17
> 
> 
> On Thu, Apr 29, 2010 at 5:24 PM, Andrei Mita  wrote:
> In the view?
> 
> If yes, I get this:
> 
> 
> 
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>  
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Accessing data from controller in view

2010-04-29 Thread Jeremy Burns
What does line 17 look like? What version are you on?

Jeremy Burns
jeremybu...@me.com

On 29 Apr 2010, at 15:32, Andrei Mita wrote:

> Terribly sorry for the whole controller dump.
> 
> I only meant this:
> 
> Notice (8): Undefined property:  View::$Profile [APP/views/profiles/edit.ctp, 
> line 17]
> 
> Fatal error: Call to a member function value() on a non-object in 
> /var/www/fotopoetica/app/views/profiles/edit.ctp on line 17
> 
> 
> On Thu, Apr 29, 2010 at 5:24 PM, Andrei Mita  wrote:
> In the view?
> 
> If yes, I get this:
> 
> 
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>  
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Accessing data from controller in view

2010-04-29 Thread Andrei Mita
1.2.7 i believe.


On Thu, Apr 29, 2010 at 5:32 PM, Andrei Mita  wrote:

> Terribly sorry for the whole controller dump.
>
> I only meant this:
>
>
> Notice (8): Undefined property:  View::$Profile
> [APP/views/profiles/edit.ctp, line 17]
>
> Fatal error: Call to a member function value() on a non-object in
> /var/www/fotopoetica/app/views/profiles/edit.ctp on line 17
>
>
> On Thu, Apr 29, 2010 at 5:24 PM, Andrei Mita wrote:
>
>> In the view?
>>
>> If yes, I get this:
>>
>>
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Accessing data from controller in view

2010-04-29 Thread Andrei Mita
Terribly sorry for the whole controller dump.

I only meant this:

Notice (8): Undefined property:  View::$Profile
[APP/views/profiles/edit.ctp, line 17]

Fatal error: Call to a member function value() on a non-object in
/var/www/fotopoetica/app/views/profiles/edit.ctp on line 17


On Thu, Apr 29, 2010 at 5:24 PM, Andrei Mita  wrote:

> In the view?
>
> If yes, I get this:
>
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Where is the default layout?

2010-04-29 Thread Jeremy Burns
Look in /cake/libs/view/layouts - that is used by default. If you want to 
change it, copy it into your equivalent folder in /app.

Jeremy Burns
jeremybu...@me.com
On 29 Apr 2010, at 05:31, mofahead wrote:

> I mean, I know where you put your own (/app/views/layouts/
> default.ctp), but that file doesn't exist when cake is first
> installed, and a layout is still being generated. Is there any way to
> access that?
> 
> I ask more for learning purposes than anything practical. I thought it
> would be interesting to view and edit the (default) default layout.
> 
> Btw, using 1.3
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Using html5 video tag.

2010-04-29 Thread Phil
Hi!

I'm trying to add a video file into my cakephp project using the html5
 tag. If i write a simple html file with this code:


your browser does not support the video tag


If works properly in firefox. But if I try to the next code to my .ctp
file in cakephp, firefox shows the player but is not playing the
video:


your browser does not support the video tag


The video.ogv is in the webroot folder.

Thanks.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Accessing data from controller in view

2010-04-29 Thread Jeremy Burns
Works for me - I'm on 1.3 - are you?

Jeremy Burns
jeremybu...@me.com

On 29 Apr 2010, at 15:24, Andrei Mita wrote:

> In the view?
> 
> If yes, I get this:
> 
> Notice (8): Undefined property:  View::$Profile [APP/views/profiles/edit.ctp, 
> line 17]
> 
> 
> Fatal error: Call to a member function value() on a non-object in 
> /var/www/fotopoetica/app/views/profiles/edit.ctp on line 17
> 
> 
> On Thu, Apr 29, 2010 at 5:17 PM, Jeremy Burns  wrote:
> Try: $this->Form->value('Model.field_name');
> 
> Jeremy Burns
> jeremybu...@me.com
> (Skype) +44 208 123 3822 (jeremy_burns)
> (m) +44 7973 481949
> (h) +44 208 530 7573
> 
> On 29 Apr 2010, at 15:14, Andrei Mita wrote:
> 
>> Hello,
>> 
>> In a basic CRUD application I have a user's profile edit page.
>> When /profiles/edit/4 page is accessed the action in the controller checks 
>> if an id is passed, then if I have some data to be saved.
>> If the id is present but no data, it reads the id related data and then pass 
>> it to a view like this:
>> $this->data = $this->Profile->read(null, $id);
>> 
>> The view is a basic form with lots of echo $form->input('field');
>> 
>> My question is: how can I access the data sent from the controller?
>> 
>> For instance, I want to write a the top of my view: Modifying profile for 
>> $data['name']
>> 
>> Do I have to put in my controller: $this->set('profile', 
>> $this->Profile->read(null, $id)); ??
>> 
>> Thanks
>> 
>> Check out the new CakePHP Questions site http://cakeqs.org and help others 
>> with their CakePHP related questions.
>>  
>> 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
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
>> http://groups.google.com/group/cake-php?hl=en
> 
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>  
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en
> 
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>  
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


how to get all the action names, controllers names viewed by a user after the user login

2010-04-29 Thread ram prasath
Hi Friends ,

Hi any 1 tel me how to get all the controllers/action viewed by the
user after he loged in once..


Thanks In Advance

Ram Prasath

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


ajax help

2010-04-29 Thread Anas
hello all !
Can I Update multiple div in ajax call
using  $ajax->observeField();
thanks in advance.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: pageTitle removal in 1.3: what about static pages?

2010-04-29 Thread
Well it does and doesn't work for the controller - it is not very
cool, but a  simple

switch($path[$count - 1]) {

case 'home':
$title_for_layout = 'Your title for home page here';
break;

...


Would work and allow you to set any number of custom titles in
PagesController. It isn't perfect, but it does work and give you some
control.

WoJo


On Apr 29, 8:50 am, Sergei  wrote:
> yes indeed. I thought that's only for controller.
>
> On Apr 29, 3:13 pm, John Andersen  wrote:
>
>
>
>
>
> > It is written in the migration section, that you should use the views
> > method $this->set instead.
> > Seehttp://book.cakephp.org/view/1566/View-and-Helpers
> > Enjoy,
> >    John
>
> > On Apr 29, 7:54 am, Sergei  wrote:
>
> > > Hi,
>
> > > just began to work with 1.3 and noticed that there is no way to set
> > > page title ($title_for_layout) from the *view*.
>
> > > Yes it's possible to set it from controller action, but what about
> > > static pages for Pages controller? Pages controller has only one
> > > action 'display'. So setting title from controller doesn't "work" for
> > > many pages!
>
> > > But.. I found the solution to set title from view:
>
> > > viewVars['title_for_layout']="Page title" ?>
>
> > > I think that was a bad decision to remove the pageTitle manipulation
> > > in views. Now we have to use a hack.
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers 
> > > with their CakePHP related questions.
>
> > > 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
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > > athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


RSS feed display

2010-04-29 Thread aboxy
Hello all,

I am totally new to php as well as cakephp. I am stuck at a very
simple issue,hope someone can help me here.
I have an RSS feed which gets generated outside of my php application.
I have a route defined as '/feed' which maps to a controller[rss] and
action[feed]. Action has a simple logic to call my web service which
return generated RSS feed. I get all the data but am not sure how to
display it. I simply have echo the response in the view but that does
not seem to fix it.

If I run my web service directly, my browser detects the feed. Any
help is much appreciated.



thanks
aboxy

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Where is the default layout?

2010-04-29 Thread mofahead
I mean, I know where you put your own (/app/views/layouts/
default.ctp), but that file doesn't exist when cake is first
installed, and a layout is still being generated. Is there any way to
access that?

I ask more for learning purposes than anything practical. I thought it
would be interesting to view and edit the (default) default layout.

Btw, using 1.3

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Bakery...arrogance or plain lack of attention

2010-04-29 Thread Jayesh Wadhwani
Like I said it does seem to breed arrogance.

Writing for the bakery needs time and effort. When developers put in
such an effort they are doing that to disburse their knowledge to
other developers. Their efforts should be lauded and not taken lightly
or their work criticized.

So if you look your questions to me you will notice that it does breed
arrogance.

Accept that the bakery has problems, fix it or get rid of it. Plain
and simple.

Having said that I am not planning to write any more for the bakery
and I do hope other programmers follow suit.

-Jayesh

On Apr 25, 11:46 pm, jacmoe  wrote:
> That doesn't give you carte blanche to be arrogant, does it?
>
> What have you done for CakePHP if I may ask? :)
>
> A couple of weeks ago I posted this 
> topic:http://groups.google.com/group/cake-php/browse_thread/thread/e3a1f469...
> With the title 'Let's get rid of TheBakery'.
>
> I volunteered as a moderator, but there's still lots of things to do.
> And the software itself needs some fixing.
>
> Feel free to fork it.
>
> I would probably delete the article as well, if there haven't been any
> response in three months - I don't know what article it was, since I
> concentrate on removing spam rather than approving articles.
> Due to my newness to CakePHP mostly.
>
> So: what have you done for CakePHP ? :D
>
> Cheers
>
> Jacob
>
> On Apr 25, 11:42 am, Jayesh Wadhwani  wrote:
>
>
>
> > TheBakeryis supposed to be a place where cakePHP developers exchange
> > ideas which in turn enhances the framework.
>
> > I recently published a helper and it languished for pending review for
> > weeks on end. I visited the IRC and other than rude and arrogant
> > answers there was not much help.
>
> > I did not receive any emails as to why there was a delay.
>
> > Today I log in and see this message.. "This article has been deleted
> > and is not available for publication. Review TheBakeryPublishing
> > Guidelines to understand why this article was deleted."
>
> > Brilliant reviewer! Don't you think it would be a better to tell me
> > what is the exact problem so that I can correct it. According to
> > guidelines I do get 60 days. Right!
>
> > So, what is it? The reviewers just do not care, are plain lazy or just
> > purely arrogant.
>
> > If cakePHP has grown to such as level that it cannot handle thebakery
> > and breeds arrogance then I suggest that you get rid of it.
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


cake 1.3 displayfield error

2010-04-29 Thread genellern
hi

i'm using a plugin made by myself and works great!!, but when i try to
change $displayField property in model, it does not take the new
value, else, continue searching a field (name) that never existed !! ,
he must search a field named; subject

http://bin.cakephp.org/view/1740147782

here is the error:

*Warning* (512)

*SQL

Error:* 1054: Unknown column 'CommunicationEvent.name' in 'field list'

[*CORE\cake\libs\model\datasources\dbo_source.php*, line *635*]

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Accessing data from controller in view

2010-04-29 Thread Andrei Mita
In the view?

If yes, I get this:

*Notice* (8) : Undefined property:
View::$Profile [*APP/views/profiles/edit.ctp*, line *17*]

Code  | Context 

$___viewFn  =   "/var/www/fotopoetica/app/views/profiles/edit.ctp"
$___dataForView =   array(
"cakeDebug" => ProfilesController
ProfilesController::$name = "Profiles"
ProfilesController::$helpers = array
ProfilesController::$components = array
ProfilesController::$here = "/fotopoetica/profiles/edit/1"
ProfilesController::$webroot = "/fotopoetica/"
ProfilesController::$action = "edit"
ProfilesController::$uses = false
ProfilesController::$params = array
ProfilesController::$data = array
ProfilesController::$paginate = array
ProfilesController::$viewPath = "profiles"
ProfilesController::$layoutPath = NULL
ProfilesController::$viewVars = array
ProfilesController::$pageTitle = false
ProfilesController::$modelNames = array
ProfilesController::$base = "/fotopoetica"
ProfilesController::$layout = "default"
ProfilesController::$autoRender = false
ProfilesController::$autoLayout = true
ProfilesController::$Component = Component object
ProfilesController::$view = "View"
ProfilesController::$ext = ".ctp"
ProfilesController::$output = NULL
ProfilesController::$plugin = NULL
ProfilesController::$cacheAction = false
ProfilesController::$persistModel = false
ProfilesController::$passedArgs = array
ProfilesController::$scaffold = false
ProfilesController::$methods = array
ProfilesController::$modelClass = "Profile"
ProfilesController::$modelKey = "profile"
ProfilesController::$validationErrors = NULL
ProfilesController::$_log = NULL
ProfilesController::$Session = SessionComponent object
ProfilesController::$Profile = Profile object
)
$loadHelpers=   true
$cached =   false
$loadedHelpers  =   array(
"Html" => HtmlHelper
HtmlHelper::$tags = array
HtmlHelper::$base = "/fotopoetica"
HtmlHelper::$here = "/fotopoetica/profiles/edit/1"
HtmlHelper::$params = array
HtmlHelper::$action = "edit"
HtmlHelper::$data = array
HtmlHelper::$_crumbs = array
HtmlHelper::$__docTypes = array
HtmlHelper::$helpers = NULL
HtmlHelper::$webroot = "/fotopoetica/"
HtmlHelper::$themeWeb = NULL
HtmlHelper::$plugin = NULL
HtmlHelper::$namedArgs = NULL
HtmlHelper::$argSeparator = NULL
HtmlHelper::$validationErrors = NULL
HtmlHelper::$__tainted = NULL
HtmlHelper::$__cleaned = NULL
HtmlHelper::$_log = NULL,
"Form" => FormHelper
FormHelper::$helpers = array
FormHelper::$fieldset = array
FormHelper::$__options = array
FormHelper::$fields = array
FormHelper::$requestType = "put"
FormHelper::$base = "/fotopoetica"
FormHelper::$webroot = "/fotopoetica/"
FormHelper::$themeWeb = NULL
FormHelper::$here = "/fotopoetica/profiles/edit/1"
FormHelper::$params = array
FormHelper::$action = "edit"
FormHelper::$plugin = NULL
FormHelper::$data = array
FormHelper::$namedArgs = NULL
FormHelper::$argSeparator = NULL
FormHelper::$validationErrors = NULL
FormHelper::$tags = array
FormHelper::$__tainted = NULL
FormHelper::$__cleaned = NULL
FormHelper::$_log = NULL
FormHelper::$Html = HtmlHelper object,
"Time" => TimeHelper
TimeHelper::$helpers = NULL
TimeHelper::$base = "/fotopoetica"
TimeHelper::$webroot = "/fotopoetica/"
TimeHelper::$themeWeb = NULL
TimeHelper::$here = "/fotopoetica/profiles/edit/1"
TimeHelper::$params = array
TimeHelper::$action = "edit"
TimeHelper::$plugin = NULL
TimeHelper::$data = array
TimeHelper::$namedArgs = NULL
TimeHelper::$argSeparator = NULL
TimeHelper::$validationErrors = NULL
TimeHelper::$tags = array
TimeHelper::$__tainted = NULL
TimeHelper::$__cleaned = NULL
TimeHelper::$_log = NULL,
"Javascript" => JavascriptHelper
JavascriptHelper::$useNative = true
JavascriptHelper::$enabled = true
JavascriptHelper::$safe = false
JavascriptHelper::$tags = array
JavascriptHelper::$_blockOptions = array
JavascriptHelper::$_cachedEvents = array
JavascriptHelper::$_cacheEvents = false
JavascriptHelper::$_cacheToFile = false
JavascriptHelper::$_cacheAll = false
JavascriptHelper::$_rules = array
JavascriptHelper::$__scriptBuffer = NULL
JavascriptHelper::$helpers = NULL
JavascriptHelper::$base = "/fotopoetica"
JavascriptHelper::$webroot = "/fotopoetica/"
JavascriptHelper::$themeWeb = NULL
JavascriptHelper::$here = "/fotopoetica/profiles/edit/1"
JavascriptHelper::$params = array
JavascriptHelper::$action = "edit"
JavascriptHelper::$plugin = NULL
JavascriptHelper::$data = array
JavascriptHelper::$namedArgs = NULL
JavascriptHelper::$argSeparator = NULL
JavascriptHelper::$validationErrors = NULL
JavascriptHelper::$__tainted = NULL
JavascriptHelper::$__cleaned = NULL
JavascriptHelper::$_log = NULL,
"Session" => SessionHelper
SessionHelper::$helpers = NULL
SessionHelper::$__active = true
SessionHelper::$valid = false
SessionHelper::$error = false
SessionHelper::$_userAgent = "b602d9365fcff6737d055a3ae7a8f1ba"
SessionHelper::$path = "/"
SessionHelper::$lastError = NULL
SessionHelper::$security = "high"
SessionHelper::$time = 1272550965
SessionHelper::$se

Re: How do I get Acl working?

2010-04-29 Thread Jon Chin
Thanks for the suggestions.  It turned out that I needed to add
$this->Auth->Authorize = 'actions'; to my AppController.

On Wed, Apr 28, 2010 at 11:26 PM, Andrei Mita  wrote:

> Try running the build_acl and initDB actions again. Or check in your tables
> if you have the restrictions set.
>
>
>
> On Thu, Apr 29, 2010 at 8:03 AM, Jon Chin  wrote:
>
>> I just did a global search and I don't have that anywhere.  Maybe I did
>> something wrong in my AppController?
>>
>> class AppController extends Controller {
>> var $components = array('Acl', 'Auth', 'Session');
>>  function beforeFilter() {
>> $this->Auth->fields = array(
>>  'username' => 'email',
>> 'password' => 'password'
>>  );
>> $this->Auth->loginAction = array('controller' => 'users', 'action' =>
>> 'login');
>>  $this->Auth->logoutRedirect = array('controller' => 'users', 'action' =>
>> 'login');
>> $this->Auth->loginRedirect = array('controller' => 'projects', 'action' =>
>> 'index');
>>  $this->Auth->actionPath = 'controllers/';
>> }
>> }
>>
>> On Wed, Apr 28, 2010 at 8:44 PM, Matthew Powell  wrote:
>>
>>> Did you perhaps leave a $this->Auth->allow('*'); in there somewhere?
>>>
>>> Matt
>>>
>>> On Wed, Apr 28, 2010 at 21:33, Jon Chin  wrote:
>>> > I'm having a bit of a problem getting Auth+ACL working.  I've followed
>>> the
>>> > Simple Acl Controlled Application example in the Cake book. It
>>> is correctly
>>> > locking out unauthenticated users from the system.  However, all
>>> > authenticated users are able to access all ACOs in my site, even if the
>>> > group they belong to is denied access.  I've been at it for hours, but
>>> can't
>>> > seem to figure out what I'm doing wrong.  Any ideas?
>>> >
>>> > Check out the new CakePHP Questions site http://cakeqs.org and help
>>> others
>>> > with their CakePHP related questions.
>>> >
>>> > 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
>>> > cake-php+unsubscr...@googlegroups.comFor
>>> >  more options, visit this group at
>>> > http://groups.google.com/group/cake-php?hl=en
>>> >
>>>
>>> Check out the new CakePHP Questions site http://cakeqs.org and help
>>> others with their CakePHP related questions.
>>>
>>> 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
>>> cake-php+unsubscr...@googlegroups.comFor
>>>  more options, visit this group at
>>> http://groups.google.com/group/cake-php?hl=en
>>>
>>
>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> 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
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: wordpress integration without seperate url

2010-04-29 Thread Andrei Mita
What do you mean by "dont want it to be on a seperate url like /blog"?

You don't want it to be domain.com/blog ?

On Thu, Apr 29, 2010 at 4:35 PM, meximex  wrote:

> no solutions
>
> On 23 Apr., 09:19, meximex  wrote:
> > hi,
> > i would like to include wordpress into my cakephp application but i
> > dont want it to be on a seperate url like /blog.
> >
> > reasons for that are that the users looses his session inside the
> > site, looses the usermenu (i know i could do that by ajax..)
> >
> > isnt there a way to just "include" the blog files?
> >
> > btw. i am looking for a forum that can be "included" very easy
> > too... ;-)
> >
> > regards,
> > mex
> >
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> with their CakePHP related questions.
> >
> > 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
> > cake-php+unsubscr...@googlegroups.comFor
> >  more options, visit this group athttp://
> groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Accessing data from controller in view

2010-04-29 Thread Jeremy Burns
Try: $this->Form->value('Model.field_name');

Jeremy Burns
jeremybu...@me.com
(Skype) +44 208 123 3822 (jeremy_burns)
(m) +44 7973 481949
(h) +44 208 530 7573

On 29 Apr 2010, at 15:14, Andrei Mita wrote:

> Hello,
> 
> In a basic CRUD application I have a user's profile edit page.
> When /profiles/edit/4 page is accessed the action in the controller checks if 
> an id is passed, then if I have some data to be saved.
> If the id is present but no data, it reads the id related data and then pass 
> it to a view like this:
> $this->data = $this->Profile->read(null, $id);
> 
> The view is a basic form with lots of echo $form->input('field');
> 
> My question is: how can I access the data sent from the controller?
> 
> For instance, I want to write a the top of my view: Modifying profile for 
> $data['name']
> 
> Do I have to put in my controller: $this->set('profile', 
> $this->Profile->read(null, $id)); ??
> 
> Thanks
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>  
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Accessing data from controller in view

2010-04-29 Thread Andrei Mita
Hello,

In a basic CRUD application I have a user's profile edit page.
When /profiles/edit/4 page is accessed the action in the controller checks
if an id is passed, then if I have some data to be saved.
If the id is present but no data, it reads the id related data and then pass
it to a view like this:
$this->data = $this->Profile->read(null, $id);

The view is a basic form with lots of echo $form->input('field');

My question is: how can I access the data sent from the controller?

For instance, I want to write a the top of my view: Modifying profile for
$data['name']

Do I have to put in my controller: $this->set('profile',
$this->Profile->read(null, $id)); ??

Thanks

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: wordpress integration without seperate url

2010-04-29 Thread meximex
no solutions

On 23 Apr., 09:19, meximex  wrote:
> hi,
> i would like to include wordpress into my cakephp application but i
> dont want it to be on a seperate url like /blog.
>
> reasons for that are that the users looses his session inside the
> site, looses the usermenu (i know i could do that by ajax..)
>
> isnt there a way to just "include" the blog files?
>
> btw. i am looking for a forum that can be "included" very easy
> too... ;-)
>
> regards,
> mex
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Finds using OR or AND

2010-04-29 Thread slippy
I want to be able to pass an array of id's into a find and also
specify if the results found should contain all of the id's or any of
them.

Thanks

Alex

On 29 Apr, 12:04, "Dr. Loboto"  wrote:
> 'Cand.code_id' => $data provides Cand.code_id IN (1, 2, 3) that is
> equivalent to Cand.code_id = 1 OR Cand.code_id = 2 OR Cand.code_id =
> 3. So there is no need in OR. Query like "Cand.code_id = 1 AND
> Cand.code_id = 2 AND Cand.code_id = 3" is useless. So there is no need
> in AND. So what do you want?
>
> On Apr 29, 3:39 pm, slippy  wrote:
>
>
>
> > Hi,
>
> > I want to be able to choose if the find should do an AND or OR on a
> > find using an array but I can't get it to take the same array
>
> > The way I have been able to do it is like this:
>
> > //AND
> > $this->Cand->find('list',array(
> > 'conditions' => array('AND' => array('Cand.code_id' => array(38, 49)))
> > );
> > //OR
> > $this->Cand->find('list',array(
> > 'conditions' => array('OR' => array('Cand.code_id' => 38,
> > 'Cand.code_id' => 49,)),
> > );
>
> > But is there a way of doing it like this:
>
> > $this->Cand->find('list',array(
> > 'conditions' => array($conditional => array('Cand.code_id' =>$data))
> > );
>
> > Thanks
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Strange output of Session->flash() method

2010-04-29 Thread Bart
1.3 seems to behave the same way herer as 1.2.x.

I'm using 1.3.0 Stable and encountered the same problem.
Not using 'echo' solved the strange output.

regards,
Bart


On Apr 16, 2:31 pm, Jeremy Burns  wrote:
> Which version are you on? If it's 1.2.x, try:
> $session->flash();  // no echo
>
> If it's 1.3, you use echo.
>
> Jeremy Burns
> jeremybu...@me.com
> On 16 Apr 2010, at 00:36, kjetiltuft wrote:
>
>
>
>
>
> > Hi,
>
> > I am new to this fora. I have encounted a possible bug in the CakePHP
> > framework or possible made a odd mistake myself. Any way, every time I
> > send messages to the view through the Session->setFlash() method the
> > Session->flash() method output a "1" after the div elements. Like the
> > example below:
>
> > This is a message...1
>
> > I thought in the begining that I had done something wrong, since I
> > tend to be a bit to fast (and also sloppy) on the keyboard. But after
> > been able to reproduce this error on different servers and with a
> > clean installation of CakePHP, I can not understand what I possible
> > can be doing wrong.
>
> > This is my controller code:
>
> > 
> > class PagesController extends AppController
> > {
> >    var $uses = array();
>
> >    function index() {
> >        $this->Session->setFlash('This is a message...');
> >    }
> > }
>
> > And my default.ctp code:
>
> > flash(); ?>
> > 
>
> > As you can see my application has no functionality and the error
> > occurs anyway. By the way, I have tried to search for this bug in
> > Google but it is quite hard to find anything relevant when the
> > searching criteria is pretty much "1". ;)
>
> > Thanks in advance for any help
>
> > -Kjetil
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Finds using OR or AND

2010-04-29 Thread Dr. Loboto
'Cand.code_id' => $data provides Cand.code_id IN (1, 2, 3) that is
equivalent to Cand.code_id = 1 OR Cand.code_id = 2 OR Cand.code_id =
3. So there is no need in OR. Query like "Cand.code_id = 1 AND
Cand.code_id = 2 AND Cand.code_id = 3" is useless. So there is no need
in AND. So what do you want?

On Apr 29, 3:39 pm, slippy  wrote:
> Hi,
>
> I want to be able to choose if the find should do an AND or OR on a
> find using an array but I can't get it to take the same array
>
> The way I have been able to do it is like this:
>
> //AND
> $this->Cand->find('list',array(
> 'conditions' => array('AND' => array('Cand.code_id' => array(38, 49)))
> );
> //OR
> $this->Cand->find('list',array(
> 'conditions' => array('OR' => array('Cand.code_id' => 38,
> 'Cand.code_id' => 49,)),
> );
>
> But is there a way of doing it like this:
>
> $this->Cand->find('list',array(
> 'conditions' => array($conditional => array('Cand.code_id' =>$data))
> );
>
> Thanks
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: LinkableBehavior for CakePHP 1.3

2010-04-29 Thread Marco
Thank you Arjen, I already use the Linkable behavior and I will test
this version.

On Apr 28, 4:57 pm, Terr  wrote:
> Hi fellow bakers,
>
> When upgrading to CakePHP 1.3, some of you might be running into
> problems when with LinkableBehavior. I've got an updated version on my
> GitHub page that will remove the obsolete warnings and enables
> Linkable to be used in pagination:http://github.com/Terr/linkable.
>
> That page has also become the place to open any issue tickets (and, of
> course, to fork and help improve the plugin!). Rafael Bandeira, the
> original author, couldn't update the project anymore and has asked me
> if I could keep an eye on it :)
>
> Note: When updating to this version, you might notice some changed
> behavior from Linkable. The old Linkable didn't fetch any fields of
> linked models when none were asked. To match the behavior of Cake /
> Containable, I've changed it to include all fields by default.
>
> Cheers,
> Arjen
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Plugins in 1.3

2010-04-29 Thread Sam Sherlock
1) with plugins in 1.3 you have to rename the folder

vendors => webroot.  see the migration guide

2) not sure - what do the logs show?  might be routes. might be that your
using some code that has been depreciated in 1.3

- S



On 29 April 2010 09:35, #2Will  wrote:

> Hi,
>
> Do plugins in cake1.3 need to be configured like it shows in the new
> bootstrap file even if they are in the standard /app/plugins folder?
>
> My $html->css links no longer find the files stored in the /app/
> plugins/status/vendors/css folder.
>
>
> also, this:
>
> $.get("/status/google_analytics//" + $("# echo $key ?>-span").val(), function(data) {
>$("#").html(data);
>});
>
> creates some sort of wierd redirect blank screen after flashing up
> something momentarily.  i think because it can't find the file in that
> path.
>
> This all worked tickedy boo  in 1.2.6 yesterday. so i guess is
> something im missing in the upgrade to 1.3
>
> Thanks!
>
> Will
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


httpSocket->request

2010-04-29 Thread emanuele
Hi fellows, I was wandering if I need to use urlencode() in order to fill
the $request array for the httpSocket->request method. Any Idea?

-- 
Emanuele Gringeri
Computer Engineer
University of Pisa
Be my mirror, my sword and shield

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Finds using OR or AND

2010-04-29 Thread slippy
Hi,

I want to be able to choose if the find should do an AND or OR on a
find using an array but I can't get it to take the same array

The way I have been able to do it is like this:

//AND
$this->Cand->find('list',array(
'conditions' => array('AND' => array('Cand.code_id' => array(38, 49)))
);
//OR
$this->Cand->find('list',array(
'conditions' => array('OR' => array('Cand.code_id' => 38,
'Cand.code_id' => 49,)),
);

But is there a way of doing it like this:

$this->Cand->find('list',array(
'conditions' => array($conditional => array('Cand.code_id' =>$data))
);

Thanks

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Plugins in 1.3

2010-04-29 Thread #2Will
Hi,

Do plugins in cake1.3 need to be configured like it shows in the new
bootstrap file even if they are in the standard /app/plugins folder?

My $html->css links no longer find the files stored in the /app/
plugins/status/vendors/css folder.


also, this:

$.get("/status/google_analytics//" + $("#-span").val(), function(data) {
$("#").html(data);
});

creates some sort of wierd redirect blank screen after flashing up
something momentarily.  i think because it can't find the file in that
path.

This all worked tickedy boo  in 1.2.6 yesterday. so i guess is
something im missing in the upgrade to 1.3

Thanks!

Will

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: I have a problem when i am creating user login authentication

2010-04-29 Thread Andrei Mita
What error do you get?

On Thu, Apr 29, 2010 at 11:14 AM, Narendra Padala wrote:

> Its currently running project, thats why are not at all do any changes in
> the database table.
> I have to use the same table only, i have no right to change the table, is
> their any way please help me out
>
> On Thu, Apr 29, 2010 at 12:48 PM, Andrei Mita wrote:
>
>> I believe your table should be pluralized: users
>>
>> Also, why do you use tbl before you table names?
>>
>>
>>
>> On Thu, Apr 29, 2010 at 10:11 AM, Narendra Padala > > wrote:
>>
>>>
>>>
>>> Hi..Every one ,
>>> i am using postgresql database for cake when i am creating the user
>>> authentication its show errors,
>>> hope u i wrote properly but it shows Error, i wrote code like this
>>> please any one can help me out.
>>>
>>>
>>> My Database Table Name "tbluser "
>>> --
>>>
>>>
>>> Columns|  Type
>>> |  Modifiers
>>> +
>>> +-
>>>  lnguser| integer| not null default
>>> nextval(('"tbluser_lnguser_seq"'::text)::regclass)
>>>  strfname   | character varying(100) | not null
>>>  strlname   | character varying(100) | not null
>>>  struid | character varying(100) | not null
>>>  strpid | character varying(100) | not null
>>>  lnguser_group  | integer| not null
>>>  strtelarea | character varying(20)  |
>>>  strtelno   | character varying(20)  |
>>>  stremail   | character varying(100) |
>>>  struserconfirm | character varying(100) |
>>>  dtmregistered  | date   |
>>>  dtmapproved| date   |
>>>  blnchatuser| bit(1) |
>>> Indexes:
>>>"tbluser_pkey" PRIMARY KEY, btree (lnguser)
>>>
>>>
>>>
>>> --
>>>
>>> Model : tbluser.php
>>>
>>> class Tbluser extends AppModel {
>>>
>>>var $useTable = 'tbluser';
>>>
>>> }
>>>
>>>
>>> --
>>>
>>> Controller:tblusers_controller.php
>>>
>>>
>>> class TblusersController extends AppController {
>>>
>>>var $name = "Tblusers";
>>>
>>>function login() {
>>>
>>>}
>>>
>>>function index() {
>>>
>>>}
>>>function logout() {
>>>
>>>$this->Session->setFlash('Logout');
>>>
>>>$this->redirect($this->Auth->logout());
>>>}
>>> }
>>>
>>> --
>>> App Controller :app_controller.php
>>>
>>>
>>> class AppController extends Controller {
>>>
>>>var $uses=array('Tbluser');
>>>
>>>var $components = array('Auth');
>>>
>>>function beforeFilter(){
>>>$this->Auth->loginRedirect = array('controller'=> 'tblusers',
>>>   'action' => 'index');
>>>$this->Auth->logoutRedirect = array('controller'=> 'tblusers',
>>>'action' => 'login');
>>>
>>>$this->Auth->allow('login');
>>>
>>>$this->Auth->authorize = 'controller';
>>>
>>>$this->set('loggedIn', $this->Auth->Tbluser('lnguser')); //
>>> Here I am getting the error
>>>}
>>>
>>>function isAuthorized() {
>>>return true;
>>>}
>>> }
>>>
>>> 
>>> viewfile : login.ctp
>>>
>>> create('Tbluser',
>>>  array(
>>>  'action' => 'login'));
>>> ?>
>>>>> cellpadding="0">
>>>
>>>>> valign="middle">USERNAME
>>>>> td>
>>>
>>>>> e($form->text('struid'));
>>>?>
>>>
>>> 
>>>
>>>
>>> 
>>> 
>>> 
>>> 
>>>
>>>
>>>>> valign="middle">PASSWORD
>>>>> td>
>>>
>>>>>echo $form-
>>> >password('strpid');
>>>?>
>>>
>>> 
>>>
>>>
>>> 
>>> 
>>> 
>>> 
>>>
>>>
>>>
>>> 

Re: I have a problem when i am creating user login authentication

2010-04-29 Thread Sergei
Try this

$this->set('loggedIn', $this->Auth->user('lnguser'));



On Apr 29, 5:14 pm, Narendra Padala  wrote:
> Its currently running project, thats why are not at all do any changes in
> the database table.
> I have to use the same table only, i have no right to change the table, is
> their any way please help me out

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: I have a problem when i am creating user login authentication

2010-04-29 Thread Narendra Padala
Its currently running project, thats why are not at all do any changes in
the database table.
I have to use the same table only, i have no right to change the table, is
their any way please help me out
On Thu, Apr 29, 2010 at 12:48 PM, Andrei Mita  wrote:

> I believe your table should be pluralized: users
>
> Also, why do you use tbl before you table names?
>
>
>
> On Thu, Apr 29, 2010 at 10:11 AM, Narendra Padala 
> wrote:
>
>>
>>
>> Hi..Every one ,
>> i am using postgresql database for cake when i am creating the user
>> authentication its show errors,
>> hope u i wrote properly but it shows Error, i wrote code like this
>> please any one can help me out.
>>
>>
>> My Database Table Name "tbluser "
>> --
>>
>>
>> Columns|  Type
>> |  Modifiers
>> +
>> +-
>>  lnguser| integer| not null default
>> nextval(('"tbluser_lnguser_seq"'::text)::regclass)
>>  strfname   | character varying(100) | not null
>>  strlname   | character varying(100) | not null
>>  struid | character varying(100) | not null
>>  strpid | character varying(100) | not null
>>  lnguser_group  | integer| not null
>>  strtelarea | character varying(20)  |
>>  strtelno   | character varying(20)  |
>>  stremail   | character varying(100) |
>>  struserconfirm | character varying(100) |
>>  dtmregistered  | date   |
>>  dtmapproved| date   |
>>  blnchatuser| bit(1) |
>> Indexes:
>>"tbluser_pkey" PRIMARY KEY, btree (lnguser)
>>
>>
>>
>> --
>>
>> Model : tbluser.php
>>
>> class Tbluser extends AppModel {
>>
>>var $useTable = 'tbluser';
>>
>> }
>>
>>
>> --
>>
>> Controller:tblusers_controller.php
>>
>>
>> class TblusersController extends AppController {
>>
>>var $name = "Tblusers";
>>
>>function login() {
>>
>>}
>>
>>function index() {
>>
>>}
>>function logout() {
>>
>>$this->Session->setFlash('Logout');
>>
>>$this->redirect($this->Auth->logout());
>>}
>> }
>>
>> --
>> App Controller :app_controller.php
>>
>>
>> class AppController extends Controller {
>>
>>var $uses=array('Tbluser');
>>
>>var $components = array('Auth');
>>
>>function beforeFilter(){
>>$this->Auth->loginRedirect = array('controller'=> 'tblusers',
>>   'action' => 'index');
>>$this->Auth->logoutRedirect = array('controller'=> 'tblusers',
>>'action' => 'login');
>>
>>$this->Auth->allow('login');
>>
>>$this->Auth->authorize = 'controller';
>>
>>$this->set('loggedIn', $this->Auth->Tbluser('lnguser')); //
>> Here I am getting the error
>>}
>>
>>function isAuthorized() {
>>return true;
>>}
>> }
>>
>> 
>> viewfile : login.ctp
>>
>> create('Tbluser',
>>  array(
>>  'action' => 'login'));
>> ?>
>>> cellpadding="0">
>>
>>> valign="middle">USERNAME
>>> td>
>>
>>> e($form->text('struid'));
>>?>
>>
>> 
>>
>>
>> 
>> 
>> 
>> 
>>
>>
>>> valign="middle">PASSWORD
>>> td>
>>
>>>echo $form-
>> >password('strpid');
>>?>
>>
>> 
>>
>>
>> 
>> 
>> 
>> 
>>
>>
>>
>>>  echo $form-
>> >submit('signin.gif',array(
>> 'onclick'
>> => 'validate()'));
>>
>>?>
>>
>>   

Re: check box selection

2010-04-29 Thread Master Ram...!
k sir

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: pageTitle removal in 1.3: what about static pages?

2010-04-29 Thread Sergei
yes indeed. I thought that's only for controller.

On Apr 29, 3:13 pm, John Andersen  wrote:
> It is written in the migration section, that you should use the views
> method $this->set instead.
> Seehttp://book.cakephp.org/view/1566/View-and-Helpers
> Enjoy,
>    John
>
> On Apr 29, 7:54 am, Sergei  wrote:
>
>
>
> > Hi,
>
> > just began to work with 1.3 and noticed that there is no way to set
> > page title ($title_for_layout) from the *view*.
>
> > Yes it's possible to set it from controller action, but what about
> > static pages for Pages controller? Pages controller has only one
> > action 'display'. So setting title from controller doesn't "work" for
> > many pages!
>
> > But.. I found the solution to set title from view:
>
> > viewVars['title_for_layout']="Page title" ?>
>
> > I think that was a bad decision to remove the pageTitle manipulation
> > in views. Now we have to use a hack.
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: check box selection

2010-04-29 Thread John Andersen
Ok, so after having submitted the data, processed the data, then you
either save the data in the database or use the session to temporary
hold the information.
In the action to which you redirect, you either retrieve the data from
the database or from the session, depending on which solution you
choose.
You then send the data to the view using $this->set(varname, variable)
and voila, you can now see it in the page.
Enjoy,
   John

On Apr 29, 10:16 am, "Master Ram...!"  wrote:
> redirect to another page
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: I have a problem when i am creating user login authentication

2010-04-29 Thread Andrei Mita
I believe your table should be pluralized: users

Also, why do you use tbl before you table names?


On Thu, Apr 29, 2010 at 10:11 AM, Narendra Padala wrote:

>
>
> Hi..Every one ,
> i am using postgresql database for cake when i am creating the user
> authentication its show errors,
> hope u i wrote properly but it shows Error, i wrote code like this
> please any one can help me out.
>
>
> My Database Table Name "tbluser "
> --
>
>
> Columns|  Type
> |  Modifiers
> +
> +-
>  lnguser| integer| not null default
> nextval(('"tbluser_lnguser_seq"'::text)::regclass)
>  strfname   | character varying(100) | not null
>  strlname   | character varying(100) | not null
>  struid | character varying(100) | not null
>  strpid | character varying(100) | not null
>  lnguser_group  | integer| not null
>  strtelarea | character varying(20)  |
>  strtelno   | character varying(20)  |
>  stremail   | character varying(100) |
>  struserconfirm | character varying(100) |
>  dtmregistered  | date   |
>  dtmapproved| date   |
>  blnchatuser| bit(1) |
> Indexes:
>"tbluser_pkey" PRIMARY KEY, btree (lnguser)
>
>
>
> --
>
> Model : tbluser.php
>
> class Tbluser extends AppModel {
>
>var $useTable = 'tbluser';
>
> }
>
>
> --
>
> Controller:tblusers_controller.php
>
>
> class TblusersController extends AppController {
>
>var $name = "Tblusers";
>
>function login() {
>
>}
>
>function index() {
>
>}
>function logout() {
>
>$this->Session->setFlash('Logout');
>
>$this->redirect($this->Auth->logout());
>}
> }
>
> --
> App Controller :app_controller.php
>
>
> class AppController extends Controller {
>
>var $uses=array('Tbluser');
>
>var $components = array('Auth');
>
>function beforeFilter(){
>$this->Auth->loginRedirect = array('controller'=> 'tblusers',
>   'action' => 'index');
>$this->Auth->logoutRedirect = array('controller'=> 'tblusers',
>'action' => 'login');
>
>$this->Auth->allow('login');
>
>$this->Auth->authorize = 'controller';
>
>$this->set('loggedIn', $this->Auth->Tbluser('lnguser')); //
> Here I am getting the error
>}
>
>function isAuthorized() {
>return true;
>}
> }
>
> 
> viewfile : login.ctp
>
> create('Tbluser',
>  array(
>  'action' => 'login'));
> ?>
> cellpadding="0">
>
> valign="middle">USERNAME
> td>
>
> e($form->text('struid'));
>?>
>
> 
>
>
> 
> 
> 
> 
>
>
> valign="middle">PASSWORD
> td>
>
>echo $form-
> >password('strpid');
>?>
>
> 
>
>
> 
> 
> 
> 
>
>
>
>  echo $form-
> >submit('signin.gif',array(
> 'onclick'
> => 'validate()'));
>
>?>
>
>end(); ?>
>
> -
> Fatal error: Call to undefined method AuthComponent::tbluser() in /
> home/narendra/wizard_mvc/app/app_controller.php
>
>
> Please help me out.! Thanks in advance
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to 

Re: check box selection

2010-04-29 Thread Master Ram...!
redirect to another page

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


I have a problem when i am creating user login authentication

2010-04-29 Thread Narendra Padala


Hi..Every one ,
i am using postgresql database for cake when i am creating the user
authentication its show errors,
hope u i wrote properly but it shows Error, i wrote code like this
please any one can help me out.


My Database Table Name "tbluser "
--


 Columns|  Type
|  Modifiers
+
+-
 lnguser| integer| not null default
nextval(('"tbluser_lnguser_seq"'::text)::regclass)
 strfname   | character varying(100) | not null
 strlname   | character varying(100) | not null
 struid | character varying(100) | not null
 strpid | character varying(100) | not null
 lnguser_group  | integer| not null
 strtelarea | character varying(20)  |
 strtelno   | character varying(20)  |
 stremail   | character varying(100) |
 struserconfirm | character varying(100) |
 dtmregistered  | date   |
 dtmapproved| date   |
 blnchatuser| bit(1) |
Indexes:
"tbluser_pkey" PRIMARY KEY, btree (lnguser)


--

Model : tbluser.php

class Tbluser extends AppModel {

var $useTable = 'tbluser';

}


--

Controller:tblusers_controller.php


class TblusersController extends AppController {

var $name = "Tblusers";

function login() {

}

function index() {

}
function logout() {

$this->Session->setFlash('Logout');

$this->redirect($this->Auth->logout());
}
}

--
App Controller :app_controller.php


class AppController extends Controller {

var $uses=array('Tbluser');

var $components = array('Auth');

function beforeFilter(){
$this->Auth->loginRedirect = array('controller'=> 'tblusers',
   'action' => 'index');
$this->Auth->logoutRedirect = array('controller'=> 'tblusers',
'action' => 'login');

$this->Auth->allow('login');

$this->Auth->authorize = 'controller';

$this->set('loggedIn', $this->Auth->Tbluser('lnguser')); //
Here I am getting the error
}

function isAuthorized() {
return true;
}
}


viewfile : login.ctp

 create('Tbluser',
  array(
  'action' => 'login'));
 ?>


USERNAME


text('struid'));
?>

 


 
 
 
 


PASSWORD


password('strpid');
?>

 


 
 
 
 



submit('signin.gif',array(
 'onclick'
=> 'validate()'));

?>

end(); ?>

-
Fatal error: Call to undefined method AuthComponent::tbluser() in /
home/narendra/wizard_mvc/app/app_controller.php


Please help me out.! Thanks in advance

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Stuck again ...

2010-04-29 Thread Ed Propsner
8-)

On Thu, Apr 29, 2010 at 3:00 AM, Andrei Mita  wrote:

> Forget about what? :))
>
>
>
> On Thu, Apr 29, 2010 at 9:49 AM, Ed Propsner  wrote:
>
>> LOL, I obviously need to call it quits for the day ... talk about
>> over-thinking that one!  It honestly didn't even dawn on me to try session
>> vars ... lol.
>>
>> What do you say we both just walk away and forget this ever happened? 8-)
>>
>> - Ed
>>
>>
>> On Thu, Apr 29, 2010 at 2:33 AM, Andrei Mita wrote:
>>
>>> Maybe I didn't get it right, but if you need a var globally available
>>> (controllers, views, layouts) you could use $session. Easy to set and read
>>> everywhere.
>>>
>>> Andrei
>>>
>>>
>>> On Thu, Apr 29, 2010 at 8:47 AM, Ed Propsner wrote:
>>>
 Could someone help get me pointed in the right direction?

 I want to be able to set a variable in any one of my controllers/actions
 that is accessible
 by the default.ctp just like you would do for $page_title /
 $title_for_layout.

 I want to use it mainly for javascript so I would like to set the
 variable in the controller/action
 and the appropriate script will execute in the default.ctp when the view
 is rendered, either that
 or I could store the script in an element and have the appropriate
 element rendered in the default ???

 Anywho, I've been digging through the book and I'm not quite sure where
 I should be looking.
 Components? Bootstrapping? Heck if I  know 8-)

 Thanks,

 - Ed


  Check out the new CakePHP Questions site http://cakeqs.org and help
 others with their CakePHP related questions.

 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
 cake-php+unsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en

>>>
>>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>>> others with their CakePHP related questions.
>>>
>>> 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
>>> cake-php+unsubscr...@googlegroups.comFor
>>>  more options, visit this group at
>>> http://groups.google.com/group/cake-php?hl=en
>>>
>>
>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> 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
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Stuck again ...

2010-04-29 Thread Andrei Mita
Forget about what? :))


On Thu, Apr 29, 2010 at 9:49 AM, Ed Propsner  wrote:

> LOL, I obviously need to call it quits for the day ... talk about
> over-thinking that one!  It honestly didn't even dawn on me to try session
> vars ... lol.
>
> What do you say we both just walk away and forget this ever happened? 8-)
>
> - Ed
>
>
> On Thu, Apr 29, 2010 at 2:33 AM, Andrei Mita wrote:
>
>> Maybe I didn't get it right, but if you need a var globally available
>> (controllers, views, layouts) you could use $session. Easy to set and read
>> everywhere.
>>
>> Andrei
>>
>>
>> On Thu, Apr 29, 2010 at 8:47 AM, Ed Propsner wrote:
>>
>>> Could someone help get me pointed in the right direction?
>>>
>>> I want to be able to set a variable in any one of my controllers/actions
>>> that is accessible
>>> by the default.ctp just like you would do for $page_title /
>>> $title_for_layout.
>>>
>>> I want to use it mainly for javascript so I would like to set the
>>> variable in the controller/action
>>> and the appropriate script will execute in the default.ctp when the view
>>> is rendered, either that
>>> or I could store the script in an element and have the appropriate
>>> element rendered in the default ???
>>>
>>> Anywho, I've been digging through the book and I'm not quite sure where I
>>> should be looking.
>>> Components? Bootstrapping? Heck if I  know 8-)
>>>
>>> Thanks,
>>>
>>> - Ed
>>>
>>>
>>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>>> others with their CakePHP related questions.
>>>
>>> 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
>>> cake-php+unsubscr...@googlegroups.comFor
>>>  more options, visit this group at
>>> http://groups.google.com/group/cake-php?hl=en
>>>
>>
>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> 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
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en