Re: CakePHP home page after Bake is Blank

2012-06-29 Thread MSayyaf
- after you add php path to windows PATH variable
  try this:
- open cmd
- go to path ...\YourSite\lib\cake\console
- execute the follwing command line: php cake.php bake
- then choose what you want to bake and go on.
 

On Thursday, June 28, 2012 11:43:24 PM UTC+2, Miles G wrote:

 Hi, I'm working with cakephp version 2.1.3. I can make a project and make 
 my model/controller/view and it all connects to database and works fine. As 
 soon as I bake a project and try to access the home page it's a blank page.

 I've tried deleting my cache files (not directories), and it didn't help.

 I don't think the bake is working correctly - Screenshothttp://puu.sh/EnA0

 You can see in the picture it is asking me if I want to overwrite a file, 
 but the folder Items didn't exist until I did cake bake Items, so I 
 don't see how it has anything to overwrite?

 Blank screen http://puu.sh/EnFA%20 - This should be cake's default home 
 page where it tells you your php version, that you are connected to the 
 database, etc.

 It seems to me like there is some sort of bug with cake bake?




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


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


CakePHP home page after Bake is Blank

2012-06-28 Thread Miles G
Hi, I'm working with cakephp version 2.1.3. I can make a project and make 
my model/controller/view and it all connects to database and works fine. As 
soon as I bake a project and try to access the home page it's a blank page.

I've tried deleting my cache files (not directories), and it didn't help.

I don't think the bake is working correctly - Screenshothttp://puu.sh/EnA0

You can see in the picture it is asking me if I want to overwrite a file, 
but the folder Items didn't exist until I did cake bake Items, so I 
don't see how it has anything to overwrite?

Blank screen http://puu.sh/EnFA%20 - This should be cake's default home 
page where it tells you your php version, that you are connected to the 
database, etc.

It seems to me like there is some sort of bug with cake bake?


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


Controller routing to home page issue

2012-01-25 Thread Papa Gateau
Hi,

I'll try and explain this issue as succinctly as I can.

First off - I'm not a cakePHP novice but neither am I an expert. Our
company has inherited a couple of sites developed in cakePHP (one is
v1.1 and one is v1.3) so I get to delve into it about once every 3
months or so to apply an occasional change.

My problem is this (cakePHP v1.3):

I have 2 models 'person' and 'action'. A single person can have
multiple actions assigned to it.  The current application only has an
admin function for the 'person' (controller,views etc.) as the
'actions' are administered by a different application. My requirement
is now to allow the application to manage the actions.  To this end I
have created the controller and views - however, whenever I try to
access the relevant url for the actions, I am always redirected to the
admin homepage. e.g.

mydomain.com/admin/actions/add I would expect to call the admin_add()
method of the action controller but it just redirects to the homepage.

I have checked the config/routes.php and there is nothing there to
cause this.

My models are defined as follows:

class Person extends AppModel {
var $name = 'Person';
var $displayField = 'title';
var $reputation;
var $locked;
var $belongsTo = array ('User');

var $hasMany = array ('Action');
var $validate = array(

'title' = array(
'notempty' = array(
'rule' = array('notempty')
),
'location' = array(
'notempty' = array(
'rule' = array('notempty')
),
),
);
}

class Action extends AppModel {
var $name = 'Action';
var $displayField = 'title';
var $locked;

var $belongsTo = array(
'Person' = array(
'className' = 'Person',
'foreignKey' = 'person_id',
'conditions' = '',
'fields' = '',
'order' = ''
)
);
}

I'm at a loss as to where to look or go from here.  I am not getting
any error message (debug is set to 2).

Any clues or ideas gratefully received.

PG

-- 
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: Controller routing to home page issue

2012-01-25 Thread Stuart Hallewell
Ok - this application uses the ACL component.  I needed to rebuild the ACL
to add the 'action' controller into the relevant tables.

It would have been nice if there was some kind of useful redirect or
message  - You are not authorised to access this area kind of thing but
hey ho, problem resolved.

Sorry for the long post!

PG

-- 
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: Display posts on the home page AND posts visible to users only

2011-06-27 Thread Dwayne Hanekamp
Create a user_id field in your posts databasetable. This way you can
assign
a user_id to each blogpost. Example:

Usertable:

id int(11)
username varchar(255)
password varchar(255)
etc etc...

Posttable:
id int(11)
user_id int(11) -- Redirecting to the usertable's id
title varchar(255)

etc...

Hope this helps!

On 27 jun, 07:22, Jeremie jeere...@gmail.com wrote:
 Thanks. That works. I can now link to my notes. Cool feature.

 *To assign user to post, you have to create user_id field in your post.
 You can assign the user_id upon create new post.*

 I am not sure to understand what you mean. Would you have an example to show
 me?

-- 
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: Display posts on the home page AND posts visible to users only

2011-06-27 Thread driss
to assign multiple posts  to ur users u should work with the relations
between models in ur case u must add a variable in ur users model
(user.php) which is $hasMany like this:

var $hasMany = Post;

after that u should add a field in ur posts table in ur database which
is user_id

Hpoe it helps

On Jun 27, 8:37 am, Dwayne Hanekamp dwaynehanek...@gmail.com wrote:
 Create a user_id field in your posts databasetable. This way you can
 assign
 a user_id to each blogpost. Example:

 Usertable:

 id int(11)
 username varchar(255)
 password varchar(255)
 etc etc...

 Posttable:
 id int(11)
 user_id int(11) -- Redirecting to the usertable's id
 title varchar(255)

 etc...

 Hope this helps!

 On 27 jun, 07:22, Jeremie jeere...@gmail.com wrote:







  Thanks. That works. I can now link to my notes. Cool feature.

  *To assign user to post, you have to create user_id field in your post.
  You can assign the user_id upon create new post.*

  I am not sure to understand what you mean. Would you have an example to show
  me?

-- 
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: Display posts on the home page AND posts visible to users only

2011-06-27 Thread Jeremie
Thanks. I start to understand now. However, I tried the belongsTo but is 
just break my posts listing:

class Post extends AppModel { 
var $name = 'Post';
var $belongsTo = 'User';
}


Maybe, I don't understand what belongsTo is supposed to do.

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


Display posts on the home page AND posts visible to users only

2011-06-26 Thread Jeremie
Hi,

I am new to CakePHP and I am struggling a little bit. I have followed the 
blog tutorial + other similar tuts. Now I want to display the blog posts on 
the home page. Since my Posts controller is already created, can I redirect 
the home page to http://www.domain.com/posts/ ? If not, how should I 
proceed? (if you know a good resource, please share it with me)

Second, I am trying to create some users. No problems with that. It works 
just fine... but how do I assign  post to a user? I searched a lot and 
watched a couple of videos but can't find a good tutorial about it. If 
anyone could put me on the right track, it would be great. 


Thanks!
Jeremie

-- 
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: Display posts on the home page AND posts visible to users only

2011-06-26 Thread gimmebucks
You can redirect any links to homepage with routes setting. edit your
app/config/routes.php and replace current code with this
Router::connect('/', array('controller' = 'posts', 'action' =
'index'));
To assign user to post, you have to create user_id field in your post.
You can assign the user_id upon create new post.


Jeremie wrote:
 Hi,

 I am new to CakePHP and I am struggling a little bit. I have followed the
 blog tutorial + other similar tuts. Now I want to display the blog posts on
 the home page. Since my Posts controller is already created, can I redirect
 the home page to http://www.domain.com/posts/ ? If not, how should I
 proceed? (if you know a good resource, please share it with me)

 Second, I am trying to create some users. No problems with that. It works
 just fine... but how do I assign  post to a user? I searched a lot and
 watched a couple of videos but can't find a good tutorial about it. If
 anyone could put me on the right track, it would be great.


 Thanks!
 Jeremie

-- 
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: Display posts on the home page AND posts visible to users only

2011-06-26 Thread Jeremie
Thanks. That works. I can now link to my notes. Cool feature.

*To assign user to post, you have to create user_id field in your post.
You can assign the user_id upon create new post.*


I am not sure to understand what you mean. Would you have an example to show 
me? 

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


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


Re: how can I set my home page

2011-05-05 Thread mthabisi mlunjwa
Yes I'm using the Auth component, and yes I've added the Auth
component in my AppController.
 I'm new to CakePhp so this might sound like a stupid question

I added the home action on $this-Auth-
allow('index','view','recover','verify','home');
I thought this would solve the problem but its still asking me to log
in. Please advice.

this is my Appcontroller:

class AppController extends Controller {
var $components = array('Auth','Session','Email');
//var $helpers = array('Time');


function beforeFilter(){
$this-Auth-allow('index','view','recover','verify','home');
$this-Auth-userModel = 'Practitioner';
$this-Auth-fields = array('username' = 'email', 'password' =
'password');
$this-Auth-authError = 'To login please enter your email and
password!';
$this-Auth-loginError = 'Incorect Email or password 
combination.';
$this-Session-write('Auth.redirect', null);
$this-Auth-loginRedirect = array('controller' = 
'Practitioners',
'action' = 'index');
$this-Auth-logoutRedirect = 
array(Configure::read('Routing.admin')
= false, 'controller' = 'Practitioners', 'action' = 'logout');
$this-Model-authUserId = $this-Auth-user('id');
}
}

Thanks in advance

On May 4, 10:56 am, Ryan Schmidt google-2...@ryandesign.com wrote:
 On May 3, 2011, at 17:07, mthabisi mlunjwa wrote:

  I'm trying to set home.ctp as my home page/landing page. But no matter
  how I try I'm redirected to a different page(http://domain.com/
  practitioners/login).

 Sounds like you've added the Auth component (possibly to your AppController). 
 Is that possible? If so, that's what's asking you to log in here.

 http://book.cakephp.org/view/1250/Authentication

 If you don't want users to have to log in to see your home page, then you 
 need to tell the Auth component that, for example by allowing the display 
 action. (This will allow all URLs handled by the Pages controller (not just 
 the home page) to be displayed.)

 http://book.cakephp.org/view/1656/allowedActions

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


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


Re: how can I set my home page

2011-05-05 Thread mikek


 Yes I'm using the Auth component, and yes I've added the Auth
 component in my AppController.
  I'm new to CakePhp so this might sound like a stupid question

 I added the home action on $this-Auth-
allow('index','view','recover','verify','home');
 I thought this would solve the problem but its still asking me to log
 in. Please advice.


if you are using the pages controller to display your home.ctp then you'll
need to allow the 'display' action rather than the page you are trying to
display.





 this is my Appcontroller:

 class AppController extends Controller {
   var $components = array('Auth','Session','Email');
   //var $helpers = array('Time');


   function beforeFilter(){
   $this-Auth-allow('index','view','recover','verify','home');
   $this-Auth-userModel = 'Practitioner';
   $this-Auth-fields = array('username' = 'email', 'password' =
 'password');
   $this-Auth-authError = 'To login please enter your email and
 password!';
   $this-Auth-loginError = 'Incorect Email or password 
 combination.';
   $this-Session-write('Auth.redirect', null);
   $this-Auth-loginRedirect = array('controller' = 
 'Practitioners',
 'action' = 'index');
   $this-Auth-logoutRedirect = 
 array(Configure::read('Routing.admin')
 = false, 'controller' = 'Practitioners', 'action' = 'logout');
   $this-Model-authUserId = $this-Auth-user('id');
   }
 }

 Thanks in advance

 On May 4, 10:56 am, Ryan Schmidt google-2...@ryandesign.com wrote:
 On May 3, 2011, at 17:07, mthabisi mlunjwa wrote:

  I'm trying to set home.ctp as my home page/landing page. But no matter
  how I try I'm redirected to a different page(http://domain.com/
  practitioners/login).

 Sounds like you've added the Auth component (possibly to your
 AppController). Is that possible? If so, that's what's asking you to log
 in here.

 http://book.cakephp.org/view/1250/Authentication

 If you don't want users to have to log in to see your home page, then
 you need to tell the Auth component that, for example by allowing the
 display action. (This will allow all URLs handled by the Pages
 controller (not just the home page) to be displayed.)

 http://book.cakephp.org/view/1656/allowedActions

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


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




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


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


Re: how can I set my home page

2011-05-05 Thread mthabisi mlunjwa
I've allowed the display action and it now works.

Thanks for the help guys.

On May 5, 3:46 pm, mi...@brightstorm.co.uk wrote:
  Yes I'm using the Auth component, and yes I've added the Auth
  component in my AppController.
   I'm new to CakePhp so this might sound like a stupid question

  I added the home action on $this-Auth-
 allow('index','view','recover','verify','home');
  I thought this would solve the problem but its still asking me to log
  in. Please advice.

 if you are using the pages controller to display your home.ctp then you'll
 need to allow the 'display' action rather than the page you are trying to
 display.







  this is my Appcontroller:

  class AppController extends Controller {
     var $components = array('Auth','Session','Email');
     //var $helpers = array('Time');

     function beforeFilter(){
             $this-Auth-allow('index','view','recover','verify','home');
             $this-Auth-userModel = 'Practitioner';
             $this-Auth-fields = array('username' = 'email', 'password' =
  'password');
             $this-Auth-authError = 'To login please enter your email and
  password!';
             $this-Auth-loginError = 'Incorect Email or password 
  combination.';
             $this-Session-write('Auth.redirect', null);
             $this-Auth-loginRedirect = array('controller' = 
  'Practitioners',
  'action' = 'index');
             $this-Auth-logoutRedirect = 
  array(Configure::read('Routing.admin')
  = false, 'controller' = 'Practitioners', 'action' = 'logout');
             $this-Model-authUserId = $this-Auth-user('id');
     }
  }

  Thanks in advance

  On May 4, 10:56 am, Ryan Schmidt google-2...@ryandesign.com wrote:
  On May 3, 2011, at 17:07, mthabisi mlunjwa wrote:

   I'm trying to set home.ctp as my home page/landing page. But no matter
   how I try I'm redirected to a different page(http://domain.com/
   practitioners/login).

  Sounds like you've added the Auth component (possibly to your
  AppController). Is that possible? If so, that's what's asking you to log
  in here.

 http://book.cakephp.org/view/1250/Authentication

  If you don't want users to have to log in to see your home page, then
  you need to tell the Auth component that, for example by allowing the
  display action. (This will allow all URLs handled by the Pages
  controller (not just the home page) to be displayed.)

 http://book.cakephp.org/view/1656/allowedActions

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

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

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


