Auth component doesn't set session variables !

2011-03-31 Thread damien d
Hi,

I have trouble with the Auth component.

I try something really simple :
 - I create a user db (with name,password field)
 - I use a appcontroler with this code :

var $components = array(Session,Auth);
function beforeFilter() {
$this-Auth-fields = array('username' = 'name',
'password' = 'password');
$this-Auth-loginAction = array('controller' =
'users', 'action' = 'login');
$this-Auth-loginRedirect = array('controller' = 'discs', 
'action'
= 'hello');
$this-Auth-logoutRedirect = '/';
$this-Auth-loginError = 'Invalid name / password
combination.  Please try again';
}

 - I got a classic login.ctp
 - and in my discs_controller :

function beforeFilter() {
$this-Auth-allow(*);
parent::beforeFilter();
}


The issue is, when i log through the login page, i am correctly
redirected, but on the redirect page the Auth variable aren't set.
Here is the content of $session-read() on hello.ctp, after login.
($session-read('Auth.User') is empty);

Array ( [Config] = Array ( [userAgent] = [time] = 1301618408
[timeout] = 10 ) )


I see there is some trouble with some fix on the net so i :
 - Configure::write('Session.checkAgent', false);
 - Configure::write('Security.level', 'low');
in core.php but without any success.

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


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


Re: Auth component doesn't set session variables !

2011-03-31 Thread damien durant
i will try.

In fact it's strange. Because i don't touch anything and it works from my
home computers.
It doesn't from my work, maybe because of proxy setting but it's weird.

On Thu, Mar 31, 2011 at 8:42 PM, cricket zijn.digi...@gmail.com wrote:

 On Thu, Mar 31, 2011 at 10:43 AM, damien d damien.dur...@gmail.com
 wrote:
  Hi,
 
  I have trouble with the Auth component.
 
  I try something really simple :
   - I create a user db (with name,password field)
   - I use a appcontroler with this code :
 
  var $components = array(Session,Auth);
 function beforeFilter() {
 $this-Auth-fields = array('username' = 'name',
  'password' = 'password');
 $this-Auth-loginAction = array('controller' =
  'users', 'action' = 'login');
 $this-Auth-loginRedirect = array('controller' =
 'discs', 'action'
  = 'hello');
 $this-Auth-logoutRedirect = '/';
 $this-Auth-loginError = 'Invalid name / password
  combination.  Please try again';
 }
 
   - I got a classic login.ctp
   - and in my discs_controller :
 
  function beforeFilter() {
 $this-Auth-allow(*);
 parent::beforeFilter();
 }
 
 
  The issue is, when i log through the login page, i am correctly
  redirected, but on the redirect page the Auth variable aren't set.
  Here is the content of $session-read() on hello.ctp, after login.
  ($session-read('Auth.User') is empty);
 
  Array ( [Config] = Array ( [userAgent] = [time] = 1301618408
  [timeout] = 10 ) )
 
 
  I see there is some trouble with some fix on the net so i :
   - Configure::write('Session.checkAgent', false);
   - Configure::write('Security.level', 'low');
  in core.php but without any success.

 Try putting Auth before Session in the $components array.

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


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




-- 
Damien Durant

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


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


Re: Configure datasources plugin

2011-03-04 Thread damien durant
Ok finally i found.

As usually when you spend all this time to fix something, the issue come
from a dumb mistake :

I forget to restart apache after the install/conf of sqlite module ...


Sorry for the inconvinenet.

On Thu, Mar 3, 2011 at 4:48 PM, damien durant damien.dur...@gmail.comwrote:

 Yes, the db file exist.
 I can connect (and i make some insert in) with sqlite3 command line sheel.

 I guess it's readable and writable. For test purpose, i'd just try a chmod
 777 on the db file, without success...


 On Thu, Mar 3, 2011 at 4:41 PM, Ryan Schmidt 
 google-2...@ryandesign.comwrote:

 And there is actually an SQLite database at /var/www/discofy/discotify.db?
 You can open this database using another SQLite client? Is this file and the
 directory it's in readable and writable by the web server process?



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


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




 --
 Damien Durant




-- 
Damien Durant

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


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


Configure datasources plugin

