Re: PHP mail() function not working in 1.1.19.6305

2009-02-08 Thread peterhf
I'm using 1.1.19.x, I don't think that the Email Component is available in this version. Peter - On Feb 8, 7:09 pm, Kyle Decot wrote: > Have you tried using the Email Component? > > http://api.cakephp.org/class/email-component > > On Feb 8, 9:04 pm, peterhf wrote: > > > This code is not workin

AclComponent methods not working

2009-02-08 Thread thesubtledoctor
Hi All, I have a page which should allow a user to set and deny permissions for a controller action for each group. But this code $this->Acl->allow('Administrator', 'Profiles/edit'); and this code $this->Acl->deny('Administrator', 'Profiles/edit'); Both have the same effect of adding a permis

Re: Email Notification Problem

2009-02-08 Thread Kyle Decot
When trying to use the initialize method, I get a undefined method error: Fatal error: Call to undefined method EmailComponent::initialize() in / home/affinit3/public_html/theskateparkdirectory/app/app_controller.php on line 60 Any ideas? On Feb 9, 2:22 am, brian wrote: > change the method nam

Re: Email Notification Problem

2009-02-08 Thread brian
change the method name to _sendEmailNotification (single underscore) to make it protected, rather than private $this->Email = new EmailComponent(); $this->Email->initialize($this); Those are the only things that I can think of. I've never imported a component inside of an AppController method -

Re: Email Notification Problem

2009-02-08 Thread Kyle Decot
Ah, stupid mistake but I've updated the set to be body instead of email_body and am still getting the same results. Any other ideas? On Feb 9, 1:55 am, brian wrote: > sorry, I should have unquoted that. This should be clearer. > > $this->set("email_body",$body); > > Notice (8): Undefined variabl

Re: Email Notification Problem

2009-02-08 Thread brian
sorry, I should have unquoted that. This should be clearer. $this->set("email_body",$body); Notice (8): Undefined variable: body [APP/views/elements/email/html/ email_notification.ctp, line 1] --~--~-~--~~~---~--~~ You received this message because you are subsc

Re: Email Notification Problem

2009-02-08 Thread brian
On Mon, Feb 9, 2009 at 1:46 AM, Kyle Decot wrote: > >$this->set("email_body",$body); > > Notice (8): Undefined variable: body [APP/views/elements/email/html/ > email_notification.ctp, line 1] > --~--~-~--~~~---~--~~ You received this message because you ar

Email Notification Problem