how can I set my home page

2011-05-04 Thread mthabisi mlunjwa
I'm trying to set home.ctp as my home page/landing page. But no matter
how I try I'm redirected to a different page(http://domain.com/
practitioners/login). I'm not sure if  I'm following the correct
procedure. see below the pagesController and routes.php
class PagesController extends AppController {

var $name = 'Pages';

var $helpers = array('Html');

var $uses = array();


function display() {
$path = func_get_args();

$count = count($path);
if (!$count) {
$this-redirect('/');
}
$page = $subpage = $title_for_layout = null;

if (!empty($path[0])) {
$page = $path[0];
}
if (!empty($path[1])) {
$subpage = $path[1];
}
if (!empty($path[$count - 1])) {
$title_for_layout = Inflector::humanize($path[$count - 
1]);
}
$this-set(compact('page', 'subpage', 'title_for_layout'));
$this-render(implode('/', $path));
}

public function home(){
$this-set('title_for_layout', 'Practitioner's');
$this-layout = 'home2';
}
}
?

Routes.php:

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

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


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


Re: how can I set my home page

2011-05-04 Thread Tilen Majerle
do u use AuthComponent?
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/5/4 mthabisi mlunjwa mmlun...@gmail.com

 I'm trying to set home.ctp as my home page/landing page. But no matter
 how I try I'm redirected to a different page(http://domain.com/
 practitioners/login). I'm not sure if  I'm following the correct
 procedure. see below the pagesController and routes.php
 class PagesController extends AppController {

var $name = 'Pages';

var $helpers = array('Html');

var $uses = array();


function display() {
$path = func_get_args();

$count = count($path);
if (!$count) {
$this-redirect('/');
}
$page = $subpage = $title_for_layout = null;

if (!empty($path[0])) {
$page = $path[0];
}
if (!empty($path[1])) {
$subpage = $path[1];
}
if (!empty($path[$count - 1])) {
$title_for_layout = Inflector::humanize($path[$count
 - 1]);
}
$this-set(compact('page', 'subpage', 'title_for_layout'));
$this-render(implode('/', $path));
}

public function home(){
$this-set('title_for_layout', 'Practitioner's');
$this-layout = 'home2';
}
 }
 ?

 Routes.php:

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

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


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


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


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


Re: how can I set my home page

2011-05-04 Thread Ryan Schmidt

On May 3, 2011, at 17:07, mthabisi mlunjwa wrote:

 I'm trying to set home.ctp as my home page/landing page. But no matter
 how I try I'm redirected to a different page(http://domain.com/
 practitioners/login).

Sounds like you've added the Auth component (possibly to your AppController). 
Is that possible? If so, that's what's asking you to log in here.

http://book.cakephp.org/view/1250/Authentication

If you don't want users to have to log in to see your home page, then you need 
to tell the Auth component that, for example by allowing the display action. 
(This will allow all URLs handled by the Pages controller (not just the home 
page) to be displayed.)

http://book.cakephp.org/view/1656/allowedActions


-- 
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: Make webroot index the home page

2011-03-09 Thread lauraw



 If you want them both on the same hostname, then you have to decide how the 
 URLs will mingle. Your DocumentRoot will point to one of the two systems, and 
 you'll set up Alias or maybe Rewrite rules for the URLs of the other system. 
 I know CakePHP comes with Rewrite rules that you're supposed to use; perhaps 
 WordPress does too. You'll have to adapt one or both systems' rules to be 
 able to coexist with one another in the way you want. The one you choose to 
 use as the DocumentRoot should be the one that is the main system that will 
 be used. For example, if you have a big CakePHP web site with lots of 
 controllers and routes, and then just the homepage will be the WordPress 
 blog, consider pointing the DocumentRoot at the CakePHP app.


I like this approach--making DocumentRoot point to the CakePHP app.
I'm just not sure how to or what RewriteRule I need to use to make
http://mydomain.com go to the WordPress main ?

 You also mentioned wanting to use the WordPress user authentication system. 
 If you mean that you want a user to be able to log in to your CakePHP web 
 site using their credentials from your WordPress installation, then that's a 
 totally separate topic to research. I see two options for this case: 1) the 
 user gets a separate loginpagefor your CakePHP app, but can provide the same 
 username and password as your WordPress installation uses (you'd have to 
 write your CakePHP authentication code to access the WordPress user database 
 table, and understand how they store passwords); 2) the user only has to log 
 in once, to the WordPress app, and the CakePHP site knows this 
 automatically (you'd have to find out how WordPress stores user 
 authentication on the client (cookie?) and figure out how to read it).

Option 2 is what I'm going for so I can also use WordPress/BuddyPress'
registration functionality.

Thanks for the help!

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


Make webroot index the home page

2011-03-08 Thread lauraw
How do I make my webroot index the home page in a cake environment?

My DocumentRoot in Apache is set to 'myhost/cake/app/webroot'. I have
a WordPress install under webroot that I want to be the home page.



-- 
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: Make webroot index the home page

2011-03-08 Thread Ryan Schmidt

On Mar 8, 2011, at 13:49, lauraw wrote:

 How do I make my webroot index the home page in a cake environment?
 
 My DocumentRoot in Apache is set to 'myhost/cake/app/webroot'.

I understood you up to this point. This should result in a normal CakePHP 
installation where your CakePHP project's homepage (by default its home.ctp) is 
accessible at http://yourdomain/

 I have
 a WordPress install under webroot that I want to be the home page.

Here, I don't understand. You're saying you would like http://yourdomain/ to 
not be anything about your CakePHP project, but instead to be your WordPress 
installation? Then you'll have to consult WordPress documentation for how to 
set that up. You'll probably change the DocumentRoot to point to some part of 
the WordPress directory structure. If not at the root of the domain, where do 
you want your CakePHP project to be accessible? You could set it up to be in a 
subdomain (http://something.yourdomain/) or subdirectory 
(http://yourdomain/something/).


-- 
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: Make webroot index the home page

2011-03-08 Thread lauraw
Ryan, thank you for replying! I'm pulling my hair out :-)

What I'd really like to do is have my wordpress area still within the
cake environment and so under the cake webroot area.I'd kind of like
the two to live together. The reason for trying this is to make use of
all of the WP and other plug-in functionality I'm using (users,
logging in/out, registrations, payment, etc) - making the WP index the
home page for the site. From the WP index I would have links to cake
functionality, available to a member after logging in.

So, it would go like this:

user ---   http://mydomain -- cake/app/webroot/something
(this is the WP install)
user logs in
user chooses cake controller/action --  http://mydomain/controller/action
-- cake does it's stuff

I've tried setting the document root to webroot/something and it does
take me to the WP index when I go to http://mydomain. But I can't
figure out how to access the cake stuff (just getting 'bad request')
from there.

Is there a way to keep the document root as cake/app/webroot, and
still within the context of cake, but somehow get cake to go to
(route?) webroot/something/index.php?

I'm open to creating 2 subdirectories (one for the wordpress piece and
another for the cake stuff) or even using a subdomain. Is that the
best way to go with this kind of situation?

Thanks!

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


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


Re: Make webroot index the home page

2011-03-08 Thread Sam Sherlock
is the cake app to be installed in a subdir called cake

you could put wp in a subdir of the cake app (or otherway round)
but may prove to be more trouble than its worth

in the past I ahcieved this with the following
I found strange things to occur

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

others may have better suggestions
but I would go with subdomains
 - S



On 8 March 2011 22:03, lauraw lauraweind...@hotmail.com wrote:

 Ryan, thank you for replying! I'm pulling my hair out :-)

 What I'd really like to do is have my wordpress area still within the
 cake environment and so under the cake webroot area.I'd kind of like
 the two to live together. The reason for trying this is to make use of
 all of the WP and other plug-in functionality I'm using (users,
 logging in/out, registrations, payment, etc) - making the WP index the
 home page for the site. From the WP index I would have links to cake
 functionality, available to a member after logging in.

 So, it would go like this:

 user ---   http://mydomain -- cake/app/webroot/something
 (this is the WP install)
 user logs in
 user chooses cake controller/action --
 http://mydomain/controller/action
 -- cake does it's stuff

 I've tried setting the document root to webroot/something and it does
 take me to the WP index when I go to http://mydomain. But I can't
 figure out how to access the cake stuff (just getting 'bad request')
 from there.

 Is there a way to keep the document root as cake/app/webroot, and
 still within the context of cake, but somehow get cake to go to
 (route?) webroot/something/index.php?

 I'm open to creating 2 subdirectories (one for the wordpress piece and
 another for the cake stuff) or even using a subdomain. Is that the
 best way to go with this kind of situation?

 Thanks!

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


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


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


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


Re: Make webroot index the home page

2011-03-08 Thread lauraw
Hi, Sam. Yes, cake is installed in a subdir called 'cake.' This is
probably strange, but I just tried this configuration (cake within
WP):

docroot/
wordpress/
  
  cake/

that actually worked out okay in that going to http://mydomain brings
up the WP index and I'm also able to do http://mydomain/cake/controller/action.
I basically made the cake APP subordinate to the WordPress APP.

I have been trying, without a lot of success to understand htaccess
stuff. I'm somewhat familiar with regexp... what exactly does this do?

 ^blog/(.*)$ blog/$1  [L]

I'll look into using subdomains too. Thanks!

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


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


Re: Make webroot index the home page

2011-03-08 Thread Ryan Schmidt
On Mar 8, 2011, at 16:03, lauraw wrote:

 What I'd really like to do is have my wordpress area still within the
 cake environment and so under the cake webroot area.I'd kind of like
 the two to live together. The reason for trying this is to make use of
 all of the WP and other plug-in functionality I'm using (users,
 logging in/out, registrations, payment, etc) - making the WP index the
 home page for the site. From the WP index I would have links to cake
 functionality, available to a member after logging in.
 
 So, it would go like this:
 
 user ---   http://mydomain -- cake/app/webroot/something
 (this is the WP install)
 user logs in
 user chooses cake controller/action --  http://mydomain/controller/action
 -- cake does it's stuff
 
 I've tried setting the document root to webroot/something and it does
 take me to the WP index when I go to http://mydomain. But I can't
 figure out how to access the cake stuff (just getting 'bad request')
 from there.
 
 Is there a way to keep the document root as cake/app/webroot, and
 still within the context of cake, but somehow get cake to go to
 (route?) webroot/something/index.php?
 
 I'm open to creating 2 subdirectories (one for the wordpress piece and
 another for the cake stuff) or even using a subdomain. Is that the
 best way to go with this kind of situation?

The first thing to make sure you understand is that the organization of your 
web site URLs doesn't need to have anything to do with the way files and 
directories are laid out on your server's hard disk.

WordPress and CakePHP both have prescribed directory layouts on disk, and you 
shouldn't stray from them too much. They are also independent systems and 
shouldn't be mixed on disk. Have a directory for your CakePHP app, and a 
completely separate directory for your WordPress blog.

Now you can turn your attention to your web server configuration, where you can 
define under what URLs these two systems will be available.

If you want these two separate systems available via two separate hostnames, 
that's easy enough. You'll set up two virtual hosts. One will have its document 
root pointing at the right place in your CakePHP project (app/webroot), the 
other will have its document root pointing at the right place in your WordPress 
installation (wherever that is; I don't know how WordPress is set up).

If you want them both on the same hostname, then you have to decide how the 
URLs will mingle. Your DocumentRoot will point to one of the two systems, and 
you'll set up Alias or maybe Rewrite rules for the URLs of the other system. I 
know CakePHP comes with Rewrite rules that you're supposed to use; perhaps 
WordPress does too. You'll have to adapt one or both systems' rules to be able 
to coexist with one another in the way you want. The one you choose to use as 
the DocumentRoot should be the one that is the main system that will be used. 
For example, if you have a big CakePHP web site with lots of controllers and 
routes, and then just the homepage will be the WordPress blog, consider 
pointing the DocumentRoot at the CakePHP app.


You also mentioned wanting to use the WordPress user authentication system. If 
you mean that you want a user to be able to log in to your CakePHP web site 
using their credentials from your WordPress installation, then that's a totally 
separate topic to research. I see two options for this case: 1) the user gets a 
separate login page for your CakePHP app, but can provide the same username and 
password as your WordPress installation uses (you'd have to write your CakePHP 
authentication code to access the WordPress user database table, and understand 
how they store passwords); 2) the user only has to log in once, to the 
WordPress app, and the CakePHP site knows this automatically (you'd have to 
find out how WordPress stores user authentication on the client (cookie?) and 
figure out how to read it).


Good luck.





-- 
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: FCK editor filling textarea with home page

2011-02-22 Thread WhyNotSmile
I found the solution to this.  The problem was that my site was in a
subdirectory, but the fck helper file was just pointing to the webroot
as if it was at the top level.  Adding in the subdirectory to the fck
basepath solved the problem.

i.e. in the fck helper, in the constructor, I had
  $this-BasePath = '/app/webroot/js/fckeditor/';
when it should have been
  $this-BasePath = /subdirectory'/app/webroot/js/fckeditor/';

Hope this helps someone else!

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


FCK editor filling textarea with home page

2011-02-21 Thread WhyNotSmile
I'm using fck with CakePHP, on some admin pages.  I thought I'd done
what I've always done, but this time around, instead of seeing a blank
textarea in the admin form, I see a textarea which has the home page
in it - the full html.

I looked around, and found someone with a similar solution - they were
told to use '$this-layout = false;'.  There was no more detail, and
it didn't say whether it had worked.  I'm not sure how to do this to
try it out.  If I put it in the controller, I just get the form with
no formatting; the text box still has the home page in it!

Can anyone suggest what i could try here?  I've given my code below.

