Re: User Bar Logic
I am pretty sure I have something in one of my apps setting variables in app_controller and readin the info in the default template. I will double check.What I am doing for login info though is setting it in the session and then checking for it in the default template. So you can always set a variable in the session and then check for it in your layouts. This would bypass the need to use the set() method.On 8/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I understand why you would want to write it in the app_controler (sothat all controllers might inherit from this). The problem is, theredoesn't seem to be a way to declare variables outside of functions.And, as you probably are finding out, when a application controller inherits from the app_controller, the function declared inapp_controller (with the variable "foo", let's say) would beoverwritten. Good question, but not sure how to make it work orachieve "visibility". --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: User Bar Logic
I understand why you would want to write it in the app_controler (so that all controllers might inherit from this). The problem is, there doesn't seem to be a way to declare variables outside of functions. And, as you probably are finding out, when a application controller inherits from the app_controller, the function declared in app_controller (with the variable "foo", let's say) would be overwritten. Good question, but not sure how to make it work or achieve "visibility". --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Multiple select and relationship many-to-many
zonathen wrote: > [...] doesn't the many-to-many table name need to be in > alphabetic order as such: "alphafirst_alphasecond", or "areas_events". That's correct. Also, be aware that if you have an underscore (_) in a table name the underscore comes AFTER alphabetic letters. So: images >> image_lists_images << image_lists NOT: images >> images_image_lists << image_lists --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
bindModel conditions causing problems
Morning all, How's the weekend? I'm just starting to play around with the bindModel and unbindModel functions and I've got to say I'm pretty happy with them. However, one small issue arises when I try to include conditions in my association. I've tested a little bit and the fact I'm creating the association on the fly makes no difference. Setting the condition in the $hasMany association array of the model creates the same problem. For example, a Model ConfigOption which has many ConfigChoices I bind with the following: /* has many */ var $hasMany = array( 'ConfigChoice' => array( 'className' => 'ConfigChoice', 'dependent' => false, 'foreignKey' => 'config_option_id', 'order' => 'ConfigChoice.sequence ASC', 'conditions' => array( 'ConfigChoice.selected' => 'Y' ) ) ); For some reason, the SQL statement created withOUT the condition has a WHERE clause: WHERE `ConfigChoice`.`config_option_id` = '1' The WHERE clause when the condition is included: WHERE (`ConfigChoice`.`selected` = 'Y') AND (`ConfigChoice`.`config_option_id` = ''1'') Very odd. Am I doing something wrong here in setting up my associations? Thanks for your help on this one. Freedom --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
multiple hasAndBelongsToMany ajax create/add form...
OK, I've managed to confuse myself. Here's the model: Articles Posts Tags A tag has a many to many relationship with both articles and posts, so a single tag object has a list of articles and a list of posts. (nice for searching by tags) An article or a post has a list of tags. That works just fine. Now I am trying to create a little form wherein a user can type a tag name in a single input box. The associated action should either associate an existing (matching) tag to the article, or create a new tag if nothing matches, and then associate the new tag to the article. A similar form for posts will do the same thing. I've tied myself in knots trying to figure out the "right" way to do this. Or even get it to work. Am i giving myself unnecessary headaches using a many to many relationship? Should I just use a 1 to many and let there be many tags with the same name? cheers, iceaxe --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: continuous update
Hi Ros Soft, Thanks. This is great and does exactly what I need. I will give it a try Regards --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Alternating Row Colors
I have been doing something something similar in my views. $row): ?>> I have the altRow class defined in my style sheet. On 8/19/06, c_doug <[EMAIL PROTECTED]> wrote: Can anyone tell me how to alternate row colors in CakePHP? Is itsimilar to doing it in regular PHP?Ex:$row_color = ($row_count % 2) ? $color1 : $color2;$row_count++; --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Re: Filtering Data
Oh I use it too, I just try to avoid it because I don't want to create too many dependancies to a particular DB engine, it is far too easy for me to put mysql specific syntax in there then I loose the portability that a database abstraction layer buys me. Now if I was very instinctive about using pure 'sql' I wouldn't worry too much about it... IMHO, Sam D On 8/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > sam D, > > "really you want to avoid the custom sql (using ->query) as much as > possible" > > Why? That method seems to work fine. I use query(). > > Please elaborate. > > Ralph > > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: continuous update
A live grid control: http://openrico.org/rico/livegrid.page --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
continuous update
hi, The question I have might be simple, but I am not sure how to do it. Personally, I don't like pagination and would like to see all the search results on one page. But then the problem is, it takes too much time to retrieve all the relevant records from the database and render them on a webpage, all in one go. Is there any way to make these two different processes to run in parallel i.e. as soon as few relevant records (say 5 or more) are retrieved from the database, render them on the webpage and keep doing this until all the records are displayed. If there are thousand or more record, display only 500 or so records, and wait for user to scroll to the bottom of the page, before again starting to retrieve the records. The idea that I am proposing is similar to "windows live". Currently, windows live display search results as I described above and I really like this way of interaction. Considering HCI, this minimizes the number of mouse clicks, and also saves lot of time. Looking forward for suggestions as well as alternatives from bakers. Regards --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Problems with components in php4
On 8/19/06, RosSoft <[EMAIL PROTECTED]> wrote: > > The paste is deleted. Repaste it and be sure to check 'save paste' > Rodrigo Perez ha escrito: Oh, sorry... I repaste and new url is http://cakephp.org/pastes/show/d3968053471ab3fecfa353445fd2e6e1 Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Filtering Data
sam D, "really you want to avoid the custom sql (using ->query) as much as possible" Why? That method seems to work fine. I use query(). Please elaborate. Ralph --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Help with form helper
Right now the best place to check is the API: http://api.cakephp.org/class_form_helper.html Keep in mind, however, that most of the transition will take place in 1.2, which is as-yet undocumented, so you just have to look at the code. Fortunately helper code is pretty straightforward, and should make sense if you're familiar with how to use helpers in Cake. https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/view/helpers/form.php --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Advice needed (about forms)
First, I must say thank you for developing cakePHP. I used mojavi, zoop and others but cake is the best. Now, I'm new baker. I want to implement simple signup form. I have 2-3 tables upppsss models :) with established relations. For example, Signup form should take and validate all required fields from member model and associated models... like country_id which is foreign key to countries table. I wonder what's the best way for that? 1. Should I use $html helper as described in manual 2. should I use formHelper (If yes, where can I learn how to use it?) 3. Should I immediatly start with some fancu ajax forms (if yes, how?) Thank you bakers I hope you'll teach me the craft :) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: output DISTINCT records
I did search the group previously and found the topic linked from the page you posted. I just haven't been able to get it to translate to what I am doing yet. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: output DISTINCT records
Thanks. I wasn't aware of the search link you posted. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Alternating Row Colors
Can anyone tell me how to alternate row colors in CakePHP? Is it similar to doing it in regular PHP? Ex: $row_color = ($row_count % 2) ? $color1 : $color2; $row_count++; --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Validation: Futureproof / Accepted Technique?
I just posted a new tutorial for an improved advance validation with parameters on the CakePHP wiki. Check it out on this page: http://wiki.cakephp.org/tutorials:advanced_validation:advance_validation_with_parameters:improved_advance_validation_with_parameters --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Problem with $hasOne...can somebody tell me what's wrong
Here are my tables: DROP TABLE IF EXISTS `countries`; CREATE TABLE `countries` ( `id` int(11) unsigned NOT NULL auto_increment, `name` varchar(255) collate utf8_bin NOT NULL, `iso2` varchar(2) collate utf8_bin NOT NULL, `iso3` varchar(3) collate utf8_bin NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; DROP TABLE IF EXISTS `members`; CREATE TABLE `members` ( `id` int(11) unsigned NOT NULL auto_increment, `first_name` varchar(50) collate utf8_bin NOT NULL, `last_name` varchar(50) collate utf8_bin NOT NULL, `username` varchar(32) collate utf8_bin NOT NULL, `password` varchar(32) collate utf8_bin NOT NULL, `collector_type` enum('BY_TYPE','BY_YEAR') collate utf8_bin NOT NULL, `country_id` int(10) unsigned NOT NULL, `state` varchar(100) collate utf8_bin NOT NULL, `city` varchar(100) collate utf8_bin NOT NULL, `zip` int(10) unsigned NOT NULL, `address` varchar(255) collate utf8_bin NOT NULL, `phone` varchar(50) collate utf8_bin NOT NULL, `cell_phone` varchar(50) collate utf8_bin NOT NULL, `email` varchar(255) collate utf8_bin NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; Here are my models: array('className'=> 'Country', 'conditions' => '', 'order'=> '', 'dependent'=> false, 'foreignKey' => 'country_id' ) ); */ var $validate = array( 'username' => '/[a-z0-9\_\-\.]{6,}$/i', 'password' => VALID_NOT_EMPTY, 'first_name' => VALID_NOT_EMPTY, 'last_name' => VALID_NOT_EMPTY ); } ?> And controller: Member->findAll(); print_r($members); } } Problem is when I uncomment $hasOne line in Member model print_r($members); returns nothing when is commented out everything is fine... ofcourse, expect the fact that relationship is not defined?? Can anubody check this and tell me what I'm doing wrong?? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Intercepting dispatcher's routes
If they're static, keep them in webroot/files. Then you can link to them as site.com/files/pdf.pdf --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Cross Application Sesssion
Mandy, that's because I wasn't on IRC ;-) in app/config/core.php, there is a setting called CAKE_SESSION_SAVE, set that to 'database', and load the SQL from app/config/sql/sessions.sql into your database. Then, if you include the same database in both applications, you should be able to share session data. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Field is apparently a reserved word.
I created a model called 'Field' with a table called 'fields', and a controller called 'FieldsController' and got no errors querying data. What kind of errors were you getting? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: User Bar Logic
Can't you just set them like you would a regular variable in the controller and have it show up? i.e in the controller: $this->set('foo', $bar) On 8/19/06, Simplerules <[EMAIL PROTECTED]> wrote: > > Nobody? > > > > > -- Chris Hartjes "The greatest inefficiencies come from solving problems you will never have." -- Rasmus Lerdorf @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
NEW JOBS POSTED TODAY AS FOLLOWS :
Hi Dear Members, FOLLOWING R THE NEW JOBS POSTED THIS WEEK : Job Title Job Posted By IT Recruiter keriosolutions.inc Req-0304 -Microsoft / Citrix System Engineer keriosolutions.inc Req-0285 - SQL / Oracle DBA keriosolutions.inc J2EE sagittus Solutions Pvt Ltd Business Development Manager Emergys Software Pvt Ltd Opportunity for .Net with_ GCI,Microsoft YS Consulting Microsoft SQL Database Administrator for UAE Vinirma Consulting Pvt. Ltd. Urgently Required Credit card Professional For UAE Vinirma Consulting Pvt. Ltd. Urgently Required Delphi Programmer For Qatar Vinirma Consulting Pvt. Ltd. JAVA JLPT Infitech Global Urgently Required Tandem CobolProfessional For UAE Vinirma Consulting Pvt. Ltd. Required Oracle Application Database Administrator Vinirma Consulting Pvt. Ltd. Req Graphic Designer Anand Rathi Electrical Engineer Iron Ring Staffing Solutions I Electrical Designer Iron Ring Staffing Solutions I Instrumentation and Control Engineer Iron Ring Staffing Solutions I Planner and scheduler Iron Ring Staffing Solutions I Junior Municipal Engineer/Technologist Iron Ring Staffing Solutions I Need Microsoft SQL Database Administrator For UAE VAM SYSTEMS FZC Need Credit card Professional For UAE VAM SYSTEMS FZC Mortgage Originator National Lending Corporation SAS progammer marlabconsultants Experienced Content Developer Softech Web Developer / Web Programmer Softech Graphic Designer Softech Web Designer Softech Flash Rich Media Application Developer Softech Senior Developers Mumbai Based IT Company ASST.OPERATIONS MANAGER Inforide Technologies NETWORK/ SYSTEM ADMINISTRATOR WITH1+ EXP Inforide Technologies BUSINESS DEVELOPMENT EXECUTIVES NEEDED FOR MNC Inforide Technologies 'Business System Analyst'Sap,Java Architect' ADEAQUARE INC J2EE professional Raqmiyat, llc HR - Executive Added Values Testing requirement Added Values embeded techcomsolutions embeded systems techcomsolutions HR STC TECHNOLOGIES Cement Plant Specialist MTMM Req Java Software Engineer Venturesofttech career counselor STC TECHNOLOGIES Req Telecom Engg RLTD Software Engineer Fore-D Tech Sap BW Basis Technical Consultant AikonTechnologiesInc PLS APPLY ONLINE ON www.net4professionals.com *Looking For Better Jobs/Employee? -Search Jobs/Resumes and Apply Online/Call 4 Interview FREE -Browse Interveiw Calls Free -Employers Can Post 5 Jobs Free And Also Win Free Gifts http://www.net4professionals.com (A2Z HR INFO SERVICES INDIA)THE COMPLETE e-JOBS SOLUTIONS PROVIDER... REGARDS --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: User Bar Logic
Nobody? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Help with form helper
I found this post about form vs html helper http://groups.google.com/group/cake-php/browse_thread/thread/f2ef9960ec42bdb8 OK. I see that FormHelper is one which have future, and htmlHelper is deprecated. But I'm new baker and need help how to use FormHelper. Because there is no entry in manual about formHelper I ask if somebody has some tutorial/article about how to use FormHelper. Tnx in advance --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Cross Application Sesssion
I did hop onto the IRC Channel, but no one had an idea on this :( --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: can you restrict the table fields cake recursively retrieves?
https://trac.cakephp.org/ticket/633 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---