Re: router breaks in a certain case when i search something

2009-03-15 Thread aman batra
Anyone??? I am still struck in the same prob.. On Mar 15, 10:54 pm, aman batra wrote: > i have a searches controller and the index function of it is :- > >  function index($searchstr, $by='Entity') >      { >       $conditions = array(); >         switch($by) { >         case 'Tags': >         c

Re: is $id already secure inside a function?

2009-03-15 Thread Dr. Loboto
No one checked your $id. It is insecure. Anyone can call your action as http://domain.com/controller/edit or http://domain.com/controller/edit/013 or http://domain.com/controller/edit/kill%20your%20app On Mar 16, 1:04 am, Aurelius wrote: > Hi! > > When I have a function like > function edit($id

Re: Help with a query

2009-03-15 Thread Miles J
Which model are you searching on? Try using the ArticlesAuthor model. Also can we see your find()? --~--~-~--~~~---~--~~ 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

Help with a query

2009-03-15 Thread gkc
I need help getting back the right results from a query. I have an article table (articles), an authors table (authors), and a join table to reference the two (articles_authors) . The articles have multiple authors. I am trying to do a search of author first/ last name and return the list of ar

RE: Users with ACL problem

2009-03-15 Thread Dave Maharaj :: WidePixels.com
Over my head...this is my first attempt using Cake and with ACL and AUTH and everything else its just overwhelming... So I am not even sure what your trying to explain to me. Forgive my rookie aspect. Still trying to figure out the contain message you sent to me. When you want to list your Bookma

Re: Users with ACL problem

2009-03-15 Thread brian
Actually, I was going somewhere else with this but ... couldn't you just assign the ARO to Teacher instead of User? AFAIK, there's no reason an ARO can't be assigned to something other than a User. On Sun, Mar 15, 2009 at 9:49 PM, Dave Maharaj :: WidePixels.com wrote: > > Yes that is correct. Bo

RE: Users with ACL problem

2009-03-15 Thread Dave Maharaj :: WidePixels.com
Yes that is correct. Both the TEACHERS and STUDENTS have a user_id field which is the USER ID. -Original Message- From: brian [mailto:bally.z...@gmail.com] Sent: March-15-09 10:20 PM To: cake-php@googlegroups.com Subject: Re: Users with ACL problem But Teacher should also have a user_

Re: Class dispatcher not found - Solved, bug maybe?

2009-03-15 Thread Brett Wilton
Hi Gwoo, > Can you run the Inflector tests? Unfortunately as soon as I put the original inflector.php back in nothing will run. When loading the test page I get the following error :- Fatal error: Class 'Overloadable' not found in /cake/libs/model/model.php on line 43 --~--~-~--~~

Re: Users with ACL problem

2009-03-15 Thread brian
But Teacher should also have a user_id field, yes? On Sun, Mar 15, 2009 at 8:09 PM, Dave Maharaj :: WidePixels.com wrote: > I think I may have caused my self more of a headache then necessary and > would like to hear your thoughts on my set up. > > On my site there are 2 different GROUPS a USER

Users with ACL problem

2009-03-15 Thread Dave Maharaj :: WidePixels.com
I think I may have caused my self more of a headache then necessary and would like to hear your thoughts on my set up. On my site there are 2 different GROUPS a USER can sign up as. Each form creates the USER and corresponding TEACHER profile (table has USER_ID) or STUDENT profile (table has USER

Re: My first CakePHP website launched

2009-03-15 Thread Gonzalo Servat
On Sun, Mar 15, 2009 at 6:33 PM, Davy wrote: > > OK. Thx. > > Another thing. Does cake have a concept of severity for flash messages > (or any other)? > > I mean, sometimes you want the message to be an alert, sometimes an > error, ... > > Drupal has such a thing... > http://api.drupal.org/api/fu

Some ACL Advice Please - Multiple Group Membership

2009-03-15 Thread Smelly_Eddie
So I have finally broken down in my stubborn ways and agreed to accept Cake's Acl component. After walking through the manual I believe it will make it into all my future sites. The trouble I am having is to add it to one of my old sites. I am not looking for technical advice so much as concept

Re: My first CakePHP website launched

2009-03-15 Thread Jon Bennett
Hi Davy, > Another thing. Does cake have a concept of severity for flash messages > (or any other)? You can do this by passing a different key to the flash method, I do http://pastie.org/417192 hth jon -- jon bennett w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~-

Re: Session.start => false for app, but not for admin section

2009-03-15 Thread Cake
im replaced $this->Session->start() to $this->Session->activate() and its work! Thanks to all! On 15 мар, 20:49, majna wrote: > put in AppController::beforeFilter() > > if (isset($this->params['admin'])) > { >   $this->Session->start(); > > } > > On Mar 14, 11:15 pm, Cake wrote: > > > > > Hi A

Re: Session.start => false for app, but not for admin section

2009-03-15 Thread Cake
Sorry, but its dont work... On 15 мар, 20:49, majna wrote: > put in AppController::beforeFilter() > > if (isset($this->params['admin'])) > { >   $this->Session->start(); > > } > > On Mar 14, 11:15 pm, Cake wrote: > > > > > Hi All! > > I need to use Sessions only for admin section. How I can to

Re: My first CakePHP website launched

2009-03-15 Thread Davy
OK. Thx. Another thing. Does cake have a concept of severity for flash messages (or any other)? I mean, sometimes you want the message to be an alert, sometimes an error, ... Drupal has such a thing... http://api.drupal.org/api/function/drupal_set_message/6 Davy On Mar 15, 10:28 pm, Gonzalo

Where should I place xml files?

2009-03-15 Thread blckspder
Hello, I have an xml file I want to parse. where should I keep the file? Is there a specific location or can it be placed anywhere? Please let me know and thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Re: Getting my first form right

2009-03-15 Thread brian
You don't really have to use FormHelper, though you will need to follow Cake's naming conventions (if you want to avoid headaches). I suggest you first create the view using FormHelper and your model & fieldnames without any regard for the markup and classnames you'd like to have. Then, view source

Re: My first CakePHP website launched

2009-03-15 Thread Gonzalo Servat
On Sun, Mar 15, 2009 at 6:25 PM, Davy wrote: > Thanks for your answers. I am doing this right now. But suppose I want > to change the homepage. I then have to change the route + my checks? > In that case, maybe there are better ways, but what Miles suggested is probably OK ($this->currentPage =

Re: My first CakePHP website launched

2009-03-15 Thread Gonzalo Servat
On Sun, Mar 15, 2009 at 3:44 PM, Davy wrote: > > Hi, I've just launched my first CakePHP website: > > http://www.davyvandenbremt.be/ > > Something very simple though. > > Question: What is the best way to check in a layout if you're on the > homepage? > Nice design. You could check $this->params

Re: Email component

2009-03-15 Thread Miles J
Yes doing a loop would be the best way to do it. Dont forget to call $this->Email->reset() in the loop. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@go

Re: My first CakePHP website launched

2009-03-15 Thread Miles J
Very nice, I really like your grungy type design. As for the homepage thing, In your action for your homepage, do something like this: $this->set('currentPage', 'homepage'); And in your layout, just manipulate the $currentPage variable. --~--~-~--~~~---~--~~ You

WTH: CakePHP coder

2009-03-15 Thread Chris Mc
I need a few simple changes to my CakePHP app. Should take 1hr (max), this would include online chat (IM) time to explain the problem and get the code done. Please reply with your availability and hourly rate. Work must be completed in the next 36hrs. --~--~-~--~~~---

RE: Ajax reload of an element.

2009-03-15 Thread Dave Maharaj :: WidePixels.com
I think I know what you mean. What I do (no expert so I may be doing it wrong) but for example 1. I render element view_posts for the original view of what the visitor will see. 2. I have an edit button which calls a form to update the div where view_posts currently is with a view called edit-po

is $id already secure inside a function?

2009-03-15 Thread Aurelius
Hi! When I have a function like function edit($id = null) { ... } is the $id already checked against hacking and can only be a integer or is it unsecure? thx Aurelius --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

My first CakePHP website launched

2009-03-15 Thread Davy
Hi, I've just launched my first CakePHP website: http://www.davyvandenbremt.be/ Something very simple though. Question: What is the best way to check in a layout if you're on the homepage? --~--~-~--~~~---~--~~ You received this message because you are subscribe

Getting my first form right

2009-03-15 Thread Mr. X
Hello. CakePHP has me really confused at the moment. I would like to put the form below in place in cakePHP but I can't seeme to find any good tips for doing so. As you can see the form has fieldset tags, also preset classes and id's that CSS uses. I would very much like to know how do I do this e

Weird IE 6 problem -page jumping

2009-03-15 Thread ymadh
I have disabled all my css and tested this, so nothing weird there! Basically I have a show ajax link and a hide link. The show link populates a div block and the hide simply hides it. when I click hide the page jumps down about 4 inches in IE 6. Here is some code echo $ajax->link('View Dogs'

Re: Help using special character « in paginator

2009-03-15 Thread mklappen
thanks! working now :) On Mar 14, 12:24 pm, brian wrote: > Add 'escape' => false to your params array. > > On Sat, Mar 14, 2009 at 12:45 PM, mklappen wrote: > > > Hi > > > Is there a way to use the special characters « and » in > > pagination class without cakephp converting the & sign into '&'

Re: Ajax reload of an element.

2009-03-15 Thread byqsri
Sorry but perhaps I have not explained well. I have a div, inside a div I render a element (with params). I have a link and I would that when I click the link the ajax helper reload inside the div the element. renderElement( 'postsList', array(...

router breaks in a certain case when i search something

2009-03-15 Thread aman batra
i have a searches controller and the index function of it is :- function index($searchstr, $by='Entity') { $conditions = array(); switch($by) { case 'Tags': case 'doc': case 'video': case 'image': case 'slide': $modelName

Re: Session.start => false for app, but not for admin section

2009-03-15 Thread majna
put in AppController::beforeFilter() if (isset($this->params['admin'])) { $this->Session->start(); } On Mar 14, 11:15 pm, Cake wrote: > Hi All! > I need to use Sessions only for admin section. How I can to do it? > > Example: > > core.php: > Configure::write('Session.start', false); > > app_c

Re: Anyone used the Modal Box Question

2009-03-15 Thread brian
On Sun, Mar 15, 2009 at 12:29 PM, Dave Maharaj :: WidePixels.com wrote: > I was looking at the modalbox on http://www.wildbit.com/labs/modalbox/ and > found a few tutorials about implementing it in Cake. What I was wondering if > anyone has any information for a situation like this if it is possa

Re: Ajax reload of an element.

2009-03-15 Thread dr. Hannibal Lecter
Did you go through the AJAX helper chapter in the good book? http://book.cakephp.org/view/212/Methods On Mar 15, 10:25 am, "marco.rizze...@gmail.com" wrote: > Hi > I have a page where I have an element (with params) that is a list of > items. > Now I would that when user click on a certain butt

Re: cakephp, wampserver and mod_rewrite

2009-03-15 Thread dr. Hannibal Lecter
Did you AllowOverride on your document root and the alias? On Mar 15, 1:24 pm, terje wrote: > Hi. > > I have just downloaded and installed wampserver. > I have an exisiting cakephp app which i previously had working > beautifully under my own custom setup of apache. > > Now i have wamp installed

Re: Email component

2009-03-15 Thread dr. Hannibal Lecter
You might want do a DISTINCT select on that one if you're talking about per-page "keep me updated". On Mar 15, 5:42 pm, "Dave Maharaj :: WidePixels.com" wrote: > I am using the email component in my site and what I want to do is when a > USER posts a new comment to a specific page it will notify

Re: Jake question: rewrite problem?

2009-03-15 Thread Robin
I realized that this might be a completely different problem. Since the mainframe of joomla wasn't displayed after I called jake component with index.php?option=com_jake. It might be a problem that jake calls joomla files, including css files. If that's the case, it is the handling of joomla url b

Email component

2009-03-15 Thread Dave Maharaj :: WidePixels.com
I am using the email component in my site and what I want to do is when a USER posts a new comment to a specific page it will notify all USERS who in their profile have selected "Keep me updated" of new comments. So I was thinking when a new post is added write a function basically like this emai

cakephp, wampserver and mod_rewrite

2009-03-15 Thread terje
Hi. I have just downloaded and installed wampserver. I have an exisiting cakephp app which i previously had working beautifully under my own custom setup of apache. Now i have wamp installed on c:/wamp and my cakephp app is placed in d:/development/myapp. I created an apache alias (myapp) via w

Anyone used the Modal Box Question

2009-03-15 Thread Dave Maharaj :: WidePixels.com
I was looking at the modalbox on http://www.wildbit.com/labs/modalbox/ and found a few tutorials about implementing it in Cake. What I was wondering if anyone has any information for a situation like this if it is possable to do. On any given page say USERS for example click edit and up opens the

Re: how cakephp to manage its database connections?.

2009-03-15 Thread Rimoe
hi, every one. now I have suffer from the database connections count aren't enough. In the Java, It has a connnection pool to manage the connections. If has no any connection, It should wait the connection that been released, and you can set the timeout, then In cakephp has it the ability? If it

Re: is it a defect of Auth component?

2009-03-15 Thread Liushuxun
Hi,jorge thanks for your help! It's useful. 在 2009-3-15,1:38,Jorge Horacio Cué Cantú 写 到: > HI, > > In my application I had to adjust the User information aboard the > session, mi solution is as follows: > > 1. In the AppController set autoRedirect to false: > > class AppController ...

Session.start => false for app, but not for admin section

2009-03-15 Thread Cake
Hi All! I need to use Sessions only for admin section. How I can to do it? Example: core.php: Configure::write('Session.start', false); app_controller.php: if(isset($this->params['admin'])) { Configure::write('Session.start', true); } Its not work. Help me pls. p.s. sry for my bad english Tha

Re: Integrating Paypal in Cakephp 1.2

2009-03-15 Thread Sunchaser
Thanks, I have my items with prices, description etc in a table, so i will use an helper to generate dinamically the view page. On Mar 13, 7:23 pm, brian wrote: > On Fri, Mar 13, 2009 at 12:06 PM, Sunchaser wrote: > > > Is there an easy way to integrate Paypal in a CakePHP website, maybe > > u

Ajax reload of an element.

2009-03-15 Thread marco.rizze...@gmail.com
Hi I have a page where I have an element (with params) that is a list of items. Now I would that when user click on a certain button the element is reload . I would make this with ajax. How can I do the ajax reload of an element? Many thanks --~--~-~--~~~---~--~~ Y