Re: CakePlus - On the top of CakePHP
On May 4, 12:46 pm, keymaster <[EMAIL PROTECTED]> wrote: > Way too ambitious to make all these changes and still keep up with > evolving cake releases, IMHO. > > You're better off leaving the core as is, and just managing your value- > added stuff. That alone is a handful, but you'd get 80% of the benefit > with much less hassle. > > Really, the best thing would be to persuade the cake team to add some > of the proven stuff into the core (eg. bindable, sluggable, asset > helper, etc). That would obviate the need for your fork. I understand that many people are for not touching core. Andy has provided his very valuable suggestions for how to do that; possibly may start from that. Hope, all are happy now:-) -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePlus - On the top of CakePHP
On May 4, 8:17 pm, Dérico Filho <[EMAIL PROTECTED]> wrote: > First off, it is a fork. As a matter of voting, I am against and > thefore I shall not support it. I know I am no one, but it is a > thought anyway. > > There is a particular clause I deemed to be disattached of reality. > CakePHP, shall support PHP 6 and abandon PHP 4 as it lifespan passes > thru time. For instance, if you propose that your Cake+ drops supports > for PHP 4 now, it would break v4 users, what you do then? Use PHP > Downgrade, you add as a third-party component on what CakePHP has > bundled in its core, quite well developed. Perhaps you could adventure > in developing a new Cake-like framework, but as far as I can on your > "feature" list I would say it is going on Bad&wRong ways. I respect everyone's view. But, it's too early to judge if it's wrong or not. While I'm positive, you're against to it. Let's see what the future decides. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePlus - On the top of CakePHP
On May 5, 6:07 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Sat, May 3, 2008 at 11:09 AM, R. Rajesh Jeba Anbiah > > <[EMAIL PROTECTED]> wrote: > > Community: > > 1. 100% open (svn, wiki, Google groups) > > I'm wondering if by this you mean that anyone who wants can have > commit privileges to the repository? Yes, "In developers we trust" -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePlus - On the top of CakePHP
On May 5, 6:52 pm, AD7six <[EMAIL PROTECTED]> wrote: > On May 3, 7:45 pm, "R. Rajesh Jeba Anbiah" > <[EMAIL PROTECTED]> wrote: > > On May 3, 8:59 pm, nate <[EMAIL PROTECTED]> wrote: > > > > Also, for as quaintly egalitarian as your "no authority" clause is, it > > > doesn't fly in the real world. Even if "developers aren't morons," > > > that doesn't mean that you won't get n00bs who only think they know > > > what they're doing, or people who's opinions differ from yours. > > > > And you plan to handle this by branching? What does that leave you > > > with? Subtilely different versions of the same code, which fall into > > > a state of atrophy over time as they diverge from the core codebase > > > and from each other, and as developers lose interest, which tends to > > > happen on smaller projects. > > > > If you really think you can do this, hey, more power to you, but so > > > far this plan doesn't even sound good in theory. > > >I think, we can't conclude the future at this point of time; you > > may be right or wrong with your opinion on the openness of the > > project. But, I'm quite positive about the power of openness. > > Good luck with your efforts. If you > avoid making changes to the cake core* > make use of overriding > make use of externals/vendor branching > > You would have a fighting chance (IMHO) of succeeding and not having a > project that (might) look ok at the outset and quick stagnate. Thanks for the wonderful suggestions for which I'm waiting for, before preparing a draft:-) Many thanks again. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePlus - On the top of CakePHP
On May 3, 11:19 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote: > > I think, modifying core is necessary evil. To bend it for the > > UIMS, it's extremely necessary. > > I need to do my research in the area before arguing. > > > Another change that seems extremely > > necessary is component vs model namespace confusion (You don't know > > what is foo in $this->foo: if model or component). > > I can live with that confusion ;) > > > I'll try to prepare > > a draft with changes and if others agree, I'll proceed. But, IMHO, > > they looks necessary. May also take some ideas from orchid and fase > > frameworks. And, thanks for your comments and ideas. > > Looking forward to see it, as I said before it's an area of interest for me. > > About modifying the core, I still don't feel comfortable with that ( > and I've already done it for a couple of my projects ), the thing that > worries me the most is the dupplicattion of effort. I think many > things can be done with conventions, say naming things in determinated > way or inheriting from some base class, ie use CRUDSController for > base instead of AppController. Many thanks for your constructive comments. I'll wait some more time for others' comments/suggestions if any, before preparing the draft. > Also I agree about your idea of openness, there are lots of successful > open projects, and keeping that in mind is that I suggest you have a > look at git (http://git.or.cz/), it's a distributed SCM, where every > one has the full history of the project so no repository is more > important than the other and it encoourages truly parallel > development. Many thanks for letting me know git; I was aware of svk, but this is new for me. Thanks again for your comments. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePlus - On the top of CakePHP
On May 3, 9:04 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote: > Yes, It sounds like a fork. Anyway, maintaining a set of changes to > the core on top of the svn is easily done with git and quilt (as SCM > goes) but involves too much work from programmers. > > I've tried to make a "thing on top of CakePHP" many times, never got > time to make it usable. But I'll like to contribute to the effort, > just don't like the idea of touching the core. There are many things > you can do providing classes that lay inside the app dir taking > precendence from the core ones. I think is better to work in a higher > layer on top of CakePHP instead of modifying the core, the core teams > is doing an excellent work. I think, modifying core is necessary evil. To bend it for the UIMS, it's extremely necessary. Another change that seems extremely necessary is component vs model namespace confusion (You don't know what is foo in $this->foo: if model or component). I'll try to prepare a draft with changes and if others agree, I'll proceed. But, IMHO, they looks necessary. May also take some ideas from orchid and fase frameworks. And, thanks for your comments and ideas. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePlus - On the top of CakePHP
On May 3, 8:59 pm, nate <[EMAIL PROTECTED]> wrote: > Also, for as quaintly egalitarian as your "no authority" clause is, it > doesn't fly in the real world. Even if "developers aren't morons," > that doesn't mean that you won't get n00bs who only think they know > what they're doing, or people who's opinions differ from yours. > > And you plan to handle this by branching? What does that leave you > with? Subtilely different versions of the same code, which fall into > a state of atrophy over time as they diverge from the core codebase > and from each other, and as developers lose interest, which tends to > happen on smaller projects. > > If you really think you can do this, hey, more power to you, but so > far this plan doesn't even sound good in theory. I think, we can't conclude the future at this point of time; you may be right or wrong with your opinion on the openness of the project. But, I'm quite positive about the power of openness. Fascists believe in authority as they want to rule over others, which may not happen here because of the openness. Also, newbies are great contributors (for instance, I have removed bunch of spams form Rails wiki when I was learning Rails). Conflicts are necessary evil (if everyone believes in a same programming language and framework, what is the need for others) and may occur only when there is no communication. People may many times want credit--which they can do through Wiki if they want. Let's see what happens. But, I'm extremely positive. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
CakePlus - On the top of CakePHP
I have been thinking this for a while and also posted this sometime ago http://groups.google.com/group/cake-php/browse_frm/thread/949555be03d9df8b/300bec44c5902198 But, I understand Cake should be a tiny and tight framework for many people here. So, I envision something new on the top of CakePHP--CakePlus, a complete toolkit to build contemporary UIMS based sites. And, thinking of hosting in Google Code or SF.net. Basic idea for the toolkit: 1. Bundle MiBake template, Asset helper, Bindable behavior, Validation helper, Sluggable behavior, and other nice hacks & plugs from Daniel Hofstetter (http://cakebaker.42dh.com), Andy Dawson ( http://www.ad7six.com/ ), Matt (http://www.pseudocoder.com/), Mariano Iglesias 2. Bundle hacks from the post of grigri (especially the generic controller), baz, franky, and other GG contributors 3. Bundle a default "users" mod 4. Bundle jQuery, but use event delegations (check BehaviorS.js) 5. 100% degradable Ajax (autocomplete, inline-editing, popup, date picker, client side validation--see Matt's Validation helper) 6. Bundle Eric Meyer's reset.css. New CSS framework (liquid, IE 5 friendly) 7. Default themed views 8. Distinguish between "vendors" and "libs" 9. Unified pattern for sharing codes betweens M, V & C 10. Admin interface. 11. Bundle ACL/Auth 12. All PHP codes to be beautified with PHP_Beautifier Changes to core: 1. Remove compatibility and hacks (e.g., https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/view/helpers/javascript.php#L465 ) 2. Remove regexp wherever possible (e.g., https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/model/datasources/dbo_source.php#L305 ) 3. Remove scaffolding. Replace with UIMS: Let the users to build forms, define user level-based validation rules, etc 4. Remove Translate Behavior. Replace with i18n behavior http://www.palivoda.eu/2008/04/i18n-in-cakephp-12-database-content-translation-part-2/ 5. Remove gettext based i18n. Replace with DB based. 6. Remove Session, Cookie, XML, Configure wrappers. Todo: find a better solution 7. Change dispatcher to make the default URL scheme to /foos for index, /foo/id for view, /foo/edit/id for edit, /foo/add for add actions 8. Remove Felix's Set, Http Socket stuffs. Or move them to vendors 9. Remove or change ACL/Auth and Caching stuffs 10. Remove debugger. Or move to vendor (xdebug seems better) 11. PHP 5. Other version supports by downgrading (http:// www.akbkhome.com/svn/akpear/PHP_DownGrade/DownGrade.php, Alan Knowles) 12. Pluggable caching & template systems 13. Remove plugins. Replace with new "mods" architecture (mods contributed through wiki or svn for quick improvements) which could be installed through admin interface (Say, a "gallary" mod could be plugged easily) Community: 1. 100% open (svn, wiki, Google groups) 2. No IRC 3. All discussions through Google groups 4. All docs and architecture drafts through Wiki 5. On conflict of interests/architecture opinions, branch the project 6. No authority. Tagline: "Developers are no morons". Comments and suggestions are always welcome. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Pagination with Filter/Search Box
On Apr 30, 1:00 pm, Kyle Decot <[EMAIL PROTECTED]> wrote: > Thanks that worked great. I have one further question. How would I > make the filter/search box stay populated with the search string that > was entered? Check for the 'value' key in $form->input().. stuff the $this- >params['named']['q'] there. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Pagination with Filter/Search Box
On Apr 30, 11:17 am, Kyle Decot <[EMAIL PROTECTED]> wrote: > Thanks for the help and the quick response but now i'm getting a > endless loop of redirects. if you go to: > > http://www.theskateparkdirectory.com/skateparks/ > > you'll see what I mean. Any ideas what's causing this? Try: unset($query_strings['url']); // Crazy, Remember: Can't use ?url=foo instead of: unset($query_strings['url']['url']); // Crazy, Remember: Can't use ?url=foo Sorry for writing from poor memory -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Pagination with Filter/Search Box
On Apr 30, 7:41 am, Kyle Decot <[EMAIL PROTECTED]> wrote: > Thanks. I'm trying to implement this, but the following doesn't seem > to be working: > > echo $form->create('Foos', array( > 'action' => 'index', > 'method' => 'get' // Important > )); > > when I look at my source code, the form says method = 'post'. Any idea > why it is ignoring the method get? I'm sorry, it should be: 'type' => 'get' --- not 'method'. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
@Sliv: One link is missing in "FAQ" page?
One link seems to be missing in the FAQ page http://groups.google.com/group/cake-php/web/faq under "How to handle tricky HasAndBelongsToMany situations?". If you have access to the previous Frequent Discussions page, can you check what link it is? -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Wierd Parse error
On Apr 19, 2:23 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Can someone help me out, the following code gives me a parse error but > I don't know why > > class Benefactor extends AppModel { > var $name = 'Benefactor'; > //var $testA =strtotime(date("n/1/Y")); > var $hasMany = array( > 'Picture', 'Blog', > 'QuestionTo' => array( > 'className' => 'Question', > 'foreignKey'=> 'benefactor_id', > 'conditions'=> 'Question.foruser = 1 AND Question.time>= > '.strtotime(date('n/1/Y')).' ', > > 'order'=> 'Comment.created DESC', > 'limit'=> '5', > 'dependent'=> true > ) > );' > > } > > it is this line: > 'conditions'=> 'Question.foruser = 1 AND Question.time > > >= '.strtotime(date('n/1/Y')).' ', > > I have no idea why, it seems to not like the "." concatenation but > that should be valid in PHP yes? Declarations cannot have expressions (here strtotime(date('n/1/ Y'))). You'd want to set property in __construct() method--where you can use expressions. This is a basic PHP and you may want to improve that. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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 ACL and database naming conventions
On Apr 19, 2:22 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Fri, Apr 18, 2008 at 5:15 PM, R. Rajesh Jeba Anbiah > > <[EMAIL PROTECTED]> wrote: > > > > So, why are the tables named thus? > > > acos > > > aros > > > aros_acos > > "Because they are" probably isn't the answer you had in mind, right? > > The tables used by the ACL have been named that as long as I can > remember, and I guess you're right when you state that they don't seem > to follow the standard for alphabetical precedence in join tables. > > Does it really matter that the ACL component doesn't seem to follow > this rule? I ask not to be flippant but to understand why it's > important to you. Since you quoted me... I'll be happy if you have an answer. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Grails madness??
On Apr 19, 2:16 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I've been learning grails and I came across the following code that I > assume is standard because it's auto-generated by grails "bake" > equivalent: > > name="user.id" value="${post?.user?.id}" > > > This is basically groovy's equivalent of $form->input where from is > the "options" tag in cake. The thing that really seems like bad news > is that User is the actual model object and it's list() function > (similar to findAll) is being called directly from the view without > the controller ever even knowing about it. So I was wondering what > other people thought about this. It seems to me like there's not much > point to structuring your framework in an MVC architecture if you are > going to encourage your users to blatantly disregard it's conventions. What I have concluded lately is that the MVC is a myth for real projects. If you strictly follow the standards, you'll end up duplicating the codes (say for example, in cakephp; most of the times, you'd want to reuse the code of a Component in Helper). Also, sending model object even in Cake is necessary for certain cases http://groups.google.com/group/cake-php/browse_frm/thread/5f8ca538868298d0/440ff5f5eafb47e1?#440ff5f5eafb47e1 -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Session : Single Sign on from other application
On Apr 18, 1:40 pm, acl68 <[EMAIL PROTECTED]> wrote: > Hello everybody, > > I was programming an application with Cake and all was well ;-) > Then my colleague and I had the idea to share the login procedure with > the applications he is maintining, so that the login in his > application and the information should be passed on to my cake > application -> Single Sign On for our users! > > Now I have deep trouble to get those two applications to work > together. Using the user table from the other database was simple, but > checking whether somebody has already logged on is what I don't get to > work. The Userinformation is in the common user table, but how can I > load the userinformation in my application without an additional > login? > > Has anyone an idea? > > My ideas are: > 1. Switch Cake session handling completely off and use the session > objects of the general application. But how can I do that? > > 2. Transfer the information from Object/Session_otheraplication to > Object/Session_myCakeapplication . But how can I achieve this? To make > things worse, both varaiable in which teh Sessiondata ist stored are > called $session. > > The Non-Cake application is the leading application so I cannot change > anything / much there. > > Thanks in advance for any hints and ideas! You may want to reset the Session cookie name from CAKEPHP to PHPSESSID or anything that the other application is using. Look at core.php -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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 ACL and database naming conventions
On Apr 19, 1:56 am, Jee <[EMAIL PROTECTED]> wrote: > According to the Cake 1.2 manual: "Join tables, used in > hasAndBelongsToMany relationships between models should be named after > the model tables they will join, in alphabetical order (apples_zebras > rather than zebras_apples). If your application features this type of > relationship between your Tag and Post models, the table name would be > posts_tags." > > So, why are the tables named thus? > acos > aros > aros_acos > > Probably missing something obvious, but I am new to Cake. > Just scratching my head on this one... If you ask smart questions, you may not get answer except an advice to post a ticket. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: How to view all Cake queries?
On Apr 18, 8:05 pm, grigri <[EMAIL PROTECTED]> wrote: > Write the sql queries to a text log file. > > I created a custom datasource to allow syntax hilighting of the sql > log and file-based logging. > > More details in this > thread:http://groups.google.com/group/cake-php/browse_thread/thread/9609699b... > > Code here:http://openpaste.org/en/6181/ I know, it's dumb; but, where to put this file? -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: i18n in cakephp
On Apr 18, 10:19 pm, "b logica" <[EMAIL PROTECTED]> wrote: > 2008/4/17 robert123 <[EMAIL PROTECTED]>: > > Hi, I want to develop website using cakephp in Chinese and English > > using utf8 encoding I am trying to use cakephp 1.2 version, I have > > been searching around the web on the docs on i18n, but it is rather > > scatter, below are a few problems where I have difficulties, hopefully > > anyone can help me, thank you > > > 1." .po files should be encoded using ISO-8859-1", this is a nightmare > > maintenance for Chinese character, reason being once it is in > > iso-8859-1 format, if you want to change any messages, the messages > > cannot be seen easily, example 我 is me in chinese, but if you store it > > in ISO-8859-1 encoding it is \u6211, hence it becomes very hard to > > hunt down the words in message file, but it will be different if it is > > store in UTF8 encoding, as the Chinese character can be store, edit, > > view naturally as it is, anyone can highlight any solution to this ? > > like A good editor to convert these eastern characters to the correct > > encoding, or making cakephp read utf8 encoding po file? There is no such restriction; you can use utf8. po/mo based i18n solution is hectic for client projects; every clients prefer to edit the language contents. Apparently i18n in Cake has more miles to go, IM*H*O. > > 2. Another problem , take an example a product table that has > > id, title and description field > > there is a product in english and chinese, how do you with the chosen > > language pick up the correct product in database in that language, > > other than using another lookup table. > > Have a look at this implementation by ros (Rostislav): > > http://www.palivoda.eu/2008/04/i18n-in-cakephp-12-database-content-tr... > > In a nutshell, you create multiple columns per language. So, instead > of "name" you'd have "name_eng" & ("name_" + whichever code you need > for your Chinese). I second this solution. But, I'd want to avoid the unnecessary lang code suffix on default field. > Actually, that should really be "name_en" for English, but CakePHP > goes against the ISO spec on this. ISO spec has lot of revisions and versions http://www.loc.gov/standards/iso639-2/php/code_list.php > Anyway, this looks like a better implementation than the default, > which is to dump everything, regardless of the model, into a single > "i18n" table. I strongly believe that no one would use default implementation > > 3. Lastly is the error message for validation of users inputs, I > > search the new Forms built in helper, doesnt seem to tell us how to > > show the different language depending on the user locale http://groups.google.com/group/cake-php/web/faq > > 4. I am thinking also does caching actually works with i18n, reason > > being you execute > > > $this->L10n = new L10n(); > > $this->L10n->get("en"); > > Configure::write('Config.language', "en"); > > , but let say you have the webpage cache seperately english and > > chinese, how does it recognize which one to pickup? > > I hope you find the answer to this. I've asked the same question here > without a response. There's a mechanism, apparently, to prefix the > cache filename but I could not get it to play nice. Look for the second param in $this->element()--when used, it might be sufficient (though not reserved for that purpose). -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: can i use a component under a helper?
On Apr 17, 5:41 pm, grigri <[EMAIL PROTECTED]> wrote: > It might seem like overkill, but one way of handling this might be: > > //- > > /app/vendors/something.php > > class Something extends Object { > function doSomethingCool($input) { > return $output; > } > > } > > /app/controllers/components/something.php > > App::import('Vendor', 'Something'); > > class SomethingComponent extends Something { > // component-specific logic [if any] here > > } > > /app/views/helpers/something.php > > App::import('Vendor', 'Something'); > > class SomethingHelper extends Something { > // helper-specific logic [if any] here > > } > > //- > > This is how the cakephp session system works (helper and component > both extend a shared CakeSession class). It allows the session helper > to be read-only, whereas the session component is read-write, but > share the same underlying logic. Would it be the reason for the session locking issue I'm facing still (session_write_close() doesn't help)? > Of course, like I said above, this might well be overkill if you don't > really need specific component/helper logic - just put it in a vendor > class and go. Do you really use "vendor" folder for your classes? (I personally prefer to call it "libs") -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Exporting the index.thtml view to csv
On Apr 17, 10:25 am, Adam Royle <[EMAIL PROTECTED]> wrote: > Excel does read tabular html (including basic styles). You just need > to set the correct content type. > > header("Content-disposition:attachment;filename=myexport.xls"); > header("Content-type:application/vnd.ms-excel"); > > Alternatively, if you want to create a valid csv file you can use this > helper. > > http://bakery.cakephp.org/articles/view/csv-helper-php5 > > Updated code (including PHP4 > support):http://ifunk.net/cakephp/helpers/csv.php.txt I think, the article is not hinting on parseExtensions() which could have added. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: CakeAMF on a shared host?
On Apr 17, 8:03 pm, Ramiro Araujo <[EMAIL PROTECTED]> wrote: > Im using CakeSWXPHP for my flash projects (I would use CakeAMF, but my > clients all have shared hostings :( and dont have de amf php > extension). > > BUT, im using cakeswxphp with the amf connection; its like using > amfphp. You have the option of using swx, amf o json. Take a look, Im > sure it'll fit your needs, at least for a while. > > Basically the way it works is: you do normal methods in your > controller, and make the "return" data, in any way you need. Then you > point you flash app to the gatewat (http://yourhost.com/amf.php) and > use amf normally. Also, It comes with a service explorer just like > amfphp. FWIW, the only problem I found with SWX API is that it is async by design; so, it doesn't look like an easy remoting lib for Flash developers. CakeSWXPHP and CakeAMFPHP are exposing all controllers and methods; that wasn't a good choice for me. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Leadership issues....
On Apr 16, 10:21 pm, "b logica" <[EMAIL PROTECTED]> wrote: > Gonzalo: I'm not suggesting that anyone *wants* CakePHP to collapse. > This public argument amongst the core devs doesn't bode well for the > health of the project, regardless of what anyone--including > them--wants. FWIW, public discussion is really useful for open source projects as long as it's not tied up to few people alone. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: |OT| What is your preferred URL structure?
On Apr 16, 9:35 pm, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote: > I like slugs for main args and named args for extra params. Makes it > easy for me to remember and maintain stuff. > > For example, on my site you read an article with a slug: > > http://dsi.vozibrale.com/articles/view/which-version-of-cakephp-is-go... > > but you do the extra highlighting if you want like this: > > http://dsi.vozibrale.com/articles/view/which-version-of-cakephp-is-go... > > Which seems fairly readable to me. I might be wrong though ;-) Thanks for your comments. Nice to know, at least one person is liking named arg :-D -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: database content i18n
On Apr 16, 11:54 am, ros <[EMAIL PROTECTED]> wrote: > Take a look as alternative to core CakePHP translate behavior - i18n > model > behaviorhttp://www.palivoda.eu/2008/04/i18n-in-cakephp-12-database-content-tr... > It supports translation of related models (recursive is unlimited) > during cotroller find operation. I'm just jumping, not understood clearly... I think, you're keeping the translated fields in the same table? If so, it's a very nice enhancement.. the current i18n is a huge pain; not sure who architected that with what purpose.. Also, if I'm not mistaken, you should also remove the necessity to append lang_code on default filed name. Looking very great, thanks for sharing. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Leadership issues....
On Apr 16, 8:48 pm, nate <[EMAIL PROTECTED]> wrote: > On Apr 16, 6:39 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote: > > > Well, that's a shame. > > > * _nate_: still having ego problems? > > You're all doing something great here, put your petty ego aside and > > act like adults. > > Hey Lecter. I think what you're interpreting as "ego" is actually my > own frustration. The fact is, Larry (PhpNut) has this annoying > tendency of taking credit for the success of this project far beyond > what he deserves. So if it seems like I have an ego, my only purpose > in it is to set the record straight. > > Also, the team isn't going anywhere. If anything, it's growing and > thriving to accommodate the demands of this project, and to help push > us forward. The only person who'd be going anywhere is Larry, and > only if he wants to. No one wants him to leave the project, and I > sincerely believe it is not in his interest to do so, but he's his own > person, and he has to make his own decision on that. As far as I understand, Larry has avoided jobs in Yahoo! and other good places while you others are employed. So, it's too much to drag him. It would also be good for him to leave so that he make good things for his life. Personally, I feel that any misunderstanding and split is good; such splits brings good things usually for both sides. The community was very closed in nature and I'm positive that a solid framework will evolve now onwards. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Discussion on frequent-discussions
The link for latest version is http://groups.google.com/group/cake-php/web/frequent-discussions?version=131 --~--~-~--~~~---~--~~ 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: paginate related model's data
On Apr 15, 9:13 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote: > you link leads to a page saying: > > 'We're sorry, but we were unable to find the topic you were looking for. > > > Perhaps the URL you clicked on is out of date or broken?' > > I am interested to see this crazy piece of AutoMajic GG is breaking links.. so you could try merging it if it's broken again: http://groups.google.com/group/cake-php/msg/60f9b49f7209d8b9 -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: model validation - how do you handle different rules for different forms?
On Apr 14, 4:40 am, keymaster <[EMAIL PROTECTED]> wrote: > Other than the conditional validation solution in the bakery, (which > seems to work, but is not necessarily a first choice, it's more of a > workaround) is there a more "core" approach to dealing with fields > which have different validation requirements for different forms? The model based validation is a huge pain. FWIW, grigri gave me this for user level based validations http://groups.google.com/group/cake-php/msg/88652124169dd408 -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: CakeAMF on a shared host?
On Apr 11, 12:59 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > From time to time I work on Flash projects and have previously used > CakeAMFPHP. Now it looks like it has been abandoned (more or less) in > favor of CakeAMF. My problem is that from what I can gather CakeAMF > requires the compilation and installation of a PHP-plugin (AMFEXT). FWIW, you may also want to know about SWX http://swxformat.org/ -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: SVN based comments
On Apr 15, 6:14 pm, "Larry E. Masters aka PhpNut" <[EMAIL PROTECTED]> wrote: > Grab this file, it is the same one we > use:https://trac.cakephp.org/browser/whiteboard/misc/svnconfig.txt?format... The bugtraq:url propset isn't there in cake's svn, in case if you'd want to know. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: paginate related model's data
On Apr 14, 9:32 pm, MonkeyGirl <[EMAIL PROTECTED]> wrote: > Yes. The easiest way is to create this page as something like /items/ > view_items_of_article/article_id instead of /articles/view/article_id > so that you can just use $this->paginate the way you normally would. I think, you're missing something (http://groups.google.com/group/ cake-php/msg/60f9b49f7209d8b9 ) It's one of the craziest thing in automagic. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Sanitize and validation
On Apr 15, 7:54 pm, Ramiro Araujo <[EMAIL PROTECTED]> wrote: > By nate: "All database inputs are automatically escaped when you > save.". Is this true for the "query" method also? If not, what type of > sanitization should I made if using the query method in some inserts > or updates? Cake will escape when you build conditions with array() structure--so don't set "condition" as a string. But, I found some problem with it because of this ticket https://trac.cakephp.org/ticket/4008 and I think once this enhancement stuff is removed, it will be ok. So, Cake escapes in add/edit actions and model find() (if you use array mentioned above), but won't escape in view/index actions. So, it's necessary to clean data in view and index actions. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: architecture - organizing related models (?)
On Apr 10, 6:16 pm, "Jon Bennett" <[EMAIL PROTECTED]> wrote: > > I'm interested to know the preferred way of organizing the models and > > vendor files, for the project say "meta search engine - using > > webservices of the search engines": > > I see you have 2 other options (than those listed already). > > 1. create a datasource for each search engine, connect a model with > $useTable = false; and customise the find methods I think, it would look good, but would difficult to manage between developers. > 2. do as above but use a behaviour. I think, behavior is for sharing common stuffs between models; it may not be suitable for this case, IMHO. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Page specific javascript
On Apr 10, 2:17 pm, simon <[EMAIL PROTECTED]> wrote: > is there a method to do the same for the above but for css sheets? As someone mentioned, you can do that by setting "inline" param to false in $html->css() and $javascript->link(). Html helper will always be available and if there is no Javascript helper available may use $this->addScript() I'm not sure, but looks like devs left duplicate codes. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: |OT| What is your preferred URL structure?
On Apr 10, 1:18 am, majna <[EMAIL PROTECTED]> wrote: > My suggestion is controller/action/slug solution. Sometimes controller/ > slug if possible. Thanks for your comments. The reason for this post is that: 1. Many times, I find that no one is preferring the named arg thing 2. It's my preference to have singular controller name for view, edit and add: products instead of products/index product/view/ instead of products/view product/edit/ instead of products/edit I wanted others preferences too; thanks for sharing. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: |OT| What is your preferred URL structure?
On Apr 10, 12:12 am, jonknee <[EMAIL PROTECTED]> wrote: > For one site recently that had a database of restaurants broken down > by neighborhood (and city) I went all keyword based. Worked well (city/ > neighborhood are all variable keywords): > > /browse/city > /browse/city/neighborhood > /restaurant/city/neighborhood/slug > > It took some fairly complex routing to get it straight (there are > obviously more URL types than that), but well worth it in the end > because all the URLs are human-readable. Thanks for your comments. Just curious, what was your paginated URL (IOW, did you use named arg stuff?)? I personally find that no one is preferring named arg. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: architecture - organizing related models (?)
On Apr 10, 2:08 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > 4. > From what I have learned, you should put "anything that is not a > Controller, Model or View" in vendor. So, feel free to put your own > libraries there. Thanks for your comments. I don't quite get here in Cake; I think, we definitely need a "libs" folder to have our codes/classes and vendor should be reserved for 3rd party stuffs. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: architecture - organizing related models (?)
On Apr 10, 4:54 am, the_woodsman <[EMAIL PROTECTED]> wrote: > Interesting stuff - > > I think you seem to be implying the need for certain design patterns, > and Stephen is on the money with the Factory (http://en.wikipedia.org/ > wiki/Factory_method_pattern) , or perhaps the Strategy pattern (http:// > en.wikipedia.org/wiki/Strategy_pattern) - but again, this might be > complete overkill for your requirements! > > I can only suggest you look into similar patterns to best decide on > your approach. Thanks for your comments. My intention was/is to know the common pattern among Cake developers in such situation so that we have a framework based approach for such situation. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: architecture - organizing related models (?)
Stephen Orr wrote: > I can't answer all your points, but in theory, you could probably > achieve what you're aiming for in (2) by making SearchEngine a factory > class which instantiates the other classes on demand. But you'd > probably do better with a different architecture. > > My suggestion would be to use a call such as $this->SearchEngine- > >search('google', 'keywords'); > > Oh, and I'd be more inclined to make SearchEngine a component than a > model. Just a difference in opinion, but I think it'd make for simpler > usage. Thanks for your comments; I strongly believe that the logic should be a part of model. Do you have any good reason for choosing components? -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: organizing controlleres into subdirectories
On Apr 9, 9:14 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Wed, Apr 9, 2008 at 11:52 AM, R. Rajesh Jeba Anbiah > > <[EMAIL PROTECTED]> wrote: > >File inclusions are always a overhead unless you use caching; > > but many times it's ok for the module organization. Cake's way of > > handling file inclusions are real overhead (checking file_exists and > > then calling require_once); but can be solved with caching. > > *sigh* > > Has my reputation gotten to the point where people disregard what I > say in favour of trying to make me look dumb? It appears so. I am > resigned to my fate. > > Isn't 1.2 doing that lookup anyway, regardless of where you're > locating your files? You cannot avoid it, so pointing out your opinon > on how Cake handles file inclusions does not answer the question. > > To expand on my statement "compared to what" I say repeat: compared to what? > > * the overhead of loading Javascript and style sheets in the browser? > * the overhead of reading and writing data from data sources? > * the use of XHR by your application, trying up server resources > > I know people won't believe me, but the alleged overhead of Cake's > file inclusion methods will be the least of your worries when building > a web app with it. Ok, you started dodging to be smart; but your conclusions still look more dumber to me. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
architecture - organizing related models (?)
(The topic not related to the current thread http://groups.google.com/group/cake-php/browse_frm/thread/0133dc7f2dfb1191/6f1665159f7b00d4 ; it's different) I'm interested to know the preferred way of organizing the models and vendor files, for the project say "meta search engine - using webservices of the search engines": My idea as of now: 1. class SearchEngine extends AppModel{ // } 2. class Google extends SearchEngine{ function search(){ } } 3. class Yahoo extends SearchEngine{ function search(){ } } 4. nusoap in vendor folders 5. Written grabber codes in models folder Question: 1. Is it the correct approach? 2. I think, it's better that if we can call methods like $this- >Controller->SearchEngine->Google->search(); but with current architecture, it's possible only this: $this->Controller->Google->search(); 3. Is it ok to place *our* grabber codings in models folder? 4. Is it right to say that only the 3rd party scripts to be placed in vendors folder? 5. Should the sub-model files (Google, Yahoo) to be placed inside a folder? -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: organizing controlleres into subdirectories
On Apr 9, 8:44 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Wed, Apr 9, 2008 at 11:41 AM, DragonI <[EMAIL PROTECTED]> wrote: > > > Coolio! > > > But does anyone know what the overhead/performance is like? > > Compared to what? I doubt you'd even notice it. File inclusions are always a overhead unless you use caching; but many times it's ok for the module organization. Cake's way of handling file inclusions are real overhead (checking file_exists and then calling require_once); but can be solved with caching. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
|OT| What is your preferred URL structure?
This strange, but I'd really like to know your preferred URL structure: 1. http://foo.com/foos/index/x/1/2 (path like) 2. http://foo.com/foos/index/x/slug_1/slug_2 (path like, but with slug) 3. http://foo.com/foos/index/x/Nam+e+1/Nam+e+2 (path like, but with findByName) 4. http://foo.com/foos/index/x/a:1/b:2 (named args) 5. Other? -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Translate error messages
On Apr 9, 1:09 pm, stefanb <[EMAIL PROTECTED]> wrote: > How can I translate the error messages in validate arrays? > > example: > > public $validate = array( > > 'name' => array( > 'validtext' => array('rule' => > array('validTitle', 'name'), > 'message' => 'Not a > valid name, you fool!'), > 'between' => array('rule' => > array('between', 3, 32), > 'message' => 'Must be > between 3 and 32 characters long')), > 'description' => array('rule' => array('validText', > 'description'), > 'message' => 'Not a valid > description, you fool!'), > 'url' => array('rule' => 'url', > 'required' => false, > 'allowEmpty' => true, > 'message' => 'Not a valid URL')); > ?> Set the $validate in __construct() so that you can use __() method. Refer http://groups.google.com/group/cake-php/web/frequent-discussions -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Pagination with Filter/Search Box
On Apr 7, 9:07 pm, Kyle Decot <[EMAIL PROTECTED]> wrote: > I am creating a skatepark directory website, and I want to include a > filter/search box where you can search parks by name, and filter by > state, price, size, etc. Has anybody done anything similar, or have > any suggestions on how to do this? Thanks for the help. ' > > My website is:http://www.theskateparkdirectory.com/browse/ 1. Bake "foos" for Controller, Model and Views 2. /views/foos/index.ctp create('Foos', array( 'action' => 'index', 'method' => 'get' // Important )); echo $form->input('q', array( 'label' => false )); echo $form->submit('Search'); echo $form->end(); //Important, before paginate elements $paginator->options(array( 'url' => $this->params['named'] )); ?> 3. /app/app_controller.php http://foo.com/foos/index/?q=x&blah=y to // http://foo.com/foos/index/q:x/blah:y function _redirectQueryToNamed($whitelist_param_names = null) { $query_strings = array(); if (is_array($whitelist_param_names)) { foreach($whitelist_param_names as $param_name) { if (!empty($this->params['url'][$param_name])) { // query string $query_strings[$param_name] = $this->params['url'] [$param_name]; } } } else { $query_strings = $this->params['url']; unset($query_strings['url']['url']); // Crazy, Remember: Can't use ?url=foo } if (!empty($query_strings)) { $query_strings = am($this->params['named'], $query_strings); $this->redirect($query_strings, null, true); } } } ?> 4. /app/controlers/foos_controller.php _redirectQueryToNamed(); // // stuff $this->params['named'] in conditions } } ?> Summary: Have the form in GET and force the page to namedArg; then retain the namedArgs in paging. Then, use $this->params['named'] in paginate conditions. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Page specific javascript
On Apr 8, 8:59 am, John R <[EMAIL PROTECTED]> wrote: > Is there an easy way with Cake to get /js/register.js to be > automatically included in register.ctp? (And conversely not included > if it doesn't exist?) Not automagic, but you may add this in the view file: $this->addScript('register'); -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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 handling huge database
On Mar 17, 11:24 am, crazyDavid <[EMAIL PROTECTED]> wrote: > I'm developing an application in cakephp 2.0 which needs to handle > database with minimum of 100,000 rows of data. I'm using mysql > database and apache (xampp). I'm facing a lot of problems during > findAll() and paginate(), the script halts and is not executed > completely. has someone been through a similar problem or someone > knows the way around it, i'd be greatful to your suggestion and help. > thanks in advance. 1. Try restricting the associations: a. on the fly with unbind(), b. with Bindable behavior 2. http://groups.google.com/group/cake-php/browse_frm/thread/5f8ca538868298d0/440ff5f5eafb47e1?#440ff5f5eafb47e1 -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Loosing faith in cake
On Apr 7, 4:16 pm, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote: > Heh, nice, but you also have the fifth, "contribute in every > situation", and it is really hard to see the contributing part in > repeating the same thing ten times in a row. > > Besides, my post was criticism too, right? ;-) :-) -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Loosing faith in cake
On Apr 7, 1:37 pm, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote: > While I agree that the post title is not appropriate, I get this > feeling that everyone here is just waiting for something like this to > happen so they can jump the author. > > Yes, it's wrong, the guy got it, get on with it. FWIW, "Criticism may actually be an expression of faith in us rather than a put down" -- Azim Premji -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Model find() to return object; instead of array (?)
On Apr 4, 11:41 pm, Baz <[EMAIL PROTECTED]> wrote: > Just throwing in my two cents, but I've had frequent problems with > phpMyAdmin exceeding timeout limits (and once even memory limits) on a > shared hosts... > > So, trying to compare phpMyAdmin with what you're trying to do isn't really > fair. All it does are imports and exports (in terms of large processes). I haven't checked phpMyAdmin lately. But, as I remember, the export to SQL on phpMyAdmin is on-the-fly meaning that it is been sent to the browser in record by record. Of late, I have also seen programmers choose the direct export in SQL--instead of choosing it to zip/bzip---so that they don't get memory errors. > However, you *should* be fine with just pumping up both the allocated RAM > and exec. time for PHP, if you truly want to have this done through CakePHP. > > But what you're describing is neither a limitation for CakePHP or PHP > itself. You just have a butt load of data to deal with and memory issues are > going to be a problem with a butt load of data. I don't know why most of the experts are overlooking the situation. Some long time ago, when I said that there is no need for PHP 4 support, everyone was overlooking; now fairly everyone is realizing; similarly, I hope this situation will be realized sooner or later. The "export data" option is a common feature needed for any webapp--whether created with Cake or vanilla PHP. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Model find() to return object; instead of array (?)
On Apr 4, 7:49 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Fri, Apr 4, 2008 at 10:44 AM, jonknee <[EMAIL PROTECTED]> wrote: > > > > > Either that or you'll have to run queries using LIMIT and OFFSET to > > > > grab what you need one chunk at a time. I don't know any scripting > > > > language that handles sucking in 600,000 records via a web page. > > > > Think about phpMyAdmin? > > 1) phpMyAdmin is not a scripting language > 2) Notice I've said "sucking in 600,000 records" not "searching > through 600,000 records looking for something". There is a huge > difference in the two. I use phpMyAdmin every day for work and I > can't help notice that by default it limits the amount of data you can > pull back. > 3) This discussion is veering very far away from CakePHP. I'm talking about handling "exporting" module with CakePHP. It's relevant when you develop a project/application for clients. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Model find() to return object; instead of array (?)
On Apr 4, 6:04 pm, AD7six <[EMAIL PROTECTED]> wrote: > On Apr 4, 2:41 pm, "R. Rajesh Jeba Anbiah" > <[EMAIL PROTECTED]> wrote: > > On Apr 4, 4:51 pm, AD7six <[EMAIL PROTECTED]> wrote: > > > > On Apr 4, 4:08 am, Grant Cox <[EMAIL PROTECTED]> wrote: > > > > > We have some large reports for our application - often involving ~250K > > > > rows from 8 different tables. The problem is, if your reporting needs > > > > to do any kind of collating or comparison, as ours does, you really > > > > can't avoid having all the data loaded somewhere. You may be able to > > > > do much of it in your database which should stop PHP from running out > > > > of memory, but it'll have to be used somewhere. > > > > If you can get the db to do everything, everyone's a winner. > > > e.g.http://forums.mysql.com/read.php?79,11324,13062#msg-13062 > > > > If you can't get the db to do everything (because the logic isn't all > > > in the db, or it's too complex to do so, or because, because etc.), if > > > you generate your output in chunks (standard batch processing afaic) > > > and dump it into a temporary table - then you can do as above and > > > again: everyone's a winner :). > > > > Then you only need to send the file to the user, or redirect the user > > > to the right location. For a "standard" csv dump you can reduce your > > > php processing time and memory requirements to practically 0 in this > > > way. > > > But, that gonna increase the disk space requirements:-( I > > Holy crap, it'll mean you'll need a keyboard to do this aswell! The > list never ends :D > > ps: cache. deleting cache, temporary files, etc. LOL. BTW, for now, I have a temporary workaround. As per the parseExtension(), only the csv needs the record by record iteration; so passing the model object to csv view file and invoking find() with limit and offset seems to handle the situation. But, obviously, it's getting crazy for this export module. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Model find() to return object; instead of array (?)
On Apr 4, 4:51 pm, AD7six <[EMAIL PROTECTED]> wrote: > On Apr 4, 4:08 am, Grant Cox <[EMAIL PROTECTED]> wrote: > > > We have some large reports for our application - often involving ~250K > > rows from 8 different tables. The problem is, if your reporting needs > > to do any kind of collating or comparison, as ours does, you really > > can't avoid having all the data loaded somewhere. You may be able to > > do much of it in your database which should stop PHP from running out > > of memory, but it'll have to be used somewhere. > > If you can get the db to do everything, everyone's a winner. > e.g.http://forums.mysql.com/read.php?79,11324,13062#msg-13062 > > If you can't get the db to do everything (because the logic isn't all > in the db, or it's too complex to do so, or because, because etc.), if > you generate your output in chunks (standard batch processing afaic) > and dump it into a temporary table - then you can do as above and > again: everyone's a winner :). > > Then you only need to send the file to the user, or redirect the user > to the right location. For a "standard" csv dump you can reduce your > php processing time and memory requirements to practically 0 in this > way. But, that gonna increase the disk space requirements:-( I considered all known options; but record-by-record dumping is the only workable approach as far as I see. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Model find() to return object; instead of array (?)
On Apr 3, 11:12 pm, "Christian Winther" <[EMAIL PROTECTED]> wrote: > I use cake way for documents and sql data way above 100 megabytes in size > > My guess would be your setup is wrongly configured - rather than pointing to > php or cake as the problem. Obviously, you're overlooking the problem. > If you really need the resource, just do the mysql_select() and everything > yourself, it will use your default mysql connection - and should work out of > the box aswell. The reason why I posted it is that, I vaguely remember that it's been discussed and had solution. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Model find() to return object; instead of array (?)
On Apr 3, 10:40 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Thu, Apr 3, 2008 at 1:13 PM, R. Rajesh Jeba Anbiah > <[EMAIL PROTECTED]> wrote: > > > Cake's default way of dumping array in controller and iterating > > in view file, works only for the small data. But, on a typical project > > that requires "exporting of data", it doesn't work as it runs out of > > memory. This needs fetching the record one-by-one like I mentioned > > above. > > I understand. Sounds to me like something that exports data like this > is not suited to be a action within a controller. Maybe you should > look into making this a Cake shell task, as that would let you use all > the Cake goodness and be able to run from the command line. Shell is not the direct solution as it's exporting of data for admin and users. > Either that or you'll have to run queries using LIMIT and OFFSET to > grab what you need one chunk at a time. I don't know any scripting > language that handles sucking in 600,000 records via a web page. Think about phpMyAdmin? > > BTW, whenever you reply here with your remarks, I thought of > > asking "do you really use CakePHP?" SCNR > > For a guy who calls himself "Just another PHP saint", that's quite a > bold statement. Good thing my life doesn't revolve around worrying > about what ignorant people think about me. LOL. I'm not ignorant about you;-) > Yes, I do use CakePHP. Otherwise I'd be wasting my time here. Don't > blame me for failing to understand what your problem is. Maybe you > should look into how you're asking your questions. Yup, good advice. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Model find() to return object; instead of array (?)
On Apr 3, 6:51 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Thu, Apr 3, 2008 at 9:46 AM, R. Rajesh Jeba Anbiah > > <[EMAIL PROTECTED]> wrote: > > > On Apr 3, 5:58 pm, "Christian Winther" <[EMAIL PROTECTED]> wrote: > > > Why on earth would you do that? > > > > >Read the thread above.. the array dumping doesn't work for all the > > cases--especially on exporting the data. > > If you insist on fighting against Cake's conventions, or insist on not > adjusting your application to the realities of Cake's conventions, you > are facing an uphill battle. > > Maybe I'm stupid, but please enlighten me on how having Cake return > result sets as an object instead of an array set will help you. I am > not understanding how the objects will take up less memory than an > array when you have 600,000+ records. Like I mentioned above in *this* thread, I wrongly used the term "object"--but I actually meant "resource". Cake's default way of dumping array in controller and iterating in view file, works only for the small data. But, on a typical project that requires "exporting of data", it doesn't work as it runs out of memory. This needs fetching the record one-by-one like I mentioned above. BTW, whenever you reply here with your remarks, I thought of asking "do you really use CakePHP?" SCNR -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Model find() to return object; instead of array (?)
On Apr 3, 5:58 pm, "Christian Winther" <[EMAIL PROTECTED]> wrote: > Why on earth would you do that? Read the thread above.. the array dumping doesn't work for all the cases--especially on exporting the data. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Model find() to return object; instead of array (?)
On Apr 3, 3:48 pm, "Matias Lespiau" <[EMAIL PROTECTED]> wrote: > I think this is the link your a looking for:http://bin.cakephp.org/saved/1237 I'm sorry, I actually meant "resource"; not "object". -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Model find() to return object; instead of array (?)
On Apr 3, 12:24 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > As on that page I would also suggest you look at some of the bahaviors > in the Bakery that can help with binding and unbinding data not needed > for the current request. Thanks for your ideas; but none of them are helpful as it's about "exporting of data" > Another thing you can make use of for exports is paginate. Yes > really :) If you are dumping 600 000 rows at once you could probably > run out of memory. By running the export in a few passes are appending > the exported file (or wherever the data is going) each time you will > use less memory. (sure you can also "paginate" manually but what fun > would that be?) Hmm molding our code for the framework! Anyway, good thought. > I often run big-memory and long-time data management from the php-cli > using cron or other trigger. The case, I'm talking about is not exclusive of cli php -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Model find() to return object; instead of array (?)
On Apr 3, 11:51 am, Grant Cox <[EMAIL PROTECTED]> wrote: > I'm not sure of any method - but why do you think that all your rows > as arrays will use up more memory than the same amount of data wrapped > in objects? Is it just a pass by reference vs pass by copy issue? I'm sorry, I goofed it up with the term "object"; I actually meant "resource". Cake is currently dealing like this: I want something like: -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Model find() to return object; instead of array (?)
It's very crucial to have the find() or similar returns DB object instead of full array--as for any data export module, we cannot dump the whole array which would result in memory error. IIRC, someone provided how to do that in CakePHP, but I lost the link; but, when I google, the closest I get now is http://jimmyzimmerman.com/blog/2007/05/why-i-prefer-ruby-on-rails-over-cakephp.html Is there anyone who bookmarked such previous hack or can provide any hint? TIA -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Array of named arguments(?) - pagination related
On Apr 3, 4:02 am, Lisa <[EMAIL PROTECTED]> wrote: > maybe you mean like this? > > http://groups.google.com/group/cake-php/browse_thread/thread/675b44ae... It's talking about retaining search param which is already here http://groups.google.com/group/cake-php/web/frequent-discussions?version=122 But, what I'm talking about is the situation where you have two pagination on a page (it's possible by passing Model param); but when clicking on the pagination links on any block, it's resetting the other---as there is only one "page" namedArg; we actually need to retain/associate this "page" namedArg for different paging blocks. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Array of named arguments(?) - pagination related
When trying more than one pagination on a page, the pagination is getting weird as it's resetting with the single named args (like page: 1). So, is there anyway to mention the array of named argument--so as to attach it to the model? (say, model[page]:1 or so?) -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Discussion on cakephp-official-resources
Off topic, but I'm just interested to know how have you made this sticky? --~--~-~--~~~---~--~~ 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: Image Upload Behavior
On Mar 25, 8:38 pm, "John David Anderson (_psychic_)" <[EMAIL PROTECTED]> wrote: > On Mar 25, 2008, at 9:22 AM, Chris Hartjes wrote: > > On Tue, Mar 25, 2008 at 9:39 AM, rachev.preslav > > <[EMAIL PROTECTED]> wrote: > > >> I am having some problems with this behavior, more specifically in > >> the > >> behavior's beforeSave() function. > > > If you expect some help, how about telling people the actual problem > > you are experiencing. As smart as the people on this list are, there > > are no mind readers. Well, none that will admit it anyway. > > Hello, I'm psychic. LOL -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Override __() (?)
I'm thinking of moving the multi-language support to DB. So, basically I want to have: __($text, $lang_code='en_us') and a DB table for translations (lang_code, controller, action, text_key, translation). I believe, this will be easier to manage the translation. But, my current question is how to override __() in official way? TIA -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: ACL for form fields (?)
On Mar 10, 4:17 pm, grigri <[EMAIL PROTECTED]> wrote: > This might > help:http://lemoncake.wordpress.com/2007/10/10/extending-acl-to-per-field/ Lightning speed:-) Thanks. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Transition an App from 1.1 to 1.2
On Mar 10, 5:22 am, BT <[EMAIL PROTECTED]> wrote: > Does anyone know any resources that can help people transition > existing apps from cakephp 1.1 to 1.2? > > I'm looking for items such as a list of deprecated functions, their > replacements, perhaps an essay or two on the larger changes in > approach as well. > > Our app is still evolving and I think it may be time for us to make > the transition to 1.2 now, before moving on to our next phase in > development. Personally, I feel it's difficult to move 1.1 to 1.2. However, if you have proper revision control (svn) in your environment, you give it a could try. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
ACL for form fields (?)
I'm about to try the Cake's ACL for individual form fields. Say, username field should be shown only for "admin" on a particular form. I just want to know, if it's an acceptable solution for handling form fields--or is there any better approach available? TIA -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Discussion on frequent-discussions
Couldn't remove the spam; looks like GG is broken now. So, the spam free version should be http://groups.google.com/group/cake-php/web/frequent-discussions?version=111 --~--~-~--~~~---~--~~ 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: CookBook PDF
On Mar 9, 9:08 pm, koko <[EMAIL PROTECTED]> wrote: > Hey I've printed the book for my own reading because I don't like to > read from HTML (the look is difference) and if I wnat to print any > page it'll be easier > > I've told the documentation leader in CakePHP about the book and if he > can link to it ... but he didn't answer me !! > > here is the link (hope it helps) > > http://www.4shared.com/file/38429753/91f22677/CakePHP_Manual.html I think, it's morally wrong to put your name like an author of the manual. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Optional Form Field
On Mar 7, 8:11 pm, Greg Baker <[EMAIL PROTECTED]> wrote: > I did this by adding 'required' => false, 'allowEmpty' => true in my > validation array One thing that is often overlooked (IMHO) is that the validation option is for the model; not exactly for the form. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Dynamic Error Messages in 1.2?
On Mar 7, 2:29 am, Mike <[EMAIL PROTECTED]> wrote: > In CakePHP 1.2, one can define a validation rule (in a model) that > calls a method to do the validation. If the method returns false, > then whatever message was specified for that rule is displayed in the > view, which is great for most of data validation needs. At least for me, the form handling is one of the huge pains. I hope, you're looking for http://bakery.cakephp.org/articles/view/conditinalvalidation-behavior -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: "Fatal error: Allowed memory size of..."
On Mar 7, 5:56 pm, Baz <[EMAIL PROTECTED]> wrote: > Hey, there was information about data sizes or what the application does. > > But I have a fairly simple app running off of a practically empty database, > that averages 10 MB. So again, I'm simply saying 16MB isn't enough for any > substantial PHP app. > > I never said that you shouldn't try to optimize, but 16 MB?? IMO, not > enough. Thanks for your follow-up. AFAIU, memory limit is for the script http://in2.php.net/ini.core#ini.memory-limit; not the application as a whole. Less memory limit is usually advised to avoid crashing PHP (e.g., str_repeat('x', 9), IIRC. IIRC, for the memory problem in CakePHP, someone suggested to pass the DB object to view than dumping the whole array in controller and get that array passed to view or to use limit. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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 performance
On Feb 29, 6:06 am, Jon <[EMAIL PROTECTED]> wrote: > Like many other I'm shopping around for a framework. I'm playing with > both CI and Cake. FWIW, of late, I found that Kohana is the active fork of CI -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: "Fatal error: Allowed memory size of..."
On Mar 7, 9:01 am, Baz <[EMAIL PROTECTED]> wrote: > Exhausting 16MB is not impossible. This topic has come up before. I leave > you with this: Out of the Box, Wordpress uses 5 MB. I run a blog that tops > out at 15MB with a nice size database and a ton of plugins. > > So, for a project that actually DOES stuff, 16MB is simply not enough. I can't quite agree here. This is where we have to use optimization and data structure. More memory means usually poor architecture or less optimization. There is always a limit by how much we can stretch on the hardwares. FWIW, I recently had to do a svn spy--which is extremely simple 3 liner script if I had used array and sort functions: shell_exec('find / svn/repos -cmin -420 -printf \'%T+ %p\n\' | grep "/db/revs/"'); But, I can't stretch the memory limit to high number; but solved it by dumping to file and reading line by line. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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 performance
On Mar 1, 8:40 pm, "John David Anderson (_psychic_)" <[EMAIL PROTECTED]> wrote: > On Mar 1, 2008, at 3:04 AM, R. Rajesh Jeba Anbiah wrote: > > On Feb 29, 6:06 am, Jon <[EMAIL PROTECTED]> wrote: > >> Like many other I'm shopping around for a framework. I'm playing with > >> both CI and Cake. I really love Cake but am concerned about the > >> performance. I'm planning to use memcache and all the other server > >> goodies to speed it up but are there methods within the code to > >> optimize things? > > >> I noticed that I can declare $helpers within each function and > >> therefore include only those that I need. > > > When we had to move to MVC framework, we analyzed both CI and > > Cake. CI is simple and fast. But, we preferred the Cake for it's many > > automagic goodies and where we faced many problems. I still don't find > > an easy way to reduce the queries in official automagic Cake way > > (except finderQuery); even Bindable Behavior is not helpful. > > Bindable is awesome. How can it not help when it does *exactly* what > you're asking for? As far as I tried, Bindable works for dynamically adding/ removing associations. But, think about the blogs' view page which uses Post, User, and Comment models. The user_id to username transition on Comments listing really needs "recursive" option in Cake's official way (as far as I understand; like I said, I may be wrong). When listing "Related Comments" on the page (which doesn't have pagination in official way is another problem we faced http://groups.google.com/group/cake-php/msg/3d9c0f92a7b552bf ) grows to about 50 comments, the DB is jammed. > > So, in my humble opinion, Cake is a good thing when you have a > > control over what and where to display. But, on a typical client > > projects, we mostly scratch our heads on core things and trying to > > avoid automagic stuffs instead of concentrating on business logic. > > It's just my experience; I may be in a minor moronic group. YMMV. > > However, I find some lot of things are improving on Cake; so may be > > lot of things could be improved after sometime. > > There's a reason Cake forces you to do what you should. MVC is a very > tried-and true approach, and the code is written that way for a > reason. If you find it getting in your way, you might want to double > check what you're doing. > > I also don't see why you'd want to avoid automagic stuff - it keeps > the amount of code you need to write down to a minimum. Other > frameworks require you to load models and things on your own - cake > does that because it saves you time. I don't get you; you're appreciating Bindable behavior and also the automagic stuffs; and I'm confused about your stand/opinion. Thanks for your follow-up. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Is JQuery replacing Prototype in cake?
On Feb 14, 8:36 pm, Baz <[EMAIL PROTECTED]> wrote: > Good times! There are a lot of arguments as to which of these frameworks is > better. But IMO, I think JQuery is better suited to CakePHP's uses. Just > need to include the form plugin (can't live without it). > > Currently, I just dump a JS block at the top of my view/element when needed > and make sure I define my own IDs or DIV holders. FWIW, my previous take https://trac.cakephp.org/ticket/2359 -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: behavior acts_as_list
On Feb 12, 3:56 am, Baz <[EMAIL PROTECTED]> wrote: > Members: > >- This is a big one. Please try to understand that CakePHP is very >intimidating to novices and sometimes people need *exact* examples. >Not "hunt through this post with 12 different replies and try to pluck out >something that may work for you" >- Along the lines of the above point, try to differentiate when you're >pointing to an *exact* solution and *reference *material. Then the >person knows what to expect. >- Try to understand that you guys live and breath this thing. Some >things just aren't clear to some people. It took me months before I could >figure out 1/4 of the stuff that the $options array does in the $form > helper >by reading through the api. >- Try to be patient. I know it comes easy to you, but people wouldn't >be asking if the answer was obvious. >- Try to understand a novice's question first before pointing them to >some general solution. >- Sometimes an explanation is worth a lot more than a link to an old >thread/post/etc. Code isn't as clear to others as it is to you. >- Try not to look down on the ignorant. You, of all people, should >appreciate the complexities of CakePHP. > > I must say that I've been guilty of all of the above on some occasion or the > other. > > Before you ask/answer a question, try to look at it from the other person's > perspective before you hit the send button. +1 > Question: Why don't we have a rules and regulations text (one the homepage > of the group perhaps?) that states policies on question asking such as > researching, reading, duplicates, etc? Wiki would be ideal to setup knowledge base (someone could flame on me:-)) --~--~-~--~~~---~--~~ 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: Un-escaping sanitized data for display
On Feb 1, 1:52 pm, AD7six <[EMAIL PROTECTED]> wrote: > On Feb 1, 6:51 am, "R.RajeshJebaAnbiah" > > <[EMAIL PROTECTED]> wrote: > > On Jan 31, 5:55 pm, AD7six <[EMAIL PROTECTED]> wrote: > >> Cake automatically escapes data in db queries - you are already > > > protected against sql injection. xss etc is a different matter, and is > > > an example of where sanitize fits in. > > > > > > Having checked your codes in UploadBehavior and impressed with > > your tricks, may I know how do you handle HTML inputs? I know, cake's > > default scaffolding add, edit interfaces handle HTML inputs; but not > > view and index. > > I'm not sure what aspect of accepting html you are asking about. > > How to store it? html in the db > How to avoid malicious content? Sanitize::stripScripts (or other as > appropriate) beforeSave > How to display it? echo $html->clean($stuff) * Many thanks for your input. I was talking about the following situation: 1. Use bake script to create controller, model and views. 2. When creating controller with bake script choose no for scaffolding and choose basic methods (index, add,..) option 3. When creating view with bake script choose scaffolding view option. a. In the generated view page, /foo/add Enter a HTML content, say "alert('cake'); b. Check the entered content with /foo/edit/id Here the HTML content is escaped and so there is no JavaScript alert window. c. Check the entered content with /foo/view/id Here the HTML content is not escaped; so getting alert window. It is/was quite difficult to manage the form handling--need to set validation rule in model, other stuffs in views (like classes, etc). Some cases, the HTML content shouldn't be escaped (when admin posts some HTML) but has to be escaped when users post it. I'm thought of moving validation things to a new behavior code and handling forms and user data with another helper (ref http://groups.google.com/group/cake-php/msg/06deff28435aacb7 ) I was just wondering, how globally you control the user content. I understand that you're taking project based approach--not generalized approach as you've done in your UploadBehavior kit. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Un-escaping sanitized data for display
On Jan 31, 5:55 pm, AD7six <[EMAIL PROTECTED]> wrote: > Cake automatically escapes data in db queries - you are already > protected against sql injection. xss etc is a different matter, and is > an example of where sanitize fits in. Having checked your codes in UploadBehavior and impressed with your tricks, may I know how do you handle HTML inputs? I know, cake's default scaffolding add, edit interfaces handle HTML inputs; but not view and index. (p.s. I may not access internet till Monday; so if I'm not replying for your follow-up, please don't get offended). -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Un-escaping sanitized data for display
On Feb 1, 10:50 am, José Pablo Orozco Marín <[EMAIL PROTECTED]> wrote: > Cake automatically escapes data in db queries - you are already> protected > against sql injection. xss etc is a different matter, and is > > an example of where sanitize fits in. > > Just a few questions: > > 1. If create a search form that is searching for user input, in the > controller do i needt to sanitize the data befor to use findAll? > > 2. Do i have to use the following code before to save, delete or > find?http://bin.cakephp.org/saved/20459 No, cake automatically handles/escapes. But, make sure, your "conditions" params are in array format; otherwise sanitize doesn't apply (AFA*I*K) -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Dynamic form creation?
On Jan 23, 3:20 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote: > Store fields name and type in db, and use $form->inputs( $arrayOfFields ); As far as I have seen this, it's not that easy. Similar idea would work with PEAR QuickForm, but cake's validations are tied up with model and input field type creations are tied up with view helpers. So, for now, I'm thinking of writing a dynamic validation behavior and another form helper inheriting core's form helper. Not still sure that it gonna help. -- Email: rrjanbiah-at-Y!comBlog:http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Pagination and search.
On Jan 28, 10:56 am, bhushan A <[EMAIL PROTECTED]> wrote: > I have achieved 'pagination' and 'search' differently. Means when i > am putting my search criteria in text field then records are getting > displayed as per search criteria but but pagination is not as per > search criteria. How to achieve it? Do i need to change controller? > If yes then what to change? Please help me. See http://groups.google.com/group/cake-php/web/frequent-discussions -- Email: rrjanbiah-at-Y!comBlog:http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Making RSS feeds with CakePHP
On Jan 28, 4:21 am, MonkeyGirl <[EMAIL PROTECTED]> wrote: > I'm trying to set up some RSS feeds using CakePHP. FWIW, http://groups.google.com/group/cake-php/web/frequent-discussions -- Email: rrjanbiah-at-Y!comBlog:http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Can't get my head to spot it right, complex ACL
On Jan 26, 10:38 pm, francky06l <[EMAIL PROTECTED]> wrote: > I have got a problem, I can't, after examining few solutions, find the > right ACL solution for the following. Not an answer.. I don't know/haven't looked closely at ACL. But, I think, othAuth can satisfy your conditions. Is there any particular reason for adopting ACL than othAuth? -- Email: rrjanbiah-at-Y!comBlog:http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Dynamic form creation?
On Jan 21, 2:10 pm, cakeFreak <[EMAIL PROTECTED]> wrote: > I did the following while working on a dynamic questionnaires > generation system. I think, you've misunderstood my question. This is not about multiple form inputs nor about DOM append. Post RoR saga, many clients have shifted their interests from CMS to UIMS so that they can customize the UI especially forms. Majority of the requirement is to add/remove form fields by admin in signup page. -- Email: rrjanbiah-at-Y!comBlog:http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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 & Strange Session behavior
On Jan 22, 5:22 am, GardenWeazeL <[EMAIL PROTECTED]> wrote: > I suspect it's because the cake session is named CAKEPHP and the > default session is called PHPSESSID. Exactly I had the same problem lately. Set Configure::write('Session.cookie', 'PHPSESSID'); -- Email: rrjanbiah-at-Y!comBlog:http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Dynamic form creation?
On Jan 20, 8:10 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I decomposed each form element in "form element" linked to a model and > a controller (for example, all forms have a similar > "client_identification" part that is linked to the client controller > and model). Another example is a "donation_info" form element that is > linked to the donation model and controller. So it's a not a fully > customizable dynamic form creator, the form must be "assembled" out of > pre defined elements and they can also add some custom fields. Many thanks for sharing your ideas. Before starting this thread, I had 2 ideas: 1. Create model files and DB tables dynamically 2. Keep the form configurations in a DB table and handle them I felt that both of the approaches are inefficient/unintelligent and so posted this question. After googling a lot, I just seem to get some solutions/works in Django (still not sure) and I'm yet to look at those closely to see if they're efficient. Thanks again for sharing the ideas. -- Email: rrjanbiah-at-Y!comBlog:http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Dynamic form creation?
On Jan 20, 9:13 am, Baz <[EMAIL PROTECTED]> wrote: > I guess I'm misunderstanding also, but what was the problem with > $form->inputs()? > > If your using that database, that means model. $form->inputs() dumps inputs > for all the form fields. The situation is more of like allowing the users to create models; the users define fields, rules/validations, labels, etc -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Dynamic form creation?
On Jan 20, 12:30 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Jan 19, 2008 1:01 PM, R.RajeshJebaAnbiah > > <[EMAIL PROTECTED]> wrote: > >I'm not sure, if you have understand my question. RoR based > > frameworks allow easy creation/use of form when DB table is created. > > But, I'm looking for a solution to create forms dynamically--something > > as in LimeSurvey. > > I *think* I may have run into what you're talking about here. I'm > building a section of a web site for voting on things (the simulation > baseball league I am in has a vote during the off-season for changing > league rules and rules for the game we use), and there can be any > number of items on the ballot. > > So, while googling around looking for some help on this I found that > you can use the following notation to create multiple instances of the > same field: > > $form->input("{$x}.Model.field") Multiple form inputs is one way of handling dynamic forms. But, I was looking for more control--dynamic validations, etc. Since, the user data are tied up closely with DB tables and models in RoR based frameworks, I was thinking/looking for a generic and better approach to handle it. Thanks for the suggestion anyway. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Dynamic form creation?
On Jan 19, 9:55 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote: > have you checked the FormHelper::inputs() method? I'm not sure, if you have understand my question. RoR based frameworks allow easy creation/use of form when DB table is created. But, I'm looking for a solution to create forms dynamically--something as in LimeSurvey. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
i18n with DB?
Lot of people/clients prefer to edit the language strings and have them in DB. As I understand, we cannot use TranslateBehavior to change the language of the UI; am I mistaken or is there any solution? TIA -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Dynamic form validation rules?
I'm searching to see if there is any dynamic form validation (dynamically change the validation for a particular form field from admin interface) implemented already. I hope, that is possible with Behavior; but like to know if any such implementation is already done. TIA -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Dynamic form creation?
Has anyone tried to implement dynamic form creation? I'm looking for a solution to implement dynamic form creations. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Question about Set class
On Jan 18, 5:01 pm, Fran Iglesias <[EMAIL PROTECTED]> wrote: > ?'ve been trying several paths with Set::extract to get it but my > best result is with '{n}.{n}.task', which produces FWIW, when I profiled Set class last time, it was relatively huge hit. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Proper way to sanitize all data?
Could anyone suggest the right approach to sanitize user inputs? Currently having $this->data = Sanitize::clean($this->data) in AppController. Is there any better option? TIA -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: Making a video screenshot from wmv
On Jan 10, 4:38 am, "Aria Rajasa Masna" <[EMAIL PROTECTED]> wrote: > Hi everyone, > I wanted to take a screenshot from an user uploaded video, any links and > references I can follow regarding that matter? Owh and I was wondering on > how to make a animated gif screenshot like the one displayed > here:http://cakephp.org/screencasts > > Any help would be greatly appreciated Google "ffmpeg" -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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: How to implement "Export to CSV" link in cake-php
On Jan 9, 11:32 am, bhushan A <[EMAIL PROTECTED]> wrote: > Hi all, > >Can anybody help me how to write code for "Export to CSV" link? Or > there is any provision in cake php for that.? Search for "parseExtensions" http://groups.google.com/group/cake-php/web/frequent-discussions -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---