Re: Application Settings stored in the DB and available in plugin models?

2010-06-16 Thread Sam
Variables stored via Configure::write should be accessable anywhere in
your site- if it isn't working then the code isn't being executed.
Figure out why it isn't executing and you'll solve your problem.

Does your plugin AppController extend your site's AppController? Also,
where are you defining the settings? If you are doing it in the
AppController beforeFilter, and are using beforeFilter in your plugin
AppController, make sure that you are calling parent::beforeFilter()
in your plugin's AppController.

regards,
Sam


On Jun 15, 6:09 pm, #2Will willjbar...@gmail.com wrote:
 Hi,  I have some settings set in the admin area and stored in the db
 that i use throughout the app, and would like to access in a plugin.

 I get the settings like this in the app controller:

 function _getSettings(){
                 $this-settings = $this-Setting-find();  #get them

                 #make available in controllers
                 $this-settings = $this-settings['Setting'];

                 # make available in views
                 $this-set('settings',$this-settings);

                 #make available in plugins
                 // ??

         }

 But those variables are not availabe in a plugin model.  How can I
 make those settings available everywhere?

 Settings writen using configure::write in the core.php file are
 available, but not ones written in appController.  Where can i write
 them out from the DB so they are available in the plugin model?

 Or am i going about this the wrong way entirely?

 Thanks,

 Will.

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

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


Re: Format Array

2010-06-16 Thread John Andersen
Please provide more details for us to consider! For a starter I think
the following would be necessary:
The code that returns data for your ajax call.
The code of the view in which the dropdown data is to be used.

Enjoy,
   John


On Jun 16, 2:55 am, Ed Propsner crotchf...@gmail.com wrote:
 My last post was a bit misleading ... The way I should have stated it is
 that using array_merge() and unset()
 I was able to structure the array the way that I want it in the controller
 action for the search results so it's not throwing
 an error, but it is still showing in the url as 
 country=Chiledata[Search][region]= . The results page has a custom sort
 so when the data is sorted the url changes back to  country=Chileregion=
 . I had to alter the controller, view, and a few elements
 to account for the difference and to keep it from giving an error.

 What I would like to do is have $this-params array arrive at the controller
 already formatted the way I want instead of me
 having to manipulate the array once it get's there.
[snip]

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

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


Re: serious problem with cakephp about CakePHP Auth Component Permissions

2010-06-16 Thread xamako
Try this http://github.com/jedt/spark_plug

On Jun 16, 6:45 am, hoss7 hoss...@gmail.com wrote:
 i want Users, Groups  Permissions for Groups, for my website

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: Format Array

2010-06-16 Thread Ed Propsner
Sorry about that John, I'm not quite with it today ... i'm a bit under the
weather.
This is the part of the view for the search.

$form-input('country', array(
'label' = '',
'type' = 'select',
'empty' = '-- Select --',
'selected' = $this-Session-read('Auth.User.country')
)
  )

$ajax-observeField('SearchCountry', array(
   'url' = array(
  'action' = 'getRegion'
  ),
   'frequency' = 0.1,
   'update' = 'displayRegion'
   )
 )

Upon 'onchange' event the selected country id is passed to the controller
where it queries a new list of regions for that country.

The controller passes the array of regions to a separate view (perhaps could
have done this differently?) where a new select element is populated with
the array of regions.

$form-input('Search.region', array(
'label' = '',
'type' = 'select',
'options' = $region
)
 );

The 'region' select element in the search form sits inside a div and is
overwritten by the above element.
The new select element is getting passed into the search form as $this-data
which makes sense but it's also remaining
that way when the form submits.

So now with using GET the form submits as

[minAge] = 31
[maxAge] = 41
[country] = Chile
[data] = Array
(
[Search] = Array
(
[region] = Libertador General Bernardo O'Higgins
)

)

I straightened out the array once the form is received by the
controller but the form has already submitted at that point and it
leaves my url

looking like   country=Chiledata[Search][region]=  on the results
page. I still utilize the data from url on the results page so

data[Search][region]=  is throwing it off especially if the user sorts
the data and the url switches back to region= as it was originally
intended.

I feel like this didn't help any 8-), let me know if I'm still being too vague.

- Ed

On Wed, Jun 16, 2010 at 3:03 AM, John Andersen j.andersen...@gmail.comwrote:

 Please provide more details for us to consider! For a starter I think
 the following would be necessary:
 The code that returns data for your ajax call.
 The code of the view in which the dropdown data is to be used.

 Enjoy,
   John


 On Jun 16, 2:55 am, Ed Propsner crotchf...@gmail.com wrote:
  My last post was a bit misleading ... The way I should have stated it is
  that using array_merge() and unset()
  I was able to structure the array the way that I want it in the
 controller
  action for the search results so it's not throwing
  an error, but it is still showing in the url as 
  country=Chiledata[Search][region]= . The results page has a custom sort
  so when the data is sorted the url changes back to 
 country=Chileregion=
  . I had to alter the controller, view, and a few elements
  to account for the difference and to keep it from giving an error.
 
  What I would like to do is have $this-params array arrive at the
 controller
  already formatted the way I want instead of me
  having to manipulate the array once it get's there.
 [snip]

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

 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.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: Format Array

2010-06-16 Thread John Andersen
Thanks Ed :)

Ok, off the top of my head - I see that every other form field you
specify as:
[code]
$form-input('fieldname', ...);
[/code]
Note, you use only the fieldname without the modelname.
But for the region, you attach Search as the modelname! Have you tried
to remove it?

Does the region view (the one which is returned using Ajax) only
contain the form field without having a form create and end?
What does the HTML look like, when the region is first populated after
you choose a country? Is it defined as:
[code]
... name=data[Search][region] ...
[/code]

You have to make it look like the other fieldnames! (I assume they
differ!)
Enjoy,
   John

On Jun 16, 10:58 am, Ed Propsner crotchf...@gmail.com wrote:
 Sorry about that John, I'm not quite with it today ... i'm a bit under the
 weather.
 This is the part of the view for the search.

 $form-input('country', array(
 'label' = '',
 'type' = 'select',
 'empty' = '-- Select --',
 'selected' = $this-Session-read('Auth.User.country')
 )
   )

 $ajax-observeField('SearchCountry', array(
    'url' = array(
   'action' = 'getRegion'
   ),
    'frequency' = 0.1,
    'update' = 'displayRegion'
    )
  )

 Upon 'onchange' event the selected country id is passed to the controller
 where it queries a new list of regions for that country.

 The controller passes the array of regions to a separate view (perhaps could
 have done this differently?) where a new select element is populated with
 the array of regions.

 $form-input('Search.region', array(
 'label' = '',
 'type' = 'select',
 'options' = $region
 )
  );

 The 'region' select element in the search form sits inside a div and is
 overwritten by the above element.
 The new select element is getting passed into the search form as $this-data
 which makes sense but it's also remaining
 that way when the form submits.

 So now with using GET the form submits as

             [minAge] = 31
             [maxAge] = 41
             [country] = Chile
             [data] = Array
                 (
                     [Search] = Array
                         (
                             [region] = Libertador General Bernardo O'Higgins
                         )

                 )

 I straightened out the array once the form is received by the
 controller but the form has already submitted at that point and it
 leaves my url

 looking like   country=Chiledata[Search][region]=  on the results
 page. I still utilize the data from url on the results page so

 data[Search][region]=  is throwing it off especially if the user sorts
 the data and the url switches back to region= as it was originally
 intended.

 I feel like this didn't help any 8-), let me know if I'm still being too 
 vague.

 - Ed
[snip]

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

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


Re: serious problem with cakephp about CakePHP Auth Component Permissions

2010-06-16 Thread hoss7
this is my code

http://www.box.net/shared/sulzlckko6

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


Filtering results in a list

2010-06-16 Thread DSG
Hi all

I am a complete newbie on this. I have inherited some code and it now
needs altering. At present the code generates a product list and some
of the items in the list are new products. At the top of the list is
an icon and text that becomes the link that allows you to view just
the new products. I now need to remove this text, which is easy
enough, but make the icon become the link.

Here is the code if anyone can help:

[code]
?php

$logo_size = array(18, 17);
$logo_image = ;

echo $html-image('icons/new.png', array(
'alt'='New Product Icon',
'width'=$logo_size[0],
'height'=$logo_size[1],
'border'='0',
'class'='ProductLogo'));

$queryString_newproducts = str_replace(data[Product][check_1]=,
data[Product][check_1]=1, $queryString);
echo $paginator-sort(' New Product', 'product',
array('url'=array('?'=$queryString_newproducts)));

?

[/code]

Any help would be appreciated.

Thanks

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

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


please help me CakePHP Auth Component Permissions

2010-06-16 Thread hoss7
i have this code for user system and CakePHP Auth Component 
Permissions, thsi code is so easy,please download and show me where is
my probelm and fix it if you can

http://www.box.net/shared/sulzlckko6

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


Email component

2010-06-16 Thread Daniel Gbur
hi all,

i have a problem with Email compnent.
when i set the destination adress with a string:

$this-Email-to = 'exampleem...@domain.com';

it's working ok, but when i try to set the destination adress with a
variable:

$to =  'exampleem...@domain.com';
$this-Email-to = $to;

it doesn't work.

i can't find the reason why it's not working.
maybe someone have any idea?

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

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


cakephp console, cake bake

2010-06-16 Thread jjnn
Do i have to change the enviroment path to my cakephp console
everytime i need to bake stuff on a new project?

so like
/home/jonas/lampp/htdocs/cakephp_projectA/cake/console
/home/jonas/lampp/htdocs/cakephp_projectB/cake/console
...etc.

sorry im new to cakephp =)

Thanks /JJ

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 does not work after saving form data to database.

2010-06-16 Thread xpo60rj
I'm new to cakephp. I'm trying to build a newsletters subscription
field that is placed in my footer element. I can not get my page to
redirect back to home after submitting form data to the database along
with email notification. The data is saved to the database and I do
get my confirmation email. Instead of redirecting back to home I
constantly get redirected to a page I have no control over
(example.com/subscriptions/add). What am I doing wrong?

Model (subscription.php):

