Custom setflash messages in cakephp 1.3

2010-08-18 Thread Petter Andreas Strøm
Im trying to create custom designs for setFlash messages. I've seen sevral tutuorials for this, like http://tech.rytis.net/2008/8/27/discover-layouts-for-setflash-method-in-cakephp , but none of them seems to work for me. I've installed cake 1.3 and it seems like it's looking for a element view

Problems with GD i Cake

2010-07-30 Thread Petter Andreas Strøm
Hi, I have some problems with using GD in Cakephp. Output from i.e. the imagejpeg() function reports just wrongly encoded data like: ... � JFIF� �� � � ... So i was just wondering if anybody had any experience with this kind of problems, which seems to be an encodingproblem:P -thanks!

Using same functions in several views

2010-07-20 Thread Petter Andreas Strøm
Hi, I'm trying to implement some functionality for hiding buttons(and info) from a page depending on parameters sat for the specific user (in the model). Off course to create some restrictions for the different users. But im kind of confused how to do this. The way i do it now is like: 1. Cache

Re: Using same functions in several views

2010-07-20 Thread Petter Andreas Strøm
Well, I have to explain the topic for the discussion too; I'm looking for a solution where I can make a function to check if user have this capability like if(userHasCap('user_edit')). How can i make a function like this and include it into every view i need it? Component? Check out the new

Re: Using same functions in several views

2010-07-20 Thread Petter Andreas Strøm
Thanks people! Worked out great;) On Jul 20, 12:29 pm, Mike Karthauser mi...@brightstorm.co.uk wrote: hi Petter; On Tue, July 20, 2010 9:12 am, Petter Andreas Str m wrote: Well, I have to explain the topic for the discussion too; I'm looking for a solution where I can make a function to

Re: Using same functions in several views

2010-07-20 Thread Petter Andreas Strøm
Thanks people! Worked out great;) On Jul 20, 12:29 pm, Mike Karthauser mi...@brightstorm.co.uk wrote: hi Petter; On Tue, July 20, 2010 9:12 am, Petter Andreas Str m wrote: Well, I have to explain the topic for the discussion too; I'm looking for a solution where I can make a function to

Login using Auth component

2010-07-19 Thread Petter Andreas Strøm
Hi, Im modifying an existing login function which uses the Auth component. My modifications is that i want to cache some user-details during the login-sequence. Im kind of looking for a way to implement this, but no luck yet. I kind of found a solution where i did the caching in the App_model

Re: ajax.updater in cakephp

2010-06-25 Thread Petter Andreas Strøm
On Jun 21, 6:05 pm, Petter Andreas Strøm past...@gmail.com wrote: Hi, Im quite new to both ajax and cake, so i have a question regarding the use of ajax.updater in cakephp. Is it possible to use the ajax.updater to just update an html element to contain just one cake function? (in other

ajax.updater in cakephp

2010-06-21 Thread Petter Andreas Strøm
Hi, Im quite new to both ajax and cake, so i have a question regarding the use of ajax.updater in cakephp. Is it possible to use the ajax.updater to just update an html element to contain just one cake function? (in other words; ive tried to give the ajax.updater the url of a cake- function, but