isOwnedBy trouble belongsTo more than 1 model
Hi I'm having trouble with the isOwnedBy when some I have model that belongsTo more than 1 model. Example: My User has a Post. This is has a Comment. So by the logical sense, the Comment belongsTo Post, but the Comment belongTo User too. And the function isOwnedBy is not working with the 3 Ids needed in this case. 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
Re: Image upload with Cake 2.x
Hey man, I had changed the Meioupload from the old cakephp to 2.1 version. Check this link: http://forum.imasters.com.br/topic/456426-usando-meioupload-no-cakephp-20 It works, included update, besides it does not remove the old image from the folder. 2012/6/26 Florian Krämer bur...@doomzone.de https://github.com/burzum/FileStorage Reading the readme.md is highly recommended. On Monday, June 25, 2012 3:06:49 PM UTC+2, Stefanie wrote: Hey guys, I was looking for a working version for simply uploading user images shown as thumbnail on their profile page. I already found this approach http://www.wilsolutions.com.** br/content/image-upload-**cakephp-20http://www.wilsolutions.com.br/content/image-upload-cakephp-20 but for some reason I didn't get it to work :-(( Has anybody an idea how I can include this functionality? Kind regards, Stefi -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Missing paths in URI
Indeed, some .htaccess files were flawed/missing. Thanks for your help! On 11 Mrz., 14:52, Stephen step...@ninjacodermonkey.co.uk wrote: The webroot directory is exactly what it says web*root* So any URL Request i.e. /css/style.css will access /app/webroot/css/style.css Check the following: 1. Mod Rewrite is enabled 2. The htaccess files are correct (as per the latest release) 3. Directories have correct permissions 4. Your apache config isn't restrictive i.e. AllowOverride or Denying .htaccess Once the server is setup properly the url /css/layout.css will load from the correct place. If you cannot get it to work try this: http://wwdj.wijndaele.com/getting-started-with-cakephp-without-mod_re... On 11 March 2011 12:30, Claudio claudio.la...@adiccon.de wrote: Hello! I ran into a problem when moving an existing CakePHP project, written by my predecessor, from an Apache intranet server to another one because of a hardware issue... Moving the MySQL database was no problem at all, but all links within the projects homepage are incomplete and therefore not working. Here's an example: link rel=stylesheet type=text/css href=/resdb/css/layout.css / Guess you guys already noticed - it should be link rel=stylesheet type=text/css href=/resdb/app/webroot/css/ layout.css / Tried messing around with some settings both Apache and CakePHP related, but I have to admit I won't find the solution by myself anytime soon. Any hints you can give me? Do you require additional information? Oh, it's CakePHP 1.3.2 ... Thanks in advance! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php -- Kind Regards Stephen http://www.ninjacodermonkey.co.uk -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Missing paths in URI
Hello! I ran into a problem when moving an existing CakePHP project, written by my predecessor, from an Apache intranet server to another one because of a hardware issue... Moving the MySQL database was no problem at all, but all links within the projects homepage are incomplete and therefore not working. Here's an example: link rel=stylesheet type=text/css href=/resdb/css/layout.css / Guess you guys already noticed - it should be link rel=stylesheet type=text/css href=/resdb/app/webroot/css/ layout.css / Tried messing around with some settings both Apache and CakePHP related, but I have to admit I won't find the solution by myself anytime soon. Any hints you can give me? Do you require additional information? Oh, it's CakePHP 1.3.2 ... Thanks in advance! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: a few questions about cake 1.2
On 22/gen/07, at 16:52, nate wrote: Also, about that counterCache deal, I was being completely serious, There are plenty of minor features that anyone with a basic understanding of the code would be able to implement if they just took a little time. There are certain features that only we as the core devs can work on. But if other people would like to come alongside us and help implement some of the lower-hanging fruit (and some people have, you know who you are), that would help us out more than anything. my attempt: http://bin.cakephp.org/view/1904027449 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: a few questions about cake 1.2
hi Walker, imagine you have a regular forum. you will end up having categories, forums (and subforums, joined with themselves), topics and posts. you call the forum index page, go to a forum and display the number of topics/posts in there. without something like counterCache what do you do? make a findCount on the fly? fetch every association recursively and do a count() in php? no, it's better that when writing a new post or remove one to have a field post_counter in Forum model that have this number for you. same thing goes with other, like Topic, which you have the number of posts in there. This is useful also for User and Articles, when user write a new Article the field article_count in model User gets automatically updated with the new count of its articles, so you can use this value when you want without fetching associations to make the count. The way this behavior works is not like in rails, when they use increment/decrement field, it's far more accurate because it has three callbacks, one for inserting and two for deleting, and the updating of fields is made with findCount. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
a few questions about cake 1.2
hi, I need to ask some questions, hope to get an answer :) 1) is there something similar in cake 1.2 that can do this? has_many :posts, :order = 'posts.created_at', :dependent = :destroy do def last @last_post ||= find(:first, :order = 'posts.created_at desc') end end 2) counterCache isn't implemented yet? I've looked at the trac and there's an implementation, should I give this a try or will be implemented soon (if you know)? In a cached page on google cakephp manual says that we need to specify a column like forum_post_count, tried but the field doesn't get updated, also there's only one reference in code for counterCache. 3) I know that behaviors are still a moving target, but could please someone into it write a little tutorial on how to make one? I need something like acts_as_list in RoR. Interesting thread about acts_as_list is by nate here: http://groups.google.com/group/cake-php/browse_thread/thread/e733fa1f336a8fb5/f790a46003c2cc92?lnk=gstq=behaviorsrnum=6#f790a46003c2cc92 any news on this? 4) Can please somebody explain what's a real life example of usage of finderQuery and counterQuery in hasMany association? 5) I really hope for this: http://groups.google.com/group/cake-php/browse_thread/thread/4ef95ff02f5d66ab/548966e2d13ddaa2?lnk=gstq=behaviorsrnum=4 yeah, I hope because I don't have time to code for it, but I think it will be a great thing. 6) Any plans to add useful functions like useModel or unBindAllExcept directly in core? bindModel and unBindModel works, but the way they works now is a bit painful when recursion is high. 7) A little preview tutorial on the upcoming AuthComponent would be great :) thanks for the kind replies. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: a few questions about cake 1.2
On 22/gen/07, at 14:46, nate wrote: Well at that rate, I might as well just throw in a pony. But seriously, that is a pretty tall order. Since you asked, how much of it are you planning on contributing yourself? nate, all I needed was a short reply to some of the questions I asked. I'm not saying hey devs, look at this, it's incomplete, shame on you. I'm contributing, at least I thinked so according to whay you say, submitting bugs, indicating possible enhancements, translating and *promoting* CakePHP everywhere and helping people in channel. If it doesn't sound *too much* to you, well, that's what I can do right now. I'll make you a deal: you submit a patch that implements counterCache, and I'll finish implementing the new bind methods, *and* write a tutorial on AuthComponent (which, btw, isn't even done yet, so I guess my half of the deal would include finishing it). How does that sound? Rude. No, thanks. Mine were only kind suggestions that everyone can pick up and were absolutely not imperative, just thoughts/what I would like, it's a crime? Hope not. Guess what, I have to keep questions for me and answer the people's ones. As a personal side note, nate, I've had a big community for 9 years, you don't have necessarily to interact with user, but if you do, that's the attitude that I would like to avoid. My 2 cents. Claudio --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: a few questions about cake 1.2
On 22/gen/07, at 16:52, nate wrote: Claudio, I understand where you're coming from, but let's try a little reciprocation here. You've been around long enough to know how much crap we've been taking about 1.2, the features, what's done, what's not, and what the final release date is. sure, you made a wonderful work with CakePHP and you can get easily people's pants wet just saying words like there will be behaviors [...] and so on; I think it's pretty natural to be asked for new features, etc. Take the good part of it: that means you have a beautiful project and people in your hands. Given your list of questions, I don't really know how you expected any different. If a feature is implemented, it'll be in the code If we've made public plans regarding a specific feature, it'll be in the roadmap. Both of which are public, and you know where they both are. Given that, I expected a bit more from you. you're right. probably I'm getting misinterpreted since I'm no native English.. but I can assure you that my questions was not meant strictly to know when and to harass developers, but all I meant is a thing more like damn, maybe I'm blind, let me assure by asking on CakePHP Google Group. this is in fact true especially for counterCache and behaviors (for which reading your posts on Google Groups I wanted know just if something has been unofficially published, like on yours on somebody's blog.. it's getting easy to find code snippets that implements something interesting), the others were proposals for anybody along with a two support questions. Anyway some of what I asked, is for planning the cakeforum and get an idea how it can be implemented. Also, about that counterCache deal, I was being completely serious, There are plenty of minor features that anyone with a basic understanding of the code would be able to implement if they just took a little time. There are certain features that only we as the core devs can work on. But if other people would like to come alongside us and help implement some of the lower-hanging fruit (and some people have, you know who you are), that would help us out more than anything. I promise I'll look into it. Peace of mind then, don't waste your time with me :) Claudio --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
bindModel not works if recursion is too low?
hi there, I've a question about bindModel, the details and core are here: http://bin.cakephp.org/view/414114170 basically I've set up a recursion of 2, and I need to bind a model on the fly, but this is not working and I suspect that it has to do with recursion level. thanks for any advice. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: bindModel not works if recursion is too low?
thanks for the kind response :) On 21/gen/07, at 15:00, Grant Cox wrote: Yes, the bound TopicLastPostAuthor is 3 levels of recursion from your Forum model, ie: $this-Forum-ForumTopics-TopicLastPost-TopicLastPostAuthor So, you need to use a recursive of at least 3 to get that data automatically loaded. To simplify your bind/unbind, I would suggest using the useModel function from ( http://bakery.cakephp.org/articles/view/78 ), it's a unbindModelExcept function as you mention in your post, and I've had no problems using it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: bindModel not works if recursion is too low?
got it working with: $this-Forum-recursive = 3; $this-Forum-useModel(array('Forum', 'ForumTopics', 'ForumLastPost', 'ForumCategory')); $this-Forum-ForumCategory-useModel(array('ForumCategory')); $this-Forum-ForumLastPost-User-useModel(array('User')); $this-Forum-ForumTopics-useModel(array('TopicLastPost', 'TopicAuthor')); $this-Forum-ForumTopics-TopicLastPost-useModel(array('User')); thanks again. On 21/gen/07, at 15:00, Grant Cox wrote: Yes, the bound TopicLastPostAuthor is 3 levels of recursion from your Forum model, ie: $this-Forum-ForumTopics-TopicLastPost-TopicLastPostAuthor So, you need to use a recursive of at least 3 to get that data automatically loaded. To simplify your bind/unbind, I would suggest using the useModel function from ( http://bakery.cakephp.org/articles/view/78 ), it's a unbindModelExcept function as you mention in your post, and I've had no problems using it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
some light about new form helper and validation
hi there. usually (cakephp 1.1) we can differentiate errors with something like this: function beforeValidate() { // controlliamo se stiamo aggiornando un record oppure nuovo if ($this-id === false || $this-id === null) { // nuovo inserimento if (isset($this-data['User']['confirm_password']) $this-data['User']['password'] != $this-data['User']['confirm_password']) { // controllo della conferma password in fase di registrazione $this-invalidate('confirm_password'); } if ($this-findCount(array('User.username' = $this-data['User']['username'])) 0) { // esiste un utente con questo username, dobbiamo invalidare il campo $this-invalidate('username_unique'); } and so on, in our views: ?php echo $html-input('User/username', array('id' = 'User_username', 'size' = '30')) ? ?php echo $html-tagErrorMsg('User/username', 'Inserire un username valido e di almeno 4 lettere.') ? ?php echo $html-tagErrorMsg('User/username_notvalid', 'Questo username non pu� essere utilizzato.') ? ?php echo $html-tagErrorMsg('User/username_spambot', 'Il sistema ti ha riconosciuto come uno spambot. Contatta il supporto tecnico.') ? now I'm switching to the new validation and the new form helper (cakephp 1.2). can please somebody tell me how to differentiate errors with the form helper? I know that we can use 'error' = 'my error message' during widget construction, but this is one and generic message instead of the default field is required. hope that makes sense. thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: A gift for all to enjoy
Larry, so many thanks for these new great php releases. My gift, especially for newcomers, is here http://www.kuht.it/articles/screencasts/cakephp_basics not much really, but I hope you enjoy. Merry Christmas everyone. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: A gift for all to enjoy
so many thanks for these new great php releases. whops. I meant CakePHP releases ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: force swf refresh
don't know if it will work, but maybe you can prevent caching appending a ?hashhere to chart.swf. hash can be generated in multiple ways, like a date or a md5 hash. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: force swf refresh
no problem, I know the issue because I've worked with swf charts and IE keeps caching the file. there's something you can do, instead of putting an hash to swf, try putting something like this in source url: /controller/action/param?uniqueid='.uniqid(rand(),true) kain On 25/dic/06, at 17:11, gabordemeter wrote: Thanks for the feedback Claudio. Alreay tried doing: ?php echo $swfobject-display('/swf/chart.swf?nocache='.floor(rand(1, 100)/rand(1, 1)), 'Chart', '800' , '350', '7' , '#fff'); ? IE doesn't seem to care. Still showing the old chart. Any other suggestion. Is it possible to send something in the header of the page to force the browser to download the swf as opposed to caching it? Changing the name of the file every time is not a good option as the same .swf will be used by all users (the graph is drawn dinamically in AS after receiving the data from cake via amfphp). On Dec 25, 10:56 am, Claudio Poli [EMAIL PROTECTED] wrote: don't know if it will work, but maybe you can prevent caching appending a ?hashhere to chart.swf. hash can be generated in multiple ways, like a date or a md5 hash. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: force swf refresh
On 25/dic/06, at 17:37, phirschybar wrote: gabordemeter: sorry I missed the part about it working in FF. But still doesn't the SWF have to grab the data on every load, even if the SWF is cached? Claudio: to satisfy my curiosity.. what file do you think IE is caching? the content sent to the swf ie. the source. happens that some browsers (IE) might download only one istance of the source, if it's dynamic, and cache it; AFAIK the solution is to append an unique value to its url. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: force swf refresh
gabordemeter ha scritto: Claudio: Not sure I understood what you suggest. You say: instead of putting an hash to swf, try putting something like this in source url: /controller/action/param?uniqueid='.uniqid(rand(),true) where should I put this? the source of the file is 'swf/chart.swf'. There's no controller, no action and no param. Just the swf folder with the chart.swf file in it. I never heard or used swfobject helper, anyway you say: The movie gets data from a cake controller and plots it on a chart. I assumed that you can call a controller action dinamically, just like php/swf charts do. Did you hardcode the controller action into chart.swf? If I do 'sfw/chart.swf?uniqueid='.uniqid(rand(),true) this is exactly what i've done already and it did not work. Remember, I was using: $swfobject-display('/swf/chart.swf?nocache='.floor(rand(1,100)/rand(1, 1)); Isn't this same as what you suggest? well, see above, sorry if I misunderstood. http://www.maani.us/charts/index.php?menu=Tutorialsubmenu=Chart_Source see caching. kain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Translation help
Larry, I've uploaded a new italian revision fixing two strings, the filename is the same (default_it.pot) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Translation help
done, italian updated On 23 Dic, 17:19, Larry E. Masters aka PhpNut [EMAIL PROTECTED] wrote: I have added the translated files to the 1.2.x.x branch. You can find the current ones here:https://svn.cakephp.org/repo/branches/1.2.x.x/cake/locale/ I have also updated the .po files in each language that I have received with all the strings that where not translated in the first file I uploaded. If everyone who worked on those would be kind enough to grab the core.po file for their language and update the translations. When you upload them to the google group name them core_lang.po For anyone else who would like to translate please grab the default.pot file in the above URL. If you translate this file and upload it to the google group name it default_lang.pot Please usehttp://translation.cakephp.org/languagesas a reference for the lang. Use Default unless your Locale is specific. If you would like to be known as the maintainer include your email so I can contact you and note in the reply if you want the email displayed in the list. Upload files here:http://groups-beta.google.com/group/cake-php/files Thank you again... -- /** * @author Larry E. Masters * @var string $userName * @param string $realName * @returns string aka PhpNut * @access public */ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Update on translations.
new revision for italian language core_it.po, fixing three strings. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Translation help
Italian language uploaded. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Including a cakephp action result in another site
M ha scritto: it B). This announce should be scrolling (I think I can use the tag MARQUEE). please, please.. don't do that. http://www.mcli.dist.maricopa.edu/tut/tut17.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Keeping unbindModel out of your controllers
On 16/dic/06, at 09:04, Mariano Iglesias wrote: Oh, yes you are right. It seems that after editing an article the bakery puts it back on the approval queue. It doesn't seem like a bug to me, it makes sense (otherwise one could get published a good article, and then edit it and put spam or whatever.) So we've just gotta be patient again :) interesting enough, I'm facing the same problem in my app. I'm finishing a project where an user can submit an article, this article can have a state, like approved, rejected, deleted, draft, on hold. I've drawed a workflow, after much pulling my hair out, I ended up with this solution: when an user submit a new revision, admins gets an email and the edit automatically gets approved. this because if a user modify, is correct that the previous version is still online, and when admin approves the new, it flips on the old version. this require an intense database work, since we need to take care even of the tags (habtm). so I ended up with this solution to keep an online version, that a user can modify from two months after the creation date. bakery instead, I believe, will change the state of the article upon a revision, but if admins don't/won't approve the new version, the article isn't published anymore until a new revision. my solution require confidence with users that will submit an article of course, but for the sake of simplicity to me is the best choice for now, until I will implement a versioning system. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Keeping unbindModel out of your controllers
On 16/dic/06, at 08:35, Mariano Iglesias wrote: [snip] Again, your old way of calling (through arrays) WILL STILL work. I've just made the change since I wanted to clean up my controller code even further. So those two or three logical lines can turn into one logical line ;) ok, I'm losing my senses again ;) thanks for your work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Keeping unbindModel out of your controllers
On 16/dic/06, at 08:35, Mariano Iglesias wrote: http://bakery.cakephp.org/articles/view/185 btw bakery says invalid article.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Keeping unbindModel out of your controllers
works so well that I've lost my senses. thanks Mariano --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
make requestAction call a private method
hi, there's a method to distinguish between a normal url and a requestAction call? I've a requestAction in a view that gets data from a controller's method, obviously I can call it via url, it has no view. I know that putting debug to 0 will result in a 404, but I'm wondering if there's a way to differentiate, so I can use some ifelse statement. hope makes sense. thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Ajax sortable list
Uncle Bill ha scritto: Does the second post in that link solve the problem? It doesn't seem like it. Did you get it working? yes, works for me. I've workarounded the issue putting a javascript that collects every id, and then send them to the controller that parses them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Ajax sortable list
I've had the same problem, see here: http://www.cakephpforum.com/discussion/74/savefield-woe/#Item_0 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Default character set for all pages
touching core files is simply wrong. create or copy app_model.php in you app folder and write into the class: function __construct() { parent::__construct(); if (!defined('GLOBAL_UTF8')) { $this-query('SET NAMES \'utf8\''); define('GLOBAL_UTF8', TRUE); } } // end construct utf8 for database queries. for the head simply edit your layout file that you will find under app/views/layouts, the default layout is called default.thtml, if it doesn't exists, create it, it's a skel of your html page. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: problem with the latest 1.1.11.4064
you should always set a default value to avoid the missing argument, like function action($arg1=null, $arg2=null) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP Unofficial Forums
Mariano, I've opened that forum when users wanted it as CakePHP foundation still doesn't have one (I'm a junior dev on the one that will be coming), see an example here: http://www.nolimit-studio.com/baking/2006/06/27/give-me-a-forum-or-give-me-death But really I've opened it just to give my personal support, as I do in Google Groups and on IRC. I've asked Larry if the foundation wants this domain, but the proposal is in a freeze state. No traffic, money, or thing of that kind, just willing to help, since CakePHP is great and really deserve some serious attention. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.
thanks for another great release :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
associations problem
hi guys, I've some association explained here, and they works pretty well. However I want to be able to fetch a User's Profile when querying Article model. I've tried with recursion, but it will just fetch every article that belongsTo this User, and this is not what I want. Should I work with bind/unBindmodel at model level? thanks. Article belongsTo User User hasOne Profile Profile belongsTo User User hasMany Article how can I fetch a profile querying the Article model? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: associations problem
thanks, it works. had to use: $this-User-unbindModel(array('hasMany'=array('Article'))); in Article model. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.
I'm having some problem.. In an application I've loaded a bunch of model into app_controller.php like var $uses = array('Blah', 'Etc'); to be available in every controller; after the upgrade into every controller I go CakePHP tells me that he wants a model with the same name as the controller. for example I've a Welcome controller that do not have any model but uses an Article model. what's going wrong here? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.
Il giorno 04/dic/06, alle ore 18:05, Mariano Iglesias ha scritto: You shouldn't set models at the AppController level. From this post: http://groups-beta.google.com/group/cake-php/browse_thread/thread/ df5e0b3a75 d0202a Larry says: You should not define the $uses var in your AppController. When you set the $uses var it should be done in child classes, and only set if you are not following naming conventions, or you need more then one model in the controller. If you follow naming convention loading of models is automatic and you do not have to define the $uses var. Adding to your AppController sets the same $uses on all child classes. Also be aware of CakePHP 1.1.11.4064 regarding models: If you did something like this before 1.1.11.4064: $myModel = new Model(); You now have to do: loadModel('Model'); $myModel = new Model(); got it, thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.
Il giorno 04/dic/06, alle ore 18:04, joel ha scritto: With this version of Cake, I now get an error on my site which says: Fatal error: Class 'ConnectionManager' not found in /cake/libs/session.php on line 445 Does anyone know what this is all about, or where I might be calling that class? are you saving session in database instead of php/cake? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
fake HABTM
hi, I was reading, some times ago, an AD7Six statement in irc how to implement a fake HABTM with other kind of associations like hasMany. I cannot join irc from work, maybe somebody, or AD7Six, can explain in there? Plus I've a question, why when saving pure HABTM CakePHP wipes everything and we all must use joinAssoc from rossoft? :D thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: fake HABTM
AD7six ha scritto: Before replying with possibly irrelavent info, what is it that a HABTM doesn't do for you, and what is it you want to achieve? nothing, just sitting here and can't remember what the trick was Did you try the webpage for IRC (see link below)? not yet I would propose that the associations get wiped becuase it's more intuitive to unlink all and define what you wanted, rather than allways add to the associations and struggle to undefine when you need to (it's less sql, but more user code to handle that). I think the same as you do cheers :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
cake session save
hi, I've just downloaded the latest nightly and set: define('CAKE_SESSION_SAVE', 'database'); define('CAKE_SESSION_TABLE', 'sessions'); of course I've created the table and got: Fatal error: Undefined class name 'connectionmanager' in /Users/kain/Sites//cake/libs/session.php on line 417 sounds like a bug to me, I've double checked and cake is able to connect to database. does anyone else seen this before? should I file a ticket? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: PayPal Direct Payment API Component
whoa Mariano, thanks for that, I will look into it soon :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
problem with sortables
hi, I've this code in my view: ul id=list ?php foreach ($pagine as $pagina) { ? li id=item_?php echo $pagina['Page']['id'];?ID: ?php echo $pagina['Page']['id'];? - ?php echo $pagina['Page']['title']?/li ?php } ? /ul p id=list-info/p ?php echo $ajax-sortable('list', array('url' = '/dashboard/ordinapagine', 'update' = 'list-info', 'complete' = 'new Effect.Highlight(list,{})'))? in my controller: function ordinapagine() { $ids = $this-params['form']['list']; debug($this-params); $i = 1; foreach($ids as $id){ $this-Page-id = $id; $this-Page-saveField('order', $i++); } $this-autoRender = false; } when I debug($this-params) however I don't get all elements, but only this: [form] = Array ( [list] = Array ( [0] = 5 ) [_] = ) this prevents me to save the correct order. anybody has a clue? thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---