Check user status fails

2015-08-13 Thread Gerculy Robert
Hi, 
I'm trying to set some groups for user status :
0 - pending activation 
1 - user activated 
2 - temporary banned
3 - permanently banned  - not added in examaple 

My problem is no matter what I do, status 2 shows up

$status_user = $this-Session-read('Auth.User.status');
if($status_user == 0){
$this-Session-setFlash(__('You\'ve been logged out 0.'));
$this-redirect($this-Auth-logout());
} else if($status_user == 2){
$this-Session-setFlash(__('You\'ve been logged out 2.'));
$this-redirect($this-Auth-logout());
}else{
$this-Session-setFlash(__('Welcome '. $this-Auth-user('username')));
$this-redirect($this-Auth-redirectUrl());
//header('Location: dashboard');
}

I tried with switch case, same issue. It's been one hour running around 
without finding the problem,
I echo $status_user and surprise , it returned 1, which would redirect the 
user to dashboard.
If it's 0, returns, 0 if 1 or 2 returns 2 . 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Cakephp 3.0 upgrade from 1.3 where to begin??

2015-02-03 Thread Robert Gravel
Hi all,
I want to migrate my application currently in cakephp 1.3 to 3.0 .  I just 
do not know where to begin and what the process would be.
Can someone point me to some resources or outline the steps?

Thank you
Robert Gravel 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Delete only users sites

2014-04-29 Thread Gerculy Robert
Hi there,

I'm working on a traffic exchange site and since I'm very new I used this 
login script : 
http://miftyisbored.com/a-complete-login-and-authentication-application-tutorial-for-cakephp-2-3/
Everything works nicely. Based on that code I created a few pages ( Add 
site, List sites, delete sites)

My problem is that anyone can delete the websites.( I'm sure this goes with 
users - not tested yet )

public function delete($id = null) {
 if (!$id) {
 $this-Session-setFlash('Please provide a site id');
 $this-redirect(array('action'='index'));
 }

 $this-Site-id = $id;
 if (!$this-Site-exists()) {
 $this-Session-setFlash('Invalid site id provided');
 $this-redirect(array('action'='index'));
 }
 if ($this-Site-saveField('status', 0)) {
 $this-Session-setFlash(__('Site deleted'));
 $this-redirect(array('action' = 'index'));
 }
 $this-Session-setFlash(__('Site was not deleted'));
 $this-redirect(array('action' = 'index'));
 }


This is the code. I tried adding a condition but couldn't make it work.
 I also tried a very old solution :

if($this-Site-user = $this-Session-read('Auth.User.id')){

 // code

 }else{
 echodie;
 }

 
But another fail.


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


3.0 OpsWorks setup

2014-03-02 Thread Robert Meisner
Has any1 any luck configuring Amazon OpsWorks with dev version of cakephp?
Would be great if some1 could share configuration to make it work.

I tired to connect it with https://github.com/cakephp/cakephp.git  but all 
i can see is empty response on me EC2 instance.

R

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Is there any online bake?

2014-02-21 Thread Robert Gravel
I used this when i developed mu 1.3 application. http://cakeapp.com


On Fri, Feb 21, 2014 at 9:45 AM, MihaiTL maft...@gmail.com wrote:

 Hi there!

 There is CRUD plugin I stumbled upon it and I am going to study today.

 It can be downloaded from

 https://github.com/FriendsOfCake/crud

 Hope it does what I need.

 Regards!



 luni, 17 februarie 2014, 16:36:10 UTC+2, MihaiTL a scris:

 Let's name it WebBake == WeBake



 luni, 17 februarie 2014, 13:21:42 UTC+2, MihaiTL a scris:

 Hi all,

 Something like a service application hosted on localhost or on your
 hosted development server with several plugins for different versions of
 CakePHP.

 SuperBake is an inspiration. Also Gii Module Generator from yii.

 Without a shell file like bake.

 Regards!

 luni, 17 februarie 2014, 12:47:06 UTC+2, MihaiTL a scris:

 Hi,

 I updated php and the files from /usr/share/php aren't as they should
 be.

 I remember when exploring yii that there was an application / plugin
 (like bake) that permited creation of models, views, controllers and many
 more but using a web interface.

 Do you know something similar for cakePHP? It can be made? I am new so
 I cannot contribute to it.

  --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to cake-php+unsubscr...@googlegroups.com.
 To post to this group, send email to cake-php@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: 3.0 update/save complex relations

2014-02-19 Thread Robert Meisner
I made an Issue for you :P
https://github.com/cakephp/cakephp/issues/2868

