Re: Best Practise: Use Utilmethods in Controllers, Views, Components...

2013-03-18 Thread Kai Szymanski
Hi Lowbass, good idea! I will go this way. Also this solution seems to be very "maintain-friendly" ;) Thanks for your answer. Best regards, Kai. Am 17.03.2013 18:15, schrieb lowpass: > I used to put this sort of thing in bootstrap.php but lately I've been > putting

After a while Cache is not writeable

2012-03-30 Thread Kai Szymanski
/file.php, line 142] If i examine the file its owned by root. Then i set the right owner (www-data) and everything works fine (for a while). I cant figure out what happen. Everything else (tmp-Dir, cachedir a.s.o.) is not affected...only the above file. Thanks! Best regards, Kai. -- Our

Re: Custom Helper not loaded

2009-08-05 Thread Kai
> Where you're going wrong: Helpers are related to and accessed from > within the View, not the Controller like you're trying to > do.http://book.cakephp.org/view/98/Helpers Seems like got a little confused there. Thanks a lot for pointing it out! Makes a lot of sense from an MVC-pov. I implemen

Custom Helper not loaded

2009-08-04 Thread Kai
Hi there, I just wrote my first helper and, sure enough, ran into some problems. For some reason my helper is not being loaded. As I could not find anything similar I just expect something to be done wrong in my code. My Helper (/app/views/helpers/content.php): requestAction('texts/get/'.$id);

Re: home.ctp cannot be found when debug = 0