2011-03-03 Thread damien d
Hi,

I'm new on cakephp 1.3.7 and i want to access a sqlite3 db.
So i take a look to datasources plugins (https://github.com/cakephp/
datasources/) that support this kind of database.

I unzip it under app/plugins/datasources, and i configure my database
under database.php :
class DATABASE_CONFIG {

var $default = array(
'driver' = 'Datasources.DboSqlite3',
'host' = '',
'port' = '',
'login' = '',
'password' = '',
'database' = '/var/www/discofy/discotify.db/',
'schema' = '',
'prefix' = '',
'encoding' = ''
);
}


But when i go to cakephp start page , i have :

Your database configuration file is present.
Cake is NOT able to connect to the database.


Any idea to help me ? the readme file isn't enought explicit to help
me as i'm a newbie.

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


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


Re: Configure datasources plugin

2011-03-03 Thread damien durant
Yes i copy the sample under app/config in the same directory.

and when i try to access :
http://localhost/project/
it tell me the config file is ok.



On Thu, Mar 3, 2011 at 2:09 PM, Stephen step...@ninjacodermonkey.co.ukwrote:

 Are you sure you have the correct filename and path?

 /app/config/database.php

 On 3 March 2011 11:13, damien d damien.dur...@gmail.com wrote:

 Hi,

 I'm new on cakephp 1.3.7 and i want to access a sqlite3 db.
 So i take a look to datasources plugins (https://github.com/cakephp/
 datasources/ https://github.com/cakephp/%0Adatasources/) that support
 this kind of database.

 I unzip it under app/plugins/datasources, and i configure my database
 under database.php :
 class DATABASE_CONFIG {

var $default = array(
'driver' = 'Datasources.DboSqlite3',
'host' = '',
'port' = '',
'login' = '',
'password' = '',
'database' = '/var/www/discofy/discotify.db/',
'schema' = '',
'prefix' = '',
'encoding' = ''
 );
 }


 But when i go to cakephp start page , i have :

 Your database configuration file is present.
 Cake is NOT able to connect to the database.


 Any idea to help me ? the readme file isn't enought explicit to help
 me as i'm a newbie.

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


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




 --
 Kind Regards
  Stephen

  http://www.ninjacodermonkey.co.uk


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


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




-- 
Damien Durant

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


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


Re: Configure datasources plugin

2011-03-03 Thread damien durant
Yes, i see that mistake just after my post. I correct it, but same result.

On Thu, Mar 3, 2011 at 4:26 PM, Ryan Schmidt google-2...@ryandesign.comwrote:


 On Mar 3, 2011, at 05:13, damien d wrote:

  I'm new on cakephp 1.3.7 and i want to access a sqlite3 db.
  So i take a look to datasources plugins (https://github.com/cakephp/
  datasources/) that support this kind of database.
 
  I unzip it under app/plugins/datasources, and i configure my database
  under database.php :
  class DATABASE_CONFIG {
 
var $default = array(
'driver' = 'Datasources.DboSqlite3',
'host' = '',
'port' = '',
'login' = '',
'password' = '',
'database' = '/var/www/discofy/discotify.db/',

 There probably shouldn't be a slash at the end, since you're referring to
 an SQLite database file, not a directory.





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


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




-- 
Damien Durant

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


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


Re: Configure datasources plugin

2011-03-03 Thread damien durant
Yes, the db file exist.
I can connect (and i make some insert in) with sqlite3 command line sheel.

I guess it's readable and writable. For test purpose, i'd just try a chmod
777 on the db file, without success...

On Thu, Mar 3, 2011 at 4:41 PM, Ryan Schmidt google-2...@ryandesign.comwrote:

 And there is actually an SQLite database at /var/www/discofy/discotify.db?
 You can open this database using another SQLite client? Is this file and the
 directory it's in readable and writable by the web server process?



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


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




-- 
Damien Durant

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


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


Re: Main index page

2007-05-04 Thread Damien Ransome
also take a look at routes...?

On 5/4/07, djiize [EMAIL PROTECTED] wrote:


 Hi jeffy

 1. to custom the homepage, create the file /app/views/pages/home.thtml
 (or .ctp with Cake 1.2)
 2. search in the manual and group for Pages controller

 On 4 mai, 15:12, jeffy [EMAIL PROTECTED] wrote:
  Hi guys
 
  A newbie question, I can't find the answer:
 
  1. How can I set a main index page for a website?
  There are a lot of manuals, but in every manual there are examples of
  how to createwww.mysite.com/posts/index
  orwww.mysite.com/posts/user. How do I create and index forwww.mysite.com
 ?
  BTW main page must use different header(bigger header image). How can
  I do that?
 
  2. What is a best way for creating static pages (but they must use
  general website layout)
 
  Thanks in advance


 


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



Re: TinyMce Editor issues with firefox

2007-05-01 Thread Damien

I seem to have tinymce working ok (touch wood!).

I followed the bakery article here: 
http://bakery.cakephp.org/articles/view/using-tinymce-with-cakephp
Except I created an element (as someone suggested in the comments)
which makes it a whole load easier.

I'd be happy to share the steps I took to get mine working, but I
never encountered your FF issue so I guess that must be something
related to how you implemented it?

Not sure if it's relevant, but I'm not bothering with AJAX stuff for
this so I haven't taken the precautions mentioned in the related
bakery article here: 
http://bakery.cakephp.org/articles/view/using-tinymce-with-cakephp-and-ajax

On May 1, 10:50 am, Nikhil [EMAIL PROTECTED] wrote:
 Hi,
  I have integrated Tinymce editor in my web script (in Cakephp),
 which is working fine in Internet Explorer but as soon as I switch my
 browser window to Mozilla Firefox, the integration seems to collapse.
 The editor doesn't load at all. I don't know the exact reason as to
 what the problem is.

 I have copied the tinymce editor files in the directory app/webroot/
 js/ directory and also initialised the tinymce editor function on my
 web script. Included all the helpers as well.

 Anyone here who has sorted out these issues..  Please reply...
 Thanx in advance

 Nikhil


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



Re: swiftmailer component error

2007-04-27 Thread Damien

Turns out this was due to my misunderstanding - obviously
swiftMailer_data has to be set() somewhere by the controller; in this
case it's automatically set if you use wrapBody from the swiftMailer
component.

However, having figured that out I'm still having a lot of problems
with this component. I expected it to be really good and perfect for
my needs, but unfortunately a combination of no docs seemingly
available for SwiftMailer v2 itself (i.e. the 3rd party script - only
v3 docs) and poor understanding on my part of how the component should
work are hampering me.

For example, I'm currently struggling to get the to/from addresses
added to the email. I had it earlier today, but using the same code
now and it's just adding the name of the sender/recipient but not
the email. I'm defining as:

$this-SwiftMailer-addTo('to','[EMAIL PROTECTED]','Damien');
$this-SwiftMailer-addTo('from',[EMAIL PROTECTED],recipient
name);

Then sending using:

if(!$this-SwiftMailer-sendView('my test email
subject','test','both')) { ...

In the resulting transaction log, I see this:

[command] = MAIL FROM:
and
[command] = RCPT TO:

(i.e. both are left blank like that). In the email headers, the same
applies, only the names are there (just no email addresses).

I'm using Swift 2.1.17, PHP5, Cake 1.1.14.

Does anyone have any ideas about any of this? I've given up trying to
use layouts, because just using views will work fine for my needs.
However, obviously not sending the email properly kinda works out a
dealbreaker!

Oh, and I'm trying to use the SMTP connection type (native PHP mail()
didn't work as PHP rejected it for some reason, and sendmail just
seemed to do nothing!). I have managed to get 1 single email out of
Swift using SMTP which is why I'm persisting with this...

Thanks in advance for any help or suggestions you can offer!

On Apr 26, 11:11 pm, Damien [EMAIL PROTECTED] wrote:
 Hi,

 I'm having some problems using theswiftmailercomponent described
 here:http://bakery.cakephp.org/articles/view/swiftmailer-component-tutorial

 When I try to send an email using the following code, I find a php
 notice in my logs:

 PHP Notice: Undefined variable: swiftMailer_data in /snip/app/views/
 email_contents/test_html.thtml on line 1

 Here's the code I'm using to send from my controller:

 if($this-SwiftMailer-connect()) {
 $this-SwiftMailer-addTo('to','[EMAIL 
 PROTECTED]','Damien');

 $this-SwiftMailer-

 addTo('from',[EMAIL PROTECTED],from name here);

 if(!$this-SwiftMailer-sendView('my test
 email','test','both')) {
 echo The mailer failed to Send. Errors:;
 pr($this-SwiftMailer-errors());
 }
 } else {
 echo The mailer failed to connect. Errors:;
 pr($this-SwiftMailer-errors());
 }

 FYI, I have the following components in play:
 var $helpers = array('Javascript','DAuth','Html','Form');
 var $components = array('DAuth','RequestHandler','SwiftMailer');

 I'm not receiving the email - I guess because of the error with
 $swiftMailer_data in my (email) view?

 Has anyone got any ideas what's causing this and/or where I should
 look to fix?

 All help and suggestions much appreciated! Thanks.


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



Re: Naming conventions applied to runas entity

2007-04-26 Thread Damien

You need to use the appropriate properties for each object type. I
don't know them all off the top of my head, but $uses contains an
array of models required by a controller - there are similar
properties for the others to allow manual corrections etc. where the
inflections don't work as required.

HTH.

On Apr 26, 10:54 pm, agonirena [EMAIL PROTECTED] wrote:
 Hi everybody!

 I am building my first CakePHP application. I have no idea about how
 should I manage an entity like runas.

 Following naming rules, I have created something like this:

 Database table: [run_as]
 Model file: [run_as.php], with a class named [RunAs]
 Controller file: [run_as_controller.php] with a class named
 [RunAsController]

 When I try to reach this controller, I get a Missing Model, No class
 found for the RunA model error.

 How should I correct this?
 Thanks in advance, AnderG


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



Re: Submitting forms data to a different controller

2007-04-26 Thread Damien

 in the login function in users_controller.php
 I am trying to access the data submitted
 $this-data['User']['username']

How are you defining the fields in your view? If you don't set them
using something like ?php echo $html-input('User/username'); ? (or
equivilent) then I'm pretty sure that you won't be able to access as
you're trying to above...

On Apr 26, 8:30 pm, cooked [EMAIL PROTECTED] wrote:
 yes this what I am trying to do. Here is my directory structure

 pages/home.thtml (view)

 app/controller/users_controller.php (controller)

 in the home.thtml file I submit a form
 like this
 form action=/users/login

 in the login function in users_controller.php
 I am trying to access the data submitted
 $this-data['User']['username']

 But I don't get any data ..

 Thanks again.

 - harsh

 On Apr 26, 11:11 am, rtconner [EMAIL PROTECTED] wrote:

  I'm confused? What is the problem?
  form action=/someothercontroller/action
  ...
  /form

  is this what you want?

  On Apr 26, 12:03 pm, cooked [EMAIL PROTECTED] wrote:

   Is there way to submit forms data to a different controller than the
   one responsible for the
   view. I am using the page controller to render my home page. In the
   home page I have a login
   box, which submits data to /users/login. But in my controller
   users_controller.php function
   login I don't see the data submitted. Is this even possible with
   cakePHP.

   All help appreciated.

   Thanks,
   - harsh- Hide quoted text -

  - Show quoted text -


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



swiftmailer component error

2007-04-26 Thread Damien

Hi,

I'm having some problems using the swiftmailer component described
here: http://bakery.cakephp.org/articles/view/swiftmailer-component-tutorial

When I try to send an email using the following code, I find a php
notice in my logs:

PHP Notice: Undefined variable: swiftMailer_data in /snip/app/views/
email_contents/test_html.thtml on line 1

Here's the code I'm using to send from my controller:

if($this-SwiftMailer-connect()) {
$this-SwiftMailer-
addTo('to','[EMAIL PROTECTED]','Damien');
$this-SwiftMailer-
addTo('from',[EMAIL PROTECTED],from name here);

if(!$this-SwiftMailer-sendView('my test
email','test','both')) {
echo The mailer failed to Send. Errors:;
pr($this-SwiftMailer-errors());
}
} else {
echo The mailer failed to connect. Errors:;
pr($this-SwiftMailer-errors());
}

FYI, I have the following components in play:
var $helpers = array('Javascript','DAuth','Html','Form');
var $components = array('DAuth','RequestHandler','SwiftMailer');

I'm not receiving the email - I guess because of the error with
$swiftMailer_data in my (email) view?

Has anyone got any ideas what's causing this and/or where I should
look to fix?

All help and suggestions much appreciated! Thanks.


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



Re: Session fatal error (database gc)

2007-04-25 Thread Damien

 That is in the core code. Since some install of Linux, namely Debian, Ubuntu
 from what I have seen so far, turn off gc for sessions by default and use a
 cron job to clean them up. Since database session handling relies on the
 normal cleanup PHP uses I had to create a workaround at the framework level
 to handle this on database. I have not checked yet, but it may even effect
 storing sessions anywhere but the php default.

For the record, I've encountered (what I presume to be) this error on
CentOS4. I've copied the changes from the trac ticket into my codebase
and it seems to have helped :)

Damien


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



can you use elements in a layout?

2007-04-25 Thread Damien

Hi,

I'm quite new to working with Cake and I'm pretty sure that I'm asking
something obvious - so I'm sorry for that in advance. In my defence,
I've tried checking the manual, API, searching on here etc. and
haven't found the answer to my question (or maybe not understood the
answer to my question!).

I'm going to have a login box on every page of my site which will form
part of the site header / mast head.

If the user is not logged in it will display the login box, and if
they are it'll display some member-only type functions (e.g. edit
profile, logout etc.).

I'm not quite sure how to go about that in Cake - in terms of where to
define my various pieces of code. Obviously the login processing stuff
belongs in a user controller, but other than that?

I'm thinking that my login box is what Cake terms an 'element' - I've
only come across these used in views; can they also be used in a
layout (is there are significant difference between layouts and
views)?

Assuming that's right, where do I check to see if the user is logged
in or out - is it appropriate (i.e. best practice) to put that logic
in the layout? That seems to make sense to me since it's only deciding
which display element to use?

Thanks in advance for putting up with my questions.

Damien


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



Re: PHP question

2007-04-25 Thread Damien

I'm probably equally new - so I may be wrong...

However, my understanding is that the controller knows which model to
use by the naming conventions. Other than that, it's set in the $uses
property of the controller (where you can define additional models to
be used in a single controller too if needed).

Hope that helps?

Damien


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



Re: PayPal Payflow Pro Integration with CakePHP

2007-04-25 Thread Damien

I'm interested in something like this too, and I'm sure there are
plenty of others, so you may consider adding your work to the bakery
if you do find that you need to code something yourself for this... :)

However, this may help? 
http://bakery.cakephp.org/articles/view/paypal-direct-payment-api-component

I haven't found any other mentions of PayPal / Cake from a quick
Google, so I'm guessing that it isn't something many have done - which
is surprising...


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



Re: html helper: not valid xhtml

2007-04-25 Thread Damien

Presumably you should be using 'password' instead of 'input' anyway
for the above example?

'password' = 'input type=password name=data[%s][%s] %s/'

I'm using 1.1.14 stable and my standard input fields are coming out
fine... (i.e. with the /) - what code are you using in your view to
generate the offending (non XHTML)?

Damien


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



Re: can you use elements in a layout?

2007-04-25 Thread Damien

Now I'm stopping to think about this a bit more, I've got another
question related to this...

How do you actually check to see whether the user is logged in? I was
thinking of setting something to identify the user as logged in for
that visitor's session (e.g. their user_id) - but so far as I
understand, you can only use $this-Session-read() in a controller?
So how can I read the session data from an element?

On Apr 25, 10:16 pm, rtconner [EMAIL PROTECTED] wrote:
 I've used Elements in my layouts frequently. There is no reason not to
 do it. $this-renderElement(...);
 Yes, you can put logic into your layout. Best practices depends on
 your system. If you want to redirect them elsewhere, if they are not
 logged in I'd think you want to do that in a controller or componant.
 If really depends on the auth system you are using.

 I have some simple logic in my layouts that look kind of like this
 (psuedo code)

 if(user-is_logged_in)
   print username
 else
  print a href=loginLog In/a

 On Apr 25, 2:47 pm, Damien [EMAIL PROTECTED] wrote:

  Hi,

  I'm quite new to working with Cake and I'm pretty sure that I'm asking
  something obvious - so I'm sorry for that in advance. In my defence,
  I've tried checking the manual, API, searching on here etc. and
  haven't found the answer to my question (or maybe not understood the
  answer to my question!).

  I'm going to have a login box on every page of my site which will form
  part of the site header / mast head.

  If the user is not logged in it will display the login box, and if
  they are it'll display some member-only type functions (e.g. edit
  profile, logout etc.).

  I'm not quite sure how to go about that in Cake - in terms of where to
  define my various pieces of code. Obviously the login processing stuff
  belongs in a user controller, but other than that?

  I'm thinking that my login box is what Cake terms an 'element' - I've
  only come across these used in views; can they also be used in a
  layout (is there are significant difference between layouts and
  views)?

  Assuming that's right, where do I check to see if the user is logged
  in or out - is it appropriate (i.e. best practice) to put that logic
  in the layout? That seems to make sense to me since it's only deciding
  which display element to use?

  Thanks in advance for putting up with my questions.

  Damien


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