class Subscription extends AppModel
{
#Define the name of the Model
var $name = Subscription;
var $validate = array(
'email' = array(
'rule' = array('email', true),
'message' = 'Please supply a valid email address.'
)
);
}


Controller (subscriptions_controller.php):

class SubscriptionsController extends AppController
{
var $name = Subscriptions;
var $components = array('Email');


function index() {
$this-set('subscriptions', $this-Subscription-find('all'));
}
function add() {
if (!empty($this-data)) {
if ($this-Subscription-save($this-data)) {
$this-Email-to = $this-data['Subscription']['Email'];
$this-Email-subject = 'Subscription Request';
$this-Email-from = 't...@example.com';
$this-Email-send('TEST');
$this-redirect('/', null, true);
   }
 }
 }
}

View (Subscriptions.ctp):

echo $form-create('Subscription');
echo $form-input('Email', 'Email', array(
'type' = 'varchar'
));
echo $form-end('Submit');

I have this view inside an my footer element using this:

echo $this-element('subscriptions');

This is the contents of the subscriptions/add page i keep getting
redirected to:

To: t...@example.com
From: t...@example.com
Subject: Subscription Request
Header:

From: t...@example.com
X-Mailer: CakePHP Email Component
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bitParameters:

Message:

TEST

1

Can someone help me get this to redirect or how can i control the page
that is being rendered at subscriptions/add? I've tried making an
add.ctp inside a subscriptions folder under views, but that doesnt
seem to do anything.

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 does not work after saving form data to database.

2010-06-16 Thread xpo60rj
I'm new to cakephp. I'm trying to build a newsletters subscription
field that is placed in my footer element. I can not get my page to
redirect back to home after submitting form data to the database along
with email notification. The data is saved to the database and I do
get my confirmation email. Instead of redirecting back to home I
constantly get redirected to a page I have no control over
(example.com/subscriptions/add). What am I doing wrong?

Model (subscription.php):

class Subscription extends AppModel
{
#Define the name of the Model
var $name = Subscription;
var $validate = array(
'email' = array(
'rule' = array('email', true),
'message' = 'Please supply a valid email address.'
)
);
}


Controller (subscriptions_controller.php):

class SubscriptionsController extends AppController
{
var $name = Subscriptions;
var $components = array('Email');


function index() {
$this-set('subscriptions', $this-Subscription-find('all'));
}
function add() {
if (!empty($this-data)) {
if ($this-Subscription-save($this-data)) {
$this-Email-to = $this-data['Subscription']['Email'];
$this-Email-subject = 'Subscription Request';
$this-Email-from = 't...@example.com';
$this-Email-send('TEST');
$this-redirect('/', null, true);
   }
 }
 }
}

View (Subscriptions.ctp):

echo $form-create('Subscription');
echo $form-input('Email', 'Email', array(
'type' = 'varchar'
));
echo $form-end('Submit');

I have this view inside an my footer element using this:

echo $this-element('subscriptions');

This is the contents of the subscriptions/add page i keep getting
redirected to:

To: t...@example.com
From: t...@example.com
Subject: Subscription Request
Header:

From: t...@example.com
X-Mailer: CakePHP Email Component
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bitParameters:

Message:

TEST

1

Can someone help me get this to redirect or how can i control the page
that is being rendered at subscriptions/add? I've tried making an
add.ctp inside a subscriptions folder under views, but that doesnt
seem to do anything.

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


Install cakePHP in Ubuntu 10.04

2010-06-16 Thread Abrão Ximenes
Hello, I am very interested to learn cakePHP, can anyone  send the steps to
me how to install and configure/setting cakePHP in Ubuntu 10.04?

Thanks
Newbie

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


Cupcake forum plugin and Cake 1.3

2010-06-16 Thread Mike
Hi, I have successfully (I think) installed the Cupcake forum plugin
version 1.8 in my CakePHP application. Just one problem: the forum
page comes up in basic html without any css styling. I know the answer
is quite simple but I can't just can't find it. I'd very much
appreciate any suggestions.

Thanks,
Mike

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


Array to XML

2010-06-16 Thread Kyle Decot
I need to take an array that I have and turn it into something similar
to:

items perpage = 20 total = 223 page = 1

item created = ... modified = ...

textsdfsdfkdsjfdsfljdsflkjdsfkldsjf/text

somethingelse thing = foobar /

/item

/items

Is it possible to do this without knowing the exact structure of the
array I'm providing. I want to be able to pass it pretty much anything
as this will be used in a bunch of methods. Thanks for any help you
can provide me with.

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: Offline Manuals

2010-06-16 Thread TW
The script from Dardo works well -

just need to update the get script to point to the 1.3 manual. The
script currently points to the 1.2 manual.

Thanks Dardo.

Tony

On Jun 15, 6:45 am, leo ponton@gmail.com wrote:
 I'm sure they've been posted before, but some of you might find these
 links useful. They link to themanualin one page - useful foroffline
 use or creating a PDF using
 Dardo Sordi Bogado's build 
 script:http://rapidshare.com/files/218826372/manual-builder.zip

 Also see this 
 thread:http://groups.google.com/group/cake-php/browse_thread/thread/5f45c1d0...

 1.2http://book.cakephp.org/complete/3/The-Manual

 1.3http://book.cakephp.org/complete/876/The-Manual

 If anyone can help with api-in-a-page, please post the links!

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

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


cakephp

2010-06-16 Thread asarudeen k
How to retrive image in mysql using cakephp.

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

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


Re: please help me CakePHP Auth Component Permissions

2010-06-16 Thread John Andersen
Don't start a new thread, continue with the old one, in which some of
us already have started to reply to your issue!!

On Jun 16, 11:24 am, hoss7 hoss...@gmail.com wrote:
 i have this code for user system and CakePHP Auth Component 
 Permissions, thsi code is so easy,please download and show me where is
 my probelm and fix it if you can

 http://www.box.net/shared/sulzlckko6

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: serious problem with cakephp about CakePHP Auth Component Permissions

2010-06-16 Thread Jeremy Burns | Class Outfit
Hamed - you need to be clearer about what your problem is else no-one can help 
you.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 16 Jun 2010, at 09:22, hoss7 wrote:

 this is my code
 
 http://www.box.net/shared/sulzlckko6
 
 Check out the new CakePHP Questions site http://cakeqs.org and help others 
 with their CakePHP related questions.
 
 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php?hl=en

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

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


Re: Cupcake forum plugin and Cake 1.3

2010-06-16 Thread Jeremy Burns | Class Outfit
I don't know Cupcake but have had similar issues with other plug ins. Try 
creating a folder within /app/webroot/ with the same name as the plug in 
folder. Then copy the css, img, and js folders (if appropriate) into the new 
folder.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 16 Jun 2010, at 06:10, Mike wrote:

 Hi, I have successfully (I think) installed the Cupcake forum plugin
 version 1.8 in my CakePHP application. Just one problem: the forum
 page comes up in basic html without any css styling. I know the answer
 is quite simple but I can't just can't find it. I'd very much
 appreciate any suggestions.
 
 Thanks,
 Mike
 
 Check out the new CakePHP Questions site http://cakeqs.org and help others 
 with their CakePHP related questions.
 
 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php?hl=en

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

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


Re: cakephp

2010-06-16 Thread Sam Sherlock
Too general a question depend how you set this up or what plugin you use

see
http://book.cakephp.org/view/73/Retrieving-Your-Data

Existing Plugins that handle images
WebTechNick's fileupload plugin
http://www.webtechnick.com/blogs/view/221/CakePHP_File_Upload_Plugin
or
MilesJ Uploader Plugin
http://www.milesj.me/resources/script/uploader-plugin

are both very good
- S




On 16 June 2010 07:44, asarudeen k asarudeen1...@gmail.com wrote:

 How to retrive image in mysql using 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: Offline Manuals

2010-06-16 Thread leo
 just need to update the get script to point to the 1.3 manual. The
 script currently points to the 1.2 manual.

Yes, I should have pointed that out.

For anybody who is confused about using the script, edit .../manual-
builder/get to point to the desired manual using one of the above urls
then in a console change to manual-builder and type ./get.
Alternatively type wget http://book.cakephp.org/complete/3 -O The-
Manual at the cursor (or wget http://book.cakephp.org/complete/876  -
O The-Manual), without the quote marks of course.

You will now have the one-page html manual in whichever folder you
were in when you executed the command, named 'The-Manual' (the last
parameter of the wget command). Now, to build the pdf, enter the
command ./build (the downloaded html manual needs to be in the same
location as build, i.e. .../manual-builder/).

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: Format Array

2010-06-16 Thread Ed Propsner
I removed the model name (Search) from the field(s) and the result was the
same ... minus [Search] in the array (obviously).
All the field names are now uniform with both the search view and the ajax
view.

The region view (returned) via ajax simply echoes the region field and that
is all.
I didn't see the need for a form create or end.

If I follow you correctly on the HTML thing, when the page initially loads
the HTML is as you would expect select name=region id=SearchRegion
or I am not following you on that one?

At first I was inclined to think that it had something to do with the Ajax,
but now I just confused 8-) Even though the (ajax) region is submitting with
the rest of the form ($this-params) it's still being treated as it's own
element which makes sense because it started off as it's own element and was
introduced to the form after the fact. Does that make any sense?

The reason I made the comment in my earlier post about going about this
differently is because if I was able to pass back an array of new regions
and reload the existing region field with that array instead of passing back
a whole new form element (region), I'm thinking none of this would be an
issue.

I guess I need to play around some more because there must be a way to do
that. Cake has been quite the learning experience 8-)

- Ed

On Wed, Jun 16, 2010 at 4:15 AM, John Andersen j.andersen...@gmail.comwrote:

 Thanks Ed :)

 Ok, off the top of my head - I see that every other form field you
 specify as:
 [code]
 $form-input('fieldname', ...);
 [/code]
 Note, you use only the fieldname without the modelname.
 But for the region, you attach Search as the modelname! Have you tried
 to remove it?

 Does the region view (the one which is returned using Ajax) only
 contain the form field without having a form create and end?
 What does the HTML look like, when the region is first populated after
 you choose a country? Is it defined as:
 [code]
 ... name=data[Search][region] ...
 [/code]

 You have to make it look like the other fieldnames! (I assume they
 differ!)
 Enjoy,
