Re: XAMPP & CakePHP > Running in a sub-directory

2009-10-03 Thread Dr. Loboto
Tutorial is definitely wrong if it offers plain HTML in view. Cake works "out of the box" on any domain/subdir/subsubdir without problems if you use cake helpers to output anything about paths. Form action, link href, image src, etc - and do not use hardcoded URLs at all. On Oct 4, 9:27 am, IamJi

Re: Excluding a node from a tree, and adding a parent node

2009-10-03 Thread Rawna
I actually solved number 1. I added my own Model function: function excludeIdGenerateTreeList($id = null) { if (!empty($id)) { $treeList = $this->generatetreelist(); unset($treeList[$id]); return $treeList; } } Now I just have

Excluding a node from a tree, and adding a parent node

2009-10-03 Thread Rawna
Hi, I'm using Cake's Tree bhavior and I got a couple of questions: 1. How do I exclude a node when generating a a tree list? (i.e. using generatetreelist()) ? I'm going to use it when editing a category. 2. When adding a new category, it seems that I can't add a new parent category. I'm not usin

Re: showEmpty?

2009-10-03 Thread Gonzalo Servat
On Sun, Oct 4, 2009 at 7:21 AM, gimperdan...@gmail.com wrote: [..snip..] > This is what I have: > > echo $form->select('State', array('NJ' => New Jersey', 'NY' => 'New > York')); > > I want to remove the empty option of this select box. According to the > API I need to add $showEmpty = false to t

Re: XAMPP & CakePHP > Running in a sub-directory

2009-10-03 Thread IamJim
Thank-you very much for the reply, but the tutorial (so far) is not wrong. (except in the SQL of one extra COMMA) that he will be fixing. Changing the form, would have made it work...but made it a mess for portability. It did not "run out of the box" (as describe the pathing problem) in a s

scaffolding

2009-10-03 Thread fixzzle
hi, when i add or delete some record from the scaffolding admin panel i get this view: (default) 3 queries took 7 ms NrQuery Error AffectedNum. rows Took (ms) 1 DESCRIBE `scaffoldings` 2 2 6 2 INSERT INTO `scaffoldings` (`text`) VALUES ('

showEmpty?

2009-10-03 Thread gimperdan...@gmail.com
I am new to cake... i have been doing a lot of reading, but somethings i still can't figure out. This is what I have: echo $form->select('State', array('NJ' => New Jersey', 'NY' => 'New York')); I want to remove the empty option of this select box. According to the API I need to add $showEmpty

Advanced set up install

2009-10-03 Thread Dave Maharaj :: WidePixels.com
I have to install cake on a shared hosting server. The user has 4 domains so the server looks like /public_html /css /js /images ..all files for the hosting master domain1 /domain2 /all site files for domain12.com /domain3 /all site files for domain3.com

Help on pagination.

2009-10-03 Thread Jorge Horacio Cué Cantú
Hello, I need to paginate the following select. select companies.name, purchase_orders.id, numero_orden_compra, numero_contrato, codigo_producto, codigo_modelo, purchase_orders.created from purchase_orders join contracts on contracts.id = purchase_orders.contract_id join companies on co

Re: unexpected T_VARIABLE

2009-10-03 Thread Miles J
Also: $things = $this->$Thing->find('all'); Should be: $things = $this->Thing->find('all'); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroup

Re: JS/CSS automatic concatenation and compression

2009-10-03 Thread Miles J
@robust - Thanks for the link plug :] Talking more about your point of "concatenation". I personally am against it, mainly because certain pages use certain stylesheets. So if you join all stylesheets into one, some of the stylesheets that dont belong in a certain page may overwrite CSS that you

Re: Session / Security

2009-10-03 Thread Bert Van den Brande
You might want to read this : http://be2.php.net/manual/en/session.security.php On Sat, Oct 3, 2009 at 11:35 PM, Dave Maharaj :: WidePixels.com < d...@widepixels.com> wrote: > Right on. > > In my app nothing is passed in the url all my non-private areas are like > /manage/profile or /manage/acco

RE: Session / Security

2009-10-03 Thread Dave Maharaj :: WidePixels.com
Right on. In my app nothing is passed in the url all my non-private areas are like /manage/profile or /manage/account as everything related to the user is obtained by auth ID of the logged in user and getting the info based on that. So i was just wondering if someone did get the session, how wo

