Re: Editor PHP - quase uma discussão religiosa...
IMHO, Eu acho o Ultraedit o melhor. Josenivaldo Benito Junior escreveu: Ol� amigos, Bom, sou um cara de Linux, daqueles que usa VI para tudo (na realidade VIM). No linux usava dois editores HTML que quebravam um galho no PHP e o VI. Quando instalei Eclipse com suporte a PHP (que dificuldade...) meu PC pifou, levou tudo junto com ele. Nem cheguei a testar o Eclipse como editor PHP (j� uso para edi��o C e Java). Por outro lado estou vendo-me obrigado a trabalhar em um m�quina windows Vista (XP eu gosto mas o vista me da nos nervos). Como isso � tempor�rio gostaria de fazer da convi�ncia algo pouco espinhoso e mais produtivo. Sendo assim, quais editores voc�s costumam usar para editar o PHP/HTML de cada dia? (pesquisa de opni�o hihi) Obrigado. Benito --~--~-~--~~~---~--~~ Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do Grupos Google. Para enviar mensagens para este grupo, envie um email para cake-php-pt@googlegroups.com Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED] Para mais opções, visite este grupo em http://groups.google.com/group/cake-php-pt?hl=pt-PT -~--~~~~--~~--~--~---
Re: Editor PHP - quase uma discussão religiosa...
Eu usava PHPEdit depois me apaixonei pelo Zend Studio 5.5 e sua praticidade. Tempos atrás tive testando o eclipse, mas não gostei até aparecer o PDT/Zend Neon, ferramenta que uso atualmente. Para HTML/JS/CSS e etc, qualquer editor + firefox + WebDeveloper + TabIE, se bem q o Aptana é uma boa pedida. []ão -- Raphael deAlmeida http://jaguarnet7.blogspot.com --~--~-~--~~~---~--~~ Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do Grupos Google. Para enviar mensagens para este grupo, envie um email para cake-php-pt@googlegroups.com Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED] Para mais opções, visite este grupo em http://groups.google.com/group/cake-php-pt?hl=pt-PT -~--~~~~--~~--~--~---
Re: Nightly builds?
We moved to a new server and there is an issue with the build script. We have to run it by hand right now, which we try to do on a regular basis. We are hoping to have the problem resolved shortly, but to be honest its not high on the priority list right now. Newbies should probably start with the stable code or at least a release before moving onto nightlies. If you are using the nightlies you should really consider just going all the way to svn anyway. Its much easier to stay up to date. --~--~-~--~~~---~--~~ 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: associated models fieldnames - findAll()
Very thank You for the answer. The query you had in the middle of your post that strangely works is not so strange - you are querying the Photo table, so of course you can use Photo conditions. I meant, that in this way I can use conditions on both Models - this on example should be more correct: $this-Realization-Photo-findAll('Photo.id = 59 and Realization.id = 1') will be ok but $this-Realization-findAll('Photo.id = 59 and Realization.id = 1') this one not What I actually want is to force it to make INNER JOIN as it does it in the first case - what as I guess should be provided when I use $this-Realization-recursive = 2. So is the only way to do this Inner Join Model-query() method ? --~--~-~--~~~---~--~~ 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: String concatenation not working
Our content changes much less than that - I only need a backup once every 6 months, but no harm in doing it monthly as it is zipped. You can have as frequent as once every 5 mins. Probably obvious lesson: the backup script deletes the temp directory and all files in it, so don't set the temp directory to just dirname(__FILE__) or the script deletes itself! This problem is now well and truely solved (over-engineered!). I think both solutions are equally great - mine is very quick to implement and rollout (quicker than registering, setting up, configing the script, diagnosing teething troubles, noting passwords, etc), Baz's is slightly more reliable and zips, and doesn't require changing the cake framework (making future Cake upgrade problematic). Thanks hugely Baz for your tireless patience! Chris --~--~-~--~~~---~--~~ 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: $form-checkbox having troubles.
@mascheon Looking at the tests it appears this is covered. Check your revision and whether the bug was fixed. Also, checkbox does not provide a label or a wrapper div so passing that stuff as false will cause the extra attributes. @Mr-Yellow Coming soon to a beta near you and as of 5994 in the branch $form-select('Model.field', $options, $selected, array('multiple' = 'checkbox')); or $form-input('Tag', array('multiple' = 'checkbox')); --~--~-~--~~~---~--~~ 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: String concatenation not working
PS. Important point - no email backup method should be used unless you have encrypted your users' passwords. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
help regarding frames with sessions
hi, I am using frames in my website,main application links are present on the top of page above mainframe, in main window. These links have target=mainframe, thus opening respective pages in mainframe. I have put the session timeout period on each page so if some user remains inactive for 10 minutes, he will be redirected to logout.php page through header. Problem is that, the logout.php page will certainly be opening in mainframe, thus the links in main parent window will remain there. What I need is that this logout.php must be opened in parent window , if any page in mainframe finds the session timedout. Thank you in advance for any help ... --~--~-~--~~~---~--~~ 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: Using models with plugins in CakePHP 1.2
On 11/9/07, Aaron Shafovaloff [EMAIL PROTECTED] wrote: I guess it makes sense for me that plugins could inherit models. Plugins plug into the existing applications, i.e. have connection to beyond the simple routing. I agree whole heartedly with the above. Plugins are meant for existing apps, they can be app specific if the plugin developer wants to @Gwoo - I am stupid and I can't understand why but please bear with me and elaborate why Thanks in advance Tarique -- = Cheesecake-Photoblog: http://cheesecake-photoblog.org PHP for E-Biz: http://sanisoft.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: Using models with plugins in CakePHP 1.2
Quoting the intro of the plugins section of the manual, CakePHP allows you to set up a combination of controllers, models, and views and release them as a packaged application plugin that others can use in their CakePHP applications...Package it as a CakePHP plugin so you can pop it into other applications. This pretty much sums up the original intent of a plugin as a portable, distributed, mini app. As such, Plugins would have no knowledge of the main application, so they can be easy added to an existing application without requiring any extra configuration or the addition of other classes. Essentially, what you are talking about would be creating dependencies that were not intended. Correct me if I am wrong, but it seems some are using plugins to organize parts of a larger application. To me, you are on a slippery slope here to basically negating the whole benefit of a plugin and just making it more work on yourself. Using the config/bootstrap.php to organize your MVC requires a lot less code and should yield the same benefits. That said, there are some changes in the works that may allow this functionality. So time will tell, but at least you know why it works the way it does right now. --~--~-~--~~~---~--~~ 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: Using models with plugins in CakePHP 1.2
On 11/15/07, Gwoo [EMAIL PROTECTED] wrote: Correct me if I am wrong, but it seems some are using plugins to organize parts of a larger application. Not exactly - I am trying to add more functionality to an existing app. Basically trying to provide addon/plugin features to an core app - Cheesecake 2 What I am trying to solve is essentially non techie users wanting to plugin functionality - asking end users to edit code or for that matter asking them to upload parts in several different directories does not work very well Plugin offers a simple upload in single folder - add to it a dashboard to install/uninstall activate/deactivate these in your core app and you are rolling great. To me, you are on a slippery slope here to basically negating the whole benefit of a plugin Again no - a major benefit of a pulgin for me is allowing users to choose features and prevent bloat in core of the app and just making it more work on yourself. Using the config/bootstrap.php to organize your MVC requires a lot less code and should yield the same benefits. For a end developer/commercial product perhaps yes All that said I guess a simple combination of ClassRegistry::getObject and loadModel will still work from within a plugin controller ;) Cheers Tarique -- = Cheesecake-Photoblog: http://cheesecake-photoblog.org PHP for E-Biz: http://sanisoft.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 -~--~~~~--~~--~--~---
Call action within action (in console)
Hi, i've written a console shell skript. I need to call the actions, within the main action. e.G. function main() { X- Here i want to call update1 with argument X- Here i want to call update2 with argument } function update1($id) { } function update2($id) { } Is there a way to do this? greetings, Alexander --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: ajax multiple div update
no one else ? On Nov 14, 2007 8:38 AM, Dennis Nikiforov [EMAIL PROTECTED] wrote: But is there a way without modifying cake? The development is progressing quite quickly, so I like to keep up to date and updating a modified version is suiside. Dennis schneimi wrote: I needed this too but for a remoteTimer, but the code like yours didn't work and I also didn't find any support for that intention inside the cakePHP code. Because of that, I decided to hack a little bit into the code to get this working, it may not be the best idea to do that, but it helped me to get my stuff working, so maybe that could help you too. You can read my changes on my blog, but not sure how that fits for $ajax- link: http://schneimi.wordpress.com/2007/10/27/update-multiple-fields-with-one-ajax-request-response/ Michael On 13 Nov., 22:58, wluigi [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I try this old (nate's) code : // test.thtml code ?=$ajax-link('Update 2 Div\'s', '/controller/test', array('update' = array('first', 'second'))); ? ?=$ajax-div('first'); ? This is the first div, it has the current time: ?=strtotime('now'); ? ?=$ajax-divEnd('first'); ? ?=$ajax-div('second'); ? This is the second div, it shows server variables: ? pr($_SERVER); ? ?=$ajax-divEnd('second'); ? /code but it doesn't seem to work anymore. Wath's the new way ? -- Luigi --~--~-~--~~~---~--~~ 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: Extending the Form Helper to change output HTML?
in 1.2 to change the tags you create app/config/tags.php with your custom tags. Here's PhpNut paste how to use the new tags http://bin.cakephp.org/saved/24048 And here is a sample tags file from rtconner http://bin.cakephp.org/saved/24472 as for the setFlash - you *did* look at the api right ? ;) setFlash has a second arg - $layout that specifies the layout that will wrap the message http://api.cakephp.org/1.2/class_session_component.html#0f46011d40587807377decf37088ac12 But honestly it's probably easiest just to modify your CSS - what's so special about a p that you can't do with a div ? Grant++ HTH, kabturek --~--~-~--~~~---~--~~ 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: help regarding frames with sessions
thankyou. if u dont mind can u explain me clearly how can we solve this problem by using java script.. plz help 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 -~--~~~~--~~--~--~---
Several Question
Hi, i plan to migrate a complete CMS which use is own kind of MVC pattern. first of all i show the directories tree of my CMS, second i show what i did to migrate to cake and finally ask some questions of oragnisation ;-) to clarify my mind This CMS uses several modules (by module we think about a little application) modules/articles/ modules/blogs modules/planet modules/calendar modules/downloads etc.. we told me to put all of them in the plugins directory. this is what i did. now its look like : app/plugins/articles/controllers app/plugins/articles/components app/plugins/articles/models app/plugins/articles/views/articles (we have to make a sub dir articles in the views dir ; its weird but its like that it seems) app/plugins/articles/layout/default.thtml for the libs of my CMS we also told me to put them in vendors so its look like that : app/vendors/config (a config file for the CMS) app/vendors/classes (some class of the CMS) app/vendors/libs (some libs of the CMS) app/vendors/themes/ app/vendors/themes/themeA contains file used for the header and footer to be include in the main layout. app/webroot/themes/themeA/ contain all the css of all the plugins Now the questions 1) when i'm on http://localhost/ how do i call all the libs and classes i need ? currently i have a lot of settings that are stored in my database, and i dont know how to get them. 2) do i have to do a require in the app/plugins/articles/view/layout/ default.thtml to be able to load the part of my template ? ?php require_once dirname(__FILE__).('/../../../../vendors/ themes/'.CMS_DEFAULT_THEME.'/_top.php'); ? thanks you for your help. --~--~-~--~~~---~--~~ 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 transaction on multiple models
In doing this, the changes for every model rolled back fine. Does it seem incorrect (maybe just conventionally) to use a model to control the transaction over all the other models? Or is there a global type of transaction I should be using? AFAIK there is no global types of transactions. Transaction support is in your database. Look at the SQL log - the methods you are using just forward start/ commit/rollback to the db. http://api.cakephp.org/1.2/dbo__mysql_8php-source.html#l00243 It could be a problem if different models would use different db connections/dbos but i haven't tried this so maybe someone can comment on it:) HTH, kabturek --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
newbie question
i have CakePhp inctalled on my windows Apache. C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\cakeproj1 15.11.2007 14:47DIR . 15.11.2007 14:47DIR .. 15.11.2007 15:20 166 .htaccess 15.11.2007 14:46DIR app 15.11.2007 14:47DIR cake 15.11.2007 14:47DIR docs 02.02.2007 07:21 2я680 index.php 15.11.2007 14:47DIR vendors /pre C:\Program Files\Apache Software Foundation\Apache2.2\htdocs \cakeproj1\.htaccess IfModule mod_rewrite.c RewriteEngine on RewriteBase /cakeproj1/ RewriteRule^$ app/webroot/[L] RewriteRule(.*) app/webroot/$1 [L] /IfModule it works, but when i make sample from https://www6.software.ibm.com/developerworks/education/os-php-cake1/index.html http://127.0.0.1/cakeproj1/users/register/ gives me form, where form action=/users/register ... and, of course, it not works, because this is http://127.0.0.1/users/register but not http://127.0.0.1/cakeproj1/users/register p.s. i want for my cakehphp project to be placed in http://127.0.0.1/cakeproj1/ (C:\Program Files\Apache Software Foundation\Apache2.2\htdocs \cakeproj1) thanks you! --~--~-~--~~~---~--~~ 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: help regarding frames with sessions
Please stick to a single message thread - I have replied to your other one. On Nov 15, 7:23 pm, chowdary [EMAIL PROTECTED] wrote: hi, I am using frames in my website,main application links are present on the top of page above mainframe, in main window. These links have target=mainframe, thus opening respective pages in mainframe. I have put the session timeout period on each page so if some user remains inactive for 10 minutes, he will be redirected to logout.php page through header. Problem is that, the logout.php page will certainly be opening in mainframe, thus the links in main parent window will remain there. What I need is that this logout.php must be opened in parent window , if any page in mainframe finds the session timedout. Thank you in advance for any help ... --~--~-~--~~~---~--~~ 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: associated models fieldnames - findAll()
Cake does a JOIN across belongsTo and hasOne, because there can be only a single related row (so the results are much easier to extract). I thought there was an enhancement ticket on trac to add this functionality for hasMany, but I can't see it now. For the time being, yes, if you cannot execute your query sufficiently from either model, use query() directly. On Nov 15, 6:52 pm, marek. bytnar [EMAIL PROTECTED] wrote: Very thank You for the answer. The query you had in the middle of your post that strangely works is not so strange - you are querying the Photo table, so of course you can use Photo conditions. I meant, that in this way I can use conditions on both Models - this on example should be more correct: $this-Realization-Photo-findAll('Photo.id = 59 and Realization.id = 1') will be ok but $this-Realization-findAll('Photo.id = 59 and Realization.id = 1') this one not What I actually want is to force it to make INNER JOIN as it does it in the first case - what as I guess should be provided when I use $this-Realization-recursive = 2. So is the only way to do this Inner Join Model-query() method ? --~--~-~--~~~---~--~~ 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: Nightly builds?
Thanks Gwoo ;) On Nov 15, 3:08 am, Gwoo [EMAIL PROTECTED] wrote: We moved to a new server and there is an issue with the build script. We have to run it by hand right now, which we try to do on a regular basis. We are hoping to have the problem resolved shortly, but to be honest its not high on the priority list right now. Newbies should probably start with the stable code or at least a release before moving onto nightlies. If you are using the nightlies you should really consider just going all the way to svn anyway. Its much easier to stay up to date. --~--~-~--~~~---~--~~ 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: jQuery $.ajax() and on success result processing?
Hi I'm new to jQuery, but I wonder if it is possible to return a result via controller that jQuery can handle on success? Maybe send the data in JSON ? (see the javascript helper) or PHP built- in json extension... I'm trying to POST data to an add method, and on success loading the view with the right $id. Anyone know how to do that? I'm not really getting why you need jqery for that ;) greets, kabturek --~--~-~--~~~---~--~~ 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: Bugs on Site
On Nov 15, 2007 10:47 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I am trying to encourage colleagues to check out Cake and one was put off by these two issues: http://cakephp.org/maps : no map and a Javascript error http://cakephp.org/maps/markers : most of the recent entries are spam He's right, too. :( So let me see if I understand this correctly: a work colleague thinks that a particular web application framework is unsuitable for the task because part of the web site for the project isn't working properly? Part of the site that has absolutely nothing to do with whether or not the framework lives up to it's well-deserved billing as being suitable for building solid web applications? I would say this person is looking for an excuse to not like CakePHP, but that's just my opinion. -- Chris Hartjes My motto for 2007: Just build it, damnit! @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?hl=en -~--~~~~--~~--~--~---
Cake Schema issue ?
Hi, when i do this : D:\wamp\www_cakephp\cake\consolecake schema generate -connect default -path d:\ wamp\www_cakephp\cake\console\config\sql\foxmask.sql i get the error : Welcome to CakePHP v1.2.0.5875 pre-beta Console --- Cake Schema Shell --- Generating Schema... Error: Missing Database Connection. Try 'cake bake' but my connection is well defined and works : D:\wamp\www_cakephp\cake\consolemore d:\wamp\www_cakephp\app\config \database.php class DATABASE_CONFIG { var $default = array('driver' = 'mysql', 'connect' = 'mysql_connect', 'host' = 'localhost', 'login' = 'foxmask', 'password' = 'foxmask', 'database' = '', 'prefix' = ''); /*var $test = array('driver' = 'mysql', 'connect' = 'mysql_connect', 'host' = 'localhost', 'login' = 'user', 'password' = 'password', 'database' = 'project_name-test', 'prefix' = '');*/ } ? What's the matter ? --~--~-~--~~~---~--~~ 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: help with sessions and frames
Just have some javascript on your login page that forces it to break out of any frames. Something like: if (top.location != location) { top.location.href = document.location.href ; } On Nov 15, 5:30 pm, chowdary [EMAIL PROTECTED] wrote: thank you. I have put the session timeout period on each page so if some user remains inactive for 10 minutes (all webforms in main frame), he will be redirected to login.php page through header. Problem is that, the login.php page will certainly be opening in main frame, thus the links in main parent window will remain there. What I need is that this login.php must be opened in parent window , if any page in main frame finds the session timedout. Thank you in advance for any help ... please let me know how the navigation frame is refreshed from the server? thankyou. --~--~-~--~~~---~--~~ 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: Bugs on Site
Yes, ok, all true, the framework works fine, butno need to flame who points out some website failure, I would rather thank him and look at it. As a matter of fact appearing nice does count toward new public, and if developers don't have time for that particular functionality then maybe it's better to simply take it offline, doesn't add much anyway. On Nov 15, 2007 5:11 PM, Gonzalo Servat [EMAIL PROTECTED] wrote: On Nov 15, 2007 12:47 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I am trying to encourage colleagues to check out Cake and one was put off by these two issues: http://cakephp.org/maps : no map and a Javascript error http://cakephp.org/maps/markers : most of the recent entries are spam He's right, too. :( Maybe the developers are too busy working on the product rather than worrying about petty things like showing the location of CakePHP'ers? Perhaps you and your colleagues should look at the product, instead of worrying about stuff like that. Remember, this is not a paid product (although they will gladly accept well deserved donations). I personally would make a claim like that against a company if I was considering purchasing their product, but this is an open source project and if you look at the product itself, it's better quality than a lot of other commercial products out there. Just my POV. - Gonzalo --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
generateList bug(?) in PHP4
Hi guys, Found this problem when amending an existing site for a new customer. I'm using generateList with a table with just one item in it. Instead of returning array(2 = 447) as it should, I get the empty array. I updated cake to the most recent stable version (1.1.18.5850) and had a dig around, and something very odd seems to be happening. In model_php4.php, the generateList method includes code $return = array_combine($keys, $vals); return $return; /code I can print_r($return) in that function, and get the expected array. If I print_r the array I get following my call to generateList, I get the empty array( ); code $areas = $this-Area-generateList( null, 'area_name ASC', null, '{n}.Area.id', '{n}.Area.area_name' ); print_r($areas); /code Does anybody recognise this bizarre occurrence? My instinct is that it is a bug in PHP rather than cake, but I cannot recreate it in a stand- alone test script so I thought I'd ask some cake people. J. --~--~-~--~~~---~--~~ 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: Using models with plugins in CakePHP 1.2
This is all about you isnt it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake Schema issue ?
why are passing a path? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object
Hello! I have one table called Projects and another table called Directors in my database: Project belongsTo Director Director hasMany Project Adding a new project, I have a select of directors and I want that they appear with their firstname and lastname and not with their Id. The fields of the table Director are: Id, firstname, lastname. I saw how to do it here: http://groups.google.com/group/cake-php/browse_thread/thread/d4aa1929ce4d61c7/edcacb9354ff1f7a?lnk=gstq=displayfield#edcacb9354ff1f7a And the select has the directors with full_name(firstname+lastname). But the problem is that if I do the index view of projects: ?php foreach ($projects as $project):? ?php echo $project['Project']['firstname']? ?php echo $project['Director']['firstname']? ?php echo $proyecto['Director']['lastname']? ?php endforeach; ? And projects_controller: function index() { $this-Project-recursive = 2; $this-set('projects', $this-paginate()); } The projects and their directors appear correctly but, I obtain these warnings: Notice (8): Undefined offset: 0 [CORE/cake/libs/model/datasources/ dbo_source.php, line 882] Notice (8): Undefined index: Profesor [CORE/app/models/director.php, line 63] Warning (2): array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object [CORE/app/ models/director.php, line 63] Why these warnings appear? How can I solve it? I hope you can help me. Thanks and 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?hl=en -~--~~~~--~~--~--~---
Re: generateList bug(?) in PHP4
My version of php might be important: $ php -v PHP 4.3.9 (cgi) (built: May 4 2007 11:04:51) Copyright (c) 1997-2004 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies Thanks, J. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
AJAX form submission with jQuery
I have a blog-like page that contains a post, comments, and a new comment form. I want the new comment form to submit using ajax (but also work if the user has js disabled) and have the newly added comment appear in the comments list. Currently, I'm using the jQuery Form Plugin to submit the form: http://www.malsup.com/jquery/form/. I don't want to use the prototype helper due to the inline code it generates. So far, the form submission works, but all that is happening is the data being saved. The view does not show any validation error messages defined in the model and does not show the new comment (I have to refresh the page to get the comment to show up and the validation error messages never show up). How can I fix this so the form not only submits using ajax, but the form data is also rendered in the view if saved, or the appropriate validation error messages appear? I've done some searching and I think I'm supposed to use the requestHandler component. However, I don't really understand how I am supposed to use it in this situation (the manual documentation is pretty vague). Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Using models with plugins in CakePHP 1.2
I was trying to do something earlier with plugins in 1.1 and everything seemed to work fine until the larger application wanted to access the plugin, then things went downhill. I made a plugin that controlled all the authentication, registering, logging in and out of users. The idea for this was that, why do I have to copy the same models, views and controllers between every app when I can just drop it in the plugin dir and have app_controller load it? To me, that's my idea of a plugin but, I wanted the app to be able to access some of the data or functionality and was told that it wouldn't work like that. I could have used an rA() call but, at that time, the slow down for me was unbearable. Dunno if it was ever fixed but, just as a warning. Look carefully at your plugin, what it does, how it interacts with the larger app. For now, if your plugin requires anything from your app or you app wants to hook into your plugin, then it may be wise to forgo the plugin altogether. (At least until plugins work the way I envision them! =D). On Nov 15, 1:38 am, Gwoo [EMAIL PROTECTED] wrote: Quoting the intro of the plugins section of the manual, CakePHP allows you to set up a combination of controllers, models, and views and release them as a packaged application plugin that others can use in their CakePHP applications...Package it as a CakePHP plugin so you can pop it into other applications. This pretty much sums up the original intent of a plugin as a portable, distributed, mini app. As such, Plugins would have no knowledge of the main application, so they can be easy added to an existing application without requiring any extra configuration or the addition of other classes. Essentially, what you are talking about would be creating dependencies that were not intended. Correct me if I am wrong, but it seems some are using plugins to organize parts of a larger application. To me, you are on a slippery slope here to basically negating the whole benefit of a plugin and just making it more work on yourself. Using the config/bootstrap.php to organize your MVC requires a lot less code and should yield the same benefits. That said, there are some changes in the works that may allow this functionality. So time will tell, but at least you know why it works the way it does right now. --~--~-~--~~~---~--~~ 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: Cake Schema issue ?
because even without -path the issue is met... On Nov 15, 5:24 pm, Gwoo [EMAIL PROTECTED] wrote: why are passing a path? --~--~-~--~~~---~--~~ 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: Several Question
Hi, can someone give me some tips on how to proceed ? thanks kind 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?hl=en -~--~~~~--~~--~--~---
Re: Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object
Sorry, I work with cake is 1.2. --~--~-~--~~~---~--~~ 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: Cake Schema issue ?
On Nov 15, 5:24 pm, Gwoo [EMAIL PROTECTED] wrote: why are passing a path? i also did cake schema generate but even this produce the error. --~--~-~--~~~---~--~~ 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: Class 'AppHelper' not found
I had this happen when I was following a tutorial for CakePHP 1.2.x, and I was actually using 1.1.x. When I switched to the Pre Beta version, the code started working. Sarah On Sep 30, 10:29 am, firdzak [EMAIL PROTECTED] wrote: i'm very new in php and cake try to create menu helper file this is the code . when i run the page it says that the apphelper class not found can somebody help me on this thing Tq --~--~-~--~~~---~--~~ 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: Bugs on Site
On Nov 15, 2007 12:47 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I am trying to encourage colleagues to check out Cake and one was put off by these two issues: http://cakephp.org/maps : no map and a Javascript error http://cakephp.org/maps/markers : most of the recent entries are spam He's right, too. :( Maybe the developers are too busy working on the product rather than worrying about petty things like showing the location of CakePHP'ers? Perhaps you and your colleagues should look at the product, instead of worrying about stuff like that. Remember, this is not a paid product (although they will gladly accept well deserved donations). I personally would make a claim like that against a company if I was considering purchasing their product, but this is an open source project and if you look at the product itself, it's better quality than a lot of other commercial products out there. Just my POV. - Gonzalo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: ajax multiple div update
Well, I don't think it is possible without some changes (e.g. my hack), but I wondered about some examples like in the first post I also found, maybe it was supported formerly? But in the end cakePHP just builds upon the prototype framework and I couldn't find any support for that sort of update there as well. Michael On 15 Nov., 12:10, Luigi [EMAIL PROTECTED] wrote: no one else ? On Nov 14, 2007 8:38 AM, Dennis Nikiforov [EMAIL PROTECTED] wrote: But is there a way without modifying cake? The development is progressing quite quickly, so I like to keep up to date and updating a modified version is suiside. Dennis schneimi wrote: I needed this too but for a remoteTimer, but the code like yours didn't work and I also didn't find any support for that intention inside the cakePHP code. Because of that, I decided to hack a little bit into the code to get this working, it may not be the best idea to do that, but it helped me to get my stuff working, so maybe that could help you too. You can read my changes on my blog, but not sure how that fits for $ajax- link:http://schneimi.wordpress.com/2007/10/27/update-multiple-fields-with-... Michael On 13 Nov., 22:58, wluigi [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I try this old (nate's) code : // test.thtml code ?=$ajax-link('Update 2 Div\'s', '/controller/test', array('update' = array('first', 'second'))); ? ?=$ajax-div('first'); ? This is the first div, it has the current time: ?=strtotime('now'); ? ?=$ajax-divEnd('first'); ? ?=$ajax-div('second'); ? This is the second div, it shows server variables: ? pr($_SERVER); ? ?=$ajax-divEnd('second'); ? /code but it doesn't seem to work anymore. Wath's the new way ? -- Luigi --~--~-~--~~~---~--~~ 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: Bugs on Site
On Nov 15, 2007 1:18 PM, Repsah [EMAIL PROTECTED] wrote: Yes, ok, all true, the framework works fine, butno need to flame who points out some website failure, I would rather thank him and look at it. As a matter of fact appearing nice does count toward new public, and if developers don't have time for that particular functionality then maybe it's better to simply take it offline, doesn't add much anyway. There are ways of saying stuff. He could have simply said hey, just noticed the map function doesn't work .. just thought I'd let you know, and nobody would have flamed (ok, it was just me). He made it sound like he was trying to sell an awesome product and they turned it down because a map function doesn't work on the website, and he was disappointed about it. This is why I replied the way I did and pointed out the most important thing is the product which, I think, is excellent and has saved so many of us hours and hours of development time. - Gonzalo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: ajax multiple div update
I do update multiple div's with cake 1.2 without any problem. I will try nate's code again On Nov 15, 5:13 pm, schneimi [EMAIL PROTECTED] wrote: Well, I don't think it is possible without some changes (e.g. my hack), but I wondered about some examples like in the first post I also found, maybe it was supported formerly? But in the end cakePHP just builds upon the prototype framework and I couldn't find any support for that sort of update there as well. Michael On 15 Nov., 12:10, Luigi [EMAIL PROTECTED] wrote: no one else ? On Nov 14, 2007 8:38 AM, Dennis Nikiforov [EMAIL PROTECTED] wrote: But is there a way without modifying cake? The development is progressing quite quickly, so I like to keep up to date and updating a modified version is suiside. Dennis schneimi wrote: I needed this too but for a remoteTimer, but the code like yours didn't work and I also didn't find any support for that intention inside the cakePHP code. Because of that, I decided to hack a little bit into the code to get this working, it may not be the best idea to do that, but it helped me to get my stuff working, so maybe that could help you too. You can read my changes on my blog, but not sure how that fits for $ajax- link:http://schneimi.wordpress.com/2007/10/27/update-multiple-fields-with-... Michael On 13 Nov., 22:58, wluigi [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I try this old (nate's) code : // test.thtml code ?=$ajax-link('Update 2 Div\'s', '/controller/test', array('update' = array('first', 'second'))); ? ?=$ajax-div('first'); ? This is the first div, it has the current time: ?=strtotime('now'); ? ?=$ajax-divEnd('first'); ? ?=$ajax-div('second'); ? This is the second div, it shows server variables: ? pr($_SERVER); ? ?=$ajax-divEnd('second'); ? /code but it doesn't seem to work anymore. Wath's the new way ? -- Luigi --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Slider question - AJAX helper
I feel like I've searched everywhere but I cannot find info on this. I have a scriptaculous slider control using the AJAX helper working. What I want to do is have a min and max for the slider, let's say from 0 to 5 and I want it to go in steps of .1 or something like that. Both Hand coding and using the AJAX helper are not working for me. I'm not sure if I have the options setup wrong or if I'm using the AJAX helper wrong. Does anyone have working code for a similar scenario? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Bugs on Site
I am trying to encourage colleagues to check out Cake and one was put off by these two issues: http://cakephp.org/maps : no map and a Javascript error http://cakephp.org/maps/markers : most of the recent entries are spam He's right, too. :( Fred --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Generic Upload Behavior and with HABTM associations
Hey guys, I'm using the Generic upload behavior by AD7six. http://www.ad7six.com/MiBlog/GenericFileUploadBehavior Everything works fine apart with models that have a HABTM relationship defined. The problem source is when the generic upload behavior overrides the parent::__contruct() in AppModel. Anyone has any clue about this? Cheers Dan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Altering size of buttons emitted by FormHelper
Apparently my CSS is doing something funky, because the login button on my app is a couple hundred pixels wide. I will try to track down the CSS that is causing this, but in the mean time, can someone please tell me how to apply the size attribute to the $form-end() call? I already tried: ?php echo $form-end('Submit', array('size'='10'));? ?php echo $form-end('Submit', array('width'='10'));? I'm guessing I might need to use 'options' or 'style' or something... Wayne --~--~-~--~~~---~--~~ 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: Altering size of buttons emitted by FormHelper
Modify you css, or pass the style with : $form-end('Submit', array('style' = 'width: 10px;')); 10px seems short anyway.. :-) On Nov 15, 8:35 pm, Wayne Fay [EMAIL PROTECTED] wrote: Apparently my CSS is doing something funky, because the login button on my app is a couple hundred pixels wide. I will try to track down the CSS that is causing this, but in the mean time, can someone please tell me how to apply the size attribute to the $form-end() call? I already tried: ?php echo $form-end('Submit', array('size'='10'));? ?php echo $form-end('Submit', array('width'='10'));? I'm guessing I might need to use 'options' or 'style' or something... Wayne --~--~-~--~~~---~--~~ 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: mod rewrite or .htaccess issue
Maybe add a rewriteBase in your htaccess. rewriteBase /home/hoteljob/publichtml after set your rewrite rules, without the '/home ...' Hope this helps On Nov 15, 3:16 pm, Indian Baker [EMAIL PROTECTED] wrote: Hi, We built an application using CakePHP 1.2 and it works fine on our local development sever. However when we try to upload it to this server.. nothing seems to work.. Here is the URLhttp://72.167.47.152/~hoteljob/ I'm guessing it has to with either the mod rewrite or something wrong with the htaccess files. Actually we had to modify the lines in the htaccess on the root to get atleast the homepage to work, else even that gave a 404 error.. This is what we modified the htcasse file to --- IfModule mod_rewrite.c RewriteEngine on RewriteEngine on RewriteRule content_pages/displayurl/$1 [L] RewriteRule /home/hoteljob/public_html/app/webroot/[L] RewriteRule /home/hoteljob/public_html/app/webroot/$1 [L] /IfModule --- Any ideas what would be wrong... this is a dedicated server, so we've had to setup things from scratch.. Thanks 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?hl=en -~--~~~~--~~--~--~---
Pagination nightmares
I'm a beginner and struggling to use pagination correctly in cakephp. The Bakery recommends using this code in the controller. I know its a dumb question, but do I need to create a function called index() in order to make this built in helper work ?? ?php class PostsController extends AppController { var $name = 'Posts'; // for PHP4 installs var $components = array ('Pagination'); // Added var $helpers = array('Pagination'); // Added function index() { $criteria=NULL; list($order,$limit,$page) = $this-Pagination- init($criteria); // Added $data = $this-Post-findAll($criteria, NULL, $order, $limit, $page); // Extra parameters added $this-set('data',$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?hl=en -~--~~~~--~~--~--~---
RE: using one select box to generate the results for two more
G'day I just can't seem to find the right answer to this one. Hopefully someone can point me in the right direction please. I have the following function in a app/controllers/models_controller.php. I load three select boxes two of which rely on data from the first one. I can enter a manual value into the array as you can see, and they display the data fine, but I can't seem to figure out how to capture the value of the current selected item from the first generateList to feed it to the two others. Can someone please enlighten me?.;-) function index() { $this-set('models', $this-Modelinfo-Model- generateList(null, 'Model_Number', null, '{n}.Model.Model_Number','{n}.Model.Model_Number', true, true ) ); $this-set('modelinfos', $this-Modelinfo- generateList(array('Modelinfo.Model_Number'= 'LD400'),null, null, '{n}.Modelinfo.Model_Number','{n}.Modelinfo.AltModel_Number')); $this-set('altmodels', $this-Altmodel- generateList(array('Altmodel.Model_Number'= 'LD400'),null, null, '{n}.Altmodel.Model_Number','{n}.Altmodel.Alt_Model')); } Thanks -- ldb --~--~-~--~~~---~--~~ 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: mod rewrite or .htaccess issue
you are using a ~ type domain ... Not sure this work with rewrite ..Is this ~ temporary ? What i dp not understand is you rewrite rule .. Why not using the cake default one ? I mean with the index.php etc ..? On Nov 15, 9:21 pm, Indian Baker [EMAIL PROTECTED] wrote: Hi Francky, Thanks for the tip, but it didnt quite help. I modified the .htaccess located in my public_html to - IfModule mod_rewrite.c RewriteEngine on RewriteBase /home/hoteljob/public_html RewriteRule^~(.*) content_pages/displayurl/$1 [L] RewriteRule^$ app/webroot/[L] RewriteRule(.*) app/webroot/$1 [L] /IfModule - but now even its a 404 error right on the home page itselfhttp://72.167.47.152/~hoteljob/ Any idea what I could be doing wrong? On Nov 16, 12:26 am, francky06l [EMAIL PROTECTED] wrote: Maybe add a rewriteBase in your htaccess. rewriteBase /home/hoteljob/publichtml after set your rewrite rules, without the '/home ...' Hope this helps On Nov 15, 3:16 pm, Indian Baker [EMAIL PROTECTED] wrote: Hi, We built an application using CakePHP 1.2 and it works fine on our local development sever. However when we try to upload it to this server.. nothing seems to work.. Here is the URLhttp://72.167.47.152/~hoteljob/ I'm guessing it has to with either the mod rewrite or something wrong with the htaccess files. Actually we had to modify the lines in the htaccess on the root to get atleast the homepage to work, else even that gave a 404 error.. This is what we modified the htcasse file to --- IfModule mod_rewrite.c RewriteEngine on RewriteEngine on RewriteRule content_pages/displayurl/$1 [L] RewriteRule /home/hoteljob/public_html/app/webroot/[L] RewriteRule /home/hoteljob/public_html/app/webroot/$1 [L] /IfModule --- Any ideas what would be wrong... this is a dedicated server, so we've had to setup things from scratch.. Thanks 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?hl=en -~--~~~~--~~--~--~---
Re: Update gone wrong.
Did anybody allready found a fix for this? 1.2 still does not want to run with me outside the app dir :| --~--~-~--~~~---~--~~ 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: mod rewrite or .htaccess issue
Hi Francky, Thanks for the tip, but it didnt quite help. I modified the .htaccess located in my public_html to - IfModule mod_rewrite.c RewriteEngine on RewriteBase /home/hoteljob/public_html RewriteRule^~(.*) content_pages/displayurl/$1 [L] RewriteRule^$ app/webroot/[L] RewriteRule(.*) app/webroot/$1 [L] /IfModule - but now even its a 404 error right on the home page itself http://72.167.47.152/~hoteljob/ Any idea what I could be doing wrong? On Nov 16, 12:26 am, francky06l [EMAIL PROTECTED] wrote: Maybe add a rewriteBase in your htaccess. rewriteBase /home/hoteljob/publichtml after set your rewrite rules, without the '/home ...' Hope this helps On Nov 15, 3:16 pm, Indian Baker [EMAIL PROTECTED] wrote: Hi, We built an application using CakePHP 1.2 and it works fine on our local development sever. However when we try to upload it to this server.. nothing seems to work.. Here is the URLhttp://72.167.47.152/~hoteljob/ I'm guessing it has to with either the mod rewrite or something wrong with the htaccess files. Actually we had to modify the lines in the htaccess on the root to get atleast the homepage to work, else even that gave a 404 error.. This is what we modified the htcasse file to --- IfModule mod_rewrite.c RewriteEngine on RewriteEngine on RewriteRule content_pages/displayurl/$1 [L] RewriteRule /home/hoteljob/public_html/app/webroot/[L] RewriteRule /home/hoteljob/public_html/app/webroot/$1 [L] /IfModule --- Any ideas what would be wrong... this is a dedicated server, so we've had to setup things from scratch.. Thanks 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?hl=en -~--~~~~--~~--~--~---
Re: jQuery $.ajax() and on success result processing?
If you want just to get the rendered view and put its contents into an element on a page, use $this-layout = 'ajax'; in action, and then assign the rendered view to whatever you need with jQuery. If you don't need to render a view, you can return action results in xml, json or etc. Fanck wrote: Hi, I'm new to jQuery, but I wonder if it is possible to return a result via controller that jQuery can handle on success? I'm trying to POST data to an add method, and on success loading the view with the right $id. Anyone know how to do that? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Update gone wrong.
I think it is also because : $cache = Cache::settings(); This never gets filled i think because there is no settings function in cache.php? Cache::config('default', array('engine' = 'File')); after the trigger error its sets it to default, but it does not work: Fatal error: Call to undefined method Cache::config() in C:\wamp\www \cake_1.2\cake\bootstrap.php on line 54 I don't see a config function in cache.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?hl=en -~--~~~~--~~--~--~---
Re: Update gone wrong.
On Nov 15, 2007 6:25 PM, Mech7 [EMAIL PROTECTED] wrote: Did anybody allready found a fix for this? 1.2 still does not want to run with me outside the app dir :| Perhaps I'm just lucky and Murphy is smiling down on me from above, but I am using the latest version of CakePHP via SVN *and* have my cake directory outside of app and I have NO problems getting my stuff to work. I followed all the notices that Cake threw when I updated the Cake core, changed the code that it mentioned and that was it. Really. In fact, here's my config file for everyone to see: http://bin.cakephp.org/view/1205137498 I continue to be baffled by the problems people seem to be experiencing when my own configuration has been just fine. I've found three things that help 1) pay attention to the warning messages that CakePHP spits out as they usually point at the problem When I upgraded, I saw lots of warnings about deprecated functionality and suggestions on how to get rid of those problems. Those error messages are there for a reason, ignore them at your own peril. They tell you EXACTLY what to do. 2) permissions for the tmp directory really do matter Use the firehose permission level if you're on some sort of UNIXy system: chmod -R 777 $APP/tmp 3) make sure you do your dev work with the debug level to 1 and save debug level 0 for your production apps. That little tip will mean you will never have to mess around with deleting and recreating your $APP/tmp directory. I hope this helps those who seem to be struggling to get their CakePHP configurations to work properly. I did all the things above I mentioned and continue to have smooth sailing whenever I upgrade from SVN (which is usually every morning). -- Chris Hartjes My motto for 2007: Just build it, damnit! @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?hl=en -~--~~~~--~~--~--~---
Re: Bugs on Site
Developer's are a sensitive bunch, I should know. But he makes a valid point. There are so many Frameworks out there that an independent third party would gladly use some problems on a website to eliminate some from the list. People judge books by their covers, it's that simple. With that said, he has a very valid point. As developers, we need to step outside of the project and look at it from an object position (if that's even possible). To all those that doubt CakePHP I just say give it a few months. 1.2 isn't even Beta yet. Can you imagine what CakePHP 2.5 will be -- Baz L Web Development 2.0 http://WebDevelopment2.com/ On Nov 15, 2007 11:46 AM, Gonzalo Servat [EMAIL PROTECTED] wrote: On Nov 15, 2007 1:18 PM, Repsah [EMAIL PROTECTED] wrote: Yes, ok, all true, the framework works fine, butno need to flame who points out some website failure, I would rather thank him and look at it. As a matter of fact appearing nice does count toward new public, and if developers don't have time for that particular functionality then maybe it's better to simply take it offline, doesn't add much anyway. There are ways of saying stuff. He could have simply said hey, just noticed the map function doesn't work .. just thought I'd let you know, and nobody would have flamed (ok, it was just me). He made it sound like he was trying to sell an awesome product and they turned it down because a map function doesn't work on the website, and he was disappointed about it. This is why I replied the way I did and pointed out the most important thing is the product which, I think, is excellent and has saved so many of us hours and hours of development time. - Gonzalo --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
HABTM Self-reference and scaffolding
So I've set up a users model that I want to link to other users. I've initialized the database table and created the corresponding variable in the user model. var $hasAndBelongsToMany = array('User' = array('className' = 'User', 'joinTable'= 'users_users', 'foreignKey' = 'source_id', 'associationForeignKey'= 'target_id' )); My controller is a simple scaffold, but it has very strange output when I view a user. It creates several rows of junk as show below. I'm thoroughly confused. Ideas? Related Users Id Email First Name Last Name Created Modified Language Id PasswordAccount Id Actions 2 2 2 2 2 2 2 2 2 View Edit Delete b b b b b b b b b View Edit Delete B B B B B B B B B View Edit Delete B B B B B B B B B View Edit Delete 2 2 2 2 2 2 2 2 2 View Edit Delete 2 2 2 2 2 2 2 2 2 View Edit Delete 2 2 2 2 2 2 2 2 2 View Edit Delete 1 1 1 1 1 1 1 1 1 View Edit Delete 1 1 1 1 1 1 1 1 1 View Edit Delete --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Added default layout, now can not access correct session in static pages / css
Site was working but I was drawing the header/footer on every page. So I created a default.ctp file and called my library functions to generate the header and footer. This works for all of the views that have controllers. However, my /app/views/pages views are not rendered correctly (the css does not get used) and anything I do to the session variables are not stored. The header is generated so I know my library function is getting called. This is consistent across all of my static pages. Am I missing something? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: ajax multiple div update
What version of prototype do you have and what version of cake? Cake is being changed very quickly, so a more exact version would help. francky06l wrote: I do update multiple div's with cake 1.2 without any problem. I will try nate's code again On Nov 15, 5:13 pm, schneimi [EMAIL PROTECTED] wrote: Well, I don't think it is possible without some changes (e.g. my hack), but I wondered about some examples like in the first post I also found, maybe it was supported formerly? But in the end cakePHP just builds upon the prototype framework and I couldn't find any support for that sort of update there as well. Michael On 15 Nov., 12:10, Luigi [EMAIL PROTECTED] wrote: no one else ? On Nov 14, 2007 8:38 AM, Dennis Nikiforov [EMAIL PROTECTED] wrote: But is there a way without modifying cake? The development is progressing quite quickly, so I like to keep up to date and updating a modified version is suiside. Dennis schneimi wrote: I needed this too but for a remoteTimer, but the code like yours didn't work and I also didn't find any support for that intention inside the cakePHP code. Because of that, I decided to hack a little bit into the code to get this working, it may not be the best idea to do that, but it helped me to get my stuff working, so maybe that could help you too. You can read my changes on my blog, but not sure how that fits for $ajax- link:http://schneimi.wordpress.com/2007/10/27/update-multiple-fields-with-... Michael On 13 Nov., 22:58, wluigi [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I try this old (nate's) code : // test.thtml code ?=$ajax-link('Update 2 Div\'s', '/controller/test', array('update' = array('first', 'second'))); ? ?=$ajax-div('first'); ? This is the first div, it has the current time: ?=strtotime('now'); ? ?=$ajax-divEnd('first'); ? ?=$ajax-div('second'); ? This is the second div, it shows server variables: ? pr($_SERVER); ? ?=$ajax-divEnd('second'); ? /code but it doesn't seem to work anymore. Wath's the new way ? -- Luigi --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
How to set a certain language instead of auto-detected by l10n?
In my AppController's beforeFilter I detect the language from the URL and do the: Configure::write('Config.language', $urlLang); Language is either 'en' or 'ru'. In my \app\locale\ folder I have: \eng\LC_MESSAGES\default.po \rus\LC_MESSAGES\default.po These files contain the translated strings. But even if I pass 'ru' in the URL, all pages containing the strings that should be translated (to Russian), appear in English. If I set browser language to Russian, it shows Russian strings, but doesn't switch to English if I click the corresponding URL. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AJAX form submission with jQuery
I did it the following way: An action returns the rendered view if there were errors while saving the data, otherwise it returns xml that contains info including what page element should be refreshed etc. JS code: # make form ajax var makeAjaxForm = function(){ $('form',this).ajaxForm({ //onActionSubmit will be fired when the response is received success: onActionSubmit }); }; #reloads form on error or sends response xml to processing var onActionSubmit = function(responseText) { //if the response is xml if(jQuery.isXMLDoc(responseText)) { //process it, reload some elements etc processXML(responseText); //hide form hideActionBox(); } else { //load the rendered view into #reqAction .content (the form container) $('#reqAction .content').html(responseText); //make the form ajax again makeAjaxForm(); } }; Action wrote: I have a blog-like page that contains a post, comments, and a new comment form. I want the new comment form to submit using ajax (but also work if the user has js disabled) and have the newly added comment appear in the comments list. Currently, I'm using the jQuery Form Plugin to submit the form: http://www.malsup.com/jquery/form/. I don't want to use the prototype helper due to the inline code it generates. So far, the form submission works, but all that is happening is the data being saved. The view does not show any validation error messages defined in the model and does not show the new comment (I have to refresh the page to get the comment to show up and the validation error messages never show up). How can I fix this so the form not only submits using ajax, but the form data is also rendered in the view if saved, or the appropriate validation error messages appear? I've done some searching and I think I'm supposed to use the requestHandler component. However, I don't really understand how I am supposed to use it in this situation (the manual documentation is pretty vague). Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Added default layout, now can not access correct session in static pages / css
View the source of the page to see why the CSS is not being used - I expect you have the wrong path specified. Reduce your Session Security.level (in /app/core/config.php) to medium to fix the session, or update to the latest 1.2.x SVN. Because the session id is regenerated for every request with Security.level high, a 404 can destroy the session in previous versions (not the latest SVN). And you obviously have 404s for your css files. On Nov 16, 11:53 am, BobDev [EMAIL PROTECTED] wrote: Site was working but I was drawing the header/footer on every page. So I created a default.ctp file and called my library functions to generate the header and footer. This works for all of the views that have controllers. However, my /app/views/pages views are not rendered correctly (the css does not get used) and anything I do to the session variables are not stored. The header is generated so I know my library function is getting called. This is consistent across all of my static pages. Am I missing something? --~--~-~--~~~---~--~~ 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 nightmares
Are you using Cake 1.2, or 1.1.18? It is much easier to use pagination in 1.2, simply have: function index(){ $this-set( 'posts', $this-Post-paginate() ); } I'm not sure what you mean about create a function called index() - your sample code there already has this... You can use pagination on any action, not just index if that is what you are asking... On Nov 16, 7:15 am, butangphp [EMAIL PROTECTED] wrote: I'm a beginner and struggling to use pagination correctly in cakephp. The Bakery recommends using this code in the controller. I know its a dumb question, but do I need to create a function called index() in order to make this built in helper work ?? ?php class PostsController extends AppController { var $name = 'Posts'; // for PHP4 installs var $components = array ('Pagination'); // Added var $helpers = array('Pagination'); // Added function index() { $criteria=NULL; list($order,$limit,$page) = $this-Pagination-init($criteria); // Added $data = $this-Post-findAll($criteria, NULL, $order, $limit, $page); // Extra parameters added $this-set('data',$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?hl=en -~--~~~~--~~--~--~---
Re: Several Question
1. Use vendor() to require in whichever classes you need from your vendors folder. 2. View elements should be in your /app/views/elements folder. If you've got to keep that structure though, I guess just including it is the way to go... But do it like vendor( 'themes'.DS.CMS_DEFAULT_THEME.DS.'_top' ); On Nov 16, 2:28 am, FoxMaSk [EMAIL PROTECTED] wrote: Hi, can someone give me some tips on how to proceed ? thanks kind 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?hl=en -~--~~~~--~~--~--~---
Re: How to set a certain language instead of auto-detected by l10n?
Solved by adding function setL10nLocale($language) { $I18n = I18n::getInstance(); $I18n-l10n-get($language); $I18n-l10n-locale=$I18n-l10n-__l10nCatalog[$language] ['locale']; } in AppController, and calling it after language detection. Still it's strange - why the standard way (set 'Config.language' via Configure) used in every tutorial didn't work for 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 -~--~~~~--~~--~--~---