Re: Clearing Cookies

2006-08-25 Thread Simplerules

I do, but it is always cleared.

I set it to last for ten years, but when I revisit the site after a
session has expired - the cookies are cleared, its not a browser
problem or setting since it happens to Opera and IE.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



AJAX - Filling a dropdown

2006-08-24 Thread Simplerules

Is there a way to fill a dropdown using AJAX? (I have prototype and
script.alico.us).


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Giving a Form a Name

2006-08-24 Thread Simplerules

Is it possible to assign a name tag to a form generated using the
helper?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Loading Time

2006-08-24 Thread Simplerules

When using the layout AJAX to output data, a HTML comment with loading
time is added and it is screwing up my scripts.

How can I remove it?

I checked the AJAX layout file and can't see it.


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



Re: Checkbox Problem

2006-08-24 Thread Simplerules

I guess the CakePHP manual is out of date:
checkbox
string $fieldName
array $htmlAttributes
boolean $return = false


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Pages

2006-08-24 Thread Simplerules

What purpose does the pages folder in views serve?


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



Re: Pages

2006-08-24 Thread Simplerules

I created page1.thtml in the views/pages but got this errror when I try
to view pages/page1

Missing Method in PagesController

You are seeing this error because the action page1 is not defined in
controller PagesController

Notice: this error is being rendered by the
app/views/errors/missing_action.thtml view file, a user-customizable
error page for handling invalid action dispatches.

Fatal: Create Method:

?php
class PagesController extends AppController
{
function page1()
{

}
}
?

in file : app\controllers\pages_controller.php

Error: Unable to execute action page1 in PagesController


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Generate Password

2006-08-23 Thread Simplerules

I am writing a Users Controller and need to generate a password if
somebody has forgotten theirs, what is the cleanest way to generate a
short password with numbers and letters?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



AJAX - Form Validation

2006-08-23 Thread Simplerules

I am trying to use AJAX to validate a form, I have a tick box next to
my register form inputs. So when a user enters a username, I want the
javascript to call the script and get a response wether the username is
taken.

I have looked at the AJAX helper manual and can't find much to help me,
I've looked at the script.aculo.us site and not found an example of
this and I do not have the faintest idea how to construct it.

Could somebody give the basic instructions or code?

:)


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



Re: AJAX - Form Validation

2006-08-23 Thread Simplerules

I tried to include the 'Ajax' helper but it could not find it.

var $components = array('Cookies', 'Logins', 'Geoip',
'RequestHandler');
var $helpers = array('AJAX');

It says
You are seeing this error because the view helper file
app\views\helpers\ajax.php can't be found or doesn't exist


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



Re: How to test for the current model?

2006-08-22 Thread Simplerules

Well, I have the component 'Logins' and the model 'Users'. I need to
access a function in 'Users' model.


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



Re: How to test for the current model?

2006-08-22 Thread Simplerules

Thanks :)

That worked.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Use Component in Model

2006-08-22 Thread Simplerules

How do I use a component in a model?

Even addingvar $components = array('Cookies', 'Logins'); doesn't
load it.

*Screwed up the last thread, confusing lingo.


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



Re: Use Component in Model

2006-08-22 Thread Simplerules

But how can I use it in a model?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Configuration Table

2006-08-22 Thread Simplerules

I want to create a component that will access a configuration table I
created.

How would I let the component access a MySQL table that does not belong
to a controller?


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



Re: Configuration Table

2006-08-22 Thread Simplerules

Right I have that done, now I need to get the data into a cleaner assoc
array.

Its coming out like this:


Array ( [0] = Array ( [Configuration] = Array ( [key] =
sc_countries [value] = US,CA [group] = language_control [description]
= Countries for which content will be provided, content includes TV
Listings, Network Details. Only list countries which will be officially
supported by the site. [title] = Supported Content Countries ) ) [1]
= Array ( [Configuration] = Array ( [key] = title [value] = Sitcom
Spy [group] = site [description] = The title of the site, displayed
throughout site. [title] = Site Title ) ) )

When I'd rather have something like:

Array ( [sc_countries Array ( [key] = sc_countries [value] = US,CA
[group] = language_control [description] = Countries for which
content will be provided, content includes TV Listings, Network
Details. Only list countries which will be officially supported by the
site. [title] = Supported Content Countries )  [title ] = Array (
[key] = title [value] = Sitcom Spy [group] = site [description] =
The title of the site, displayed throughout site. [title] = Site Title
)  )


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Post Page Function

2006-08-22 Thread Simplerules

Is there  a way for me to set a function to run at the end of every
page load?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Post Page Function

2006-08-22 Thread Simplerules

Is there  a way for me to set a function to run at the end of every
page load?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Cookies

2006-08-21 Thread Simplerules

I am using this to set cookies:
setcookie($Name, $Value, time()+$Length)
and it works, except the cookies are not accessible in CAKEPHP.

The cookies (unlike the CAKEPHP cookie) are set to cake_1.1.7.3363/
while CAKEPHP is set to cake_1.1.7.3363 ; When I do a print_r($_COOKIE)
I only find the CAKEPHP cookie.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Raw Query

2006-08-21 Thread Simplerules

How do I do a raw SQL query?

I need to access a table called 'Users', which belongs to
UsersController, in a component Logins - is there a way to do this?


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



Re: Raw Query

2006-08-21 Thread Simplerules

Yes, it has a Model.

'Users' is a fully working area, but I need to access some data from
the table Users in this component.


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



Re: Raw Query

2006-08-21 Thread Simplerules

Yes.


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



Re: Raw Query

2006-08-21 Thread Simplerules

So how would I use a function in the model User, from a seperate
component?

:)


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



Re: User Bar Logic

2006-08-20 Thread Simplerules

No matter what I do it won't work here is the code:

   //Get User Data;
   $Profile = $this-Session-read('User');

   if(isset($Profile['Username']))
   {
 $this-set('logged_in', TRUE);
 $this-set('username', $Profile['Username']);
   } else {
 $this-set('logged_in', FALSE);
  }
}

and no matter where I put it I get:
Notice: Undefined variable: logged_in in
\app\views\layouts\default.thtml on line 24


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



Re: User Bar Logic

2006-08-20 Thread Simplerules

No matter what I do it won't work here is the code:

   //Get User Data;
   $Profile = $this-Session-read('User');

   if(isset($Profile['Username']))
   {
 $this-set('logged_in', TRUE);
 $this-set('username', $Profile['Username']);
   } else {
 $this-set('logged_in', FALSE);
  }
}

and no matter where I put it I get:
Notice: Undefined variable: logged_in in
\app\views\layouts\default.thtml on line 24


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



Re: User Bar Logic

2006-08-19 Thread Simplerules

Nobody?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Check Controller

2006-08-18 Thread Simplerules

I have a function in app controller, which will check if a user is
logged in and if not - then they will be redirected to a login screen,
the problem is I need to know if they are already at the login screen
or at the register screen.

How could I check from app controller?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Images in CSS

2006-08-18 Thread Simplerules

How can I use images in the CSS file? I need to get the correct file
location - which would need to be set by Cake PHP.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



User Bar Logic

2006-08-18 Thread Simplerules

I need to send 2 variables to the default template file, 1 to say
wether a user is logged in and the other containing the username.

I tried using appController to do this, with a beforeFilter, but it
wasn't availible for the default template.

Where could I put the logic code so that I could set variables to be
used by default.thtml in layouts?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Routine Page Tasks

2006-08-17 Thread Simplerules

I want to do an routine check of permissions on every
page/visit/execution, where would the best place to put the code be?

Its only a function call, a function set in app_controller, but where
should I put the call so it executes on every single load?


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



Re: Routine Page Tasks

2006-08-17 Thread Simplerules

Would that require me to put the the same beforeFilter in each
controller, or would I put that in app_controller?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Change Template

2006-08-17 Thread Simplerules

I just setup CakePHP, how can I change the default main HTML wrapper?

The one that titles pages CakePHP and has a powered by CakePHP icon in
the footer.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Remove Powered By

2006-08-17 Thread Simplerules

I couldn't find the exact license on the site, do I have to leave in
the 'Powered by CakePHP' icon and reference?.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---