I really appreciate any thoughts.
Sharon

Controller code:

  function admin_add() {
   $this-layout = 'admin';
   $this-set('title_for_layout', 'Add Page');
   if(!empty($this-data)) {
if($this-Page-save($this-data)) {
 $this-Session-setFlash('Page Added To System', 'default',
array(class = success));
 $this-redirect('/admin/pages/index');
 exit();
}
$this-Session-setFlash('Please correct errors below', 'default',
array(class = error));
   }
  }


View code (admin_add.ctp):
   !-- Various divs  layout things go here - no php --
   echo $this-Form-create('Page', array('action'='add', 'admin'=1,
'class' = 'largeForm'));
   echo $form-label('Page Content');
   echo 'p class=helpEnter the page content/p';
   echo $form-label('nbsp');
   if(!empty($this-validationErrors['Page']['column1']))
$fck-Error = $this-validationErrors['Page']['column1'];
   echo $fck-Create('Page/column1');
   echo $this-Form-end('Add Page');
   !-- Various divs  layout things go here - no php --

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


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


Display data from specific data in the Home Page

2010-12-26 Thread Ahmed - CakePHP

Hello Everybody,

As you know, I am a beginner in CakePHP.
I trying to do a blog, simple blog, just as a training in how to build
a websites using CakePHP.

I created few Controllers, such as (users, posts, comments and
categories).
Also I designed the Home Page, which is empty now.

I want to know:
How can I display data from the Tables in the database in the Home
Page.

For example:
- I want to display the latest posts.
also, may be, the latest registered users
or whatever


Can you please tell me how CakePHP deals with this.



Thank you in Advance,
Ahmed

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

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: Display data from specific data in the Home Page

2010-12-26 Thread Amit Badkas
Hi,

Please follow http://book.cakephp.org/view/1528/Blog to build a basic blog
application in CakePHP so that you will get familiar with CakePHP working.

Amit Badkas

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



On Sun, Dec 26, 2010 at 7:38 PM, Ahmed - CakePHP ahmed.amo...@gmail.comwrote:


 Hello Everybody,

 As you know, I am a beginner in CakePHP.
 I trying to do a blog, simple blog, just as a training in how to build
 a websites using CakePHP.

 I created few Controllers, such as (users, posts, comments and
 categories).
 Also I designed the Home Page, which is empty now.

 I want to know:
 How can I display data from the Tables in the database in the Home
 Page.

 For example:
 - I want to display the latest posts.
 also, may be, the latest registered users
 or whatever


 Can you please tell me how CakePHP deals with this.



 Thank you in Advance,
 Ahmed

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

 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 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: Display data from specific data in the Home Page

2010-12-26 Thread Stefano Salvatori
Hi

In one controller add some like that

$uses = array('Post','User');

function myfunction() {

$this-set('users',$this-User-find('all'));
$this-set('users',$this-Post-find('all'));
}

then in router.php

Router::connect('/', array('controller' = 'yourcontroller', 'action'
= 'myfunction'));



On Mon, Dec 27, 2010 at 12:52 AM, Amit Badkas amit.sanis...@gmail.com wrote:
 Hi,
 Please follow http://book.cakephp.org/view/1528/Blog to build a basic blog
 application in CakePHP so that you will get familiar with CakePHP working.
 Amit Badkas
 PHP Applications for E-Biz: http://www.sanisoft.com


 On Sun, Dec 26, 2010 at 7:38 PM, Ahmed - CakePHP ahmed.amo...@gmail.com
 wrote:

 Hello Everybody,

 As you know, I am a beginner in CakePHP.
 I trying to do a blog, simple blog, just as a training in how to build
 a websites using CakePHP.

 I created few Controllers, such as (users, posts, comments and
 categories).
 Also I designed the Home Page, which is empty now.

 I want to know:
 How can I display data from the Tables in the database in the Home
 Page.

 For example:
 - I want to display the latest posts.
 also, may be, the latest registered users
 or whatever


 Can you please tell me how CakePHP deals with this.



 Thank you in Advance,
 Ahmed

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

 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To post to this group, send email 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




-- 
Stefano Salvatori M.
http://stefano.salvatori.cl/

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

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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


Fresh install, home page (redirect) error

2010-10-10 Thread i...@fijnmedia.nl
Hello,

The website runs on a shared hosting platform. Since a week the home
page doesn't work properly. The other pages works as normal.

I have also tried a fresh install from the cakephp website and I got
still
the same error:
--
Error:  Redirect:Controller could not be found.

Error: Create the class Redirect:Controller below in file: app/
controllers/redirect:controller.php

?php
class Redirect:Controller extends AppController {

var $name = 'Redirect:';
}

?
-

And here my cakephp install:
http://cake.fijnmedia.nl/

Maybe its something with the htaccess / dispatcher or something, I
really don't know.

I hope someone can help me.

Kind 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: Fresh install, home page (redirect) error

2010-10-10 Thread Tilen Majerle
try this...
?php

class RedirectController extends AppController {

   var $name = 'Redirect:';
}

?
--
Tilen Majerle
http://majerle.eu



2010/10/10 i...@fijnmedia.nl i...@fijnmedia.nl

 Hello,

 The website runs on a shared hosting platform. Since a week the home
 page doesn't work properly. The other pages works as normal.

 I have also tried a fresh install from the cakephp website and I got
 still
 the same error:

 --
 Error:  Redirect:Controller could not be found.

 Error: Create the class Redirect:Controller below in file: app/
 controllers/redirect:controller.php

 ?php
 class Redirect:Controller extends AppController {

var $name = 'Redirect:';
 }

 ?

 -

 And here my cakephp install:
 http://cake.fijnmedia.nl/

 Maybe its something with the htaccess / dispatcher or something, I
 really don't know.

 I hope someone can help me.

 Kind 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.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: Fresh install, home page (redirect) error

2010-10-10 Thread cricket
On Sun, Oct 10, 2010 at 4:54 AM, i...@fijnmedia.nl i...@fijnmedia.nl wrote:
 Hello,

 The website runs on a shared hosting platform. Since a week the home
 page doesn't work properly. The other pages works as normal.

 I have also tried a fresh install from the cakephp website and I got
 still
 the same error:
 --
 Error:  Redirect:Controller could not be found.

 Error: Create the class Redirect:Controller below in file: app/
 controllers/redirect:controller.php

 ?php
 class Redirect:Controller extends AppController {

        var $name = 'Redirect:';
 }

 ?
 -

 And here my cakephp install:
 http://cake.fijnmedia.nl/

 Maybe its something with the htaccess / dispatcher or something, I
 really don't know.

Cake is throwing up that error because you've tried to redirect to a
URL beginning with /redirect. At least, that's my best guess. So,
what does your controller code look like?Or maybe it's something in
AppController::beforeFilter().

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

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


How can i access home page without login?

2010-10-06 Thread redleon
I'm using Auth Component. Guest visitor can access register, login,
remember_password etc. but can not access home page of the site.

I tried everythink i know.

For Auth-Allow () methot, i gave '/', 'home', 'display' parameters.
But it has not worked.

I would like to give permission for guests to access home page of my
site.

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

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


Re: How can i access home page without login?

2010-10-06 Thread Jeremy Burns | Class Outfit
Do you have a pages controller? If so, adding:

parent::beforeFilter();
$this-Auth-allow('display');

..in your beforeFilter() ought to work.

Jeremy Burns
Class Outfit

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

On 4 Oct 2010, at 21:31, redleon wrote:

 I'm using Auth Component. Guest visitor can access register, login,
 remember_password etc. but can not access home page of the site.
 
 I tried everythink i know.
 
 For Auth-Allow () methot, i gave '/', 'home', 'display' parameters.
 But it has not worked.
 
 I would like to give permission for guests to access home page of my
 site.
 
 Check out the new CakePHP Questions site http://cakeqs.org and help others 
 with their CakePHP related questions.
 
 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To post to this group, send email 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: How to get admin home page?

2010-06-12 Thread saidbakr
The situation is different. Indeed there is no really mysite/admin/
the admin here is an action from pages controller. But there is admin
routs such as mysite/admin/users/add. What I need to achieve is to set
or make an index page for admin and when the user is being on mysite/
admin/users/add and has a redirect to be directed to a controller
without admin prefix as regarded before.

In more clearance, the problem is:
When the user becomes on some place like mysite/admin/posts and got a
redirect code, the action portion auto prefixed with admin.

The redirect code logic I uses is a method of AppController and it
called from beforeFilter function in AppController too.

On Jun 12, 3:50 am, Kurt Polinar kpoli...@gmail.com wrote:
 You can use either:  redirect('controller'='pages', 'action'='display',
 'admin'= true) or redirect('controller'='pages', 'action'='display',
 'prefix'='admin')

 use 'prefix'='admin' or 'admin'=true to redirect to admin pages.

 On Sat, Jun 12, 2010 at 5:06 AM, saidbakr said@gmail.com wrote:
  In other word,

  What does make something like  redirect('controller'='pages',
  'action'='display') perform redirection to missing action
  admin_display?

  On Jun 12, 12:03 am, saidbakr said@gmail.com wrote:
   Hi,
   Admin actions admin_actionname() works fine something like this:

  http://thesite.com/admin/contros/actionname

   What I need is to set another page to work as admin home to be
    http://thesite.com/admin/

   I manged this from pages controller by setting an action called admin
   and set route to it, but this solution makes some trouble with
   redirects from admin actions to another non admin action using
  $this-redirect('controller'='contNames', 'action'='actionname') because

   it redirect it pages controller but the action is admin_action where
   it is not found.

  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

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

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


Re: How to get admin home page?

2010-06-12 Thread Sam Sherlock
Hi Saidbakr

I think some meaning is lost in translation

are you trying to have mysite.com/admin display a specific admin controller
/ action?

if so I use the following to display a user dashboard

Router::connect('/admin', array('prefix' = 'admin', 'controller' =
'users', 'action' = 'dashboard'));

this means that the following are the same
mysite.com/admin
mysite.com/admin/users/dashboard

- S



On 12 June 2010 12:44, saidbakr said@gmail.com wrote:

 The situation is different. Indeed there is no really mysite/admin/
 the admin here is an action from pages controller. But there is admin
 routs such as mysite/admin/users/add. What I need to achieve is to set
 or make an index page for admin and when the user is being on mysite/
 admin/users/add and has a redirect to be directed to a controller
 without admin prefix as regarded before.

 In more clearance, the problem is:
 When the user becomes on some place like mysite/admin/posts and got a
 redirect code, the action portion auto prefixed with admin.

 The redirect code logic I uses is a method of AppController and it
 called from beforeFilter function in AppController too.

 On Jun 12, 3:50 am, Kurt Polinar kpoli...@gmail.com wrote:
  You can use either:  redirect('controller'='pages', 'action'='display',
  'admin'= true) or redirect('controller'='pages', 'action'='display',
  'prefix'='admin')
 
  use 'prefix'='admin' or 'admin'=true to redirect to admin pages.
 
  On Sat, Jun 12, 2010 at 5:06 AM, saidbakr said@gmail.com wrote:
   In other word,
 
   What does make something like  redirect('controller'='pages',
   'action'='display') perform redirection to missing action
   admin_display?
 
   On Jun 12, 12:03 am, saidbakr said@gmail.com wrote:
Hi,
Admin actions admin_actionname() works fine something like this:
 
   http://thesite.com/admin/contros/actionname
 
What I need is to set another page to work as admin home to be
 http://thesite.com/admin/
 
I manged this from pages controller by setting an action called admin
and set route to it, but this solution makes some trouble with
redirects from admin actions to another non admin action using
   $this-redirect('controller'='contNames', 'action'='actionname')
 because
 
it redirect it pages controller but the action is admin_action where
it is not found.
 
   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.comcake-php%252bunsubscr...@googlegroups.comFor
 more options, visit this group at
  http://groups.google.com/group/cake-php?hl=en

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

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


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

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


Re: How to get admin home page?

2010-06-12 Thread saidbakr
Hi Sam

No I don't try to get mysite.com/admin for specific controller's
action. I try to get mysite.com/admin as an independent page to act as
a home page or a dashboard for the rest of admin routes. In other
word, I try to make this page to have some links to some admin actions
of controllers beside some administrative data, such as, unapproved
comments, number of registered users and so on.

Regards.

On Jun 12, 3:33 pm, Sam Sherlock sam.sherl...@gmail.com wrote:
 Hi Saidbakr

 I think some meaning is lost in translation

 are you trying to have mysite.com/admin display a specific admin controller
 / action?

 if so I use the following to display a user dashboard

 Router::connect('/admin', array('prefix' = 'admin', 'controller' =
 'users', 'action' = 'dashboard'));

 this means that the following are the same
 mysite.com/admin
 mysite.com/admin/users/dashboard

 - S

 On 12 June 2010 12:44, saidbakr said@gmail.com wrote:





  The situation is different. Indeed there is no really mysite/admin/
  the admin here is an action from pages controller. But there is admin
  routs such as mysite/admin/users/add. What I need to achieve is to set
  or make an index page for admin and when the user is being on mysite/
  admin/users/add and has a redirect to be directed to a controller
  without admin prefix as regarded before.

  In more clearance, the problem is:
  When the user becomes on some place like mysite/admin/posts and got a
  redirect code, the action portion auto prefixed with admin.

  The redirect code logic I uses is a method of AppController and it
  called from beforeFilter function in AppController too.

  On Jun 12, 3:50 am, Kurt Polinar kpoli...@gmail.com wrote:
   You can use either:  redirect('controller'='pages', 'action'='display',
   'admin'= true) or redirect('controller'='pages', 'action'='display',
   'prefix'='admin')

   use 'prefix'='admin' or 'admin'=true to redirect to admin pages.

   On Sat, Jun 12, 2010 at 5:06 AM, saidbakr said@gmail.com wrote:
In other word,

What does make something like  redirect('controller'='pages',
'action'='display') perform redirection to missing action
admin_display?

On Jun 12, 12:03 am, saidbakr said@gmail.com wrote:
 Hi,
 Admin actions admin_actionname() works fine something like this:

