Re: How do I see a SQL statement?
> I am getting the SQL error below but its not showing me the actual SQL > statement that Cake is generating. Is there any way of seeing what it is? Turn on debug mode. http://cake-php.blogspot.com/2006/09/21-things-you-must-know-about-cakephp.html Wayne Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: ERD recommendation
> I was wondering if anyone has any recommendations for a database > design tool. I was hoping to use an OSS product. I generally use Squirrel SQL, or a DB editor in Eclipse/Netbeans IDE which can connect to "any" database that has a JDBC driver. For postgres, I also use pgAdmin. This page has more info about pg-specific tools: http://postgresql.openmirrors.org/docs/techdocs-9.html Wayne --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Anyone built a forum system yet?
> @Brian - Its just a lot of overhead. Ive spoken to many PHP gurus and > they said storing it in the DB is not the best way. I even looked at > PHPbb and they didnt do it that way, unless im completely blind. No offense to your "PHP gurus" but I would suggest that you look at the code for some more forum software before deciding the DB storage approach suggested by Brian is "not the best way." And I'm not saying it is or it isn't -- just suggesting you should look at more implementations before making a decision. Many free PHP forums are open source, so it should be fairly simple to find the proper code and compare: http://en.wikipedia.org/wiki/Comparison_of_Internet_forum_software Wayne --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Politics aside.....
Does that policy change after the election? Or is it a hard and fast rule, effective "forever"? Perhaps you could write a white paper and get permission to publish it? Wayne On Wed, Oct 29, 2008 at 7:19 PM, Walker Hamilton <[EMAIL PROTECTED]> wrote: > > We do get "decent" traffic numbers. > > Butwe have a policy of not releasing them. Sorry. > > On Oct 28, 2:44 pm, teknoid <[EMAIL PROTECTED]> wrote: >> Very nice. >> >> I imagine that you get some decent traffic there? >> Any chance you could share some numbers, experiences and how cake is >> holding up? >> Maybe a little case study? >> >> On Oct 28, 11:33 am, Walker Hamilton <[EMAIL PROTECTED]> wrote: >> >> > I just thought I'd let the cakePHP community know that cakePHP is >> > powering a site and a "utility" service at the Barack Obama website. I >> > built both of these. >> >> > Here's the site:http://radar.barackobama.com/ >> >> > The utility service isn't anything to look at, but let's just say, >> > it's provided some much needed "plumbing" for our infrastructure. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Setting up CakePHP for Reporting
As suggested by Martin, your current way of doing things in Excel may not be ideal. Rather than looking for a way to rebuild the current tool with CakePHP, perhaps you should open your mind a bit, close the Excel sheet, and think about a better way to build a similar tool that provides the same functionality. CakePHP may or may not be a part of that solution. As for the undertone comment, I don't understand what you're trying to ask or say there. Wayne On Tue, Sep 23, 2008 at 12:15 PM, torbjorn <[EMAIL PROTECTED]> wrote: > > point well taken, I should not have past in all the vb code. But it > could be of use for someone, as to research there is no open source > out there that will do what my current spreadsheet is doing. So, my > questions was directed towards CakePHP flexibility of being used for > resoruce scheduling. > > And as always there is always an undertone to replies to question > posted, are there a Google group for CakePHP beginners, no one needs > to reply. Right! > > > > On Sep 22, 5:37 pm, "Wayne Fay" <[EMAIL PROTECTED]> wrote: >> I think you're going to get a much better response with a 5-10 line >> pseudo code example than the nearly 200 line VB code you've included >> below. Personally, I wouldn't even consider looking at something like >> that unless someone is paying me cold hard cash. >> >> As for the "calculate the week" issue, did you search the PHP Manual >> or ask Google? It is pretty obvious:http://us2.php.net/date >> (Hint: search for the word "week", you're bound to find it.) >> >> As for "should you be doing this" -- you might want to consider some >> open source resource scheduling software before deciding that you must >> build it yourself. Only after a formal review of a few with the >> conclusion "we must write our own from scratch" would I consider >> heading down this path, personally. >> >> Wayne >> >> On Mon, Sep 22, 2008 at 11:06 AM, torbjorn <[EMAIL PROTECTED]> wrote: >> >> > Hi, >> >> > I thought I seek feedback from this group on what would be the best >> > direction creating reporting in CakePHP. >> >> > My project that I am working on, is to take resource scheduling excel >> > spreadsheet and move it over to a database, the reason to this is that >> > the spreadsheet has grown to big, and excel is prone to user entry >> > mistakes. We have minimized the number of features that we would like >> > to have initially, to only a handful, to make it in par with the excel >> > spreadsheet functionality. >> >> > 1. User to login to view their assignments >> > 2. Resource Manager to have a login to be able to do the following >> >2.1 Load project resource request from an Excel Spreadsheet >> >2.2 Assign resources to projects >> >2.3 View resources availability >> >2.4 View resources Utilization >> >2.5 Basic Reporting >> >> > We been looking at different ways to do this, and decide to settle on >> > using cakePHP, the team has created the authentication and a menu >> > system that shows menu items based on users type. We have created the >> > database structure so we can load project request and assign resources >> > and store them in a utilization database table. >> >> > But we run in to a snag in the design in creating the resource >> > utilization, the team are split on how we should approach it, so we >> > asking the group for some advice. The ideas we have are: >> >> > Option 1. create a database table that are generated at the time off >> > assigning resources, the table would hold the user_id, date, year, >> > month, day, day of week, month_name, quarter, quarter_name and >> > allocation percentage. The only problem we see with this is that user >> > could be on more than one project in a week. So, when a resource >> > manager assign a resource, we would have to search to see if a record >> > exist for that week and then update it, if not existing week add a new >> > record. >> >> > Option 2. use a "Star Schema" for dimension and facts. The "Star >> > Schema" tables would be updated by a function that is triggered by the >> > resource manager. The resource manager selects a function update >> > allocation, which would start of a process of reading records from the >> > utilization table, and loop around tills all weeks are filled in. The >> > "star table" would have three tables Resour
Re: Setting up CakePHP for Reporting
I think you're going to get a much better response with a 5-10 line pseudo code example than the nearly 200 line VB code you've included below. Personally, I wouldn't even consider looking at something like that unless someone is paying me cold hard cash. As for the "calculate the week" issue, did you search the PHP Manual or ask Google? It is pretty obvious: http://us2.php.net/date (Hint: search for the word "week", you're bound to find it.) As for "should you be doing this" -- you might want to consider some open source resource scheduling software before deciding that you must build it yourself. Only after a formal review of a few with the conclusion "we must write our own from scratch" would I consider heading down this path, personally. Wayne On Mon, Sep 22, 2008 at 11:06 AM, torbjorn <[EMAIL PROTECTED]> wrote: > > Hi, > > I thought I seek feedback from this group on what would be the best > direction creating reporting in CakePHP. > > My project that I am working on, is to take resource scheduling excel > spreadsheet and move it over to a database, the reason to this is that > the spreadsheet has grown to big, and excel is prone to user entry > mistakes. We have minimized the number of features that we would like > to have initially, to only a handful, to make it in par with the excel > spreadsheet functionality. > > 1. User to login to view their assignments > 2. Resource Manager to have a login to be able to do the following >2.1 Load project resource request from an Excel Spreadsheet >2.2 Assign resources to projects >2.3 View resources availability >2.4 View resources Utilization >2.5 Basic Reporting > > We been looking at different ways to do this, and decide to settle on > using cakePHP, the team has created the authentication and a menu > system that shows menu items based on users type. We have created the > database structure so we can load project request and assign resources > and store them in a utilization database table. > > But we run in to a snag in the design in creating the resource > utilization, the team are split on how we should approach it, so we > asking the group for some advice. The ideas we have are: > > Option 1. create a database table that are generated at the time off > assigning resources, the table would hold the user_id, date, year, > month, day, day of week, month_name, quarter, quarter_name and > allocation percentage. The only problem we see with this is that user > could be on more than one project in a week. So, when a resource > manager assign a resource, we would have to search to see if a record > exist for that week and then update it, if not existing week add a new > record. > > Option 2. use a "Star Schema" for dimension and facts. The "Star > Schema" tables would be updated by a function that is triggered by the > resource manager. The resource manager selects a function update > allocation, which would start of a process of reading records from the > utilization table, and loop around tills all weeks are filled in. The > "star table" would have three tables ResourceDimensions, TimeDimension > and AllocationFacts. I personal think this is the right approach, but > has a few learning curves for us. When it is triggered, it should loop > around the user table, if a user do not have an allocation it would > show 100% available, if a user have many allocation for a week, it has > to be summed up, and stored. The issue is the utilization data, we > have start and end date and an allocation, so if the start is 3 feb, > 08 and end is 3 march 08, with the allocation 10%. The user would be > allocated for 10% over that period of time, but how do we use date > function is CakePHP to know what week it is. are there any samples. > > Our Excel Spreadsheet has this VB Macro doing the job, instead of > saving it to a database, it saves it to a row/column, > > - Have anyone tried to do this in the past, like to learn about the > experience and any pitfalls. > - Is CakePHP suitable for doing "Star Schema" and/or for being the > framework for a resource scheduling tool? > - How would be the best way using the macro functions below, have a > component that runs through, with a model that reads the database and > write to the database and a view that shows when completed, any ideas? > > > = sample VB Macro code --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: legacy database and conventions
While Cake has conventions, there is absolutely nothing which requires that you take advantage of them. Given that Cake is a MVC implementation, you will primarily be dealing with customized models to support your legacy database. Models provide $useTable so you can have a model named User that points at a table named VENDOR_ACCOUNTS. I would jump into your implementation head-first and see what you can build. Use this list for specific questions/issues that you run into along the way. If you think a tutorial concerning this subject would be helpful, perhaps you will consider documenting your own experiences and sharing them after you are complete. Wayne On Fri, Sep 19, 2008 at 3:22 PM, Miguel <[EMAIL PROTECTED]> wrote: > > Hi, cakephp has a lot of tutorials, but for the life of me i cant find > a tutorial regarding how to use an existing database, this is a > propietary vendor 's appliance, so changing the schema is not an > option. they use mssql with fancy table names and custom types, all > uppercase. > because of that , i cant use the cake's database lovely conventions > (controller/table/model names, etc), is there a way to "map" between > conventions and existing schemes? > best regards, > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Check out this CakePHP Job Board - Small Problem
Good to hear you made it work. As for the "healthy code" bit, I don't like the all over the place personally, but if it works, this is simply an issue of style preference. This would be my preference: image('pdf-icon.gif', array('alt'=>'', 'style'=>'vertical-align: bottom; margin-right: 5px')); echo $html->link('Information', UPLOADS_URL . "/{$job['Job']['information_doc']}", array('target' =>'_blank', 'style'=>'color: #000; text-decoration: none')); } ?> Also, rather than inline-styling of the elements with the style=>... stuff, I would probably make a few CSS classes and apply them. Again, this is mostly a personal preference. Wayne On Mon, Sep 8, 2008 at 2:20 PM, kujina <[EMAIL PROTECTED]> wrote: > > Oh wow, I seemed to of corrected it to make it work, it seems to work > fine now with the following adjusted on the first line: > > > > image('pdf-icon.gif', array('alt'=>'', > 'style'=>'vertical-align: bottom; margin-right: 5px')) > ?>link('Information', UPLOADS_URL . "/{$job['Job'] > ['information_doc']}", array('target' => > '_blank', 'style'=>'color: #000; text-decoration: none')); ?> > > > > Can anybody confirm that the code looks healthy? > > > > > On Sep 8, 5:51 pm, "Wayne Fay" <[EMAIL PROTECTED]> wrote: >> This is unfortunately something you will have to solve yourself, or >> with the assistance of a local PHP expert. Perhaps you can find a >> decent PHP IDE/editor that will highlight mistakes. Or you could try >> right-clicking and "view source" on the HTML to see the error. Or >> check the logs of your webserver or Cake itself to see an error. >> >> Wayne >> >> >> >> On Mon, Sep 8, 2008 at 2:21 AM, kujina <[EMAIL PROTECTED]> wrote: >> >> > Hi Wayne >> >> > After I made my last post I could see that the changes probably should >> > be made in the "view.ctp" file. >> > I put in the code you sugested, (I'm 99.9% sure I did it correctly) >> > but the job listings pages come up completely blank. >> > Is it becuase the syntax (is that what you call it?) has a mistake in >> > it? >> > I did add an apostrophe to the end of ['information_doc] but that >> > didnt help. >> >> > ...Thanks... >> >> > On Sep 8, 4:33 am, "Wayne Fay" <[EMAIL PROTECTED]> wrote: >> >> Yes, you would alter the view.ctp file. Something along these lines... >> >> >> Wayne >> >> >> > AND THE FOLLOWING IS THE view.ctp FILE >> >> >> >> >>Application Pack >> >> >> >> >>image('pdf-icon.gif', array('alt'=>'', >> >> 'style'=>'vertical-align: bottom; margin-right: 5px')) ?>> >> $html->link('Application Form', UPLOADS_URL . "/{$job['Job'] >> >> ['application_form_doc']}", array('style'=>'color: #000; text- >> >> decoration: none')); ?> >> >> >> >> >> >> >>image('pdf-icon.gif', array('alt'=>'', >> >> 'style'=>'vertical-align: bottom; margin-right: 5px')) ?>> >> $html->link('Job Description', UPLOADS_URL . "/{$job['Job'] >> >> ['job_description_doc']}", array('style'=>'color: #000; text- >> >> decoration: none')); ?> >> >> >> >> >> >> >>image('pdf-icon.gif', array('alt'=>'', >> >> 'style'=>'vertical-align: bottom; margin-right: 5px')) ?>> >> $html->link('Information', UPLOADS_URL . "/{$job['Job'] >> >> ['information_doc']}", array('style'=>'color: #000; text-decoration: >> >> none')); ?> >> >> >> >> >>- Hide quoted text - >> >> - Show quoted text - > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Check out this CakePHP Job Board - Small Problem
This is unfortunately something you will have to solve yourself, or with the assistance of a local PHP expert. Perhaps you can find a decent PHP IDE/editor that will highlight mistakes. Or you could try right-clicking and "view source" on the HTML to see the error. Or check the logs of your webserver or Cake itself to see an error. Wayne On Mon, Sep 8, 2008 at 2:21 AM, kujina <[EMAIL PROTECTED]> wrote: > > Hi Wayne > > After I made my last post I could see that the changes probably should > be made in the "view.ctp" file. > I put in the code you sugested, (I'm 99.9% sure I did it correctly) > but the job listings pages come up completely blank. > Is it becuase the syntax (is that what you call it?) has a mistake in > it? > I did add an apostrophe to the end of ['information_doc] but that > didnt help. > > > ...Thanks... > > On Sep 8, 4:33 am, "Wayne Fay" <[EMAIL PROTECTED]> wrote: >> Yes, you would alter the view.ctp file. Something along these lines... >> >> Wayne >> >> > AND THE FOLLOWING IS THE view.ctp FILE >> >> >>Application Pack >> >> >>image('pdf-icon.gif', array('alt'=>'', >> 'style'=>'vertical-align: bottom; margin-right: 5px')) ?>> $html->link('Application Form', UPLOADS_URL . "/{$job['Job'] >> ['application_form_doc']}", array('style'=>'color: #000; text- >> decoration: none')); ?> >> >> >> >>image('pdf-icon.gif', array('alt'=>'', >> 'style'=>'vertical-align: bottom; margin-right: 5px')) ?>> $html->link('Job Description', UPLOADS_URL . "/{$job['Job'] >> ['job_description_doc']}", array('style'=>'color: #000; text- >> decoration: none')); ?> >> >> >> >>image('pdf-icon.gif', array('alt'=>'', >> 'style'=>'vertical-align: bottom; margin-right: 5px')) ?>> $html->link('Information', UPLOADS_URL . "/{$job['Job'] >> ['information_doc']}", array('style'=>'color: #000; text-decoration: >> none')); ?> >> >> >> > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Check out this CakePHP Job Board - Small Problem
Yes, you would alter the view.ctp file. Something along these lines... Wayne > AND THE FOLLOWING IS THE view.ctp FILE > Application Pack image('pdf-icon.gif', array('alt'=>'', 'style'=>'vertical-align: bottom; margin-right: 5px')) ?>link('Application Form', UPLOADS_URL . "/{$job['Job'] ['application_form_doc']}", array('style'=>'color: #000; text- decoration: none')); ?> image('pdf-icon.gif', array('alt'=>'', 'style'=>'vertical-align: bottom; margin-right: 5px')) ?>link('Job Description', UPLOADS_URL . "/{$job['Job'] ['job_description_doc']}", array('style'=>'color: #000; text- decoration: none')); ?> image('pdf-icon.gif', array('alt'=>'', 'style'=>'vertical-align: bottom; margin-right: 5px')) ?>link('Information', UPLOADS_URL . "/{$job['Job'] ['information_doc']}", array('style'=>'color: #000; text-decoration: none')); ?> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How do I edit my posting in this group ?
You don't... This an email list (like a newsgroup), that happens to have a "message board view" which looks similar to other boards. To "edit" your post, you simply reply to it, and it shows up in a thread under the original posting. Wayne On Sat, Sep 6, 2008 at 3:35 PM, xfh <[EMAIL PROTECTED]> wrote: > > How do I edit my posting in this group ? > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Check out this CakePHP Job Board - Small Problem
I would have a db entry that indicates if Information (and the other PDF files) has been uploaded with a true/false indicator stored in the db. Then you simply show or hide the link depending on the indicator. This should be super simple for you to implement. Wayne On Thu, Sep 4, 2008 at 8:20 AM, kujina <[EMAIL PROTECTED]> wrote: > > Ok' I'll donate to the project. > > The school job board is nearly useable now! > > The last thing I need to do is make it so the "Information" download > in the "application pack" section only apears if you upload a file for > it. > > If I get the "jobs_controller.php" and "view.ctp" available (or the > relevant code) would you be so kind to show me what I need to change. > I could zip the whole job board up too, available for download. > > ...Thanks... > > On Sep 2, 3:07 pm, AD7six <[EMAIL PROTECTED]> wrote: >> On Sep 2, 1:50 am, kujina <[EMAIL PROTECTED]> wrote: >> >> > The $5 goes to AD7six!!! >> >> $kujina->donate('http://www.cakephp.org'); > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: send mail
> Password" code! I think it's probably a good idea to ignore his emails > requesting someone else to do his work and only reply to the ones that have > specific questions whose answers are not easily found on public resources. Fair enough -- Gmail showed him as "Ranjana" for the first 5 or 6, and then this one showed as "Ranju" so I didn't realize it was the same (exceedingly lazy) person... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: send mail
Google for "cakephp email send" for numerous examples. Emailing the group for this is just pure laziness. On Wed, Sep 3, 2008 at 2:19 PM, Ranju <[EMAIL PROTECTED]> wrote: > > I want send email with cakephp.pls help me. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: To write my database records in Excel
This is a very common query on this list. Please search the archives. Also check the bakery for code help, especially this article: http://bakery.cakephp.org/articles/view/generate-excel-spreadsheets-from-your-database Wayne On 8/22/08, Fredy <[EMAIL PROTECTED]> wrote: > > In servlets we hav the option of writing into a Excel / word file > straight away usin > contentype() method Is there any similair way to write my mysql > database records into > Excel sheet using php or else is there some other way ... > > I need to Generate Reports from my database ... dynamic reports(Excel > sheet ) how to do it in php . > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: the questions rarely answered. why?
Polutan, are you looking at the same CakePHP email list archive that I am looking at?? Gmail shows me the following # of responses for the most recent ~30 email threads: 3, 0, 1, 6, 10, 4, 5, 9, 5, 0, 5, 1, 9, 8, 1, 2, 4, 6, 6, 0, 3, 5, 9, 2, 3, 0, 0, 2 I see a few with 0 responses, some with 2 or 3, and many with 5-10. So it seems like "most questions are answered" contrary to your original claim. Are you seeing something different that the rest of us?? Or are you claiming that most of these responses do not actually answer the question(s) that are posed? Wayne On 7/11/08, francky06l <[EMAIL PROTECTED]> wrote: > > Yes guys you right .. after a while you think sometimes "if I answer > this, it will take ages and probably more following questions will > raise and I have also a full job, a girlfriend etc .".. > > At the very beginning, I was reading a lot the list mainly before > questionning, then I began to answer ..and there is a lot to learn in > answering.. > That's the point, I was searching the answer for some peolple, a very > good learning way .. > Now, it's very rare that I am interested in a question, I still answer > though ... but a bit by sequence.. > > Polutan, you should try to answer to people, you will realize that you > learn so much that you do not have many questions... > > cheers > > > On Jul 11, 7:50 pm, mbavio <[EMAIL PROTECTED]> wrote: > > There is a reason why Google exists, and I really hate when users post > > something that can be founded in 20 seconds of Google. Feels like you > > are wasting my time and yours too. > > > > Cheers, > > mbavio > > > > On Jul 11, 9:13 am, "Siebren Bakker" <[EMAIL PROTECTED]> wrote: > > > > > I think that at one point or another, we've all started answering a > > > question > > > before realizing that it wasn't actually a question, but actually a > > > demand. > > > For the most part, if anyone takes the time to first do some research, and > > > still can't find an answer, if they phrase it as a polite question, with > > > as > > > much supporting information as they can think of, and are willing to give > > > even more information if asked about it, their answers will tend to be > > > answered, as generally, all of the people who read the google group and > > > have > > > the information sought after, are willing to help out, if nothing than to > > > point people in the right direction. I know I've been helped a lot through > > > the group, and I've helped others with things they didn't know. It's a > > > kind > > > of mutual give-and-take here. > > > > > In the name of Life, Liberty, and the pursuit of my sanity. > > > Siebren Bakker(Aevum Decessus) > > > > > On Fri, Jul 11, 2008 at 04:53, grigri <[EMAIL PROTECTED]> wrote: > > > > > > > Hello :) i'am so sorry before if this post sounds insulting :) > > > > > i just want to know, why most of questions here is rarely answered? > > > > > > > People (including me) get sick of answering the same questions over > > > > > and over again, often from people with little self-initiative. I think > > > > > some people (especially php noobs) find it easier to post a question > > > > > on google groups rather than spend the time poring over the manual, > > > > > api, blogs, google groups, or cake source code. > > > > > > ...and then don't even ask a decent question. A lot of the unanswered > > > > questions are like "i tried to do {x} and it didn't work - fix it for > > > > me" [as you can see, not even a question!]. People who don't put the > > > > time in to phrasing a question properly haven't put the time into > > > > researching the problem by themselves. > > > > > > > Sometimes I begin writing a reply to a post, but halfway through I > > > > > decide not to post it because it's obvious the person hasn't done any > > > > > preliminary research or hasn't made the effort of asking their > > > > > question in a way that is easy to answer. > > > > > > Yeah, I do this too. I start off with all the best intentions, then > > > > think halfway through "I've answered this before..." and stop. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP and Subscription Based Billing
I'd probably implement it with ACL and then tack the subscription piece on top such that ACL (access or not due to subscription status) would control access to the app. I'd probably have a job that would update the ACL table every day based on subscription status. Sounds like it would be pretty trivial to implement, actually. Of course, I could be wrong. Let us know once you implement it. Wayne On Wed, May 21, 2008 at 1:35 PM, mmayes <[EMAIL PROTECTED]> wrote: > > Hi all, > > Does anybody have any experience or recommendations on setting up a > CakePHP app as a monthly subscription service (ala Basecamp, etc.)? I > have a client that wants to do something like this, and I would very > much like to bake it up. I've done a couple of the typical ecommerce > sites using out of the box packages with SSL, so I'm familiar with the > basics. > > Cheers! > Matt > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: how could i config cakephp with sqlite support
Not positive, but you probably need to specify a complete path to the test.db file. Wayne On 2/18/08, shotchen <[EMAIL PROTECTED]> wrote: > > my Environment is windowXp,php5.25,LightTPD-1.4.18-1- > Win32,sqlite3.5.6; > > i made "The Cake Blog Tutorial" example,but i get a error like this >"Warning (2): sqlite_popen() [function.sqlite-popen]: file is > encrypted or is not a database [CORE\cake\libs\model\datasources\dbo > \dbo_sqlite.php, line 94]" > my database.php config like below: > class DATABASE_CONFIG { >var $default = array( >'driver' => 'sqlite', >'connect' =>'sqlite_popen', >'persistent' => false, >'host' => 'localhost', >'port' => '', >'login' => '', >'password' => '', >'database' => 'test.db', >'schema' => '', >'prefix' => '', >'encoding' => '' >); > } > if i change the datebase to mysql ,it work well。 > my database.php's config like this: > class DATABASE_CONFIG { >var $default = array( >'driver' => 'mysql', >'persistent' => false, >'host' => 'localhost', >'port' => '', >'login' => 'root', >'password' => 'test', >'database' => 'cakephp', >'schema' => '', >'prefix' => '', >'encoding' => '' >); > } > please tell me what is wrong with my config? > > > > --~--~-~--~~~---~--~~ 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: Send E-mail
First off, make a little test.php plain PHP file that verifies that you can send email using PHP's built-in email functionality: http://us2.php.net/mail Then make a little test in a Cake controller that you can call directly which does the same thing. Then you can worry about the emailcomponent etc. Wayne On 2/15/08, dandreta <[EMAIL PROTECTED]> wrote: > > Hi! > I am developing my application with Cake 1.2 and I want to have send e- > mails functionality. > Inside pages folder, I have the view to send e-mail with the basic > fields: Destination, Subject and Message(body). I have been reading > about EmailComponent in Bakery's article > (http://bakery.cakephp.org/articles/view/brief-overview-of-the-new- > emailcomponent) but I have not managed to apply it because e-mail does > not send. Simply I want to be able to send e-mails with text only. > How I can do it? > Do you Know any link or tutorial where it explains? > Have I configure anything to be able to send e-mails? > 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: using substring with findAll
You should turn on debugging to see the actual SQL that is being executed, and then try running it in Mysql. Wayne On 1/31/08, roliver <[EMAIL PROTECTED]> wrote: > > Can anyone tell me if it is possible to use the 'substring' keyword in > Model->findAll() I'm trying to do this but I keep getting the mysql > error "you have an error in yoru sql near...blah..blah) The query I'm > using is below. > > $data = $this->find(array('campaign_id as id'=> > $id,'substring(upload_date,1, 10)'=>'2008-01-31'), > array('imp','clicks','ctr','cpc','cost','pos','conv','conv_rate','cost_per_conv')) > > If can't then what should I use Model->query() ? > > 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: Error testing my View Helper with SimpleTest -- class not found
That did it. Thanks so much Matias, I figured it was something like that. I tried 'Helpers' and other stuff but never just plain 'Xslt' in the second parameter. Wayne On 1/29/08, Matias Lespiau <[EMAIL PROTECTED]> wrote: > > Sorry I made a mistake, the correct syntax is App::import('Helper', 'Xslt'); > > That should work. > > What's going on here is that Cake hasn't loaded your helper class so you > can't instanciate it. > > > > On 1/28/08, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > That doesn't seem to change anything for me, for whatever reason. I > > don't suppose you have a sample project or something that I could > > download and try? > > > > Wayne > > > > On 1/28/08, Matias Lespiau <[EMAIL PROTECTED]> wrote: > > > Before the XsltHelperTest class call App::import('Helper', > 'XsltHelper'); > > > > > > Good luck and happy testing! > > > > > > -- > > > Matias Lespiau > > > http://www.gignus.com/ > > > > > > > > > On Jan 28, 2008 4:46 PM, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > > > > > So I've created my own View helper (it just dispatches to the XSL > > > > module), and now I want to test it with SimpleTest etc. > > > > > > > > My class is named XsltHelper and has a function docToDoc: > > > > class XsltHelper extends AppHelper { > > > >function docToDoc($xml, $xsl) { > > > >$xslt = new xsltProcessor(); > > > >$xslt->importStyleSheet($xsl); > > > >$result = $xslt->transformToDoc($xml); > > > >$xslt = null; > > > >return $result; > > > >} > > > > } > > > > > > > > Everything works fine in my views, I've tested it there already. > > > > > > > > Now I want to get this helper under test, so I've created a > > > > xslt.test.php under tests/cases/helpers and it looks like: > > > > > > > > class XsltHelperTest extends UnitTestCase { > > > >var $in = 'Hello XSL'; > > > >var $xsl = ' > > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; > > > > version="1.0"> > > > select="."/>'; > > > >var $out = 'Hello > > > XSL'; > > > >//var $helpers = array('Xslt'); > > > > > > > >function setUp() { > > > >$this->Xslt =& new XsltHelper(); > > > >} > > > > > > > >function testDocToDoc() { > > > >$res = $this->Xslt->docToDoc($in, $xsl1); > > > >$this->assertEqual($out1, $res); > > > >} > > > > > > > >function tearDown() { > > > >unset($this->Xslt); > > > >} > > > > } > > > > > > > > But I'm getting this error: > > > > Individual test case: helpers\xslt.test.php > > > > > > > > Fatal error: Class 'XsltHelper' not found in > > > > > > > > C:\dev\cake\cake_1.2.0.6311-beta\app\tests\cases\helpers\xslt.test.php > > > > on line 24 > > > > > > > > Anyone know what I'm doing wrong? I can find very little documentation > > > > online regarding testing your own Helpers. I tried adding the var > > > > $helpers line but it didn't do anything for me, so I commented it out. > > > > > > > > Thanks! > > > > Wayne > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > Matias Lespiau > http://www.gignus.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: Error testing my View Helper with SimpleTest -- class not found
That doesn't seem to change anything for me, for whatever reason. I don't suppose you have a sample project or something that I could download and try? Wayne On 1/28/08, Matias Lespiau <[EMAIL PROTECTED]> wrote: > Before the XsltHelperTest class call App::import('Helper', 'XsltHelper'); > > Good luck and happy testing! > > -- > Matias Lespiau > http://www.gignus.com/ > > > On Jan 28, 2008 4:46 PM, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > So I've created my own View helper (it just dispatches to the XSL > > module), and now I want to test it with SimpleTest etc. > > > > My class is named XsltHelper and has a function docToDoc: > > class XsltHelper extends AppHelper { > >function docToDoc($xml, $xsl) { > >$xslt = new xsltProcessor(); > >$xslt->importStyleSheet($xsl); > >$result = $xslt->transformToDoc($xml); > >$xslt = null; > >return $result; > >} > > } > > > > Everything works fine in my views, I've tested it there already. > > > > Now I want to get this helper under test, so I've created a > > xslt.test.php under tests/cases/helpers and it looks like: > > > > class XsltHelperTest extends UnitTestCase { > >var $in = 'Hello XSL'; > >var $xsl = ' > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; > > version="1.0"> > select="."/>'; > >var $out = 'Hello > XSL'; > >//var $helpers = array('Xslt'); > > > >function setUp() { > >$this->Xslt =& new XsltHelper(); > >} > > > >function testDocToDoc() { > >$res = $this->Xslt->docToDoc($in, $xsl1); > >$this->assertEqual($out1, $res); > >} > > > >function tearDown() { > >unset($this->Xslt); > >} > > } > > > > But I'm getting this error: > > Individual test case: helpers\xslt.test.php > > > > Fatal error: Class 'XsltHelper' not found in > > > C:\dev\cake\cake_1.2.0.6311-beta\app\tests\cases\helpers\xslt.test.php > > on line 24 > > > > Anyone know what I'm doing wrong? I can find very little documentation > > online regarding testing your own Helpers. I tried adding the var > > $helpers line but it didn't do anything for me, so I commented it out. > > > > Thanks! > > 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 -~--~~~~--~~--~--~---
Error testing my View Helper with SimpleTest -- class not found
So I've created my own View helper (it just dispatches to the XSL module), and now I want to test it with SimpleTest etc. My class is named XsltHelper and has a function docToDoc: class XsltHelper extends AppHelper { function docToDoc($xml, $xsl) { $xslt = new xsltProcessor(); $xslt->importStyleSheet($xsl); $result = $xslt->transformToDoc($xml); $xslt = null; return $result; } } Everything works fine in my views, I've tested it there already. Now I want to get this helper under test, so I've created a xslt.test.php under tests/cases/helpers and it looks like: class XsltHelperTest extends UnitTestCase { var $in = 'Hello XSL'; var $xsl = ' http://www.w3.org/1999/XSL/Transform"; version="1.0">'; var $out = 'Hello XSL'; //var $helpers = array('Xslt'); function setUp() { $this->Xslt =& new XsltHelper(); } function testDocToDoc() { $res = $this->Xslt->docToDoc($in, $xsl1); $this->assertEqual($out1, $res); } function tearDown() { unset($this->Xslt); } } But I'm getting this error: Individual test case: helpers\xslt.test.php Fatal error: Class 'XsltHelper' not found in C:\dev\cake\cake_1.2.0.6311-beta\app\tests\cases\helpers\xslt.test.php on line 24 Anyone know what I'm doing wrong? I can find very little documentation online regarding testing your own Helpers. I tried adding the var $helpers line but it didn't do anything for me, so I commented it out. Thanks! 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: Cake without a SQL database
Realistically, it would probably be easier for you to move to a Mysql database and use Cake the "regular" way than to try to find a way to keep using your XML etc. Otherwise you could try to see about implementing a driver for your XML file, and just pretend the XML file is a database. But this sounds like a lot more work to me. Wayne On 1/24/08, sam <[EMAIL PROTECTED]> wrote: > > Does anyone have any thoughts on this matter? > > On Jan 21, 9:21 pm, sam <[EMAIL PROTECTED]> wrote: > > I am working on porting my current web site over to a MVC framework. > > Right now I am evaluating Cake PHP. I have gone through the blog > > tutorial and it all makes sense when the back end is a standard SQL > > database. > > > > At present my web site is driven via a XML file and by hard drive > > queries (images on the hard drive). How would I go about implementing > > a model that is powered by these types of sources? > > > > Sam > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP and VBulletin
I would expect that there is a way to auto-login a user from a URL by encrypting their username and password and passing them into a vBulletin "log user in" url/webpage. This is how I would do it, but I don't know vBulletin well enough to tell you specifics. And if such a page does not exist in vBulletin, you should be able to add one without a lot of trouble, I'd hope/expect. Wayne On 12/12/07, Lakshmi S <[EMAIL PROTECTED]> wrote: > Hi All, > > We are trying to integrate vBulletin with a CakePHP application. The > requirement is that when a user clicks the 'Forum' link within the Cake > app, he should be redirected to the vBulletin index page and be > automatically logged in. > > > At the point of click, we will have the user's vBulletin username and > password. Could you advise the code necessary to perform an automatic > sign-in into vBulletin given these two credentials? What is actually > happening is that the session is expiring on the application end when the > login into VBulletin happens. > > We are able to work when CakePHp does not come into picture. However when > we use CakePHP, the VBulletin object is not visible and we have no way to > figure out how to pass the details between the sessions of CakePHP and > VBulletin. They do not work from inside CakePHP due to the vB object > visibility problem. > > > We would appreciate if anyone could help us out in this regard and get this > problem sorted out immediately. This could be done in a commercial basis > and the e-mail id where you can contact us is this or > [EMAIL PROTECTED] > > Thanks in advance for thr helpit would be really appreciated if someone > could help out sort this out. > > Regards, > > Lakshmi > > > > > > --~--~-~--~~~---~--~~ 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: New Cake App In The Wild
Just so you know, the orange background does not line up properly for me with the text boxes. So its hard to actually see/type the code. I'm using IE6. ;-) Also, it might be nice to have a "enter your pickup code" thing somewhere that sends you to the proper http://.../{code} so you don't have to type in a random url just to pick up your text. Wayne On 12/11/07, AJ <[EMAIL PROTECTED]> wrote: > > I totally agree with that sentiment. But remember, this was meant to > be as quick and dirty as possible, with the caveat that it's NOT the > place to do anything super sensitive. As I was building this to fill > my own need, I knew I didn't want to go through the hassle of logins > and passwords. Auto-generating is an idea, but then I've got to write > it on a post-it (or my hand) until I pick it up. Again, defeating its > purpose. > > AJ > > On Dec 3, 9:45 am, "Jon Bennett" <[EMAIL PROTECTED]> wrote: > > > Just launched an extremely basic web app using the 1.2 alpha. It's > > > called ClipRunner and basically served my own need of getting basic > > > text data from one computer to another. > > > > >http://www.cliprunner.com > > > > When I first tried to use it, I entered some text, clicked on 'clip > > it' and was greeted by a 'this code is already in use' > > > > I wonder if it might be preferable to have this auto generated > > somehow, or perhaps have that as an option. > > > > also might be nice to allow people to create an account and save > > 'clips' within, as I for one wouldn't want to have serial numbers as > > publicly accessible. > > > > hth > > > > jon > > > > -- > > > > jon bennett > > w:http://www.jben.net/ > > iChat (AIM): jbendotnet Skype: jon-bennett > > > > --~--~-~--~~~---~--~~ 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 Do I install Mcrypt in Cake?
Mcrypt is a PHP module that must be turned on in your server's php.ini file... so I'm not quite sure what you believe that you have downloaded. You should probably ask RosSoft to help you with the Cookie Component if you are unable to figure it out. This might involve paying him/them some money for their time. On 12/3/07, skoggins <[EMAIL PROTECTED]> wrote: > > Hi all, > > I am trying to use RosSoft's cookie component and it uses Mcrypt so I > downloaded it but can't figure out what I'm supposed to do with it > now. Put files in the vendor folder I guess. Can anyone help? > > 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: Multiple language support?
This is built into the core of CakePHP. Look at i18n examples in the Bakery. On 12/3/07, skoggins <[EMAIL PROTECTED]> wrote: > > Hi all, > > My client would like her website to have support for multiple > languages. Does anyone know the best way to do this? Is there any > CakePHP functionality I should be looking at? > > 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: Display Dynamic Images in Cake??
Did you set the headers correctly (content type etc)? Do you have a space (or more than one) appearing at the beginning of your image file which would cause these problems? What PHP barcode generation library are you using? Wayne On 11/27/07, jonathan <[EMAIL PROTECTED]> wrote: > > Hi All, > > This seems to have come up a number of times before, but I have not > found a definitive answer. I am trying to generate a dynamic image > (in this case, a barcode from a PHP barcode generation library). I > have tried every combination of headers, views, layouts, etc. and > still all I get is the raw image string (in view source) and not the > image properly rendered. Even when I try to save the image to the > filesystem, it is blank. I know the library works, because I paste > almost identical code outside of Cake and all is perfect. > > Does anyone have a definitive way to display image data in Cake? > (Version 1.1x please ;) > > Thanks much, > Jonathan > > > --~--~-~--~~~---~--~~ 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: Link has expired
What migration system are you talking about?? What "link" has expired? On Nov 20, 2007 1:44 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > The link for the zip file has expired. Is anyone using this migration > system? What are people using for migrations? > > > > --~--~-~--~~~---~--~~ 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: Sad Question
Sorry for the confusion, I was really responding to the original post, specifically: > So, the question: > Since I have followed every single tutorial I could find on the web > about installing Cake on IIS for the last 3 days (this includes me > testing if I could just put Apache on Windows which does not work) I > really have no other choice but to switch frameworks. And I'm just replying to let Christopher know that Windows + Apache + Mysql + PHP + Cake works great/fine for me and many others. I'm curious why he says "Apache on Windows does not work"... Wayn On 11/17/07, Baz <[EMAIL PROTECTED]> wrote: > I assumed he was trying to use PHP under IIS. > > > On Nov 17, 2007 5:06 PM, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > I run Apache plus Cake and Mysql on Windows all the time. And servers > > are generally Apache on Linux. I change the config file at the start > > of a new project, sync the rest over during development, and > > everything just works. > > > > Wayne > > > > > > > > > > On 11/17/07, Baz <[EMAIL PROTECTED]> wrote: > > > I say slap WAMP on there and call it a day :D. > > > > > > Sorry dude, it does suck. > > > --~--~-~--~~~---~--~~ 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: Sad Question
I run Apache plus Cake and Mysql on Windows all the time. And servers are generally Apache on Linux. I change the config file at the start of a new project, sync the rest over during development, and everything just works. Wayne On 11/17/07, Baz <[EMAIL PROTECTED]> wrote: > I say slap WAMP on there and call it a day :D. > > Sorry dude, it does suck. > > On Nov 17, 2007 2:19 PM, Christopher E. Franklin, Sr. < > [EMAIL PROTECTED]> wrote: > > > > > Hi, John. Thanks for the reply and I totally agree with you on this > > one but, the descision was made based on an idiot in Indiana who > > already signed and payed 2.5 million to Microsoft to come in and > > revamp our whole communications network from Great Plains accounting > > servers to all TV channel and newspapers web sites to be transferred > > to a server farm in the middle of no-where. The requirement is that > > the site can easily be copied from our directories to thiers lol! > > > > Yes I do need a new job lol! This pays crap especially for > > California. This company pulls in 175 mil profit a year (this is a > > subsidary) and I barely make double min wage. It sucks but, it's the > > only work I can find that deals with computers. The alternative is > > installing alarm systems for Brinks or something in attics at 120 > > degrees. Until I finish with my Bachelors, I am stuck. > > > > On the error, it seems that once I port over Cake to IIS6, uncomment > > the correct line in core.php and clean out tmp, it still will not load > > components and helpers. Some load, some do not. Namely the Session > > component, Cookie component and the Html helper. > > > > Doing some tests in app_controller in the beforeFilter() method, I > > tried to manually load all sorts of helpers and components. Those in > > particular stop the site dead in it's tracks. > > > > Another peculiar thing, if I uncomment the App.baseUrl config in > > core.php I get an error about the cake_logger not knowing what > > LOG_ERROR is, even though it is clearly defined in core.php. (This is > > from a fresh cake install). > > > > I will say this, I am at home right now on my laptop that has Vista > > and looking at IIS7, I can get a fresh install of cake to work > > complete with the urls looking like this: index.php?url=/controllers/ > > controllerMethod/params1 > > But, when I put my BFS (Big F* Site) up there, I get the same > > errors about cake not being able to load components, helpers, models > > and controllers. Works fine on Apache with mod_rewrite, sucks on IIS > > with nothing. > > > > I am also hoping that since, IIS7 has HttpRedirect module built in to > > it, I can get something going that is sort of like mod_rewrite. /shrug > > > > Here's to hoping I can get something going this weekend. > > > > On Nov 16, 3:16 pm, "John David Anderson (_psychic_)" > > <[EMAIL PROTECTED]> wrote: > > > On Nov 16, 2007, at 4:00 PM, Christopher E. Franklin, Sr. wrote: > > > > > > > > > > > > > I have been working with CakePHP for about a year now and have written > > > > a company website in that year that totals in about 150MB of combined > > > > PHP code. This whole time, I have been using MySQL, Linux, and Apache > > > > to do my coding and testing but, recently, the corporate higher-ups > > > > issued a mandate that all web servers are going to be IIS(6/7). > > > > > > > Upon hearing this, we installed Windows Server 2003 RC2 w/ IIS6.0 and > > > > tried to port over the cake code. Low and behold, it doesn't work. Not > > > > just a little bit but, in a bad way that the site stops dead in it's > > > > tracks from not being able to load select components and helpers such > > > > as , Session, Cookie, Html, Javascript, etc. > > > > > > You're gonna need to provide a lot more details for some help. But... > > > > > > > > > > > > > Today is my 3rd day fighting with this and my question is sad now > > > > because, my manager wants me to abandon cake alltogether. So, that's > > > > going to be 1.1 years worth of code, down the tube unless I can get > > > > Windows IIS working with Cake (with or without re-write). > > > > > > ...let me get this straight. > > > > > > 1. Freaking huge web application works on current platform (150MB of > > > code - is that like 5 or 6 million lines? I hope I'm reading that > > > wrong). > > > > > > 2. Suits make unilateral decision to use a new (and imho, sub-par) web > > > server. > > > > > > 3. When problems arise, rather than go back to what works, your boss > > > wants to rewrite the aforementioned freaking huge web application. > > > > > > > So, the question: > > > > Since I have followed every single tutorial I could find on the web > > > > about installing Cake on IIS for the last 3 days (this includes me > > > > testing if I could just put Apache on Windows which does not work) I > > > > really have no other choice but to switch frameworks. > > > > > > Sounds to me like what you need to consider switching... is your job. > > > Honestly. > > >
Re: Altering size of buttons emitted by FormHelper
I've tried that too, and it doesn't work. If you check the source code for FormHelper, the end() method only takes one parameter, whereas the submit() method takes 2 like you'd expect. https://trac.cakephp.org/browser/trunk/cake/1.2.x.x/cake/libs/view/helpers/form.php So I'm just going to switch over to $form->submit(). Wayne On 11/15/07, francky06l <[EMAIL PROTECTED]> wrote: > > 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: > > end('Submit', array('size'=>'10'));?> > > 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 -~--~~~~--~~--~--~---
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: end('Submit', array('size'=>'10'));?> 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: Transform column names
Assuming your db supports views, I'd probably just build some read/write db views that hide the ugly column names with the names you'd prefer to use, and then use the views as the $table for your model etc. Wayne On 11/12/07, mmalca <[EMAIL PROTECTED]> wrote: > > Iam looking for a way to transform column names (behaviour perhaps?). > I have an existing database with very confusing column names (like > FP002EX - remember Fortran) and would like to display/use/edit them in > cakephp via friendlier name: eg FP002EX -> title > > Something like: > > class MyModel extends AppModel { > var $actsAs = array('transnames'); > var $transNames = array('FP002EX'=>'title',...); > } > > controller usage: > $this->data['MyModel']['title'] = 'New title'; // would set FP002EX > $this->save($this->data); > > Is there an existing solution to my problem? Can someone point me to > the best way for implementing this behaviour? > Tnx > > > > > --~--~-~--~~~---~--~~ 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: Why use formhelpers?
I don't disagree with many of your comments. I've run into some form issues too, but I've posted them and some have already been resolved: https://trac.cakephp.org/ticket/3317 https://trac.cakephp.org/ticket/3354 https://trac.cakephp.org/ticket/3412 I don't think should be automatic either. Perhaps post a couple bugs (with patches!) and track them for a bit. If they make sense, they will probably be accepted. Wayne On 11/12/07, MikeK <[EMAIL PROTECTED]> wrote: > > Ths is not meant to be disrespectful in anyway -- I love cake and it > has been a productivity boon, and I respect all that contribute to it. > However as I continue to develop cake code I have found myself > wondering why I am using the form helpers at all. It has been moving > through various CSS templates that has brought me to this point. > > I find myself spending lots of time reading form helper code to figure > out what it wants, and looking at emitted code to figure out what it > did. When I could have just coded the html myself with far less > trouble. Furthermore it's not particularly more readable code as a > result of using helpers. (the only thing that I hate more is messing > with CSS). > > Half the time I am writing code to make the helpers NOT emit a div > where I don't want one. Other times it is to specify css classes where > necessary in html anchors to go with a css style -- or to redefine the > emitted div for a label to be what I need to to be. Generally I'm of > the opinion that these helpers shouldn't emit ANY divs -- it's very > uncakelike to force a view/css structureon a developer -- seems to me > they should be completely independent. > > Is it me or is there truly diminishing returns here? For example: > > input('boat', array('error' => 'Boat is required', > 'div' => '', 'class' => 'field', 'label' => array('class' => 'left', > 'text' => 'Boat:')));?> > > input('favorite lure', array('div' => '', 'class' => > 'field', 'label' => array('class' => 'left', 'text' => 'Favorite > Lure:')));?> > > submit('Update', array('div' => false, 'class' => > 'button', 'id' => 'submit'));?> > > > > > --~--~-~--~~~---~--~~ 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: Add Syntax Coloring to .thtml files with JEdit?
I was wondering why mine just worked, and just realized why -- all my thtml and ctp files start with wrote: > > in jedit select Utilities -> Global Options. > Then in the left navigation click on 'Editing'. > In the first box 'change settings for mode' scroll down until you find > php. > Uncheck the Global settings checkbox. > Then in the textbox that says File name Glob: change the entry from > *.{php3,php4,php,phtml,inc} > to > *.{php3,php4,php,phtml,inc,thtml} > > Click 'ok' > Then restart Jedit. Boom Baby. > > > > > > > > --~--~-~--~~~---~--~~ 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: Add Syntax Coloring to .thtml files with JEdit?
You may need to add/install the PHPParser plugin, if you don't already have it. Or upgrade to the latest (dev) version of jEdit. Wayne On 11/6/07, Robert Sosinski <[EMAIL PROTECTED]> wrote: > > Hello, > > I am starting to use JEdit with CakePHP, however .thtml files do not > show any syntax coloring. Is there some way I can change this? > > 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: Space before layout content - Resolved
> > similar utility? Essentially, any space in any non-view file (outside > > of tags) should be identified and eliminated. > > I use Ant for my build process out of Eclipse and have just looked up > regular expressions in Ant. You could easily use the "ReplaceRegExp" Ideally we could cook up a way to check for spaces (and perhaps even remove them automatically) using Cake itself. It would be like the bake utility; we could have a "validate" utility. That would be nice! 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: Router::disconnect ?
I would probably do something in a beforeFilter(), to check how it was called and reply back with an error (or redirect) if it is a standard GET or POST. Wayne On 11/1/07, Cristian Vrabie <[EMAIL PROTECTED]> wrote: > > hey, i want to make the access to one of my controllers private (i just > use it internally to render content in another controller). how can i > make the router to do that? is there a Router::disconnect function? > > > > --~--~-~--~~~---~--~~ 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: XML Parsing Error: xml declaration not at start of external entity
Yes, this is a not-uncommon PHP error, and it causes problems in many places. Wayne On 10/31/07, seacloud9 <[EMAIL PROTECTED]> wrote: > > Fixed it. CakePHP users beware of leaving spaces in your model, > controller, view etc.. This error was a pain to track down. All it > takes is one space and your fun bus is up on blocks for RSS... Only > took a couple of days to track down... > > On Oct 31, 12:11 pm, seacloud9 <[EMAIL PROTECTED]> wrote: > > XML Parsing Error: xml declaration not at start of external entity > > Location:http://ihang10.com/rss/posts > > Line Number 1, Column 2: > > -^ > > > > All pages in my cakePHP install add one space at the beginning of > > every document. It causes an overall foobar on my rss feed. I have > > altered the layout default.thml page to be UTF-8 NO BOM's in > > dreamweaver. I have also done the same in rss.thtml I still have one > > space this error is driving me crazy like an itch I can't scratch. > > Has anyone run into this my fun bus seems to be up on > > blocks... > > > > I have also read this section of > > http://logs.cakephp.nu/cakephp/chat.log.2007-05-27 > > > > * 18:14 rnickel > > * 18:14 rnickel ^ > > * 18:14 rnickel that's what firefox tells me > > * 18:14 AD7six rnickel that is not an error message. > > * 18:14 rnickel I didn't code the opening xml code > > * 18:14 rnickel parsing error - heh > > * 18:15 sgumby_ maybe you left spaces after the closing ?> > > of your > > controller > > > > * 18:24 rnickel Line Number 1, Column 5: > encoding="UTF-8" ?> > > * 18:24 rnickel ^ > > * 18:26 AD7six rnickel you have 4 characters which are before the > > xml declaration that you need to find. do anything that will issue a > > header and you'll then get a php "cannot do xyz because output started > > in /offending/file/open/me/and/delete/the/space/on/line:1" error > > message. > > * 18:27 jerrylee([EMAIL PROTECTED]) left > > irc: "so late here, see you guys" > > * 18:27 Rik`_ ([EMAIL PROTECTED]) joined > > #cakephp. > > * 18:28 rnickel AD7six I have found where the xml helper's > > header() > > function, but what would call and output this header? > > * 18:28 rnickel I'm not too sure how the inner workings of > > cake-php > > works at the moment, just how to use it haha > > * 18:29 AD7six rnickel this has nothing to do with cake. > > * 18:29 sgumby_ ([EMAIL PROTECTED]) > > left irc: "This computer has gone to sleep" > > * 18:29 ivan_24_somebody knows something about i18n feature > > in > > cakephp 1.2 > > * 18:29 rnickel AD7six: it doesn't? cake is generating all > > this > > content... > > * 18:29 ivan_24_i need to know what defaut.po catch cake > > when the > > confing.language is not set or is set wrong. > > * 18:29 AD7six rnickel really? I would say your code is. > > * 18:30 AD7six rnickel put > > as the first line of your layout. then read the error messages. > > * 18:30 Lucian ivan_24: when no config.language is set, cake > > doesn't catch any default.mo file > > * 18:30 rnickel All I did was add the following to the > > routes.php :Router::parseExtensions();, and in my services.ctp (within > > the xml directory of course) I have this: > > * 18:30 rnickel > > * 18:30 rnickel > > * 18:31 Rik`([EMAIL PROTECTED]) left irc: > > Read error: 110 (Connection timed out) > > * 18:31 ivan_24_i wonder if the idea of cakephp is that you > > have > > tu set your msgid'S in the .po (i.e app/locale/spa/LC_MESSAGEs/ > > default.po) with your default language and when if the > > config.languaje="@#?~" for example the locale doesnt exist and dont > > found the locale, then the output of the function __("my sentence") is > > "my sentence" > > * 18:31 Nickchange: Rik`_ -> Rik` > > * 18:32 Lucian ivan_24: true, when no local file is found, __("my > > sentence") returns "my sentence" > > * 18:32 rnickel AD7six: I did the header thing, and my > > browser was > > forwarded > > * 18:32 AD7six rnickel so what does that tell you. > > * 18:33 sightPress sorry, i /have/ to share > > this.http://www.dagbladet.no/nyheter/2007/05/26/501766.html > > * 18:33 ivan_24_then always you muts set yours msgids with > > your > > default language > > * 18:33 rnickel AD7six: it seems that any file that I > > request has 4 > > spaces infront of the first line > > * 18:34 rnickel i.e. > * 18:34 ivan_24_what happened if i want set my msg like > > "page1.prodtuc2" > > * 18:34 ivan_24_happend > > * 18:34 Lucian ivan_24: that, or you
Re: Space before layout content - Resolved
Thanks for following up, Langdon. This is a not-uncommon issue with PHP, unfortunately. I wish there was a simple way to check non-view PHP files for spaces -- anyone have a working regexp for grep or a similar utility? Essentially, any space in any non-view file (outside of tags) should be identified and eliminated. Wayne On 10/30/07, Langdon Stevenson <[EMAIL PROTECTED]> wrote: > > This was caused by a space before the difficult to track down. I discovered that the space was being > introduced when the models were loaded. By checking all of the models I > discovered the error. Once removed, there was no more problem. > > Hope this might be helpful to someone else in the future. > > Regards, > Langdon > > Langdon Stevenson wrote: > > I am developing an action (in a Cake 1.1 app) that outputs xml and have > > hit a problem that has been mentioned here before but never resolved. > > > > I am getting a single space character before the output of the layout > > begins. > > > > I have checked other regular html pages and they too have this problem, > > but given the not-so-strict parsing of HTML it doesn't cause a problem. > > > > Has anyone else resolved this issue in Cake 1.1? Does anyone know where > > to start looking for this extra character? > > > > Regards, > > Langdon > > > > --~--~-~--~~~---~--~~ 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: PDF Creation in Cake 1.2
It doesn't make a lot of sense to have this kind of discussion in a private email thread... It is a lot more helpful to keep these discussion in the public forum, to benefit other current and future users of Cake who want to create PDFs. Wayne On 10/30/07, kodienz <[EMAIL PROTECTED]> wrote: > > If anyone feels like emailing me: > > [EMAIL PROTECTED] and help a newbie create a prototype please > please feel free!!! > > > > > --~--~-~--~~~---~--~~ 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: SWF files and cakephp
There have been several emails recently about SWF with Cake. Do a search in the Google Group for Flash or SWF, perhaps one of those threads will be of help. Wayne On 10/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi everybody, I have a swf application album working 100%, but when I > try to use it with cakephp I have some problems: > > I put the file on /webroot/files/ directory, BUT, in the .fla file my > designer wrote the paths like "./images". "./foo". I've been trying to > change those paths to "/files/foo" and some things work, others dont. > Is there a way I can place my swf file normally (just like my designer > gave it to me) without modifying anything at all? maybe .htaccess > file? I need to tell apache not to process that like cakephp > > > > > --~--~-~--~~~---~--~~ 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: Validation on NON obligatory fields and allowEmpty
Hey that's quite nice. Thanks for posting it back to the thread, I'll probably use that soon... Wayne On 10/30/07, senser <[EMAIL PROTECTED]> wrote: > > Finally I solved it: > > 'reminder'=>array( 'date'=>array('rule'=>array('date', > 'format'=>'ymd'), 'allowEmpty'=>true, 'required'=>false), > > 'length'=>array('rule'=>array('between', 10, 10), > 'allowEmpty'=>true, 'required'=>false), > > 'valid_date'=>array('rule'=>array('validReminderDate'), > 'allowEmpty'=>true, 'required'=>false)) > > Hope it's helpful for other bakers > > On Oct 30, 8:51 am, senser <[EMAIL PROTECTED]> wrote: > > Yes, I know for this method, but don't think it's a solution. > > > > The only working variant I succeed is: > > 'reminder'=>array( 'required'=>false, > > 'allowEmpty'=>true, > > 'rule'=>array('date', > > 'format'=>'ymd'), > > 'rule'=>array('between', 10, 10), > > 'rule'=>array('validReminderDate')) > > > > But in this way I can set just one error_message > > > > On Oct 30, 7:59 am, "Wayne Fay" <[EMAIL PROTECTED]> wrote: > > > > > Roll it back to a previous version if you don't like this one... > > > > > Wayne > > > > > On 10/30/07, senser <[EMAIL PROTECTED]> wrote: > > > > > > I've read that the correct way is to set error messages in layouts, > > > > but not in models. > > > > But even if I use a code like this: > > > > > > 'reminder'=>array( array('required'=>false), > > > > array('allowEmpty'=>true), > > > > array('rule'=>array('date', > > > > 'format'=>'ymd'), > > > > 'message'=>'Invalid date format'), > > > > array('rule'=>array('between', 10, > > > > 10), 'message'=>'Length is > > > > 10 symbols'), > > > > > > > > array('rule'=>array('validReminderDate'), 'message'=>'Date > > > > can not be in the past')) > > > > > > I still get an error "Error in field Reminder" when the field is > > > > replete correctly. > > > > > > P.S. I'm terribly sorry that I upgraded to this new version of CakePHP > > > > - I've already been trying correct my code for two days - buttons has > > > > gone away (http://groups.google.com/group/cake-php/browse_thread/ > > > > thread/53731efd48b0c4b/ef2d193a5c0ae668?lnk=gst&q=button > > > > +1.2.0.5875#ef2d193a5c0ae668), validation rules are broken . > > > > and who knows what else > > > > > > On Oct 30, 12:28 am, francky06l <[EMAIL PROTECTED]> wrote: > > > > > Well to receive a different message, you need to associate message > > > > > into your rule or in your view : > > > > > > > array('rule'=>array('between', > > > > > 10, 10), 'message' => "invalid range"), > > > > > > > I use the cake1.2 branch > > > > > cheers > > > > > > > On Oct 29, 3:28 pm, senser <[EMAIL PROTECTED]> wrote: > > > > > > > > I've chaged the code in my Model in this way: > > > > > > > > var $validate=array('reminder'=>array( 'required'=>false, > > > > > > 'allowEmpty'=>true, > > > > > > 'rule'=>array('date', > > > > > > 'format'=>'ymd'), > > > > > > 'rule'=>array('between
Re: Validation on NON obligatory fields and allowEmpty
Roll it back to a previous version if you don't like this one... Wayne On 10/30/07, senser <[EMAIL PROTECTED]> wrote: > > I've read that the correct way is to set error messages in layouts, > but not in models. > But even if I use a code like this: > > 'reminder'=>array( array('required'=>false), > array('allowEmpty'=>true), > array('rule'=>array('date', > 'format'=>'ymd'), > 'message'=>'Invalid date format'), > array('rule'=>array('between', 10, 10), > 'message'=>'Length is > 10 symbols'), > array('rule'=>array('validReminderDate'), > 'message'=>'Date > can not be in the past')) > > I still get an error "Error in field Reminder" when the field is > replete correctly. > > > P.S. I'm terribly sorry that I upgraded to this new version of CakePHP > - I've already been trying correct my code for two days - buttons has > gone away (http://groups.google.com/group/cake-php/browse_thread/ > thread/53731efd48b0c4b/ef2d193a5c0ae668?lnk=gst&q=button > +1.2.0.5875#ef2d193a5c0ae668), validation rules are broken . > and who knows what else > > On Oct 30, 12:28 am, francky06l <[EMAIL PROTECTED]> wrote: > > Well to receive a different message, you need to associate message > > into your rule or in your view : > > > > array('rule'=>array('between', > > 10, 10), 'message' => "invalid range"), > > > > I use the cake1.2 branch > > cheers > > > > On Oct 29, 3:28 pm, senser <[EMAIL PROTECTED]> wrote: > > > > > I've chaged the code in my Model in this way: > > > > > var $validate=array('reminder'=>array( 'required'=>false, > > > 'allowEmpty'=>true, > > > 'rule'=>array('date', > > > 'format'=>'ymd'), > > > 'rule'=>array('between', 10, 10), > > > > > > 'rule'=>array('validReminderDate'))); > > > > > Now thigs seems to work but I cannot set different > > > valdiaton_error_messages - for any validation rule i receive "This > > > field cannot be left blank" when the field is invalid. Here is a part > > > of my view: > > > > > print $form->input('Comment.reminder', array('type'=>'text', > > > 'length'=>10, 'maxlength'=>10, > > > > > > 'error'=>array('date'=>'Invalid date format', > > > 'length'=>'Length is 10 symbols', 'valid_date'=>'Date can not be in > > > the past'))); > > > > > On Oct 29, 4:01 pm, francky06l <[EMAIL PROTECTED]> wrote: > > > > > > Sorry did not read the complete code, but I have something like this > > > > that works : > > > > > > 'email' => > > > > array(array('allowEmpty' => true, > > > >'rule' => > > > > 'checkEmails')) > > > > > > On Oct 29, 2:54 pm, senser <[EMAIL PROTECTED]> wrote: > > > > > > > Hi, > > > > > > > After upgrading to CakePHP 1.2.0.5875 from 1.2.0.5427 I can't set > > > > > validation for form fields that are NO obligatory. Untill now I used > > > > > this code ana everything seemed to work fine: > > > > > > > /MODEL SNIPPET/ > > > > > var > > > > > $validate=array('reminder'=>array( > > > > > 'required'=>array('rule'=>array('required'=>false)), > > > > > > > > > > 'allow_empty'=>array('rule'=>array('allowEmpty'=>true)), > > > > > > > > > > 'date'=>array('rule'=>array('date', 'format'=>'ymd')), > > > > > > > > > > 'length'=>array('rule'=>array('between', 10, 10)), > > > > > > > > > > 'valid_date'=>array('rule'=>array('validReminderDate'))); > > > > > // > > > > > The idea was if user doesn't enter reminder date and validation of > > > > > this field passes, but if he enters some values field must be > > > > > validated as a valid date in the future (this is the custom validation > > > > > rule called validReminderDate). This worked fine for me with previous > > > > > version, but now if the reminder_field is left blank the form doesn't > > > > > validate. > > > > > > > I have read all the topics in GoogleGroups relevant to this bu I > > > > > didn't find a > > > > > solution:http://groups.google.com/group/cake-php/search?group=cake-php&q=allow.. > > > > > > > The theme is discussed many times but still doesn't have safe and > > > > > hopeful cakephp_native solution . or may be I miss something. > > > > > > > I'm really stuck with this validation problem. > > > > > > > Give me some help pls. > > > > > > > P.S. > > > > > Set::fi
Re: Problem embedding flash movie into my view
Have you checked the HTML produced by the view to confirm the path? Copy and paste the URL from the tag and see if it works. I think you might be missing a "/" somewhere... or something. Wayne On 10/29/07, Aero <[EMAIL PROTECTED]> wrote: > > I'm trying to embed a flash movie into one of the views on my cakePHP > site. For some reason whenever i try to do this the movie fails to > show up. The html/php code I am using is: > > codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/ > swflash.cab#version=8,0,0,0" width="250" height="175" id="fileUpload" > align="middle"> > > > > Which I pretty much copied and pasted from the default html file that > flash produces. The path to the movie is correct, so I have no idea > what I could be doing wrong. If anyone has some suggestions, or can > point me to a tutorial on where I can learn to do something similar to > this please let me know. 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: Reversible encrypt functions in Cake?
Ah nevermind, I see it now: https://trac.cakephp.org/browser/trunk/cake/1.2.x.x/cake/libs/security.php Thanks. On 10/26/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > Must be new, I've got cake_1.2.0.5427alpha and there's no > Security.cipher(). I'll go check a more recent build... > > > On 10/26/07, nate <[EMAIL PROTECTED]> wrote: > > > > Check the cipher() function in the Security class. > > > > On Oct 26, 2:06 pm, "Wayne Fay" <[EMAIL PROTECTED]> wrote: > > > I solved the problem with mcrypt (so I can build my own stuff if > > > necessary) but I'm still wondering if anyone else has advice on > > > reversible encryption in Cake... > > > > > > Wayne > > > > > > On 10/26/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > > > > Hi bakers, > > > > > > > I need a reversible encrypt function in Cake, and I need to be able to > > > > use it in a non-Cake PHP class as well. Basically I've got an export > > > > function that is nontrivial and previously written in PHP, and instead > > > > of rewriting things to make it work in Cake, I'm planning to encrypt > > > > the URL parameters with Cake and then decrypt them in my export > > > > function. > > > > > > > I wrote a little EncryptionHelper using some code I took from > > > >www.php.combut it doesn't seem to be working in Cake though it works > > > > fine in "standard" PHP. I had to uncomment the > > > > "extension=php_mcrypt.dll" line in php.ini of course. > > > > > > > Here's the error: > > > > Fatal error: Call to undefined function mcrypt_get_iv_size() in > > > > C:\dev\cake\app\views\helpers\encryption.php on line 18 > > > > > > > Here's the code: > > > > $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB); > > > > $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); > > > > $key = "This is a very secret key"; > > > > return urlencode(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, > > > > $key, $text, MCRYPT_MODE_ECB, $iv))); > > > > > > > So it seems like I can't use these built-in PHP functions for some > > > > reason... Any advice? > > > > > > > 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: Reversible encrypt functions in Cake?
Must be new, I've got cake_1.2.0.5427alpha and there's no Security.cipher(). I'll go check a more recent build... On 10/26/07, nate <[EMAIL PROTECTED]> wrote: > > Check the cipher() function in the Security class. > > On Oct 26, 2:06 pm, "Wayne Fay" <[EMAIL PROTECTED]> wrote: > > I solved the problem with mcrypt (so I can build my own stuff if > > necessary) but I'm still wondering if anyone else has advice on > > reversible encryption in Cake... > > > > Wayne > > > > On 10/26/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > > Hi bakers, > > > > > I need a reversible encrypt function in Cake, and I need to be able to > > > use it in a non-Cake PHP class as well. Basically I've got an export > > > function that is nontrivial and previously written in PHP, and instead > > > of rewriting things to make it work in Cake, I'm planning to encrypt > > > the URL parameters with Cake and then decrypt them in my export > > > function. > > > > > I wrote a little EncryptionHelper using some code I took from > > >www.php.combut it doesn't seem to be working in Cake though it works > > > fine in "standard" PHP. I had to uncomment the > > > "extension=php_mcrypt.dll" line in php.ini of course. > > > > > Here's the error: > > > Fatal error: Call to undefined function mcrypt_get_iv_size() in > > > C:\dev\cake\app\views\helpers\encryption.php on line 18 > > > > > Here's the code: > > > $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB); > > > $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); > > > $key = "This is a very secret key"; > > > return urlencode(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, > > > $key, $text, MCRYPT_MODE_ECB, $iv))); > > > > > So it seems like I can't use these built-in PHP functions for some > > > reason... Any advice? > > > > > 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: Reversible encrypt functions in Cake?
I solved the problem with mcrypt (so I can build my own stuff if necessary) but I'm still wondering if anyone else has advice on reversible encryption in Cake... Wayne On 10/26/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > Hi bakers, > > I need a reversible encrypt function in Cake, and I need to be able to > use it in a non-Cake PHP class as well. Basically I've got an export > function that is nontrivial and previously written in PHP, and instead > of rewriting things to make it work in Cake, I'm planning to encrypt > the URL parameters with Cake and then decrypt them in my export > function. > > I wrote a little EncryptionHelper using some code I took from > www.php.com but it doesn't seem to be working in Cake though it works > fine in "standard" PHP. I had to uncomment the > "extension=php_mcrypt.dll" line in php.ini of course. > > Here's the error: > Fatal error: Call to undefined function mcrypt_get_iv_size() in > C:\dev\cake\app\views\helpers\encryption.php on line 18 > > Here's the code: > $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB); > $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); > $key = "This is a very secret key"; > return urlencode(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, > $key, $text, MCRYPT_MODE_ECB, $iv))); > > So it seems like I can't use these built-in PHP functions for some > reason... Any advice? > > 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 -~--~~~~--~~--~--~---
Reversible encrypt functions in Cake?
Hi bakers, I need a reversible encrypt function in Cake, and I need to be able to use it in a non-Cake PHP class as well. Basically I've got an export function that is nontrivial and previously written in PHP, and instead of rewriting things to make it work in Cake, I'm planning to encrypt the URL parameters with Cake and then decrypt them in my export function. I wrote a little EncryptionHelper using some code I took from www.php.com but it doesn't seem to be working in Cake though it works fine in "standard" PHP. I had to uncomment the "extension=php_mcrypt.dll" line in php.ini of course. Here's the error: Fatal error: Call to undefined function mcrypt_get_iv_size() in C:\dev\cake\app\views\helpers\encryption.php on line 18 Here's the code: $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $key = "This is a very secret key"; return urlencode(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv))); So it seems like I can't use these built-in PHP functions for some reason... Any advice? 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: Model Name Magic Needed
Thinking about it more... You should probably be able to get away with just the $uses = Katch and the class Katch model name change, plus the $this->Katch changes. This would allow you to keep your CatchController etc which keeps your URLs looking like you want. Or you could just add some routes to point /catch/ to /katch/ and do what I suggested originally. Wayne On 10/25/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > In your controller, you'd need $uses = array('Katch'); > > Here's what I would do: > 1. Commit all your code into SVN. > 2. Do a global find and replace Catch for Katch in your files. > 3. Do a global find and replace catch for katch in your files. > 4. Fix the $name in model Katch. > > That should generally fix things. You may also have some small issues > with foreign keys named "catch_id" so you'll need to think about that > too. > > Wayne > > On 10/25/07, MikeK <[EMAIL PROTECTED]> wrote: > > > > We are trying... > > > > So would this have a chance? > > > > In model: > > > > class Katch extends AppModel > > { > >var $name = 'Catch'; > > > > And in controller > > var uses = array('Catch') > > > > Also wouldn;t we have to change every reference to the Catch model > > ($this->Catch... to $this->Katch) and all references to the data it > > pulls out from ($data['Catch']['field'] to $data['Katch']['field']? > > > > Just trying not to go down the long road of modding 5000 lines of code > > till we know what works... > > > > > > > > > > > --~--~-~--~~~---~--~~ 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 Name Magic Needed
In your controller, you'd need $uses = array('Katch'); Here's what I would do: 1. Commit all your code into SVN. 2. Do a global find and replace Catch for Katch in your files. 3. Do a global find and replace catch for katch in your files. 4. Fix the $name in model Katch. That should generally fix things. You may also have some small issues with foreign keys named "catch_id" so you'll need to think about that too. Wayne On 10/25/07, MikeK <[EMAIL PROTECTED]> wrote: > > We are trying... > > So would this have a chance? > > In model: > > class Katch extends AppModel > { >var $name = 'Catch'; > > And in controller > var uses = array('Catch') > > Also wouldn;t we have to change every reference to the Catch model > ($this->Catch... to $this->Katch) and all references to the data it > pulls out from ($data['Catch']['field'] to $data['Katch']['field']? > > Just trying not to go down the long road of modding 5000 lines of code > till we know what works... > > > > > --~--~-~--~~~---~--~~ 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: strange black row
Use Webdeveloper plugin for Mozilla (or similar) to tell you what styles are affecting those black rows. You must be missing something, somewhere. Wayne On 10/25/07, Daniel <[EMAIL PROTECTED]> wrote: > > There is no "black" or "#000" in that css file. > > > > > --~--~-~--~~~---~--~~ 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: sqlite autoincrement row versus id NOT-autoincremented
David... read the URL you sent again, specifically: If a table contains a column of type INTEGER PRIMARY KEY, then that column becomes an alias for the ROWID. You can then access the ROWID using any of four different names, the original three names described above or the name given to the INTEGER PRIMARY KEY column. All these names are aliases for one another and work equally well in any context. Wayne On 10/24/07, Olexandr Melnyk <[EMAIL PROTECTED]> wrote: > You can have auto-incremented columns with SQLite. > > Define a single integer column as primary key and that should do the job. > > > On 10/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > > Hello all! > > > > I'm a re-newly cake user and I'm currently trying to make my cake > > using a SQLite database. > > I'll the 15minute blog tutorial as a reference. > > Now, once I get the database connected correctly (verified and working > > with bake script), I do a simple table : > > > > CREATE TABLE posts ( > > id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, > > title VARCHAR(50), > > body TEXT, > > created DATETIME DEFAULT NULL, > > modified DATETIME DEFAULT NULL > > ); > > > > ok, now that is a standard mysql query and it is recognised, however, > > the AUTO_INCREMENT is not a definition in sqlite. Thus when inserting > > a row using the standard posts/add , the id stays empty. Then it is > > impossible to do editing/deleting because there is no id. > > > > After reading this page : > http://www.sqlite.org/autoinc.html that is > > explaining the way to use the only auto-incremental feature of this > > kind of database : > > replacing "id" by the auto-generated "rowid" (and not visible throught > > SQLiteManager) > > > > I wonder if I should put a ticket about that ? So the dbo_sqlite.php > > script be updated to automatically use "rowid" insteand of "id" into > > querys. > > What is your thought about that ? > > Do I make myself clear anoff ? > > Is there someone reading this using a sqlite database ? > > > > Thanks > > David > > > > > > http://omelnyk.net/ > > > > > > > --~--~-~--~~~---~--~~ 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: strange black row
Check your CSS and the HTML source. Wayne On 10/24/07, Daniel <[EMAIL PROTECTED]> wrote: > > I am following the CakePHP tutorial from IBM and I get a single black > row appearing in the users table. So I added another record and then > I get the black row again but with a second row appearing normally. > It is like as though the text is black on black. > > > > > --~--~-~--~~~---~--~~ 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: saveField breaks in new 1.2 release
Looks like you're only getting a SELECT executed. Are you sure the $ids variable has proper values in it -- if not, the foreach() won't run and saveField() will never get called. Add some debugging statements to your code and check the debug log after executing this method a few times. Wayne On 10/24/07, LW <[EMAIL PROTECTED]> wrote: > > Well, I don't doubt that saveFields works in 1.2 > I just don't get why it's not working in my code after the update and > i thought maybe something changed in the way saveField is used or > something like that. I'd appreciate any help on this, what code do you > need to see? > > Maybe the response i get might help: > > id="cakeSqlLog_1193212061471ef89d060722_06944581" summary="Cake SQL > Log" cellspacing="0" border = "0"> > 1 query took 0 ms > > NrQueryErrorAffectedNum. > rowsTook (ms) > > > 1SELECT COUNT(*) AS `count` FROM `images` AS > `Image` WHERE `Image`.`id` = 134 11 "text-align: right">0 > > > > thanks, > Lutz > > > On 24 Okt., 00:53, "Mariano Iglesias" <[EMAIL PROTECTED]> > wrote: > > I suggest you post your code, since Model has an awesome test coverage: in > > cake/tests/cases/libs/model/model.test.php you can see for example the > > function testSaveField() which tests for saveField() calls, and all tests > > are succeeding. Therefore saveField() IS WORKING on 1.2. > > > > -MI > > > > --- > > > > Remember, smart coders answer ten questions for every question they ask. > > So be smart, be cool, and share your knowledge. > > > > BAKE ON! > > > > blog:http://www.MarianoIglesias.com.ar > > > > -Mensaje original- > > De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre > > de LW > > Enviado el: Martes, 23 de Octubre de 2007 04:34 p.m. > > Para: Cake PHP > > Asunto: Re: saveField breaks in new 1.2 release > > > > Doesn't work means the db-records are not updated, the saveField data > > is not saved. it doesn't give me an error message or any entry in the > > cake debug log though. > > > > > --~--~-~--~~~---~--~~ 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: saveField breaks in new 1.2 release
What does "doesn't work" mean, can you be more specific? And can you provide the stack trace or some debug log? Wayne On 10/23/07, LW <[EMAIL PROTECTED]> wrote: > > Hi, > i just updated to the new release (of 1.2) and I'm having one problem > I can't resolve: > > I'm updating my db from a sortable list through this function: > > function order_images(){ > $ids= $this->params['form']['imgList']; > $i = 1; > foreach($ids as $id){ > $this->Image->id = $id; > $this->Image->saveField('sort', $i++); > } > $this->autoRender = false; > } > > It used to work fine befre the update, now it doesn't. > > any ideas? > > > > > --~--~-~--~~~---~--~~ 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: About the definition of 'singular' and 'plural' in naming conventions
The plural/singular code is in the Inflector class, under cake/libs. And as AD76 added, you can add your own rules by editing app/config/inflections.php. Wayne On 10/22/07, AD7six <[EMAIL PROTECTED]> wrote: > > > > On Oct 22, 9:44 pm, skyblueink <[EMAIL PROTECTED]> wrote: > > > Did you try any of your questions? You could have checked all of those > possibilities in less time than it took to write your message ;). In > any event if you don't get what you expect add your own inflection > rules and then you will. > > pr (Inflector::pluralize('person')); die; > > AD > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Problem with bake
I suspect, if you had a sufficiently high level of logging and tracing in your network and on the various servers involved when that error message popped up, that you'd discover something interesting, probably timeouts to your Mysql instance. PHP doesn't just randomly report "server has gone away" -- there must be a reason. I'll assume you're in a shared server environment and you have no control over the load of your machines. Wayne On 10/20/07, Conrad <[EMAIL PROTECTED]> wrote: > > Of which none appys the mysql server is working fine for all other > applications > > On Oct 19, 5:59 pm, "Wayne Fay" <[EMAIL PROTECTED]> wrote: > > RTFM :-)http://dev.mysql.com/doc/refman/5.0/en/gone-away.html > > > > Wayne > > > > On 10/19/07, Conrad <[EMAIL PROTECTED]> wrote: > > > > > > > > > I am having the same problems - in trying to create controller for > > > 'user' . > > > I get the message > > > 1. DESCRIBE `users` 2006: MySQL server has gone away > > > BUT the controller is written. > > > > > in trying to create views I get this (index.thtml) > > > > > > > List Users > > > > > > > > > > >Created > > >Actions > > > > > > > > > > > > > > > > > >link('View','/users/view/' . > $user['User']['id'])? > > > > >link('Edit','/users/edit/' . > $user['User']['id'])? > > > > >link('Delete','/users/delete/' . > $user['User'] > > > ['id'], null, 'Are you sure you want to delete id ' . $user['User'] > > > ['id'])?> > > > > > > > > > > > > > > > > --- > > > Bake.php finds the tables or it would not display the names for > > > choice. > > > > > Thanks, > > > Conrad > > > On Oct 18, 9:16 am, Jakobloekke <[EMAIL PROTECTED]> wrote: > > > > Hi guys, > > > > I'm new to cakephp, and I'm stuck with a problem using the bake > > > > script: > > > > > > I can bake a DB configuration without problems. > > > > When I try to bake a model, my terminal prints out some sql-errors, > > > > but I can create a new model manually. > > > > > > When I try to bake a controller I get the following error, and: > > > > Fatal error: ConnectionManager::getDataSource - Non-existent data > > > > source default in /Library/WebServer/cake1.2.x.x/cake/libs/model/ > > > > connection_manager.php on line 111 > > > > Then the bake script terminates. > > > > > > Can anyone tell me where I went wrong? > > > > > > thanks, > > > > Jakob > > > > > --~--~-~--~~~---~--~~ 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: Views folder having deeper folder levels? Like views/admin/admin1/index.ctp?
Sounds like a site begging for a CMS (Content Management System) of some kind. Wayne On 10/20/07, Soulcatcher <[EMAIL PROTECTED]> wrote: > > Basically, i was asked to organize stuff inside views folder so that > people who have no idea about cakephp can do some small changes > directly to views. > > Ideally my views folder should mirror organization's structure. For > example, they have Events section that has several events and each > event has several html document describing it. > > So they have something like that: > Events/ > Events/EventA/description.html > Events/EventB/description.html > Events/EventC/description.html > Events/EventC/SubEventC/description.html > > So in cakePHP i have Events controller - so views folder has events > folder - but that folder can contain only .ctp files (no folders) > since they correspond to functions inside events controller. > > Is there any way to specify ctp file inside function? Or how do people > actually tackle this problem - because in a big site it's not very > convenient to have hundreds of ctp files in some controller folder > without having any structure w/o folders. > > > > > --~--~-~--~~~---~--~~ 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: Components, Controllers y Elements
To make that concrete... class UsersController extends AppController { var $uses = array('Muppet', 'Fraggle', 'Smurf'); } This is covered in the Cake manual too: http://manual.cakephp.org/chapter/controllers Wayne On 10/20/07, the_woodsman <[EMAIL PROTECTED]> wrote: > > I can at least help with b) > > Controllers can have access to many, unrelated models, by having more > than one item in the uses array. > > Good luck with the other stuff! > > On Oct 19, 2:07 pm, Pinholecam <[EMAIL PROTECTED]> wrote: > > I've been looking for some answers to my problems but after a couple > > of hours of searching, I'll answer that. > > > > a) I would need to query differents models form a component. How to > > do it? > > > > b) Looking at the manual it seems that each model has one controller > > and one controller has one model. In addition, if I have some kind of > > assosiation between models, for one controller it's possible to query > > the other models associated. But if I don't have any association? How > > can I query other models? (When I talk about models, maybe I should > > talk about tables). I assume that it's possible to query directly by > > $this->Mymodel->query(), but I would use Cake DB functions. > > > > c) Elements: this are pieces of code(view) that repeat in a part of > > your site, so in order to not to repeat it. I've also seen that it's > > not possible to query from elements directly to the database, but you > > get information from the function set of your controller. If the query > > and its bussiness logic is more than one line, you're also duplicating > > code, so the answer is: can you type a function from a component that > > sets the information to the view? So to set the information, just call > > the component's funtion from a controller/action. > > > > Thanks to all the help u can give me. > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Problem with bake
RTFM :-) http://dev.mysql.com/doc/refman/5.0/en/gone-away.html Wayne On 10/19/07, Conrad <[EMAIL PROTECTED]> wrote: > > I am having the same problems - in trying to create controller for > 'user' . > I get the message > 1. DESCRIBE `users` 2006: MySQL server has gone away > BUT the controller is written. > > in trying to create views I get this (index.thtml) > > List Users > > > >Created >Actions > > > > > >link('View','/users/view/' . > $user['User']['id'])? > > >link('Edit','/users/edit/' . > $user['User']['id'])? > > >link('Delete','/users/delete/' . > $user['User'] > ['id'], null, 'Are you sure you want to delete id ' . $user['User'] > ['id'])?> > > > > > --- > Bake.php finds the tables or it would not display the names for > choice. > > Thanks, > Conrad > On Oct 18, 9:16 am, Jakobloekke <[EMAIL PROTECTED]> wrote: > > Hi guys, > > I'm new to cakephp, and I'm stuck with a problem using the bake > > script: > > > > I can bake a DB configuration without problems. > > When I try to bake a model, my terminal prints out some sql-errors, > > but I can create a new model manually. > > > > When I try to bake a controller I get the following error, and: > > Fatal error: ConnectionManager::getDataSource - Non-existent data > > source default in /Library/WebServer/cake1.2.x.x/cake/libs/model/ > > connection_manager.php on line 111 > > Then the bake script terminates. > > > > Can anyone tell me where I went wrong? > > > > thanks, > > Jakob > > > > > --~--~-~--~~~---~--~~ 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: want to update more than one fields in one query
You'll have a lot more luck on this list if you carefully (and fully) explain what you have vs what you want in complete English sentences. Wayne On 10/19/07, manuj bansal <[EMAIL PROTECTED]> wrote: > > i want to update and add more than one fields in one query in > cakephp1.2 > > becuse it is running many queries at at time in one bye one > > 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: homepage with CakePHP (newbie question)
This doesn't seem like something that Cake should help you with. Instead, add a job that runs after your cron shell that calculates those things and inserts them into a 4th table in your database. Then build a Cake view on top of that new table. Wayne On 10/19/07, Eric <[EMAIL PROTECTED]> wrote: > > Hey guys, > > I have just started using CakePhp, and I have a trouble to find how to > manage my idea. > > So, here is the principle: > I have 3 tables updates on a daily basis by cron shell from another > software. > I would like to have a homepage in my CakePhp site, showing me > statistics like : last date update, number of records per tables, and > so on. > > To be honnest, I do not see how to proceed. No trouble to make pages > table per table... > > Thanks in advance for your help. > Eric > > > > > --~--~-~--~~~---~--~~ 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: Newbie question re URLs
To put it simply, there is magic happening that you don't see. If you don't call it yourself in the Controller method, $this->render() is called for you. Other magic finds the correct view name to use based on the action name (though you can override this to specify an alternate) and which layout to use (unless you override). Wayne On 10/19/07, jakeone <[EMAIL PROTECTED]> wrote: > > I'm confused. Why do URLs in Cake typically point to "controller/ > action" and not "view/action"? I would have thought a link was > presenting something to the user, i.e. a view, not an action. > > The Cake manual's blog tutorial has a link as follows: > > echo $html->link('Add Post', '/posts/add'); > > and when you look at the Post controller's add action you see: > > function add() > { > if (!empty($this->data)) > { > if ("this->Post->save(%this->data)) > { > $this->flash('Your post has been saved.', '/posts'); > } > } > } > > I don't see how that displays the Add Post form (i.e. view) to the > user... Or am I missing the point? > > 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: pretty-print (indent) view output
If you file a bug, perhaps someone in the Cake Dev team will implement it. But this seems to be a low priority enhancement to me. What you're basically proposing is somehow in-lining htmltidy (or similar) into the HTTP response, so that all HTML output from Cake is formatted nicely before it is sent to the user's web browser. I can see this perhaps being useful in development, but wouldn't want it turned on in a production environment. Thinking about it some more, I recall that there is an Apache module for this -- http://mod-tidy.sourceforge.net/ Wayne On 10/18/07, Rex <[EMAIL PROTECTED]> wrote: > > Hi, > > I see that in cakephp a view output is not properly indented. This > makes it very difficult to debug a problem. > I suggest that all cakephp (HTML) output should be indented properly > so that when we try to view-source using mozilla, we get a > beatutifully formatted code which all humans can see and understand > clearly. > > regards, > Rex > > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Where do non-Cake PHP files go in structure?
On my dev servers, I am able to export to Excel with no troubles. In the production server, it just comes out as text directly in the web browser. So there seems to be something weird with that environment, and I assume the headers are not being written out properly. So, I built a little plain jane export.php script that establishes its own mysql connection and uses sql and echo to write the file out to Excel. And it works just fine. Where should I put this file in the /cake/app directory? In webroot? And is there a special way/url I should use to call/access it? 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: Output of RSS contains spaces
Which helper? I probably have the same one in my controller, unless its a custom-built one. And if its not custom, then a bug needs to be filed so it can be fixed. Wayne On 10/18/07, Charlie van de Kerkhof <[EMAIL PROTECTED]> wrote: > > Found it. Was in a helper that I included but not used. :( > Thnx anyway... > > On Oct 18, 6:56 pm, "Wayne Fay" <[EMAIL PROTECTED]> wrote: > > I am getting a single space at the beginning of my CSV file. > > Fortunately for me, the space is not a problem. And in my case, all > > the code is being echo'ed from my Controller method directly, so there > > are no .thtml or .ctp files in my app that are being called. > > > > So I assume this space is coming from somewhere deep inside Cake (??). > > But I don't know where (yet). I'm using 1.2.0.5427. I haven't tried > > with any later builds of 1.2. > > > > Wayne > > > > On 10/18/07, Charlie van de Kerkhof <[EMAIL PROTECTED]> wrote: > > > > > > > > > Hi, > > > I'm trying to get the RSS functionality working in CakePHP 1.2 Working > > > just fine, but it gives me 1 space before the opening header > > So the RSS is not recognized as such. > > > I opened every ctp file that is used by this action but none of them > > > conatins spaces before or after the PHP tags. > > > Even the models and controllers used by this action! > > > > > I'm stuck. anyone had the same experience and found a solution? > > > > > thnx! > > > - Charlie > > > > > --~--~-~--~~~---~--~~ 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: Output of RSS contains spaces
I am getting a single space at the beginning of my CSV file. Fortunately for me, the space is not a problem. And in my case, all the code is being echo'ed from my Controller method directly, so there are no .thtml or .ctp files in my app that are being called. So I assume this space is coming from somewhere deep inside Cake (??). But I don't know where (yet). I'm using 1.2.0.5427. I haven't tried with any later builds of 1.2. Wayne On 10/18/07, Charlie van de Kerkhof <[EMAIL PROTECTED]> wrote: > > Hi, > I'm trying to get the RSS functionality working in CakePHP 1.2 Working > just fine, but it gives me 1 space before the opening header So the RSS is not recognized as such. > I opened every ctp file that is used by this action but none of them > conatins spaces before or after the PHP tags. > Even the models and controllers used by this action! > > I'm stuck. anyone had the same experience and found a solution? > > thnx! > - Charlie > > > > > --~--~-~--~~~---~--~~ 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: Dropdown in CakePHP
I'm sure the developers of CakePHP would appreciate your contribution. Write up a "small paragraph" explaining this and file it in the bug tracker. Wayne On 10/17/07, Paolo <[EMAIL PROTECTED]> wrote: > > Thank yiu very much, but I solved the issue now, in the same eact way > you told me! Thanks again! > > By te way, why isn't hte manual more complete, for understanding this > I had to read at least 100 posts and 10 pages of api, when it could be > easily explained in a small paragraph in the manual! > > > On 17 Ott, 17:36, dw <[EMAIL PROTECTED]> wrote: > > Hi Paolo, > > > > To accomplish this, you would first set a variable in the edit > > function of the Post controller using generateList: > > > > $this->set('categories', $this->Post->Category->generateList(null,'descr > > > > ASC',null,"{n}.Category.id","{n}.Category.descr")); > > (see Model::generateList in the API for the generateList arguments) > > > > Now the categories data is available for you to use in the Post's Edit > > view. > > Something like this: > > > > $html->selectTag('Post/category_id', $categories, > > $html->tagValue('Post/category_id'), array(), array(),false, true))); > > > > (Again see HtmlHelper::selectTag in the API to understand the > > arguments) > > > > Hope this helps. > > -dave > > > > On Oct 17, 8:21 am, Paolo <[EMAIL PROTECTED]> wrote: > > > > > Hi all! > > > > > I'm new to Cake and already have a problem. I'm creating the editing > > > page for a model. It's something like: > > > > > Post > > >id > > >category_id > > >... > > > > > Category > > >id > > >name > > >... > > > > > so that the Post model has a "belongTo" association like: > > > > > var $belongsTo = array('Category' => > > > array('className'=> 'Category', > > > 'conditions' => '', > > > 'order'=> '', > > > 'foreignKey' => 'category_id' > > > )); > > > > > Now in the Post edit page I need a dropdown with values from the > > > category table. How can I access the generateList method of the > > > Category Model from the view? Or otherwise, I could also create a > > > method in the Post controller thta calls this method, but then again, > > > how can I accees this from the view? IF this is not the correct way, > > > could you pleae point out which is the correct way to do 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?hl=en -~--~~~~--~~--~--~---
Re: Form manipulation
I'm curious... why do you care if fields are removed? Wayne On 10/17/07, 2000Man <[EMAIL PROTECTED]> wrote: > > Anyone? > > > > > --~--~-~--~~~---~--~~ 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: Stable vs Development
I'm using 1.2 on a production server with no issues to speak of. Wayne On 10/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > hey guy, > > I got a question for those of you using version 1.2 alpha. > > So far i have based my applications on previous stable versions of > cake, and now i was looking into trying into starting a new > application based on 1.2, because it has quite a few interesting new > features. > > The thing that wories me is that it being still an alpha version, bugs > might appear along the way. > This application would be on a production server and it might not be > the best thing to have uncontrolled bugs appear. > > So .. any oppitions and advice? > > Thx > > > > > --~--~-~--~~~---~--~~ 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 paginate HABTM results?????????
Read this thread: Pagination for model with association (cake 1.1) Wayne On 10/15/07, DGPhoebus <[EMAIL PROTECTED]> wrote: > > Okay I have a Products table, a Categories table and a > Categories_Products join table. A HABTM relationship has been > defined. So when I hit /categories/view/4 I get the Category > definition pointed to by $id=4 and all the products assigned to > category #4. > > How do I paginate the products? Please someone help cause I have hit > a brick wall on this one > > Sincerely stumped Daniel > > > > > --~--~-~--~~~---~--~~ 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: problems with validation
Your original email is not clear. Its one huge clump of text that just rambles on. Break it up into short 2-3 sentence paragraphs. And be more clear with what you have, what is happening, and what you want. Perhaps someone will respond more positively to that. Wayne On 10/15/07, d34db0lts <[EMAIL PROTECTED]> wrote: > > i tried fixing my problem by using this article: > > http://bakery.cakephp.org/articles/view/rails-like-data-validation > > unfortunately, it didn't help, i'm having issues with the helper...can > anybody shed some light? some hope??? > On Oct 14, 8:09 pm, d34db0lts <[EMAIL PROTECTED]> wrote: > > Hey guys, i have this little app that i'm having problems with. > > > > the index page lists all the records but in that same index page there > > is a form that uses function add in the controller to process the > > form, but my problem is that i need a way to display if the user > > forgot to enter anything in the input field. i've been looking around > > at it seems like the way it is done is with a tagErrorMsg but like i > > said, the form is in index.thtml but the form logic is in function > > add()...so i can't have function add() tell funcion index() to display > > a message to the user to remind him/her to enter something in the > > input field. > > > > i've looked at requestAction and elements, but i can't come up with an > > answer...so if anybody can point me in the right direction, i would > > really appreciate 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: Warning (512): Method HtmlHelper::formTag does not exist [CORE/cake/libs/view/helper.php, line 148]
Those tags have all been deprecated. This post should help: http://cake.insertdesignhere.com/posts/view/15 Wayne On 10/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hello Wayne, > I appreciate your help but I'm still a little confused. > I get the warnings below. > > Warning (512): Method HtmlHelper::formTag does not exist > Warning (512): Method HtmlHelper::inputTag does not exist > Warning (512): Method HtmlHelper::passwordTag does not exist > Warning (512): Method HtmlHelper::submitTag does not exist > > What would the "new replacement tags" be for version1.2? > Do you know of any code samples for ver 1.2 dealing with forms, I > can't seem to find anything I need in the docs. > > Peter > > > > On Oct 12, 5:12 pm, "Wayne Fay" <[EMAIL PROTECTED]> wrote: > > That code was written for Cake v1.1. The formTag method has been > > deprecated in v1.2. You'll need to revert to v1.1 or rewrite the code > > to use FormHelper directly. > > > > Wayne > > > > On 10/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > > > > > Does anyone know why I get this warning. And how do I get around it? > > > I'm using cake_1.2.0.5427alpha the code comes from IBM's tutorial at: > > >https://www6.software.ibm.com/developerworks/education/os-php-cake1/s... > > > Their code: > > > > > formTag('/users/register') ?> > > > Please fill out the form below to register an account. > > > Username: > > > inputTag('User/username', array('size' => '40')) ?> > > > tagErrorMsg('User/username', 'username is > > > required') ?> > > > > > Password: > > > passwordTag('User/password', array('size' => '40')) ? > > > > > tagErrorMsg('User/password', 'password is > > > required') ?> > > > > > Email Address: > > > inputTag('User/email', array('size' => > > > '40','maxlength'=>'255')) ?> > > > tagErrorMsg('User/email', 'email is invalid') ?> > > > > > First Name: > > > inputTag('User/first_name', array('size' => '40')) ? > > > > > tagErrorMsg('User/first_name', 'first_name is > > > required') ?> > > > > > Last Name: > > > inputTag('User/last_name', array('size' => '40')) ?> > > > tagErrorMsg('User/last_name', 'last_name is > > > required') ?> > > > > > submitTag('register') ?> > > > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Problem with data type of id field being set to 'double'
Try adding a beforeSave() method in your model that sets the datatype to "string" for the UUID member with PHP's settype(). Or modify the UUID method itself so the first character in your UUID is always "A" or another alpha char. Wayne On 10/13/07, Langdon Stevenson <[EMAIL PROTECTED]> wrote: > > I have a Cake project that uses a unique id string generated by PHP as > the id for each table (to allow ids to be unique across the entire project). > > However I have an odd edge case problem where by occasionally the UUID > function will throw up a string that is all numeric (with a period . > separating the two halves) rather than being a mix of alpha and numeric. > > When this happens Cake constructs the find and delete queries without > quotes around the id string. This results in MySQL interpreting the > string as type: DOUBLE, so I get a query error. > > Can anyone point me to the code in the Cake core that makes this > decision about encasing the id in quotes so that I can have a look at > fixing this issue? > > My solution for now is to simply test new ids and ensure that they use a > mix of character types, but it would be better to fix the root of the > problem. > > Thanks in advance. > > Regards, > Langdon > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP 1.2 - Form select
You'll need to provide more information about what you're doing and what is happening. Many of us are very successfully using select boxes in our forms with Cake 1.2, so it seems to be something specific to your environment or your code. Wayne On 10/13/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm trying to put up a registration form for my website but > unfortunately I encountered this problem, I can't retain the form- > >select value during validation. How can I retain the value being > selected on my $form->select while on the process of validation. I've > been trying to search for answers using google but I havent found one. > I'm using CakePHP 1.2alpha. > > Hope someone could help me. > > Thank you very much. > > > Regards, > > Wendell > > > > > --~--~-~--~~~---~--~~ 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: Translateable countrylist for a selectbox?
You mean something like this? http://bakery.cakephp.org/articles/view/country-select-list-helper Wayne On 10/13/07, burzum <[EMAIL PROTECTED]> wrote: > > Im looking for something like this to use it for a $form->select() > > array(' > 'ger' => __('germany'), > 'eng' => __('england'), > ... > ) > > Has anyone done this already and want to share it? If not is anyone > interested in completing the list and sharing it? I would like to do > two versions, one with the three-letter countrycode and one with the > numeric countrycode. > > > > > --~--~-~--~~~---~--~~ 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 (512): Method HtmlHelper::formTag does not exist [CORE/cake/libs/view/helper.php, line 148]
That code was written for Cake v1.1. The formTag method has been deprecated in v1.2. You'll need to revert to v1.1 or rewrite the code to use FormHelper directly. Wayne On 10/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Does anyone know why I get this warning. And how do I get around it? > I'm using cake_1.2.0.5427alpha the code comes from IBM's tutorial at: > https://www6.software.ibm.com/developerworks/education/os-php-cake1/section4.html > Their code: > > formTag('/users/register') ?> > Please fill out the form below to register an account. > Username: > inputTag('User/username', array('size' => '40')) ?> > tagErrorMsg('User/username', 'username is > required') ?> > > Password: > passwordTag('User/password', array('size' => '40')) ? > > > tagErrorMsg('User/password', 'password is > required') ?> > > Email Address: > inputTag('User/email', array('size' => > '40','maxlength'=>'255')) ?> > tagErrorMsg('User/email', 'email is invalid') ?> > > First Name: > inputTag('User/first_name', array('size' => '40')) ? > > > tagErrorMsg('User/first_name', 'first_name is > required') ?> > > Last Name: > inputTag('User/last_name', array('size' => '40')) ?> > tagErrorMsg('User/last_name', 'last_name is > required') ?> > > submitTag('register') ?> > > > > > > --~--~-~--~~~---~--~~ 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 for model with association (cake 1.1)
I think you can stop hitting send... Five copies of the same email is enough. Wayne On 10/12/07, Alpha <[EMAIL PROTECTED]> wrote: > > Dear Andy, > > You mean you view the Category and want to see and paginate the > related products? > > -> yeah , exactly~ > > Easiest way it to make /products/byCategory/$catId work. I.e. display > in that page the Category details and then do exactly the same as you > would with the index. > > -> Do you mean that I should~ > > 1> create new function byCategory in the products model > 2> do pagination for the return products > 3> get the catid from the category model. > 4> put the web link ( /products/byCategory/$catId) in the view of > Category > 5> have the result in the view of Products > > I will try my best to work on itThanks for the direction~ > Will share with you all if I get it done~ > > Again, Million 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: Modules?
RTFM is a perfectly reasonable response to a question like this... Honestly, have you read the manual? Plugins are covered in some depth. Your question makes it obvious that you have not (pure laziness?), which makes people less likely to bother responding to your question(s). Go read it now!! And print it for future reference!! Wayne On 10/11/07, Christian Winther <[EMAIL PROTECTED]> wrote: > > No, the plugin part is right > > But the first part about you not bothering to search for answer first is also > true > > -Original Message- > From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of stefanb > Sent: 11. oktober 2007 13:39 > To: Cake PHP > Subject: Re: Modules? > > > So a plugin is not the same as a module? Now I'm confused. > > On Oct 11, 12:43 pm, dardosordi <[EMAIL PROTECTED]> wrote: > > Though the first half is the correct one. > > > > On Oct 10, 10:24 am, stefanb <[EMAIL PROTECTED]> wrote: > > > > > Thank you for the second half of your reply. The first half didn't > > > help me at all. > > > > > On Oct 10, 3:12 pm, "Christian Winther" <[EMAIL PROTECTED]> wrote: > > > > > > Did you even bother to look in the manual or the group ? > > > > > > Its called plugins in cake > > > > > > -Original Message- > > > > From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of > > > > stefanb > > > > Sent: 10. oktober 2007 10:36 > > > > To: Cake PHP > > > > Subject: Modules? > > > > > > Does Cake support the use of modules? > > > > > >www.example.com/module/controller/action/var1/val1/var2/val2 > > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Session
You can't. Unless the user clicks a "logout" button, you have no idea when the user leaves your site or closes the browser. Wayne On 10/11/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > HI > I have this banal problem but I can't resolve it. > I would destroy a CakeSession when the user close the browser or exit > from my web site. > How can I do it? > Many thanks > Marco > > > > > --~--~-~--~~~---~--~~ 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: code in Title bar
I'd assume you've got some bad code in your layout file, probably default.ctp. Wayne On 10/10/07, befidled <[EMAIL PROTECTED]> wrote: > > I've got a lot of code from my cake app showing up in my title bar. > What could be causing this? > > http://www.tolerase.com/items > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cakePHP and ecommerce security reisks
Assuming you have reasonable security in your database (strong passwords with normal expiration periods, hard to guess user names, updated db software), I don't know why you'd care about this. Would it *really* be a big problem if you were forced to publish your data model on your website? What does this do for someone who has no ability to access the database? Wayne On 10/9/07, Comida411 <[EMAIL PROTECTED]> wrote: > > I am a new bee to cake PHP and I have a concern on the way cake expses > the data model of the application in the view.Since we have to follow > a naming convention for cake to update the model automatically from > the view. I see there is a risk of exposing once's data model. > > Example: > I have a user table "users" with fields 1) email_address 2) > password > > On my view when I use cake sysntax like below > input('User/email_address', array('size' => '40'))? > > > > > When the page is rendered if some one does a view source he can > clearly see the table name and the coloum name. > > Is it not a security risk? > > thank you for your response.. > Sincerely > Comida411 > > > > > --~--~-~--~~~---~--~~ 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 basic file structure
In Cake, they all go in your default layout: masthead + primary navigation + footer => cake\views\layouts\default.ctp (or .thtml) Just add in the middle where you want your content to appear. Wayne On 10/9/07, brianfidler <[EMAIL PROTECTED]> wrote: > > I'm brand new to Cake and struggling a little with the best way to > structure my files. Prior to cake I typically had an 'includes' > directory and a 'templates' directory. In the 'includes' directory I'd > usually put all of my database query code and logic files. In my > 'templates' directory I'd usually put template files that would then > include the appropriate file from the 'includes' directory. > > I understand the logic of MVC but am just at that critical point where > I'm trying to understand how to do in Cake, what I used to do in a > more standard PHP way. > > Any help would be great, here are some specifics that I need help > with... > > A typical site I work on will have the following blocks of > information: > > 1) masthead > 2) primary navigation > 3) content > 4) footer > > In CakePHP would each of these be separate views? Would the masthead > and footer go into a layout so that they can get reused? Would the > primary navigation, if it's generated from the database, be a view > with a model and controller? > > Just looking for some direction. 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: public function, but not action
You should probably move this function to a component. What are you doing in the function? Why is it in this particular controller? If you insist on keeping it in the controller, you can do something in beforeFilter(), perhaps something with $this->Security like calling blackhole()? Not sure if this will solve your problem but its something to consider. Wayne On 10/9/07, stefanb <[EMAIL PROTECTED]> wrote: > > Hmm, I already use _foo() for protected methods and __bar() for > private methods. > > What I'm looking for, is some sort of config that allows my to say > "don't dispatch these methods" in an array or something... > > On Oct 9, 10:34 pm, rtconner <[EMAIL PROTECTED]> wrote: > > use an underscore... > > > > _functionName() {} > > > > On Oct 9, 12:43 pm, stefanb <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > > How can I specify that a public function in a controller should NOT be > > > an action? > > > > > --~--~-~--~~~---~--~~ 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: Validation rules and error messages
> > Yes, but according to the MVC pattern, what the user sees (like error > > messages) really is supposed to go into the view, not the model... > > Are you saying that a model cannot generate error messages that need > to be displayed in a view? You *can*... But according to MVC principles, you *shouldn't*. 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: accessing view using an alias
You should be able to do this in your routes.php file... Router::connect('/newproduct/[action1]', array('controller' => 'new_product', 'action' => '[action1]')); Substitute view, add, delete etc as appropriate for [action1]. You will need 1 row in the file for each action in your controller. Wayne On 10/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hello, > > Not sure how to explain this best, so I'll try my best to break down > what is probably a simple issue. > > database is 'new_products' > controller is 'new_products_controller' > model is 'new_product' > > Everything works fine at www.domain.com/new_product, but I wish to > access this by visiting http://www.domain.com/newproduct. > > I can use .htaccess to do this, but it seems there will be a solution > in cakephp other than cheating on file names (naming everything > 'newproducts') > > Thanks for any help, > 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: Cake 1.2 - Enums and auto-populate field after dropdown selection
> > First off, I have a couple enums in a table in my app. Under Cake 1.1, > > the enums were turned into a dropdown and displayed properly. Using > > cake_1.2.0.5427alpha, I don't get the dropdowns. I haven't tried any > > Well, give some more details. Are you using scaffold? Have you updated > the views? I found a snippet that seems to work: http://cakeforge.org/snippet/detail.php?type=snippet&id=112 I just needed to paste getEnumValues() into my app_model.php, add a call to it in add() and edit(): $this->set('statusArray',$this->Design->getEnumValues('status')); and then tweak my views: echo $form->input('status', array('options' => $statusArray)); And it works great. Thanks for the tip on observing the field, I'll do that next... 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 -~--~~~~--~~--~--~---
During "edit" -- if validation fails, user is returned "add" form
I baked Model, Controller, and Views for my Organization table. It is basically a standard User table, and my functions are virtually unchanged from baking. Then I added validation to various fields and added error messages for the validations in my add.ctp and edit.ctp files. Now when I edit an Organization (see HTML [1]), if I enter proper values for all the fields, the edit goes thru fine. When I leave out a required field or do something that fails validation, Cake brings me back to the form showing "Edit Organization" but the HTML [2] shows that I'm actually adding an Organization. I have included HTML below, as well as the edit() function [3]. So when I make a change to the field and submit, instead of going in as an edit, it calls add which fails due to duplicate indexes (the userid field). Any ideas?? Wayne [1] Edit Organization [2] The Organization could not be saved. Please try again. Edit Organization [3] function edit($id = null) { $this->log(__FILE__ . ':' . __METHOD__ . ": init.", LOG_DEBUG); if (!$id && empty($this->data)) { $this->Session->setFlash('Invalid Organization'); $this->redirect(array('action'=>'index'), null, true); } if (!empty($this->data)) { $this->cleanUpFields(); if ($this->Organization->save($this->data)) { $this->Session->setFlash('The Organization has been updated.'); $this->redirect(array('action'=>'index'), null, true); } else { $this->Session->setFlash('The Organization could not be saved. Please try again.'); } } if (empty($this->data)) { $this->data = $this->Organization->read(null, $id); } } --~--~-~--~~~---~--~~ 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: During "edit" -- if validation fails, user is returned "add" form
I figured it out. I had removed the $id field from the form rather than merely making it hidden. Turns out, that breaks a few things... duh. ;-) Wayne On 10/3/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > I baked Model, Controller, and Views for my Organization table. It is > basically a standard User table, and my functions are virtually > unchanged from baking. > > Then I added validation to various fields and added error messages for > the validations in my add.ctp and edit.ctp files. > > Now when I edit an Organization (see HTML [1]), if I enter proper > values for all the fields, the edit goes thru fine. When I leave out a > required field or do something that fails validation, Cake brings me > back to the form showing "Edit Organization" but the HTML [2] shows > that I'm actually adding an Organization. I have included HTML below, > as well as the edit() function [3]. > > So when I make a change to the field and submit, instead of going in > as an edit, it calls add which fails due to duplicate indexes (the > userid field). > > Any ideas?? > Wayne > > [1] > > action="/cake/organizations/edit/20"> style="display:none"> value="e388b4d13f9e4c1d5cdf1d63612e1e5aa62db978" > id="OrganizationEditFormToken936739629" /> > Edit Organization > > [2] > The Organization could not be > saved. Please try again. > action="/cake/organizations/add/"> style="display:none"> value="e2d7ac5c821aca68b05079b1e65746aaf773ad11" > id="OrganizationAddFormToken1675815126" /> > Edit Organization > > [3] > function edit($id = null) { > $this->log(__FILE__ . ':' . __METHOD__ . ": init.", LOG_DEBUG); > if (!$id && empty($this->data)) { > $this->Session->setFlash('Invalid Organization'); > $this->redirect(array('action'=>'index'), null, true); > } > if (!empty($this->data)) { > $this->cleanUpFields(); > if ($this->Organization->save($this->data)) { > $this->Session->setFlash('The Organization has been > updated.'); > $this->redirect(array('action'=>'index'), null, true); > } else { > $this->Session->setFlash('The Organization could not > be saved. > Please try again.'); > } > } > if (empty($this->data)) { > $this->data = $this->Organization->read(null, $id); > } > } > --~--~-~--~~~---~--~~ 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 1.2 - Enums and auto-populate field after dropdown selection
First off, I have a couple enums in a table in my app. Under Cake 1.1, the enums were turned into a dropdown and displayed properly. Using cake_1.2.0.5427alpha, I don't get the dropdowns. I haven't tried any nightly builds but am happy to do so if it would give me back the functionality I need without any other significant negative effects. Is this a known issue, and/or what do I need to do to make it work like it did under 1.1? Additionally, we would like to somehow auto-populate a text box (which is not saved to the db) with a description string corresponding to the selection made in the dropdown. We have a part number (dropdown) that they select, and then a list of descriptions (short string) that we'd like to show after they've made their selection ofn th. I can store the part number and descriptions in the database in another table, or do something else altogether, but I'm unsure about the proper approach with Cake. Any suggestions?? Thanks! 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: Using dashes instead of underscores in URLs
> @Wayne > good try, but that is perhaps one of the worst ideas I have seen in a > while I never claimed it was a Good Idea, nor suggested that I would choose that route myself... Only that it was a possible solution to his problem. 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: Using dashes instead of underscores in URLs
Not trivially, it seems. This might work -- Write a method Inflector::dash(). Grep cake/libs/ for Inflector::underscore() and replace all instances with your new Inflector::dash() method. You might also need to replace some naked '_' characters in other library files. You might completely break Cake, but it might also work. Not really sure as I've never attempeted it... Wayne On 10/1/07, Joel Stein <[EMAIL PROTECTED]> wrote: > > > Router::connect('/best-practices', array('controller' => '/ > > best_practices')); > > Thanks. Yes, I knew about that. However, my $html->link() problem > still remains. Is there a way to sort of globally map a route for a > controller as something different than the actual controller name? > > > If you also want to get rid of the "_" between arguments and it's > > value > > > > Just:set the > > var $argSeparator = '-'; > > in you controller file, > > Actually, this only affects passed params, as far as I can tell. I'm > looking for something which would affect the controller methods. Any > ideas? > > Thanks 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 -~--~~~~--~~--~--~---