Re: Validator message not showing

2009-10-03 Thread Bert Van den Brande
Are you setting that flash message yourself ? You can check if a save has been succesfull or not by looking at the response that comes back from the $model->save() method ... either true or false. On Fri, Oct 2, 2009 at 4:46 PM, Cristian Cassina wrote: > > Hi everyone, > I'm dealing with a lit

Re: Deploy a cakePHP work..

2009-10-03 Thread Bert Van den Brande
1. Develop Cake app locally 2. Get a webhost 3. Use ftp to upload you Cake app done ! On Sat, Oct 3, 2009 at 9:37 AM, Hafsal M <2haf...@gmail.com> wrote: > Please help me, > am a newbie to cakephp... i dont know how a cakephp application should be > hosted, how is the deploying process is... > >

Re: cakephp don't execute model trigger plugin's

2009-10-03 Thread Bert Van den Brande
Can you show some code where the save() is called ? On Sat, Oct 3, 2009 at 7:55 PM, andrzejborkow...@gmail.com < andrzejborkow...@gmail.com> wrote: > > save section is ok, but this triger beforeSave don't execute and dont > return any value, only working trigers are in >LikecontentAppModel > what

Re: Caching dynamic url view

2009-10-03 Thread Bert Van den Brande
Maybe it's easier in this case to perform cache reading/writing yourself ? A simple example is given here : http://book.cakephp.org/view/766/Cache-read On Sat, Oct 3, 2009 at 7:59 PM, brian wrote: > > I misunderstood what you were looking to do. > > On Sat, Oct 3, 2009 at 1:16 PM, thinline wro

Re: Install CakePHP in sub folder ? ? ? How can I ? ? ?

2009-10-03 Thread Bert Van den Brande
If my memory serves me well this is a sign that your host does not has enabled mod_rewrite or that the .htaccess files are not allowed by Apache config ... On Sat, Oct 3, 2009 at 8:11 PM, Dr. Loboto wrote: > > Do you have file named "default.css" in your app/webroot/css folder? > Filename and cs

Re: Session / Security

2009-10-03 Thread Bert Van den Brande
I'm no expert on the subject, but I think session can be hijacked by : * 'stealing' a sessions id from the url. This is only possible if the user browser doesn't use cookies so the session id is visible in the url * stealing a session cookie In either cases, logging the user's ip would increase se

Re: unexpected T_VARIABLE

2009-10-03 Thread Pablo Viojo
¬¬ Regards, Pablo Viojo pvi...@gmail.com http://pviojo.net ¿Que necesitas? http://needish.com On Sat, Oct 3, 2009 at 4:59 PM, wrote: > First line of index() is missing a semicolon > Schreck > > -Original Message- > From: Jeff > Date: Sat, 3 Oct 2009 13:01:48 > To: CakePHP > Subject:

Re: unexpected T_VARIABLE

2009-10-03 Thread schreck84
First line of index() is missing a semicolon Schreck -Original Message- From: Jeff Date: Sat, 3 Oct 2009 13:01:48 To: CakePHP Subject: unexpected T_VARIABLE Hi, I am just starting out with cake, making a Facebook app. I get the following error: Parse error: syntax error, unexpected

unexpected T_VARIABLE

2009-10-03 Thread Jeff
Hi, I am just starting out with cake, making a Facebook app. I get the following error: Parse error: syntax error, unexpected T_VARIABLE in /users/home/ trompsbpbc/web/public/app/controllers/things_controller.php on line 22 And here is the code: user = $this->facebook->require_login(); }

Re: Access Classes In Layout Help??

2009-10-03 Thread brian
Put the select widget in an element. Get the select options with requestAction(). And cache the options so you don't have to fetch them from the DB each time. You don't need to change the target of the AJAX call. It doesn't matter what view you're in. It's just like any other link. On Sat, Oct 3

Session / Security

2009-10-03 Thread Dave Maharaj :: WidePixels.com
Not quite sure how this works but how does one steal a session? I have my session info stored in the database... if i added ip to the session so it also checks that the session ip matches the user ip would that increase the session sucurity? What a safe guards / good practsise to secure session d

Re: JS/CSS automatic concatenation and compression