Re: can you use elements in a layout?

2007-04-25 Thread Damien

Sorry - I meant So how can I read the session data from a layout?
(NOT from an element)


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



Re: can you use elements in a layout?

2007-04-25 Thread Damien

Ok. I'll take a look. Many thanks for your help!

On Apr 25, 11:01 pm, rtconner [EMAIL PROTECTED] wrote:
 You are going to need to use an Auth component of some sort. There are
 several available on the bakery. As of yet there is no standard way of
 doing Authentication. I guess look over
 othAuth, dAuth, obAuth, etc and see which one you want to use, and
 then I think you can work from there finding out how you will handle
 accessing authentication data.

 On Apr 25, 3:34 pm, Damien [EMAIL PROTECTED] wrote:

  Now I'm stopping to think about this a bit more, I've got another
  question related to this...

  How do you actually check to see whether the user is logged in? I was
  thinking of setting something to identify the user as logged in for
  that visitor's session (e.g. their user_id) - but so far as I
  understand, you can only use $this-Session-read() in a controller?
  So how can I read the session data from an element?

  On Apr 25, 10:16 pm, rtconner [EMAIL PROTECTED] wrote:

   I've used Elements in my layouts frequently. There is no reason not to
   do it. $this-renderElement(...);
   Yes, you can put logic into your layout. Best practices depends on
   your system. If you want to redirect them elsewhere, if they are not
   logged in I'd think you want to do that in a controller or componant.
   If really depends on the auth system you are using.

   I have some simple logic in my layouts that look kind of like this
   (psuedo code)

   if(user-is_logged_in)
 print username
   else