http://thesite.com/admin/contros/actionname

 What I need is to set another page to work as admin home to be
  http://thesite.com/admin/

 I manged this from pages controller by setting an action called admin
 and set route to it, but this solution makes some trouble with
 redirects from admin actions to another non admin action using
$this-redirect('controller'='contNames', 'action'='actionname')
  because

 it redirect it pages controller but the action is admin_action where
 it is not found.

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

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

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


How to get admin home page?

2010-06-11 Thread saidbakr
Hi,
Admin actions admin_actionname() works fine something like this:

http://thesite.com/admin/contros/actionname

What I need is to set another page to work as admin home to be
 http://thesite.com/admin/

I manged this from pages controller by setting an action called admin
and set route to it, but this solution makes some trouble with
redirects from admin actions to another non admin action using $this-
redirect('controller'='contNames', 'action'='actionname') because
it redirect it pages controller but the action is admin_action where
it is not found.

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

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


Re: How to get admin home page?

2010-06-11 Thread saidbakr
In other word,

What does make something like  redirect('controller'='pages',
'action'='display') perform redirection to missing action
admin_display?

On Jun 12, 12:03 am, saidbakr said@gmail.com wrote:
 Hi,
 Admin actions admin_actionname() works fine something like this:

 http://thesite.com/admin/contros/actionname

 What I need is to set another page to work as admin home to be
  http://thesite.com/admin/

 I manged this from pages controller by setting an action called admin
 and set route to it, but this solution makes some trouble with
 redirects from admin actions to another non admin action using 
 $this-redirect('controller'='contNames', 'action'='actionname') because

 it redirect it pages controller but the action is admin_action where
 it is not found.

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

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


Re: How to get admin home page?

2010-06-11 Thread Kurt Polinar
You can use either:  redirect('controller'='pages', 'action'='display',
'admin'= true) or redirect('controller'='pages', 'action'='display',
'prefix'='admin')

use 'prefix'='admin' or 'admin'=true to redirect to admin pages.



On Sat, Jun 12, 2010 at 5:06 AM, saidbakr said@gmail.com wrote:

 In other word,

 What does make something like  redirect('controller'='pages',
 'action'='display') perform redirection to missing action
 admin_display?

 On Jun 12, 12:03 am, saidbakr said@gmail.com wrote:
  Hi,
  Admin actions admin_actionname() works fine something like this:
 
  http://thesite.com/admin/contros/actionname
 
  What I need is to set another page to work as admin home to be
   http://thesite.com/admin/
 
  I manged this from pages controller by setting an action called admin
  and set route to it, but this solution makes some trouble with
  redirects from admin actions to another non admin action using
 $this-redirect('controller'='contNames', 'action'='actionname') because
 
  it redirect it pages controller but the action is admin_action where
  it is not found.

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

 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 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: Login from won't work from Home Page

2010-01-27 Thread Ponch316
I fixed the problem and I thought I would post the solution here in
case someone came across the same problem.

After WEEKS of trying to figure it out, I found the solution by
accident. I accidentally commented the $components variable in my
users_controller.php file and it suddenly started working.

I started removing components to narrow down the problem and realized
that, for some reason, the Security component was being the cause of
these problems. Without it, after submitting I got access to the
controller's actions, including login, without a single issue.

I have no idea if this is a bug or an expected behavior, if someone
knows I would greatly appreciate if you told me.

Best,
P.

On Jan 5, 1:58 am, Ponch316 ponch...@gmail.com wrote:
 Hello,

 I've been trying to add a little Login module to my homepage and my
 Layout. I'm using the Auth component and have the following code:

 //app_controller.php:
     function beforeFilter() {
         $this-Auth-allow('display');
         $this-Auth-autoRedirect = false;
         $this-Auth-fields = array('username' = 'email', 'password'
 = 'password');
         $this-Auth-loginAction = array('admin' = false,
 'controller' = 'users', 'action' = 'login');
         $this-Auth-loginRedirect = array('controller'='dashboard',
 'action'='index');
         $this-Auth-logoutRedirect = array('admin' = false,
 'controller' = 'pages', 'action' = 'home');

     }

 //users_controller.php
     function login() {
                 if ($this-Auth-user()) {
                         if (!empty($this-data)  
 $this-data['User']['remember_me']) {
                                 $cookie = array();
                                 $cookie['email'] = 
 $this-data['User']['email'];
                                 $cookie['password'] = 
 $this-data['User']['password'];
                                 $this-Cookie-write('Auth.User', $cookie, 
 true, '+2 weeks');
                                 unset($this-data['User']['remember_me']);
                         }
                          $this-redirect($this-Auth-redirect());
                 }
                 if(empty($this-data)) {
                         $cookie = $this-Cookie-read('Auth.User');
                         if (!is_null($cookie)) {
                                 if ($this-Auth-login($cookie)) {
                                         $this-Session-del('Message.auth');
                                          
 $this-redirect($this-Auth-redirect());
                                 } else {
                                 $this-Cookie-del('Auth.User');
                                 }
                         }
                 }
     }

 //(pages) home.ctp  and  (users) login.ctp
                                         ?php
                                         echo $form-create('User', 
 array('action' = 'login',
 'style'='margin: 5px 0 0 18px;'));
                                         echo 'div class = 
 labelE-mail/div';
                                         echo $form-input('email', 
 array('label' = ''));
                                         echo 'div class = 
 labelPassword/div';
                                         echo $form-input('password', 
 array('label' = ''));
                                         echo $form-input('remember_me', 
 array('type' =
 'checkbox','label'='Remember Me'));
                                         echo $form-end(array
 ('label'='Login','class'='b2','style'='margin-top: 13px;'));
                                         ?

 The problem is that the Login only works when I access it directly
 from /users/login, but if I try to login from the Homepage (or
 anywhere else for that matter) with the exact same code, it gives me a
 404 NOT FOUND error.

 I've been browsing all over the Internet for a way to do this (a login
 element or a login form in the layout) but no luck yet. Any idea of
 what might be happening?

 Thanks in advance!
 Ponch

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

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


How to incorporate site home page with custom cakephp cms

2010-01-19 Thread mklappen
I have created a fairly basic custom content management app using
CakePHP that allows me to enter information into my database through a
number of different web forms. (it's a gaming website that has game
info, reviews, etc...). The app is named 'CMS'.

I developed this mostly to learn the basics of CakePHP but now that I
have it working and have some data, I was wanting to hook it up to my
homepage design so it pulls in the data I've entered into the DB via
my CMS app, However I'm having some 2nd thoughts visualizing how this
should be set up.

Is it better to create a new cakephp app, building the home page and
other pages using the same tables I created/populated in my CMS app?
Or should I start coding my site design into an index.php file with
sql queries to pull content from DB (not using cakephp) and upload
that file to my web server root?

Any tips/recommendations are greatly 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


Login from won't work from Home Page

2010-01-04 Thread Ponch316
Hello,

I've been trying to add a little Login module to my homepage and my
Layout. I'm using the Auth component and have the following code:

//app_controller.php:
function beforeFilter() {
$this-Auth-allow('display');
$this-Auth-autoRedirect = false;
$this-Auth-fields = array('username' = 'email', 'password'
= 'password');
$this-Auth-loginAction = array('admin' = false,
'controller' = 'users', 'action' = 'login');
$this-Auth-loginRedirect = array('controller'='dashboard',
'action'='index');
$this-Auth-logoutRedirect = array('admin' = false,
'controller' = 'pages', 'action' = 'home');

}

//users_controller.php
function login() {
if ($this-Auth-user()) {
if (!empty($this-data)  
$this-data['User']['remember_me']) {
$cookie = array();
$cookie['email'] = $this-data['User']['email'];
$cookie['password'] = 
$this-data['User']['password'];
$this-Cookie-write('Auth.User', $cookie, 
true, '+2 weeks');
unset($this-data['User']['remember_me']);
}
 $this-redirect($this-Auth-redirect());
}
if(empty($this-data)) {
$cookie = $this-Cookie-read('Auth.User');
if (!is_null($cookie)) {
if ($this-Auth-login($cookie)) {
$this-Session-del('Message.auth');
 
$this-redirect($this-Auth-redirect());
} else {
$this-Cookie-del('Auth.User');
}
}
}
}

//(pages) home.ctp  and  (users) login.ctp
?php
echo $form-create('User', 
array('action' = 'login',
'style'='margin: 5px 0 0 18px;'));
echo 'div class = 
labelE-mail/div';
echo $form-input('email', 
array('label' = ''));
echo 'div class = 
labelPassword/div';
echo $form-input('password', 
array('label' = ''));
echo $form-input('remember_me', 
array('type' =
'checkbox','label'='Remember Me'));
echo $form-end(array
('label'='Login','class'='b2','style'='margin-top: 13px;'));
?


The problem is that the Login only works when I access it directly
from /users/login, but if I try to login from the Homepage (or
anywhere else for that matter) with the exact same code, it gives me a
404 NOT FOUND error.

I've been browsing all over the Internet for a way to do this (a login
element or a login form in the layout) but no luck yet. Any idea of
what might be happening?

Thanks in advance!
Ponch

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

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: Why do users keep redirecting to the home page on login?

2009-08-26 Thread John Andersen

Do you have a beforeFilter in your users controller, and if yes, does
it invoke the parent beforeFilter?
Enjoy,
   John

On Aug 26, 8:59 am, DavidH djhollingwo...@gmail.com wrote:
 Just changed the subject back from solved to not solved.

 I found that unless I have autoRedirect = false in both the
 beforeFilter AND the login actions then it still does the
 autoRedirect.

 Can anyone explain why I have to set it in both places? There must be
 something fundamental I don't understand here.

 Thanks

 David

 On Aug 26, 6:53 am, DavidH djhollingwo...@gmail.com wrote:

  I had to set autoRedirect to false inside each of the login actions,
  then it worked OK.

  Not sure why setting autoRedirect in the beforeFilter wasn't working
  though as I was under the impression that anything in there would be
  enacted before the action.

  However I guess that a user isn't authenticated until the login action
  and so I guess autoRedirect is set again during the login action. I
  think I'd probably find that setting it in the beforeFilter only
  affects actions other than login.

  Oh well, onwards and upwards :)

  David

  On Aug 25, 4:25 pm, Alexandru Ciobanu ics.cake...@gmail.com wrote:

   On 8/25/2009 3:14 PM, DavidH wrote: Hi All

I'm still trying to put together a login system of admin and normal
users. It's pretty much working OK; but for some reason I can't fathom
when a user logs in they don;t get refdirected to the page specified
in Auth-loginRedirect(). Instead they end up back at the app root
page.

   Set autoRedirect to false, it defaults to true.

   e.i. $this-Auth-autoRedirect = false;

  http://api.cakephp.org/class/auth-component
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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
-~--~~~~--~~--~--~---



Site's home page

2009-08-26 Thread Matias_castro

I have already studied (implemented) the blog and acl tutorials
getting quite familiar with the basic elements of the framework. I've
also learnt how to use a bit of bake.

My question came when I wanted to start my own web page. I have my
data model, logic, structure (all of them in design), and my home
page. This is where I have the problem! Where do I put this page??
This page should also have a controller right (i'm guessing
appcontroller)? but in that case, it should also have a table in my
database? that doesn't make any sense...

Could someone please point me in the right direction here please? I
would really appreciate it!

Thanks a lot!!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: Site's home page

2009-08-26 Thread Bidibule

Hi Matias,

You don't need a database for your model

You can use the $useTable = false; to disable the use of database in
your model/controller

You can make a 'Page' controller and a 'home' action/view to display
your home page
Then you can use Routes to set your index page is pages/home

I don't know if that answered your question

On 26 août, 09:33, Matias_castro mattias.cas...@gmail.com wrote:
 I have already studied (implemented) the blog and acl tutorials
 getting quite familiar with the basic elements of the framework. I've
 also learnt how to use a bit of bake.

 My question came when I wanted to start my own web page. I have my
 data model, logic, structure (all of them in design), and my home
 page. This is where I have the problem! Where do I put this page??
 This page should also have a controller right (i'm guessing
 appcontroller)? but in that case, it should also have a table in my
 database? that doesn't make any sense...

 Could someone please point me in the right direction here please? I
 would really appreciate it!

 Thanks a lot!!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: Why do users keep redirecting to the home page on login?

2009-08-26 Thread DavidH

I do indeed John. This is my current UsersController beforeFilter:

function beforeFilter()
{
//
// Inherit beforeFilter from appController
//
parent::beforeFilter();

$this-Auth-autoRedirect = false;
}



On Aug 26, 7:53 am, John Andersen j.andersen...@gmail.com wrote:
 Do you have a beforeFilter in your users controller, and if yes, does
 it invoke the parent beforeFilter?
 Enjoy,
    John

 On Aug 26, 8:59 am, DavidH djhollingwo...@gmail.com wrote:

  Just changed the subject back from solved to not solved.

  I found that unless I have autoRedirect = false in both the
  beforeFilter AND the login actions then it still does the
  autoRedirect.

  Can anyone explain why I have to set it in both places? There must be
  something fundamental I don't understand here.

  Thanks

  David

  On Aug 26, 6:53 am, DavidH djhollingwo...@gmail.com wrote:

   I had to set autoRedirect to false inside each of the login actions,
   then it worked OK.

   Not sure why setting autoRedirect in the beforeFilter wasn't working
   though as I was under the impression that anything in there would be
   enacted before the action.

   However I guess that a user isn't authenticated until the login action
   and so I guess autoRedirect is set again during the login action. I
   think I'd probably find that setting it in the beforeFilter only
   affects actions other than login.

   Oh well, onwards and upwards :)

   David

   On Aug 25, 4:25 pm, Alexandru Ciobanu ics.cake...@gmail.com wrote:

On 8/25/2009 3:14 PM, DavidH wrote: Hi All

 I'm still trying to put together a login system of admin and normal
 users. It's pretty much working OK; but for some reason I can't fathom
 when a user logs in they don;t get refdirected to the page specified
 in Auth-loginRedirect(). Instead they end up back at the app root
 page.