2009-10-03 Thread robust solution
Dear Davit Barbakadze, I think none of the suggested solutions for this problem is fair enough because the solution should do the following -all the css links in the head section should be concatenated and minified into a single file then gzipped then cached on the server -the same for the js link

Re: Where request comes from?

2009-10-03 Thread Miles J
I never said it would work with Ajax in the way your thinking, simply you can have the Security component enabled and the Ajax handler will work regardless if its on or not. Additionally, just check the referrer in the Ajax to see if it comes from your domain, you dont need the Security tokens be

Re: How do you install Cake PHP?

2009-10-03 Thread Miles J
Well CakePHP is a framework, its not a script like Wordpress you can install. All you do is move all the files and folders to a destination on your server and setup everything manually. The install guide is pretty straight forward: http://book.cakephp.org/view/32/Installation On Oct 3, 7:19 am

Re: How to remove query's description in footer

2009-10-03 Thread Miles J
I still find it funny that people think the query debug output will show up on live <_< On Oct 3, 11:00 am, brian wrote: > In app/config/core.php: > > Configure::write('debug', 0); > > On Sat, Oct 3, 2009 at 11:39 AM, lokesh sharma wrote: > > > I'm beginner in cake PHP. After configure database

Re: Access Classes In Layout Help??

2009-10-03 Thread hahmadi82
Yea, probably much easier for me to explain what I've done and what I'd like to do. So basically I implemented the ajax select box using the code below: http://www.devmoz.com/blog/2007/04/04/cakephp-update-a-select-box-using-ajax/ My code set up is more less the same as the example posted in t

Re: JS/CSS automatic concatenation and compression

2009-10-03 Thread Sam Sherlock
Matt Curry Asset Pluginhttp://github.com/mcurry/asset - S 2009/10/3 schneimi > > Hi, > > I do this aside from CakePHP, not automatically but with one click in > eclipse. > > This tutorial I wrote might be interesting for you: > > http://schneimi.wordpress.com/2009/04/30/speed-up-your-website-w

Re: XAMPP & CakePHP > Running in a sub-directory

2009-10-03 Thread Dr. Loboto
If you copied listing 9 from http://www.ibm.com/developerworks/opensource/tutorials/os-php-cake1/section3.html you get what you get - it is wrong view. And, I afraid, wrong tutorial at all. Read about Form helper: http://book.cakephp.org/view/183/Creating-Forms On Oct 3, 5:12 pm, IamJim wrote:

Re: Access Classes In Layout Help??

2009-10-03 Thread Bert Van den Brande
And then we scroll back 15 emails : If this works, then I would suggest to add your layout data to the view inside the beforeFilter() method of AppController and then use this data in your layout. Might even consider creating an element for the part that uses this data ... :) On Sat, Oct 3, 20

Re: Install CakePHP in sub folder ? ? ? How can I ? ? ?

2009-10-03 Thread Dr. Loboto
Do you have file named "default.css" in your app/webroot/css folder? Filename and css filder are lowecase just as href in line you posted? On Oct 3, 5:45 pm, DatacenterHellas wrote: > Hello all. > > I have install the CakePHP in a sub folder in my web hosting package > > (in examplehttp://www.my

Re: How to remove query's description in footer

2009-10-03 Thread brian
In app/config/core.php: Configure::write('debug', 0); On Sat, Oct 3, 2009 at 11:39 AM, lokesh sharma wrote: > > I'm beginner in cake PHP. After configure database, model, controller > & view, I got my page running but in footer I'm getting queries > related information which  I want to remove.

Re: Caching dynamic url view

2009-10-03 Thread brian
I misunderstood what you were looking to do. On Sat, Oct 3, 2009 at 1:16 PM, thinline wrote: > > > Well most simply because It's not just the 1 page... There are > hundreds of these pages posts/badge/:id/size:180x150 thats what the > route would be. My issue is being able to use cacheAction to g

cakephp don't execute model trigger plugin's

2009-10-03 Thread andrzejborkow...@gmail.com
save section is ok, but this triger beforeSave don't execute and dont return any value, only working trigers are in >LikecontentAppModel whats going one ? array('notempty'), 'text' => array('notempty') ); //The Associations below have been created with all possible

Re: Caching dynamic url view

2009-10-03 Thread thinline
Well most simply because It's not just the 1 page... There are hundreds of these pages posts/badge/:id/size:180x150 thats what the route would be. My issue is being able to use cacheAction to grab dynamic urls. For instance if I wanted to cache /posts/view/* how could this be done? You would not

Re: $form->input('') when database-field contains special characters

2009-10-03 Thread Melanie Sommer
Hello Martin > Since the field is empty I suspect you may have Sanitize in place, or > some other text cleaner. No (not that I know, just the standard content that cakephp gives you when baking) > A simple character set problem should give you garbage but not empty strings. This is also was I tho

Re: How do you install Cake PHP?

2009-10-03 Thread Jim C wp
Hi Jenny :-) This will help you get started...assuming you have php/apache and the stuff installed already.. http://www.ibm.com/developerworks/opensource/tutorials/os-php-cake1/section2.html Jim www.jamesjcotton.com/ata - Original Message - From: "Jenny Caldwell" To: "Ca