2009-07-18 Thread kai
it's sort of funny that that was the problem. On Jul 17, 9:48 am, Robert Edeker wrote: > err.  That was stupid.  I just re-opened the ctp and noticed this little > jem.  I forgot that I copied it from the stock home.ctp and wasn't quite > sure what it was for so I left it in..  (didn't  realize

conditional index

2009-05-25 Thread kai
For the sake of a better user experience I'd like to change the index page of my website depending on whether someone is logged in or not. If someone isn't logged in it should go to pages/home.ctp. If someone is logged in it should go to listings/search.ctp. What is a way that I can conditionally

Re: How does css/js compression work?

2009-04-07 Thread kai
This http://bakery.cakephp.org/articles/view/automatic-javascript-and-css-packer should help explain it. On Apr 6, 6:54 pm, Miles J wrote: > Im a bit confused on how to get this installed and working. And I did > not find any information in the guide. > > I understand that we place scripts like

variable from one action view to another

2009-03-24 Thread kai
I have a foreach loop that runs through an array and for each object there's a report link that lets users report something wrong with that object. the report link draws a modal box that displays the report actions view and in that view i'm hoping to have the name of the object. I tried passing th

Re: to change the decoration of active link

2009-03-24 Thread kai
rote: > actually the link above just highlights the link where I take the > mouse over..but my prob is that if I click on some link and when the > next page is loaded then the link I had clicked gets highlighted > (which I want to be as text-decoration:none). > > On Mar 23, 1:09 

Re: to change the decoration of active link

2009-03-23 Thread kai
Someone else may have better advice but I use this: http://www.solitechit.com/2008/06/06/menu-highlighting-with-cakephp-12/ On Mar 23, 12:11 am, aman batra wrote: > but actually the problem is that i have many links as isaid before > like Today Tomorrow week month year and i want that if i click

Re: Query in a component

2009-03-02 Thread kai
Maybe this article will help you: http://bakery.cakephp.org/articles/view/habtm-searching It is a component that deals with custom query. On Mar 2, 9:22 am, faifas wrote: > Hello fellow programmers, > > is it possible to do a database query in a custom component? If so, > how is it done? > > Th

have you tried Amazon FPS (Flexible Payment Service)?

2009-02-23 Thread kai
If so, can you share your experience? I'm finding the documentation to be quite daunting and it would help to see how others have implemented. As a vendor or as a component? After implementing has it been working well? Overview of the service: http://aws.amazon.com/fps/ --~--~-~--~~--

Re: logic after form submition

2009-01-23 Thread Kai Devan
On Fri, Jan 23, 2009 at 12:28 PM, brian wrote: > > Where's the pr() statement? In the controller? Did you try with > Debugger::log() immediately after adding the '51'? > > On Fri, Jan 23, 2009 at 3:22 PM, kai wrote: > > > > well, i tried that too and w

Re: logic after form submition

2009-01-23 Thread kai
like this > and log your data array. > > if (isset($this->data['Genre']['id']) && > is_array($this->data['Genre']['id']) && !in_array('51', > $this->data['Genre']['id'])) > { >   $this

Re: logic after form submition

2009-01-22 Thread kai
]) && !in_array('51', > $this->data['Genre']['id'])) > { >    $this->data['Genre'][] = 51; >    // or, array_push($this->data['Genre'], 51); > > } > On Thu, Jan 22, 2009 at 8:28 PM, kai wrote: > > >

Re: logic after form submition

2009-01-22 Thread kai
ore that? It seems like you're trying to override the > user's selection, rather than add to it. Do you want to add ID=51 *in > addition* to whatever genre ID the user passes? > > On Thu, Jan 22, 2009 at 8:09 PM, kai wrote: > > > When a user submits a form I&

logic after form submition

2009-01-22 Thread kai
When a user submits a form I'm hoping to apply some logic to their choice. The form takes user input and translates their selection into conditions to use in a query. One part of the selection is the choice to choose a genre. I'm hoping to say something like, if user chooses one genre or more then

Re: email component

2009-01-13 Thread kai
Heh, thank you Miles for the spelling correction. The email component is being called. The e-mail is set to go to my normal account which is my gmail address ($this->Email->to = 'k3ho...@gmail.com';). I never receive any mail when i use my form. The only logic that could stop send() is if validat

email component

2009-01-13 Thread kai
here's my code: http://bin.cakephp.org/view/1065723096 i'm not sure what's wrong. i've followed two different tutorials and my code makes sense when i compare. i must be missing something. no errors show up. i'm not sure how to begin debugging. any help would be great. --~--~-~--~~---

Re: returning checkmarked checkboxes after form is submitted

2009-01-12 Thread kai
what you mean? > > Alternatively have a bit of a closer looker at the FormHelper::input method, > there is quite a bit of flexibility over the html output if that suits your > needs better. > > -Original Message- > From: cake-php@googlegroups.com [mailto:cake-...@goo

returning checkmarked checkboxes after form is submitted

2009-01-12 Thread kai
I'm manually building my checkbox inputs so i can display them in a special way. how can i have the marked checkboxes remain marked after the form is submitted? This comes as a core feature when using $form- >input() but i'm having trouble figuring out how to get this working manually. (other than

Re: paginate using named parameters

2008-12-25 Thread kai
ll paginator to create URL's that have the same named > parameters as the page you're currently on. > > On Tue, Dec 23, 2008 at 8:59 PM, kai wrote: > > > Here is some code:http://bin.cakephp.org/view/1242618351 > > Also, i'm trying my best to learn so if anyone has any t

Re: paginate using named parameters

2008-12-23 Thread kai
Here is some code: http://bin.cakephp.org/view/1242618351 Also, i'm trying my best to learn so if anyone has any tips to make the code better it would help me a lot. On Dec 23, 5:49 pm, kai wrote: > i have a habtm pagination query which constructs the correct sql but > when i chan

paginate using named parameters

2008-12-23 Thread kai
i have a habtm pagination query which constructs the correct sql but when i change pages or sort then $this->data and its conditions are lost. i've found that the two options i have for pagination to work completely is to use sessions or named parameters. i'm hoping to use named parameters but i'

HABTM searching

2008-12-15 Thread kai
I'm trying to figure out the best way to model my HABTM search. So far i'm building upon http://bakery.cakephp.org/articles/view/habtm-searching which is a great start. At one point we're using this to query the database for each HABTM relationship that exists: $search_model->find('all', array( '

why wouldn't session write [Config] array?

2008-12-12 Thread kai
when i run my app locally there's no problems. on the server the session doesn't load the [Config] array which is causing problems. What are reasons why a session wouldn't load the config array? where can i look to troubleshoot this problem? --~--~-~--~~~---~--~~ Yo

Re: saving pagination position

2008-12-05 Thread kai
>Session->read ('back')); Sooo, on the surface this seems to be working. I'm not very good with php so if anyone has any suggestions or sees any potential problems it would be good to hear. On Dec 5, 2:37 pm, kai <[EMAIL PROTECTED]> wrote: > How can I save the paginati

Re: saving pagination position

2008-12-05 Thread kai
I've found this which answers my own question: http://bakery.cakephp.org/articles/view/pagination-recall But why is the article blank? It's necessary to go to GitHub to see the code. On Dec 5, 2:37 pm, kai <[EMAIL PROTECTED]> wrote: > How can I save the pagination position in

saving pagination position

2008-12-05 Thread kai
How can I save the pagination position in my session so that when someone goes back to the list they are on the same page and same sort. I'm having trouble saving my pagination in a session. Can I somehow use referrer to do this? --~--~-~--~~~---~--~~ You received t

deep e-mail and zip code validation seem to be quirky

2008-12-04 Thread kai
On my website we have lots of listings, like a directory, and many of them include e-mails. Sometimes the deep e-mail validation will reject an e-mail that we know is legit. I've had it reject an e-mail address and then I went on to send mail to that e-mail address successfully. An example of an e

Re: connecting the many to many dots - going from table1 -> table1_table2 -> table 2

2008-11-26 Thread kai
Thank you. Searching for 'modelizing the join table' brought me to the Mariano Iglesias article "Modelizing HABTM join tables in CakePHP 1.2: with and auto-with models". here: http://www.cricava.com/blogs/index.php?blog=6&title=modelizing_habtm_join_tables_in_cakephp_&more=1&c=1&tb=1&pb=1 This t

connecting the many to many dots - going from table1 -> table1_table2 -> table 2

2008-11-25 Thread kai
I realize my question leans more towards learning php than it does the cakephp framework but it's a little of both and i'm trying to learn both so I hope someone is willing to help. I have three tables: categories, categories_listings, and listings. i have a form that lists categories with check

cascading form fields

2008-10-02 Thread kai
I've been struggling trying to find an elegant way to add sections and categories to listings. After trying all sorts of things I'm back to square one, if someone could point me in the right direction that'd be terrific. My models are set up like this: sections hasMany categories, categories belo

Re: transactions

2006-11-10 Thread Kai Zaunick
Just came into my mind that you have to watch out that autocommit=0 in mysql. Maybe its a good idea to path the model base class. I will have a look at it later. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cak

Re: transactions

2006-11-09 Thread Kai Zaunick
Hi Grant, was just digging into the mysql transaction problem... It seems if you are using PHP5, you can directly use model->begin, commit and rollback. Every unknown method of your model is directly dispatched as a database query (cake uses the __call function to "catch" unknown methods). The mor