Re: How to protect site/admin with an .htaccess file?

2007-03-27 Thread Daniel Pape
Hi. I protect the admin section with beforeFilter in AppController, SessionComponent and a simple AuthController: function beforeFilter() { if(!empty($this-params['admin']) $this-params['admin'] == CAKE_ADMIN) { $this-checkSession(); } } function checkSession() { // If

Re: how to name my model file?

2007-03-27 Thread Daniel Pape
Check the cake conventions: http://manual.cakephp.org/appendix/conventions 2007/3/27, feelexit [EMAIL PROTECTED]: Got table called posts_tags, I need to have model for this table, should I name it to post_tag.php or posttag.php or postTag.php and what about class file class

Re: PHPmailer

2007-03-26 Thread Daniel Pape
Is $this-Mailer an instance of class.phpmailer?? 2007/3/26, Enchy [EMAIL PROTECTED]: Hi I installed phpmailer Calling it like the tutorial says: vendor('phpmailer/class.phpmailer'); And then error: Call to undefined function: addaddress() in /usr/www/users/struts/cake/

Re: Load Text from a textfile

2006-09-28 Thread Daniel Pape
hi. ok, and now it works?! fine. cheers. I used that piece of code: $textfile = text1.txt; readfile($textfile); The only problem i had, was that the textfile was in the wrong folder so he couldn't find that file. Thanks

Re: Is this the correct use of Models?

2006-09-27 Thread Daniel Pape
I dont think i have it setup to work that way, below is the controllers for posts and comments along with the index.thtml of posts http://pastecode.net/?action=viewposttag=1007 hi. you need a association in your post-model like this: public $hasMany = array('Comment' =