How do you install Cake PHP?

2009-10-03 Thread Jenny Caldwell
Okay I'm totally new to this. I'm taking PHP in school and I downloaded CakePHP. Now what? What do I do with it. I looked around the site and can't find anything. This is all so confusing. Thanks for your help! --~--~-~--~~~---~--~~ You received this message

How to remove query's description in footer

2009-10-03 Thread lokesh sharma
I'm beginner in cake PHP. After configure database, model, controller & view, I got my page running but in footer I'm getting queries related information which I want to remove. Any pointer or help will be very appreciable Thanks in advance Regards, Lokesh --~--~-~--~~~

Re: Caching dynamic url view

2009-10-03 Thread brian
Why not just create a simplified route for that URL? Something like: '/badge', array('controlller' => 'posts', 'action' => 'your_action', 'id' => 23, 'size' => '180x150') On Fri, Oct 2, 2009 at 10:58 PM, thinline wrote: > > > I am trying to implement full view caching for a specific method in a

Re: Access Classes In Layout Help??

2009-10-03 Thread brian
On Sat, Oct 3, 2009 at 4:18 AM, hahmadi82 wrote: > > > Now I see!  So the set variables change depending on which view is showing > within the default.ctp.  If I add this car action to the app_controller > (instead of car model) and set the variables there, will all the views have > access to tha

Re: Using a page outside of CakePHP

2009-10-03 Thread brian
On Sat, Oct 3, 2009 at 2:54 AM, Josh K wrote: > > Thanks for the reply.  I would actually like to use the two pages > outside of the Cake document root since I have Cake and its app files > on a subdirectory.  For example: > > I would like to copy: > > /home/public_html/cake/app/views/forms/form1

Re: Where request comes from?

2009-10-03 Thread Martin Westin
Looks like a handy Ajax handler Miles. But I can't see where it makes SecurityComponent work with Ajax. All I see is form security being disabled (lines 85-87). Making Ajax work with SecurityComponent would involve actually validating that an ajax post came from the correct form. As with session

Re: Install CakePHP in sub folder ? ? ? How can I ? ? ?

2009-10-03 Thread Cristian Cassina
Hello, probably i didn't get it right, but if you put your CSS files in the webroot/css directory you shouldn't have any problem. I did the very same thing, putting my app in a subfolder, the tuning the routes for the homepage accordingly and everything works (as it should). Does your default

Re: Javascript libraries with images/css inside Cake Plugins

2009-10-03 Thread womble
Its a pain, because ideally just dumping it all under plugin_name/js/ the_lib would be ideal. I haven't given up on it, just taken a break from it for a while, I'll get motivated again sometime. The only suggestion I was given was to load the library under webroot - but this takes away the abili

Re: JS/CSS automatic concatenation and compression

2009-10-03 Thread schneimi
Hi, I do this aside from CakePHP, not automatically but with one click in eclipse. This tutorial I wrote might be interesting for you: http://schneimi.wordpress.com/2009/04/30/speed-up-your-website-with-one-click-in-eclipse/ Regards, Michael On 3 Okt., 11:29, Davit Barbakadze wrote: > I wond

XAMPP & CakePHP > Running in a sub-directory