John

 On Jun 16, 10:58 am, Ed Propsner crotchf...@gmail.com wrote:
  Sorry about that John, I'm not quite with it today ... i'm a bit under
 the
  weather.
  This is the part of the view for the search.
 
  $form-input('country', array(
  'label' = '',
  'type' = 'select',
  'empty' = '-- Select --',
  'selected' = $this-Session-read('Auth.User.country')
  )
)
 
  $ajax-observeField('SearchCountry', array(
 'url' = array(
'action' = 'getRegion'
),
 'frequency' = 0.1,
 'update' = 'displayRegion'
 )
   )
 
  Upon 'onchange' event the selected country id is passed to the controller
  where it queries a new list of regions for that country.
 
  The controller passes the array of regions to a separate view (perhaps
 could
  have done this differently?) where a new select element is populated with
  the array of regions.
 
  $form-input('Search.region', array(
  'label' = '',
  'type' = 'select',
  'options' = $region
  )
   );
 
  The 'region' select element in the search form sits inside a div and is
  overwritten by the above element.
  The new select element is getting passed into the search form as
 $this-data
  which makes sense but it's also remaining
  that way when the form submits.
 
  So now with using GET the form submits as
 
  [minAge] = 31
  [maxAge] = 41
  [country] = Chile
  [data] = Array
  (
  [Search] = Array
  (
  [region] = Libertador General Bernardo
 O'Higgins
  )
 
  )
 
  I straightened out the array once the form is received by the
  controller but the form has already submitted at that point and it
  leaves my url
 
  looking like   country=Chiledata[Search][region]=  on the results
  page. I still utilize the data from url on the results page so
 
  data[Search][region]=  is throwing it off especially if the user sorts
  the data and the url switches back to region= as it was originally
  intended.
 
  I feel like this didn't help any 8-), let me know if I'm still being too
 vague.
 
  - Ed
 [snip]

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

 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.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 

Re: CakePHP

2010-06-16 Thread leo
Ubuntu and Debian are quirky when it comes to Apache. Hopefully this
will help:

http://leoponton.blogspot.com/2010/05/getting-cakephp-up-and-running-on.html



On 14 June, 17:07, Abrão Ximenes abraoxime...@gmail.com wrote:
 can you send the steps how to install and configure cakePHP in Ubuntu 10.04
 LTS Lucid Lynx???
 Thanks

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

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


Re: CakePHP

2010-06-16 Thread leo
Ubuntu and Debian are quirky when it comes to Apache. Hopefully this
will help:

http://leoponton.blogspot.com/2010/05/getting-cakephp-up-and-running-on.html



On 14 June, 17:07, Abrão Ximenes abraoxime...@gmail.com wrote:
 can you send the steps how to install and configure cakePHP in Ubuntu 10.04
 LTS Lucid Lynx???
 Thanks

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

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


Re: CakePHP

2010-06-16 Thread leo
Ubuntu and Debian are quirky when it comes to Apache. Hopefully this
will help:

http://leoponton.blogspot.com/2010/05/getting-cakephp-up-and-running-on.html



On 14 June, 17:07, Abrão Ximenes abraoxime...@gmail.com wrote:
 can you send the steps how to install and configure cakePHP in Ubuntu 10.04
 LTS Lucid Lynx???
 Thanks

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

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


Error when running cakephp

2010-06-16 Thread Abrão Ximenes
How to fix the following problems? :

*Notice* (8) javascript:void(0);: Use of undefined constant
‘Security - assumed '‘Security' [*APP/config/core.php*, line *203*]

*Notice* (8) javascript:void(0);: Use of undefined constant salt’ -
assumed 'salt’' [*APP/config/core.php*, line *203*]

*Notice* (8) javascript:void(0);: Use of undefined constant
‘UubWwvniR2G0FgaC9miDYhG93b0qyJfIxfs2guVo’ - assumed
'‘UubWwvniR2G0FgaC9miDYhG93b0qyJfIxfs2guVo’' [*APP/config/core.php*,
line *203*]

*Notice* (1024) javascript:void(0);: Please change the value of
'Security.cipherSeed' in app/config/core.php to a numeric (digits
only) seed value specific to your application
[*CORE/cake/libs/debugger.php*, line *688*]


Thanks

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

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


Re: Cupcake forum plugin and Cake 1.3

2010-06-16 Thread euromark
i wrote miles an email about that
among other things

didnt get n answer...


On 16 Jun., 10:44, Jeremy Burns | Class Outfit
jeremybu...@classoutfit.com wrote:
 I don't know Cupcake but have had similar issues with other plug ins. Try 
 creating a folder within /app/webroot/ with the same name as the plug in 
 folder. Then copy the css, img, and js folders (if appropriate) into the new 
 folder.

 Jeremy Burns
 Class Outfit

 jeremybu...@classoutfit.comhttp://www.classoutfit.com

 On 16 Jun 2010, at 06:10, Mike wrote:

  Hi, I have successfully (I think) installed the Cupcake forum plugin
  version 1.8 in my CakePHP application. Just one problem: the forum
  page comes up in basic html without any css styling. I know the answer
  is quite simple but I can't just can't find it. I'd very much
  appreciate any suggestions.

  Thanks,
  Mike

  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: Format Array

2010-06-16 Thread John Andersen
Good luck Ed, hope someone else can give you some better advice! I
unfortunately haven't played around with Ajax as much, so can't shed
any light on the issue!
Enjoy,
   John

On Jun 16, 11:59 am, Ed Propsner crotchf...@gmail.com wrote:
 I removed the model name (Search) from the field(s) and the result was the
 same ... minus [Search] in the array (obviously).
 All the field names are now uniform with both the search view and the ajax
 view.

 The region view (returned) via ajax simply echoes the region field and that
 is all.
 I didn't see the need for a form create or end.

 If I follow you correctly on the HTML thing, when the page initially loads
 the HTML is as you would expect select name=region id=SearchRegion
 or I am not following you on that one?

 At first I was inclined to think that it had something to do with the Ajax,
 but now I just confused 8-) Even though the (ajax) region is submitting with
 the rest of the form ($this-params) it's still being treated as it's own
 element which makes sense because it started off as it's own element and was
 introduced to the form after the fact. Does that make any sense?

 The reason I made the comment in my earlier post about going about this
 differently is because if I was able to pass back an array of new regions
 and reload the existing region field with that array instead of passing back
 a whole new form element (region), I'm thinking none of this would be an
 issue.

 I guess I need to play around some more because there must be a way to do
 that. Cake has been quite the learning experience 8-)

 - Ed
[snip]

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

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


Re: cakephp console, cake bake

2010-06-16 Thread Shaz
http://cakephp.org/screencasts/view/7

On Jun 15, 8:32 pm, jjnn jn.nor...@gmail.com wrote:
 Do i have to change the enviroment path to my cakephp console
 everytime i need to bake stuff on a new project?

 so like
 /home/jonas/lampp/htdocs/cakephp_projectA/cake/console
 /home/jonas/lampp/htdocs/cakephp_projectB/cake/console
 ...etc.

 sorry im new to cakephp =)

 Thanks /JJ

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: Error when running cakephp

2010-06-16 Thread John Andersen
Check that you have not deleted the quotes around your constants!!!
Your code should contain something similar as this:

[code]
Configure::write('Security.salt',
'UubWwvniR2G0FgaC9miDYhG93b0qyJfIxfs2guVo');
[/code]

Enjoy,
   John

On Jun 16, 12:12 pm, Abrão Ximenes abraoxime...@gmail.com wrote:
 How to fix the following problems? :

 *Notice* (8) javascript:void(0);: Use of undefined constant
 ‘Security - assumed '‘Security' [*APP/config/core.php*, line *203*]

 *Notice* (8) javascript:void(0);: Use of undefined constant salt’ -
 assumed 'salt’' [*APP/config/core.php*, line *203*]

 *Notice* (8) javascript:void(0);: Use of undefined constant
 ‘UubWwvniR2G0FgaC9miDYhG93b0qyJfIxfs2guVo’ - assumed
 '‘UubWwvniR2G0FgaC9miDYhG93b0qyJfIxfs2guVo’' [*APP/config/core.php*,
 line *203*]

 *Notice* (1024) javascript:void(0);: Please change the value of
 'Security.cipherSeed' in app/config/core.php to a numeric (digits
 only) seed value specific to your application
 [*CORE/cake/libs/debugger.php*, line *688*]

 Thanks

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

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


Re: Format Array

2010-06-16 Thread Ed Propsner
No prob, thanks a bunch John! I'll keep tinkering and I'm sure I'll come up
with something. The worst that can happen is I learn something new 8-).

On Wed, Jun 16, 2010 at 5:27 AM, John Andersen j.andersen...@gmail.comwrote:

 Good luck Ed, hope someone else can give you some better advice! I
 unfortunately haven't played around with Ajax as much, so can't shed
 any light on the issue!
 Enjoy,
John

 On Jun 16, 11:59 am, Ed Propsner crotchf...@gmail.com wrote:
  I removed the model name (Search) from the field(s) and the result was
 the
  same ... minus [Search] in the array (obviously).
  All the field names are now uniform with both the search view and the
 ajax
  view.
 
  The region view (returned) via ajax simply echoes the region field and
 that
  is all.
  I didn't see the need for a form create or end.
 
  If I follow you correctly on the HTML thing, when the page initially
 loads
  the HTML is as you would expect select name=region
 id=SearchRegion
  or I am not following you on that one?
 
  At first I was inclined to think that it had something to do with the
 Ajax,
  but now I just confused 8-) Even though the (ajax) region is submitting
 with
  the rest of the form ($this-params) it's still being treated as it's own
  element which makes sense because it started off as it's own element and
 was
  introduced to the form after the fact. Does that make any sense?
 
  The reason I made the comment in my earlier post about going about this
  differently is because if I was able to pass back an array of new regions
  and reload the existing region field with that array instead of passing
 back
  a whole new form element (region), I'm thinking none of this would be an
  issue.
 
  I guess I need to play around some more because there must be a way to do
  that. Cake has been quite the learning experience 8-)
 
  - Ed
 [snip]

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

 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.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: Install cakePHP in Ubuntu 10.04