print a href=loginLog In/a

   On Apr 25, 2:47 pm, Damien [EMAIL PROTECTED] wrote:

Hi,

I'm quite new to working with Cake and I'm pretty sure that I'm asking
something obvious - so I'm sorry for that in advance. In my defence,
I've tried checking the manual, API, searching on here etc. and
haven't found the answer to my question (or maybe not understood the
answer to my question!).

I'm going to have a login box on every page of my site which will form
part of the site header / mast head.

If the user is not logged in it will display the login box, and if
they are it'll display some member-only type functions (e.g. edit
profile, logout etc.).

I'm not quite sure how to go about that in Cake - in terms of where to
define my various pieces of code. Obviously the login processing stuff
belongs in a user controller, but other than that?

I'm thinking that my login box is what Cake terms an 'element' - I've
only come across these used in views; can they also be used in a
layout (is there are significant difference between layouts and
views)?

Assuming that's right, where do I check to see if the user is logged
in or out - is it appropriate (i.e. best practice) to put that logic
in the layout? That seems to make sense to me since it's only deciding
which display element to use?

Thanks in advance for putting up with my questions.

Damien


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



Ways to send emails in Cake 1.1.x

2007-04-23 Thread Damien

Hi,

I'm looking for the best way to send emails in Cake 1.1.x - I
noticed that 1.2 has an email component of some sort (although not
much documentation about it), but I really can't afford to hit bugs
that I'm likely to find in the alpha version so I need to stick with
1.1.x for the moment.