W dniu środa, 19 lutego 2014 11:11:10 UTC+1 użytkownik José Lorenzo napisał:

 That is unfortunately not done yet, currently it is only possible to 
 hydrate a new entity. Also there are some tasks pending for building the 
 options arrays so you don't have to type 'associated' so many times :P

 The only real way you can do it *right now* is to traverse you entity 
 yourself and set the values on your own. Would you like to help us getting 
 this done?

 On Tuesday, February 18, 2014 7:25:36 PM UTC+1, Robert Meisner wrote:

 I've started playing with new cakephp ORM functionality and i stuck with 
 complex relation updates/saves.

 Example relations look like this:
 Customer hasMany CustomerDetails
 CustomerDetails hasMany Attributes
 Attributes hasMany AttributeValues

 CustomerController:: view() action pases $customer entity variable 
 (contains all relations) to view. 
 Variable is then used in view to echo entity data but also is passed to 
 Form-create($customer) to edit part of the data
 I build my forms using notation below:
 $this-Form-hidden(id);
 $this-Form-text(
 customer_details.0.attributes.0.attribute_values.0.name)

 After user sends data i want to populate all $customer entity variable 
 with $this-request-data then try to save it and finally pass to view 
 again (this way all related entities should have validation errors 
 included):
  public function view($customer_id){
 
 $this-Customers = TableRegistry::get ( 'Customers' );
 /* @var $customer Customer */
 
 $customer=$this-Customers-find()-where(['Customers.id'=$customer_id])-contain([CustomerDetails=[Attributes=[AttributeValues]]])-first();
 if($this-request-is(post)){
  
 *$customer-populate($this-request-data,['associated'=['CustomerDetails'=
  
 ['associated' = ['Attributes'= ['associated' = 
 ['AttributesValues']]); //hydrate??*
 if($this-Customers-save($customer,['associated'=['CustomerDetails'= 
 ['associated' = ['Attributes'= ['associated' = 
 ['AttributesValues']])){
 //Yay
 }
 }
 $this-set(compact('customer'));
 }

 $this-request-data looks like this after send:

  'id' = '1',
  'customer_details' = array(
  (int) 0 = array(
  'id' = '1',
  'attributes' = array(
  (int) 0 = array(
  'id' = '1',
  'attributes_values' = array(
  (int) 0 = array(
  'string_value' = 'test 
 test test'
  )
  )
  ),
  (int) 1 = array(
  'name' = 'love',
  'attributes_values' = array(
  (int) 0 = array(
  'string_value' = 'me'
  )
  )
  )
  )
  )
  ),



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


3.0 update/save complex relations

2014-02-18 Thread Robert Meisner
I've started playing with new cakephp ORM functionality and i stuck with 
complex relation updates/saves.

Example relations look like this:
Customer hasMany CustomerDetails
CustomerDetails hasMany Attributes
Attributes hasMany AttributeValues

CustomerController:: view() action pases $customer entity variable 
(contains all relations) to view. 
Variable is then used in view to echo entity data but also is passed to 
Form-create($customer) to edit part of the data
I build my forms using notation below:
$this-Form-hidden(id);
$this-Form-text(customer_details.0.attributes.0.attribute_values.0.name)

After user sends data i want to populate all $customer entity variable with 
$this-request-data then try to save it and finally pass to view again 
(this way all related entities should have validation errors included):
 public function view($customer_id){

$this-Customers = TableRegistry::get ( 'Customers' );
/* @var $customer Customer */

$customer=$this-Customers-find()-where(['Customers.id'=$customer_id])-contain([CustomerDetails=[Attributes=[AttributeValues]]])-first();
if($this-request-is(post)){
 
*$customer-populate($this-request-data,['associated'=['CustomerDetails'= 
['associated' = ['Attributes'= ['associated' = 
['AttributesValues']]); //hydrate??*
if($this-Customers-save($customer,['associated'=['CustomerDetails'= 
['associated' = ['Attributes'= ['associated' = 
['AttributesValues']])){
//Yay
}
}
$this-set(compact('customer'));
}

$this-request-data looks like this after send:

'id' = '1',
'customer_details' = array(
(int) 0 = array(
'id' = '1',
'attributes' = array(
(int) 0 = array(
'id' = '1',
'attributes_values' = array(
(int) 0 = array(
'string_value' = 'test 
test test'
)
)
),
(int) 1 = array(
'name' = 'love',
'attributes_values' = array(
(int) 0 = array(
'string_value' = 'me'
)
)
)
)
)
),

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Looking for part time cakephp work?

2013-08-11 Thread Robert Gravel
Hello,
I am looking for a few team members to work on a cakephp projects. Not
looking for big companies just solo developers that love to code.
www.bigdojo.com

You can contact me private so you don't clutter the list.

Robert
rockb...@gmail.com

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Twilio integration with cakephp

2013-07-07 Thread Robert Gravel
this is the setup in my controller for voice broadcast in cake 1.3.
Probably not the best code but it works for me.

if($this-data['Recording']['voice_broadcast'] == voice_recording){
App::import('Vendor', 'Twilio', array('file' =
'twilio'.DS.'Services'.DS.'Twilio.php'));
$this-loadModel('Smstwilio');
$this-Smstwilio-recursive = 0;
$smsOptions_array = $this-Smstwilio-find('all',
array('conditions' = array('Smstwilio.school_id' =
$session_school_id)));
$account_sid =
$smsOptions_array['0']['Smstwilio']['account_sid'];
$auth_token =
$smsOptions_array['0']['Smstwilio']['auth_token'];
$client = new Services_Twilio($account_sid, $auth_token);

$this-loadModel('Recording');
$this-Recording-recursive = 0;
$recording =
$this-Recording-findById($this-data['Queue']['recording']);

foreach($users_data as $user){
$call_number = ;
//check for phone or cell phone missing on user. if
missing use the household head phone
if((empty($user['User']['phone'])) ||
(empty($user['User']['cell_phone']))) {
//find the head of household using user
household_id and is_head = 1
$head = $this-User-find('all', array('conditions'
= array('User.household_id' = $user['User']['household_id'],
'User.is_head' = '1')));

//set user email with head email
if (empty($user['User']['phone'])) {
$user['User']['phone'] =
$head[0]['User']['phone'];
}
if (empty($user['User']['cell_phone'])) {
$user['User']['cell_phone'] =
$head[0]['User']['cell_phone'];
}

}
if($this-data['Recording']['phone_type'] == 0){
if($user['User']['phone']){
$call_number = $user['User']['phone'];
}elseif($user['User']['cell_phone']){
$call_number = $user['User']['cell_phone'];
}
}else{
if($user['User']['cell_phone']){
$call_number = $user['User']['cell_phone'];
}elseif($user['User']['phone']){
$call_number = $user['User']['phone'];
}
}

if(!empty($call_number)){
$options = array(IfMachine = Continue);
try{
$call = $client-account-calls-create(

$smsOptions_array['0']['Smstwilio']['phone_number'], // From this number
$call_number, // Call this number

'
http://www.domain.com/queues/play_recording.xml?recording_url='.$recording['Recording']['recording_url']
,
$options
);
}catch (Exception $ex){
echo $ex-getMessage();
}
}
} //end foreach
$this-Session-setFlash(__('The Recording has been sent',
true));
$this-redirect(array('action'='download4'));
}


On Sun, Jul 7, 2013 at 8:23 AM, Yasir Arafat Hasib arafa...@gmail.comwrote:

 Hello everybody.
 I am integrating twilio with cakephp. I hoped integration is done but
 after 2/3 rings the call are droping and also i failed to get the call
 record.

 I got others data fine after call end on my database.

 --
 *Thanks  Regards.

 -
 Yasir Arafat (Hasib)*

 --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to cake-php+unsubscr...@googlegroups.com.
 To post to this group, send email to cake-php@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Generating multiple 'requests' based on form selections

2013-06-27 Thread Robert Gravel
Not sure if this is what you want to do but I have a view with 2 form
elements on it. I did get hung up because I usually use $this-Form-end

?php
 echo $this-Form-create('User', array( 'action'='/add_staff'));?
fieldset
 legend?php __('Admin Add Staff Member'); ?/legend
?php
echo $this-Form-input('id', array('label' = 'Select an existing
Student','options' = array(  $users)));
echo By submitting this form you are giving the selected student
Administrative access;
echo $this-Form-hidden('group_id', array('value' = '1'));
echo br;
?
/fieldset
?php
echo $this-Form-submit('Add a Staff Member from an existing
Student', array('name' = 'submit'));
echo br;
echo -- OR -- Create a new profile for this Staff Member. ;
echo br;
?
?php echo $this-Form-create('User2', array(
'action'='/add_staff'));?

fieldset
 legend?php __('Add a New Staff Member '); ?/legend
?php

echo $this-Form-input('first_name');
echo $this-Form-input('last_name');
echo $this-Form-input('username');
echo $this-Form-input('password');
echo $this-Form-input('email');
echo $this-Form-input('birthdate', array('label' = 'Date of
Birth', 'empty' = true, 'timeFormat' = '', 'minYear' = ( date('Y') - 70
), 'maxYear' = ( date('Y') - 3)));
echo $this-Form-input('address');
echo $this-Form-input('city');
echo $this-Form-input('state');
echo $this-Form-input('zip_code');
echo $this-Form-input('phone');
echo $this-Form-input('uniform_size', array( 'type' = 'select',
'options' = array( '' = 'Size ', '000' = 'Size 000', '00' =
'size 00', '0' = 'Size 0', '1' = 'Size 1', '2' = 'size 2' , '3' = 'Size
3', '4' = 'size 4', '5' = 'Size 5', '6' = 'Size 6')));
echo $this-Form-input('is_head', array('type'='checkbox'));
echo $this-Form-input('household_id');
echo $this-Form-hidden('group_id', array('value' = '1'));
echo $this-Form-input('school_id', array( 'value' =
$currentSchool , 'type' = 'hidden') );

?
/fieldset
?php
//echo $this-Form-end(__('Submit', true));
echo $this-Form-submit('Add a Staff Member', array('name' = 'submit'));

controller:

if (isset($this-params['form']['submit'])){
//check for first form
if ($this-params['form']['submit'] == Add a Staff Member from
an existing Student){
if ($this-User-save($this-data)) {
$this-Session-setFlash(__('The user has been saved',
true));
$this-redirect(array('action'='view_staff'));
} else {
$this-Session-setFlash(__('The user could not be saved.
Please, try again.', true));
}
//check for second form
}elseif ($this-params['form']['submit'] == 'Add a Staff
Member'){
//give value of second form (User2) to User so it can be
automatically saved
$this-data['User'] = $this-data['User2'];
//save the data
if ($this-User-save($this-data)) {
$this-Session-setFlash(__('The user has been saved',
true));
$this-redirect(array('action'='view_staff'));
} else {
$this-Session-setFlash(__('The user could not be saved.
Please, try again.', true));
}
}
}


On Thu, Jun 27, 2013 at 1:19 PM, David Carr dc...@scienceprousa.com wrote:

 I have a CakePHP form that lets a user select a variety of parameters.
 What I want to do is let them select multiple choices on a few different
 parameters, and then turn these into multiple submissions. My CakePHP model
 is called 'Requests' so ideally what I want to do is have the user be able
 to create multiple requests through one form submission - essentially a
 'cross-product' of the options they choose.

 I don't want/need anyone to write code for me but if someone could help me
 think this problem through and give me a few pointers in the right
 direction, I'd greatly appreciate it!

 Disclaimer: I'm using CakePHP 1.1, and am unable to upgrade - this site
 runs on the same machine as many others inside my company and there was
 lots of hackery done and lots of shared files.  Disclaimer #2, I am an
 intern and brand new to CakePHP ;-)

 --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to cake-php+unsubscr...@googlegroups.com.
 To post to this group, send email to cake-php@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter 

Re: containable problem

2013-05-29 Thread Robert Gravel
Hi John, This was the exact code i tried in my second example. putting the
condition for the current model seems to break the containable method and
then all related models are returned. also the date search within the
Attendance model also breaks.

There must be a way here I am not seeing.

I would hate to return all users and have to loop thru potentially
thousands to rebuild the array.

Any other options?

Robert


On Wed, May 29, 2013 at 6:25 AM, John spil...@gmail.com wrote:

 The message is telling you what is wrong, you are asking containable to
 contain the starting Model again

 $users = $this-User-find('all',
   array(
 'conditions' = $cond2
   ),
 *  array(*
 'contain' = array(
   'Attendance' = array(
 'conditions' = $cond
   ),
   'Usermembership'
 )
 *  )*
 );

 I think there's the problem, make your code like this:

 $users = $this-User-find('all',
   array(
 'conditions' = $cond2,

 'contain' = array(
   'Attendance' = array(
 'conditions' = $cond
   ),
   'Usermembership'
 )
 *  )*
 );

 I always indent arrays inside finds to the extremes, especially if
 something is wrong because it helps to understand hierarchy and nesting
 better. You can always compact it to a single line if you think it's better
 later


 On Wednesday, May 29, 2013 6:10:47 AM UTC+3, Robert Gravel wrote:

 Hi experts,

 I am having an issue with containable. I have no problems returning the
 proper records for Attendance condition but the database call will still
 return all users in database with empty attendance field.
 I need to return only User.school_id that match admin's $session_school_id

 tried this
 $this-User-Behaviors-**attach('Containable');
 $from =  $this-data['User']['start_**date']['year'] . - .
 $this-data['User']['start_**date']['month'] . - .
 $this-data['User']['start_**date']['day'];
  $to =  $this-data['User']['end_date'**]['year'] . - .
 $this-data['User']['end_date'**]['month'] . - .
 $this-data['User']['end_date'**]['day'];
 $cond = array('Attendance.created BETWEEN ? AND ?' = array($from, $to),
 'Attendance.school_id' = $session_school_id);
 // return only school user
 $cond2 = array('User.school_id' = $session_school_id);
 $users = $this-User-find('all', array('contain' = array('Attendance'
 = array('conditions' = $cond), 'Usermembership', 'User' =
 array('conditions' = $cond2) )));

 this gives me Warning (512): Model User is not associated with model
 User

 and tried this

 $users = $this-User-find('all', array('conditions' = $cond2),
 array('contain' = array('Attendance' = array('conditions' = $cond),
 'Usermembership' )));

 does not work either.

 cake 1.3
 Thank you
 Robert

  --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to cake-php+unsubscr...@googlegroups.com.
 To post to this group, send email to cake-php@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: containable problem

2013-05-29 Thread Robert Gravel
User has many
Attendance
Usermembership
Bills
Albums
Rankforusers
and more...

School has many
Users

need to return User, Attendance, Usermembership
where User is based on school_id  and Attendance is based on date.

Robert


On Wed, May 29, 2013 at 11:35 AM, John spil...@gmail.com wrote:

 What are your model associations?

 Have you tried to break it down to one step at a time (no contained model
 then add one at a time) and have a look at the produced SQL?

 I usually blindly add a 'recursive' = -1 clause in all find options when I
 use containable to keep things simple (unless it is needed otherwise of
 course).

 If you can't get it to work with contain you can always use plain old SQL
 to get the proper results, no need to accept whatever cake is pulling out
 for you with its magic.



 On Wednesday, May 29, 2013 5:43:21 PM UTC+3, Robert Gravel wrote:

 Hi John, This was the exact code i tried in my second example. putting
 the condition for the current model seems to break the containable method
 and then all related models are returned. also the date search within the
 Attendance model also breaks.

 There must be a way here I am not seeing.

 I would hate to return all users and have to loop thru potentially
 thousands to rebuild the array.

 Any other options?

 Robert


 On Wed, May 29, 2013 at 6:25 AM, John spi...@gmail.com wrote:

 The message is telling you what is wrong, you are asking containable to
 contain the starting Model again

 $users = $this-User-find('all',
   array(
 'conditions' = $cond2
   ),
 *  array(*
 'contain' = array(
   'Attendance' = array(
 'conditions' = $cond
   ),
   'Usermembership'
 )
 *  )*
 );

 I think there's the problem, make your code like this:

 $users = $this-User-find('all',
   array(
 'conditions' = $cond2,

 'contain' = array(
   'Attendance' = array(
 'conditions' = $cond
   ),
   'Usermembership'
 )
 *  )*
 );

 I always indent arrays inside finds to the extremes, especially if
 something is wrong because it helps to understand hierarchy and nesting
 better. You can always compact it to a single line if you think it's better
 later


 On Wednesday, May 29, 2013 6:10:47 AM UTC+3, Robert Gravel wrote:

 Hi experts,

 I am having an issue with containable. I have no problems returning the
 proper records for Attendance condition but the database call will still
 return all users in database with empty attendance field.
 I need to return only User.school_id that match admin's
 $session_school_id

 tried this
 $this-User-Behaviors-**attach**('Containable');
 $from =  $this-data['User']['start_**dat**e']['year'] . - .
 $this-data['User']['start_**dat**e']['month'] . - .
 $this-data['User']['start_**dat**e']['day'];
  $to =  $this-data['User']['end_date']['year'] . - .
 $this-data['User']['end_date']['month'] . - .
 $this-data['User']['end_date']['day'];
 $cond = array('Attendance.created BETWEEN ? AND ?' = array($from,
 $to), 'Attendance.school_id' = $session_school_id);
 // return only school user
 $cond2 = array('User.school_id' = $session_school_id);
 $users = $this-User-find('all', array('contain' = array('Attendance'
 = array('conditions' = $cond), 'Usermembership', 'User' =
 array('conditions' = $cond2) )));

 this gives me Warning (512): Model User is not associated with model
 User

 and tried this

 $users = $this-User-find('all', array('conditions' = $cond2),
 array('contain' = array('Attendance' = array('conditions' = $cond),
 'Usermembership' )));

 does not work either.

 cake 1.3
 Thank you
 Robert

  --
 Like Us on FaceBook 
 https://www.facebook.com/**CakePHPhttps://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google
 Groups CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to cake-php+u...@**googlegroups.com.
 To post to this group, send email to cake...@googlegroups.com.

 Visit this group at 
 http://groups.google.com/**group/cake-php?hl=enhttp://groups.google.com/group/cake-php?hl=en
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
 .




  --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to cake-php+unsubscr...@googlegroups.com.
 To post to this group, send email to cake-php@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group

Re: containable problem

2013-05-29 Thread Robert Gravel
 $params = array()) (notice only *two
 parameters*) but you called it as find('all', array(whatever),
 array(whatever)).  Of course it fails with three parameters (PHP should
 be telling you that).

 My code is telling cake to
 1. Get the proper filtered users as 'conditions' = cond2 are applied to
 the User model
 2. Use the IDs of those users to return contained data from the other
 associated models ('contain' = ...)

 If this is failing then your models are probably not properly associated
 or I'm overlooking something.



 On Wed, May 29, 2013 at 11:35 AM, John spi...@gmail.com wrote:

 What are your model associations?

 Have you tried to break it down to one step at a time (no contained
 model then add one at a time) and have a look at the produced SQL?

 I usually blindly add a 'recursive' = -1 clause in all find options when
 I use containable to keep things simple (unless it is needed otherwise of
 course).

 If you can't get it to work with contain you can always use plain old
 SQL to get the proper results, no need to accept whatever cake is pulling
 out for you with its magic.



 On Wednesday, May 29, 2013 5:43:21 PM UTC+3, Robert Gravel wrote:

 Hi John, This was the exact code i tried in my second example. putting
 the condition for the current model seems to break the containable method
 and then all related models are returned. also the date search within the
 Attendance model also breaks.

 There must be a way here I am not seeing.

 I would hate to return all users and have to loop thru potentially
 thousands to rebuild the array.

 Any other options?

  Robert


 On Wed, May 29, 2013 at 6:25 AM, John spi...@gmail.com wrote:

 The message is telling you what is wrong, you are asking containable
 to contain the starting Model again

 $users = $this-User-find('all',
   array(
 'conditions' = $cond2
   ),
 *  array(*
 'contain' = array(
   'Attendance' = array(
 'conditions' = $cond
   ),
   'Usermembership'
 )
 *  )*
 );

 I think there's the problem, make your code like this:

 $users = $this-User-find('all',
   array(
 'conditions' = $cond2,

 'contain' = array(
   'Attendance' = array(
 'conditions' = $cond
   ),
   'Usermembership'
 )
 *  )*
 );

 I always indent arrays inside finds to the extremes, especially if
 something is wrong because it helps to understand hierarchy and nesting
 better. You can always compact it to a single line if you think it's 
 better
 later


 On Wednesday, May 29, 2013 6:10:47 AM UTC+3, Robert Gravel wrote:

 Hi experts,

 I am having an issue with containable. I have no problems returning
 the proper records for Attendance condition but the database call will
 still return all users in database with empty attendance field.
 I need to return only User.school_id that match admin's
 $session_school_id

 tried this
 $this-User-Behaviors-**attach('Containable');
 $from =  $this-data['User']['start_**date']['year'] . - .
 $this-data['User']['start_**date']['month'] . - .
 $this-data['User']['start_**date']['day'];
  $to =  $this-data['User']['end_date'**]['year'] . - .
 $this-data['User']['end_date'**]['month'] . - .
 $this-data['User']['end_date'**]['day'];
 $cond = array('Attendance.created BETWEEN ? AND ?' = array($from,
 $to), 'Attendance.school_id' = $session_school_id);
 // return only school user
 $cond2 = array('User.school_id' = $session_school_id);
 $users = $this-User-find('all', array('contain' =
 array('Attendance' = array('conditions' = $cond), 'Usermembership',
 'User' = array('conditions' = $cond2) )));

 this gives me Warning (512): Model User is not associated with
 model User

 and tried this

 $users = $this-User-find('all', array('conditions' = $cond2),
 array('contain' = array('Attendance' = array('conditions' = $cond),
 'Usermembership' )));

 does not work either.

 cake 1.3
 Thank you
 Robert

  --
 Like Us on FaceBook 
 https://www.facebook.com/**CakeP**HPhttps://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google
 Groups CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to cake-php+u...@**googlegroups.com**.
 To post to this group, send email to cake...@googlegroups.com.

 Visit this group at 
 http://groups.google.com/**group**/cake-php?hl=enhttp://groups.google.com/group/cake-php?hl=en
 .
 For more options, visit 
 https://groups.google.com/**grou**ps/opt_outhttps://groups.google.com/groups/opt_out
 .




  --
 Like Us on FaceBook 
 https://www.facebook.com/**CakePHPhttps://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google
 Groups CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to cake-php+u...@**googlegroups.com.
 To post to this group, send email to cake

Re: containable problem

2013-05-29 Thread Robert Gravel
So embarrassing. In my long list of associations School-User  was missing?
Your code worked thanks a bunch..

Robert


On Wed, May 29, 2013 at 3:22 PM, Robert Gravel rockb...@gmail.com wrote:

 John thank you but it seems to not be working. I was mistaken that your
 code is the same as my second example.
 I have pasted your code:
 when I input a date range of may27 - may 29, I am returned all associated
 models and no filtering on the Attendance model.
 You can see both Attendance records returned when only one should be.

 SELECT `Attendance`.`id`, `Attendance`.`created`, `Attendance`.`modified`,
 `Attendance`.`user_id`, `Attendance`.`program_id`, `Attendance`.`school_id`
 FROM `attendances` AS `Attendance` WHERE `Attendance`.`school_id` = (2)

 1] = Array
 (
 [User] = Array
 (
 [id] = 119
 [group_id] = 2
 [username] = mdonohue
 [role] =
 [password] = 1234
 [email] = b...@mail.com
 [phone] = 631-252-5790
 [cell_phone] =
 [active] = 1
 [first_name] = Mikey
 [last_name] = Donohue
 [country] =
 [address] = 12324 any street
 [city] = anycity
 [state] = NY
 [zip_code] = 11739
 [created] = 2011-12-14 16:53:33
 [modified] = 2011-12-14 21:45:24
 [about_me] =
 [household_id] = 2
 [is_head] = 1
 [birthdate] = 1968-01-16
 [activated] = 0
 [activation_code] =
 [school_id] = 2
 [name] =
 [uniform_size] = 5
 [barcode] = 9375361
 [show_profile] = 0
 [photo] =
 [photo_dir] =
 [lead_source] =
 )

 [Household] = Array
 (
 [id] = 2
 [name] = mikey donohue
 [payment_token] =
 [payment_type] =
 [school_id] = 2
 )

 [Attendance] = Array
 (
 [0] = Array
 (
 [id] = 185
 [created] = 2013-05-27
 [modified] = 2013-05-29 03:34:40
 [user_id] = 119
 [program_id] = 3
 [school_id] = 2
 )

 [1] = Array
 (
 [id] = 186
 [created] = 2013-05-26
 [modified] = 2013-05-29 03:35:06
 [user_id] = 119
 [program_id] = 3
 [school_id] = 2
 )

 )

 [Photo] = Array
 (
 )

 [News] = Array
 (
 )

 [Eventregistration] = Array
 (
 )

 [Rankforuser] = Array
 (
 [0] = Array
 (
 [id] = 524
 [created] = 2013-05-28
 [modified] = 2013-05-28
 [user_id] = 119
 [rank_id] = 28
 [program_id] = 3
 [school_id] = 2
 [current_rank] = 1
 )

 )

 [Testregistration] = Array
 (
 )

 [Trial] = Array
 (
 [0] = Array
 (
 [id] = 32
 [date] = 2012-01-15 09:35:00
 [reminder] = 1
 [reminder_date] = 2011-12-31 09:35:00
 [message] =
 [created] = 2011-12-15 09:37:20
 [modified] = 2011-12-15 09:49:08
 [template_id] = 7
 [staff_id] = 2
 [user_id] = 119
 [school_id] = 2
 )

 )

 [Usermembership] = Array
 (
 [0] = Array
 (
 [id] = 314
 [start_date] = 2013-06-01
 [end_date] = 2015-06-01

containable problem

2013-05-28 Thread Robert Gravel
Hi experts,

I am having an issue with containable. I have no problems returning the
proper records for Attendance condition but the database call will still
return all users in database with empty attendance field.
I need to return only User.school_id that match admin's $session_school_id

tried this
$this-User-Behaviors-attach('Containable');
$from =  $this-data['User']['start_date']['year'] . - .
$this-data['User']['start_date']['month'] . - .
$this-data['User']['start_date']['day'];
 $to =  $this-data['User']['end_date']['year'] . - .
$this-data['User']['end_date']['month'] . - .
$this-data['User']['end_date']['day'];
$cond = array('Attendance.created BETWEEN ? AND ?' = array($from, $to),
'Attendance.school_id' = $session_school_id);
// return only school user
$cond2 = array('User.school_id' = $session_school_id);
$users = $this-User-find('all', array('contain' = array('Attendance' =
array('conditions' = $cond), 'Usermembership', 'User' =
array('conditions' = $cond2) )));

this gives me Warning (512): Model User is not associated with model
User

and tried this

$users = $this-User-find('all', array('conditions' = $cond2),
array('contain' = array('Attendance' = array('conditions' = $cond),
'Usermembership' )));

does not work either.

cake 1.3
Thank you
Robert

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Error 406 - Not Acceptable with form

2013-05-19 Thread Robert Gravel
Changed to multipart/form-data   seems to solve issue.


On Sat, May 18, 2013 at 1:55 PM, rockbust rockb...@optonline.net wrote:


 I have a form submit problem and looking for a solution.  Receiving a “406
 Not Acceptable” when I submit my form.

 I am passing a custom array that sometimes contains 100 or more users. The
 admin needs to select all and register them.  As you can see when the form
 is submitted there could be 1,000 separate elements in the form.
 In doing a little research it seems it is possibly an issue with some
 security feature of the server  (my xampp server does not return the
 error).
 The hosting company is not very helpful.

 Solutions please??
 I have come up with one possible solution to paginate the array sent to the
 view. That is a problem in itself because I am using a custom array that
 has
 been manipulated to the max and can not find out how to paginate it? Second
 this requires the admin to load the view and submit it maybe 20+ times to
 register all users. Not a great option..

 My form is set up as so.
 admin_add_eligible:

 ?php echo $this-Form-create('Testregistration', array('id' =
 'selectForm','action'='/add_eligible'));?


 Select All input type=checkbox
 onclick=checkAll(document.getElementById('selectForm'), 'results1',
 this.checked); /
 ?php echo 'First Name';?
 ?php echo 'Last Name';?
 ?php echo 'Next Rank';?
 ?php echo 'Attendances';?
 ?php echo 'Create Bill';?
 ?php echo 'Autopay';?
 ?php echo 'Bill Due Date';?
 ?php __('Actions');?

 ?php
 $i = 0;
 if(!empty($eligibles)){
 foreach ($eligibles as $user):
 //debug($user);
 $class = null;
 if ($i++ % 2 == 0) {
 $class = ' class=altrow';
 }
 ?
 trlt;?php echo $class;?

 ?php echo
 $this-Form-input('User.'.$user['user_id'].'.checked',
 array('type'='checkbox', 'multiple' = 'checkbox', 'class' = 'results1',
 'label'=false, 'options' = array('Testregistration'.$user['user_id']
 ='Testregistration'.$user['user_id']))); ?nbsp;
 ?php echo $user['first_name']; ?nbsp;
 ?php echo $user['last_name']; ?nbsp;
 ?php echo $user['rank_name']; ?nbsp;
 ?php echo $user['attendance_numb']; ?nbsp;
 ?php echo
 $this-Form-input('Bill.'.$user['user_id'].'.create_bill',
 array('label' = false,'type'='checkbox','checked'=true)); ?nbsp;
 ?php echo
 $this-Form-input('Bill.'.$user['user_id'].'.auto_pay',
 array('label' = false,'type'='checkbox')); ?nbsp;
 ?php echo
 $this-Form-input('Bill.'.$user['user_id'].'.due_date',
 array('label' = false ,'type'='date', 'dateFormat' = 'MDY')); ?nbsp;

 ?php echo $this-Html-link(__('View', true),
 array('controller' =
 'users','action' = 'view', $user['user_id'])); ?

 ?php //echo $this-Form-input('school_id', array(
 'value' = 'hello' ,
 'type' = 'hidden') );

 echo $this-Form-input('Testregistration.'.$user['user_id'].'.program_id',
 array( 'type' = 'hidden', 'value' =  $user['program_id'] ));
 echo
 $this-Form-input('Testregistration.'.$user['user_id'].'.old_rank_id',
 array( 'type' = 'hidden', 'value' =  $user['old_rank_id'] ));
 echo $this-Form-input('Testregistration.'.$user['user_id'].'.fee', array(
 'type' = 'hidden', 'value' =  $user['fee'] ));
 ?

 ?php endforeach; ?




 --
 View this message in context:
 http://cakephp.1045679.n5.nabble.com/Error-406-Not-Acceptable-with-form-tp5714980.html
 Sent from the CakePHP mailing list archive at Nabble.com.

 --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to cake-php+unsubscr...@googlegroups.com.
 To post to this group, send email to cake-php@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




changing Form input's contents from their default 'value'

2013-04-02 Thread Robert Denomme
Say I have a hasOne relationship between two Models, for instance Recipe 
hasOne User. If I set up the data (recipes contains a user_id field) and 
bake I will see a beautiful user id drop-down menu in the recipe add 
screen. The problem is that it displays the user_id, and not a bunch of 
usernames! Can I change this?

For reference, here is some relevant code, and the html it outputs,
//Views/add.ctp
...
echo $this-Form-input('user_id');

which produces the following html:

select name=data[Recipe][user_id] id=RecipeUserId
option value=11/optionoption value=22/option
...


The html I would prefer would be more like...
select name=data[Recipe][user_id] id=RecipeUserId
option value=1Robert/optionoption value=2Paulson/option
...
Thanks for any help!


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: AclNode::node() - Couldn't find Aro node identified by Array ( [Aro0.model] = Group [Aro0.foreign_key] = 1 )

2013-04-02 Thread Robert Denomme
I had this same error message, what I had done was create a bunch of groups 
first, then deleted some. So there was no group with id=1. If you go to the 
db and check the group id's, those are the ones you should use to pupulate 
your ACL.

-Rob 

On Thursday, October 29, 2009 2:08:22 AM UTC-7, Jeremy wrote:

 when I do Auth with cake , I  happened a problem 
 Warning (512): AclNode::node() - Couldn't find Aro node identified by 
 Array 
 ( 
 [Aro0.model] = Group 
 [Aro0.foreign_key] = 1 
 ) 
  [CORE\cake\libs\model\db_acl.php, line 191] 


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Cake Gallery

2013-04-01 Thread Robert Gravel
', 'PhotoTag', 'PhotoFavorite',
 'PhotoLike', 'PhotoDislike', 'Notification');

  $photo = $this-findById($this-id());
  $this-secret = $photo['Photo']['secret'];

  foreach(array($this-getOriginalFile($this-id(), $this-secret),
 $this-getLargeFile($this-id(), $this-secret),
 $this-getMediumFile($this-id(), $this-secret),
 $this-getSmallFile($this-id(), $this-secret),
 $this-getThumbFile($this-id(), $this-secret),
 $this-getSquareFile($this-id(), $this-secret),
 $this-getBannerFile($this-id(), $this-secret),
 $this-getBuddyFile($this-id(), $this-secret)) as $file)
  {
if($file-exists())
  $file-delete();
  }

return true;
}


function afterDelete()
{

}


 }
 ?

 I hope it helps,... enjoy it,...

 On Saturday, March 30, 2013 6:16:12 PM UTC-7, Robert Gravel wrote:

 Hi All,
 I am trying to use the cake_gallery plugin https://github.com/vitorpc/**
 cake_gallery https://github.com/vitorpc/cake_gallery  for cake 1.3 but
 for some reason the thumbnail is not generated. Seems some issue with
 photo.php model??
 In firebug i get some errors.
 bWarning/b (2)/a: imagecreatetruecolor() [a href='
 http://php.net/function.**imagecreatetruecolorhttp://php.net/function.imagecreatetruecolor
 '**function.imagecreatetruecolor**/a]:
 Invalid image dimensions [bAPP\plugins\cake_gallery\**models\photo.php/b,
 line b104/b]
 I have GD on my server. same errors on my server as my xampp server.

 Anyone have any luck with this or can recommend a gallery plugin with
 upload and thumb creation
 Thank you
 Robert

  --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to cake-php+unsubscr...@googlegroups.com.
 To post to this group, send email to cake-php@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




html helper - image outside of webroot/img dir

2013-04-01 Thread Robert Gravel
Hi,
I need to display an image outside the webroot/img  dir for cake 1.3. 
Specifically I have to link to an image in the ckeditor which is at 
webroot/js/ckeditor...

When I use $this-Html-image() it gives me a reference at webroot/img by 
default. Is there a solution that is portable between localhost   and server

Thanks
Rob G

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: html helper - image outside of webroot/img dir

2013-04-01 Thread Robert Gravel
Thanks. Got it

On Monday, April 1, 2013 9:27:12 PM UTC-4, advantage+ wrote:

 Check CKEditor config settings for the folder to save files to and point 
 it to img/uploads or what not and refer as $this-Html-image('uploads/' . 
 $file) something along those lines. But if it’s a CK image from the editor 
 package itself  just reference it as the correct path/filename

  

 *From:* cake...@googlegroups.com javascript: [mailto:
 cake...@googlegroups.com javascript:] *On Behalf Of *Robert Gravel
 *Sent:* Monday, April 01, 2013 10:42 PM
 *To:* cake...@googlegroups.com javascript:
 *Subject:* html helper - image outside of webroot/img dir

  

 Hi,
 I need to display an image outside the webroot/img  dir for cake 1.3. 
 Specifically I have to link to an image in the ckeditor which is at 
 webroot/js/ckeditor...

 When I use $this-Html-image() it gives me a reference at webroot/img by 
 default. Is there a solution that is portable between localhost   and server

 Thanks
 Rob G

 -- 
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP
  
 --- 
 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to cake-php+u...@googlegroups.com javascript:.
 To post to this group, send email to cake...@googlegroups.comjavascript:
 .
 Visit this group at http://groups.google.com/group/cake-php?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Cake Gallery

2013-03-30 Thread Robert Gravel
Hi All,
I am trying to use the cake_gallery plugin 
https://github.com/vitorpc/cake_gallery  for cake 1.3 but for some reason 
the thumbnail is not generated. Seems some issue with photo.php model??
In firebug i get some errors.
bWarning/b (2)/a: imagecreatetruecolor() [a href='
http://php.net/function.imagecreatetruecolor'function.imagecreatetruecolor/a]:
 

Invalid image dimensions [bAPP\plugins\cake_gallery\models\photo.php/b, 
line b104/b]
I have GD on my server. same errors on my server as my xampp server.

Anyone have any luck with this or can recommend a gallery plugin with 
upload and thumb creation
Thank you
Robert

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: ACL : Group vs. User

2013-02-24 Thread Robert Winkky
Have you checked out http://www.alaxos.net/blaxos/pages/view/plugin_acl_2.0 
? 

On Sunday, February 24, 2013 11:02:37 AM UTC-5, CrotchFrog wrote:

 I have implemented ACL in my app and I'm regulating access using Groups, 
 however, I would like for some users within the same group to have slightly 
 different permissions. Has anyone been able to accomplish this? Is this 
 even possible? It seems as though I can change permissions for both the 
 Group as well as User, but when it comes to granting access it's one or the 
 other and there are far too many user records to set individual permissions 
 per user. 

 Any help is greatly appreciated. 


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




cake bake all -c db_config_name does not work

2013-02-17 Thread Robert Winkky
I can use ./cake bake all and it works great on $default. I can use ./cake 
bake model -c non_$default_database and that works fine and dandy. Is there 
any way to use ./cake bake all -c 'non_default_database'?

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Process CakeEmail error log on Cakephp 2.2.3

2013-02-17 Thread Robert
Maybe this can help.

$email = new CakeEmail('myConfig');
$fromConfig = 'EMAIL_FROM_ADDRESS';
$fromNameConfig = 'EMAIL_FROM_NAME';
$email-from(array( $fromConfig = $fromNameConfig));
$email-sender(array( $fromConfig = $fromNameConfig));
$email-to('EMAIL_TO_ADDRESS');
$email-replyTo('EMAIL_REPLYTO');
$email-subject('THE_SUBJECT');

$body ='THE MESSAGE BODY'
try{
$result = $email-send($body);
} catch (Exception $ex) {
// we could not send the email, ignore it
$result=Could not send registration email to userid-.$userId;
}
$this-log($result, LOG_DEBUG);



And check the log in app\tmp\logs

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Validating multiple models in one form

2012-12-11 Thread Robert Hunt
Hi Jodator,

Thank you Jodator, I presumed I had the conventions wrong but the CakePHP 
conventions page was convulsive and difficult to piece together.

I have made the conventions changes and its validating great! :D It is 
always the little things lol

Thanks again

On Tuesday, 11 December 2012 07:00:17 UTC, jodator wrote:

 Why do you have $name = 'UserInfos' while your class is UserInfo (and also 
 'Users')? Try to make it by Cake conventions and it should validate all 
 associeated models on saveAll().

 I would drop those lines, as they are not needed. And try changing 
 UsrInfos to UserInfo in form generation.

 Also:

  $this-User-create();
 *// not needed:*   $this-loadModel('UserInfo');

 UserInfo is available in $this-User-UserInfo (whith your current belongs 
 to in $this-User-UserInfo).

 And:


   'UsersInfos' = array( // why not just UserInfo ?
'className' = 'users_infos', //Class name should be: UserInfo

 Also read about associations in CakePHP, your foreign keys should be 
 user_id (not users_id). It's easier to go by Cake's conventions.



 On Tuesday, December 11, 2012 1:08:38 AM UTC+1, Robert Hunt wrote:

 Hi All,

 I hope someone can help clear this up for me.

 Basically I have two models producing fields in a form but when saving it 
 only validates the parent model.

 I have attempted to use saveAssociated and I have tried validating the 
 data on a per model basis with no success.

 Here is my code:

 *User Model*

 class User extends AppModel {
  public $name = 'Users';
  var $hasOne = array(
   'UsersInfos' = array(
'className' = 'users_infos',
'foreignKey' = 'users_id'
   )
  );
  var $hasMany = array(
   'UsersIps' = array(
'className' = 'users_ips',
'foreignKey' = 'users_id'
   ),
   'UsersStats' = array(
'className' = 'users_stats',
'foreignKey' = 'users_id'
   ),
   'UsersSkills' = array(
'className' = 'users_skills',
'foreignKey' = 'users_id'
   ),
   'UsersBuildings' = array(
'className' = 'users_buildings',
'foreignKey' = 'users_id'
   ),
   'UsersItems' = array(
'className' = 'users_items',
'foreignKey' = 'users_id'
   ),
   'UsersMinerals' = array(
'className' = 'users_minerals',
'foreignKey' = 'users_id'
   )
  );
  
  public $validate = array(
   'username' = array(
'required' = array(
 'rule' = array('notEmpty'),
 'message' = 'Please enter a Username'
),
'isUnique' = array(
 'rule' = array('isUnique'),
 'on' = array('create'),
 'message' = 'This Username is already taken, please choose another'
)
   ),
   'password' = array(
'required' = array(
 'rule' = array('notEmpty'),
 'message' = 'Please enter a Password'
),
'minLength' = array(
 'rule' = array('minLength', '6'),
 'message' = 'Your Password must be a minimum of 6 characters long'
)
   )
  );


 *UserInfo Model *

 class UserInfo extends AppModel {
  public $name = 'UsersInfos';
  public $useTable = 'users_infos';
  
  public $belongsTo = array(
   'Users' = array(
'className' = 'Users',
'foreignKey' = 'users_id'
   )
  );
  
  public $validate = array(
   'first_name' = array(
'required' = array(
 'rule' = array('notEmpty'),
 'message' = 'Please enter your First Name'
)
   ),
   'last_name' = array(
'required' = array(
 'rule' = array('notEmpty'),
 'message' = 'Please enter your Last Name'
)
   ),
   'email' = array(
'required' = array(
 'rule' = array('notEmpty'),
 'message' = 'Please enter your Email'
),
'email' = array(
 'rule' = array('email'),
 'message' = 'Please enter a valid Email'
),
'isUnique' = array(
 'rule' = array('isUnique'),
 'on' = array('create'),
 'message' = 'This Email is already taken, duplicate accounts are not 
 allowed'
)
   ),
   'age' = array(
'required' = array(
 'rule' = array('notEmpty'),
 'message' = 'Please select your Age'
)
   ),
   'sex' = array(
'required' = array(
 'rule' = array('notEmpty'),
 'message' = 'Please select your Sex'
)
   ),
   'location' = array(
'required' = array(
 'rule' = array('notEmpty'),
 'message' = 'Please enter your General Location'
)
   ),
   'race_id' = array(
'required' = array(
 'rule' = array('notEmpty'),
 'message' = 'Please select your Race'
)
   )
  );


 *Create Account Form*

  echo $this-Session-flash();
echo $this-Form-create('User');
echo $this-Form-input('User.username', array(
  'label' = 'User:br'
 )
);
echo $this-Form-input('User.password', array(
  'label' = 'Pass:br' 
 )
);
echo $this-Form-input('UsersInfos.first_name', array(
  'label' = 'First Name:br'
 )
);
echo $this-Form-input('UsersInfos.last_name', array(
  'label' = 'Last Name:br'
 )
);
echo $this-Form-input('UsersInfos.email', array(
  'label' = 'Email:br'
 )
); 
echo $this-Form-input('UsersInfos.age', array(
  'type

Validating multiple models in one form

2012-12-10 Thread Robert Hunt
Hi All,

I hope someone can help clear this up for me.

Basically I have two models producing fields in a form but when saving it 
only validates the parent model.

I have attempted to use saveAssociated and I have tried validating the data 
on a per model basis with no success.

Here is my code:

*User Model*

 class User extends AppModel {
  public $name = 'Users';
  var $hasOne = array(
   'UsersInfos' = array(
'className' = 'users_infos',
'foreignKey' = 'users_id'
   )
  );
  var $hasMany = array(
   'UsersIps' = array(
'className' = 'users_ips',
'foreignKey' = 'users_id'
   ),
   'UsersStats' = array(
'className' = 'users_stats',
'foreignKey' = 'users_id'
   ),
   'UsersSkills' = array(
'className' = 'users_skills',
'foreignKey' = 'users_id'
   ),
   'UsersBuildings' = array(
'className' = 'users_buildings',
'foreignKey' = 'users_id'
   ),
   'UsersItems' = array(
'className' = 'users_items',
'foreignKey' = 'users_id'
   ),
   'UsersMinerals' = array(
'className' = 'users_minerals',
'foreignKey' = 'users_id'
   )
  );
  
  public $validate = array(
   'username' = array(
'required' = array(
 'rule' = array('notEmpty'),
 'message' = 'Please enter a Username'
),
'isUnique' = array(
 'rule' = array('isUnique'),
 'on' = array('create'),
 'message' = 'This Username is already taken, please choose another'
)
   ),
   'password' = array(
'required' = array(
 'rule' = array('notEmpty'),
 'message' = 'Please enter a Password'
),
'minLength' = array(
 'rule' = array('minLength', '6'),
 'message' = 'Your Password must be a minimum of 6 characters long'
)
   )
  );


*UserInfo Model *

 class UserInfo extends AppModel {
  public $name = 'UsersInfos';
  public $useTable = 'users_infos';
  
  public $belongsTo = array(
   'Users' = array(
'className' = 'Users',
'foreignKey' = 'users_id'
   )
  );
  
  public $validate = array(
   'first_name' = array(
'required' = array(
 'rule' = array('notEmpty'),
 'message' = 'Please enter your First Name'
)
   ),
   'last_name' = array(
'required' = array(
 'rule' = array('notEmpty'),
 'message' = 'Please enter your Last Name'
)
   ),
   'email' = array(
'required' = array(
 'rule' = array('notEmpty'),
 'message' = 'Please enter your Email'
),
'email' = array(
 'rule' = array('email'),
 'message' = 'Please enter a valid Email'
),
'isUnique' = array(
 'rule' = array('isUnique'),
 'on' = array('create'),
 'message' = 'This Email is already taken, duplicate accounts are not 
 allowed'
)
   ),
   'age' = array(
'required' = array(
 'rule' = array('notEmpty'),
 'message' = 'Please select your Age'
)
   ),
   'sex' = array(
'required' = array(
 'rule' = array('notEmpty'),
 'message' = 'Please select your Sex'
)
   ),
   'location' = array(
'required' = array(
 'rule' = array('notEmpty'),
 'message' = 'Please enter your General Location'
)
   ),
   'race_id' = array(
'required' = array(
 'rule' = array('notEmpty'),
 'message' = 'Please select your Race'
)
   )
  );


*Create Account Form*

  echo $this-Session-flash();
echo $this-Form-create('User');
echo $this-Form-input('User.username', array(
  'label' = 'User:br'
 )
);
echo $this-Form-input('User.password', array(
  'label' = 'Pass:br' 
 )
);
echo $this-Form-input('UsersInfos.first_name', array(
  'label' = 'First Name:br'
 )
);
echo $this-Form-input('UsersInfos.last_name', array(
  'label' = 'Last Name:br'
 )
);
echo $this-Form-input('UsersInfos.email', array(
  'label' = 'Email:br'
 )
); 
echo $this-Form-input('UsersInfos.age', array(
  'type' = 'select',
  'options' = array_combine(range(14,100), range(14,100)),
  'label' = 'Select Your Age:br',
  'empty' = 'Your Age'
 )
);
echo $this-Form-input('UsersInfos.sex', array(
  'type' = 'select',
  'options' = array(
   'm' = 'Male',
   's' = 'Female'
  ),
  'label' = 'Select Your Sex:br',
  'empty' = 'Your Sex'
 )
);
echo $this-Form-input('UsersInfos.location', array(
  'label' = 'Location:br'
 )
);
// TODO : generate $raceIDs variable using race table
$raceIDs = array(0 = 'Terran', 1 = 'Nexus');
echo $this-Form-input('UsersInfos.race_id', array(
  'type' = 'select',
  'options' = $raceIDs,
  'label' = 'Choose Your In-Game Race:br',
  'empty' = 'Choose Your Race'
 )
);
echo $this-Form-submit('Go!', array(
  'class' = 'btn'
 )
); 
echo $this-Form-end();


*Create Account Action*

  public function createAccount() {
   if ($this-request-is('post') || $this-request-is('put')) {
$this-User-create();
$this-loadModel('UserInfo');
$dbo = $this-User-getDataSource();
$now = $dbo-expression('NOW()');
$this-request-data['UsersInfos']['date_created'] = 

Progressive PHP to CakePHP

2012-10-16 Thread Robert Haylor
Hi All, 

Hope all is well. 

Quick question, I have been working on a website in a Progressive capacity 
and I'd like to look at moving it over to CakePHP, what I'd like to know is 
it possible to use the progressive PHP that I have thus far and make it 
Object Orientated??  

If anyone could get back to me that would be great. 

Cheers

Rob

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: xml format problem

2012-10-15 Thread Robert Gravel
Still cant figure it out so I hard coded the xml. I see in cake 2.xx that
there are some methods for this.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




xml format problem

2012-10-14 Thread Robert Gravel
Hello i am using 1.3

I am trying to get this format from my array.

array(
'Response' = array(
  'Sms' = 'Thank you!',
)
  )

response
SmsThank you!/Sms
/response

but after trying (see below) I can't get that output. Is there a way to do 
this?


?php 
echo $this-Xml-header(); 
echo $this-Xml-serialize($response); 
? 

?xml version=1.0 encoding=UTF-8 ?
  response Sms=Thank you! /

and

?php
echo $this-Xml-header();
echo $xml-serialize($response, array('format' = 'tags'));
?


?xml version=1.0 encoding=UTF-8 ?
- response
- Sms
- ![CDATA[ Thank you!
  ]]
  /Sms
  /response

Thanks Robert

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: xml format problem

2012-10-14 Thread Robert Gravel
 I do not need the extra   CDATA markup . I only need the Response and
Sms open and close tags along with my text

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




CORS Request Handling

2012-09-19 Thread Robert
Hello All,

I'm in the process of getting CORS (Cross-Origin Resource Sharing) for my 
API which is done using CakePHP (duh!) and I wanted to know if anyone had 
any insight as to where the best place was to put the CORS header responses.

I currently have a really hacked up bunch of code at the top of my 
bootstrap.php file, which is probably *not* where it's supposed to be.

I'm thinking the CORS handling should be broken out into a component 
similar to the Security component.

Thoughts?

More information regarding CORS can be found here: 
https://developer.mozilla.org/en-US/docs/HTTP_access_control

-- 
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: hasMany through - how to retrieve my data?

2012-09-19 Thread Robert Gravel
Maybe linkable will help you. https://github.com/Terr/linkable

Robert

-- 
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: if statement

2012-08-31 Thread Robert Gravel
just in case you are unaware in core.php

Configure::write('debug', 2);

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: complex find()

2012-08-31 Thread Robert Gravel
Needs cleanup and have to put in model. I had to call it on the user
model.
looped thru results and built a new array of user id's. passed array as
condition to paginate.

$from =  $this-data['User']['start_date']['year'] . - .
$this-data['User']['start_date']['month'] . - .
$this-data['User']['start_date']['day'];
$to =  $this-data['User']['end_date']['year'] . - .
$this-data['User']['end_date']['month'] . - .
$this-data['User']['end_date']['day'];
$cond = array('Attendance.created BETWEEN ? AND ?' = array($from,
$to), 'Attendance.school_id' = $session_school_id);
$classes_from_form =  $this-data['User']['type'];
$user_list  = array();
$users = $this-User-find('all', array('contain' =
array('Attendance' = array('conditions' = $cond), 'Usermembership' )));
foreach($users as $user){
$count = 0;
$user_id = $user['User']['id'];
foreach($user['Attendance'] as $attendance){
if(($attendance['user_id'] == $user_id) 
(isset($user['Usermembership']))){
foreach($user['Usermembership'] as $membership){
//check for a valid membership
if(($membership['status'] == 1) 
($membership['end_date'] =  date('Y-m-d'))){
$count++;
if($count == $classes_from_form){
//build array of user id's
$user_list[]= $user['User']['id'];
}
}
}
}
}
}
$cond3 = array('User.id' = $user_list);
$this-set('attendances', $this-paginate($cond3));

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: complex find()

2012-08-30 Thread Robert Gravel
Thank you. Yes the field is valid. both created and school_id

here are my models

user:
var $hasMany = array(
'Attendance' = array(
'className' = 'Attendance',
'foreignKey' = 'user_id',
'dependent' = false,
'conditions' = '',
'fields' = '',
'order' = '',
'limit' = '',
'offset' = '',
'exclusive' = '',
'finderQuery' = '',
'counterQuery' = ''
),

attendance:

var $belongsTo = array(
'User' = array(
'className' = 'User',
'foreignKey' = 'user_id',
'conditions' = '',
'fields' = '',
'order' = ''
),

Robert

On Wed, Aug 29, 2012 at 12:37 PM, Mancho manchomur...@gmail.com wrote:

 Are you sure the field exists in the database?

 --
 Murgan, Alexis Germán
 Desarrollador  Diseñador
 Web: german.murgan.com.ar
 Email: ger...@murgan.com.ar
 MSN: ger...@murgan.com.ar
 Móvil: +5493424663813

 --
 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.
 Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: complex find()

2012-08-30 Thread Robert Gravel
Hmm does not seem to work.  This is now what I am working on.

As a test I ran this on my User Controller that has the related Attendance

$users = $this-User-find('all', array('contain' = 'Attendance.school_id
= 2'));

Instead of returning all user records that related Attendance.school_id =
2 it gives me every user in the database.
And oddly for the records that do have attendance records the attendance is
blank in every record.
example:

[86] = Array
(
   [User] = Array
(
[id] = 960
[group_id] = 2
[last_name] = Camier
[school_id] = 1
)

[Attendance] = Array
(
)

)

[87] = Array
(
[User] = Array
(
[id] = 961
[group_id] = 2
[last_name] = Miccio
[school_id] = 1
)

[Attendance] = Array
(
)

)

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: complex find()

2012-08-30 Thread Robert Gravel
Maybe I am confused how containable works. I want to return only those user
records whose associated attendance match.

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: complex find()

2012-08-30 Thread Robert Gravel
Understood. Thank you...
Only problem I have is that now the structure is not desirable to test if a
user has the correct amount of attendances as set in the form.
Returned data example:

Array
(
[0] = Array
(
[Attendance] = Array
(
[id] = 85
[created] = 2012-08-28
[modified] = 2012-08-29 06:27:04
[user_id] = 129
[program_id] = 1
[school_id] = 1
)

[User] = Array
(
[id] = 129

)
)

[1] = Array
(
[Attendance] = Array
(
[id] = 84
[created] = 2012-08-26
[modified] = 2012-08-29 06:25:18
[user_id] = 107
[program_id] = 1
[school_id] = 1
)

[User] = Array
(
[id] = 107

)
)

[2] = Array
(
[Attendance] = Array
(
[id] = 83
[created] = 2012-08-25
[modified] = 2012-08-29 06:24:53
[user_id] = 128
[program_id] = 1
[school_id] = 1
)

[User] = Array
(
[id] = 128
)
)

[3] = Array
(
[Attendance] = Array
(
[id] = 81
[created] = 2012-08-28
[modified] = 2012-08-29 03:30:59
[user_id] = 107
[program_id] = 1
[school_id] = 1
)

[User] = Array
(
[id] = 107
)
)





For example if $form_attendance = 2  I would like to do a simple foreach on
the attendance to see if the count matches $form_attendance. In the format
that is returned I do not now how to do this :(

Thank you
Robert

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: complex find()

2012-08-30 Thread Robert Gravel
ok figured it out now..
thanks lowpass

robert

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: complex find()

2012-08-30 Thread Robert Gravel
Forgot to add
$this-User-Behaviors-attach('Containable');

wouldn't work without it

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Tutorial for REST API user create and authenticate?

2012-08-13 Thread Robert Love
Nathan. Is that you? :)

Have you tried this http://book.cakephp.org/2.0/en/development/rest.html

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Newbie - Resources

2012-08-10 Thread Robert Haylor
Hi All, 

Quick question, I am new to the concept of CakePHP and was just wondering 
if anyone could recommend some great books or resources which will be ideal 
for a beginner  - I'm currently following the tutorial on the CakePHP 
website but any advice would be great.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Redirect www to non-www

2012-04-13 Thread Angel Robert Marquez
it's nice to see developers share information without being total douche
bags.

On Fri, Apr 13, 2012 at 3:50 PM, Justin Edwards justinledwa...@gmail.comwrote:

 You may also create another vhost for a catchall for whatever things you
 might want to redirect there, and give it a 301 to where you do want them
 to go.   I do things like this to force https, or add the www


 On Fri, Apr 13, 2012 at 5:29 PM, lowpass zijn.digi...@gmail.com wrote:

 On Fri, Apr 13, 2012 at 9:43 AM, kdubya kenwin...@winanstech.com wrote:
  I have always made rewrite rule changes in the /site/.htacess file
  exclusively.
 
  I don't really know why the  /site/app/.htaccess (or for that matter
  /site/app/webroot/.htaccess) files exist. I can't even dream up a
 scenario
  where those files would ever be applied - as long as the /site/.htaccess
  file exists.

 It depends on what the DocumentRoot is set to. Of course, if one has
 the ability to set it to /path/to/site/app/webroot in the main config
 then the rewrite rules can be placed there and all .htaccess files
 removed for better performance.

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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


  --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


CakePHP Developer at Pollenizer (Sydney, Australia)

2011-11-16 Thread Robert Love
Dear Bakers

I'm the Head of Engineering at Pollenizer in Sydney, Australia and I'm
looking for three people just like you. Check out the details for the
role and apply online on the Pollenizer website here:

http://www.pollenizer.com/about/jobs/php-developer/

Cheers,
Robert

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: CakePHP 2.0 Component Merging

2011-10-04 Thread Robert
OddI'll start from scratch and manually port over all my code
piece by piece to ensure functionality.

On Oct 4, 12:23 pm, mark_story mark.st...@gmail.com wrote:
 As far as I know, and based on what the tests say, the $components
 property is still being merged with AppController/
 PluginAppController.  Based on a simple test I just did it worked for
 me as well.

 -Mark

 On Oct 3, 12:24 am, Robert crsh...@gmail.com wrote:







  Yep, I saw that. I have the Auth component defined in the components
  array of my AppController. My UsersController inherits the
  AppController, so shouldn't the components array from the
  AppController be merged into the components array in the
  UsersController?

  On Oct 3, 12:07 am, Andras Kende and...@kende.com wrote:

   Try this:http://book.cakephp.org/2.0/en/controllers/components.html

   Andras

   On Oct 2, 2011, at 10:56 PM, Robert wrote:

Hey All,

Was there a change in the way that components are loaded up in
controllers? I looked at the source and didn't notice anything
different between 1.3 and 2.0 surrounding this.

I pasted my 1.3 source into a 2.0 directory structure and I'm in the
process of re-cake-ifying itand in my Users controller I have
$this-Auth-allow() being called in beforeFilter. With that, cake
complains Fatal error: Call to a member function allow() on a non-
object because the Auth component isn't loaded.

However, I have verified that it is loaded in AppController (the
parent controller), shouldn't the two components arrays be merged?

This works in 1.3, I literally did a copy and paste of the app code.

--
Our newest site for the community: CakePHP Video 
Tutorialshttp://tv.cakephp.org
Check out the new CakePHP Questions 
sitehttp://ask.cakephp.organdhelpothers with their CakePHP related 
questions.

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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


CakePHP 2.0 Component Merging

2011-10-02 Thread Robert
Hey All,

Was there a change in the way that components are loaded up in
controllers? I looked at the source and didn't notice anything
different between 1.3 and 2.0 surrounding this.

I pasted my 1.3 source into a 2.0 directory structure and I'm in the
process of re-cake-ifying itand in my Users controller I have
$this-Auth-allow() being called in beforeFilter. With that, cake
complains Fatal error: Call to a member function allow() on a non-
object because the Auth component isn't loaded.

However, I have verified that it is loaded in AppController (the
parent controller), shouldn't the two components arrays be merged?

This works in 1.3, I literally did a copy and paste of the app code.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: CakePHP 2.0 Component Merging

2011-10-02 Thread Robert
Yep, I saw that. I have the Auth component defined in the components
array of my AppController. My UsersController inherits the
AppController, so shouldn't the components array from the
AppController be merged into the components array in the
UsersController?

On Oct 3, 12:07 am, Andras Kende and...@kende.com wrote:
 Try this:http://book.cakephp.org/2.0/en/controllers/components.html

 Andras

 On Oct 2, 2011, at 10:56 PM, Robert wrote:







  Hey All,

  Was there a change in the way that components are loaded up in
  controllers? I looked at the source and didn't notice anything
  different between 1.3 and 2.0 surrounding this.

  I pasted my 1.3 source into a 2.0 directory structure and I'm in the
  process of re-cake-ifying itand in my Users controller I have
  $this-Auth-allow() being called in beforeFilter. With that, cake
  complains Fatal error: Call to a member function allow() on a non-
  object because the Auth component isn't loaded.

  However, I have verified that it is loaded in AppController (the
  parent controller), shouldn't the two components arrays be merged?

  This works in 1.3, I literally did a copy and paste of the app code.

  --
  Our newest site for the community: CakePHP Video 
  Tutorialshttp://tv.cakephp.org
  Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help 
  others with their CakePHP related questions.

  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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Se Ya Cake..bake a dick cake frosting on your face...............

2011-09-11 Thread Robert Maiolo
meth is a hell of a drug

On Sun, Sep 11, 2011 at 12:33 AM, Matthew Kaufman mkfmn...@gmail.comwrote:

 LOL, Your subject line is ridiculous...


 On Sun, Sep 11, 2011 at 3:32 AM, Matthew Kaufman mkfmn...@gmail.comwrote:

 hahahahaha


 On Sun, Sep 11, 2011 at 3:30 AM, Raisen weys...@gmail.com wrote:

 Why are you comparing Cake to Drupal? Shouldn't you be comparing Cake to
 Django? Or Ruby on Rails? I don't see the point in your troll at all. Maybe
 you should had posted your message in the Joomla group.

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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



  --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Se Ya Cake..bake a dick cake frosting on your face...............

2011-09-11 Thread Angel Robert Marquez
Virtual squeeze KM. It'll be OK.

I will miss your scheduled seo optimized question strategy.

On Sun, Sep 11, 2011 at 12:33 AM, Matthew Kaufman mkfmn...@gmail.comwrote:

 LOL, Your subject line is ridiculous...


 On Sun, Sep 11, 2011 at 3:32 AM, Matthew Kaufman mkfmn...@gmail.comwrote:

 hahahahaha


 On Sun, Sep 11, 2011 at 3:30 AM, Raisen weys...@gmail.com wrote:

 Why are you comparing Cake to Drupal? Shouldn't you be comparing Cake to
 Django? Or Ruby on Rails? I don't see the point in your troll at all. Maybe
 you should had posted your message in the Joomla group.

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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



  --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Subquery or something else?

2011-08-23 Thread Robert Maiolo
I'd try an outer join


On Tue, Aug 23, 2011 at 11:23 AM, euromark dereurom...@googlemail.comwrote:

 although this will get quite slow with more and more ids and might
 consume a lot of memory some day
 depending on the size a subquery might some day be more suitable. but
 until then this 2-query will work fine.


 On 23 Aug., 13:44, Dwayne Hanekamp dwaynehanek...@gmail.com wrote:
  That worked, awesome!
 
  Thanks so much Jeremy!
 
  Dwayne
 
  On 23 aug, 12:48, Jeremy Burns | Class Outfit
 
 
 
 
 
 
 
  jeremybu...@classoutfit.com wrote:
   Do a find to get all the ids of the badges in the users_badges table.
 Then do $this-Badge-find('all', array('conditions' = array('NOT'
 array('Badge.id' = $badgeIds;
 
   Seehttp://book.cakephp.org/view/1030/Complex-Find-Conditionsandsearchfor 
   'NOT IN' on the page.
 
   Jeremy Burns
   Class Outfit
 
  http://www.classoutfit.com
 
   On 23 Aug 2011, at 11:43, Dwayne Hanekamp wrote:
 
Hello everyone,
I've been trying to work this out for the last couple of hours but it
isn't working.
I'm building an achievement system. So i have two tables:
 
Users_Badges and Badges (and ofc much more but they don't matter)
 
What i want is to make a find condition which only selects the badges
that don't
exist in the Users_Badges table.
 
I hope you all can help me.
 
Thanks in advance,
 
Dwayne
 
--
Our newest site for the community: CakePHP Video Tutorialshttp://
 tv.cakephp.org
Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
 others with their CakePHP related questions.
 
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

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Email Question

2011-08-19 Thread Robert Maiolo
you could request a return receipt but it's up to them to acknowledge it..


On Aug 19, 2011 2:16 PM, Krissy Masters naked.cake.ba...@gmail.com
wrote:
 I am sending out emails and I want to know that the person has opened it.
 How does one go about this? I have a link in the email they can click to
 view in browser and I can tell when that happens but as for straight email
 viewing I'm stumped.

 Not much detail in the question but I figure its rather straight to the
 point J



 Thanks everyone as I wait in anticipation for any help.



 K



 --
 Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.


 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


USE THE UNSUBSCRIBE LINK Re: REMOVE ME

2011-08-10 Thread Robert Maiolo
2011/8/10 János Vasbányai vasbanya...@gmail.com



 2011/8/11 cake-php+nore...@googlegroups.com

   Today's Topic Summary

 Group: http://groups.google.com/group/cake-php/topics

- Non-Cake form, PagesController and 
 Auth#131b73aa808ca5f0_131b6fb9c5b3381c_group_thread_0[1 Update]
- Why cake not build a good procedure for load components behaviour ,
help ? #131b73aa808ca5f0_131b6fb9c5b3381c_group_thread_1 [2 Updates]
- Error The requested document was not found on this 
 server#131b73aa808ca5f0_131b6fb9c5b3381c_group_thread_2[1 Update]
- small bug in auth 
 components#131b73aa808ca5f0_131b6fb9c5b3381c_group_thread_3[1 Update]
- Automatic filter by 
 site#131b73aa808ca5f0_131b6fb9c5b3381c_group_thread_4[1 Update]
- cakephp select option stored as 0 in database instead of selected
value #131b73aa808ca5f0_131b6fb9c5b3381c_group_thread_5 [1 Update]

   Topic: Non-Cake form, PagesController and 
 Authhttp://groups.google.com/group/cake-php/t/853a7891d495fe0e

BrendonKoz brendon...@hotmail.com Aug 10 02:34PM -0700 
 ^#131b73aa808ca5f0_131b6fb9c5b3381c_digest_top

I've checked the rendering of the form. There are no hidden form
fields
related to the security component since I'm not using the form helper.
I'm
not sure how to check which components are loaded during the rendering
of a
view (any ideas?). There are (found from a pr($this)) session
limitations,
but from what I can see the expiration time when security is set to
medium
on my site is approximately 1hr 40m. The user's session should not
expire
for 3hr 50m. According to employees, it was failing after 20-30
minutes.

It was described that upon submitting the form that the user would be
forcefully logged out and sent back to the login page. This is the
only page
on the entire site that seems to have generated this type of issue.

I've been unable to reproduce this in any tests.

Does anyone have any ideas as to where I could look?



   Topic: Why cake not build a good procedure for load components
 behaviour , help 
 ?http://groups.google.com/group/cake-php/t/17736169caa94e2b

euromark dereurom...@googlemail.com Aug 10 08:08AM -0700 
 ^#131b73aa808ca5f0_131b6fb9c5b3381c_digest_top

as far as I know, this is already done this way.
they will be joined between AppController PluginAppController
Controller in this order
or did you experience it otherwise?
it would surprise me because it works this way since several years in
my apps.






vcrack vcrack.0...@gmail.com Aug 10 10:31AM -0700 
 ^#131b73aa808ca5f0_131b6fb9c5b3381c_digest_top

I known it's possible.. but, do you think that your plugin is
dependent with AppController ?
and you must know the AppController if you would make a
PLuginAppController ?

If CMS projects plugin develop by others and core by authors...
So if PluginOneAppController joined with AppController.. developer
plugin never know my AppController?

it's will be loss couple if cake create a function for Hook
components, helper..
and each plugin never have dependent with core app.. :-)

thanks in advance..

Jan




   Topic: Error The requested document was not found on this 
 serverhttp://groups.google.com/group/cake-php/t/a17e8552cc0599eb

hiepsykhongdau phamthunga.lavender1...@gmail.com Aug 10 04:29AM
-0700 ^ #131b73aa808ca5f0_131b6fb9c5b3381c_digest_top

Hi all,
I just installed a CakePHP app on server of Plesk 9.0.1 for Microsoft
window and a strange thing happened.
When i tried to click any link in my site on a new browser window
and it said Not Found - The requested document was not found on this
server.
Besides, webroot does n't work ( no CSS, JS and img).
I tested code on free host Byethost and runs good and updated data are
generally used to be.
I loged into Plesk control panel and enable permission for Plesk
IIS User to full control but error above still appears.
Does anybody have an idea why this is happening and how I can resolve
it?

Thanks in advance for your nice help



   Topic: small bug in auth 
 componentshttp://groups.google.com/group/cake-php/t/72fff2451dc31117

Inteiro j...@inteiro.be Aug 10 12:51AM -0700 
 ^#131b73aa808ca5f0_131b6fb9c5b3381c_digest_top

Try

$this-Auth-fields['username'] = 'email';






   Topic: Automatic filter by 
 sitehttp://groups.google.com/group/cake-php/t/e68c5834d4496798

João Rodrigues jvrodrig...@gmail.com Aug 10 04:26PM +0100 
 ^#131b73aa808ca5f0_131b6fb9c5b3381c_digest_top

I want to make my application be aware of the url.
I have created a table of sites (id, url) and a table of news (id,
site_id,
etc.)
so I can get different news depending on the subdomain.
For example, economy news go in economy,example.com, sports news go in
sports.example.com
I also have more tables that have a 

What editor?

2011-06-19 Thread Robert

What editor or IDE do you find has the best CakePHP integration?

--
Robert


--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.



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


Passing fusion chart csv via javascript to a cake controller

2011-05-31 Thread Angel Robert Marquez
I need to export a csv file from fusion charts and pass the data to a cake
controller function via javascript/jquery.

*HTML*
lia href=javascript:void(0) id=*downloadCsv*
class=userFunctionsButtonDownload CSV/a/li

*JS*
$(function(){
$('#*downloadCsv*').click(function(){
var myChart = FusionCharts('myChartId3');

var data = myChart.getDataAsCSV();

data = data.replace(//g, '').replace(/\n/g, 'BREAK');
var url = PATH +'dashboard/getCsvReport/?'+ encodeURIComponent( data );

window.location = url;
});
});

*PHP*
function getCsvReport($chart_data){
   $filename = 'chart';

$data = str_replace('/', \n, $chart_data);

header(Content-type: application/force-download);
header(Pragma: no-cache);
header(Expires: 0);
header(Content-Disposition: attachment;
filename=\.$filename..csv\);

$this-layout = 'empty';
$this-render('/ajax/empty');

echo $data;
 }


The above only writes the first key value pair to the csv file. Turning on
the AllowEncodedSlashes in the apache config is not an option.

Any ideas? References for sending post data as a form submission or ajax
request.

Thank you in advance.

-a

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Passing fusion chart csv via javascript to a cake controller

2011-05-31 Thread Angel Robert Marquez
revised PHP code. apologize.

I need to export a csv file from fusion charts and pass the data to a cake
controller function via javascript/jquery.

*HTML*
lia href=javascript:void(0) id=*downloadCsv*
class=userFunctionsButtonDownload CSV/a/li

*JS*
$(function(){
$('#*downloadCsv*').click(function(){
var myChart = FusionCharts('myChartId3');

var data = myChart.getDataAsCSV();

data = data.replace(//g, '').replace(/\n/g, 'BREAK');
var url = PATH +'dashboard/getCsvReport/?'+ encodeURIComponent( data );

window.location = url;
});
});

*PHP*
function getCsvReport($chart_data){
   $filename = 'chart';
   $data = str_replace('BREAK', \n, $chart_data);

header(Content-type: application/force-download);
header(Pragma: no-cache);
header(Expires: 0);
header(Content-Disposition: attachment;
filename=\.$filename..csv\);

$this-layout = 'empty';
$this-render('/ajax/empty');

echo $data;
 }


The above only writes the first key value pair to the csv file. Turning on
the AllowEncodedSlashes in the apache config is not an option.

Any ideas? References for sending post data as a form submission or ajax
request.

Thank you in advance.

-a

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Earn $1000-$2500 per month

2011-05-24 Thread Robert J. Maiolo
thanks for the spam

On Mon, May 23, 2011 at 11:24 PM, rose anjel roseanje...@gmail.com wrote:

 Earn $1000-$2500 per month
 If you Register your name
 You Get Sign-up bonus $5
  AND
 Get $.20 cent for each referral.
 Further details
 
 http://www.earnbyforex.com/index.php?id=35678365


 

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


[CakePHP 1.3.8, TranslateBehavior, DboPostgres] Invalid result set

2011-05-04 Thread Robert
Hello,
I just have moved my project on CakePHP 1.3.8 from MySQL to PostgreSQL
8.3 and then Translate stopped working correctly.

Instead of:

[0] = Array
(
[Category] = Array
(
[id] = 3
[parent_id] =
[lft] = 1
[rght] = 2
[locale] = pol
[name] = Start
[description] = Tutaj opis
)
   ...

I have received:

[0] = Array
(
[Category] = Array
(
[id] = 3
[parent_id] =
[lft] = 1
[rght] = 2
[locale] = pol
[name] =
[description] =
)

[I18n] = Array
(
[name] = Start
[description] = Tutaj opis
)
...

SQL code generated by Cake:

SELECT
   Category.id AS Category__id,
   Category.parent_id AS Category__parent_id,
   Category.lft AS Category__lft,
   Category.rght AS Category__rght,
   I18n__name.content AS I18n__name__content,
   I18n__description.content AS I18n__description__content
FROM cms_categories AS Category
LEFT JOIN i18n AS I18n__name
   ON (Category.id = I18n__name.foreign_key
  AND I18n__name.model = 'Category'
  AND I18n__name.field = 'name')
LEFT JOIN i18n AS I18n__description
   ON (Category.id = I18n__description.foreign_key
  AND I18n__description.model = 'Category'
  AND I18n__description.field = 'description')
WHERE I18n__name.locale = 'pol'
   AND I18n__description.locale = 'pol'
ORDER BY Category.lft ASC

After some debug work I found reason in method
DboPostgres::resultSet(). Name of the column for description field
translation is I18n__description__content. DboPostgres::resultSet()
method incorrectly parses table name and field name from this string
as I18n and description instead of I18n__description and
content. In the end, method creates invalid result array and
TranslateBehavior does not detect the translation.

Code:
...
if (strpos($columnName, '__')) {
   $parts = explode('__', $columnName);
   $this-map[$index++] = array($parts[0], $parts[1]);
} ...

I propose the following solution:
...
$pos = strrpos($columnName, '__');
if ($pos !== false) {
   $table_name = substr($columnName, 0, $pos);
   $column_name = substr($columnName, $pos+2, strlen($columnName));
   $this-map[$index++] = array($table_name, $column_name);
} ...

Solution is to split $columnName at the last occurrence of __
separator, not every like in original code.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: How do you do it?

2011-04-18 Thread Angel Robert Marquez
I had it in a lightbox which worked fine but everyone and their brother
has a lightbox and its just so played out.

This is the equivalent to saying 'toilet paper is played out'.

wtf.

On Mon, Apr 18, 2011 at 1:29 PM, Samuel Infante sinfa...@redvel.cl wrote:

 I can think of three options:

 1. Lightbox: very simple, a lot of people uses it for that reason and
 also it doesn't look bad.
 2. Going back and forth: Annoying, as you stated.
 3. Edit it right there: make the ajax upload of a pic and load it
 into a thumb size box (all in the same page) make the user to move the
 picture to get the thumb result and if you want to get fancy put a + -
 so they can zoom. I think this might be the thing you are looking for
 but I think it will be REALLY difficult to accomplish.

 Just my thoughts...

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: How do you do it?

2011-04-18 Thread Angel Robert Marquez
actually all i said is there is an obvious solution that is used by many
making in your juvenile speak 'played out'.

i'm all for innovating when needed; but, I am certainly against making
something that was a good idea that has been overly produced by it's own
accord being labeled something like played out. it's not the light
boxes fault that so many people use it.

do you not like the beatles either, krissy?


On Mon, Apr 18, 2011 at 2:28 PM, Krissy Masters
naked.cake.ba...@gmail.comwrote:

 Yes that’s exactly what I am saying! WTF! That’s no answer to the question
 WTF!

 But for those who love to go to the extreme WTF! WTF LOL ROTHL and all the
 other foolish juvenile text generation lingo you like to add.



 What I should say is that is clearly over used on because of its ease to
 use sure throw it in a lightbox is the EASY answer but there are people out
 there that do like to try new things and maybe try to come up with something
 new rather than just the obvious.

 Lets just put everything in a lightbox and never come up with anything new.


 Stop thinking and asking questions to alternative solutions since you seem
 to think a lightbox is the be all and end all flavor of the web can’t go
 wrong with it answer for every situation.

 Ok good stuff.



 This is the equivalent of saying ”since everyone is doing it I will too…why
 think for myself!”



 K



 *From:* cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] *On
 Behalf Of *Angel Robert Marquez
 *Sent:* Monday, April 18, 2011 6:38 PM
 *To:* cake-php@googlegroups.com
 *Subject:* Re: How do you do it?



 I had it in a lightbox which worked fine but everyone and their brother
 has a lightbox and its just so played out.



 This is the equivalent to saying 'toilet paper is played out'.



 wtf.



 On Mon, Apr 18, 2011 at 1:29 PM, Samuel Infante sinfa...@redvel.cl
 wrote:

 I can think of three options:

 1. Lightbox: very simple, a lot of people uses it for that reason and
 also it doesn't look bad.
 2. Going back and forth: Annoying, as you stated.
 3. Edit it right there: make the ajax upload of a pic and load it
 into a thumb size box (all in the same page) make the user to move the
 picture to get the thumb result and if you want to get fancy put a + -
 so they can zoom. I think this might be the thing you are looking for
 but I think it will be REALLY difficult to accomplish.

 Just my thoughts...


 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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



 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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

  --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: How do you do it?

2011-04-18 Thread Angel Robert Marquez
On Mon, Apr 18, 2011 at 2:51 PM, Krissy Masters
naked.cake.ba...@gmail.comwrote:

 The Beatles? Do they have their own light box? Perhaps we could make a
 light box with Beatles theme and every site on the web could use it! Wow
 that would be heaven!

Unfortunately I'm not big on sales and marketing initiatives even thought
those are the types of goals that keep my pockets fed. Sounds kinda greedy
and played out.



 Do we all have to like them?

of course not.


 Does it matter if I do or do not?

 no.



 Should every radio station play them?

no

 Perhaps a variety is nice, not sure if you are in a communist country where
 you do not have the freedom to choose and if your forced to listen to the
 Beatles all day then that’s just the way it is.

 You might be right.

But other than being not relevant to anything I was referring to I was
 simply asking for an opinion on options other than light box because yes I
 do think it is used “in excess” and simply placing everything inside of 1 is
 not the quick and dirty answer I was looking for.

I agree.



 But anyways in all seriousness if I offended you by saying my own opinion
 of what I think of the use of light box well I do apologize for hurting your
 feelings.

Well, it just seemed like you were using it to your advantage with your
presentational intent and everyone who uses one like you were running for
president or something. I don't want to feel awkward the next time someone
wants the lightbox.

cake should not allow the lightbox to be executed unless a check is made for
the amount of people using it at any one given time..?



 K



 *From:* cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] *On
 Behalf Of *Angel Robert Marquez
 *Sent:* Monday, April 18, 2011 7:08 PM

 *To:* cake-php@googlegroups.com
 *Subject:* Re: How do you do it?



 actually all i said is there is an obvious solution that is used by many
 making in your juvenile speak 'played out'.



 i'm all for innovating when needed; but, I am certainly against making
 something that was a good idea that has been overly produced by it's own
 accord being labeled something like played out. it's not the light
 boxes fault that so many people use it.



 do you not like the beatles either, krissy?





 On Mon, Apr 18, 2011 at 2:28 PM, Krissy Masters 
 naked.cake.ba...@gmail.com wrote:

 Yes that’s exactly what I am saying! WTF! That’s no answer to the question
 WTF!

 But for those who love to go to the extreme WTF! WTF LOL ROTHL and all the
 other foolish juvenile text generation lingo you like to add.



 What I should say is that is clearly over used on because of its ease to
 use sure throw it in a lightbox is the EASY answer but there are people out
 there that do like to try new things and maybe try to come up with something
 new rather than just the obvious.

 Lets just put everything in a lightbox and never come up with anything new.


 Stop thinking and asking questions to alternative solutions since you seem
 to think a lightbox is the be all and end all flavor of the web can’t go
 wrong with it answer for every situation.

 Ok good stuff.



 This is the equivalent of saying ”since everyone is doing it I will too…why
 think for myself!”



 K



 *From:* cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] *On
 Behalf Of *Angel Robert Marquez
 *Sent:* Monday, April 18, 2011 6:38 PM
 *To:* cake-php@googlegroups.com
 *Subject:* Re: How do you do it?



 I had it in a lightbox which worked fine but everyone and their brother
 has a lightbox and its just so played out.



 This is the equivalent to saying 'toilet paper is played out'.



 wtf.



 On Mon, Apr 18, 2011 at 1:29 PM, Samuel Infante sinfa...@redvel.cl
 wrote:

 I can think of three options:

 1. Lightbox: very simple, a lot of people uses it for that reason and
 also it doesn't look bad.
 2. Going back and forth: Annoying, as you stated.
 3. Edit it right there: make the ajax upload of a pic and load it
 into a thumb size box (all in the same page) make the user to move the
 picture to get the thumb result and if you want to get fancy put a + -
 so they can zoom. I think this might be the thing you are looking for
 but I think it will be REALLY difficult to accomplish.

 Just my thoughts...


 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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



 --

 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http

Re: How do you do it?

2011-04-18 Thread Angel Robert Marquez
the clock is ticking...
..
.

it is interesting that a different shade of box light is rather scarce as
well.

On Mon, Apr 18, 2011 at 4:47 PM, cricket zijn.digi...@gmail.com wrote:

 On Mon, Apr 18, 2011 at 6:03 PM, Angel Robert Marquez
 angel.marq...@gmail.com wrote:
  cake should not allow the lightbox to be executed unless a check is made
 for
  the amount of people using it at any one given time..?

 I read somewhere that Richard Stallman is dead set against the
 lightbox. Cake should follow his lead and announce a no-lightbox
 policy going forward in 2.0.

 I'll give Larry Masters exactly one hour to set the record straight
 before I post a vitriolic screed on /. denouncing CakePHP's posture on
 the lightbox.

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: How do you do it?

2011-04-18 Thread Angel Robert Marquez
: )
( :

ask the economist to do a comparison against the door knob, the wind shield
wiper and the lightbox.

the lightbox is definitely not the new black...

i agree with krissy ? masters. the first interview i just got up and walked
out on a guy that didn't know sh*t from shinola asked me how I would write a
lightbox from scratch. i was thinking in my head you should be worrying
about all the 50megabyte images on your sire before you start with that jazz
bro. why would i not use 1 of the billions of lb libs out there. i am all
for from scratch but in a realistic b*ll crushing hierarchic of corporate
pigs..you/they're getting the fancybox-latest with a custom button. wanted
it yesterday etc...

On Mon, Apr 18, 2011 at 5:59 PM, cricket zijn.digi...@gmail.com wrote:

 On Mon, Apr 18, 2011 at 8:22 PM, Angel Robert Marquez
 angel.marq...@gmail.com wrote:
  the clock is ticking...

 Change in plan. I've convinced The Economist to allow me to
 guest-editorial on the subject of the lightbox. I plan to excoriate
 the current state of demoralized apathy that Web 2.0 has become with
 its dependence on the lightbox to get anything done. I contacted The
 Register first but they told me the lightbox was so last year, then
 suggested I call The Onion instead (they were being mean).

  it is interesting that a different shade of box light is rather scarce as
  well.

 Conformity. It's dragging us all down.

 (I'm laughing with you, btw. I'd have included a :-) or a LOL but ...
 well, that seems so juvenile.)

 :-)

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: You favorite IDE/ Dev Setup?

2011-04-05 Thread Angel Robert Marquez
fedora, mac os
terminal, terminator
vim, gedit
git


On Tue, Apr 5, 2011 at 8:07 PM, Krissy Masters
naked.cake.ba...@gmail.comwrote:

 Is this going to go on forever?

 nGinX Apache, mySql, Post Cake, 5 foot 8, speak English, right handed, shoe
 size 8..

 Whats you favorite screen resolution next?
 What time zone are most Cake developers in?

 Is there a point to all this? Someone keeping track and going to release a
 mind blowing stats report? Was there a real question or debate or help
 needed for the individual who first asked or is this just an ongoing ever
 ending question with no real purpose only to fill everyones inbox on  a
 daily basis?

 Time to kill this thread perhaps?

 My 2 cents anyways.

 K
 -Original Message-
 From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On
 Behalf
 Of thom
 Sent: Wednesday, April 06, 2011 12:15 AM
 To: cake-php@googlegroups.com
 Subject: Re: You favorite IDE/ Dev Setup?

 Win XP
 Servers: Apache
 DB: MySql
 FW: Cakephp


 --
 Regards,,,
 mastanto
 http://www.mastanto.com
 http://thom-sharing.blogspot.com

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: i'm newbie

2011-03-22 Thread Robert Bodley
Hi I'm also a Newbie can someone please expain how the function pages
work iv scene other peoples code and they have a file with all
function for the index page and all the pages can someone please
explain how this works thanks

On Mar 22, 3:34 pm, Stephen step...@ninjacodermonkey.co.uk wrote:
 *Create:*
 /app/views/pages/helloworld*.ctp* (not .html)

 *Visit:*http://localhost/pages/helloworld

 On 22 March 2011 02:11, aji ipank aji.ipank.m...@gmail.com wrote:





  Hello all.. I want to learn about cakephp.. i've installed cakephp and
  no problem at all.. but now, i have one problem. i make hello world
  html file and i put it into app/views/pages. then i load it via
  localhost, but no hello world in my browser. can you help me? what was
  wrong? reply please..

  --
  Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
  Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
  others with their CakePHP related questions.

  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

 --
 Kind Regards
  Stephen

  http://www.ninjacodermonkey.co.uk

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


setting up cakephp HELP please

2011-03-22 Thread Robert Bodley
Hi everyone

im new to cake and i set up cake with all the thing required and that
all right (i watched a few youtube videos) but when i put a bit of php
like
?php

echo hello world;

?

and save it as a test.ctp in the folder views it always comes up with
this error when i try and view it on the localhost

(Missing Controller
Error: Test.ctpController could not be found.

Error: Create the class Test.ctpController below in file: app
\controllers\test.ctp_controller.php

?php
class Test.ctpController extends AppController {

var $name = 'Test.ctp';
}
?
Notice: If you want to customize this error message, create app\views
\errors\missing_controller.ctp)

when i try view the file i go to this file http://localhost/cakephp/test.ctp
on my browser is this correct?

and im using xampp localhost

any suggestions to fix this?


thanks a lot help will be appreciated

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


setting up cakephp HELP please

2011-03-22 Thread Robert Bodley
Hi everyone

im new to cake and i set up cake with all the thing required and that
all right (i watched a few youtube videos) but when i put a bit of php
like
?php

echo hello world;

?

and save it as a test.ctp in the folder views it always comes up with
this error when i try and view it on the localhost

(Missing Controller
Error: Test.ctpController could not be found.

Error: Create the class Test.ctpController below in file: app
\controllers\test.ctp_controller.php

?php
class Test.ctpController extends AppController {

var $name = 'Test.ctp';
}
?
Notice: If you want to customize this error message, create app\views
\errors\missing_controller.ctp)

when i try view the file i go to this file http://localhost/cakephp/test.ctp
on my browser is this correct?

and im using xampp localhost

any suggestions to fix this?


thanks a lot help will be appreciated

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: login and register system

2011-03-22 Thread Robert Bodley
kk i will thaks

On Tue, Mar 22, 2011 at 9:07 PM, huoxito huox...@gmail.com wrote:

 i believe it would be best for you to read the cakephp manual at first and
 only after that try plugins

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: login and register system

2011-03-22 Thread Robert Bodley
thanks*

On Tue, Mar 22, 2011 at 9:24 PM, Robert Bodley borisbod...@gmail.comwrote:

 kk i will thaks


 On Tue, Mar 22, 2011 at 9:07 PM, huoxito huox...@gmail.com wrote:

 i believe it would be best for you to read the cakephp manual at first and
 only after that try plugins




-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


login and register system

2011-03-21 Thread Robert Bodley
hi,

I just started learning php and would like to know if anyone would
like or would help me build a login and register system

I would like the features to be:
•login, log out, register
• on the register page I would like a name, email, password, date of
birth, school, relationship status( in relation, complicated, open )

•And have email validation


And once the person has logged in show all the stuff in the register
form(name, email, date of birth, school, relationship status)

I would be very very greatful if you would help!!

Thanks
Rob

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


[OT] CakePHP presentation..

2011-03-20 Thread Robert J. Maiolo
Many thanks to Larry Masters, Jose Rodriguez and Graham Weldon for coming
out to LA last week ..

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Auto Increment A Field

2011-02-24 Thread Robert J. Maiolo
why not just retrieve the value, increment then update the field?

On Thu, Feb 24, 2011 at 11:09 PM, tubiz tayi...@gmail.com wrote:

 Please I would like to know how to auto increment a field in a table
 in my database. I want to to be incremented once the action is clicked
 upon.
 Thanks.

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: INVITATION TO JOB FAIR

2011-02-15 Thread Robert J. Maiolo
and this is why I hate joining email lists...

On Mon, Feb 14, 2011 at 6:30 AM, job fair job.fair1...@gmail.com wrote:

 AMA Business JOB FAIR on 26  27 Feb @ Palace Ground.Exp-0-7yrs.Onspot
 hiring upto 2000 JObs.Resume at resume@gmail.com.fwd IT 2 UR FRND


 Dear Friends
 AMA Business is organizing an IT job fair specially for fresher.
 Below are the feature of job fair
 * 100 Software companies
 * 1000 + Jobs
 * One place multiple option to select job
 * No marks barrier
 * Specially for fresher
 * Interview on various technology
 * One written test valid for 100 companies
 * One interview valid for 100 companies
 * Experienced are also welcome

 Below are technology in Job fair

 * C, C++, Unix
 * .Net, C#, ASP.Net,Windows, Mobile
 application
 * Java, JSP, EJB, RMI, Web logic
 * Testing Manual  Automation
 * Mainframe
 * BizTalk, SharePoint, Dynamics Family
 * SQL Server, SSIS, SSRS
 * OracleApps Financial Technical 
 Functional
 * Network Admin, Unix Admin, Windows Admin

 To join, and for more info submit your resume on “
 resume@gmail.com “
 91-9741541952
 www.amabusiness.com

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Global Variable

2011-02-09 Thread Angel Robert Marquez
interface when{
public function new();
}

class shtuff implements when {
function new($type);
if ($type=helluv){...blah1}
ifelse($type=retro){..blah2}
}

$now = new shtuff;
$now-new('recent');

On Wed, Feb 9, 2011 at 5:13 PM, Krissy Masters
naked.cake.ba...@gmail.comwrote:

 Quick question.

 I have 3 types / classifications of NEW

 Brand new = less than 24 hours
 New more than 24 but less than 48 hours
 And recently new more than 48 but less than 96 hours

 Now how can I define these globally so if I have in the code anywhere  NEW
 or  RECENT rather than tracing back all the spots where -24 hours so I can
 simply change the NEW, BRAND_NEW and RECENTLY_NEW if I want to increase or
 decrease their values later on

 So I can use something like this in the code:
 if ( $created  BRAND_NEW ){
 //fun stuff here
 }

 So I can change them in 1 spot and reflect on the site throughout.

 Configure::write('BRAND_NEW', date( 'Y-m-d H:i:s', strtotime( -24 hours )
 ) );

 Thanks

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Global Variable

2011-02-09 Thread Angel Robert Marquez
well, the model class would only be in one place and the objects that
inherit those methods would be able to access the $timestamp variable
created upon insertion and use it as a reference point that would allow you
to reuse/polymorph one function based on the argument passed to it...

no=yes
unless, you want to over complicate things for no apparent good reason.

On Wed, Feb 9, 2011 at 5:54 PM, Krissy Masters
naked.cake.ba...@gmail.comwrote:

 No, if that’s in 15 places then that’s of no use to me changing it in 15
 places

 New USERS, POSTS, EVENTS various models / controller

 All have created dates, now I want a standard set of “time” definitions to
 define if each of these is new, brand_new, recently_new…so if I say 2
 months
 from now NEW is now less than 12 hours I don’t have to go everywhere
 looking
 for if this $created less than 24 hours and make it 12, I just want to
 change it in 1 spot. $created less than NEW / BRAND_NEW / RECENTLY_NEW...so
 on so on.



 From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On
 Behalf
 Of Angel Robert Marquez
 Sent: Wednesday, February 09, 2011 9:51 PM
 To: cake-php@googlegroups.com
 Subject: Re: Global Variable

 interface when{
 public function new();
 }

 class shtuff implements when {
 function new($type);
 if ($type=helluv){...blah1}
 ifelse($type=retro){..blah2}
 }

 $now = new shtuff;
 $now-new('recent');
 On Wed, Feb 9, 2011 at 5:13 PM, Krissy Masters naked.cake.ba...@gmail.com
 
 wrote:
 Quick question.

 I have 3 types / classifications of NEW

 Brand new = less than 24 hours
 New more than 24 but less than 48 hours
 And recently new more than 48 but less than 96 hours

 Now how can I define these globally so if I have in the code anywhere  NEW
 or  RECENT rather than tracing back all the spots where -24 hours so I can
 simply change the NEW, BRAND_NEW and RECENTLY_NEW if I want to increase or
 decrease their values later on

 So I can use something like this in the code:
 if ( $created  BRAND_NEW ){
 //fun stuff here
 }

 So I can change them in 1 spot and reflect on the site throughout.

 Configure::write('BRAND_NEW', date( 'Y-m-d H:i:s', strtotime( -24 hours )
 ) );

 Thanks

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: best webhosts for CakePHP

2011-01-13 Thread Robert J. Maiolo
I share Dave's frustration with MediaTemple..they used to be pretty good..

For my money, Rackspace is where it's at these days..

R

On Thu, Jan 13, 2011 at 9:27 AM, Dave Maharaj m...@davemaharaj.com wrote:

 Not only for Cake but that's pretty much all I use these days, but my hate
 for Media Temple could fill this page. I was told about linode.com by a
 member in this group when I asked the same question. It's a un-managed vps
 host so rather technical as you build the server to your specs but best
 hosting solution I have ever used.

 I guess it would also depend on your site(s) your hosting and the resources
 needed to run each.

 Dave

 -Original Message-
 From: john lyles [mailto:confidentia...@gmail.com]
 Sent: Thursday, January 13, 2011 1:24 PM
 To: CakePHP
 Subject: best webhosts for CakePHP

 Put your two cents in. Who would you recommend to try, who would you
 recommend to avoid? And Why?

 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.comcake-php%2bunsubscr...@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.comcake-php%2bunsubscr...@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: IDE

2010-12-23 Thread Angel Robert Marquez
*linux*
vim
gedit

*mac OS*
vim
textmate
coda

*windows*
notepad2
eclipse
aptana





On Wed, Dec 22, 2010 at 12:11 AM, fadhli e.fad...@gmail.com wrote:

 netbeans


 On Wed, Dec 22, 2010 at 12:32 PM, Amit Badkas amit.sanis...@gmail.comwrote:

 Hi,

 I use easy eclipse for PHP (
 http://www.easyeclipse.org/site/distributions/php.html). I have also used
 Aptana IDE once but found easy eclipse better.

 Amit Badkas

 PHP Applications for E-Biz: http://www.sanisoft.com



 On Tue, Dec 21, 2010 at 8:27 PM, Kristofer krishop...@gmail.com wrote:

 What IDE do people typically use with CakePHP?  I've been doing stuff
 from the Linux command line using vim for so long.  I'd like something
 more graphical that (hopefully) supports SVN.  Looking for more point-
 and-click.  :)

 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.comcake-php%2bunsubscr...@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.comcake-php%2bunsubscr...@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.comcake-php%2bunsubscr...@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: IDE

2010-12-23 Thread Angel Robert Marquez
np

i would highly recommend installing a linux distro and using vim with the
terminator terminal

yum..

[?]

On Thu, Dec 23, 2010 at 1:19 AM, Shinya Koizumi sh.koiz...@gmail.comwrote:

 Thanks

 Sent from my iPhone

 On Dec 23, 2010, at 1:09 AM, Angel Robert Marquez angel.marq...@gmail.com
 wrote:

 *linux*
 vim
 gedit

 *mac OS*
 vim
 textmate
 coda

 *windows*
 notepad2
 eclipse
 aptana





 On Wed, Dec 22, 2010 at 12:11 AM, fadhli  e.fad...@gmail.com
 e.fad...@gmail.com wrote:

 netbeans


 On Wed, Dec 22, 2010 at 12:32 PM, Amit Badkas  amit.sanis...@gmail.com
 amit.sanis...@gmail.com wrote:

 Hi,

 I use easy eclipse for PHP 
 (http://www.easyeclipse.org/site/distributions/php.html
 http://www.easyeclipse.org/site/distributions/php.html). I have also
 used Aptana IDE once but found easy eclipse better.

 Amit Badkas

 PHP Applications for E-Biz: http://www.sanisoft.com
 http://www.sanisoft.com



 On Tue, Dec 21, 2010 at 8:27 PM, Kristofer  krishop...@gmail.com
 krishop...@gmail.com wrote:

 What IDE do people typically use with CakePHP?  I've been doing stuff
 from the Linux command line using vim for so long.  I'd like something
 more graphical that (hopefully) supports SVN.  Looking for more point-
 and-click.  :)

 Check out the new CakePHP Questions site http://cakeqs.org
 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
 cake-php@googlegroups.com
 To unsubscribe from this group, send email to
  cake-php%2bunsubscr...@googlegroups.com
 cake-php+unsubscr...@googlegroups.com For more options, visit this
 group at http://groups.google.com/group/cake-php?hl=en
 http://groups.google.com/group/cake-php?hl=en


  Check out the new CakePHP Questions site http://cakeqs.org
 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
 cake-php@googlegroups.com
 To unsubscribe from this group, send email to
  cake-php%2bunsubscr...@googlegroups.com
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php?hl=en
 http://groups.google.com/group/cake-php?hl=en


  Check out the new CakePHP Questions site http://cakeqs.org
 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
 cake-php@googlegroups.com
 To unsubscribe from this group, send email to
  cake-php%2bunsubscr...@googlegroups.com
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php?hl=en
 http://groups.google.com/group/cake-php?hl=en


  Check out the new CakePHP Questions site http://cakeqs.org
 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
 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
 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.comcake-php%2bunsubscr...@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
B60.gif

Re: IDE

2010-12-21 Thread Robert J. Maiolo
eclipse for the win

On Tue, Dec 21, 2010 at 6:57 AM, Kristofer krishop...@gmail.com wrote:

 What IDE do people typically use with CakePHP?  I've been doing stuff
 from the Linux command line using vim for so long.  I'd like something
 more graphical that (hopefully) supports SVN.  Looking for more point-
 and-click.  :)

 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.comcake-php%2bunsubscr...@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: Brainstom Idea needed

2010-11-13 Thread Angel Robert Marquez
what are the post_id numbers for the anomalies?

On Sat, Nov 13, 2010 at 8:10 PM, Dave Maharaj m...@davemaharaj.com wrote:

  Ok this is a weird one.

 I made my “star” favourites icon click sends ajax request and saves the
 post as favourite to favorite_posts table. Nothing over the top there.



 So I added 100 dummy posts and went thru bookmarking everyone as a
 favourite only to see 98 saved. There are 2 Posts that will not save and I
 can not figure out why.



 I have deleted the db table tried again. The post_id is unique , no
 permissions to bookmark once logged in…I simply can not understand why 2 of
 100 will not save.  I can click to save / click again removes the fav, click
 on same one over and over and they work fine.



 98 respond with my JSON response success



 The 2 that do not save return an HTML response.

 They  return a view not even related to the page I am on. I am at
 posts/index and the response for those crazy to renders favourites/index
 form to delete.



 Just looking for any random idea that might help.









 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.comcake-php%2bunsubscr...@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: Brainstom Idea needed

2010-11-13 Thread Angel Robert Marquez
sounds like a good plan. let me know if the solution from you're deductive
logic yields the desired result : )

952589m
410058f



On Sat, Nov 13, 2010 at 8:31 PM, Dave Maharaj m...@davemaharaj.com wrote:

  I just checked and the 2 that will not save and they are all numeric
 952589 and 410058 and my Route has 'post_id' = '[-_A-Za-z0-9]+', so my
 guess is since it does not have a letter in there its failing? Only thing I
 can think of since all the other id’s have a letter tossed in there



 Id’s are created rather then auto-inc so I will manually change the 2 and
 see how that goes. If that’s the case I will have to ensure generated id’s
 have a letter in them.



 Dave



 *From:* Angel Robert Marquez [mailto:angel.marq...@gmail.com]
 *Sent:* November-14-10 12:50 AM
 *To:* cake-php@googlegroups.com
 *Subject:* Re: Brainstom Idea needed



 what are the post_id numbers for the anomalies?

 On Sat, Nov 13, 2010 at 8:10 PM, Dave Maharaj m...@davemaharaj.com wrote:

 Ok this is a weird one.

 I made my “star” favourites icon click sends ajax request and saves the
 post as favourite to favorite_posts table. Nothing over the top there.



 So I added 100 dummy posts and went thru bookmarking everyone as a
 favourite only to see 98 saved. There are 2 Posts that will not save and I
 can not figure out why.



 I have deleted the db table tried again. The post_id is unique , no
 permissions to bookmark once logged in…I simply can not understand why 2 of
 100 will not save.  I can click to save / click again removes the fav, click
 on same one over and over and they work fine.



 98 respond with my JSON response success



 The 2 that do not save return an HTML response.

 They  return a view not even related to the page I am on. I am at
 posts/index and the response for those crazy to renders favourites/index
 form to delete.



 Just looking for any random idea that might help.









 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.comcake-php%2bunsubscr...@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.comcake-php%2bunsubscr...@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.comcake-php%2bunsubscr...@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: Brainstom Idea needed

2010-11-13 Thread Angel Robert Marquez
Rad!

I hope your wind filled sail takes you to fantastic places!

good job.

On Sat, Nov 13, 2010 at 8:40 PM, Dave Maharaj m...@davemaharaj.com wrote:

  That will do it.



 Success. So case closed J



 Dave



 *From:* Angel Robert Marquez [mailto:angel.marq...@gmail.com]
 *Sent:* November-14-10 1:06 AM

 *To:* cake-php@googlegroups.com
 *Subject:* Re: Brainstom Idea needed



 sounds like a good plan. let me know if the solution from you're deductive
 logic yields the desired result : )



 952589m

 410058f





 On Sat, Nov 13, 2010 at 8:31 PM, Dave Maharaj m...@davemaharaj.com wrote:

 I just checked and the 2 that will not save and they are all numeric 952589
 and 410058 and my Route has 'post_id' = '[-_A-Za-z0-9]+', so my guess is
 since it does not have a letter in there its failing? Only thing I can think
 of since all the other id’s have a letter tossed in there



 Id’s are created rather then auto-inc so I will manually change the 2 and
 see how that goes. If that’s the case I will have to ensure generated id’s
 have a letter in them.



 Dave



 *From:* Angel Robert Marquez [mailto:angel.marq...@gmail.com]
 *Sent:* November-14-10 12:50 AM
 *To:* cake-php@googlegroups.com
 *Subject:* Re: Brainstom Idea needed



 what are the post_id numbers for the anomalies?

 On Sat, Nov 13, 2010 at 8:10 PM, Dave Maharaj m...@davemaharaj.com wrote:

 Ok this is a weird one.

 I made my “star” favourites icon click sends ajax request and saves the
 post as favourite to favorite_posts table. Nothing over the top there.



 So I added 100 dummy posts and went thru bookmarking everyone as a
 favourite only to see 98 saved. There are 2 Posts that will not save and I
 can not figure out why.



 I have deleted the db table tried again. The post_id is unique , no
 permissions to bookmark once logged in…I simply can not understand why 2 of
 100 will not save.  I can click to save / click again removes the fav, click
 on same one over and over and they work fine.



 98 respond with my JSON response success



 The 2 that do not save return an HTML response.

 They  return a view not even related to the page I am on. I am at
 posts/index and the response for those crazy to renders favourites/index
 form to delete.



 Just looking for any random idea that might help.









 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.comcake-php%2bunsubscr...@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.comcake-php%2bunsubscr...@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.comcake-php%2bunsubscr...@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.comcake-php%2bunsubscr...@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.comcake-php%2bunsubscr...@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

Re: Get the last insert id

2010-10-25 Thread Robert J. Maiolo
after your save statement..

$var = $this-Contact-lastInsertId();



On Mon, Oct 25, 2010 at 7:48 AM, macha srin...@gmail.com wrote:

 Hello I am using cakePHP 1.3 and I am unable to retreive the last
 inserted row's id. I actually am using $this-Model-id to retreive
 the last inserted id but I am unable to get the id. When tried to
 check what is return type, it says as bool(false), which means nothing
 is returned.

 Here I am loading a different model in a different controller, so
 would that be the issue?? But even though I am loading, I get back
 nothing!!

 $this-loadModel('Contact');
 $this-Contact-query(insert into

 contacts(tblContact_firstName,tblContact_lastName,tblContact_company,tblContact_department,tblContact_address,tblContact_country,tblContact_city,tblContact_state,tblContact_zipcode,tblContact_phone1,tblContact_email1)

 values('$sanitizedFormData[fname]','$sanitizedFormData[lname]','','$sanitizedFormData[company]','$sanitizedFormData[address]','$sanitizedFormData[country]','$sanitizedFormData[city]','$sanitizedFormData[state]','$sanitizedFormData[zip]','$sanitizedFormData[phone]','$sanitizedFormData[email]'););

 $this-loadModel('Contact');
 $contactId = $this-Contact-id;

 And when I printed the $this-Contact array recursively, I found the
 value of id key empty. So that explains why I was receiving an empty
 value.

 Now given my situation, how would I get the last inserted id, specific
 to the controller Contact?? Is it possible?

 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.comcake-php%2bunsubscr...@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: CakePHP future

2010-09-04 Thread Robert J. Maiolo
good questions..I look forward to reading what people say on this..

On Thu, Sep 2, 2010 at 9:10 PM, sambo chhaysa...@gmail.com wrote:

 Does Lithium framework is the future of CakePHP? And what is different
 with CakePHP 2.0 and Cake3 (released under a new name: Lithium)?

 You can see this link below for more
 http://www.phpframeworks.com/news/p/614/cakephp-is-dead-lithium-was-born

 http://debuggable.com/posts/Cake_3_interview_with_Nate_Abele:4a665a5e-5bfc-4e42-96ee-6d284834cda3

 Thanks,
 Sambo

 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.comcake-php%2bunsubscr...@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: Does every model need a name field? Why?

2010-08-26 Thread Robert J. Maiolo
perhaps he meant a name variable, as shown in the following example:


   1. ?php
   2. class Ingredient extends AppModel {
   3. var $name = 'Ingredient';
   4. }
   5. ?




On Thu, Aug 26, 2010 at 1:23 AM, psybear83 psybea...@gmail.com wrote:

 Hi all

 I'm just digging into CakePHP and continue an application of my
 previous co-worker. He told me that every model needs a name field
 in the database. Why's that? I did a search on Google but could't find
 an answer...

 Thanks
 Josh

 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.comcake-php%2bunsubscr...@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: Website Structure

2010-07-22 Thread Robert J. Maiolo
personally..I woud use jquery to do that...



On Wed, Jul 21, 2010 at 10:13 AM, Chaim ch...@oxfordshul.com wrote:

 Hello,

 I am a beginner to CakePHP, so forgive my amateur question.
 I am unsure how to structure my website.
 I have four blocks and then when one block is clicked it changes to
 show the content for that block. However the other three blocks still
 remain visible and clickable so that if you click on another block it
 will hide the first block and show the new one.

 Can anyone help me with how I should set up my website in 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.comcake-php%2bunsubscr...@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: Multiple AJAX Forms on same page all submitting to first form.

2010-05-13 Thread Robert McWay
i had already fixed that issue since i posted this initially, and that
wasn't the issue. I actually did get it working now, by switching to
using $ajax-form, instead of $ajax-submit(). The downside is data
validation doesn't work with $ajax-form, but at least the form tags
are being generated properly. Thanks Guys.

On May 12, 9:46 am, John Andersen j.andersen...@gmail.com wrote:
 As Nilz wrote, you have two keys with the name of id in your array!
 That can't work!
 So check you form create statement and correct it!
 Enjoy,
    John

 On May 12, 7:17 pm, Robert McWay mcway.web.developm...@gmail.com
 wrote: I took another look at the generated HTML, like you suggested Matt,
  and found something very strange. The multiple forms i have on this
  page are being generated by a loop. It appears that the first form
  generates the proper opening and closing form tags, along with the
  javascript for the AJAX. But then looking at the 2nd and 3rd forms in
  the code, i realized that the opening form tag is not being inserted,
  as well as the closing form tag, The submit button and proper
  javascript are still being generated, but for some reason the form
  tags just don't generate past the first form. Any idea why?

 [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: Multiple AJAX Forms on same page all submitting to first form.

2010-05-12 Thread Robert McWay
I took another look at the generated HTML, like you suggested Matt,
and found something very strange. The multiple forms i have on this
page are being generated by a loop. It appears that the first form
generates the proper opening and closing form tags, along with the
javascript for the AJAX. But then looking at the 2nd and 3rd forms in
the code, i realized that the opening form tag is not being inserted,
as well as the closing form tag, The submit button and proper
javascript are still being generated, but for some reason the form
tags just don't generate past the first form. Any idea why?

On May 7, 8:19 am, Matthew Powell php...@gmail.com wrote:
 Take a look at the generated HTML.  It sounds very much like the first
 form isn't being terminated properly (no /form tag).  This causes
 the fields in the second form to think they are part of the first
 form.





 On Thu, May 6, 2010 at 22:45, Nilz nilzer...@gmail.com wrote:

  Why are you using two ids?

  ?php echo $form-create('User', array('action'='check', 'id'=
  $formid, 'name'=$formid, 'id' = $submitid)); ?

  I use $ajax-form to work this fine for me.

  Hope it help.

  On May 7, 2:10 am, Robert McWay mcway.web.developm...@gmail.com
  wrote:
  Hello All,

  I am having trouble with puttingmultipleajaxform instances on the
  same page. All the forms have the same fields, with the exception of a
  hidden field passing the User Id. Upon submitting the form, it always
  submits the form fields in the first form, regardless of which form i
  submit. I have given  the each submit, and form unique ids, but it
  still seems to always submit that first form. Here is an example of a
  couple forms:

  ?php
  $update = 'availability'.$t['id'];
  $formid = 'a'.$t['id'];
  $submitid = 'submit'.$t['id'];
  ?
  ?php echo $form-create('User', array('action'='check', 'id'=
  $formid, 'name'=$formid, 'id' = $submitid)); ?
  ?php echo $form-hidden('tutor_id.'.$t['id'], array('value'=
  $t['id']))?
  ...more identical form checkbox fields

  ?php echo $ajax-submit('Check', array('url'=
  array('controller'='users', 'action'='check'), 'update' = $update,
  'id' = $submitid)); ?

  Any ideas?

  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 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: Issue with find('list')

2010-05-12 Thread Robert McWay
First thing you might want to do is take the set function call out of
the if(empty()) conditional you have. The reason is because you want
this variable set every time, regardless of the state of $this-data,
to keep the select options properly populated. The way you have it
now, you will lose your select options in the event that you have to
resubmit the form due to errors, etc, because then the $this-data
array is set.

Second, you can force the input field to become a select by using the
select() function. Try switching your input function with that.

$form-select('finished_product_id', $finished_products, null,
array());

or

$form-input('finished_product_id', array('options' =
$finished_products));

Hope that helps.

On May 11, 2:25 pm, Stefano Martins xstefa...@gmail.com wrote:
 Hey folks,

 I have two controllers: ConfigurationsController and
 FinishedProductsController. Here's the code for the
 ConfigurationsController:

 ?php
         class ConfigurationsController extends AppController
         {
                 public function add()
                 {
                         if(empty($this-data))
                         {
                                 $this-set('finished_products', 
 $this-Configuration-FinishedProduct-find('list'));

                         }
                 }
         }
 ?

 In the view, the select is showing up right, but its not populated
 with the finished products. Here's the code for the view:

 ?php
         echo $form-create('Configuration');
         echo $form-input('finished_product_id');
         echo $form-input('ammount_of_items');
         echo $form-end('Próximo passo');
 ?

 Can someone help me out?

 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


Multiple AJAX Forms on same page all submitting to first form.

2010-05-06 Thread Robert McWay
Hello All,

I am having trouble with putting multiple ajax form instances on the
same page. All the forms have the same fields, with the exception of a
hidden field passing the User Id. Upon submitting the form, it always
submits the form fields in the first form, regardless of which form i
submit. I have given  the each submit, and form unique ids, but it
still seems to always submit that first form. Here is an example of a
couple forms:

?php
$update = 'availability'.$t['id'];
$formid = 'a'.$t['id'];
$submitid = 'submit'.$t['id'];
?
?php echo $form-create('User', array('action'='check', 'id'=
$formid, 'name'=$formid, 'id' = $submitid)); ?
?php echo $form-hidden('tutor_id.'.$t['id'], array('value'=
$t['id']))?
...more identical form checkbox fields

?php echo $ajax-submit('Check', array('url'=
array('controller'='users', 'action'='check'), 'update' = $update,
'id' = $submitid)); ?

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


Redirect mixed case URLS

2010-04-28 Thread Robert Popplewell
Hi guys

Does anyone know of a decent, non htaccess way of reading in URL's
that have mixed case but still point to the appropriate controller/
action ?

e.g.

Router::connect('/about', array('controller' = 'pages', 'action' =
'display','about'));

Means I'm able to route my about page by: myhosting.com/about - but
attempting to visit myhosting.com/About results in error.

I've tried checking out the API for the Router class methods but seem
to be stuck.

Regards

Robert

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: Absolute URLs

2010-04-25 Thread Robert Popplewell
Er, what for?

Because I prefer to use absolute URLs :P

And there's no way you can have a link like '/cake/css/cake.generic.css'

Obviously you can if your working within a folder named 'cake', I just
pasted a random href link in there from my test setup for an example.

Thanks for the heads up on the url method argument, must have been a lack of
coffee that made me forget to check the api for that too :)


On 25 April 2010 12:03, jacmoe jac...@mail.dk wrote:

 Er, what for?

 And there's no way you can have a link like '/cake/css/
 cake.generic.css' - it would be '/css/cake.generic.css'.
 Are you creating all those links yourself?

 On Apr 25, 6:59 am, Robert Popplewell r0b...@gmail.com wrote:
  Does anyone know the best way to change all html links within cakephp
  to absolute URLs? (besides preg_replace)
 
  e.g.
 
  From:
 
  /cake/css/cake.generic.css
 
  To:
 
  http://myurl.com/cake/css/cake.generic.css
 
  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.comcake-php%2bunsubscr...@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.comcake-php%2bunsubscr...@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


Absolute URLs

2010-04-24 Thread Robert Popplewell
Does anyone know the best way to change all html links within cakephp
to absolute URLs? (besides preg_replace)

e.g.

From:

/cake/css/cake.generic.css

To:

http://myurl.com/cake/css/cake.generic.css

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: REST in cakePHP

2010-04-15 Thread Angel Robert Marquez
oops, i meant this:
Turn on webservices in config/core.php by uncommenting this line (or
changing 'off' to 'on')

On Thu, Apr 15, 2010 at 12:14 AM, Angel Robert Marquez 
angel.marq...@gmail.com wrote:

 []define('WEBSERVICES', 'on');
 make a rest.php file in controllers/components

 and did you make the corresponding table in your db for the controller?

 On Thu, Apr 15, 2010 at 12:07 AM, ivan lights...@gmail.com wrote:

 I followed the steps as in
 http://bakery.cakephp.org/articles/view/restful-web-services-with-cakephp
 .

 and this is what I do:
 1. in controllers/components
 ?php
 class RestComponent extends Object {
 }
 ?
 2. make a rest.php file in views/helpers
 ?php
   class RestHelper extends Helper
   {
   }
 ?
 3. In views/layouts make a folder called 'rest' and put a
 default.thtml file in it
 ?php e('?xml version=1.0 encoding=utf-8 ?'); ?
 ?php echo $content_for_layout; ?
 4. in models/pencarian_kata_kitabs.php
 ?php
 class PencarianKataKitab extends AppModel {

var $name = 'PencarianKataKitab';
var $belongsTo = array(
'Alkitab' = array(
'className' = 'Alkitab',
'foreignKey' = 'KITAB_ID',
'conditions' = '',
'fields' = '',
'order' = ''
),
'TempKata' = array(
'className' = 'TempKata',
'foreignKey' = 'KATA_ID',
'conditions' = '',
'fields' = '',
'order' = ''
)
);
var $validate = array(
'KITAB_ID' = array('numeric',VALID_NOT_EMPTY),
'KATA_ID' = array('numeric',VALID_NOT_EMPTY)
);

 }
 ?
 5. in controllers/pencarian_kata_kitabs_controller.php
 function listing() {
   $this-set('alkitabku', ClassRegistry::init(Alkitab)-
 find('all',
array(
  'conditions'=array(
and=array(
'CONCAT(Alkitab.kitab,
 ,Alkitab.pasal) like '='mazmur',
'CAST(Alkitab.ayat AS UNSIGNED)
 ='='1',
'CAST(Alkitab.ayat AS UNSIGNED)
 ='='1'
)
  )
   )
));
}
 6. in views/pencarian_kata_kitabs/rest/listing.thtml
 if (isset($alkitabku) and !empty($alkitabku)) :  ?
 rsp stat=ok
 alkitabku type='array'
?php foreach ($alkitabku as $country) : ?
country type='struct'
id?php e($country['Alkitab']['ISI'])?/id
/country
?php endforeach; ?
 /alkitabku
 ?php else: ?
 rsp stat=fail
err type='struct'
?php if ($session-check('Message.flash')): ?
msg?php e(strip_tags($session-read('Message.flash')));?/
 msg
?php endif; ?
/err
 ?php endif; ?
 /rsp

 when i access http://localhost/alkitab/rest/pencarian_kata_kitabs/listing
 ,
 this result is
 not found
 Error: The requested address '/rest/pencarian_kata_kitabs/listing' was
 not found on this server.

 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.comcake-php%2bunsubscr...@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

To unsubscribe, reply using remove me as the subject.


Re: REST in cakePHP

2010-04-15 Thread Angel Robert Marquez
[]define('WEBSERVICES', 'on');
make a rest.php file in controllers/components

and did you make the corresponding table in your db for the controller?

On Thu, Apr 15, 2010 at 12:07 AM, ivan lights...@gmail.com wrote:

 I followed the steps as in
 http://bakery.cakephp.org/articles/view/restful-web-services-with-cakephp.

 and this is what I do:
 1. in controllers/components
 ?php
 class RestComponent extends Object {
 }
 ?
 2. make a rest.php file in views/helpers
 ?php
   class RestHelper extends Helper
   {
   }
 ?
 3. In views/layouts make a folder called 'rest' and put a
 default.thtml file in it
 ?php e('?xml version=1.0 encoding=utf-8 ?'); ?
 ?php echo $content_for_layout; ?
 4. in models/pencarian_kata_kitabs.php
 ?php
 class PencarianKataKitab extends AppModel {

var $name = 'PencarianKataKitab';
var $belongsTo = array(
'Alkitab' = array(
'className' = 'Alkitab',
'foreignKey' = 'KITAB_ID',
'conditions' = '',
'fields' = '',
'order' = ''
),
'TempKata' = array(
'className' = 'TempKata',
'foreignKey' = 'KATA_ID',
'conditions' = '',
'fields' = '',
'order' = ''
)
);
var $validate = array(
'KITAB_ID' = array('numeric',VALID_NOT_EMPTY),
'KATA_ID' = array('numeric',VALID_NOT_EMPTY)
);

 }
 ?
 5. in controllers/pencarian_kata_kitabs_controller.php
 function listing() {
   $this-set('alkitabku', ClassRegistry::init(Alkitab)-
 find('all',
array(
  'conditions'=array(
and=array(
'CONCAT(Alkitab.kitab,
 ,Alkitab.pasal) like '='mazmur',
'CAST(Alkitab.ayat AS UNSIGNED)
 ='='1',
'CAST(Alkitab.ayat AS UNSIGNED)
 ='='1'
)
  )
   )
));
}
 6. in views/pencarian_kata_kitabs/rest/listing.thtml
 if (isset($alkitabku) and !empty($alkitabku)) :  ?
 rsp stat=ok
 alkitabku type='array'
?php foreach ($alkitabku as $country) : ?
country type='struct'
id?php e($country['Alkitab']['ISI'])?/id
/country
?php endforeach; ?
 /alkitabku
 ?php else: ?
 rsp stat=fail
err type='struct'
?php if ($session-check('Message.flash')): ?
msg?php e(strip_tags($session-read('Message.flash')));?/
 msg
?php endif; ?
/err
 ?php endif; ?
 /rsp

 when i access http://localhost/alkitab/rest/pencarian_kata_kitabs/listing,
 this result is
 not found
 Error: The requested address '/rest/pencarian_kata_kitabs/listing' was
 not found on this server.

 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.comcake-php%2bunsubscr...@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

To unsubscribe, reply using remove me as the subject.


Re: REST in cakePHP

2010-04-15 Thread Angel Robert Marquez
zip up your app folder and upload/email. i'll run through in tandem, if i
have time.

On Thu, Apr 15, 2010 at 9:40 AM, ivan lights...@gmail.com wrote:

 i'am sorry John if i make you loose interest for me. I hope you can
 still help me. One more time i say sorry for you John. God bless you
 forever.

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

 To unsubscribe, reply using remove me as the subject.


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 in AppController

2010-03-05 Thread Robert P
If you have moved all your Auth logic to your AppController you need
to make sure that you are extending the methods in subcontrollers, not
overwriting them.

class UsersController extends AppController {
public function beforeFilter() {
parent::beforeFilter(); // extended
// custom logic
}
}

Permanent redirects after changes to Auth are almost always related to
the configuration.

--
Varisan International http://www.varisan.com.au/

On Mar 4, 11:27 pm, LDSign i...@ldsign.de wrote:
 Hi

 Ive implemented the login-logic with help of Auth. This works fine.
 But I would like to have auth all over my site. So I would like to
 include this component to the AppController (for global access). As
 soon as I do so, the site stops working. The page will load for some
 seconds and then there comes blank page with a redirect-error (sorry
 Ive this only in german):

 Diese Webseite weist eine Weiterleitung auf.

 Die Webseite unterhttp://localhost/ben/users/loginhat zu viele
 Umleitungen erzeugt. Das Löschen Ihrer Cookies für diese Website oder
 das Zulassen von Drittanbieter-Cookies könnte das Problem
 möglicherweise beheben. Sollte das Problem damit nicht behoben sein,
 liegt möglicherweise ein Serverkonfigurationsfehler und kein Problem
 mit Ihrem Computer vor.

 This drives my nuts. Do you have any hint? Until now Ive thought that
 when I move my components from the (sub-)controller to the
 AppController that this doesnt make any change execpt for accessing it
 globally.

 I use cakePHP 1.3 - latest beta. Are there any known issues?

 Thank you,
 Frank

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: hasOne-HABTM save problem

2010-03-05 Thread Robert P
Cake's auto-HABTM saving requires the field to be named a particular
way in order to recognise it.

Try naming your multiple-select field ExportDocument.ExportDocument.

$list['docs'] should also be in the format array(ExportDocument.id =
name)

--
Varisan International http://ww.varisan.com.au/

On Mar 5, 8:56 am, murkyt mur...@operamail.com wrote:
 I have the following relationships set up for a database of Samples.
 There are many different types of sample and each type has it's own
 set of fields so I have modelled them as Supertype/Subtypes with
 hasOne relationships. For an ExportSample it can have one or more
 documents tied to it.

 Sample hasOne ExportSample
 ExportSample HABTM ExportDocuments

 Sample Model:
 var $hasOne=array
 (
         'ExportSample';
 )

 ExportSample Model:
 var $hasAndBelongsToMany=array
 (
         'ExportDocuments'
 );

 ExportDocuments Model:
 var $hasAndBelongsToMany=array
 (
         'ExportSample '
 );

 I have a form that consists of some fields from the Sample, some from
 the ExportSample and a list of checkboxes for the ExportDocuments .

 echo $form-create('Sample',array('action'='addedit'));
 echo $form-input('Sample.id');
 echo $form-input('Sample.sampletype_id');
 echo $form-input('ExportSample.samplesize_id');
 echo $form-input('ExportSample.sampleform_id');
 echo $form-input('ExportSample.id');
 echo $form-input('ExportSample.ExportDocument', array( 'type' =
 'select', 'multiple' = 'checkbox', 'options'=$lists['docs']));
 echo $form-end('Save Changes');

 In the controller I am saving the data with...

 $this-Sample-saveAll($this-data);

 When I use this form it saves the Sample data and the Export Sample
 data from the form but it won't save the HABTM Export Documents. It
 doesn't run any queries on the HABTM join table at all. If I leave out
 the ExportSample.id it does save the HABTM data but with an
 exportsample_id of 0. Put it back in and the HABTM data doesn't save.

 I believe the relationships are set up correctly because running a
 find operation on the Sample model will show the HABTM ExportDocument
 data.

 I have successfully used forms in the past with HABTM data and if the
 Sample model had a HABTM relationship with Export Documents I would
 have no problems - but in this case the hasOne-hasOne-HABTM
 relationship seems to screw things up.

 Has anyone come across this before or got any ideas about how I can
 get this to work?

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: hasOne-HABTM save problem

2010-03-05 Thread Robert P
Cake's auto-HABTM saving requires the field to be named a particular
way in order to recognise it.

Try naming your multiple-select field ExportDocument.ExportDocument.

$list['docs'] should also be in the format array(ExportDocument.id =
name)

--
Varisan International http://www.varisan.com.au/

On Mar 5, 8:56 am, murkyt mur...@operamail.com wrote:
 I have the following relationships set up for a database of Samples.
 There are many different types of sample and each type has it's own
 set of fields so I have modelled them as Supertype/Subtypes with
 hasOne relationships. For an ExportSample it can have one or more
 documents tied to it.

 Sample hasOne ExportSample
 ExportSample HABTM ExportDocuments

 Sample Model:
 var $hasOne=array
 (
         'ExportSample';
 )

 ExportSample Model:
 var $hasAndBelongsToMany=array
 (
         'ExportDocuments'
 );

 ExportDocuments Model:
 var $hasAndBelongsToMany=array
 (
         'ExportSample '
 );

 I have a form that consists of some fields from the Sample, some from
 the ExportSample and a list of checkboxes for the ExportDocuments .

 echo $form-create('Sample',array('action'='addedit'));
 echo $form-input('Sample.id');
 echo $form-input('Sample.sampletype_id');
 echo $form-input('ExportSample.samplesize_id');
 echo $form-input('ExportSample.sampleform_id');
 echo $form-input('ExportSample.id');
 echo $form-input('ExportSample.ExportDocument', array( 'type' =
 'select', 'multiple' = 'checkbox', 'options'=$lists['docs']));
 echo $form-end('Save Changes');

 In the controller I am saving the data with...

 $this-Sample-saveAll($this-data);

 When I use this form it saves the Sample data and the Export Sample
 data from the form but it won't save the HABTM Export Documents. It
 doesn't run any queries on the HABTM join table at all. If I leave out
 the ExportSample.id it does save the HABTM data but with an
 exportsample_id of 0. Put it back in and the HABTM data doesn't save.

 I believe the relationships are set up correctly because running a
 find operation on the Sample model will show the HABTM ExportDocument
 data.

 I have successfully used forms in the past with HABTM data and if the
 Sample model had a HABTM relationship with Export Documents I would
 have no problems - but in this case the hasOne-hasOne-HABTM
 relationship seems to screw things up.

 Has anyone come across this before or got any ideas about how I can
 get this to work?

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: Flame Post: Performance 1.2.6 vs 1.3.0-RC1 - Bad news.

2010-03-05 Thread Robert P
This doesn't necessarily surprise me.

There was one particular bugfix several months ago which involved
adding a singleton call then looping over and regex matching each item
in the returned array. And there was an alternative fix that just
delimited a string properly with virtually zero overhead. I read over
the fix that had been committed and decided not to use Cake for
professional applications any more.

I'm currently enjoying a sensible framework.

--
Varisan International http://www.varisan.com.au/

On Mar 5, 7:37 am, Dérico Filho uldericofi...@gmail.com wrote:
 Hello,

 I am not a professional benchmarker, but I decided to make some
 comparison between 1.2.6 and 1.3.0-RC1 tags. So, I downloaded them,
 and created the following file:

 cat app/views/pages/home.ctp
 hello world.

 And changed nothing else. Just created the file, I ran Apache's AB
 several times, I tried to pick the best numbers among all tests done
 on my server and I obtained these numbers:

 # /usr/local/apache/bin/ab -A**:*** -n 1000 -c 
 100http://serverbenchmark/cakephp-1.2.6
 This is ApacheBench, Version 2.0.41-dev $Revision: 1.121.2.12 $
 apache-2.0
 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd,http://www.zeustech.net/
 Copyright (c) 2006 The Apache Software Foundation,http://www.apache.org/

 Benchmarking serverbenchmark (be patient)
 Completed 100 requests
 Completed 200 requests
 Completed 300 requests
 Completed 400 requests
 Completed 500 requests
 Completed 600 requests
 Completed 700 requests
 Completed 800 requests
 Completed 900 requests
 Finished 1000 requests

 Server Software:        Apache/2.0.63
 Server Hostname:        serverbenchmark
 Server Port:            80

 Document Path:          /cakephp-1.2.6
 Document Length:        359 bytes

 Concurrency Level:      100
 Time taken for tests:   7.615287 seconds
 Complete requests:      1000
 Failed requests:        0
 Write errors:           0
 Non-2xx responses:      1000
 Total transferred:      629000 bytes
 HTML transferred:       359000 bytes
 Requests per second:    131.31 [#/sec] (mean)
 Time per request:       761.529 [ms] (mean)
 Time per request:       7.615 [ms] (mean, across all concurrent
 requests)
 Transfer rate:          80.63 [Kbytes/sec] received

 Connection Times (ms)
               min  mean[+/-sd] median   max
 Connect:        0    0   2.0      0      17
 Processing:     3  695 819.2    101    3245
 Waiting:        1  695 819.3    100    3244
 Total:          7  696 819.6    101    3248

 Percentage of the requests served within a certain time (ms)
   50%    101
   66%   1013
   75%   1029
   80%   1044
   90%   2052
   95%   2244
   98%   3234
   99%   3241
  100%   3248 (longest request)

 # /usr/local/apache/bin/ab -A**:*** -n 1000 -c 
 100http://serverbenchmark/cakephp-1.3.0-RC1/
 This is ApacheBench, Version 2.0.41-dev $Revision: 1.121.2.12 $
 apache-2.0
 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd,http://www.zeustech.net/
 Copyright (c) 2006 The Apache Software Foundation,http://www.apache.org/

 Benchmarking serverbenchmark (be patient)
 Completed 100 requests
 Completed 200 requests
 Completed 300 requests
 Completed 400 requests
 Completed 500 requests
 Completed 600 requests
 Completed 700 requests
 Completed 800 requests
 Completed 900 requests
 Finished 1000 requests

 Server Software:        Apache/2.0.63
 Server Hostname:        serverbenchmark
 Server Port:            80

 Document Path:          /cakephp-1.3.0-RC1/
 Document Length:         bytes

 Concurrency Level:      100
 Time taken for tests:   14.150790 seconds
 Complete requests:      1000
 Failed requests:        101
    (Connect: 0, Length: 101, Exceptions: 0)
 Write errors:           0
 Total transferred:      1505381 bytes
 HTML transferred:       1116446 bytes
 Requests per second:    70.67 [#/sec] (mean)
 Time per request:       1415.079 [ms] (mean)
 Time per request:       14.151 [ms] (mean, across all concurrent
 requests)
 Transfer rate:          103.88 [Kbytes/sec] received

 Connection Times (ms)
               min  mean[+/-sd] median   max
 Connect:        0    7  21.2      0      73
 Processing:    95 1361 517.6   1275    3105
 Waiting:       82 1324 533.1   1232    3105
 Total:        122 1368 516.4   1276    3105

 Percentage of the requests served within a certain time (ms)
   50%   1276
   66%   1354
   75%   1396
   80%   1466
   90%   2224
   95%   2475
   98%   3063
   99%   3073
  100%   3105 (longest request)

 Well the 1.2.6 tag out performs the 1.3.0-RC1 on the main number
 (IMHO): requests per second.

 Flame Question: Shouldn't 1.3.0-RC1 release perform better than 1.2.6?

 Should anyone point any flaw in this benchmark, pleas tell me, so I
 can run the tests correctly.

 Dérico Filho

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, 

  1   2   3   >