2010-06-16 Thread Zaky Katalan-Ezra
install LAMP http://www.howtoforge.com/ubuntu_lamp_for_newbies
Unzip the cakephp where ever you like, home/zaky/cakephpproj/ for example.
under /var/www create a link you your site
cd /var/www
sudo ln -s home/zaky/cakephpproj/ mynewapp

chmod 777 app/tmp

update app/config/database.php with you database details.

http://localhost/mynewapp


On Tue, Jun 15, 2010 at 6:34 PM, Abrão Ximenes abraoxime...@gmail.comwrote:

 Hello, I am very interested to learn cakePHP, can anyone  send the steps to
 me how to install and configure/setting cakePHP in Ubuntu 10.04?

 Thanks
 Newbie

 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




-- 
Regards,
Zaky Katalan-Ezra
QA Administrator
www.IGeneriX.com
Sites.IGeneriX.com
054-7762312

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: Error when running cakephp

2010-06-16 Thread arif hossen
Dear,

Change your security salt value:
Give some value in security salt as your wish.


Configure::write('Security.
salt', 'abcxyzfIxfs2guVo');




On Wed, Jun 16, 2010 at 4:30 PM, John Andersen j.andersen...@gmail.comwrote:

 Check that you have not deleted the quotes around your constants!!!
 Your code should contain something similar as this:

 [code]
 Configure::write('Security.salt',
 'UubWwvniR2G0FgaC9miDYhG93b0qyJfIxfs2guVo');
 [/code]

 Enjoy,
   John

 On Jun 16, 12:12 pm, Abrão Ximenes abraoxime...@gmail.com wrote:
  How to fix the following problems? :
 
  *Notice* (8) javascript:void(0);: Use of undefined constant
  ‘Security - assumed '‘Security' [*APP/config/core.php*, line *203*]
 
  *Notice* (8) javascript:void(0);: Use of undefined constant salt’ -
  assumed 'salt’' [*APP/config/core.php*, line *203*]
 
  *Notice* (8) javascript:void(0);: Use of undefined constant
  ‘UubWwvniR2G0FgaC9miDYhG93b0qyJfIxfs2guVo’ - assumed
  '‘UubWwvniR2G0FgaC9miDYhG93b0qyJfIxfs2guVo’' [*APP/config/core.php*,
  line *203*]
 
  *Notice* (1024) javascript:void(0);: Please change the value of
  'Security.cipherSeed' in app/config/core.php to a numeric (digits
  only) seed value specific to your application
  [*CORE/cake/libs/debugger.php*, line *688*]
 
  Thanks

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

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




-- 
Regards,
Mohammad Arif Hossen
Software Enginner at
Epsilon Consulting and Development Services(ECDS)
www.ecds-tech.com
www.arifhossen.wordpress.com
+88 01714355911

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: Automagic Form (Drop down list)

2010-06-16 Thread leo
 usually you dont pass the dummy field via controller
 there is an empty field param for it

 echo $this-Form-input('category_id', array('options'=$cats,
 'empty='dummyName');

I prefer to handle this kind of logic in the controller.

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: Updating is creating new record

2010-06-16 Thread WhyNotSmile
Thanks for all the replies.

I got it working by using updateAll, as Sergei suggested.  Still not
sure why it wasn't working, but at least it is now!

Thanks again for all the help.

Sharon



On 14 June, 03:30, Sergei yatse...@gmail.com wrote:
 Try this

 $user['User']['id']=...
 $user['User']['field']=...
 $user['User']['anotherfield']=...
 $this-save($user);

 also there is updateAll() function.

 On Jun 13, 5:05 am, WhyNotSmile sharongilmor...@gmail.com wrote:

  Thanks John, but saveField isn't doing the job either.

  Sharon

  On 12 June, 18:07, John Andersen j.andersen...@gmail.com wrote:

   Can you just use $this-saveField('friend_list', $friendslist) instead
   of $this-save()?
   Enjoy,
      John

   On Jun 12, 7:57 pm, WhyNotSmile sharongilmor...@gmail.com wrote:

I'm trying to update a field in a record, using the following code:

   $this-id = $user['User']['id'];
   $this-set('friends_list', $friendslist);
   $this-save();

The record with id $user['User']['id'] exists in the db; I'm just
trying to update the friends_list field.

When I do this, though, it creates a whole new record - I thought that
if id was set, then it updated the record with that id?  If I
explicitly set id, e.g.:

$this-set(array('friends_list = $friendslist, $id = $user['User']
['id']));

if complains that a record with the primary key $user['User']['id']
already exists.

Does anyone know what I'm doing wrong?  Thanks!

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

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


Re: Install cakePHP in Ubuntu 10.04

2010-06-16 Thread leo
Installing AMP on Ubuntu is trivial. The confusing part is getting
CakePHP to work. It is not out-of-the-box because the Ubuntu default
Apache config doesn't include mod_rewrite. Even when you have that set
up, there is some Debian-ness to contend with. The trick is finding
the right files to alter and making the right alterations, hence my
earlier post linking to 
http://leoponton.blogspot.com/2010/05/getting-cakephp-up-and-running-on.html.

On 16 June, 10:46, Zaky Katalan-Ezra procsh...@gmail.com wrote:
 install LAMPhttp://www.howtoforge.com/ubuntu_lamp_for_newbies
 Unzip the cakephp where ever you like, home/zaky/cakephpproj/ for example.
 under /var/www create a link you your site
 cd /var/www
 sudo ln -s home/zaky/cakephpproj/ mynewapp

 chmod 777 app/tmp

 update app/config/database.php with you database details.

 http://localhost/mynewapp

 On Tue, Jun 15, 2010 at 6:34 PM, Abrão Ximenes abraoxime...@gmail.comwrote:



  Hello, I am very interested to learn cakePHP, can anyone  send the steps to
  me how to install and configure/setting cakePHP in Ubuntu 10.04?

  Thanks
  Newbie

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

 --
 Regards,
 Zaky Katalan-Ezra
 QA Administratorwww.IGeneriX.com
 Sites.IGeneriX.com
 054-7762312

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: Email component

2010-06-16 Thread Dilip Godhani
Hello
Use this
its work may ne

$to =  'exampleem...@domain.com';
$this-Email-to = $to;


Best luck
BYe BYe

On Wed, Jun 16, 2010 at 12:25 AM, Daniel Gbur daniel.g...@gmail.com wrote:

 hi all,

 i have a problem with Email compnent.
 when i set the destination adress with a string:

 $this-Email-to = 'exampleem...@domain.com';

 it's working ok, but when i try to set the destination adress with a
 variable:

 $to =  'exampleem...@domain.com';
 $this-Email-to = $to;

 it doesn't work.

 i can't find the reason why it's not working.
 maybe someone have any idea?

 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




-- 
Dilip Godhani
Jr Software Developer, Entourage Solutions
e-mail: di...@entouragesolutions.com
  dilip.godh...@gmail.com
Web.: www.entouragesolutions.com
m. 9913822582

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


Email Component and Model

2010-06-16 Thread Andrei Mita
Hello,

I have a model Email that conflicts with the component when I try to send
emails. I have researched the group and saw that other people had the same
issue but did not find a solution. Is there a standard way to deal with the
problem or do I have to rename my model, controller and view folder?

Thanks,
Andrei

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: Email Component and Model

2010-06-16 Thread jodator
I had the same issue ;) Fastest: rename model or component.

Or you could try use email model in controller like this (I havn't
tested it before):

$uses = array('MyOtherModel');

...
function mail_me($id) {
$emailModel = ClassRegistry::init('Model');
$emailField = $emailModel-find('email', array('id' = 666) );

// or

$emailField = ClassRegistry::init('Model')-find('email', array('id'
= 666) );

$this-email-to = emailField;

//I don't know how to dinamically load components

}


On Jun 16, 1:20 pm, Andrei Mita andrei.m...@gmail.com wrote:
 Hello,

 I have a model Email that conflicts with the component when I try to send
 emails. I have researched the group and saw that other people had the same
 issue but did not find a solution. Is there a standard way to deal with the
 problem or do I have to rename my model, controller and view folder?

 Thanks,
 Andrei

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: Email Component and Model

2010-06-16 Thread Andrei Mita
How can I rename the E-mail component?


On Wed, Jun 16, 2010 at 3:26 PM, jodator joda...@gmail.com wrote:

 I had the same issue ;) Fastest: rename model or component.

 Or you could try use email model in controller like this (I havn't
 tested it before):

 $uses = array('MyOtherModel');

 ...
 function mail_me($id) {
 $emailModel = ClassRegistry::init('Model');
 $emailField = $emailModel-find('email', array('id' = 666) );

 // or

 $emailField = ClassRegistry::init('Model')-find('email', array('id'
 = 666) );

 $this-email-to = emailField;

 //I don't know how to dinamically load components

 }


 On Jun 16, 1:20 pm, Andrei Mita andrei.m...@gmail.com wrote:
  Hello,
 
  I have a model Email that conflicts with the component when I try to send
  emails. I have researched the group and saw that other people had the
 same
  issue but did not find a solution. Is there a standard way to deal with
 the
  problem or do I have to rename my model, controller and view folder?
 
  Thanks,
  Andrei

 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


10 PHP code snippets for working with strings

2010-06-16 Thread amiable_indian

Some of the snippets might be good enough to be added to the
framework.

http://www.catswhocode.com/blog/10-php-code-snippets-for-working-with-strings

-amiable

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: Filtering results in a list

2010-06-16 Thread Sam
http://book.cakephp.org/view/835/image

Ad the 'url' option to the options array for your image.

echo $html-image('icons/new.png', array(
'alt'='New Product Icon',
'width'=$logo_size[0],
'height'=$logo_size[1],
'border'='0',
'class'='ProductLogo',
'url' = array('?'=$queryString_newproducts)
));


On Jun 15, 8:39 am, DSG darren.creative...@gmail.com wrote:
 Hi all

 I am a complete newbie on this. I have inherited some code and it now
 needs altering. At present the code generates a product list and some
 of the items in the list are new products. At the top of the list is
 an icon and text that becomes the link that allows you to view just
 the new products. I now need to remove this text, which is easy
 enough, but make the icon become the link.

 Here is the code if anyone can help:

 [code]
 ?php

 $logo_size = array(18, 17);
 $logo_image = ;

 echo $html-image('icons/new.png', array(
 'alt'='New Product Icon',
 'width'=$logo_size[0],
 'height'=$logo_size[1],
 'border'='0',
 'class'='ProductLogo'));

 $queryString_newproducts = str_replace(data[Product][check_1]=,
 data[Product][check_1]=1, $queryString);
 echo $paginator-sort(' New Product', 'product',
 array('url'=array('?'=$queryString_newproducts)));

 ?

 [/code]

 Any help would be appreciated.

 Thanks

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

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


Re: 10 PHP code snippets for working with strings

2010-06-16 Thread euromark
some of them already are


On 16 Jun., 14:57, amiable_indian mithu.si...@gmail.com wrote:
 Some of the snippets might be good enough to be added to the
 framework.

 http://www.catswhocode.com/blog/10-php-code-snippets-for-working-with...

 -amiable

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: Error when running cakephp

2010-06-16 Thread Abrão Ximenes
I got a new problem as the following:

Please change the value of 'Security.cipherSeed' in
app/config/core.php to a numeric (digits only) seed value specific to
your application [*CORE/cake/libs/debugger.php*, line *688*]

How to change the following line ( in var/www/cakephp/app/config/core.php):

Configure::write('Security.cipherSeed', '76859309657453542496749683645');

Thanks


On Wed, Jun 16, 2010 at 4:48 PM, arif hossen arifhossen2...@gmail.comwrote:

 Dear,

 Change your security salt value:
 Give some value in security salt as your wish.


 Configure::write('Security.
 salt', 'abcxyzfIxfs2guVo');




 On Wed, Jun 16, 2010 at 4:30 PM, John Andersen j.andersen...@gmail.comwrote:

 Check that you have not deleted the quotes around your constants!!!
 Your code should contain something similar as this:

 [code]
 Configure::write('Security.salt',
 'UubWwvniR2G0FgaC9miDYhG93b0qyJfIxfs2guVo');
 [/code]

 Enjoy,
   John

 On Jun 16, 12:12 pm, Abrão Ximenes abraoxime...@gmail.com wrote:
  How to fix the following problems? :
 
  *Notice* (8) javascript:void(0);: Use of undefined constant
  ‘Security - assumed '‘Security' [*APP/config/core.php*, line *203*]
 
  *Notice* (8) javascript:void(0);: Use of undefined constant salt’ -
  assumed 'salt’' [*APP/config/core.php*, line *203*]
 
  *Notice* (8) javascript:void(0);: Use of undefined constant
  ‘UubWwvniR2G0FgaC9miDYhG93b0qyJfIxfs2guVo’ - assumed
  '‘UubWwvniR2G0FgaC9miDYhG93b0qyJfIxfs2guVo’' [*APP/config/core.php*,
  line *203*]
 
  *Notice* (1024) javascript:void(0);: Please change the value of
  'Security.cipherSeed' in app/config/core.php to a numeric (digits
  only) seed value specific to your application
  [*CORE/cake/libs/debugger.php*, line *688*]
 
  Thanks

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

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




 --
 Regards,
 Mohammad Arif Hossen
 Software Enginner at
 Epsilon Consulting and Development Services(ECDS)
 www.ecds-tech.com
 www.arifhossen.wordpress.com
 +88 01714355911

  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: Error when running cakephp

2010-06-16 Thread Jeremy Burns | Class Outfit
The errors you are seeing are part of the basic Cake set up process. The 
cipherSeed and salt values should be unique to you - so change the defaults to 
something else. It doesn't really matter what you change it to as they are 
random strings. I'd recommend keeping them the same length as the default. You 
could just change a few characters. The important thing is that once you start 
using them you can't change them - they are used to encrypt and decrypt 
passwords, for example. See 
http://book.cakephp.org/view/931/CakePHP-Core-Configuration-Variables for more 
details.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 16 Jun 2010, at 14:07, Abrão Ximenes wrote:

 I got a new problem as the following: 
 Please change the value of 'Security.cipherSeed' in app/config/core.php to a 
 numeric (digits only) seed value specific to your application 
 [CORE/cake/libs/debugger.php, line 688]
 How to change the following line ( in var/www/cakephp/app/config/core.php):
 
 Configure::write('Security.cipherSeed', '76859309657453542496749683645');
 
 Thanks
 
 
 On Wed, Jun 16, 2010 at 4:48 PM, arif hossen arifhossen2...@gmail.com wrote:
 Dear,
 
 Change your security salt value:
 Give some value in security salt as your wish.
 
 
 Configure::write('Security.
 salt', 'abcxyzfIxfs2guVo');
 
 
 
 
 On Wed, Jun 16, 2010 at 4:30 PM, John Andersen j.andersen...@gmail.com 
 wrote:
 Check that you have not deleted the quotes around your constants!!!
 Your code should contain something similar as this:
 
 [code]
 Configure::write('Security.salt',
 'UubWwvniR2G0FgaC9miDYhG93b0qyJfIxfs2guVo');
 [/code]
 
 Enjoy,
   John
 
 On Jun 16, 12:12 pm, Abrão Ximenes abraoxime...@gmail.com wrote:
  How to fix the following problems? :
 
  *Notice* (8) javascript:void(0);: Use of undefined constant
  ‘Security - assumed '‘Security' [*APP/config/core.php*, line *203*]
 
  *Notice* (8) javascript:void(0);: Use of undefined constant salt’ -
  assumed 'salt’' [*APP/config/core.php*, line *203*]
 
  *Notice* (8) javascript:void(0);: Use of undefined constant
  ‘UubWwvniR2G0FgaC9miDYhG93b0qyJfIxfs2guVo’ - assumed
  '‘UubWwvniR2G0FgaC9miDYhG93b0qyJfIxfs2guVo’' [*APP/config/core.php*,
  line *203*]
 
  *Notice* (1024) javascript:void(0);: Please change the value of
  'Security.cipherSeed' in app/config/core.php to a numeric (digits
  only) seed value specific to your application
  [*CORE/cake/libs/debugger.php*, line *688*]
 
  Thanks
 
 Check out the new CakePHP Questions site http://cakeqs.org and help others 
 with their CakePHP related questions.
 
 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php?hl=en
 
 
 
 -- 
 Regards,
 Mohammad Arif Hossen
 Software Enginner at
 Epsilon Consulting and Development Services(ECDS)
 www.ecds-tech.com
 www.arifhossen.wordpress.com
 +88 01714355911 
 
 
 Check out the new CakePHP Questions site http://cakeqs.org and help others 
 with their CakePHP related questions.
  
 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php?hl=en
 
 
 Check out the new CakePHP Questions site http://cakeqs.org and help others 
 with their CakePHP related questions.
  
 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php?hl=en

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

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


Abrão Ximenes wants to chat

2010-06-16 Thread Abrão Ximenes
---

Abrão Ximenes wants to stay in better touch using some of Google's coolest new
products.

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-5b162645c5-eecdac8af4-45w1skUUbtx-Vt3PXsg54YFdFKk
You'll need to click this link to be able to chat with Abrão Ximenes.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with Abrão Ximenes, visit:
http://mail.google.com/mail/a-5b162645c5-eecdac8af4-45w1skUUbtx-Vt3PXsg54YFdFKk

Gmail offers:
- Instant messaging right inside Gmail
- Powerful spam protection
- Built-in search for finding your messages and a helpful way of organizing
  emails into conversations
- No pop-up ads or untargeted banners - just text ads and related information
  that are relevant to the content of your messages

All this, and its yours for free. But wait, there's more! By opening a Gmail
account, you also get access to Google Talk, Google's instant messaging
service:

http://www.google.com/talk/

Google Talk offers:
- Web-based chat that you can use anywhere, without a download
- A contact list that's synchronized with your Gmail account
- Free, high quality PC-to-PC voice calls when you download the Google Talk
  client

We're working hard to add new features and make improvements, so we might also
ask for your comments and suggestions periodically. We appreciate your help in
making our products even better!

Thanks,
The Google Team

To learn more about Gmail and Google Talk, visit:
http://mail.google.com/mail/help/about.html
http://www.google.com/talk/about.html

(If clicking the URLs in this message does not work, copy and paste them into
the address bar of your browser).

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: : reuseable view

2010-06-16 Thread leo
Or if you're feeling brave, you could edit the templates in ..cake/
console so that your controllers, models and views are created the way
_you_ want them.

On 15 June, 18:21, calvin cal...@rottenrecords.com wrote:
 Yea, I think you'll be hard pressed to find a justification for
 merging all the views together. It could become a maintenance
 nightmare. Besides, cake bake makes generating views quick and
 painless. It literally takes only 2-3 seconds to generate all the
 views for a single controller/model.

 If you're going to spend time working on views and want to eliminate
 duplicate code, I would recommend breaking down repeated view code
 into elements. For example, most of my edit and add views share a form
 element. The element is usually named something like form.user or
 form.rates (allows adding multiple rates at once) and contains
 conditional logic for handling the differences between edit and add
 actions.

 Likewise, another good idea (IMO) I've found is to eliminate the
 actions list that cake bake generates for each view. These actions
 are hardcoded links that can be a pain to update. Some people just
 rebake every time they make changes to model associations to update
 the actions list, but this isn't really an option if you have
 customized views that have been modified after baking. So instead of
 that, I just have an element called actions that I place inside of
 each view, which renders the actions that I specify inside of the
 controller like so:

 var $actions = array(
         array(
                 'label' = 'Explore {%N}',
                 'url' = array('action' = 'explore'),
                 'pass' = true,
                 'on' = array('view', 'edit')
         ),
         array(
                 'label' = 'View {%N}',
                 'url' = array('action' = 'view'),
                 'pass' = true,
                 'on' = array('explore', 'edit')
         ),
         array(
                 'label' = 'Edit {%N}',
                 'url' = array('action' = 'edit'),
                 'pass' = true,
                 'on' = array('view')
         ),
         array(
                 'label' = 'Delete {%N}',
                 'url' = array('action' = 'delete'),
                 'pass' = true,
                 'on' = array('view', 'edit')
         ),
         array(
                 'label' = 'List {%Ns}',
                 'url' = array('action' = 'index')
         ),
         array(
                 'label' = 'List {%Ns}',
                 'url' = array('controller' = 'media_files', 'action' = 
 'index')
         ),
         array(
                 'label' = 'New {%Ns}',
                 'url' = array('controller' = 'media_files', 'action' = 
 'add')
         )
 );

 You can probably also turn associated data tables into elements or
 create helpers that help you generate AJAX tables or something. All of
 this will help you simply your views and reduce repetitive code.

 On Jun 15, 8:44 am, leo ponton@gmail.com wrote:

  Yes, you can do that by having conditional code in the view and
  setting the template:
  $this-render('crudView');

  and a mode in a view variable:
  $this-set('mode','edit');

  In general, you be better off following the accepted way, though, as
  things can get terribly comfusing and complicated if you don't. You're
  not saving paper or electricity by combining into one view. Keep it
  simple and keep it clear.

  On 15 June, 09:35, Mario Simaremare mariosimarem...@gmail.com wrote:

   dear all,

   i am very new with php and the cake. i used to play with java
   actually.
   i would ask you, if there is a way in the cake to create a single view
   file to view, add, and edit then reuse them.
   i mean to use the same view with different models. the views
   automatically detects the table columns and it's header then fill the
   cell with the thrown models data?

   thank you,

   regards,

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: Cupcake forum plugin and Cake 1.3

2010-06-16 Thread Mike
Thanks Jeremy, but unfortunately that does not work. If I click on the
link to take me to the forum, it now displays a directory listing in
the browser instead of the main forum page.

--Mike

On Jun 16, 1:44 am, Jeremy Burns | Class Outfit
jeremybu...@classoutfit.com wrote:
 I don't know Cupcake but have had similar issues with other plug ins. Try 
 creating a folder within /app/webroot/ with the same name as the plug in 
 folder. Then copy the css, img, and js folders (if appropriate) into the new 
 folder.

 Jeremy Burns
 Class Outfit

 jeremybu...@classoutfit.comhttp://www.classoutfit.com

 On 16 Jun 2010, at 06:10, Mike wrote:



  Hi, I have successfully (I think) installed the Cupcake forum plugin
  version 1.8 in my CakePHP application. Just one problem: the forum
  page comes up in basic html without any css styling. I know the answer
  is quite simple but I can't just can't find it. I'd very much
  appreciate any suggestions.

  Thanks,
  Mike

  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: Cupcake forum plugin and Cake 1.3

2010-06-16 Thread Jeremy Burns | Class Outfit
Wow - that's a surprise. I wouldn't have expected any degradation just by 
creating a few new folders. Sorry it don't help.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 16 Jun 2010, at 15:08, Mike wrote:

 Thanks Jeremy, but unfortunately that does not work. If I click on the
 link to take me to the forum, it now displays a directory listing in
 the browser instead of the main forum page.
 
 --Mike
 
 On Jun 16, 1:44 am, Jeremy Burns | Class Outfit
 jeremybu...@classoutfit.com wrote:
 I don't know Cupcake but have had similar issues with other plug ins. Try 
 creating a folder within /app/webroot/ with the same name as the plug in 
 folder. Then copy the css, img, and js folders (if appropriate) into the new 
 folder.
 
 Jeremy Burns
 Class Outfit
 
 jeremybu...@classoutfit.comhttp://www.classoutfit.com
 
 On 16 Jun 2010, at 06:10, Mike wrote:
 
 
 
 Hi, I have successfully (I think) installed the Cupcake forum plugin
 version 1.8 in my CakePHP application. Just one problem: the forum
 page comes up in basic html without any css styling. I know the answer
 is quite simple but I can't just can't find it. I'd very much
 appreciate any suggestions.
 
 Thanks,
 Mike
 
 Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
 with their CakePHP related questions.
 
 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group 
 athttp://groups.google.com/group/cake-php?hl=en
 
 Check out the new CakePHP Questions site http://cakeqs.org and help others 
 with their CakePHP related questions.
 
 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php?hl=en

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

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


set 3d animation as a default layout for a cakephp application

2010-06-16 Thread Swamy
hi .
how to set 3d animation as a default layout for a cakephp application

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: Email Component and Model

2010-06-16 Thread Dr. Loboto
Your should rename model.

On Jun 16, 7:39 pm, Andrei Mita andrei.m...@gmail.com wrote:
 How can I rename the E-mail component?



 On Wed, Jun 16, 2010 at 3:26 PM, jodator joda...@gmail.com wrote:
  I had the same issue ;) Fastest: rename model or component.

  Or you could try use email model in controller like this (I havn't
  tested it before):

  $uses = array('MyOtherModel');

  ...
  function mail_me($id) {
  $emailModel = ClassRegistry::init('Model');
  $emailField = $emailModel-find('email', array('id' = 666) );

  // or

  $emailField = ClassRegistry::init('Model')-find('email', array('id'
  = 666) );

  $this-email-to = emailField;

  //I don't know how to dinamically load components

  }

  On Jun 16, 1:20 pm, Andrei Mita andrei.m...@gmail.com wrote:
   Hello,

   I have a model Email that conflicts with the component when I try to send
   emails. I have researched the group and saw that other people had the
  same
   issue but did not find a solution. Is there a standard way to deal with
  the
   problem or do I have to rename my model, controller and view folder?

   Thanks,
   Andrei

  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.c 
  omFor 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: Email Component and Model

2010-06-16 Thread Andrei Mita
Thanks. Will do.


On Wed, Jun 16, 2010 at 5:21 PM, Dr. Loboto drlob...@gmail.com wrote:

 Your should rename model.

 On Jun 16, 7:39 pm, Andrei Mita andrei.m...@gmail.com wrote:
  How can I rename the E-mail component?
 
 
 
  On Wed, Jun 16, 2010 at 3:26 PM, jodator joda...@gmail.com wrote:
   I had the same issue ;) Fastest: rename model or component.
 
   Or you could try use email model in controller like this (I havn't
   tested it before):
 
   $uses = array('MyOtherModel');
 
   ...
   function mail_me($id) {
   $emailModel = ClassRegistry::init('Model');
   $emailField = $emailModel-find('email', array('id' = 666) );
 
   // or
 
   $emailField = ClassRegistry::init('Model')-find('email', array('id'
   = 666) );
 
   $this-email-to = emailField;
 
   //I don't know how to dinamically load components
 
   }
 
   On Jun 16, 1:20 pm, Andrei Mita andrei.m...@gmail.com wrote:
Hello,
 
I have a model Email that conflicts with the component when I try to
 send
emails. I have researched the group and saw that other people had the
   same
issue but did not find a solution. Is there a standard way to deal
 with
   the
problem or do I have to rename my model, controller and view folder?
 
Thanks,
Andrei
 
   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.com
 cake-php%2bunsubscr...@googlegroups.c omFor 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: Automagic Form (Drop down list)

2010-06-16 Thread Shaz
Whoa! So much info! Thanks all; beginning to like cake more and more
day by day.

I settled for using $displayField in the model; am trying to keep the
controller as skinny as 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.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Validation - specifying which rules to use

2010-06-16 Thread LunarDraco
There are ways to deal with this, often times you need to use
different validation rules for adding a new record vs updating an
existing record. Or sometimes as an administrator you want to be able
to override the validation that is to take place.

Jonathan Snook has posted a pattern of using the multiple validations
based on the controller action that is being called. So it is very
possible to do what you are looking for.
His article is here and should get you moving in the right direction.
If its not a perfect fit, it will at least give you some ideas around
how to specify multiple validations and then select the correct
validation for the current use.
http://snook.ca/archives/cakephp/multiple_validation_sets_cakephp/


On Jun 15, 7:45 am, WhyNotSmile sharongilmor...@gmail.com wrote:
 Is there any way to validate on a restricted set of rules in the
 controller?

 For instance, I have an email address which is validated in the model
 like this:

 var $validate = array(
      'email' = array(
          'maxlength' = array(
              'rule' = array('maxLength',100),
              'message' = 'Email address must be 100 characters or
 less'
           ),
           'notEmpty' = array(
               'rule' = 'notEmpty',
               'message' = 'Please enter your email address'
            ),
           'validEmail' = array(
               'rule' = array('email', false),
               'message' = 'Please enter a valid email address'
            ),
           'unique' = array(
               'rule' = array('isUnique', false),
               'message' = 'This email address has already been
 registered.  If you have forgotten your password, you can get a
 reminder by clicking on the link on the login page'
            )
      )
 )

 At one point I want to validate an email address, but I don't want to
 check that it's unique (because I'm not actually saving it, just
 checking it's otherwise valid).

 So far I have:

 if($this-User-validates(array('fieldList' = array('email' {
  ...

 }

 Is there any way to define which rules I want it to validate against,
 or does it have to do all of them?  I can't find anything on this in
 the validation section of the manual (using v.1.2), so any directions
 would be much appreciated.

 Thanks.

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

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


Re: Abrão Ximenes wants to chat

2010-06-16 Thread Jonathon Musters
Don't spam the group with this type of stuff.


On 6/16/10, Abrão Ximenes abraoxime...@gmail.com wrote:
 ---

 Abrão Ximenes wants to stay in better touch using some of Google's coolest
 new
 products.

 If you already have Gmail or Google Talk, visit:
 http://mail.google.com/mail/b-5b162645c5-eecdac8af4-45w1skUUbtx-Vt3PXsg54YFdFKk
 You'll need to click this link to be able to chat with Abrão Ximenes.

 To get Gmail - a free email account from Google with over 2,800 megabytes of
 storage - and chat with Abrão Ximenes, visit:
 http://mail.google.com/mail/a-5b162645c5-eecdac8af4-45w1skUUbtx-Vt3PXsg54YFdFKk

 Gmail offers:
 - Instant messaging right inside Gmail
 - Powerful spam protection
 - Built-in search for finding your messages and a helpful way of organizing
   emails into conversations
 - No pop-up ads or untargeted banners - just text ads and related
 information
   that are relevant to the content of your messages

 All this, and its yours for free. But wait, there's more! By opening a Gmail
 account, you also get access to Google Talk, Google's instant messaging
 service:

 http://www.google.com/talk/

 Google Talk offers:
 - Web-based chat that you can use anywhere, without a download
 - A contact list that's synchronized with your Gmail account
 - Free, high quality PC-to-PC voice calls when you download the Google Talk
   client

 We're working hard to add new features and make improvements, so we might
 also
 ask for your comments and suggestions periodically. We appreciate your help
 in
 making our products even better!

 Thanks,
 The Google Team

 To learn more about Gmail and Google Talk, visit:
 http://mail.google.com/mail/help/about.html
 http://www.google.com/talk/about.html

 (If clicking the URLs in this message does not work, copy and paste them
 into
 the address bar of your browser).

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

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


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

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


Re: Cupcake forum plugin and Cake 1.3

2010-06-16 Thread Mike
Hi Jeremy:
Ok, a quick search of Miles' support forum revealed the answer: create
a webroot folder under app/plugins/forum and then copy the contents
of forum/vendors to forum/webroot. I hope this is helpful to others.


--M

On Jun 16, 7:10 am, Jeremy Burns | Class Outfit
jeremybu...@classoutfit.com wrote:
 Wow - that's a surprise. I wouldn't have expected any degradation just by 
 creating a few new folders. Sorry it don't help.

 Jeremy Burns
 Class Outfit

 jeremybu...@classoutfit.comhttp://www.classoutfit.com

 On 16 Jun 2010, at 15:08, Mike wrote:



  Thanks Jeremy, but unfortunately that does not work. If I click on the
  link to take me to the forum, it now displays a directory listing in
  the browser instead of the main forum page.

  --Mike

  On Jun 16, 1:44 am, Jeremy Burns | Class Outfit
  jeremybu...@classoutfit.com wrote:
  I don't know Cupcake but have had similar issues with other plug ins. Try 
  creating a folder within /app/webroot/ with the same name as the plug in 
  folder. Then copy the css, img, and js folders (if appropriate) into the 
  new folder.

  Jeremy Burns
  Class Outfit

  jeremybu...@classoutfit.comhttp://www.classoutfit.com

  On 16 Jun 2010, at 06:10, Mike wrote:

  Hi, I have successfully (I think) installed the Cupcake forum plugin
  version 1.8 in my CakePHP application. Just one problem: the forum
  page comes up in basic html without any css styling. I know the answer
  is quite simple but I can't just can't find it. I'd very much
  appreciate any suggestions.

  Thanks,
  Mike

  Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
  with their CakePHP related questions.

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

  Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
  with their CakePHP related questions.

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

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

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


Re: Cupcake forum plugin and Cake 1.3

2010-06-16 Thread keymaster
My first guess would be the css file is not where the code expects it.
Use firebug to see what css files are being requested, and from what
locations.

On Jun 16, 5:10 pm, Jeremy Burns | Class Outfit
jeremybu...@classoutfit.com wrote:
 Wow - that's a surprise. I wouldn't have expected any degradation just by 
 creating a few new folders. Sorry it don't help.

 Jeremy Burns
 Class Outfit

 jeremybu...@classoutfit.comhttp://www.classoutfit.com

 On 16 Jun 2010, at 15:08, Mike wrote:

  Thanks Jeremy, but unfortunately that does not work. If I click on the
  link to take me to the forum, it now displays a directory listing in
  the browser instead of the main forum page.

  --Mike

  On Jun 16, 1:44 am, Jeremy Burns | Class Outfit
  jeremybu...@classoutfit.com wrote:
  I don't know Cupcake but have had similar issues with other plug ins. Try 
  creating a folder within /app/webroot/ with the same name as the plug in 
  folder. Then copy the css, img, and js folders (if appropriate) into the 
  new folder.

  Jeremy Burns
  Class Outfit

  jeremybu...@classoutfit.comhttp://www.classoutfit.com

  On 16 Jun 2010, at 06:10, Mike wrote:

  Hi, I have successfully (I think) installed the Cupcake forum plugin
  version 1.8 in my CakePHP application. Just one problem: the forum
  page comes up in basic html without any css styling. I know the answer
  is quite simple but I can't just can't find it. I'd very much
  appreciate any suggestions.

  Thanks,
  Mike

  Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
  with their CakePHP related questions.

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

  Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
  with their CakePHP related questions.

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

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

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


Re: Cupcake forum plugin and Cake 1.3

2010-06-16 Thread Miles J
Sorry, the plugin is meant for 1.2 only.

There are plans for a 1.3 version, but it wont be for a while.

On Jun 16, 10:03 am, Mike mluff...@gmail.com wrote:
 Hi Jeremy:
 Ok, a quick search of Miles' support forum revealed the answer: create
 a webroot folder under app/plugins/forum and then copy the contents
 of forum/vendors to forum/webroot. I hope this is helpful to others.

 --M

 On Jun 16, 7:10 am, Jeremy Burns | Class Outfit

 jeremybu...@classoutfit.com wrote:
  Wow - that's a surprise. I wouldn't have expected any degradation just by 
  creating a few new folders. Sorry it don't help.

  Jeremy Burns
  Class Outfit

  jeremybu...@classoutfit.comhttp://www.classoutfit.com

  On 16 Jun 2010, at 15:08, Mike wrote:

   Thanks Jeremy, but unfortunately that does not work. If I click on the
   link to take me to the forum, it now displays a directory listing in
   the browser instead of the main forum page.

   --Mike

   On Jun 16, 1:44 am, Jeremy Burns | Class Outfit
   jeremybu...@classoutfit.com wrote:
   I don't know Cupcake but have had similar issues with other plug ins. 
   Try creating a folder within /app/webroot/ with the same name as the 
   plug in folder. Then copy the css, img, and js folders (if appropriate) 
   into the new folder.

   Jeremy Burns
   Class Outfit

   jeremybu...@classoutfit.comhttp://www.classoutfit.com

   On 16 Jun 2010, at 06:10, Mike wrote:

   Hi, I have successfully (I think) installed the Cupcake forum plugin
   version 1.8 in my CakePHP application. Just one problem: the forum
   page comes up in basic html without any css styling. I know the answer
   is quite simple but I can't just can't find it. I'd very much
   appreciate any suggestions.

   Thanks,
   Mike

   Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers 
   with their CakePHP related questions.

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

   Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
   with their CakePHP related questions.

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

Check out the new CakePHP Questions 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: Email component

2010-06-16 Thread Daniel
my bad, that's working:
$to =  'exampleem...@domain.com';
$this-Email-to = $to;

..typo mistake.

but when i include in my controller a config.php file:
?php
define('EMAIL', 'exam...@domain.com');
?

and try to use EMAIL to set the destination, it doesn't work :-(.
i have tried to set a $email variable with EMAIL and print it out in
view,
it shows the correct adddress, but when i use the EMAIL to set the
destination address for Email componnent it doesn't work.


On 16 Cze, 12:59, Dilip Godhani dilip.godh...@gmail.com wrote:
 Hello
 Use this
 its work may ne

 $to =  'exampleem...@domain.com';
 $this-Email-to = $to;

 Best luck
 BYe BYe





 On Wed, Jun 16, 2010 at 12:25 AM, Daniel Gbur daniel.g...@gmail.com wrote:
  hi all,

  i have a problem with Email compnent.
  when i set the destination adress with a string:

  $this-Email-to = 'exampleem...@domain.com';

  it's working ok, but when i try to set the destination adress with a
  variable:

  $to =  'exampleem...@domain.com';
  $this-Email-to = $to;

  it doesn't work.

  i can't find the reason why it's not working.
  maybe someone have any idea?

  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.c­omFor
   more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en

 --
 Dilip Godhani
 Jr Software Developer, Entourage Solutions
 e-mail: di...@entouragesolutions.com
           dilip.godh...@gmail.com
 Web.:www.entouragesolutions.com
 m. 9913822582

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

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


Ajax tutorials (help)

2010-06-16 Thread hoss7
i want help for ajax in cakephp or sample code or idea

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: Ajax tutorials (help)

2010-06-16 Thread Ed Propsner
http://book.cakephp.org/view/1358/AJAX

On Wed, Jun 16, 2010 at 2:26 PM, hoss7 hoss...@gmail.com wrote:

 i want help for ajax in cakephp or sample code or idea

 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: Automagic Form (Drop down list)

2010-06-16 Thread euromark
good idea :)

@leo
i think its supposed to be in the view - in contradiction to the
default value.
but as with many things - it comes down to personal preferation in the
end


On 16 Jun., 17:27, Shaz shazam...@gmail.com wrote:
 Whoa! So much info! Thanks all; beginning to like cake more and more
 day by day.

 I settled for using $displayField in the model; am trying to keep the
 controller as skinny as 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.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Validation - specifying which rules to use

2010-06-16 Thread calvin
That's pretty clever. Though it would still be nice to have a way to
simply specify which rules to ignore/use--the same way that you can
specify which fields to validate.

On Jun 16, 8:36 am, LunarDraco mdc...@gmail.com wrote:
 There are ways to deal with this, often times you need to use
 different validation rules for adding a new record vs updating an
 existing record. Or sometimes as an administrator you want to be able
 to override the validation that is to take place.

 Jonathan Snook has posted a pattern of using the multiple validations
 based on the controller action that is being called. So it is very
 possible to do what you are looking for.
 His article is here and should get you moving in the right direction.
 If its not a perfect fit, it will at least give you some ideas around
 how to specify multiple validations and then select the correct
 validation for the current 
 use.http://snook.ca/archives/cakephp/multiple_validation_sets_cakephp/

 On Jun 15, 7:45 am, WhyNotSmile sharongilmor...@gmail.com wrote:

  Is there any way to validate on a restricted set of rules in the
  controller?

  For instance, I have an email address which is validated in the model
  like this:

  var $validate = array(
       'email' = array(
           'maxlength' = array(
               'rule' = array('maxLength',100),
               'message' = 'Email address must be 100 characters or
  less'
            ),
            'notEmpty' = array(
                'rule' = 'notEmpty',
                'message' = 'Please enter your email address'
             ),
            'validEmail' = array(
                'rule' = array('email', false),
                'message' = 'Please enter a valid email address'
             ),
            'unique' = array(
                'rule' = array('isUnique', false),
                'message' = 'This email address has already been
  registered.  If you have forgotten your password, you can get a
  reminder by clicking on the link on the login page'
             )
       )
  )

  At one point I want to validate an email address, but I don't want to
  check that it's unique (because I'm not actually saving it, just
  checking it's otherwise valid).

  So far I have:

  if($this-User-validates(array('fieldList' = array('email' {
   ...

  }

  Is there any way to define which rules I want it to validate against,
  or does it have to do all of them?  I can't find anything on this in
  the validation section of the manual (using v.1.2), so any directions
  would be much appreciated.

  Thanks.

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

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


Re: 10 PHP code snippets for working with strings

2010-06-16 Thread calvin
Eh, none of those snippets are particularly clever. They're all either
really obvious or just poorly written (the Twitter, contains(), and
the URL transform ones for example). With the way those snippets are
presented, I thought they'd either help you accomplish difficult tasks
or be elegantly written. Maybe if you're unfamiliar with regular
expressions then you might find the regexp snippets useful; otherwise,
meh...

I mean, does how to use fgetcsv() really warrant a snippet? Or how to
check if a string starts with/contains another string? Anyone can look
up those functions on php.net and figure it out for themselves within
15 seconds. There are much more complicated or less well documented
php functions/classes that would be more worthy of a snippet to
explain their usage--e.g. mcrypt, soap, xml-rpc, etc.

On Jun 16, 5:57 am, amiable_indian mithu.si...@gmail.com wrote:
 Some of the snippets might be good enough to be added to the
 framework.

 http://www.catswhocode.com/blog/10-php-code-snippets-for-working-with...

 -amiable

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: Install cakePHP in Ubuntu 10.04

2010-06-16 Thread calvin
I dunno, I actually got Cake 1.3 set up on a Ubuntu Server (10.4)
server pretty easily. To enable a module that isn't enabled by
default, just use a2enmod. I didn't realize the Ubuntu Apache package
came with that command, so I actually did it manually at first. I also
wasn't used to the modular configurations, which was different from
how it is in Windows. But it's not too hard to figure out. Actually
hammering out the bugs in gnome and the OS itself was much more
challenging than actually setting up the web server and Cake IMO.

The only advice I have is to look at the modules-available directory
before you try to manually change the config files to enable a module.
A lot of the documentation or articles online have a different name
for the mod_rewrite module than the one that is actually used in
Ubuntu. So if you follow those instructions to add the module
manually, it will throw an error saying the file couldn't be found.
But if you just use a2enmod (which just copies the config file from
modules-available to modules-enabled) to enable mod_rewrite, then it
will work perfectly.

On Jun 16, 3:33 am, leo ponton@gmail.com wrote:
 Installing AMP on Ubuntu is trivial. The confusing part is getting
 CakePHP to work. It is not out-of-the-box because the Ubuntu default
 Apache config doesn't include mod_rewrite. Even when you have that set
 up, there is some Debian-ness to contend with. The trick is finding
 the right files to alter and making the right alterations, hence my
 earlier post linking 
 tohttp://leoponton.blogspot.com/2010/05/getting-cakephp-up-and-running-

 On 16 June, 10:46, Zaky Katalan-Ezra procsh...@gmail.com wrote:

  install LAMPhttp://www.howtoforge.com/ubuntu_lamp_for_newbies
  Unzip the cakephp where ever you like, home/zaky/cakephpproj/ for example.
  under /var/www create a link you your site
  cd /var/www
  sudo ln -s home/zaky/cakephpproj/ mynewapp

  chmod 777 app/tmp

  update app/config/database.php with you database details.

 http://localhost/mynewapp

  On Tue, Jun 15, 2010 at 6:34 PM, Abrão Ximenes 
  abraoxime...@gmail.comwrote:

   Hello, I am very interested to learn cakePHP, can anyone  send the steps 
   to
   me how to install and configure/setting cakePHP in Ubuntu 10.04?

   Thanks
   Newbie

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

  --
  Regards,
  Zaky Katalan-Ezra
  QA Administratorwww.IGeneriX.com
  Sites.IGeneriX.com
  054-7762312

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: serious problem with cakephp about CakePHP Auth Component Permissions

2010-06-16 Thread calvin
No one is going to do your work for you (no matter how easy you
claim it is). And you can't become a successful web develop by being a
copy-n-paste programmer. Instead of looking for source code on the
web, just read the documentation for Cake and for the components
you're trying to use. If you still don't get it, try some tutorials.
Then when you run into __specific__ problems with your code, paste a
snippet in your post or use pastebin.com to show us what part of your
code you're having trouble with. Don't just upload a zip file of your
app folder and expect people to debug your program and get it working
for you.

On Jun 15, 10:12 am, hoss7 hoss...@gmail.com wrote:
 hi

 i have serious problem with cakephp about CakePHP Auth Component 
 Permissions

 i am search in the internet and book.cakephp.org and cakeforge.org and
 cakeqs.org
 for find some easy and professional idea(source code) for create
 CakePHP Auth Component - Users, Groups  Permissions but i find noting

 please help me and if you are professional in cakephp send some code
 to my email
  explain step by step(i am new in cake)

 i want sample code like 
 this:http://www.studiocanaria.com/articles/cakephp_auth_component_users_gr...

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: Array to XML

2010-06-16 Thread calvin
There are many ways to convert the same array into XML. How will the
function know which you want? How will it know when you want to add a
value as an attribute or as a textnode?

On Jun 15, 10:34 pm, Kyle Decot kyle.de...@gmail.com wrote:
 I need to take an array that I have and turn it into something similar
 to:

 items perpage = 20 total = 223 page = 1

 item created = ... modified = ...

 textsdfsdfkdsjfdsfljdsflkjdsfkldsjf/text

 somethingelse thing = foobar /

 /item

 /items

 Is it possible to do this without knowing the exact structure of the
 array I'm providing. I want to be able to pass it pretty much anything
 as this will be used in a bunch of methods. Thanks for any help you
 can provide me with.

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

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


Cakephp - Subdirectory - Removing index.php from URLs

2010-06-16 Thread Andrew
Hello,

I recently installed cakephp in a subdirectory directly off the root
directory. To get this working I used the htaccess settings in
Appendix 1 below. However I do have a problem I cannot figure out how
to fix. I've been trying to fix it for a few days now and I have not
been able to find instructions on the Interwebs to get this working.
To get my pretty urls working I have the htaccess files in the right
place and I have made sure my App.baseUrl setting in core.php is
commented out.

My current problem is that at the moment the URLs that are created
are:
http://www.mysite.com/subdirectory/index.php/pages/about-us

But for SEO purposes I would prefer them to be:
http://www.mysite.com/subdirectory/pages/about-us

Appendix 1.
My HTaccess File is placed in subdirectory

IfModule mod_rewrite.c
RewriteEngine on
RewriteRule^subdir$ subdir/app/webroot/[L]
RewriteRule^subdir/(.*) subdir/app/webroot/$1 [L]
 /IfModule

This HTaccess file is placed in subdirectory/app
IfModule mod_rewrite.c
RewriteEngine on
RewriteRule^$webroot/[L]
RewriteRule(.*) webroot/$1[L]
 /IfModule


And this HTaccess file is placed in subdirectory/app/webroot
IfModule mod_rewrite.c
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^subdir/(.*)$ /subdir/app/webroot/index.php?url=$1
[QSA,L]
/IfModule


p.s. I cannot change httpd.conf because of my hosting provider.

Thanks!
Andrew

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: Validation - specifying which rules to use

2010-06-16 Thread LunarDraco

I think supporting that would move the business rules out of the model
and dirty up the controller. If you look at his second method of usage
you can specify a completely different validation set which still
lives in the model. This named validation can have a different set of
fields as well as rules to apply or to ignore. This keeps the model
fat and data centric and gives the controller the option to choose
which set of the model's validation to use. This also makes it cleaner
to test the validation.
On Jun 16, 6:37 pm, calvin cal...@rottenrecords.com wrote:
 That's pretty clever. Though it would still be nice to have a way to
 simply specify which rules to ignore/use--the same way that you can
 specify which fields to validate.

 On Jun 16, 8:36 am, LunarDraco mdc...@gmail.com wrote:



  There are ways to deal with this, often times you need to use
  different validation rules for adding a new record vs updating an
  existing record. Or sometimes as an administrator you want to be able
  to override the validation that is to take place.

  Jonathan Snook has posted a pattern of using the multiple validations
  based on the controller action that is being called. So it is very
  possible to do what you are looking for.
  His article is here and should get you moving in the right direction.
  If its not a perfect fit, it will at least give you some ideas around
  how to specify multiple validations and then select the correct
  validation for the current 
  use.http://snook.ca/archives/cakephp/multiple_validation_sets_cakephp/

  On Jun 15, 7:45 am, WhyNotSmile sharongilmor...@gmail.com wrote:

   Is there any way to validate on a restricted set of rules in the
   controller?

   For instance, I have an email address which is validated in the model
   like this:

   var $validate = array(
        'email' = array(
            'maxlength' = array(
                'rule' = array('maxLength',100),
                'message' = 'Email address must be 100 characters or
   less'
             ),
             'notEmpty' = array(
                 'rule' = 'notEmpty',
                 'message' = 'Please enter your email address'
              ),
             'validEmail' = array(
                 'rule' = array('email', false),
                 'message' = 'Please enter a valid email address'
              ),
             'unique' = array(
                 'rule' = array('isUnique', false),
                 'message' = 'This email address has already been
   registered.  If you have forgotten your password, you can get a
   reminder by clicking on the link on the login page'
              )
        )
   )

   At one point I want to validate an email address, but I don't want to
   check that it's unique (because I'm not actually saving it, just
   checking it's otherwise valid).

   So far I have:

   if($this-User-validates(array('fieldList' = array('email' {
    ...

   }

   Is there any way to define which rules I want it to validate against,
   or does it have to do all of them?  I can't find anything on this in
   the validation section of the manual (using v.1.2), so any directions
   would be much appreciated.

   Thanks.

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

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