how to change title
Hello, I want to change the title page of a website titleHere/title but I don't know from where exactly It is not my website. It my friend's website. Someone developed the website for him two years ago and now he asked me to change the title name. I tried to check the /View and /Elements but I don't know where is it and how to change it Can you please tell me how can I change it Thank you -- 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
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: Register Function--Hashing Password and Auto-login Causes Password Validation Disabled in Register Page
I am also have the same problem I get login page every time I write correct Username and Password What is the problem ?!?! We need help here On Dec 20, 10:00 am, John Maxim goog...@gmail.com wrote: My Register page: pPlease fill out the form below to register an account./p ?php echo $form-create('User', array('action' = 'register'));? ?php echo $form-input('first_name'); echo $form-input('last_name'); echo $form-input('username'); echo $form-input('email'); echo $form-input('password'); ? ?php echo $form-end('Register');? My knownusers page: table ?php echo $html-tableHeaders(array_keys($knownusers[0]['User'])); foreach ($knownusers as $thisuser) { echo $html-tableCells($thisuser['User']); } ? /table ** Is it something I have to add in both register and knownusers page ? On Dec 20, 2:47 pm, John Maxim goog...@gmail.com wrote: If I removed the Auth component from the controller pager, I can view my register and knownusers page. But that defeats the reason of hashing password using Auth component. On Dec 20, 2:45 pm, John Maxim goog...@gmail.com wrote: I included this built-in in my controller: var $components = array('Auth'); so now my controller looks like this: class UsersController extends AppController { var $name = 'Users'; var $helpers = array('Html', 'Form' ); var $components = array('Auth'); function register() { if (!empty($this-data)) { if ($this-User-save($this-data)) { $this-Session-setFlash('Your registration information was accepted.'); } } } function knownusers() { $this-set('knownusers', $this-User-find('all', array('order' = array('User.id DESC')), array('fields' = array('User.id', 'User.username', 'User.first_name', 'User.last_name'))) ); } function login() { } function logout() { $this-redirect($this-Auth-logout()); } } *** I can't view my register and knownusers page now, it redirects me to login page. My login page is as follow: ?php echo $session-flash('auth'); echo $this-Form-create('User', array('action' = 'login')); echo $this-Form-input('username'); echo $this-Form-input('password'); echo $this-Form-end('Login'); ? Why is it redirected each time I view register and knownusers page ...to login page ? How do I know if the hash password is already working now ?? since I can't register ..? On Dec 20, 11:25 am, John Maxim goog...@gmail.com wrote: My controller is here: class UsersController extends AppController { var $name = 'Users'; var $helpers = array('Html', 'Form' ); function register() { if (!empty($this-data)) { if ($this-User-save($this-data)) { $this-Session-setFlash('Your registration information was accepted.'); } } } Do I add this in?: var $components = array('Auth'); or can I add into var $helpers = array('Html', 'Form', 'Auth' ); ? Sorry my password validation is here: 'password' = array( 'notEmpty' = array( 'rule' = 'notEmpty', 'message' = 'This field cannot be blank.', 'last' = true, ), *** and no, I didn't get any error, the only problem was the validation for password can't be triggered after I used the code I posted from the first post (NEW). After editing back to my (OLD) code it works fine now except with no HASHING and AUTO-LOGIN feature. Can you point me to AUTO-LOGIN coding ? how should I go about? I'm still not done with hashing yet, as I'm not sure how to use AUTH component. On Dec 20, 3:10 am, cricket zijn.digi...@gmail.com wrote: On Sun, Dec 19, 2010 at 2:07 AM, John Maxim goog...@gmail.com wrote: What are Auth component ? http://book.cakephp.org/view/1250/Authentication Just note that Auth will hash your password for you, so there's no need to cal md5(). My validation rules are here: There's no password validation there. What, exactly, is the problem you're seeing? Could you post the validation rules? Check out the new CakePHP Questions site http://cakeqs.org and
Re: setFlash() doesn't wotk with me on WAMP
Any help here ?!?!?! On Dec 19, 10:07 am, Ahmed - CakePHP ahmed.amo...@gmail.com wrote: You said: Make sure you have declared both the Session Component and the Session Helper in your app_controller. How to do that ?!?! What shill I do exactly Jeremy ? On Dec 19, 12:27 am, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: Make sure you have declared both the Session Component and the Session Helper in your app_controller. setFlash only places the message into the session. To show it, use echo $this-Session-flash() in a view, element or layout. Jeremy Burns Class Outfit jeremybu...@classoutfit.comhttp://www.classoutfit.com On 18 Dec 2010, at 16:13, Ahmed - CakePHP wrote: Hello, I am very very very new on CakePHP. I tried to do a blog using the CakePHP. I did it :). but I found a problem: when I want to use $this-Session-setFlash(Write whatever); it doesn't work. I don't see the sentences that I write inside setFlash. They doesn't occur when I run the code/functions. I am using the local server WAMP Can you please tell me what is the problem ? Regards, Ahmed Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: setFlash() doesn't wotk with me on WAMP
This is the Controller code: ?php class PostsController extends AppController { var $name = 'Posts'; var $helpers = array('Session','Html','Form'); var $components = array('Session'); function index() { $this-set('posts', $this-Post-find('all', array('order' = array('id DESC'; } function add() { if (!empty($this-data)) { $this-Post-create(); if ($this-Post-save($this-data)) { $this-Session-setFlash('The post has been added successfully.'); $this-reDirect(array('action' = 'index')); } else { $this-Session-setFlash('The post has not been added successfullt'); } } } } ? On Dec 20, 10:02 am, Amit Badkas amit.sanis...@gmail.com wrote: Hi, Have you followed the blog tutorial exactly? If you can show me the code written by you, that would be helpful to go ahead to solve the problem. Amit Badkas PHP Applications for E-Biz:http://www.sanisoft.com On Mon, Dec 20, 2010 at 12:18 PM, Ahmed - CakePHP ahmed.amo...@gmail.comwrote: Any help here ?!?!?! On Dec 19, 10:07 am, Ahmed - CakePHP ahmed.amo...@gmail.com wrote: You said: Make sure you have declared both the Session Component and the Session Helper in your app_controller. How to do that ?!?! What shill I do exactly Jeremy ? On Dec 19, 12:27 am, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: Make sure you have declared both the Session Component and the Session Helper in your app_controller. setFlash only places the message into the session. To show it, use echo $this-Session-flash() in a view, element or layout. Jeremy Burns Class Outfit jeremybu...@classoutfit.comhttp://www.classoutfit.com On 18 Dec 2010, at 16:13, Ahmed - CakePHP wrote: Hello, I am very very very new on CakePHP. I tried to do a blog using the CakePHP. I did it :). but I found a problem: when I want to use $this-Session-setFlash(Write whatever); it doesn't work. I don't see the sentences that I write inside setFlash. They doesn't occur when I run the code/functions. I am using the local server WAMP Can you please tell me what is the problem ? Regards, Ahmed Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group athttp:// groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.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
setFlash() doesn't wotk with me on WAMP
Hello, I am very very very new on CakePHP. I tried to do a blog using the CakePHP. I did it :). but I found a problem: when I want to use $this-Session-setFlash(Write whatever); it doesn't work. I don't see the sentences that I write inside setFlash. They doesn't occur when I run the code/functions. I am using the local server WAMP Can you please tell me what is the problem ? Regards, 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: setFlash() doesn't wotk with me on WAMP
You said: Make sure you have declared both the Session Component and the Session Helper in your app_controller. How to do that ?!?! What shill I do exactly Jeremy ? On Dec 19, 12:27 am, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: Make sure you have declared both the Session Component and the Session Helper in your app_controller. setFlash only places the message into the session. To show it, use echo $this-Session-flash() in a view, element or layout. Jeremy Burns Class Outfit jeremybu...@classoutfit.comhttp://www.classoutfit.com On 18 Dec 2010, at 16:13, Ahmed - CakePHP wrote: Hello, I am very very very new on CakePHP. I tried to do a blog using the CakePHP. I did it :). but I found a problem: when I want to use $this-Session-setFlash(Write whatever); it doesn't work. I don't see the sentences that I write inside setFlash. They doesn't occur when I run the code/functions. I am using the local server WAMP Can you please tell me what is the problem ? Regards, Ahmed Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en