Set autoRedirect to false, it defaults to true.

e.i. $this-Auth-autoRedirect = false;

   http://api.cakephp.org/class/auth-component
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: Site's home page

2009-08-26 Thread Matias_castro

Yes, I believe that should work.

I have one more dought; shouldn't I use the APP/views/pages/home.ctp
to build up my home page? instead of treating the home like any other
view? and if this is so, how do I controle THAT home? I mean, if I
want it to display contents of a database/table corresponding to
another model (for instance news) where should I do it? I'm pretty
sure it should be a controller... maybe appcontroller?

Thanks a lot!

On 26 ago, 10:43, Bidibule bblamp...@tagexpert.be wrote:
 Hi Matias,

 You don't need a database for your model

 You can use the $useTable = false; to disable the use of database in
 your model/controller

 You can make a 'Page' controller and a 'home' action/view to display
 your home page
 Then you can use Routes to set your index page is pages/home

 I don't know if that answered your question

 On 26 août, 09:33, Matias_castro mattias.cas...@gmail.com wrote:

  I have already studied (implemented) the blog and acl tutorials
  getting quite familiar with the basic elements of the framework. I've
  also learnt how to use a bit of bake.

  My question came when I wanted to start my own web page. I have my
  data model, logic, structure (all of them in design), and my home
  page. This is where I have the problem! Where do I put this page??
  This page should also have a controller right (i'm guessing
  appcontroller)? but in that case, it should also have a table in my
  database? that doesn't make any sense...

  Could someone please point me in the right direction here please? I
  would really appreciate it!

  Thanks a lot!!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: Site's home page

2009-08-26 Thread brian

Copy the file cake/libs/controllers/pages_controller.php to your
controllers folder. Edit you config/routes.php file to have:

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

Next, create a view file at views/pages/home.ctp with your home page.

On Wed, Aug 26, 2009 at 3:33 AM, Matias_castromattias.cas...@gmail.com wrote:

 I have already studied (implemented) the blog and acl tutorials
 getting quite familiar with the basic elements of the framework. I've
 also learnt how to use a bit of bake.

 My question came when I wanted to start my own web page. I have my
 data model, logic, structure (all of them in design), and my home
 page. This is where I have the problem! Where do I put this page??
 This page should also have a controller right (i'm guessing
 appcontroller)? but in that case, it should also have a table in my
 database? that doesn't make any sense...

 Could someone please point me in the right direction here please? I
 would really appreciate it!

 Thanks a lot!!

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: Site's home page

2009-08-26 Thread Matias_castro

OK, but, where do I put the logic of that home.ctp? for instance if I
want to display data from another model (ie. news)?

On 26 ago, 11:54, brian bally.z...@gmail.com wrote:
 Copy the file cake/libs/controllers/pages_controller.php to your
 controllers folder. Edit you config/routes.php file to have:

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

 Next, create a view file at views/pages/home.ctp with your home page.

 On Wed, Aug 26, 2009 at 3:33 AM, Matias_castromattias.cas...@gmail.com 
 wrote:

  I have already studied (implemented) the blog and acl tutorials
  getting quite familiar with the basic elements of the framework. I've
  also learnt how to use a bit of bake.

  My question came when I wanted to start my own web page. I have my
  data model, logic, structure (all of them in design), and my home
  page. This is where I have the problem! Where do I put this page??
  This page should also have a controller right (i'm guessing
  appcontroller)? but in that case, it should also have a table in my
  database? that doesn't make any sense...

  Could someone please point me in the right direction here please? I
  would really appreciate it!

  Thanks a lot!!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: Site's home page

2009-08-26 Thread brian

On Wed, Aug 26, 2009 at 11:32 AM, Matias_castromattias.cas...@gmail.com wrote:

 Yes, I believe that should work.

 I have one more dought; shouldn't I use the APP/views/pages/home.ctp
 to build up my home page?

Yes, that's what I said.

 instead of treating the home like any other
 view? and if this is so, how do I controle THAT home? I mean, if I
 want it to display contents of a database/table corresponding to
 another model (for instance news) where should I do it? I'm pretty
 sure it should be a controller... maybe appcontroller?

You can invoke elements inside the view. Have a look at requestAction,
for instance.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: Site's home page

2009-08-26 Thread PaulW

Actually make that...

var $uses = array('News');

On Aug 26, 6:19 pm, PaulW willis...@googlemail.com wrote:
 In the pages_controller.php that Brian talked about you just need to
 add

 var $uses = array('news');

 at the top

 http://book.cakephp.org/view/53/components-helpers-and-uses

 On Aug 26, 5:12 pm, Matias_castro mattias.cas...@gmail.com wrote:



  OK, but, where do I put the logic of that home.ctp? for instance if I
  want to display data from another model (ie. news)?

  On 26 ago, 11:54, brian bally.z...@gmail.com wrote:

   Copy the file cake/libs/controllers/pages_controller.php to your
   controllers folder. Edit you config/routes.php file to have:

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

   Next, create a view file at views/pages/home.ctp with your home page.

   On Wed, Aug 26, 2009 at 3:33 AM, Matias_castromattias.cas...@gmail.com 
   wrote:

I have already studied (implemented) the blog and acl tutorials
getting quite familiar with the basic elements of the framework. I've
also learnt how to use a bit of bake.

My question came when I wanted to start my own web page. I have my
data model, logic, structure (all of them in design), and my home
page. This is where I have the problem! Where do I put this page??
This page should also have a controller right (i'm guessing
appcontroller)? but in that case, it should also have a table in my
database? that doesn't make any sense...

Could someone please point me in the right direction here please? I
would really appreciate it!

Thanks a lot!!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: Site's home page

2009-08-26 Thread PaulW

In the pages_controller.php that Brian talked about you just need to
add

var $uses = array('news');

at the top

http://book.cakephp.org/view/53/components-helpers-and-uses

On Aug 26, 5:12 pm, Matias_castro mattias.cas...@gmail.com wrote:
 OK, but, where do I put the logic of that home.ctp? for instance if I
 want to display data from another model (ie. news)?

 On 26 ago, 11:54, brian bally.z...@gmail.com wrote:



  Copy the file cake/libs/controllers/pages_controller.php to your
  controllers folder. Edit you config/routes.php file to have:

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

  Next, create a view file at views/pages/home.ctp with your home page.

  On Wed, Aug 26, 2009 at 3:33 AM, Matias_castromattias.cas...@gmail.com 
  wrote:

   I have already studied (implemented) the blog and acl tutorials
   getting quite familiar with the basic elements of the framework. I've
   also learnt how to use a bit of bake.

   My question came when I wanted to start my own web page. I have my
   data model, logic, structure (all of them in design), and my home
   page. This is where I have the problem! Where do I put this page??
   This page should also have a controller right (i'm guessing
   appcontroller)? but in that case, it should also have a table in my
   database? that doesn't make any sense...

   Could someone please point me in the right direction here please? I
   would really appreciate it!

   Thanks a lot!!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: Site's home page

2009-08-26 Thread brian

As I said: You can invoke elements inside the view. Have a look at
requestAction,
for instance.

Although, be sure to read this, also:

http://mark-story.com/posts/view/reducing-requestaction-use-in-your-cakephp-sites-with-fat-models

On Wed, Aug 26, 2009 at 12:12 PM, Matias_castromattias.cas...@gmail.com wrote:

 OK, but, where do I put the logic of that home.ctp? for instance if I
 want to display data from another model (ie. news)?

 On 26 ago, 11:54, brian bally.z...@gmail.com wrote:
 Copy the file cake/libs/controllers/pages_controller.php to your
 controllers folder. Edit you config/routes.php file to have:

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

 Next, create a view file at views/pages/home.ctp with your home page.

 On Wed, Aug 26, 2009 at 3:33 AM, Matias_castromattias.cas...@gmail.com 
 wrote:

  I have already studied (implemented) the blog and acl tutorials
  getting quite familiar with the basic elements of the framework. I've
  also learnt how to use a bit of bake.

  My question came when I wanted to start my own web page. I have my
  data model, logic, structure (all of them in design), and my home
  page. This is where I have the problem! Where do I put this page??
  This page should also have a controller right (i'm guessing
  appcontroller)? but in that case, it should also have a table in my
  database? that doesn't make any sense...

  Could someone please point me in the right direction here please? I
  would really appreciate it!

  Thanks a lot!!
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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
-~--~~~~--~~--~--~---



Why do users keep redirecting to the home page on login?

2009-08-25 Thread DavidH

Hi All

I'm still trying to put together a login system of admin and normal
users. It's pretty much working OK; but for some reason I can't fathom
when a user logs in they don;t get refdirected to the page specified
in Auth-loginRedirect(). Instead they end up back at the app root
page. I don't know if this is a problem with routes or something else
I've screwed up. Hope fully someone can help me. Here's some code:

In my app_controller I've this beforeFilter:

function beforeFilter() {

$this-Auth-loginRedirect = array('controller' =
'dashboards', 'action' = 'showdashboard');

//
// Allow the user to see the home page and other static pages
// without needing to log in.
//
$this-Auth-allow('display');
}

This should send all users to their dashboard when they login. This
used to work before I implemented dual (admin and user) logins.

In my users_controller I've got admin and normal user login actions:

function admin_login()
{
if($this-Auth-user())
{
$this-redirect(array('controller'='users',
'action'='index', 'admin' = true));
}
}

function login()
{
if($this-Auth-user())
{
$this-redirect(array('controller'='dashboards',
'action'='showdashboard', 'admin' = false));
}

}
The redirect in the normal users login action was supposed to do the
same thing as the loginRedirect in the app_controller beforeFilter.

Finally I've a home.ctp in /views/pages/:
ul
li?php echo $html-link(__('User Login', true), array('controller'
= 'users', 'action'='login', 'admin' = false));?/li
li?php echo $html-link(__('Administrator Login', true), array
('controller' = 'users', 'action'='login', 'admin' = true));?/li
/ul

If I click on either of these links I get the correct login form and I
can log in; but instead of going to either /dashboards/showdashboard/
or to /users/index/ (depending on whether it's an admin login or a
normal user login) I end up back at home.ctp and then have to navigate
from there.

Why are these redirects not working for me?

Thanks

David

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: Why do users keep redirecting to the home page on login?

2009-08-25 Thread DavidH

It did exactly the same - allowed me to login but then redirected to /
views/pages/home.ctp



On Aug 25, 2:45 pm, Brendon Kozlowski (Realm)
brendon...@hotmail.com wrote:
 Just as a test, can you set $this-Auth-allow('*') instead of
 'display' and see what happens?

 On Aug 25, 8:14 am, DavidH djhollingwo...@gmail.com wrote:

  Hi All

  I'm still trying to put together a login system of admin and normal
  users. It's pretty much working OK; but for some reason I can't fathom
  when a user logs in they don;t get refdirected to the page specified
  in Auth-loginRedirect(). Instead they end up back at the app root
  page. I don't know if this is a problem with routes or something else
  I've screwed up. Hope fully someone can help me. Here's some code:

  In my app_controller I've this beforeFilter:

      function beforeFilter() {

          $this-Auth-loginRedirect = array('controller' =
  'dashboards', 'action' = 'showdashboard');

          //
          // Allow the user to see the home page and other static pages
          // without needing to log in.
          //
          $this-Auth-allow('display');
      }

  This should send all users to their dashboard when they login. This
  used to work before I implemented dual (admin and user) logins.

  In my users_controller I've got admin and normal user login actions:

      function admin_login()
      {
          if($this-Auth-user())
          {
              $this-redirect(array('controller'='users',
  'action'='index', 'admin' = true));
          }
      }

      function login()
      {
          if($this-Auth-user())
          {
              $this-redirect(array('controller'='dashboards',
  'action'='showdashboard', 'admin' = false));
          }

      }
  The redirect in the normal users login action was supposed to do the
  same thing as the loginRedirect in the app_controller beforeFilter.

  Finally I've a home.ctp in /views/pages/:
  ul
  li?php echo $html-link(__('User Login', true), array('controller'
  = 'users', 'action'='login', 'admin' = false));?/li
  li?php echo $html-link(__('Administrator Login', true), array
  ('controller' = 'users', 'action'='login', 'admin' = true));?/li
  /ul

  If I click on either of these links I get the correct login form and I
  can log in; but instead of going to either /dashboards/showdashboard/
  or to /users/index/ (depending on whether it's an admin login or a
  normal user login) I end up back at home.ctp and then have to navigate
  from there.

  Why are these redirects not working for me?

  Thanks

  David
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: Why do users keep redirecting to the home page on login?

2009-08-25 Thread Brendon Kozlowski (Realm)

Just as a test, can you set $this-Auth-allow('*') instead of
'display' and see what happens?

On Aug 25, 8:14 am, DavidH djhollingwo...@gmail.com wrote:
 Hi All

 I'm still trying to put together a login system of admin and normal
 users. It's pretty much working OK; but for some reason I can't fathom
 when a user logs in they don;t get refdirected to the page specified
 in Auth-loginRedirect(). Instead they end up back at the app root
 page. I don't know if this is a problem with routes or something else
 I've screwed up. Hope fully someone can help me. Here's some code:

 In my app_controller I've this beforeFilter:

     function beforeFilter() {

         $this-Auth-loginRedirect = array('controller' =
 'dashboards', 'action' = 'showdashboard');

         //
         // Allow the user to see the home page and other static pages
         // without needing to log in.
         //
         $this-Auth-allow('display');
     }

 This should send all users to their dashboard when they login. This
 used to work before I implemented dual (admin and user) logins.

 In my users_controller I've got admin and normal user login actions:

     function admin_login()
     {
         if($this-Auth-user())
         {
             $this-redirect(array('controller'='users',
 'action'='index', 'admin' = true));
         }
     }

     function login()
     {
         if($this-Auth-user())
         {
             $this-redirect(array('controller'='dashboards',
 'action'='showdashboard', 'admin' = false));
         }

     }
 The redirect in the normal users login action was supposed to do the
 same thing as the loginRedirect in the app_controller beforeFilter.

 Finally I've a home.ctp in /views/pages/:
 ul
 li?php echo $html-link(__('User Login', true), array('controller'
 = 'users', 'action'='login', 'admin' = false));?/li
 li?php echo $html-link(__('Administrator Login', true), array
 ('controller' = 'users', 'action'='login', 'admin' = true));?/li
 /ul

 If I click on either of these links I get the correct login form and I
 can log in; but instead of going to either /dashboards/showdashboard/
 or to /users/index/ (depending on whether it's an admin login or a
 normal user login) I end up back at home.ctp and then have to navigate
 from there.

 Why are these redirects not working for me?

 Thanks

 David
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: Why do users keep redirecting to the home page on login?

