Subdirectory in /webroot/img/
Hi, I'm trying to do subdirectory in my /webroot/img/. And my question is how should my /webroot/.htaccces (or /webroot/img/ subdirectory/.htaccess ?) file look like? What I want is of course that I can access my images through http://example.com/img/subdirectory/some_file.jpg Thanks in advance, Pillow --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
problem implementing user - session login system
Hi, I am getting frustrated with the session component in cakephp 1.1.xxx . I already configured core.php to define('CAKE_SESSION_SAVE', 'database'); but how do i retrieve current session to check if current session is still active ? by using $this-cake_session-findAll($id) ? how do i get the $id? if you have alternatives that you can tell me, I would be very glad to know. please help... thanks in advance! ;p --~--~-~--~~~---~--~~ 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 on shared hosted environment
I am actually having the same problem. .htaccess works, but how do I remap my /www root to /cake/app/webroot ? I have no idea about servers/ htaccess files and I think an answer would make a great addition to the manual. My server looks like this home username cake webroot app www So far my .htaccess looks like this, but I get a 500 error IfModule mod_rewrite.c RewriteEngine on RewriteRule ^$ /home/username/cake/app/webroot/[L] RewriteRule (.*) /home/username/cake/app/webroot/$1 [L] RewriteBase /home/username/ /IfModule I understand that this is a server issue and kind of OT in relation to CAKE, but it would be great to get some help on this ! Thanks in advance ! On Aug 5, 3:41 pm, Dr. Tarique Sani [EMAIL PROTECTED] wrote: On 8/5/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Long story short, I have cake running locally fine, but on my shared hosting environment Im getting 500 internal server errors. The most likely IMO is mod_rewrite not allowed for your account Try using the cakePHP internal routing or holler at your host T -- = Cheesecake-Photoblog:http://cheesecake-photoblog.org PHP for E-Biz:http://sanisoft.com = --~--~-~--~~~---~--~~ 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 on shared hosted environment
Where do you host ? Regards, Feris On 8/5/07, noWookies [EMAIL PROTECTED] wrote: I am actually having the same problem. .htaccess works, but how do I remap my /www root to /cake/app/webroot ? I have no idea about servers/ htaccess files and I think an answer would make a great addition to the manual. My server looks like this home username cake webroot app www So far my .htaccess looks like this, but I get a 500 error IfModule mod_rewrite.c RewriteEngine on RewriteRule ^$ /home/username/cake/app/webroot/[L] RewriteRule (.*) /home/username/cake/app/webroot/$1 [L] RewriteBase /home/username/ /IfModule I understand that this is a server issue and kind of OT in relation to CAKE, but it would be great to get some help on this ! Thanks in advance ! On Aug 5, 3:41 pm, Dr. Tarique Sani [EMAIL PROTECTED] wrote: On 8/5/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Long story short, I have cake running locally fine, but on my shared hosting environment Im getting 500 internal server errors. The most likely IMO is mod_rewrite not allowed for your account Try using the cakePHP internal routing or holler at your host T -- = Cheesecake-Photoblog:http://cheesecake-photoblog.org PHP for E-Biz:http://sanisoft.com = --~--~-~--~~~---~--~~ 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: Subdirectory in /webroot/img/
Hello Pillow, I don't think you have to change the .htaccess at all, it should work from the scratch: ?php echo $html-image('sub/test.png'); ? Or directly access the file over the browser: http://mydomain.com/img/sub/test.png Regards, Christoph On 5 Aug., 09:54, Pillow [EMAIL PROTECTED] wrote: Hi, I'm trying to do subdirectory in my /webroot/img/. And my question is how should my /webroot/.htaccces (or /webroot/img/ subdirectory/.htaccess ?) file look like? What I want is of course that I can access my images throughhttp://example.com/img/subdirectory/some_file.jpg Thanks in advance, Pillow --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
find empty text field addslashes
hello, i'm having problem with slashes being added by cake when trying to find empty text columns in the DB this works fine: (in phpmyadmin) select * from articles where remark != '' it give all articles with remark not empty. but this $conditions['Article']['Article.remark'] = !=''; is converted into select * from articles where fotohinweis != '\\' which gives *all* articles, because it searches for \\ any ideas ? thanks, jyrgen --~--~-~--~~~---~--~~ 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 on shared hosted environment
I am actually having the same problem. .htaccess works, but how do I remap my /www root to /cake/app/webroot ? I have no idea about servers/ htaccess files and I think an answer would make a great addition to the manual. My server looks like this home username cake webroot app www it's pretty easy, you don't need to touch any of the htaccess files, you just make a change to a define in the index.php file in webroot. Do this: 1. upload entire cakephp dir (inc app, webroot etc) to /home/username/cakephp 2. move contents of /app/webroot/ (inc .htaccess) to /home/username/www 3. edit /home/username/www/index.php so it points at to the location of cake, eg: define('ROOT', '/home/username/cakephp'); that's it. hth jon -- jon bennett w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ 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: Subdirectory in /webroot/img/
On 5 Sie, 11:55, Preloader [EMAIL PROTECTED] wrote: Hello Pillow, I don't think you have to change the .htaccess at all, it should work from the scratch: You're right. The problem was that file on which I was testing didn't really exist ;) Thx ;) --~--~-~--~~~---~--~~ 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: problem implementing user - session login system
Using database should not make any difference in your code. You can use $this-Session-read('User.id') for example. On Aug 5, 10:40 am, phpcurious [EMAIL PROTECTED] wrote: Hi, I am getting frustrated with the session component in cakephp 1.1.xxx . I already configured core.php to define('CAKE_SESSION_SAVE', 'database'); but how do i retrieve current session to check if current session is still active ? by using $this-cake_session-findAll($id) ? how do i get the $id? if you have alternatives that you can tell me, I would be very glad to know. please help... thanks in advance! ;p --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
i18n and 1.1
Does CakePHP 1.1 have i18n support or do I need to use 1.2 for this ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: i18n and 1.1
you need 1.2 On Aug 5, 3:03 pm, nitifixis [EMAIL PROTECTED] wrote: Does CakePHP 1.1 have i18n support or do I need to use 1.2 for this ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: uploading files
Ok fixed the PEAR problem, now it seems to work without problem, however the file is not being uploaded for some reason. Where should i be adding the upload folder? Am i correct in putting the folder as cake/app/uploads? thanks View: form action=?php echo $html-url('/cars/addfile'); ? method=post enctype=multipart/form-data input type=file name=userfile / ?php echo $html-submit('Add');? /form Controller: function addfile() { vendor('Upload'); $upload = new HTTP_Upload(en); $file = $upload-getFiles(userfile); if ($file-isValid()) { $moved = $file-moveTo(uploads/); if (!PEAR::isError($moved)) { $this-flash(File was moved to uploads , '/uploads/'); exit;} else if (PEAR::isError($moved)) { $this-flash(File not successful, null); exit; } } } --~--~-~--~~~---~--~~ 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: i18n and 1.1
__(); Does'nt work in 1.1? On 5 ago, 15:09, francky06l [EMAIL PROTECTED] wrote: you need 1.2 On Aug 5, 3:03 pm, nitifixis [EMAIL PROTECTED] wrote: Does CakePHP 1.1 have i18n support or do I need to use 1.2 for this ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: i18n and 1.1
No it does not, I did implement something like this for 1.1, but 1.2 is much better. good luck On Aug 5, 4:44 pm, Fran Simó [EMAIL PROTECTED] wrote: __(); Does'nt work in 1.1? On 5 ago, 15:09, francky06l [EMAIL PROTECTED] wrote: you need 1.2 On Aug 5, 3:03 pm, nitifixis [EMAIL PROTECTED] wrote: Does CakePHP 1.1 have i18n support or do I need to use 1.2 for this ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: i18n and 1.1
Can I backport the i18n.php and l10n.php 1.2 libs to 1.1 ? On Aug 5, 3:09 pm, francky06l [EMAIL PROTECTED] wrote: you need 1.2 On Aug 5, 3:03 pm, nitifixis [EMAIL PROTECTED] wrote: Does CakePHP 1.1 have i18n support or do I need to use 1.2 for this ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: i18n and 1.1
Just use 1.2 if you plan to do something like this. -- /** * @author Larry E. Masters * @var string $userName * @param string $realName * @returns string aka PhpNut * @access public */ On 8/5/07, nitifixis [EMAIL PROTECTED] wrote: Can I backport the i18n.php and l10n.php 1.2 libs to 1.1 ? On Aug 5, 3:09 pm, francky06l [EMAIL PROTECTED] wrote: you need 1.2 On Aug 5, 3:03 pm, nitifixis [EMAIL PROTECTED] wrote: Does CakePHP 1.1 have i18n support or do I need to use 1.2 for this ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Reset problem
Make sure your reset button inside the form. On Aug 4, 4:13 pm, sharath [EMAIL PROTECTED] wrote: Hi All, In my editing form, the fileds are not resetting. This is my code... input type =submit name=save value=save onclick=validation(); input type=reset name=reset value=reset Here If I click on reset button, the values are not resetting.. Is there any function in cakeor what i'm missing here...Pls let me know. sharath. --~--~-~--~~~---~--~~ 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 on shared hosted environment
Usually when I get that error a: RewriteBase / usually clears things up. -- Baz L Day In The Life of Baz http://www.LifeOfBaz.com On 8/5/07, Jon Bennett [EMAIL PROTECTED] wrote: I am actually having the same problem. .htaccess works, but how do I remap my /www root to /cake/app/webroot ? I have no idea about servers/ htaccess files and I think an answer would make a great addition to the manual. My server looks like this home username cake webroot app www it's pretty easy, you don't need to touch any of the htaccess files, you just make a change to a define in the index.php file in webroot. Do this: 1. upload entire cakephp dir (inc app, webroot etc) to /home/username/cakephp 2. move contents of /app/webroot/ (inc .htaccess) to /home/username/www 3. edit /home/username/www/index.php so it points at to the location of cake, eg: define('ROOT', '/home/username/cakephp'); that's it. hth jon -- jon bennett w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ 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 on shared hosted environment
I do same as Baz, the RewriteBase before the RewriteRule. I also had to remove the if/if tags for one on them. On Aug 5, 6:29 pm, Baz [EMAIL PROTECTED] wrote: Usually when I get that error a: RewriteBase / usually clears things up. -- Baz L Day In The Life of Bazhttp://www.LifeOfBaz.com On 8/5/07, Jon Bennett [EMAIL PROTECTED] wrote: I am actually having the same problem. .htaccess works, but how do I remap my /www root to /cake/app/webroot ? I have no idea about servers/ htaccess files and I think an answer would make a great addition to the manual. My server looks like this home username cake webroot app www it's pretty easy, you don't need to touch any of the htaccess files, you just make a change to a define in the index.php file in webroot. Do this: 1. upload entire cakephp dir (inc app, webroot etc) to /home/username/cakephp 2. move contents of /app/webroot/ (inc .htaccess) to /home/username/www 3. edit /home/username/www/index.php so it points at to the location of cake, eg: define('ROOT', '/home/username/cakephp'); that's it. hth jon -- jon bennett w:http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ 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: problem implementing user - session login system
The way I did it was to save an indicator in the (web tier) Session object. Most common I have seen is to save the id for that user. Aka: if successful login $this-Session-write('uid', $userid) where userid is the id for the user. The controller should be designed such that if there is a valid Session object [$this-Session-valid() ] but there is no uid in the Session object, then user is not logged in and forward the user to the login function. On logout, make sure to destroy session [ $this-Session-destroy() ] or remove the uid if the user is still allowed to access other areas of the site without being authenticated. The parameters that defines how long a session is considered to be active is different to the CAKE_SESSION_SAVE. On Aug 5, 4:40 am, phpcurious [EMAIL PROTECTED] wrote: Hi, I am getting frustrated with the session component in cakephp 1.1.xxx . I already configured core.php to define('CAKE_SESSION_SAVE', 'database'); but how do i retrieve current session to check if current session is still active ? by using $this-cake_session-findAll($id) ? how do i get the $id? if you have alternatives that you can tell me, I would be very glad to know. please help... thanks in advance! ;p --~--~-~--~~~---~--~~ 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: how to put one view into another?
You can use requestAction or make your view an element and call renderElement. --~--~-~--~~~---~--~~ 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: Validation
I'm also having the same problem in 1.2.0.5427. If in my view I change form-password to form-input, then the error message displays. How are people validating passwords and displaying error messages? Thanks, Paul On Jul 18, 7:37 pm, citrus [EMAIL PROTECTED] wrote: I also use Cake 1.2.0.5427alpha. Mypasswordvalidation doesn't work, either. Even if I try the simplest rule ever: VALID_NOT_EMPTY. No error message is fired when I leave thepasswordfield blank. On Jul 18, 4:58 pm, pihentagy [EMAIL PROTECTED] wrote: Hi! I've validation rules in my model: var $validate= array( 'p4ssword' = array( 'length' = array('rule'=array('minLength',8)), 'forbidden'=array('rule'='notForbiddenPwd'), 'similar'=array('rule'='notSimilarPwd'), ), 'confirm_p4ssword'=array( 'match' = array('rule'='confirm_password') ), ); and if($this-User-save($this-data, true, array('p4ssword'))) { in my controller. Shouldn't this line fires validations? Putting log messages to the validation methods, I cannot see the those messages in the log, so something is wrong :( Can anybody help figure out what's going on? Using cake_1.2.0.5427alpha thanks Gergo --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Installing rdBloggery
I am trying to install rdBloggery on localhost to test and to see if it can be integrated in look and feel with my main site... I am working on a WindowsXP machine running XAMPP. Mod_rewrite is not available to me and I am using CakePHp pretty URLs using the routes.php script I have successfully followed the rdBloggery instructions and successfully so until the instruction to run cake_install. I have tried http://localhost/cake_install/rdBloggery/ and http://localhost/index.php/cake_install/rdBloggery/ Both with no success -- Object Not Found error returned. Apologies if I am missing something obvious but I have tried the manual, serching this group and a general Google search with no luck. This thread http://tinyurl.com/33c497 looked helpful at first but seemed not to reach closure Thanks in advance Slidebay --~--~-~--~~~---~--~~ 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: Change file paths?
Well for example for a module based cms it would be nice, as you can upload new modules and keep them all in the same dir :) not that it has too.. but i think it looks a bit more tidy, also it is quicker to access files in my editor as the dirs now are a bit far below each other. On Aug 5, 2:00 am, Jon Bennett [EMAIL PROTECTED] wrote: Is it possible to change the paths of the controllers / models / views.. I would prefer a structure with /Articles /model/Article.php /controller/Article_controller.php /views/index.ctp /views/etc.. nope, not without a lot of hacks I have to ask though, why would you want to alter this aspect of the framework? You benefit far more by working with the framework, it's conventions, db strucuture, file naming etc etc than you do without - you're just giving yourself extra, imho needless work. jb -- jon bennett w:http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ 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: Change file paths?
Well for example for a module based cms it would be nice, as you can upload new modules and keep them all in the same dir :) I;d look into plugins, they act as mini self contained apps. jb -- jon bennett w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ 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: Is it reasonably easy to do this sort of inline editing with CakePHP
Hi Walter I'm still framework shopping. One thing I like about Qcodo is this inline editing feature: http://examples.qcodo.com/examples/dynamic/inline_editing.php Is that sort of thing easy to do with CakePHP? It is not an automated process to construct this kind of thing with Cake, but you can certainly do it with a little bit of Ajax effort. I have built similar things myself. So short answer is yes. Regards, Langdon --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Model associations problem
Hello there, I've got a simple construction of two models: users and familymembers; every user belongs to a familymember and a familymember has one user. So the database looks like this: `familymembers` ( `id` int(11) auto_increment, `firstname` varchar(20), `lastname` varchar(100), `gender` tinyint(4), `dob` date, `email` varchar(100), `created` datetime, `deleted` tinyint(1) ); `users` ( `id` int(11) auto_increment, `familymember_id` int(11), `username` varchar(20), `password` varchar(255), `deleted` tinyint(1), `created` datetime ); I'm using a hasOne association in the Familymember model, so it will only return one record ... great! But now I want to be able to keep old records, so if a user would be removed Users.deleted will be set to 1. Also great, so I thought, just fix the association so it will only return records where Users.deleted = 0. So I did that like this: var $hasOne = array( 'User' = array( 'className' = 'User', 'conditions' = 'User.deleted = 0' ) ); The CakePHP Manual says the following about hasOne associations: We could use this to tell Cake to only associate a Profile that has a green header, if we wished. To define conditions like this, you'd specify a SQL conditions fragment as the value for this key: Profile.header_color = 'green'. -http://manual.cakephp.org/ chapter/models So in my case this model should only associate a Familymember that has not been deleted. But this simply doesn't work, Cake ignores the 'conditions'-part alltogether. I even tried to make conditions that would generate errors ... didn't get an error and none of the 'conditions' are included in the SQL-query. I've googled around to see if anyone else has a similar problem or similar system explained but haven't had any luck so far. So is there anyone who can tell me what I'm doing wrong, or even better, tell me how to do this the right way. Thanks! By the way: I'm using PHP 4.4 and CakePHP 1.1.14.4797 --~--~-~--~~~---~--~~ 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: Validation
try e( $form-input( 'Model.field', array( 'type'='password', ... ) ); pbland wrote: I'm also having the same problem in 1.2.0.5427. If in my view I change form-password to form-input, then the error message displays. How are people validating passwords and displaying error messages? Thanks, Paul On Jul 18, 7:37 pm, citrus [EMAIL PROTECTED] wrote: I also use Cake 1.2.0.5427alpha. Mypasswordvalidation doesn't work, either. Even if I try the simplest rule ever: VALID_NOT_EMPTY. No error message is fired when I leave thepasswordfield blank. On Jul 18, 4:58 pm, pihentagy [EMAIL PROTECTED] wrote: Hi! I've validation rules in my model: var $validate= array( 'p4ssword' = array( 'length' = array('rule'=array('minLength',8)), 'forbidden'=array('rule'='notForbiddenPwd'), 'similar'=array('rule'='notSimilarPwd'), ), 'confirm_p4ssword'=array( 'match' = array('rule'='confirm_password') ), ); and if($this-User-save($this-data, true, array('p4ssword'))) { in my controller. Shouldn't this line fires validations? Putting log messages to the validation methods, I cannot see the those messages in the log, so something is wrong :( Can anybody help figure out what's going on? Using cake_1.2.0.5427alpha thanks Gergo -- View this message in context: http://www.nabble.com/Validation-tf4102304.html#a12010224 Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ 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: Levelling Order
I believe you can do it this way: for level 1: $this-Category-findAllByParentId(0, null, 'Category.id ASC'); // Third argument for findallby in your model, in the 'Childnode' array, add 'order'='Childnode.name ASC' (or DESC depending on what you want) to the array. var $hasMany = array( 'Childnode' = array( 'className' = 'Category', 'foreignKey' = 'parentid', 'order' = 'Childnode.name ASC' ), I recommend the CakePHP cheat sheet from the CakePHP front page. On Aug 4, 7:18 am, Feris Thia [EMAIL PROTECTED] wrote: Hi All, I have a cake model which has a self join as follows.. == class Category extends AppModel { var $name = 'Category'; var $hasMany = array( 'Childnode' = array( 'className' = 'Category', 'foreignKey' = 'parentid' ), ); == Then I query the model which return parent-child data using code below == $this-Category-recursive = 1; $category_data = $this-Category-findAllByParentid('0'); == My question is, how can I set different order for every level, i.e. `id` order for level 1 and `name` for level 1 (joined data) ? Thanks ! Feris --~--~-~--~~~---~--~~ 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: Help with Advanced Installation
I'm with kabturek on this one. I'd stick with the initial download setup until you learn the ins and outs of cake and its structure. It's simple, just drop the whole download into a folder accessible by your browser, make sure mod_rewrite is on, set up your database.php file in /app/config/ and you're ready to go! If you don't have a development server on your computer a great one with EASY setup set up is xampp. Xampp and xampp lite have everything you need to get started with cake. http://www.apachefriends.org/en/xampp.html On Aug 4, 1:24 am, kabturek [EMAIL PROTECTED] wrote: From what you've written you seem to want to develop an app - woudn't it be wiser to use the *developement* setup ? ;) probably on your home machine ? You want a production setup for dev ... imo you should stick with the basic setup for now - and when you actually learn cake - there is no problem in putting everything in its place. greets, On Aug 3, 10:14 pm, takabanana [EMAIL PROTECTED] wrote: I'm new to CakePHP - ready to learn it - so I'm trying to set it up on a shared hosting account. currently, when I log into my account via FTP, i get into one level above the public_html (webroot). I'd like to put the CakePHP libraries/framework there... and all of the site's stuff (i.e. apps/views) be within public_html, which is one level below where I want the CakePHP's core/libraries. so how do I set up index.php? Thanks for any 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 -~--~~~~--~~--~--~---
Re: Is it reasonably easy to do this sort of inline editing with CakePHP
Check out this tutorial: http://cakephp.org/screencasts/view/3 On Aug 5, 3:52 pm, walterbyrd [EMAIL PROTECTED] wrote: I'm still framework shopping. One thing I like about Qcodo is this inline editing feature: http://examples.qcodo.com/examples/dynamic/inline_editing.php Is that sort of thing easy to do with CakePHP? --~--~-~--~~~---~--~~ 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: problem implementing user - session login system
type ?php pr($_SESSION) ? in your view and look for something called Config.rand. This sets a unique random identifier in the form of a number, which you can use as a reference in your database. You can access it by typing ?php $var = $this-Session-read('Config.rand'); ? in your controller. On Aug 5, 5:19 pm, phpcurious [EMAIL PROTECTED] wrote: Hi, I am also planning to enable HTTPS in the login form in the future... just for security sake... but, making the user session login system must work for now... thanks all for the advice, guyz! On Aug 6, 1:07 am, Vaz [EMAIL PROTECTED] wrote: The way I did it was to save an indicator in the (web tier) Session object. Most common I have seen is to save the id for that user. Aka: if successful login $this-Session-write('uid', $userid) where userid is the id for the user. The controller should be designed such that if there is a valid Session object [$this-Session-valid() ] but there is no uid in the Session object, then user is not logged in and forward the user to the login function. On logout, make sure to destroy session [ $this-Session-destroy() ] or remove the uid if the user is still allowed to access other areas of the site without being authenticated. The parameters that defines how long a session is considered to be active is different to the CAKE_SESSION_SAVE. On Aug 5, 4:40 am, phpcurious [EMAIL PROTECTED] wrote: Hi, I am getting frustrated with the session component in cakephp 1.1.xxx . I already configured core.php to define('CAKE_SESSION_SAVE', 'database'); but how do i retrieve current session to check if current session is still active ? by using $this-cake_session-findAll($id) ? how do i get the $id? if you have alternatives that you can tell me, I would be very glad to know. please help... thanks in advance! ;p --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Using the bakery
I'm new to Cake Php. And i was wonder how to use the bakery to implement a shopping cart. Any suggestions or ideas?? --~--~-~--~~~---~--~~ 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: Using the bakery
The bakery is not a shopping cart application. Have a look at BakeSale http://bakesalehq.com/ Geoff -- http://lemoncake.wordpress.com On Aug 6, 11:31 am, ChOsEn [EMAIL PROTECTED] wrote: I'm new to Cake Php. And i was wonder how to use the bakery to implement a shopping cart. Any suggestions or ideas?? --~--~-~--~~~---~--~~ 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: Is it reasonably easy to do this sort of inline editing with CakePHP
On Aug 5, 9:09 pm, housebolt [EMAIL PROTECTED] wrote: Check out this tutorial: http://cakephp.org/screencasts/view/3 I will have to wait until I'm off my Linux box. Although certainly no show shopper it bugs me a bit that an open source project like cake would not be a little more Linux friendly. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---