2009-10-03 Thread IamJim
Good day all, and this is my first post to the group and trying to get Cake to be able to run from a Sub-directory (structure) instead of /weboot in my XAMPP installation in order to keep this cleaner. http://localhost/myCoreRoutines/cake/ OR?? Maybe I just need to create a 'sub-domain'...

JS/CSS automatic concatenation and compression

2009-10-03 Thread Davit Barbakadze
I wonder whether there already written plugin or component which automatically concatenates all js and css files used (separately of course), compresses them and places them onto corresponng place in the layout? So that in the end, for example, no matter how many js files were included, in the he

Install CakePHP in sub folder ? ? ? How can I ? ? ?

2009-10-03 Thread DatacenterHellas
Hello all. I have install the CakePHP in a sub folder in my web hosting package (in example http://www.mydomainname.ext/subfoldername/) The Cake is running very cool but I have problem with CSS and propably with other files (such as javascripts and images) tha I have not yet try. >From the sou

Deploy a cakePHP work..

2009-10-03 Thread Hafsal M
Please help me, am a newbie to cakephp... i dont know how a cakephp application should be hosted, how is the deploying process is... thank u in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group

How to finish..

2009-10-03 Thread Hafsal M
am a newbie to cakephp... i dont know how a cakephp application should be hosted, how is the deploying process is... thank u in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to thi

Wow Great content! worth the visit

2009-10-03 Thread Romesh Anuruddha Wanniarachchi
I found the below useful article and thought of sharing with my friends. There are many more articles related to the various subjects and worth to visit *Education is a human right. All of us have the right to be educated at least the primary education. Howev

Caching dynamic url view

2009-10-03 Thread thinline
I am trying to implement full view caching for a specific method in a controller. First I realized that if you set $this->layout = false; then caching will NOT happen. I have no idea why this occurs. I am not sure if this is a bug as I had a hard time debugging out how the cache works. Once, I

Re: Javascript libraries with images/css inside Cake Plugins

2009-10-03 Thread Elte Hupkes
Exactly. I know the paths are righ, because the css files and js libs do get loaded, and if I place them under the app's /webroot/ folder, so do the images/other files they include. Just not when they're inside a plugin's vendors folder (the same problem occurs with javascript in the normal vendor

Re: Password field is automatically hashed, how to change this?

2009-10-03 Thread j0n4s.h4rtm...@googlemail.com
I am not sure, but I remember something around here solved that: http://teknoid.wordpress.com/2008/10/08/demystifying-auth-features-in-cakephp-12/ http://book.cakephp.org/de/view/384/hashPasswords On Oct 1, 7:56 am, Mukhamad Ikhsan wrote: > I have a password field that when submiting, the value

Re: Access Classes In Layout Help??

2009-10-03 Thread Miles J
Do it in the beforeFilter() of your AppController, that will apply it to all views and layouts. On Oct 3, 1:18 am, hahmadi82 wrote: > Now I see!  So the set variables change depending on which view is showing > within the default.ctp.  If I add this car action to the app_controller > (instead of

Re: Access Classes In Layout Help??

2009-10-03 Thread hahmadi82
Now I see! So the set variables change depending on which view is showing within the default.ctp. If I add this car action to the app_controller (instead of car model) and set the variables there, will all the views have access to that variable? How can I make a global "set" variable that comes

Re: AD7six's MiMedia plugin

2009-10-03 Thread Clare
Hi AD7six, I'll try both of them out, many thanks for the info! Claire --~--~-~--~~~---~--~~ 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.com To unsubscribe

Re: Auth component loop redirect

2009-10-03 Thread Bert Van den Brande
Hmm tricky stuff indeed, must remember this one ! On Fri, Oct 2, 2009 at 3:39 PM, brian wrote: > > On Fri, Oct 2, 2009 at 9:36 AM, mathaios wrote: > > > > Brian you nailed it...I was having a small navigation element in the > > layout > > > > thank you! > > > > Yeah, that one was driving me nut

Re: Help with Multiple Models + Single View required

2009-10-03 Thread Bert Van den Brande
Then I would loop over the incoming data inside your controller method, create Jobs models out of them and pass the array of new Jobs models to saveAll() . Never have done this before but this is what I would try :) On Sat, Oct 3, 2009 at 7:57 AM, ashok.b wrote: > > I have a view (Linked to Mes