2009-08-25 Thread Alexandru Ciobanu

On 8/25/2009 3:14 PM, DavidH wrote:
 Hi All

 I'm still trying to put together a login system of admin and normal
 users. It's pretty much working OK; but for some reason I can't fathom
 when a user logs in they don;t get refdirected to the page specified
 in Auth-loginRedirect(). Instead they end up back at the app root
 page.

Set autoRedirect to false, it defaults to true.

e.i. $this-Auth-autoRedirect = false;

http://api.cakephp.org/class/auth-component


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: Why do users keep redirecting to the home page on login?

2009-08-25 Thread DavidH

Hi

Thanks for your suggestion Alexandru. I set autoRedirect to false in
my UsersController beforeFilter; but this has no effect either. Users
still get redirected back to home.ctp after login.

David

On Aug 25, 4:25 pm, Alexandru Ciobanu ics.cake...@gmail.com wrote:
 On 8/25/2009 3:14 PM, DavidH wrote: Hi All

  I'm still trying to put together a login system of admin and normal
  users. It's pretty much working OK; but for some reason I can't fathom
  when a user logs in they don;t get refdirected to the page specified
  in Auth-loginRedirect(). Instead they end up back at the app root
  page.

 Set autoRedirect to false, it defaults to true.

 e.i. $this-Auth-autoRedirect = false;

 http://api.cakephp.org/class/auth-component
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: Why do users keep redirecting to the home page on login? - Solved

2009-08-25 Thread DavidH

I had to set autoRedirect to false inside each of the login actions,
then it worked OK.

Not sure why setting autoRedirect in the beforeFilter wasn't working
though as I was under the impression that anything in there would be
enacted before the action.

However I guess that a user isn't authenticated until the login action
and so I guess autoRedirect is set again during the login action. I
think I'd probably find that setting it in the beforeFilter only
affects actions other than login.

Oh well, onwards and upwards :)

David

On Aug 25, 4:25 pm, Alexandru Ciobanu ics.cake...@gmail.com wrote:
 On 8/25/2009 3:14 PM, DavidH wrote: Hi All

  I'm still trying to put together a login system of admin and normal
  users. It's pretty much working OK; but for some reason I can't fathom
  when a user logs in they don;t get refdirected to the page specified
  in Auth-loginRedirect(). Instead they end up back at the app root
  page.

 Set autoRedirect to false, it defaults to true.

 e.i. $this-Auth-autoRedirect = false;

 http://api.cakephp.org/class/auth-component
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: Why do users keep redirecting to the home page on login?

2009-08-25 Thread DavidH

Just changed the subject back from solved to not solved.

I found that unless I have autoRedirect = false in both the
beforeFilter AND the login actions then it still does the
autoRedirect.

Can anyone explain why I have to set it in both places? There must be
something fundamental I don't understand here.

Thanks

David

On Aug 26, 6:53 am, DavidH djhollingwo...@gmail.com wrote:
 I had to set autoRedirect to false inside each of the login actions,
 then it worked OK.

 Not sure why setting autoRedirect in the beforeFilter wasn't working
 though as I was under the impression that anything in there would be
 enacted before the action.

 However I guess that a user isn't authenticated until the login action
 and so I guess autoRedirect is set again during the login action. I
 think I'd probably find that setting it in the beforeFilter only
 affects actions other than login.

 Oh well, onwards and upwards :)

 David

 On Aug 25, 4:25 pm, Alexandru Ciobanu ics.cake...@gmail.com wrote:

  On 8/25/2009 3:14 PM, DavidH wrote: Hi All

   I'm still trying to put together a login system of admin and normal
   users. It's pretty much working OK; but for some reason I can't fathom
   when a user logs in they don;t get refdirected to the page specified
   in Auth-loginRedirect(). Instead they end up back at the app root
   page.

  Set autoRedirect to false, it defaults to true.

  e.i. $this-Auth-autoRedirect = false;

 http://api.cakephp.org/class/auth-component
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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
-~--~~~~--~~--~--~---



modify home page

2009-07-02 Thread Paulos23

Hello people,
I am having a weird issue.I build a home page,which i placed it in
pages folder.All work fine but there are 2 links appear which refer to
cakephp.I dont have any link for cakephp in my home layout,so i guess
something else affect the layout.Does any1 know what i should do to
make them disappear?

Any help would be nice!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: modify home page

2009-07-02 Thread Graham Weldon

Paulos23 wrote:
 Hello people,
 I am having a weird issue.I build a home page,which i placed it in
 pages folder.All work fine but there are 2 links appear which refer to
 cakephp.I dont have any link for cakephp in my home layout,so i guess
 something else affect the layout.Does any1 know what i should do to
 make them disappear?

 Any help would be nice!
   


Hey,

Ideally you would leave the links in place to provide some backlinks to 
CakePHP.
But should you want to remove them, edit the default layout: 
app/views/layouts/default.ctp
If the file doesnt exist, you can create one. You can copy the standard 
one from: cake/libs/views/layouts/default.ctp

Let us know how you go, and if you need anything else.

Cheers,
Graham Weldon
http://grahamweldon.com


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: modify home page

2009-07-02 Thread paulos nikolo
Ty Graham so much.I am not bother with these links and i would put them when
i will finish my app.But for this moment i prefer them being disabled.

Regards,
Paulos

2009/7/2 Graham Weldon gra...@grahamweldon.com


 Paulos23 wrote:
  Hello people,
  I am having a weird issue.I build a home page,which i placed it in
  pages folder.All work fine but there are 2 links appear which refer to
  cakephp.I dont have any link for cakephp in my home layout,so i guess
  something else affect the layout.Does any1 know what i should do to
  make them disappear?
 
  Any help would be nice!
 


 Hey,

 Ideally you would leave the links in place to provide some backlinks to
 CakePHP.
 But should you want to remove them, edit the default layout:
 app/views/layouts/default.ctp
 If the file doesnt exist, you can create one. You can copy the standard
 one from: cake/libs/views/layouts/default.ctp

 Let us know how you go, and if you need anything else.

 Cheers,
 Graham Weldon
 http://grahamweldon.com


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: modify home page

2009-07-02 Thread hari priya
Hello ,
If you want to disable the default layout

Check this
http://book.cakephp.org/view/789/Modify-default-HTML-produced-by-baked-templates

On Thu, Jul 2, 2009 at 4:39 PM, paulos nikolo paulitosthe...@gmail.comwrote:

 Ty Graham so much.I am not bother with these links and i would put them
 when i will finish my app.But for this moment i prefer them being disabled.

 Regards,
 Paulos

 2009/7/2 Graham Weldon gra...@grahamweldon.com


 Paulos23 wrote:
  Hello people,
  I am having a weird issue.I build a home page,which i placed it in
  pages folder.All work fine but there are 2 links appear which refer to
  cakephp.I dont have any link for cakephp in my home layout,so i guess
  something else affect the layout.Does any1 know what i should do to
  make them disappear?
 
  Any help would be nice!
 


 Hey,

 Ideally you would leave the links in place to provide some backlinks to
 CakePHP.
 But should you want to remove them, edit the default layout:
 app/views/layouts/default.ctp
 If the file doesnt exist, you can create one. You can copy the standard
 one from: cake/libs/views/layouts/default.ctp

 Let us know how you go, and if you need anything else.

 Cheers,
 Graham Weldon
 http://grahamweldon.com





 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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 interactive home page tutorial...

2008-12-18 Thread Marcus Silva

Hi folks,

while many of you may find this question completely irrelevant, i
still would like to ask it and any help would be kindly appreciated.

Does anyone know a good tutorial that I could use to create something
similar to the Cakephp home page sliding content effects?

I do know that Cake uses the jquery interface elements found here :
http://interface.eyecon.ro/ , but I could not find anything there that
I could use.

Been searching on Google for ages and still havent found anything that
I could follow and try to build on.

Hope some of you may be able to help.

many thanks in advance...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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 interactive home page tutorial...

2008-12-18 Thread Kyle Decot

I think what your referring to is know is the Coda Slider Effect.
There's a really good tutorial of how to do this at:

http://jqueryfordesigners.com/coda-slider-effect/


Marcus Silva wrote:
 Hi folks,

 while many of you may find this question completely irrelevant, i
 still would like to ask it and any help would be kindly appreciated.

 Does anyone know a good tutorial that I could use to create something
 similar to the Cakephp home page sliding content effects?

 I do know that Cake uses the jquery interface elements found here :
 http://interface.eyecon.ro/ , but I could not find anything there that
 I could use.

 Been searching on Google for ages and still havent found anything that
 I could follow and try to build on.

 Hope some of you may be able to help.

 many thanks in advance...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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 interactive home page tutorial...

2008-12-18 Thread Marcus Silva

Hi Kyle,

That's exactly what I was looking for.  thank you

Kyle Decot wrote:
 I think what your referring to is know is the Coda Slider Effect.
 There's a really good tutorial of how to do this at:

 http://jqueryfordesigners.com/coda-slider-effect/


 Marcus Silva wrote:
  Hi folks,
 
  while many of you may find this question completely irrelevant, i
  still would like to ask it and any help would be kindly appreciated.
 
  Does anyone know a good tutorial that I could use to create something
  similar to the Cakephp home page sliding content effects?
 
  I do know that Cake uses the jquery interface elements found here :
  http://interface.eyecon.ro/ , but I could not find anything there that
  I could use.
 
  Been searching on Google for ages and still havent found anything that
  I could follow and try to build on.
 
  Hope some of you may be able to help.
 
  many thanks in advance...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email 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: Design a Highly dynamic content home page

2008-09-25 Thread [EMAIL PROTECTED]


It depends on your project's design to some extent.
It has all the preformance downsides of using requestAction but this
can be helped by caching the views in some cases.
On the up-side you can have a setup where the home-page does not need
to be altered whenever a module is added, removed or changed. This is
very important for my application since each installation will have a
varying number of plugins.

/Martin


On Sep 24, 7:21 am, Bookrock [EMAIL PROTECTED] wrote:
 Thanks
  RequestAction is good instead of $uses = array('module1', 'module2',
 'module3', 'module4',
 'module5');, is it your mean?

 On Sep 23, 11:59 am, [EMAIL PROTECTED]

 [EMAIL PROTECTED] wrote:
  This kind of portal-page is one place where I have put requestAction
  to good use. In combination with caching, it works pretty well.
  The main benefit is that each independent module (mine are plugins)
  can internally decide what to render and show on the front-page. The
  front-page does not need to know anything about what each module is
  all about.

  On Sep 22, 1:53 pm, Bookrock [EMAIL PROTECTED] wrote:

   Hi,
   I am working on a dynamic content website. I want to implement home
   page. This home page
   of my site needs to have a lot of dynamic content generated on it.
   Dynamic contents are coming from different module.

   I have implemented it like this.

   1 Make HomesController
   2 Use of $uses = array('module1', 'module2', 'module3', 'module4',
   'module5');
   3 Make a index action
   4 configure routes.php

   It's working fine..but in terms of page performance , I don't know is
   it good?

   Can any one suggest me any other good way?

   Please help me

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



Re: Design a Highly dynamic content home page

2008-09-24 Thread Bookrock

Thanks
 RequestAction is good instead of $uses = array('module1', 'module2',
'module3', 'module4',
'module5');, is it your mean?

On Sep 23, 11:59 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 This kind of portal-page is one place where I have put requestAction
 to good use. In combination with caching, it works pretty well.
 The main benefit is that each independent module (mine are plugins)
 can internally decide what to render and show on the front-page. The
 front-page does not need to know anything about what each module is
 all about.

 On Sep 22, 1:53 pm, Bookrock [EMAIL PROTECTED] wrote:

  Hi,
  I am working on a dynamic content website. I want to implement home
  page. This home page
  of my site needs to have a lot of dynamic content generated on it.
  Dynamic contents are coming from different module.

  I have implemented it like this.

  1 Make HomesController
  2 Use of $uses = array('module1', 'module2', 'module3', 'module4',
  'module5');
  3 Make a index action
  4 configure routes.php

  It's working fine..but in terms of page performance , I don't know is
  it good?

  Can any one suggest me any other good way?

  Please help me

  Thanks

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



Re: Design a Highly dynamic content home page

2008-09-23 Thread [EMAIL PROTECTED]

This kind of portal-page is one place where I have put requestAction
to good use. In combination with caching, it works pretty well.
The main benefit is that each independent module (mine are plugins)
can internally decide what to render and show on the front-page. The
front-page does not need to know anything about what each module is
all about.




On Sep 22, 1:53 pm, Bookrock [EMAIL PROTECTED] wrote:
 Hi,
 I am working on a dynamic content website. I want to implement home
 page. This home page
 of my site needs to have a lot of dynamic content generated on it.
 Dynamic contents are coming from different module.

 I have implemented it like this.

 1 Make HomesController
 2 Use of $uses = array('module1', 'module2', 'module3', 'module4',
 'module5');
 3 Make a index action
 4 configure routes.php

 It's working fine..but in terms of page performance , I don't know is
 it good?

 Can any one suggest me any other good way?

 Please help me

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



Design a Highly dynamic content home page

2008-09-22 Thread Bookrock

Hi,
I am working on a dynamic content website. I want to implement home
page. This home page
of my site needs to have a lot of dynamic content generated on it.
Dynamic contents are coming from different module.

I have implemented it like this.