Can anyone point me to some tutorials or reliable components etc. I
could use?

I'm looking for something quite reusable that I can use for things
like:
- Welcome email
- Password reset email

Thanks,
Damien


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



acl.php initdb doesn't work in 1.1.14.4797

2007-04-11 Thread Damien

Hi,

I'm just getting to grips with CakePHP but definitely like what I see.
I'm currently following the IBM tutorial series here -
http://www-128.ibm.com/developerworks/edu/os-dw-os-php-cake1.html

I'm trying to use the php acl.php initdb command to create the ACL
tables in my database, but when I execute this command I get no output
- just returned to the command prompt.

Interestingly, if I use the php acl.php help command that does give me
output - anything else (including commands that aren't defined) don't
give me any output at all.

If it makes any difference, I'm using MySQL 5.0.27, and PHP 5.2.0.

Any idea what's up?

Also, I can't find any other versions of CakePHP besides the 1.2 alpha
and 1.1.14.4797 ones displayed on the homepage... aren't there any
others available for download? I'd prefer to use an older version
which works for the moment as I'm sure I'll create enough problems for
myself without cake bugs creeping in too?


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



Re: ACL broken for any one else in 1.1.14.4797?

2007-04-11 Thread Damien

 gwoo has updated the branch.
 :)

Forgive my noobness, but would I get hold of the updated branch?


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



