Where to DL RC2?
I can't find the link to download Cake 1.2 RC2. I'm trying to run a site that was built on RC2 that doesn't work with the current release. Can anyone direct me? thanks --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to silently redirects to login page ?
Well, you can do some additional checks and remove the error message from the session when you don't want it displayed. This should happen in the afterFilter() callback of the appropriate controller I think. On Mar 30, 8:26 pm, iFeghali igor.fegh...@gmail.com wrote: Hello, I have followed [1] to get a simple login form working. Currently when a visitor tries to reach '/' one is redirected to the login form, which is desirable, but an error message is displayed You are not authorized to access that location., which is not desirable. Any clue how do I prevent this error only in the case where the user is going to login ? Thank you. [1]http://book.cakephp.org/view/172/Authentication --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Hosting Migration Problem - The requested address was not found on this server
Hi Jon, Okay I'll try downloading the 1.1 htaccess files, stupid question but where do I get them from? I can only see the 1.2 download links on the main Cake site? The only log files I've got access to are the standard erorr logs which aren't picking up anything now. Thanks, James --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Hosting Migration Problem - The requested address was not found on this server
Okay I've found a version of 1.1.12 and copied across the htaccess files from that but it's still reading a 404 error. Thanks, James --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Where to DL RC2?
https://svn.cakephp.org/repo/tags On Mar 31, 8:55 am, rocket justin...@gmail.com wrote: I can't find the link to download Cake 1.2 RC2. I'm trying to run a site that was built on RC2 that doesn't work with the current release. Can anyone direct me? thanks --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Hosting Migration Problem - The requested address was not found on this server
Since php_value was causing the 500, perhaps you should try restoring the .htaccess files to the ones from the old server (but without the php_value naturally). The 1.1 files have to be downloaded from the svn repository afaik. https://trac.cakephp.org/browser/branches/1.1.x.x You can open each .htaccess file and choose download.. ( centered at the bottom of the while space) or download the whole thing as an archive. If the standard files don't work could you perhaps detail the folder structure you have on the server now? Which folder is the apache document root (aka public_html) and where all the Cake-related folders are in relation to that. The standard production deploy is to have the document root point to webroot. On shared hosts this will usually be a bit tricky and involve rearranging the folder a bit and making configurations to match. Folder structure can be seen at (half way down) http://book.cakephp.org/view/308/Installing-CakePHP Or, if you are in a trusting mood, send me some login-info in an email and I'll have a quick look. I have installed 1.1 apps on a number of servers so I might see the problem immediately and know the magic trick. I am a pretty trustworthy guy... as long as I get my cup of coffee ;) /Martin On Mar 31, 10:04 am, jmdesign webmas...@jmdesignsolutions.com wrote: Hi Jon, Okay I'll try downloading the 1.1 htaccess files, stupid question but where do I get them from? I can only see the 1.2 download links on the main Cake site? The only log files I've got access to are the standard erorr logs which aren't picking up anything now. Thanks, James --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to silently redirects to login page ?
$this-Auth-authError = null? But in my opinion its a real bad idea to redirect an already logged in (!) user to a login again. That will look to the user like the app is acting wrong and is confusing. If hes logged in but not allowed to access a certain area he should get a notice that can't be overlooked displayed telling him Sorry, you dont have permissions to access this area!. I would do a check if the user is logged in, change the AuthError message in this case and redirect him back to the page from where he came. On Mar 30, 9:28 pm, iFeghali igor.fegh...@gmail.com wrote: Hi Martin, Yes I am talking exactly about that message. Changing it the way you suggest would make it very weird to users already logged in that are trying to access resources they are not allowed to. Also, I would like to have no message at all... just the login form. Thank you. On 30 mar, 15:28, Martin Westin martin.westin...@gmail.com wrote: That would be the authError message you are seeing. You can set it (from AppController::beforeFilter for example) like this: $this-Auth-authError = 'Hi, and welcome. Please login before proceeding.'; --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to silently redirects to login page ?
Since you only mentioned a problem on the index page I did not go into anything more complicated. You can either remove it from the session before displaying the login screen. Then it will pop up anywhere else. Alternatively you can make an if-clause: if ( $this-Auth-user() ) { // user is logged in show error message if needed $this-Auth-authError = 'Hey, be nice, only admins can do that'; } else { // no user logged in, show nice message $this-Auth-authError = 'Hi, and welcome. Please login before proceeding.'; } ... or something similar. On Mar 30, 9:28 pm, iFeghali igor.fegh...@gmail.com wrote: Hi Martin, Yes I am talking exactly about that message. Changing it the way you suggest would make it very weird to users already logged in that are trying to access resources they are not allowed to. Also, I would like to have no message at all... just the login form. Thank you. On 30 mar, 15:28, Martin Westin martin.westin...@gmail.com wrote: That would be the authError message you are seeing. You can set it (from AppController::beforeFilter for example) like this: $this-Auth-authError = 'Hi, and welcome. Please login before proceeding.'; --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Hosting Migration Problem - The requested address was not found on this server
Hi Martin, Thanks for your offer, email on it's way to you. James --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
I need to compare how I work to how you work
Hi! Once, I created a topic here, asking for help, then I got one reply. Unfortunately, it was not enough help to solve the problem. I kept posting my progress, waiting for a reply and I must have posted three times, but I waited days to get one reply again. Fortunately, It was enough help to solve the problem. I am afraid of waiting. Regarding waiting... Before waiting: how much do you google? While you are waiting: do you keep trying to solve the problem yourself? or other problems in your project? or other people's problems (in message boards, in chat rooms etc)? how often do you check your inbox for a reply? After waiting: do you work around? or delay? or quit? How dependent / independent are you? How I can I be more like you??? Thanks! --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Webroot problem when accessing cake app through service provider's SSL
Thanks for your help! I still can't get it to work however. I tried any possible settings in the .htaccess. The problem is that cake defines the webroot directory in views as / ssl/application_name/ when it shoud be because of the SSL / thesite.com/application_name/. Because that directory is set wrong all includes (css, javascript) and form actions point to that wrong directory. Where does cake get this directory? It can be echoed in a view (echo $this-webroot). Is there some setting where I can change this value? On Mar 30, 3:45 pm, Martin Westin martin.westin...@gmail.com wrote: Just guessing but try this: http://book.cakephp.org/view/37/Apache-and-mod_rewrite-and-htaccess The last part about setups that have already been rewritten. Your provider might be using mod_rewrite for it's ssl urls and then Cake's rewriting will not work as expected. /Martin On Mar 29, 8:02 pm, karma karma@gmail.com wrote: Hi! I have a problem getting cakephp to set correct webroot directory. I've the webroot installed in /ssl/application_name /webroot folder at the service providers server. The application works perfectly when I access it through www.thesite.com/ssl/application_name. BUT The service provider offers SSL-encryption through this centered service, where the site is accessed through address https:// ssl.serviceprovider.com/thesite.com/application_name/. This messes the application up cause the webroot is not set correctly. I tried to change WWW_ROOT constant but it doesn't help. If I echo $this-webroot in a view it says /ssl/application_name/. I need to get this application to work through this centered SSL. So, how could I get the application work correctly in this kind of a setup? I'm in quite a hurry to get this to work so any help is appreciated! --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to silently redirects to login page ?
I misunderstood you! My solution is to use a route, defined as: Router::connect('/', array('controller' = 'users', 'action' = 'logout')); in my routes.php, thus any access at the root gives me the login form using the users controllers logout function, which contains only: $this-Session-destroy(); $this-redirect($this-Auth-logout()); Thus producing no message upon showing the login form! On the other hand, if the visitor tries to reach for example /requests/ index, the auth correctly directs the user to the login form, with a message to login first! Enjoy, John On Mar 30, 10:25 pm, iFeghali igor.fegh...@gmail.com wrote: Hello John, Thanks for the answer but I don't see how it could help me. Can you please clarify ? On 30 mar, 15:13, John Andersen j.andersen...@gmail.com wrote: Use thishttp://book.cakephp.org/view/385/logoutasthe redirect! --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Querying / filtering an array done by find('threaded')
Okay, I got it!! I don't know if there is some Cake's better solution but this works fine for me I have made my own function that goes trough the whole threaded array and extracts childs for top level section specified by ID. /** * Extracts child node(s) for specific top level section id * * @param $Sections - an array outputed from $this-Section-find ('threaded'); Includes all branches generated with nested arrays. * @param $id - id of the top level section whose childs will be returned * @return an array of childs of section specified */ function getSectionChilds($Sections, $id){ foreach($Sections as $Section) { if( $Section['Section']['id'] == $id ) return $Section ['children']; } return false; } On Mar 30, 8:39 pm, toka...@gmail.com toka...@gmail.com wrote: I have tried also $this-Section-children($id), that seems to be ok, but it doesnt generate such nice nested structure like find ('threaded'). Is there any change to filter threaded array similar way like getting childs from the tree? Tnkx Tomas --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Webroot problem when accessing cake app through service provider's SSL
I can get the system to work with a VERY ugly fix: In layout if i replace these: echo $html-css('cake.generic'); = echo preg_replace( /ssl/, thesite.com, $html-css('cake.generic') ); echo $content_for_layout; = echo preg_replace( /ssl/, thesite.com, $content_for_layout ); etc. But I really don't like doing it like this. If anyone has a better suggestion please tell me! On Mar 31, 12:37 pm, karma karma@gmail.com wrote: Thanks for your help! I still can't get it to work however. I tried any possible settings in the .htaccess. The problem is that cake defines the webroot directory in views as / ssl/application_name/ when it shoud be because of the SSL / thesite.com/application_name/. Because that directory is set wrong all includes (css, javascript) and form actions point to that wrong directory. Where does cake get this directory? It can be echoed in a view (echo $this-webroot). Is there some setting where I can change this value? On Mar 30, 3:45 pm, Martin Westin martin.westin...@gmail.com wrote: Just guessing but try this: http://book.cakephp.org/view/37/Apache-and-mod_rewrite-and-htaccess The last part about setups that have already been rewritten. Your provider might be using mod_rewrite for it's ssl urls and then Cake's rewriting will not work as expected. /Martin On Mar 29, 8:02 pm, karma karma@gmail.com wrote: Hi! I have a problem getting cakephp to set correct webroot directory. I've the webroot installed in /ssl/application_name /webroot folder at the service providers server. The application works perfectly when I access it through www.thesite.com/ssl/application_name. BUT The service provider offers SSL-encryption through this centered service, where the site is accessed through address https:// ssl.serviceprovider.com/thesite.com/application_name/. This messes the application up cause the webroot is not set correctly. I tried to change WWW_ROOT constant but it doesn't help. If I echo $this-webroot in a view it says /ssl/application_name/. I need to get this application to work through this centered SSL. So, how could I get the application work correctly in this kind of a setup? I'm in quite a hurry to get this to work so any help is appreciated! --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Double left join?
Hi, I'm fairly new to CakePHP so if this is a stupid mistake forgive me. A user will post a complaint against a company, so the complaint table has company_id. I use a left join to get the company data. Then the company has a field category_id which is simply the industry of the company (categories have id / name). When I load a complaint I want to grab the category name. I manage to get the category ID but cannot do another left join within this left join. Hope this makes sense. At the moment I have; company.php var $belongsTo = array('Category'); category.php var $hasMany = array('Company'); complaint.php var $belongsTo = array('Company', 'User'); view/complaints/view.thtml echo $complaint['Company']['category_id'] which i want it to grab Category.name Appreciate any help. Thanks. --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Adding/Deleting HABTM on existing records
For deleting, you can use the model function deleteAll to remove directly from the join table, as long as you know both IDs. Example (if you haven't specified a different join model name): $this-Question-GamesQuestion-deleteAll(array('question_id' = $q_id, 'game_id' = $g_id), false); Where $q_id is the Question ID and the $g_id is the Game ID. --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Hosting Migration Problem - The requested address was not found on this server
For public knowlegde in case anyone does a search for similar problems: The problem jmdesign was experiencing was dure to a missing RewriteBase since the website was hosted under a user account. ( www.example.com/~username/ ) Setting the RewriteBase to /~username/ in both the cake root folder (= public_html) and app/webroot/ brought the app back to life. /Martin On Mar 31, 11:02 am, jmdesign webmas...@jmdesignsolutions.com wrote: Hi Martin, Thanks for your offer, email on it's way to you. James --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: I need to compare how I work to how you work
The thing with Google Groups is that it is a mailing list that many people access like a forum... I think people don't page back to yesterday and read every message since their last login as many do in forums. I know I don't. This is a debated god / bad aspect of the group. The time and day you post a problem greatly affect the number of people reading it. It is mid-day for me here in Sweden right now and if you had posted 5-6 hours later I would never have seen your message. I loosely follow this path most of the time: Search the google group. Search Google. Ask the google group. Search the core test-cases. (these are a very good source of knowledge at times) Start reading the source of related core-files (if I have a bug or strange behaviour) Check for an answer. Update question with my current findings from the core Ask on irc sometimes (I'm not a big chatter-bug but there are some nice helpful people there... in realtime!) Workaround the problem or post a ticket if I think I really found a bug... which is very rare. I rarely do all of it and most often I find the answer on the top three steps. But I always keep playing around on my own while I wait or if I am really stuck work on some other part of my application for a while. I have also been known to ask my question again after a day or two of silence. /Martin On Mar 31, 11:27 am, Delirium tremens pedbe...@gmail.com wrote: Hi! Once, I created a topic here, asking for help, then I got one reply. Unfortunately, it was not enough help to solve the problem. I kept posting my progress, waiting for a reply and I must have posted three times, but I waited days to get one reply again. Fortunately, It was enough help to solve the problem. I am afraid of waiting. Regarding waiting... Before waiting: how much do you google? While you are waiting: do you keep trying to solve the problem yourself? or other problems in your project? or other people's problems (in message boards, in chat rooms etc)? how often do you check your inbox for a reply? After waiting: do you work around? or delay? or quit? How dependent / independent are you? How I can I be more like you??? Thanks! --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: media view and files on the fly
I have so far lest MediaView alone and gone a different way for fake, dynamic, files. I have made use of parseExtensions to output files. The examples mostly show rss feeds but you can just as easily use it to generate an Excel sheet full of statistics about something on your site or any other dynamic output. /Martin On Mar 30, 7:05 pm, Mark (Germany) dereurom...@googlemail.com wrote: i tried to use the media view for files generated on the fly (some exported text inside a export.txt or whatever) but it seems like the media view can only handle downloads of existing files on the server trying to rewrite it did not turn out very well so, did anyone manage to create a txt file to download, that is filled with the echoed content echo 'blabla' or $content = 'blabla' transfered to the media view without creating locale (temp.) files on the server? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to silently redirects to login page ?
Hello All, Many thanks for the help so far. Let's try to be a bit more clear... that's my scenario: 1) only authenticated users have access to the site (but the login form, of course) for a visitor (non auth user): 2) example.com should redirect to example.com/users/login with no error message at all 3) example.com/anything should redirect to example.com/users/login with no error message at all, and them redirect the user to /anything after logging in 4) providing the wrong credentials should pop up an error message for an authenticated user: 5) example.com should redirect to example.com/foo/index 6) trying to access a resource denied to this user should get him the authError (but no login form, clear now burzum?) So far I have 1, 3, 4, 5 and 6 working fine. But I couldn't think of a way to implement (2) without breaking one of the others. Currently root (/) routes to /foo/index and I would prefer to keep it this way. Routing / to /users/login would bring (2) but break (5). Routing / to /users/login *and* finding a way to redirect the path to /foo/index inside the users controller sounds an ugly hack that i would like to avoid. Any more ideas left ? Thank you. --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Adding/Deleting HABTM on existing records
That's how I handle my deletes. If you don't want to read the existing relationships before your save (meaning you don't want Cake to delete existing relationships before inserting new ones), in the models where you define the HABTM associations, set the 'unique' array key to 'false' and you'll no longer need to re-pass them. On Mar 31, 7:09 am, mscdex msc...@gmail.com wrote: For deleting, you can use the model function deleteAll to remove directly from the join table, as long as you know both IDs. Example (if you haven't specified a different join model name): $this-Question-GamesQuestion-deleteAll(array('question_id' = $q_id, 'game_id' = $g_id), false); Where $q_id is the Question ID and the $g_id is the Game ID. --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: I need to compare how I work to how you work
omg Martin, I am relieved! Sometimes, my posts don't make sense or ask too much or nobody finds interesting (or like you said are asked at the wrong time) or whatever, but I know from your post that this time it went alright!!! By the way, there is a link to reply to author... should I use it AND use the link to just reply? I had made a list of places where I can get help, but had not used it. Maybe, one or two itens in the list are new to you. Check it out! 1 Cookbook - http://book.cakephp.org/ 2 Bakery - http://bakery.cakephp.org/ 3 CakeForge- http://www.cakeforge.org/ 4 API - http://api.cakephp.org/1.2 5 Test Cases - http://api.cakephp.org/tests 6 Wiki - https://trac.cakephp.org/ 7 FAQ - http://groups.google.com/group/cake-php/web/faq On 31 mar, 08:41, Martin Westin martin.westin...@gmail.com wrote: The thing with Google Groups is that it is a mailing list that many people access like a forum... I think people don't page back to yesterday and read every message since their last login as many do in forums. I know I don't. This is a debated god / bad aspect of the group. The time and day you post a problem greatly affect the number of people reading it. It is mid-day for me here in Sweden right now and if you had posted 5-6 hours later I would never have seen your message. I loosely follow this path most of the time: Search the google group. Search Google. Ask the google group. Search the core test-cases. (these are a very good source of knowledge at times) Start reading the source of related core-files (if I have a bug or strange behaviour) Check for an answer. Update question with my current findings from the core Ask on irc sometimes (I'm not a big chatter-bug but there are some nice helpful people there... in realtime!) Workaround the problem or post a ticket if I think I really found a bug... which is very rare. I rarely do all of it and most often I find the answer on the top three steps. But I always keep playing around on my own while I wait or if I am really stuck work on some other part of my application for a while. I have also been known to ask my question again after a day or two of silence. /Martin On Mar 31, 11:27 am, Delirium tremens pedbe...@gmail.com wrote: Hi! Once, I created a topic here, asking for help, then I got one reply. Unfortunately, it was not enough help to solve the problem. I kept posting my progress, waiting for a reply and I must have posted three times, but I waited days to get one reply again. Fortunately, It was enough help to solve the problem. I am afraid of waiting. Regarding waiting... Before waiting: how much do you google? While you are waiting: do you keep trying to solve the problem yourself? or other problems in your project? or other people's problems (in message boards, in chat rooms etc)? how often do you check your inbox for a reply? After waiting: do you work around? or delay? or quit? How dependent / independent are you? How I can I be more like you??? Thanks! --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to silently redirects to login page ?
In your case I would change your route / as I specified earlier and in the app_controller-beforeFilter function, add: $this-Auth-loginRedirect = array('controller' = 'foo', 'action' = 'index'); Thus when a user provides a valid login, the user is automatically directed to /foo/index Enjoy, John On Mar 31, 3:13 pm, iFeghali igor.fegh...@gmail.com wrote: Hello All, Many thanks for the help so far. Let's try to be a bit more clear... that's my scenario: 1) only authenticated users have access to the site (but the login form, of course) for a visitor (non auth user): 2) example.com should redirect to example.com/users/login with no error message at all 3) example.com/anything should redirect to example.com/users/login with no error message at all, and them redirect the user to /anything after logging in 4) providing the wrong credentials should pop up an error message for an authenticated user: 5) example.com should redirect to example.com/foo/index 6) trying to access a resource denied to this user should get him the authError (but no login form, clear now burzum?) So far I have 1, 3, 4, 5 and 6 working fine. But I couldn't think of a way to implement (2) without breaking one of the others. Currently root (/) routes to /foo/index and I would prefer to keep it this way. Routing / to /users/login would bring (2) but break (5). Routing / to /users/login *and* finding a way to redirect the path to /foo/index inside the users controller sounds an ugly hack that i would like to avoid. Any more ideas left ? Thank you. --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to silently redirects to login page ?
By the way, you probably have to add the following in the app_controller-beforeFilter in order to ensure that the user has access to the logout action :) $this-Auth-allow('logout'); Enjoy, John On Mar 31, 3:13 pm, iFeghali igor.fegh...@gmail.com wrote: Hello All, Many thanks for the help so far. Let's try to be a bit more clear... that's my scenario: 1) only authenticated users have access to the site (but the login form, of course) for a visitor (non auth user): 2) example.com should redirect to example.com/users/login with no error message at all 3) example.com/anything should redirect to example.com/users/login with no error message at all, and them redirect the user to /anything after logging in 4) providing the wrong credentials should pop up an error message for an authenticated user: 5) example.com should redirect to example.com/foo/index 6) trying to access a resource denied to this user should get him the authError (but no login form, clear now burzum?) So far I have 1, 3, 4, 5 and 6 working fine. But I couldn't think of a way to implement (2) without breaking one of the others. Currently root (/) routes to /foo/index and I would prefer to keep it this way. Routing / to /users/login would bring (2) but break (5). Routing / to /users/login *and* finding a way to redirect the path to /foo/index inside the users controller sounds an ugly hack that i would like to avoid. Any more ideas left ? Thank you. --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: media view and files on the fly
I had to do this with pdf/xls files returned by a webservice. I took the default media view (/cake/libs/views/media.php) and copied it to / app/views/app_media.php. Then I modified it so that it checked for a $content view var and wrote that to a tmpfile. Here's the diff: http://bin.cakephp.org/view/1310700342 -Matt http://www.pseudocoder.com On Mar 30, 1:05 pm, Mark (Germany) dereurom...@googlemail.com wrote: i tried to use the media view for files generated on the fly (some exported text inside a export.txt or whatever) but it seems like the media view can only handle downloads of existing files on the server trying to rewrite it did not turn out very well so, did anyone manage to create a txt file to download, that is filled with the echoed content echo 'blabla' or $content = 'blabla' transfered to the media view without creating locale (temp.) files on the server? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Does anybody know how can I limit the join table fields when I user joins condition?
For example: One task has many users. $condition = array(); $condition['joins'] = array( array( 'table' = 'users', 'alias' = 'User', 'type' = 'inner', 'foreignKey' = 'user_id', 'conditions'= array('User.id = Task.user_id','User.deleted=0') )); I just want to find the user name , not all the fields in User table. I try to add the 'fields' property in this array, but it seems not. -- Thanks Joshua --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Does anybody know how can I limit the join table fields when I user joins condition?
Use the 'fields' options for your field and add 'User.name' in it maybe ? hth On Mar 31, 3:28 pm, joshua josh...@gmail.com wrote: For example: One task has many users. $condition = array(); $condition['joins'] = array( array( 'table' = 'users', 'alias' = 'User', 'type' = 'inner', 'foreignKey' = 'user_id', 'conditions'= array('User.id = Task.user_id','User.deleted=0') )); I just want to find the user name , not all the fields in User table. I try to add the 'fields' property in this array, but it seems not. -- Thanks Joshua --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
turning on/off query that shows at the end of each page?
Hello I am learning cake.Can anyone help me how to turn on/off the query that shows at the end of each page? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Why is it so hard to find answers on cakephp trouble?
I think the documentation in the most part is OK, but in some areas it lacks complete explanation. For me an example of this is the ACL documentation, it actually starts off really well and explains in enough detail, what ACL is all about ACOS/AROS, how to get it set up, implement it into your models etc etc. But it does not spend enough time explaining the best practices when it comes to actually blocking people from getting to certain areas. It caused me a lot of confusion because I ended up Googling for an answer, and everywhere had differing ways of implementing it. That has been my biggest gripe with the documentation so far. One thing I would like to see, similar to the php documentation, is where users can post examples of using the code in comments. Just my 2 cents --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
how to use other SQL expressions like where field_name in(x,y,z)
Thanks in advance for any help provided. Apologies for no code blocks. I want to write my find such that it can construct a query like: SELECT `ReviewerActivityStatus`.`id`, `ReviewerActivityStatus`.`reviewer_id`, `ReviewerActivityStatus`.`date`, `ReviewerActivityStatus`.`status`, `ReviewerActivityStatus`.`comment`, `Reviewer`.`id`, `Reviewer`.`briefing_id` FROM `reviewer_activity_statuses` AS `ReviewerActivityStatus` LEFT JOIN `reviewers` AS `Reviewer` ON (`ReviewerActivityStatus`.`reviewer_id` = `Reviewer`.`id`) WHERE `reviewer_id` in (6,8) AND `status` = 1 Notice no single quotes in the parenthesis of the in clause... But when I do: $result = $this-ReviewerActivityStatus-find('all',array ('conditions'=array('reviewer_id IN (?)'=$keys,'status'='1'))); it constructs the following: SELECT `ReviewerActivityStatus`.`id`, `ReviewerActivityStatus`.`reviewer_id`, `ReviewerActivityStatus`.`date`, `ReviewerActivityStatus`.`status`, `ReviewerActivityStatus`.`comment`, `Reviewer`.`id`, `Reviewer`.`briefing_id` FROM `reviewer_activity_statuses` AS `ReviewerActivityStatus` LEFT JOIN `reviewers` AS `Reviewer` ON (`ReviewerActivityStatus`.`reviewer_id` = `Reviewer`.`id`) WHERE `reviewer_id` in ('6,8') AND `status` = 1 Notice the single quotes in the parenthesis of the in clause around the value for $key which is just a string. My whole code looks like: function checkApprovalStatus($reviewerid = null) { echo(!--); //we can find out the briefing ID from the reviewer table, check it first $result = $this-Reviewers-find('all',array('conditions'=array ('id'=$reviewerid))); //find the other reviewers with the same briefing id $briefing_id = $result[0]['Reviewers']['briefing_id']; $result = $this-Reviewers-find('all',array('conditions'=array ('briefing_id'=$briefing_id),'order'='id ASC')); $reviwercount = count($result); $keys = ; foreach($result as $reviewers) { $keys .= $reviewers['Reviewers']['id']., ; } $keys = substr_replace($keys,,-2); //now let's find these reviewers and if they have a record with a status value of 1 $result = $this-ReviewerActivityStatus-find('all',array ('conditions'=array('reviewer_id IN (?)'=$keys,'status'='1'))); $approvalcount = count($result); //if there were as many approvals as reviewers, update the briefing status field echo(reviwer and approval counts: $reviwercount == $approvalcount\r \n); if($reviwercount == $approvalcount) { echo('updating the briefing'); //find the briefing record $data = $this-Briefing-find('all',array('conditions'=array('id'= $briefing_id))); var_dump($data); //TODO: modify the resulting array and save it. } echo(--); } Again thanks for any replies! --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
safe_mode install impossible
I've installed cake_1.2.2.8120 on my server and am happily developing with it. It's really is very neat. However, can an install be done using the advanced pattern i.e. the cake lib folder resides outside the root in a common area for any web user on a shared server to use? I tried but could not get it to work. The files are in /usr/local/cake_1.2.2.8120/cake. With safe_mode off and the correct entry in include_path and open_basedir install is a snap. With safe_mode on it does not matter what I try and use (safe_mode_include_dir included) I cannot access the shared lib in /usr/local/cake_1.2.2.8120/cake without setting a recursive chmod to the user AND group of a particular web site. So if each site has it's own user for it's own web folder and root e.g. web1, web2, web3 and they all belong to the group web_user then to use cake's shared library for web2 it will only work with safe_mode on if I set chmod -R web1:web_user /usr/local/cake_1.2.2.8120 But of course web2, and web3 etc are out of luck. I have tried each combination I can think of. Is there a template to get this done or something obvious I am missing? Or perhaps you just cannot use CakePHP effectively with safe_mode on? Al --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Multiple hasMany relationships to one model?
Hi All, How can I PROPERLY set up my database so that several models have multiple images? Each image belongs to a particular model, so they are definitely hasMany relationships. Example: Episode -id -name -date Movie -id -name -date -producer Image -id -name -caption -path Episode hasMany Image Movie hasMany Image Does the paradigm of adding a foreign key to the Image table still apply if I have multiple hasMany relationships? That is, would I add multiple foreign keys to the table as follows?: Image -id -movie_id -episode_id -name -caption -path Thanks --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
DebugKit's toolbar not working
I installed debug_kit version 1.0 into app\plugins\debug_kit, my debug level is set to 2, and I have put: var $components = array('DebugKit.Toolbar'); In the relevant controller. However DebugKit is displaying all its output at the bottom of the page between my content, and the SQL output. I don't have scaffolding, so it can't be that, I have even updated to the head revision from thechaw. Which made no difference. This might make me sound stupid but I am out of ideas, I know this primarily works through jquery, so does jquery to to be in my app \webroot\js directory? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: New Install - Where is the Dispatch
The set-up I had was to have the shared cake libraries in /usr/local/cake_1.2.2.8120 I had my app folder in /var/www/vhosts/mydomain.com/app and my webroot in /var/www/vhosts/mydomain.com/httpdocs The user was mydomain:psacln I found the `problem` was with the chmod permission in /usr/local/ cake_1.2.2.8120. If I ran chmod -R mydomain:psacln /usr/local/cake_1.2.2.8120 The problem went away, or I found I could also just turn off safe_mode. However, what I want is to have safe_mode on and allow every site on my server to have access to the shared cake lib. I cannot find the correct combination of permissions to do that. I've used ZEND and a few other frameworks without trouble just by adding the shared paths to safe_mode_include_dir but CakePHP just doesn't like that. Help? On Mar 28, 2:07 pm, almasty m...@shanemcgovern.com wrote: Hi I'm getting this error Fatal error: Class 'Dispatcher' not found in /var/www/vhosts/ shakethembones.com/httpdocs/index.php on line 87 I've done a search on google and can find a couple of post about getting this error but no solutions I have just installed I've used the instructions here http://book.cakephp.org/view/308/Installing-CakePHPunder `Advanced Setup: Alternative Installation Options`. I have the tmp dir with 777, and my include paths, openbase dir etc in a vhost file contain the cake lib, app and webroot just to take them off the radar in terms of permissions. Line 87 is a call to the Dispatcher class, which I guess is not included as expected. Can anyone point me in the right direction for an answer? Al --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: DebugKit's toolbar not working
Try clearing the browsers cache - I think I to had this issue, just would show top right after clearing cache of ff it started. My projects all have jquery in them, but I believe that debugkit has contains everything it requires (loading jquery via google api - not conclusive on that I expect I'll be corrected soon) But unles it was mere conincidence clear your browsers cache - S 2009/3/31 Steven steven.beech...@gmail.com I installed debug_kit version 1.0 into app\plugins\debug_kit, my debug level is set to 2, and I have put: var $components = array('DebugKit.Toolbar'); In the relevant controller. However DebugKit is displaying all its output at the bottom of the page between my content, and the SQL output. I don't have scaffolding, so it can't be that, I have even updated to the head revision from thechaw. Which made no difference. This might make me sound stupid but I am out of ideas, I know this primarily works through jquery, so does jquery to to be in my app \webroot\js directory? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Is there an offline documentation for CakePHP?
Hello everybody, my company will forbid access to the internet within the next days, even for the IT department. To be able to develop with CakePHP in the future I would like to know if there is an offline documentation for CakePHP 1.2 ( manual and/or API). Any hints to counter this madness are deeply appreciated. Anja --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Is there an offline documentation for CakePHP?
You may want to save this link to your harddisk http://book.cakephp.org/complete/3 Best Regards, Dinh Ba Thanh, Jason bath...@gmail.com On Mar 31, 2009, at 10:24 PM, Liebermann, Anja Carolin wrote: Hello everybody, my company will forbid access to the internet within the next days, even for the IT department. To be able to develop with CakePHP in the future I would like to know if there is an offline documentation for CakePHP 1.2 ( manual and/or API). Any hints to counter this madness are deeply appreciated. Anja --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: how to use other SQL expressions like where field_name in(x,y,z)
I believe the syntax should be: $result = $this-ReviewerActivityStatus-find( 'all', array( 'conditions'=array( 'reviewer_id = $keys, 'status'='1' ) ) ); where $keys is an array. On Tue, Mar 31, 2009 at 7:46 AM, rwolverine bwri...@abcgrp.com wrote: Thanks in advance for any help provided. Apologies for no code blocks. I want to write my find such that it can construct a query like: SELECT `ReviewerActivityStatus`.`id`, `ReviewerActivityStatus`.`reviewer_id`, `ReviewerActivityStatus`.`date`, `ReviewerActivityStatus`.`status`, `ReviewerActivityStatus`.`comment`, `Reviewer`.`id`, `Reviewer`.`briefing_id` FROM `reviewer_activity_statuses` AS `ReviewerActivityStatus` LEFT JOIN `reviewers` AS `Reviewer` ON (`ReviewerActivityStatus`.`reviewer_id` = `Reviewer`.`id`) WHERE `reviewer_id` in (6,8) AND `status` = 1 Notice no single quotes in the parenthesis of the in clause... But when I do: $result = $this-ReviewerActivityStatus-find('all',array ('conditions'=array('reviewer_id IN (?)'=$keys,'status'='1'))); it constructs the following: SELECT `ReviewerActivityStatus`.`id`, `ReviewerActivityStatus`.`reviewer_id`, `ReviewerActivityStatus`.`date`, `ReviewerActivityStatus`.`status`, `ReviewerActivityStatus`.`comment`, `Reviewer`.`id`, `Reviewer`.`briefing_id` FROM `reviewer_activity_statuses` AS `ReviewerActivityStatus` LEFT JOIN `reviewers` AS `Reviewer` ON (`ReviewerActivityStatus`.`reviewer_id` = `Reviewer`.`id`) WHERE `reviewer_id` in ('6,8') AND `status` = 1 Notice the single quotes in the parenthesis of the in clause around the value for $key which is just a string. My whole code looks like: function checkApprovalStatus($reviewerid = null) { echo(!--); //we can find out the briefing ID from the reviewer table, check it first $result = $this-Reviewers-find('all',array('conditions'=array ('id'=$reviewerid))); //find the other reviewers with the same briefing id $briefing_id = $result[0]['Reviewers']['briefing_id']; $result = $this-Reviewers-find('all',array('conditions'=array ('briefing_id'=$briefing_id),'order'='id ASC')); $reviwercount = count($result); $keys = ; foreach($result as $reviewers) { $keys .= $reviewers['Reviewers']['id']., ; } $keys = substr_replace($keys,,-2); //now let's find these reviewers and if they have a record with a status value of 1 $result = $this-ReviewerActivityStatus-find('all',array ('conditions'=array('reviewer_id IN (?)'=$keys,'status'='1'))); $approvalcount = count($result); //if there were as many approvals as reviewers, update the briefing status field echo(reviwer and approval counts: $reviwercount == $approvalcount\r \n); if($reviwercount == $approvalcount) { echo('updating the briefing'); //find the briefing record $data = $this-Briefing-find('all',array('conditions'=array('id'= $briefing_id))); var_dump($data); //TODO: modify the resulting array and save it. } echo(--); } Again thanks for any replies! --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Multiple hasMany relationships to one model?
You have a couple options here. What's proper is really what works best in your situation, so do some testing to see how the queries perform. I had a similar situation so I'll explain what I did. Video - id Episode - video_id - name - date Movie - video_id - name - date - producer Image - id - name - caption - path - video_id Video hasMany Episode Video hasMany Movie Episode hasMany Image Movie hasMany Image In this design Video is the parent of Episode and Movie and generates unique ids for them. These ids can then be added to any tables associated to Episode or Movie. On top of that you can setup foreign keys in MySQL so that when you delete a Video to cascades and deletes all related data. On Mar 31, 1:09 am, Adam M adam.mcnam...@gmail.com wrote: Hi All, How can I PROPERLY set up my database so that several models have multiple images? Each image belongs to a particular model, so they are definitely hasMany relationships. Example: Episode -id -name -date Movie -id -name -date -producer Image -id -name -caption -path Episode hasMany Image Movie hasMany Image Does the paradigm of adding a foreign key to the Image table still apply if I have multiple hasMany relationships? That is, would I add multiple foreign keys to the table as follows?: Image -id -movie_id -episode_id -name -caption -path Thanks --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Is there an offline documentation for CakePHP?
I cannot imagine trying to develop web apps without an internet connection. There is just so much more than the Cake manual that's required. I can deal with a brief outage, but there's no way I could get much done without a connection *ever*. btw, how is the IT dept. supposed to install updates, etc? Or even know about them? On Tue, Mar 31, 2009 at 10:24 AM, Liebermann, Anja Carolin anja.lieberm...@alltours.de wrote: Hello everybody, my company will forbid access to the internet within the next days, even for the IT department. To be able to develop with CakePHP in the future I would like to know if there is an offline documentation for CakePHP 1.2 ( manual and/or API). Any hints to counter this madness are deeply appreciated. Anja --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Multiple hasMany relationships to one model?
I'd go HABTM for this, I think. movies videos images images_movies images_videos On Tue, Mar 31, 2009 at 2:09 AM, Adam M adam.mcnam...@gmail.com wrote: Hi All, How can I PROPERLY set up my database so that several models have multiple images? Each image belongs to a particular model, so they are definitely hasMany relationships. Example: Episode -id -name -date Movie -id -name -date -producer Image -id -name -caption -path Episode hasMany Image Movie hasMany Image Does the paradigm of adding a foreign key to the Image table still apply if I have multiple hasMany relationships? That is, would I add multiple foreign keys to the table as follows?: Image -id -movie_id -episode_id -name -caption -path Thanks --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
AW: Is there an offline documentation for CakePHP?
Hi Brian, I cannot imagine it either. I just hope to survive until enough things go wrong and it is switched on again. Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] Im Auftrag von brian Gesendet: Dienstag, 31. März 2009 16:35 An: cake-php@googlegroups.com Betreff: Re: Is there an offline documentation for CakePHP? I cannot imagine trying to develop web apps without an internet connection. There is just so much more than the Cake manual that's required. I can deal with a brief outage, but there's no way I could get much done without a connection *ever*. btw, how is the IT dept. supposed to install updates, etc? Or even know about them? On Tue, Mar 31, 2009 at 10:24 AM, Liebermann, Anja Carolin anja.lieberm...@alltours.de wrote: Hello everybody, my company will forbid access to the internet within the next days, even for the IT department. To be able to develop with CakePHP in the future I would like to know if there is an offline documentation for CakePHP 1.2 ( manual and/or API). Any hints to counter this madness are deeply appreciated. Anja --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
AW: Is there an offline documentation for CakePHP?
Thank you very much, that looks good! Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] Im Auftrag von Dinh Ba Thanh Gesendet: Dienstag, 31. März 2009 16:26 An: cake-php@googlegroups.com Betreff: Re: Is there an offline documentation for CakePHP? You may want to save this link to your harddisk http://book.cakephp.org/complete/3 Best Regards, Dinh Ba Thanh, Jason bath...@gmail.com On Mar 31, 2009, at 10:24 PM, Liebermann, Anja Carolin wrote: Hello everybody, my company will forbid access to the internet within the next days, even for the IT department. To be able to develop with CakePHP in the future I would like to know if there is an offline documentation for CakePHP 1.2 ( manual and/or API). Any hints to counter this madness are deeply appreciated. Anja --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Why is it so hard to find answers on cakephp trouble?
On Tue, Mar 31, 2009 at 8:34 AM, Steven steven.beech...@gmail.com wrote: I think the documentation in the most part is OK, but in some areas it lacks complete explanation. For me an example of this is the ACL documentation, it actually starts off really well and explains in enough detail, what ACL is all about ACOS/AROS, how to get it set up, implement it into your models etc etc. But it does not spend enough time explaining the best practices when it comes to actually blocking people from getting to certain areas. This is precisely the situation I'm in right now. While the setup has been a real bear to figure out, I think I'm on the right track now. But I'm still having some difficulty figuring out how to *use* ACL. It caused me a lot of confusion because I ended up Googling for an answer, and everywhere had differing ways of implementing it. Ditto, again. I've seen a lot of implementations but much of it seems incompatible. I think. I'm thankful that so many people took the time to post their code/instructions, though. That has been my biggest gripe with the documentation so far. One thing I would like to see, similar to the php documentation, is where users can post examples of using the code in comments. I'll second that, too. --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Is there an offline documentation for CakePHP?
Wir begrüßen Sie zurück, wenn wir von Ihnen noch einmal. (I hope that's correct--been a long time since I spoke any German) On Tue, Mar 31, 2009 at 10:40 AM, Liebermann, Anja Carolin anja.lieberm...@alltours.de wrote: Hi Brian, I cannot imagine it either. I just hope to survive until enough things go wrong and it is switched on again. Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] Im Auftrag von brian Gesendet: Dienstag, 31. März 2009 16:35 An: cake-php@googlegroups.com Betreff: Re: Is there an offline documentation for CakePHP? I cannot imagine trying to develop web apps without an internet connection. There is just so much more than the Cake manual that's required. I can deal with a brief outage, but there's no way I could get much done without a connection *ever*. btw, how is the IT dept. supposed to install updates, etc? Or even know about them? On Tue, Mar 31, 2009 at 10:24 AM, Liebermann, Anja Carolin anja.lieberm...@alltours.de wrote: Hello everybody, my company will forbid access to the internet within the next days, even for the IT department. To be able to develop with CakePHP in the future I would like to know if there is an offline documentation for CakePHP 1.2 ( manual and/or API). Any hints to counter this madness are deeply appreciated. Anja --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: turning on/off query that shows at the end of each page?
If you set debug to 0 it will not be displayed. Look in app/config/core.php You can also remove the echo $cakeDebug; from your layout but I wouldn't recommend that. On Tue, Mar 31, 2009 at 8:11 AM, Sajid.bd sajid0405...@gmail.com wrote: Hello I am learning cake.Can anyone help me how to turn on/off the query that shows at the end of each page? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: turning on/off query that shows at the end of each page?
On Mar 31, 8:11 am, Sajid.bd sajid0405...@gmail.com wrote: Hello I am learning cake.Can anyone help me how to turn on/off the query that shows at the end of each page? In your app\config\core.php, set the 'debug' configuration setting to 0 or 1. --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
skype links with html helper
Hi, Does anyone know, if it is possible to generate a link like: skype:username?call with the html-link() method? I tried this: $html-link('username','skype:username?call); output is: http://www.mydomain.com/skype:username?call Any ideas? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: skype links with html helper
I think that using the html helper is unnecessary it is more complicated than simply echo 'a href=skype:' . $username . '?call' . $username . '/a'; - S 2009/3/31 donnerbeil donnerb...@googlemail.com Hi, Does anyone know, if it is possible to generate a link like: skype:username?call with the html-link() method? I tried this: $html-link('username','skype:username?call); output is: http://www.mydomain.com/skype:username?call Any ideas? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Router pass email
Hi. I've got a problem with Route passing parameters to action. routes.php: Router::connect('/newsletter/unsubscribe/:email', array('controller' = 'newsletterReceivers', 'action' = 'unsubscribe'), array('pass' = array('email'))); NewsletterReceiversController: function unsubscribe($email = null) { $email = $this-NewsletterReceiver-findByEmail($email); if ($this-NewsletterReceiver-del($email)) { $this-flash(__('Entry deleted', true), '/', 3); } else { $this-flash(__('Invalid Entry', true), '/', 3); } } Request URL: http://website.local/newsletter/unsubscribe/t...@web.de $email, which is passed as an URL Parameter is t...@web and not t...@web.de Can anyone tell me why it is cutted before the dot? Best --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
auto submit sitemap to Google
Hi, I am working on a site for a client using cakePHP. I found a great article in the bakery that outputs the sitemap in the correct XML format and is accessible via the browser. I want to automate the submission of this using a cron job. Does anyone have an example script that would call the xml file and send it to the http address that Google provides specifically for this? Thanks in advance. --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Search by Selects
Can someone point me in the direction of a good place to start building a Search Function? I have a HABTM table with options related to the User that they can select only (not allowed to add or edit), now I want to be able to have Users search using the checkboxes? In the table is Hip Hop, Country, Classical, Rock, Indie, Pop, so on Now I would like people to be able to search based on those options using checkbox Any ideas where to start would be very helpful as I have not found anything thru my own searching. Thanks, Dave --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
form select/javascript
Hi, I'm quite new to CakePHP and need to have a SELECT with options for each year from 1983 to the current year. I can certainly write the javascript to do the loop from 1983 to current year, but what's the best way to call that javascript to populate the SELECT? I just need the general mechanism. Thanks --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP on Hiawatha web server
Did you uncomment App.baseUrl in core.php? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: DebugKit's toolbar not working
If clearing your cache does not help, your CSS may be interfering with DebugKit's own CSS. On Mar 31, 10:23 am, Sam Sherlock sam.sherl...@gmail.com wrote: Try clearing the browsers cache - I think I to had this issue, just would show top right after clearing cache of ff it started. My projects all have jquery in them, but I believe that debugkit has contains everything it requires (loading jquery via google api - not conclusive on that I expect I'll be corrected soon) But unles it was mere conincidence clear your browsers cache - S 2009/3/31 Steven steven.beech...@gmail.com I installed debug_kit version 1.0 into app\plugins\debug_kit, my debug level is set to 2, and I have put: var $components = array('DebugKit.Toolbar'); In the relevant controller. However DebugKit is displaying all its output at the bottom of the page between my content, and the SQL output. I don't have scaffolding, so it can't be that, I have even updated to the head revision from thechaw. Which made no difference. This might make me sound stupid but I am out of ideas, I know this primarily works through jquery, so does jquery to to be in my app \webroot\js directory?- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: auto submit sitemap to Google
I'm not 100% sure of that but if your robots.txt have the following line : Sitemap: sitemap_location search engines will crawl your sitemap automatically. On 31 mar, 17:54, koala kid alexhob...@gmail.com wrote: Hi, I am working on a site for a client using cakePHP. I found a great article in the bakery that outputs the sitemap in the correct XML format and is accessible via the browser. I want to automate the submission of this using a cron job. Does anyone have an example script that would call the xml file and send it to the http address that Google provides specifically for this? Thanks in advance. --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: form select/javascript
echo $form-dateTime( 'fieldname', 'DMY', 'NONE', null, array( 'minYear' = 1983, 'maxYear' = date('Y') ), false ) On 31 mar, 18:00, kurious oranj tim.alm...@gmail.com wrote: Hi, I'm quite new to CakePHP and need to have a SELECT with options for each year from 1983 to the current year. I can certainly write the javascript to do the loop from 1983 to current year, but what's the best way to call that javascript to populate the SELECT? I just need the general mechanism. Thanks --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Save null or empty datetime fields
I ran into the same problem. I've been told this is a PHP problem, not really a Cake problem. The way we ended up handling it is by creating a stored procedure and calling that procedure within our model. Basically, what the procedure does is take the data and makes sure that all -00-00 fields are set to null. On Mar 18, 3:00 pm, edwingt edwin.al...@gmail.com wrote: Hello, I want to save an empty date field, but I cant. There are some options to tell the date field that can be null? I already check that no rule is defined in the model, for the date field and the database date field accepts nulls. Any advice? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to silently redirects to login page ?
I woud set $this-Auth-loginRedirect to false and check in the login () action if the user is logged or not. This way you can check a lot more things (user role, etc.) and redirect the logged user wherever you want. Oh, and one more thing, disable the browser cache for the login form... On Mar 31, 3:41 pm, John Andersen j.andersen...@gmail.com wrote: In your case I would change your route / as I specified earlier and in the app_controller-beforeFilter function, add: $this-Auth-loginRedirect = array('controller' = 'foo', 'action' = 'index'); Thus when a user provides a valid login, the user is automatically directed to /foo/index Enjoy, John On Mar 31, 3:13 pm, iFeghali igor.fegh...@gmail.com wrote: Hello All, Many thanks for the help so far. Let's try to be a bit more clear... that's my scenario: 1) only authenticated users have access to the site (but the login form, of course) for a visitor (non auth user): 2) example.com should redirect to example.com/users/login with no error message at all 3) example.com/anything should redirect to example.com/users/login with no error message at all, and them redirect the user to /anything after logging in 4) providing the wrong credentials should pop up an error message for an authenticated user: 5) example.com should redirect to example.com/foo/index 6) trying to access a resource denied to this user should get him the authError (but no login form, clear now burzum?) So far I have 1, 3, 4, 5 and 6 working fine. But I couldn't think of a way to implement (2) without breaking one of the others. Currently root (/) routes to /foo/index and I would prefer to keep it this way. Routing / to /users/login would bring (2) but break (5). Routing / to /users/login *and* finding a way to redirect the path to /foo/index inside the users controller sounds an ugly hack that i would like to avoid. Any more ideas left ? Thank you.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: simple cms w/ auth :: username password only to admin console page
Ok, I will give it a try with understanding what you are trying to accomplish! Correct me if my understand is wrong, but: 1) You have a standard CakePHP installation with the CakePHP directory and an application app directory, correct? 2) You wish to use the application to provide content management of the content in the application, correct? 3) You wish that each user of your application will have access only to his/her own content in the application, correct? With that I understand that you would like something like: App --- Controller -- a contents controller --- Models -- a content model -- a user model --- Views -- Contents - Content views -- etc. Thus when a user has logged in, and has chosen the CMS (contents), the contents controller gives him/her access to manage the content - modelled by the content model. Awaiting some comments from you, enjoy, John On Mar 27, 9:02 am, programguru ja...@w3developing.com wrote: Hello, I've been hacking at this for several days, and have modified and toyed with about 7 different tutorials with Auth, only to find none of them provide the actual answer I am looking for - or maybe I don't know what the correct answer is. Anyhow. All I have been trying to do is create: 1) A view that is user/pass protected which allows control of content for the site. I was able to get several login systems working with Auth, but not able to edit any content because the permissions are outside of the login scope or something of that nature. I am certainly missing a link somewhere in all of this. 2) All controllers should be accessible from this view so the content can be modified. I cannot figure out how (although I have done this a million times with straight php/mysql) how to make this work with CakePHP. The problem I keep running into is the /users dir only allows access to that dir, but I cannot create a sub directory in there for example called: CMS, because then the controller classes cannot be accessed by the default core. Anyhow, Id be glad to hear any insight in how to get a stupid simple CMS page setup with access to all of the sites editable content. I don't need anyone to explain how to build a db, a controller, a model, or Bake... That's not what I am asking. Just a bit lost and need some direction. Thanks. -- View this message in context:http://n2.nabble.com/simple-cms-w--auth-%3A%3A-username---password-on... Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: DebugKit's toolbar not working
DebugKit does not use any jQuery. If you are not getting the toolbar to display, you should check the following. 1. Your HTML output, is the toolbar source there. 2. Your Html output, is the CSS/JS for the toolbar there? 3. If you set $this-view in action or beforeRender you will not see the toolbar. Other than that if you have a reproducible ( as in I can get it to happen for me) issue please file a ticket and I'll be happy to fix it :) -Mark On Mar 31, 8:18 am, Steven steven.beech...@gmail.com wrote: I installed debug_kit version 1.0 into app\plugins\debug_kit, my debug level is set to 2, and I have put: var $components = array('DebugKit.Toolbar'); In the relevant controller. However DebugKit is displaying all its output at the bottom of the page between my content, and the SQL output. I don't have scaffolding, so it can't be that, I have even updated to the head revision from thechaw. Which made no difference. This might make me sound stupid but I am out of ideas, I know this primarily works through jquery, so does jquery to to be in my app \webroot\js directory? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to silently redirects to login page ?
Yes, Logout, but first I would like the original poster to make it work as wished for, then any further checking can be implemented on a need basis. Enjoy, John On Mar 31, 8:05 pm, logout stefano...@gmail.com wrote: I woud set $this-Auth-loginRedirect to false and check in the login () action if the user is logged or not. This way you can check a lot more things (user role, etc.) and redirect the logged user wherever you want. Oh, and one more thing, disable the browser cache for the login form... [snip] --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Router pass email
Hi again. In my routes.php I also got: Router::parseExtensions('rss'); This entry is necessary for creating a RSS feed with the RssHelper. When the Router::parseExtensions('rss'); comes before Router::connect ('/newsletter/unsubscribe/:email', array('controller' = 'newsletterReceivers', 'action' = 'unsubscribe'), array('pass' = array('email'))); the email parameter is passed correctly. Can anyone explain this? Best --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: variable from one action view to another
Use urlencode for the name before placing it in the url and then urldecode it when processing the reply! Enjoy, John On Mar 25, 3:33 am, kai k3ho...@gmail.com wrote: 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 the name in the url but some names use symbols that won't work, does anyone have any suggestions? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Multiple hasMany relationships to one model?
Brian - that'd be a good option if an image can belong to many movies and many episodes. Adam - is that the case? Or can an image only belong to either 1 movie or 1 episode? From the description you put up it sounds like hasMany is the right association, it's just making a good db design underneath it. On Mar 31, 9:39 am, brian bally.z...@gmail.com wrote: I'd go HABTM for this, I think. movies videos images images_movies images_videos On Tue, Mar 31, 2009 at 2:09 AM, Adam M adam.mcnam...@gmail.com wrote: Hi All, How can I PROPERLY set up my database so that several models have multiple images? Each image belongs to a particular model, so they are definitely hasMany relationships. Example: Episode -id -name -date Movie -id -name -date -producer Image -id -name -caption -path Episode hasMany Image Movie hasMany Image Does the paradigm of adding a foreign key to the Image table still apply if I have multiple hasMany relationships? That is, would I add multiple foreign keys to the table as follows?: Image -id -movie_id -episode_id -name -caption -path Thanks --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Double left join?
Take a look at the Containable behavior. You should able to something as simple as: http://book.cakephp.org/view/474/Containable $this-Model-contain('Company', 'Category'); --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Does anybody know how can I limit the join table fields when I user joins condition?
I highly recommend checking out the Containable behavior: http://book.cakephp.org/view/474/Containable It will simplify this code and let you easily add fields. On Mar 31, 8:28 am, joshua josh...@gmail.com wrote: For example: One task has many users. $condition = array(); $condition['joins'] = array( array( 'table' = 'users', 'alias' = 'User', 'type' = 'inner', 'foreignKey' = 'user_id', 'conditions'= array('User.id = Task.user_id','User.deleted=0') )); I just want to find the user name , not all the fields in User table. I try to add the 'fields' property in this array, but it seems not. -- Thanks Joshua --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: looking for a method to record 'page views'
Have you considered using an existing solution with metrics and reporting surrounding it? You can give read only access to clients as well. http://edwardawebb.com/programming/php-programming/cakephp/piwik-analyze-visits-cakephp-site On Mar 30, 1:39 pm, JamesF usaexportexpe...@gmail.com wrote: i did see that article but i think im goign to go with a different approach... i'm making a table called visits with four fields id -auto increment listing_id -related listing id timestamp -now() ip_address -users ip basically whenever a listing is view i will execute an insert on the database logging the information. when i display the stats i will run queries off the table. i have a feeling this isn't going to be very MVC compliant but bottom line is i need to get it working. i have a few concerns about database performance but i think it will be better to do it this way than a log file/cron job method. On Mar 30, 12:21 pm, brian bally.z...@gmail.com wrote: Have a look at this HitCountBehaviorhttp://dsi.vozibrale.com/articles/view/simple-hitcount-behavior-for-c... I haven't used this, though it's been on my list of things to investigate. On Mon, Mar 30, 2009 at 11:14 AM, JamesF usaexportexpe...@gmail.com wrote: Hi all, I am looking for a simple way of keeping track of page views. The application is a rental properties website and I would like advertisers who list their properties to know how many times they have been viewed. Anyone have a tried and true method for this ? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: looking for a method to record 'page views'
Another thing to consider (especially if it's a busy site) is to not track the views in real time. Instead scan your webserver logs hourly/ daily and update the counts that way. This allows you to cache the pages and still keep track of visits. -Matt http://www.pseudocoder.com On Mar 30, 11:14 am, JamesF usaexportexpe...@gmail.com wrote: Hi all, I am looking for a simple way of keeping track of page views. The application is a rental properties website and I would like advertisers who list their properties to know how many times they have been viewed. Anyone have a tried and true method for this ? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Setting Layout for Scaffolding?
Thanks Amit but unfortunately that walkthrough helps for modifying the HTML that the scaffolding functionality uses -- but it does not address the layout. The layout remains default. I also tried setting [ $this-layout = ] in those view / .ctp files and no change. I also tried [ $this-layout = ] in _beforeScaffold() -- no change. What I find bizarre is that it seems that not many others need this functionality? public frontend = layout1 private backend = layout2 Does everyone use the same layout for the scaffolding? On Mar 30, 6:11 pm, Amit a...@amitvaria.com wrote: Here's a good walkthrough:http://teknoid.wordpress.com/2009/01/31/take-control-over-your-bake-a... On Mar 30, 5:05 pm, Amit a...@amitvaria.com wrote: I think you're referring to cake/libs/views/scaffold/(add|edit| view.ctp). These will let you alter the way scaffolding looks On Mar 30, 2:42 am, bbf builtbyf...@gmail.com wrote: I've searched the groups and Google and can't find an answer for this. How do I set a different layout for the scaffolding? Thanks for your help! --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: form select/javascript
On Mar 31, 12:18 pm, Kalt pierre.fring...@gmail.com wrote: echo $form-dateTime( 'fieldname', 'DMY', 'NONE', null, array( 'minYear' = 1983, 'maxYear' = date('Y') ), false ) You can also do: echo $form-year('Model.fieldname', 1983, date(Y), null, array(), false); --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: media view and files on the fly
nice :) thx On 31 Mrz., 15:17, Matt Curry m...@mcurry.net wrote: I had to do this with pdf/xls files returned by a webservice. I took the default media view (/cake/libs/views/media.php) and copied it to / app/views/app_media.php. Then I modified it so that it checked for a $content view var and wrote that to a tmpfile. Here's the diff:http://bin.cakephp.org/view/1310700342 -Matthttp://www.pseudocoder.com On Mar 30, 1:05 pm, Mark (Germany) dereurom...@googlemail.com wrote: i tried to use the media view for files generated on the fly (some exported text inside a export.txt or whatever) but it seems like the media view can only handle downloads of existing files on the server trying to rewrite it did not turn out very well so, did anyone manage to create a txt file to download, that is filled with the echoed content echo 'blabla' or $content = 'blabla' transfered to the media view without creating locale (temp.) files on the server? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: DebugKit's toolbar not working
After reading your posts I could see that the css and toolbar were loading. I tried installing a it on a fresh cakephp app, to ensure it wasnt a CSS clash, and notices that cakephp had no styling... Then I realised that this issue boiled down to mod_rewrite not being on! Thanks for the replies, and thanks for an awesome plugin Mark. --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Why is validation called twice?
Thats my last resort type of deal. Just wondering why its called twice? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: media view and files on the fly
are you sure it is app_media.php then? i only got it to work by leaving it the same name media.php in /app/ views/ mark On 31 Mrz., 21:45, Mark (Germany) dereurom...@googlemail.com wrote: nice :) thx On 31 Mrz., 15:17, Matt Curry m...@mcurry.net wrote: I had to do this with pdf/xls files returned by a webservice. I took the default media view (/cake/libs/views/media.php) and copied it to / app/views/app_media.php. Then I modified it so that it checked for a $content view var and wrote that to a tmpfile. Here's the diff:http://bin.cakephp.org/view/1310700342 -Matthttp://www.pseudocoder.com On Mar 30, 1:05 pm, Mark (Germany) dereurom...@googlemail.com wrote: i tried to use the media view for files generated on thefly(some exported text inside a export.txt or whatever) but it seems like the media view can only handle downloads of existing files on the server trying to rewrite it did not turn out very well so, did anyone manage to create a txt file to download, that is filled with the echoed content echo 'blabla' or $content = 'blabla' transfered to the media view without creating locale (temp.) files on the server? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Why is validation called twice?
Well, you have too many 'recaptcha'-s: 'recaptcha' = array( 'recaptcha' = array( 'rule' = array('recaptcha'), 'message' = 'captchaFailed' ) ) Just try to name those differently and try again, for example: 'myrecaptcha' = array( 'recaptcha2' = array( 'rule' = array('recaptcha'), 'message' = 'captchaFailed' ) ) Hope this helps. On Mar 31, 11:43 pm, Miles J mileswjohn...@gmail.com wrote: Thats my last resort type of deal. Just wondering why its called twice? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Why is validation called twice?
Well thats not the problem, I simply had more rules and in the example I am only showing one. --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Why is validation called twice?
For now I had to manipulate the sessions to make sure the first value is used and not over written. /** * Validate recaptcha * @param array $data * @return boolean */ function recaptcha($data) { App::import('Vendor', 'recaptcha', array('file' = 'recaptcha.php')); App::import('Component', 'Session'); $Session = new SessionComponent(); $private = Configure::read('Settings.captcha_private'); $public = Configure::read('Settings.captcha_public'); $verify = recaptcha_check_answer($private, env('REMOTE_ADDR'), $this- data[$this-name]['recaptcha_challenge'], $this-data[$this-name] ['recaptcha']); if ($Session-read('Recaptcha.time') == time()) { $response = $Session-read('Recaptcha.response'); } else { $response = ($verify-is_valid) ? 'pass' : 'fail'; $Session-write('Recaptcha.response', $response); $Session-write('Recaptcha.time', time()); } return ($response == 'pass') ? true : false; } --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: auto submit sitemap to Google
Google provides for creating and sending them a sitemap: http://www.google.com/support/webmasters/bin/answer.py?answer=40318hl=en On Tue, Mar 31, 2009 at 12:13 PM, Kalt pierre.fring...@gmail.com wrote: I'm not 100% sure of that but if your robots.txt have the following line : Sitemap: sitemap_location search engines will crawl your sitemap automatically. On 31 mar, 17:54, koala kid alexhob...@gmail.com wrote: Hi, I am working on a site for a client using cakePHP. I found a great article in the bakery that outputs the sitemap in the correct XML format and is accessible via the browser. I want to automate the submission of this using a cron job. Does anyone have an example script that would call the xml file and send it to the http address that Google provides specifically for this? Thanks in advance. --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Router pass email
I guess the .de looks like an extension. Why it would strip it from your route is another question. You could avoid this altogether (depending on your situation) by POSTing the email address to your action. If this link is auto-generated and included in a newsletter email, I guess that'd be out of the question. Unless you provided a generic link and had the user submit their email from a form. On Tue, Mar 31, 2009 at 1:28 PM, hasentopf mathias.koell...@googlemail.com wrote: Hi again. In my routes.php I also got: Router::parseExtensions('rss'); This entry is necessary for creating a RSS feed with the RssHelper. When the Router::parseExtensions('rss'); comes before Router::connect ('/newsletter/unsubscribe/:email', array('controller' = 'newsletterReceivers', 'action' = 'unsubscribe'), array('pass' = array('email'))); the email parameter is passed correctly. Can anyone explain this? Best --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: form select/javascript
echo $form-input('Model.field', array('onclick'='someAction()', 'label'='', 'minYear' = '1910', 'maxYear' = '2010')); 2009/3/31 mscdex msc...@gmail.com On Mar 31, 12:18 pm, Kalt pierre.fring...@gmail.com wrote: echo $form-dateTime( 'fieldname', 'DMY', 'NONE', null, array( 'minYear' = 1983, 'maxYear' = date('Y') ), false ) You can also do: echo $form-year('Model.fieldname', 1983, date(Y), null, array(), false); -- Juan Carlos Michaca Lucero PAASEL Consultoría en Matemáticas Aplicadas Insurgentes Sur 1700 Despacho 102 Col. Florida C.P, 01030 Deleg. Alvaro Obregón, México D.F. Tel. + 52 (55) 5663 4175 http://www.paasel.com juan.mich...@paasel.com --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: form select/javascript
You can do this: echo $form-input('Model.year', array('onclick'='someAction();', 'label'='','style'=width: 60px, 'minYear' = '1983', 'maxYear' = date('Y'))); kurious oranj wrote: Hi, I'm quite new to CakePHP and need to have a SELECT with options for each year from 1983 to the current year. I can certainly write the javascript to do the loop from 1983 to current year, but what's the best way to call that javascript to populate the SELECT? I just need the general mechanism. Thanks -- View this message in context: http://www.nabble.com/form-select-javascript-tp22808833p22817340.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Notice (8): Undefined index: id?
It happens when Saving a Model! I've no beforeX-Filters, I also had debug($this-data) right before saving, but each Model (Accept the hasAndbelongToMany) have an id! thx Aurelius On 31 Mrz., 02:32, mscdex msc...@gmail.com wrote: On Mar 30, 6:11 pm, Marcelo Andrade mfandr...@gmail.com wrote: On Mon, Mar 30, 2009 at 6:44 PM, Aurelius aurel...@temporaryinbox.com wrote: What does that mean, and where is the problem? Notice (8): Undefined index: id [CORE/cake/libs/model/model.php, line 1281...on line 77 That's line 77: if ($this-User-save ( $this-data, true , array ( 'firstname', 'lastname', '' ))) { ... } What's wrong? It's hard to say. Maybe you're in an edit action and your $this-data doesn't contain the desired record id. Please, tell us more about your scenario. Best regards. -- MARCELO DE F. ANDRADE Belem, PA, Amazonia, Brazil Linux User #221105 http://mfandrade.wordpress.com Also, do you have any beforeValidate or beforeSave callbacks that are changing the data? Sounds like the data for your primary key for your User model is being unset somewhere possibly. --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
login problem
The problem is simply that I can't log in. I've done this before but I'm trying to build an ACL-controlled site and following along with the manual's example app. WHen I try loggin in I get You are not authorized to access that location. I suspect the problem might be with the redirect, and not my credentials, as I'm not seeing Auth's loginError. AppController: function beforeFilter() { $this-Auth-fields = array('username' = 'email', 'password' = 'password'); $this-Auth-userScope = array( 'User.enabled' = 1); $this-Auth-loginError = 'No matching user found.'; $this-Auth-loginAction = array('controller' = 'users', 'action' = 'login'); $this-Auth-loginRedirect = array('controller' = 'pages', 'action' = 'display', 'home'); $this-Auth-logoutRedirect = array('controller' = 'users', 'action' = 'login'); $this-Auth-authorize = 'actions'; $this-Auth-actionPath = 'ROOT/'; } UsersController: function beforeFilter() { parent::beforeFilter(); if ($this-action == 'login') $this-layout = 'login'; $this-Auth-allowedActions = array('reset_password'); } public function login() {} public function logout() { $this-Session-setFlash('Good-Bye'); $this-redirect($this-Auth-logout()); } As you can see, it's not much different than the manual. The beforeFilter layout switch is there because none of the pages for this site should be public (it's an extranet). The password is good, and my user is enabled. I have nothing in my acos table yet, so I think that shouldn't be the cause of this. AFAICT, if PagesController::display() is not in acos, there shouldn't be any problem. Correct me if I'm wrong, please. Can anyone see something missing? Or think of something else I can check? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: login problem
Sorry for the noise. It was indeed this line: $this-Auth-authorize = 'actions'; I thought that because there is no ACO for PagesController there wouldn't be a problem. In any case, this isn't what I want to do, after all. Back to the drawing board ... On Tue, Mar 31, 2009 at 10:14 PM, brian bally.z...@gmail.com wrote: The problem is simply that I can't log in. I've done this before but I'm trying to build an ACL-controlled site and following along with the manual's example app. WHen I try loggin in I get You are not authorized to access that location. I suspect the problem might be with the redirect, and not my credentials, as I'm not seeing Auth's loginError. AppController: function beforeFilter() { $this-Auth-fields = array('username' = 'email', 'password' = 'password'); $this-Auth-userScope = array( 'User.enabled' = 1); $this-Auth-loginError = 'No matching user found.'; $this-Auth-loginAction = array('controller' = 'users', 'action' = 'login'); $this-Auth-loginRedirect = array('controller' = 'pages', 'action' = 'display', 'home'); $this-Auth-logoutRedirect = array('controller' = 'users', 'action' = 'login'); $this-Auth-authorize = 'actions'; $this-Auth-actionPath = 'ROOT/'; } UsersController: function beforeFilter() { parent::beforeFilter(); if ($this-action == 'login') $this-layout = 'login'; $this-Auth-allowedActions = array('reset_password'); } public function login() {} public function logout() { $this-Session-setFlash('Good-Bye'); $this-redirect($this-Auth-logout()); } As you can see, it's not much different than the manual. The beforeFilter layout switch is there because none of the pages for this site should be public (it's an extranet). The password is good, and my user is enabled. I have nothing in my acos table yet, so I think that shouldn't be the cause of this. AFAICT, if PagesController::display() is not in acos, there shouldn't be any problem. Correct me if I'm wrong, please. Can anyone see something missing? Or think of something else I can check? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
HELP, Controller displaying multiple duplicate rows
Hello, I think there is a problem on my parameter on the controller. Because once my other tables has multiple entries, the data on the row is duplicated for my main controller. See my code and parameter and the SQL query cakephp produces. http://bin.cakephp.org/saved/5 The default for cakephp 1. *$this-set('pdffiles', $this-paginate());* 2. 3. ON (`Pdffile`.`statuses_id` = `Statuses`.`id`) LEFT JOINhttp://www.php.net/join`users` AS `User` 4. --- ON (`Pdffile`.`user_id` = `User`.`id`) LEFT JOINhttp://www.php.net/join`comments` AS `Comment` 5. ON (`Comment`.`pdffile_id` = `Pdffile`.`id`) LEFT JOINhttp://www.php.net/join`statuses` AS `Status` 6. *ON (`Status`.`pdffile_id` = `Pdffile`.`id`) WHERE 1 = 1 LIMIT 20* The modified, under controller 1. $this-Pdffile-recursive = 0; 2. *$parsedConditions['Pdffile.user_id'] = $this-Auth-User('id');* 3. $this-paginate['Pdffile'] = array http://www.php.net/array( 'conditions' = $parsedConditions, 'limit' = '50', 'order' = arrayhttp://www.php.net/array ('Pdffile.timestamp' = 'desc')); 4. $this-set('pdffiles', $this-paginate()); 5. 6. ON (`Pdffile`.`statuses_id` = `Statuses`.`id`) LEFT JOINhttp://www.php.net/join`users` AS `User` 7. --- ON (`Pdffile`.`user_id` = `User`.`id`) LEFT JOINhttp://www.php.net/join`comments` AS `Comment` 8. ON (`Comment`.`pdffile_id` = `Pdffile`.`id`) LEFT JOINhttp://www.php.net/join`statuses` AS `Status` 9. ON (`Status`.`pdffile_id` = `Pdffile`.`id`) WHERE `Pdffile`.`user_id` = 17 10. ORDER BY `Pdffile`.`timestamp` desc LIMIT 50 Missing where 1 = 1? How could this be fixed? -- Louie Miranda (lmira...@gmail.com) http://www.louiemiranda.net Quality Web Hosting - www.axishift.com Pinoy Web Hosting, Web Hosting Philippines --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RewriteEngine not allowed here - 500 Internal Server Error
/htdocs/cake/.htaccess: RewriteEngine not allowed here this is resulting in a 500 Internal Server error, I have checked for the existence the proper content of all .htaccess files, and have setup the 'AllowOverride All' and the Load Module for mod_rewrite are all setup properly, and I even tried adding 'RewriteBase /' to the .htaccess files What else could be wrong? --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: HELP, Controller displaying multiple duplicate rows
Could you please provide the whole modified SQL statement? It looks like you are trying to left join the statuses table twice! Enjoy, John On Apr 1, 6:18 am, Louie Miranda lmira...@gmail.com wrote: Hello, I think there is a problem on my parameter on the controller. Because once my other tables has multiple entries, the data on the row is duplicated for my main controller. See my code and parameter and the SQL query cakephp produces.http://bin.cakephp.org/saved/5 The default for cakephp 1. *$this-set('pdffiles', $this-paginate());* 2. 3. ON (`Pdffile`.`statuses_id` = `Statuses`.`id`) LEFT JOINhttp://www.php.net/join`users` AS `User` 4. --- ON (`Pdffile`.`user_id` = `User`.`id`) LEFT JOINhttp://www.php.net/join`comments` AS `Comment` 5. ON (`Comment`.`pdffile_id` = `Pdffile`.`id`) LEFT JOINhttp://www.php.net/join`statuses` AS `Status` 6. *ON (`Status`.`pdffile_id` = `Pdffile`.`id`) WHERE 1 = 1 LIMIT 20* The modified, under controller 1. $this-Pdffile-recursive = 0; 2. *$parsedConditions['Pdffile.user_id'] = $this-Auth-User('id');* 3. $this-paginate['Pdffile'] = array http://www.php.net/array( 'conditions' = $parsedConditions, 'limit' = '50', 'order' = arrayhttp://www.php.net/array ('Pdffile.timestamp' = 'desc')); 4. $this-set('pdffiles', $this-paginate()); 5. 6. ON (`Pdffile`.`statuses_id` = `Statuses`.`id`) LEFT JOINhttp://www.php.net/join`users` AS `User` 7. --- ON (`Pdffile`.`user_id` = `User`.`id`) LEFT JOINhttp://www.php.net/join`comments` AS `Comment` 8. ON (`Comment`.`pdffile_id` = `Pdffile`.`id`) LEFT JOINhttp://www.php.net/join`statuses` AS `Status` 9. ON (`Status`.`pdffile_id` = `Pdffile`.`id`) WHERE `Pdffile`.`user_id` = 17 10. ORDER BY `Pdffile`.`timestamp` desc LIMIT 50 Missing where 1 = 1? How could this be fixed? -- Louie Miranda (lmira...@gmail.com)http://www.louiemiranda.net Quality Web Hosting -www.axishift.com Pinoy Web Hosting, Web Hosting Philippines --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---