1 Make HomesController
2 Use of $uses = array('module1', 'module2', 'module3', 'module4',
'module5');
3 Make a index action
4 configure routes.php

It's working fine..but in terms of page performance , I don't know is
it good?

Can any one suggest me any other good way?

Please help me

Thanks



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



Re: Design a Highly dynamic content home page

2008-09-22 Thread teknoid

there are other, more robust ways to accomplish this, for example by
using cached data.

but really, make it work, then make it work better. keep in mind that
this might be something you'll revisit later, i wouldn't get too hung
up on the performance, because it sounds like you are pretty early in
your project.

On Sep 22, 7:53 am, Bookrock [EMAIL PROTECTED] wrote:
 Hi,
 I am working on a dynamic content website. I want to implement home
 page. This home page
 of my site needs to have a lot of dynamic content generated on it.
 Dynamic contents are coming from different module.

 I have implemented it like this.

 1 Make HomesController
 2 Use of $uses = array('module1', 'module2', 'module3', 'module4',
 'module5');
 3 Make a index action
 4 configure routes.php

 It's working fine..but in terms of page performance , I don't know is
 it good?

 Can any one suggest me any other good way?

 Please help me

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



home page

2008-07-10 Thread [EMAIL PROTECTED]

Could some one please help me setup my home page.
i have a static page to be set as homepage with some hyperlinks.
i am new to php aswell as cakephp.
where should i place the home.ctp file,
then should i have a controller to that.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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: home page

2008-07-10 Thread Sam Sherlock
home.ctp goes in views/pages/

no you don't need a controller for static pages unless your overiding it
(which I'd say your not [at this stage anyway])

- S

2008/7/10 [EMAIL PROTECTED] [EMAIL PROTECTED]:


 Could some one please help me setup my home page.
 i have a static page to be set as homepage with some hyperlinks.
 i am new to php aswell as cakephp.
 where should i place the home.ctp file,
 then should i have a controller to that.


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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: home page

2008-07-10 Thread jinhr

1) create files:
/app/views/pages/home.ctp
/app/views/pages/mystaticpage.ctp

2) open file /app/config/routes.php, which route any specific url to
corresponding page. Edit following codes:
   Router::connect('/', array('controller' = 'pages', 'action' =
'display', 'mystaticpage')); /* this is for http://localhost/app/ */
   Router::connect('/mystatic', array('controller' = 'pages',
'action' = 'display', 'mystaticpage')); /* this is for 
http://localhost/app/mystatic/
*/

   Notice know the controller is PagesController, action is
display.

3) Done. Check by open url:
http://localhost/app/
http://localhost/app/mystatic/

Good Luck.

On Jul 10, 10:50 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Could some one please help me setup my home page.
 i have a static page to be set as homepage with some hyperlinks.
 i am new to php aswell as cakephp.
 where should i place the home.ctp file,
 then should i have a controller to that.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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: home page

2008-07-10 Thread jinhr

1) create files:
/app/views/pages/home.ctp
/app/views/pages/mystaticpage.ctp

2) open file /app/config/routes.php, which route any specific url to
corresponding page. Edit following codes:
   /*** this is for http://localhost/app/ ***/
   Router::connect('/', array('controller' = 'pages', 'action'
='display', 'home'));

 /*** this is for http://localhost/app/mystatic/   ***/
 Router::connect('/mystatic', array('controller' = 'pages', 'action'
= 'display', 'mystaticpage'));

   Notice know the controller is PagesController, action is
display.

3) Done. Check by open url:
http://localhost/app/
http://localhost/app/mystatic/

Good Luck.

On Jul 10, 10:50 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Could some one please help me setup my home page.
 i have a static page to be set as homepage with some hyperlinks.
 i am new to php aswell as cakephp.
 where should i place the home.ctp file,
 then should i have a controller to that.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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
-~--~~~~--~~--~--~---



no scripts on home page?

2008-05-02 Thread alxlevin

Hi.  This is my first project with CakePHP so hopefully this is a
simple question.  I'm trying to use the standard views/pages/home.ctp
file to create my home page view.  I've found that I can include
elements but not anything from the htmlhelper, such as images.  When I
try and use it, I don't get any errors but no HTML is outputted at all
from the helper.  I've had no problems on any of the standard view
pages, just this one.  Is there some kind of simple variable I need to
set in order for the htmlhelper to be active on this page?  I'd
appreciate any insight that anyone might have.  Thanks.

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



Re: no scripts on home page?

2008-05-02 Thread Sliv

the pages controller uses the home view and by default has the HTML
helper loaded.  Make sure you are using echo $html... and not just
$html

also read this in it's entirety: http://book.cakephp.org

On May 2, 8:46 am, alxlevin [EMAIL PROTECTED] wrote:
 Hi.  This is my first project with CakePHP so hopefully this is a
 simple question.  I'm trying to use the standard views/pages/home.ctp
 file to create my home page view.  I've found that I can include
 elements but not anything from the htmlhelper, such as images.  When I
 try and use it, I don't get any errors but no HTML is outputted at all
 from the helper.  I've had no problems on any of the standard view
 pages, just this one.  Is there some kind of simple variable I need to
 set in order for the htmlhelper to be active on this page?  I'd
 appreciate any insight that anyone might have.  Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: no scripts on home page?

2008-05-02 Thread grigri

There's nothing 'special' about the PagesController - it uses the
'Html' helper unless you tell it not to.

Without seeing some code, it's impossible to be certain...

...but, were I a gamber, I'd bet that you're doing this:

?php $html-link(...); ?

instead of this (which works):

?php echo $html-link(...); ?

If this isn't it, show some code!

On May 2, 1:46 pm, alxlevin [EMAIL PROTECTED] wrote:
 Hi.  This is my first project with CakePHP so hopefully this is a
 simple question.  I'm trying to use the standard views/pages/home.ctp
 file to create my home page view.  I've found that I can include
 elements but not anything from the htmlhelper, such as images.  When I
 try and use it, I don't get any errors but no HTML is outputted at all
 from the helper.  I've had no problems on any of the standard view
 pages, just this one.  Is there some kind of simple variable I need to
 set in order for the htmlhelper to be active on this page?  I'd
 appreciate any insight that anyone might have.  Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: no scripts on home page?

2008-05-02 Thread Sliv

which one of us is the evil twin... :P
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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: no scripts on home page?

2008-05-02 Thread grigri

heh - depends on my caffeine intake, I suppose

On May 2, 3:29 pm, Sliv [EMAIL PROTECTED] wrote:
 which one of us is the evil twin... :P
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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: no scripts on home page?

2008-05-02 Thread alxlevin

Wow, rookie mistake.  Thanks guys, I feel a bit embarrased now.

On May 2, 10:27 am, grigri [EMAIL PROTECTED] wrote:
 There's nothing 'special' about the PagesController - it uses the
 'Html' helper unless you tell it not to.

 Without seeing some code, it's impossible to be certain...

 ...but, were I a gamber, I'd bet that you're doing this:

 ?php $html-link(...); ?

 instead of this (which works):

 ?php echo $html-link(...); ?

 If this isn't it, show some code!

 On May 2, 1:46 pm,alxlevin[EMAIL PROTECTED] wrote:



  Hi.  This is my first project with CakePHP so hopefully this is a
  simple question.  I'm trying to use the standard views/pages/home.ctp
  file to create my home page view.  I've found that I can include
  elements but not anything from the htmlhelper, such as images.  When I
  try and use it, I don't get any errors but no HTML is outputted at all
  from the helper.  I've had no problems on any of the standard view
  pages, just this one.  Is there some kind of simple variable I need to
  set in order for the htmlhelper to be active on this page?  I'd
  appreciate any insight that anyone might have.  Thanks.- Hide quoted text -

 - Show quoted text -

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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: Site home page question

2008-02-21 Thread Baz
I usaully have a a different layout for my home page which consists of
various elements and the elements call requestAction

As Sam said, there's some docs out there about that and problems with
efficiency. However, CakePHP has some beautiful caching which makes this
livable

On Thu, Feb 21, 2008 at 10:46 AM, jim starboard [EMAIL PROTECTED]
wrote:



 Sorry about getting off on the wrong foot.

 I think my main question is: Should I create a controller for my
 homepage? My homepage is not really specific to a single model, so it
 would not be named as such. So is it OK to have something like
 HomeController, with an index method? In general do you create
 controllers that only have an index method?

 All the tutorials have very tight relationships between a single
 table, controller, view and model, I wish there were more examples of
 multiple models being used, as well as controllers that were not tied
 to as single model/table.


 On Feb 20, 4:36 pm, DJ Spark [EMAIL PROTECTED] wrote:
 Your controller will get all the info you need from models, and
  using $this-set('varname', $yourinfo) will make it available for the
  view, where you make a loop (prabably) and show your information
The basic blog example inhttp://manual.cakephp.orgwill show it in
  a very easy way. just try it.
 
 Spark
 
 
 
  On Wed, Feb 20, 2008 at 5:43 PM, jim starboard [EMAIL PROTECTED]
 wrote:
 
I'm trying to get a high-level understanding of how you would handle
 a
site's homepage. Lets say it's a gaming site. Some of the items on
 the
homepage would be:
 
-userlog in -- would show logged in state, if the user was logged in.
-highscores -- would show high scores in different games
- featured game -- admin tools select which game is featured.
 
I understand the basic MVC idea, and I can create models and
controllers for each of my *single* items, like user, game, etc.
 Where
I get confused is how I combine information in a view. Is the
 homepage
a single view or multiple views combined? Do I need a controller for
 a
page like index? Basically looking for any help here, with a high
level explanation.
 
TIA
Jim
 
  --
  [livesets]http://djspark.com.br/
  [web]http://sydi.net
  [filmes]http://melhoresfilmes.com.br
 


--~--~-~--~~~---~--~~
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: Site home page question

2008-02-21 Thread jim starboard


Sorry about getting off on the wrong foot.

I think my main question is: Should I create a controller for my
homepage? My homepage is not really specific to a single model, so it
would not be named as such. So is it OK to have something like
HomeController, with an index method? In general do you create
controllers that only have an index method?

All the tutorials have very tight relationships between a single
table, controller, view and model, I wish there were more examples of
multiple models being used, as well as controllers that were not tied
to as single model/table.


On Feb 20, 4:36 pm, DJ Spark [EMAIL PROTECTED] wrote:
Your controller will get all the info you need from models, and
 using $this-set('varname', $yourinfo) will make it available for the
 view, where you make a loop (prabably) and show your information
   The basic blog example inhttp://manual.cakephp.orgwill show it in
 a very easy way. just try it.

Spark



 On Wed, Feb 20, 2008 at 5:43 PM, jim starboard [EMAIL PROTECTED] wrote:

   I'm trying to get a high-level understanding of how you would handle a
   site's homepage. Lets say it's a gaming site. Some of the items on the
   homepage would be:

   -userlog in -- would show logged in state, if the user was logged in.
   -highscores -- would show high scores in different games
   - featured game -- admin tools select which game is featured.

   I understand the basic MVC idea, and I can create models and
   controllers for each of my *single* items, like user, game, etc. Where
   I get confused is how I combine information in a view. Is the homepage
   a single view or multiple views combined? Do I need a controller for a
   page like index? Basically looking for any help here, with a high
   level explanation.

   TIA
   Jim

 --
 [livesets]http://djspark.com.br/
 [web]http://sydi.net
 [filmes]http://melhoresfilmes.com.br
--~--~-~--~~~---~--~~
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: Site home page question

2008-02-21 Thread Chris Hartjes

On Thu, Feb 21, 2008 at 12:28 PM, jim starboard [EMAIL PROTECTED] wrote:

  OK, so what's the entry point for your homepage? A controller with an
  index method? Or a view?

In your case,

/home_page/index

you'd have your HomePage controller and an index view for that.

Yes, you can create controllers that are not associated with a model
or even grab data from multiple models for use in a view.  Crazy
stuff, I know.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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: Site home page question

2008-02-21 Thread jim starboard

OK, so what's the entry point for your homepage? A controller with an
index method? Or a view?

On Feb 21, 12:02 pm, Baz [EMAIL PROTECTED] wrote:
 I usaully have a a different layout for my home page which consists of
 various elements and the elements call requestAction

 As Sam said, there's some docs out there about that and problems with
 efficiency. However, CakePHP has some beautiful caching which makes this
 livable

 On Thu, Feb 21, 2008 at 10:46 AM, jim starboard [EMAIL PROTECTED]
 wrote:



  Sorry about getting off on the wrong foot.

  I think my main question is: Should I create a controller for my
  homepage? My homepage is not really specific to a single model, so it
  would not be named as such. So is it OK to have something like
  HomeController, with an index method? In general do you create
  controllers that only have an index method?

  All the tutorials have very tight relationships between a single
  table, controller, view and model, I wish there were more examples of
  multiple models being used, as well as controllers that were not tied
  to as single model/table.

  On Feb 20, 4:36 pm, DJ Spark [EMAIL PROTECTED] wrote:
  Your controller will get all the info you need from models, and
   using $this-set('varname', $yourinfo) will make it available for the
   view, where you make a loop (prabably) and show your information
 The basic blog example inhttp://manual.cakephp.orgwillshow it in
   a very easy way. just try it.

  Spark

   On Wed, Feb 20, 2008 at 5:43 PM, jim starboard [EMAIL PROTECTED]
  wrote:

 I'm trying to get a high-level understanding of how you would handle
  a
 site's homepage. Lets say it's a gaming site. Some of the items on
  the
 homepage would be:

 -userlog in -- would show logged in state, if the user was logged in.
 -highscores -- would show high scores in different games
 - featured game -- admin tools select which game is featured.

 I understand the basic MVC idea, and I can create models and
 controllers for each of my *single* items, like user, game, etc.
  Where
 I get confused is how I combine information in a view. Is the
  homepage
 a single view or multiple views combined? Do I need a controller for
  a
 page like index? Basically looking for any help here, with a high
 level explanation.

 TIA
 Jim

   --
   [livesets]http://djspark.com.br/
   [web]http://sydi.net
   [filmes]http://melhoresfilmes.com.br