2009-02-08 Thread Kyle Decot
I am attempting to make a method that sends out an HTML based email but I am having some problems. In my App_Controller file I have: function __sendEmailNotification($to,$from,$subject,$body) { App::import("Component","Email"); $this->Email = new EmailComponent(); $this-

Re: view pdf files?

2009-02-08 Thread brian
Oh, I thought you meant it was a direct link to the PDF. Which your link appears to be. But your controller action seems to be trying to render the PDF. Do you have a route set up for "health_questionaire.pdf" to point to YourController::health_questionnaire()? Unless you've overloaded render() in

Re: view pdf files?

2009-02-08 Thread mscdex
Generally if you are manually rendering a view, you should do: $this- >autoRender = false; If you are trying to get the PDF to show up instead of the controller action's view, you could try doing a $this->redirect() as documented here: http://book.cakephp.org/view/425/redirect --~--~-~--~-

Re: view pdf files?

2009-02-08 Thread justclint
Thanks for replying Brian. Actually I had a wrong link in there but after fixing it I dont get the error message anymore. Now it just renders my index page while the url still end in .pdf. In my controller I got this: function forms() { $this->pageTitle = 'Fitness Lab : F

Re: view pdf files?

2009-02-08 Thread brian
I guess the obvious questions are, what does your link URL look like, and what's in this error.php file at line 25? Shouldn't that be app_error.php, btw? On Mon, Feb 9, 2009 at 12:01 AM, justclint wrote: > > Everything I've seen doing a search on google and in this group seems > to be based on

Re: Mod Rewrite problem

2009-02-08 Thread Webweave
You need to add the RewriteBase to the .htaccess files in the folder where you blog is. Assuming that blog.mywebsite.com is set up to serve the files from the /blog folder, you just need to make sure you have the .htaccess files as described here: http://book.cakephp.org/view/37/Apache-and-mod_re

view pdf files?

2009-02-08 Thread justclint
Everything I've seen doing a search on google and in this group seems to be based on converting files/views to pdf. I have pdf files that I just need to link to. I keep getting this parse error when I click on the link to the pdf file: Parse error: syntax error, unexpected ';', expecting T_FUNCT

Re: Browser Detection?

2009-02-08 Thread justclint
Thanks Schreck, I just ended up using a simple js script. justclint On Feb 8, 1:24 pm, schrec...@gmail.com wrote: > Its actually better to check for functionality then browser sniffing. If you > need xpath, then test for xpath capabilities. > > if you must sniff for a browser, I would do it in

Re: Help with linked image swap

2009-02-08 Thread brian
On Sun, Feb 8, 2009 at 10:38 PM, Zolthar wrote: > > Thanks for the explanation - looks like I jumped into waters deeper > than I first thought. > > I did the first part, although where do I modify the 'isset' attribute > as you said above? > You want to modify the UNSET line. It's in the HtmlHel

Re: Help with linked image swap

2009-02-08 Thread Zolthar
Thanks for the explanation - looks like I jumped into waters deeper than I first thought. I did the first part, although where do I modify the 'isset' attribute as you said above? On Feb 8, 4:37 am, brian wrote: > The last param, false, tells Cake to not escape the "title" (your > image, in

Re: PHP mail() function not working in 1.1.19.6305

2009-02-08 Thread Kyle Decot
Have you tried using the Email Component? http://api.cakephp.org/class/email-component On Feb 8, 9:04 pm, peterhf wrote: > This code is not working: > >     $result = mail('peter.f...@sbcglobal.net', 'This is a test.', > 'This is a test.', 'From: peter.f...@sbcglobal.net' ); > >     // Show the

PHP mail() function not working in 1.1.19.6305

2009-02-08 Thread peterhf
This code is not working: $result = mail('peter.f...@sbcglobal.net', 'This is a test.', 'This is a test.', 'From: peter.f...@sbcglobal.net' ); // Show the login page. $this->redirect( '/pages/home' ); exit(); If I echo $result, I get a "1". I have tried commenting out the redir

Re: Best way to clear cache?

2009-02-08 Thread Adam Royle
I think you might benefit from a deploy script. I have a bash script that updates the site code from subversion and clears my cache dirs at the same time. I have command-line access and it runs on linux, so it's pretty easy to do that. On Feb 9, 9:30 am, Miles J wrote: > Everytime I upload and u

Re: Best way to clear cache?

2009-02-08 Thread mscdex
On Feb 8, 6:30 pm, Miles J wrote: > Everytime I upload and update my site online, everythings cached. > Whats the best way to clear cache? Right now I just set debug to 2 > upload and clear cache, then set to 0 and reupload. > > Ive also tried deleting all the files in the cache folder, but > som

Best way to clear cache?

2009-02-08 Thread Miles J
Everytime I upload and update my site online, everythings cached. Whats the best way to clear cache? Right now I just set debug to 2 upload and clear cache, then set to 0 and reupload. Ive also tried deleting all the files in the cache folder, but sometimes I get an fopen() error. Just wondering

Re: How to echo just the page number? (pagination)

2009-02-08 Thread jorgt...@gmail.com
You know, I could kiss you. Thank you! On 8 Feb, 23:50, brian wrote: > Would you believe ... $paginator->current() > > > > On Sun, Feb 8, 2009 at 5:04 PM, jorgt...@gmail.com wrote: > > > Hey there, > > I'm struggling with pagination, how can i echo just the current page > > number? > > > Thanks

Re: Undefined variable $name in view

2009-02-08 Thread brian
$this->name (you have to promise to read the book, anyway, though ;-) On Sun, Feb 8, 2009 at 5:49 PM, giulianob wrote: > > Go read.. book.cakephp.org > > On Feb 8, 5:26 pm, Terpinator wrote: >> Just moved my app to 1.2 cake I get this error on my main page >> from my default.ctp layout. >>

Re: How to echo just the page number? (pagination)

2009-02-08 Thread brian
Would you believe ... $paginator->current() On Sun, Feb 8, 2009 at 5:04 PM, jorgt...@gmail.com wrote: > > Hey there, > I'm struggling with pagination, how can i echo just the current page > number? > > Thanks! > J > > > > --~--~-~--~~~---~--~~ You received this m

Re: Undefined variable $name in view

2009-02-08 Thread giulianob
Go read.. book.cakephp.org On Feb 8, 5:26 pm, Terpinator wrote: > Just moved my app to 1.2 cake I get this error on my main page > from my default.ctp layout. > > Undefined variable: name [APP/views/layouts/default.ctp, line 11] > > It blows up on my > > # default.ctp (app/views/layouts) >

Re: How long run the sql statement?

2009-02-08 Thread brian
If you set debug to 2 you will see all of the queries at the bottom of you page. The process time is included there. On Sun, Feb 8, 2009 at 5:27 PM, amarradi wrote: > > Hello together, > > is there any easy way in cakePHP to count how long my sql-statement > runs?(like on google.com) And if yes,

Undefined variable $name in view

2009-02-08 Thread Terpinator
Just moved my app to 1.2 cake I get this error on my main page from my default.ctp layout. Undefined variable: name [APP/views/layouts/default.ctp, line 11] It blows up on my # default.ctp (app/views/layouts) #My controller --~--~-~--~~~---~--~~ You rec

How to echo just the page number? (pagination)

2009-02-08 Thread jorgt...@gmail.com
Hey there, I'm struggling with pagination, how can i echo just the current page number? Thanks! J --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@google

Customizing countercache for HABTM links

2009-02-08 Thread giulianob
I basically need to do something like what countercache but what I am interesting in counting are how many HABTM links there are. Has anyone accomplished this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP

new bakesale website + version 1.3

2009-02-08 Thread nosiath
Hi All, For those that don't know what BakeSale, it is a simple yet flexible shopping cart system built in CakePHP, released under the MIT license. Our site has been down for a while due to hosting and domain problems, which have caused many users being unable to browse the site, we are sorry ab

How to configure CakePHP under Plesk the right way...

2009-02-08 Thread PirrA
Hello, Had anyone installed CakePHP under Plesk? I googled for CakePHP under Plesk but no tutorial is available and i am getting lots of errors from files not beeing able to be accessed, images not displayed among several others... Can anyone help me out on this? Regards --~--~-~--~--

How long run the sql statement?

2009-02-08 Thread amarradi
Hello together, is there any easy way in cakePHP to count how long my sql-statement runs?(like on google.com) And if yes, where i do find more informations many greetings Marcus Radisch --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: An complex DB SQL Statement Condition

2009-02-08 Thread amarradi
On 8 Feb., 17:41, Alfredo Quiroga-Villamil wrote: > Marcus: > > If I understood the question correctly what you are looking for is the > following: > > If a user goes to make an entry into the table you've created, and the > column1-column2 combination already exists for that particular user >

Re: Extract Data From An Array - Question

2009-02-08 Thread Alfredo Quiroga-Villamil
I really appreciate it guys, for some reason I didn't try this: Set::extract($aDestinationSummary, '{n}.0'); That extracts exactly the set I want, I knew there had to be a simple, clean way to get it but didn't try that for some reason. Thanks so much for the help. Alfredo On Sun, Feb 8, 2009

Re: Browser Detection?

2009-02-08 Thread schreck84
Its actually better to check for functionality then browser sniffing. If you need xpath, then test for xpath capabilities. if you must sniff for a browser, I would do it in the javascript since the user agent can be spoofed. Schreck Schreck -Original Message- From: justclint Date: Su

Browser Detection?

2009-02-08 Thread justclint
I was hoping someone could tell me what the best solution is to do browser detection in cake. Via js or php? Is there a helper for this? All I need to do is check the browser to see if it is ie 6 or older so I can send them to an "update your browser" page. Ive googled this and Im not finding mu

Re: Extract Data From An Array - Question

2009-02-08 Thread brian
On Sun, Feb 8, 2009 at 10:47 AM, Alfredo Quiroga-Villamil wrote: > > I have the following query: > > === >$aParams = array( >'fields' => array( >"ifnull(CcCall.destination, 'Total')as destination" >

Re: Extract Data From An Array - Question

2009-02-08 Thread mscdex
On Feb 8, 12:48 pm, Alfredo Quiroga-Villamil wrote: > Just trying to find out the answers now for Questions 1 and 2. Regarding question #1, after doing some quick testing it seems that using the mysql functions in the fields array is causing the result of that field to be placed in the integer-b

Re: Paginate in an alphabetical order

2009-02-08 Thread brian
I've done something similar. I've pasted the code here: http://bin.cakephp.org/view/661736473 Basically, the code will allow for listing Members by last name, one set per initial letter. Both the method for obtaining the results by letter and the list of alphabetical links (where letters for whi

formatting of fieldList array for saveAll function

2009-02-08 Thread WebbedIT
I have a form saving data across 4 tables and hope to use one saveAll call. How do I specify the fieldList attribute for the saveAll function to save the following fields ... Model1.field1, Model1.field2, Model2.field3, Model3.field4 I have tried array('Model1.field1', 'Model1.field2', 'Model2

cookie and sessions available for subdomains (again) *.example.org

2009-02-08 Thread Paamayim
Found this in another (locked) discussion: ini_set('session.cookie_domain', 'example.com'); And found this in the Cookie component source code: /** * Domain path. * * The domain that the cookie is available. * * Overridden with the controller beforeFilter(); * $this->Cookie->domain = '.ex

Re: Separating user and profile tables

2009-02-08 Thread Andrea Cardinale
On Sun, Feb 8, 2009 at 6:49 PM, brian wrote: > > Separating User from Profile I can understand, but using EAV for > Profile seems like overkill to me. And it's not that difficult to > update views/models to reflect a newly-added column, should it become > necessary. > > Actually, I can't see how

Re: Separating user and profile tables

2009-02-08 Thread brian
Separating User from Profile I can understand, but using EAV for Profile seems like overkill to me. And it's not that difficult to update views/models to reflect a newly-added column, should it become necessary. Actually, I can't see how using EAV would mean that updating view/models would be unn

Re: Extract Data From An Array - Question

2009-02-08 Thread Alfredo Quiroga-Villamil
Niiice, appreciate the response to the bonus question. Just trying to find out the answers now for Questions 1 and 2. Appreciate it. Alfredo On Sun, Feb 8, 2009 at 12:39 PM, mscdex wrote: > > On Feb 8, 10:47 am, Alfredo Quiroga-Villamil > wrote: >> Rails has a respond_to method that allows y

Re: Extract Data From An Array - Question

2009-02-08 Thread mscdex
On Feb 8, 10:47 am, Alfredo Quiroga-Villamil wrote: > Rails has a respond_to method that allows you to completely bypass the > view and render from within the controller. This is quite helpful for > instances where you are doing lots of ajax. Currently my application > is 100 % ajax/javascript in

Re: How many elements are really too many??

2009-02-08 Thread Abhimanyu Grover
Thats great, Mark! thanks. On Feb 8, 9:23 pm, mark_story wrote: > You can use recent builds of DebugKit to check on the rendering time > of all your elements.  It tracks all the element rendering time > separately.  And Graham Weldon, even added a feature for little bar > charts to be generated,

Re: An complex DB SQL Statement Condition

2009-02-08 Thread Alfredo Quiroga-Villamil
Marcus: If I understood the question correctly what you are looking for is the following: If a user goes to make an entry into the table you've created, and the column1-column2 combination already exists for that particular user then you want to stop them from being able to re-enter it. If that

Re: Extract Data From An Array - Question

2009-02-08 Thread Alfredo Quiroga-Villamil
Being a bit more specific here regarding Question 3: This would get accomplished using something like this in rails: respond_to do |format| format.html format.xml { render :xml => @user } end As can be seen from the lines above, the xml is being rendered right from within the controller wi

Re: How many elements are really too many??

2009-02-08 Thread mark_story
You can use recent builds of DebugKit to check on the rendering time of all your elements. It tracks all the element rendering time separately. And Graham Weldon, even added a feature for little bar charts to be generated, giving you a more visual way to see the cost of your elements. -Mark On

Mod Rewrite problem

2009-02-08 Thread thankyou
Hello, I have the .htaccess file setup so that it makes cakephp work fine at mywebsite.com. The problem is that I also want to add a blog to the website at the folder /blog, so I can make blog.mywebsite.com work. The folder is in /blog. My .htaccess file info is below, what do I need to do to ma

Mod Rewrite problem

2009-02-08 Thread thankyou
Hello, I have the .htaccess file setup so that it makes cakephp work fine. The problem is that I also want to add a blog to the website at /blog, ie blog.websitename.com. The folder is in /blog. My .htaccess file info is below, what do I need to do to make the blog.websitename.com work? Rew

Re: Database question, How do I represent a zero in a zero to one relationship?

2009-02-08 Thread Nancy
I'm not exactly sure how to do this in Cake but it sounds like you want a left join, so that if there's no match you'll get back the row but nulls in the unmatched row. With a normal join you'd get nothing back. --~--~-~--~~~---~--~~ You received this message becau

Re: Collecting data from array depending on Association

2009-02-08 Thread WebbedIT
> If you are solely using the 'id' attribute as your primary key in the > join table, then you are opening up the possibility of allowing a user > to be associated with the same event multiple times. Yip, makes quite obvious sense --~--~-~--~~~---~--~~ You received

Re: select count * from with cakePHP

2009-02-08 Thread Son Dat Giang
Yeah, cakePHP provides us a frame for work with almost every features you might desire to. And very easy to customize :D (if you have cake knowledge enough). - Best regards ! Giang Son Dat Mobile: +84 988114164 Email giangson...@gmail.com, giangson...@yahoo.com On

Extract Data From An Array - Question

2009-02-08 Thread Alfredo Quiroga-Villamil
I have the following query: === $aParams = array( 'fields' => array( "ifnull(CcCall.destination, 'Total')as destination" ,'sec_to_time(sum(CcCall.sessiontime)) as duration'

An complex DB SQL Statement Condition

2009-02-08 Thread amarradi
Hello together, i've an DB - Table with two interessting columns. So now i want check if somebody enter the same Words. Let me explain a little bit more column 1 | column 2 Table | Chair So if somebody enter the same combination in the Textfield the line souldn't add to Table My prefered Test-

Re: How get i the return into my view

2009-02-08 Thread amarradi
Thanks a lot, it runs very well :) On 8 Feb., 14:45, majna wrote: > http://book.cakephp.org/view/57/Controller-Methods > > function example () { >    $this->set('my_value', $val); > > } > > VIew: > > > On Feb 8, 1:24 pm, amarradi wrote: > > > Hello together, > > > now i've an function in my

Re: Paginate in an alphabetical order

2009-02-08 Thread WebbedIT
The pagination helper is not built to do this, it is a helper which quickly provides navigational links for one dataset, what you're suggesting is multiple datasets (one conditional query for each character), which if the address book contains many records is likely to need pagination for each let

Re: cakeError

2009-02-08 Thread maxmil
I have left a comment on the Error Handling page in the book. On Feb 7, 3:19 pm, teknoid wrote: > @maxmil and @ianh > > Well all good points... in those instances it makes sense having > multiple error handling events for the app... > > I guess the intended idea is that: > > 1. You can override

Re: How get i the return into my view

2009-02-08 Thread majna
http://book.cakephp.org/view/57/Controller-Methods function example () { $this->set('my_value', $val); } VIew: On Feb 8, 1:24 pm, amarradi wrote: > Hello together, > > now i've an function in my controller class that returns an numbered > value. This value i want show on my view. > > my c

Re: Separating user and profile tables

2009-02-08 Thread Andrea Cardinale
On Wed, Jan 28, 2009 at 8:37 PM, LunarDraco wrote: > Second, for my case I use an Entity Attribute Value EAV > http://en.wikipedia.org/wiki/Entity-Attribute-Value_model table for my > Profile fields, so that I can easily add additional profile fields > without making structure changes or form/vie

Paginate in an alphabetical order

2009-02-08 Thread GetIT
Hi, I want to create an adress book. The names should be displayed with a pagination but not in the "normal". Not x entries on one page, but all names beginnining with an "A" on one side, all with "B" on one side and so on. Has anyone expiriences or with that or an idea how to solve that? --~--

Re: How many elements are really too many??

2009-02-08 Thread Abhimanyu Grover
Yea, I've just implemented element level caching - however I'm still keeping a close eye on rendering process. Thanks for reply. On Feb 8, 11:42 am, "p...@otaqui.com" wrote: > Hi, > > I haven't done any very heavy element rendering myself, but I know > that element output can be cached if suita

Re: How get i the return into my view

2009-02-08 Thread amarradi
Hello together, now i've an function in my controller class that returns an numbered value. This value i want show on my view. my controller class looks so... example ?> How do i get it from the controller correctly in the view many greetinngs marcus radisch --~--~-~--~~--

How get i the return into my view

2009-02-08 Thread amarradi
Hello together, now i've an function in my controller class that returns an numbered value. This value i want show on my view. my controller class looks so... http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---

Re: select count * from with cakePHP

2009-02-08 Thread amarradi
Hello, thanks a lot, the cookbook is new for me. I will read it :) On 8 Feb., 11:13, Miles J wrote: > Perhaps you should read the cookbook. > > http://book.cakephp.org/view/73/Retrieving-Your-Data --~--~-~--~~~---~--~~ You received this message because you are s

Re: Can a variable defined in one view file be used in another ?

2009-02-08 Thread Dr. Loboto
View class also have method "set" that works like "set" in controller - make variable avaliable in whole "rendering session" - layout, view, elements. If you need to make avaliable some generic data, you should use set. If you just need to make some data avaliable to some element, you should pass

Re: select count * from with cakePHP

2009-02-08 Thread Miles J
Perhaps you should read the cookbook. http://book.cakephp.org/view/73/Retrieving-Your-Data --~--~-~--~~~---~--~~ 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.c

Re: select count * from with cakePHP

2009-02-08 Thread Olexandr Melnyk
$count = $this->Model->find('count'); On Sun, Feb 8, 2009 at 12:04 PM, amarradi wrote: > > Hello together, > > I've an existing DB-Table and i want to count the rows. In PHP without > cake i do 'select count * from Tablename'. How do i this with cakePHP > 1.2? > Thanks a lot > > many greetings >

select count * from with cakePHP

2009-02-08 Thread amarradi
Hello together, I've an existing DB-Table and i want to count the rows. In PHP without cake i do 'select count * from Tablename'. How do i this with cakePHP 1.2? Thanks a lot many greetings Marcus Radisch --~--~-~--~~~---~--~~ You received this message because

illegal offset type in components/acl.php

2009-02-08 Thread fain182
I am trying to use IniAcl, but after a lot of attempts, it gives me always the same error... in cake/libs/controller/components/acl.php at line 490: if (isset($aclConfig[$aro]['deny'])) { but $aro is an array, so it gives error: Warning (2): Illegal offset type [COREcake/libs/controller/

Re: Call to undefined method IniAcl::allow()

2009-02-08 Thread fain182
On Sat, Feb 7, 2009 at 5:02 PM, Gwoo wrote: > > Now, that i think about it about it..IniAcl::allow() was never > implemented because Ini was intended to be written first so only check > was needed. yeah, now I realized that i don't need this method.. thank you! pietro > Feel free to submit an e