Re: acl.php initdb doesn't work in 1.1.14.4797

2007-04-11 Thread Damien

Looks like this is https://trac.cakephp.org/ticket/2370

I made the edit described there and now it seems to work ok.

I'd still appreciate any comments about how I could get hold of an
older version (if I find it's needed) as working with such a recent
release for this particular work makes me very nervous!

On Apr 11, 10:47 pm, Damien [EMAIL PROTECTED] wrote:
 Hi,

 I'm just getting to grips with CakePHP but definitely like what I see.
 I'm currently following the IBM tutorial series here 
 -http://www-128.ibm.com/developerworks/edu/os-dw-os-php-cake1.html

 I'm trying to use the php acl.php initdb command to create the ACL
 tables in my database, but when I execute this command I get no output
 - just returned to the command prompt.

 Interestingly, if I use the php acl.php help command that does give me
 output - anything else (including commands that aren't defined) don't
 give me any output at all.

 If it makes any difference, I'm using MySQL 5.0.27, and PHP 5.2.0.

 Any idea what's up?

 Also, I can't find any other versions of CakePHP besides the 1.2 alpha
 and 1.1.14.4797 ones displayed on the homepage... aren't there any
 others available for download? I'd prefer to use an older version
 which works for the moment as I'm sure I'll create enough problems for
 myself without cake bugs creeping in too?


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



Re: acl.php initdb doesn't work in 1.1.14.4797

2007-04-11 Thread Damien

Looks like this is https://trac.cakephp.org/ticket/2370

I made the edit described there and now it seems to work ok.

I'd still appreciate any comments about how I could get hold of an
older version (if I find it's needed) as working with such a recent
release for this particular work makes me very nervous!

On Apr 11, 10:47 pm, Damien [EMAIL PROTECTED] wrote:
 Hi,

 I'm just getting to grips with CakePHP but definitely like what I see.
 I'm currently following the IBM tutorial series here 
 -http://www-128.ibm.com/developerworks/edu/os-dw-os-php-cake1.html

 I'm trying to use the php acl.php initdb command to create the ACL
 tables in my database, but when I execute this command I get no output
 - just returned to the command prompt.

 Interestingly, if I use the php acl.php help command that does give me
 output - anything else (including commands that aren't defined) don't
 give me any output at all.

 If it makes any difference, I'm using MySQL 5.0.27, and PHP 5.2.0.

 Any idea what's up?

 Also, I can't find any other versions of CakePHP besides the 1.2 alpha
 and 1.1.14.4797 ones displayed on the homepage... aren't there any
 others available for download? I'd prefer to use an older version
 which works for the moment as I'm sure I'll create enough problems for
 myself without cake bugs creeping in too?


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