--~--~-~--~~~---~--~~
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: Site home page question

2008-02-21 Thread clemos
Hi Jim

To me, the simplest method would be to use the built-in PagesController.
you only need to create (or change the default) /app/view/pages/home.ctp
and use the router to make it your root index (just like it actually is in a
fresh CakePHP install: see /app/config/router.php)
Then in this view (home.ctp), use renderElement and requestAction to display
your elements:
in general, I use renderElement for static or global bits of HTML (for
example, the user login form) and requestAction to display data from other
Controllers / Models (for example, the highscore display, which would
probably need a method in your scores controller, and a view)

+++
clément

On Thu, Feb 21, 2008 at 5:46 PM, jim starboard [EMAIL PROTECTED]
wrote:



 Sorry about getting off on the wrong foot.

 I think my main question is: Should I create a controller for my
 homepage? My homepage is not really specific to a single model, so it
 would not be named as such. So is it OK to have something like
 HomeController, with an index method? In general do you create
 controllers that only have an index method?

 All the tutorials have very tight relationships between a single
 table, controller, view and model, I wish there were more examples of
 multiple models being used, as well as controllers that were not tied
 to as single model/table.


 On Feb 20, 4:36 pm, DJ Spark [EMAIL PROTECTED] wrote:
 Your controller will get all the info you need from models, and
  using $this-set('varname', $yourinfo) will make it available for the
  view, where you make a loop (prabably) and show your information
The basic blog example inhttp://manual.cakephp.orgwill show it in
  a very easy way. just try it.
 
 Spark
 
 
 
  On Wed, Feb 20, 2008 at 5:43 PM, jim starboard [EMAIL PROTECTED]
 wrote:
 
I'm trying to get a high-level understanding of how you would handle
 a
site's homepage. Lets say it's a gaming site. Some of the items on
 the
homepage would be:
 
-userlog in -- would show logged in state, if the user was logged in.
-highscores -- would show high scores in different games
- featured game -- admin tools select which game is featured.
 
I understand the basic MVC idea, and I can create models and
controllers for each of my *single* items, like user, game, etc.
 Where
I get confused is how I combine information in a view. Is the
 homepage
a single view or multiple views combined? Do I need a controller for
 a
page like index? Basically looking for any help here, with a high
level explanation.
 
TIA
Jim
 
  --
  [livesets]http://djspark.com.br/
  [web]http://sydi.net
  [filmes]http://melhoresfilmes.com.br
 


--~--~-~--~~~---~--~~
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: Site home page question

2008-02-21 Thread the_woodsman


 Most of this community
 is made up of intelligent, self-sufficient people who know how to
 phrase their questions in order to help others help them.

... I'm sure that'll give you plenty to go
 on, but if not, come back here and try a few specific follow-up
 questions, and someone here will point you in the right direction.

Nate, that was brilliantly put.

In the best DRY spirit, I think it should be copied and pasted into
other threads as necessary :)
--~--~-~--~~~---~--~~
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: CakePHP OthAuth Component, Permissions -- Home Page Access HOW?

2008-02-05 Thread SteveScan

Thank you thats what I needed to know where the controller was for the
pages controller.
Of great help thank you for your time.
Steve

On Feb 4, 4:18 pm, daphonz [EMAIL PROTECTED] wrote:
 Do you need to do permissions checking on the home page?  In you
 app_controller.php file, you can set the actions that trigger the auth
 checking using the othAuthRestrictions var.  Also, in addition to
 allowing access to orders and stock, you can add additional rules to
 let them access the pages controller (which is a core controller used
 to display page files).

 Also, I think you need to add permissions so like so:

 /groups/*
 /pages/*

 or:

 /pages/home.html

 For things to work properly.

 Hope this helps.

 -Casey

 On Feb 3, 10:27 am, SteveScan [EMAIL PROTECTED] wrote:

  Hi,
  Please bear with me as I am new to PHP and CakePHP.
  I have implemented Authentication using the OthAuth component (http://
  bakery.cakephp.org/articles/view/othauth-component-v0-5-4-5).

  In the groups table I have created 1, administrators ; 2 orders ; 3
  stock.
  In the permissions table I have created 1, *;  2, order ; 3, stock.
  Hence Group 1 has access to everything. Orders Group has permissions
  on controller order, and Stock Group has permissions on the Stock
  controller. These have been assigned in the group permissions table.

  Group 1 administrators can access everything (including the home
  page). However Groups 2 and 3 (Orders and Stock) CAN NOT ACCESS THE
  HOME PAGE

  How do I set this up at the home page is defined in app/views/pages/
  home.thtml.

  There is NO Controller for the HOME PAGE so how do I assign ALL Groups
  permission(s) to access the home page in the permissions table or is
  there some other mechanism.

  Other than the fact that ALL groups Except the administrators
  (permissions set to *) access their own area's fine BUT CAN NOT SEE
  the HOME page!!!  HELP!

  And how do I set up a nice Sorry you are not permitted to see this
  page other than a flash message and then re-direct to the home page
  that hopefully ALL will be able to see.

  Other than this it all appears to be fine I am missing something that
  I do not understand.

  Thank you all for your help in advance.

  SteveScan
--~--~-~--~~~---~--~~
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: CakePHP OthAuth Component, Permissions -- Home Page Access HOW?

2008-02-04 Thread daphonz

Do you need to do permissions checking on the home page?  In you
app_controller.php file, you can set the actions that trigger the auth
checking using the othAuthRestrictions var.  Also, in addition to
allowing access to orders and stock, you can add additional rules to
let them access the pages controller (which is a core controller used
to display page files).

Also, I think you need to add permissions so like so:

/groups/*
/pages/*

or:

/pages/home.html

For things to work properly.

Hope this helps.

-Casey

On Feb 3, 10:27 am, SteveScan [EMAIL PROTECTED] wrote:
 Hi,
 Please bear with me as I am new to PHP and CakePHP.
 I have implemented Authentication using the OthAuth component (http://
 bakery.cakephp.org/articles/view/othauth-component-v0-5-4-5).

 In the groups table I have created 1, administrators ; 2 orders ; 3
 stock.
 In the permissions table I have created 1, *;  2, order ; 3, stock.
 Hence Group 1 has access to everything. Orders Group has permissions
 on controller order, and Stock Group has permissions on the Stock
 controller. These have been assigned in the group permissions table.

 Group 1 administrators can access everything (including the home
 page). However Groups 2 and 3 (Orders and Stock) CAN NOT ACCESS THE
 HOME PAGE

 How do I set this up at the home page is defined in app/views/pages/
 home.thtml.

 There is NO Controller for the HOME PAGE so how do I assign ALL Groups
 permission(s) to access the home page in the permissions table or is
 there some other mechanism.

 Other than the fact that ALL groups Except the administrators
 (permissions set to *) access their own area's fine BUT CAN NOT SEE
 the HOME page!!!  HELP!

 And how do I set up a nice Sorry you are not permitted to see this
 page other than a flash message and then re-direct to the home page
 that hopefully ALL will be able to see.

 Other than this it all appears to be fine I am missing something that
 I do not understand.

 Thank you all for your help in advance.

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



CakePHP OthAuth Component, Permissions -- Home Page Access HOW?

2008-02-03 Thread SteveScan

Hi,
Please bear with me as I am new to PHP and CakePHP.
I have implemented Authentication using the OthAuth component (http://
bakery.cakephp.org/articles/view/othauth-component-v0-5-4-5).

In the groups table I have created 1, administrators ; 2 orders ; 3
stock.
In the permissions table I have created 1, *;  2, order ; 3, stock.
Hence Group 1 has access to everything. Orders Group has permissions
on controller order, and Stock Group has permissions on the Stock
controller. These have been assigned in the group permissions table.

Group 1 administrators can access everything (including the home
page). However Groups 2 and 3 (Orders and Stock) CAN NOT ACCESS THE
HOME PAGE

How do I set this up at the home page is defined in app/views/pages/
home.thtml.

There is NO Controller for the HOME PAGE so how do I assign ALL Groups
permission(s) to access the home page in the permissions table or is
there some other mechanism.

Other than the fact that ALL groups Except the administrators
(permissions set to *) access their own area's fine BUT CAN NOT SEE
the HOME page!!!  HELP!

And how do I set up a nice Sorry you are not permitted to see this
page other than a flash message and then re-direct to the home page
that hopefully ALL will be able to see.

Other than this it all appears to be fine I am missing something that
I do not understand.

Thank you all for your help in advance.

SteveScan

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



Only able to view home page

2007-12-12 Thread Unite

www.adslgamer.co.za if you go here you will see the page loads
perfectly. If you try click on one of the menu links the corresponding
page does not show but I get this error.

The requested URL /pages/about was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request.

The page does exist and works on my local machine but not this server
hosted in another country. Have I set anything wrong in cakephp? If
you need anymore information etc just let me know.
--~--~-~--~~~---~--~~
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: Only able to view home page

2007-12-12 Thread MrTufty

This is almost certainly a .htaccess issue. I suspect by default
either mod_rewrite is not turned on, or the rule for it is
AllowOverride None.

In the first instance, turn mod_rewrite on (ask your host for
information on how to do that, as it will vary).
In the second instance, change AllowOverride None to AllowOverride
All. I can't remember if you can do that directly through a .htaccess
file though.

On Dec 12, 8:40 am, Unite [EMAIL PROTECTED] wrote:
 www.adslgamer.co.zaif you go here you will see the page loads
 perfectly. If you try click on one of the menu links the corresponding
 page does not show but I get this error.

 The requested URL /pages/about was not found on this server.

 Additionally, a 404 Not Found error was encountered while trying to
 use an ErrorDocument to handle the request.

 The page does exist and works on my local machine but not this server
 hosted in another country. Have I set anything wrong in cakephp? If
 you need anymore information etc just let me know.
--~--~-~--~~~---~--~~
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: Only able to view home page

2007-12-12 Thread Unite

Also noticed cake adds ?CAKEPHP=6b06903f63183a73272e85a4393902b6 to my
menu options aswell... any ideas?

On Dec 12, 10:40 am, Unite [EMAIL PROTECTED] wrote:
 www.adslgamer.co.zaif you go here you will see the page loads
 perfectly. If you try click on one of the menu links the corresponding
 page does not show but I get this error.

 The requested URL /pages/about was not found on this server.

 Additionally, a 404 Not Found error was encountered while trying to
 use an ErrorDocument to handle the request.

 The page does exist and works on my local machine but not this server
 hosted in another country. Have I set anything wrong in cakephp? If
 you need anymore information etc just let me know.
--~--~-~--~~~---~--~~
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: Only able to view home page

2007-12-12 Thread Куринный Александр

On Wednesday 12 December 2007 11:40:08 Unite wrote:
 www.adslgamer.co.za if you go here you will see the page loads
 perfectly. If you try click on one of the menu links the corresponding
 page does not show but I get this error.

 The requested URL /pages/about was not found on this server.

 Additionally, a 404 Not Found error was encountered while trying to
 use an ErrorDocument to handle the request.

 The page does exist and works on my local machine but not this server
 hosted in another country. Have I set anything wrong in cakephp? If
 you need anymore information etc just let me know.
 
Seem that you don't have mod_rewrite enabled in apache

--~--~-~--~~~---~--~~
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: Only able to view home page

2007-12-12 Thread Dragos Chiriac

1. be sure to move the .htaccess as well. (on windows machines files 
that start with . are not very friendly to work with)
2. be sure you have a. apache, b.mod_rewrite, c. rights to access 
modrewrite.

If is iis then you'll need ISAPI rewrite, and the rules in the ini file 
will differ slightly from those in the htaccess.


Unite wrote:
 www.adslgamer.co.za if you go here you will see the page loads
 perfectly. If you try click on one of the menu links the corresponding
 page does not show but I get this error.

 The requested URL /pages/about was not found on this server.

 Additionally, a 404 Not Found error was encountered while trying to
 use an ErrorDocument to handle the request.

 The page does exist and works on my local machine but not this server
 hosted in another country. Have I set anything wrong in cakephp? If
 you need anymore information etc just let me know.
 

   


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



How to set title of home page that doesn't have a controller? (../views/pages/home.thtml)

2007-08-06 Thread Anna P

Hi:) I have one question. For each page i set title in that page's
controller using $this-pageTitle = ''
But how do I set the title of home page (that lays in views/pages/
home.thtml) that shows up when i go to 'http://www.mysite.com' or
'http://www.mysite.com/index.php' ? That home page doesn't have a
controller.
I thought that i can do this in app_controller.php , but when I use
$this-pageTitle it gives me an error.
Please help:)


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



Home Page?

2007-07-30 Thread [EMAIL PROTECTED]

Quick question that I can't seem to find an answer for.  The home page
of my site needs to have a lot of dynamic content generated on it.  Is
there a way to generate this content in some kind of controller?  Or
is there a way to redirect users to the index of another controller/
view from the home page?

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: Home Page?

2007-07-30 Thread Geoff Ford

YOu need to set a default Route in app/config/routes.php

Geoff
--
http://lemoncake.wordpress.com

On Jul 31, 8:13 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Quick question that I can't seem to find an answer for.  The home page
 of my site needs to have a lot of dynamic content generated on it.  Is
 there a way to generate this content in some kind of controller?  Or
 is there a way to redirect users to the index of another controller/
 view from the home page?

 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: Home Page?

2007-07-30 Thread housebolt

http://manual.cakephp.org/chapter/configuration - See section 3
Routes Configuration

Also checkout the pages folder in /app/views/pages/. Anything you
put in there can be accessed from the browser at

/pages/your_page/ (which is equal to /app/views/pages/your_page.thtml
[or .ctp])

and anything you create there can be routed in your routes.php file
(in app/config/routes.php)


On Jul 30, 3:13 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Quick question that I can't seem to find an answer for.  The home page
 of my site needs to have a lot of dynamic content generated on it.  Is
 there a way to generate this content in some kind of controller?  Or
 is there a way to redirect users to the index of another controller/
 view from the home page?

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



  1   2   >