Re: Design a Highly dynamic content home page

2008-09-25 Thread [EMAIL PROTECTED]
It depends on your project's design to some extent. It has all the preformance downsides of using requestAction but this can be helped by caching the views in some cases. On the up-side you can have a setup where the home-page does not need to be altered whenever a module is added, removed or

Re: how do i output results of my mysql query in error.log file

2008-09-25 Thread Harpreet singh
When i observed the issue properly i found that the query is not able to take my input. The query which i see on the o/p page after i swith to (debug , 2 ) is as follows SELECT `Entity`.`id`,`Entity`.`user_id`,`Entity`.`title`,`Entity`.`tags`,`Entity`.`description`, `Entity`.`public_private`,

Re: Setting up CakePHP for Reporting

2008-09-25 Thread [EMAIL PROTECTED]
If you want to know wether I would use CakePHP if I was asked to develop a web-application to do resource scheduling... the answer is yes. But then I have been developing with Cake (on and off) for the past 2,5-3 years. I may be a little biased :) How I would design the Models (and database) for

Re: How to update a model with save method?

2008-09-25 Thread forrestgump
ORCC can u elaborate on that? forrestgump On Sep 23, 10:29 pm, ORCC [EMAIL PROTECTED] wrote: Thanks for all your answers. I found my error: I've overridden the existsmethodin mymodelfor other uses. So, it seems that savemethodinvokes the existsmethodto decide wheter call an INSERT or

Re: problem in auth component, please help

2008-09-25 Thread [EMAIL PROTECTED]
One thing I notice in your code is that you allow login. Skip that. Auth will allow access to the login-action by itself and this will create a conflict. On Sep 23, 9:52 pm, Golam Kibria [EMAIL PROTECTED] wrote: hello i have tried authcomponent but i dont know why it is not working for me.

set::combine question

2008-09-25 Thread .
if i have set::combine($data, $path1, $path2), I would like $path1 to be counting integers starting from 0 (ie 0,1,2,3, etc). What is the syntax to do this? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: To model or not to model

2008-09-25 Thread Grzegorz Pawlik
Still thinks that executing queries is needed? Yes. Sometimes You have uncommon database design, and You can't EFFECTIVELY receive data just by using standard, even magic, model functions. In that case you should create method in model that executes your custom query with inner, outer, left

Re: set::combine question

2008-09-25 Thread grigri
In your case, with no group parameter, there's no need to use Set::combine(), you can just use Set::extract() which does the normal array indices (0,1,2,...) Set::extract($data, '{n}.Model.field'); With a group parameter, there's no way to do this directly that I know of. Shame. On Sep 25,

Re: To model or not to model

2008-09-25 Thread Rafael Bandeira aka rafaelbandeira3
Still thinks that executing queries is needed? Yes. Sometimes You have uncommon database design, and You can't EFFECTIVELY receive data just by using standard, even magic, model Definetly correct, my sentence wasn't much happy. I meant for the cases he presented. Anyway, keep in mind that

Re: problem in auth component, please help

2008-09-25 Thread [EMAIL PROTECTED]
thanks martin. but when i changed controller name from Patients to patients and Doctors to doctors, it works. do i always need to name controller in lowercase? thanks. On Sep 25, 1:25 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: One thing I notice in your code is that you allow login. Skip

Re: cakephp-specific web hosting?

2008-09-25 Thread [EMAIL PROTECTED]
It sounds like a cool project. Specially the part about creating some control-panel for switching Cake-cores... and of-course included donations. But I wonder if the market is there for such a hosting service. Looking at Rails (I have a feeling you are), the reason you have lots and lots of

Problem with form helper

2008-09-25 Thread Günther Theilen
Hi! I've got a weird problem with the form helper, maybe someone can help... $form-input(5.name) creates an input field with name=data[5][name], which is pretty much what I expected. But $form-input(0.name) creates an input field with name=data[foo][name], foo is the pluralized modelname.

Re: Setup Troubles (OS X, 'requested address was not found on this server')

2008-09-25 Thread [EMAIL PROTECTED]
Check premissions of the files (all related to Cake). Copying from a Windows-shares to a Mac will usually make everything readable for you but not anyone else (like the webserver on your machine). This might have happened in your case for another reason (evil USB-stick?). /Martin On Sep 24,

Re: How to validate this?

2008-09-25 Thread Braindead
Hi Günther, just in case you haven't already solved this problem, the following link to the bakery should lead you into the right direction: http://bakery.cakephp.org/articles/view/multivalidatablebehavior-using-many-validation-rulesets-per-model Regards, Markus On 22 Sep., 14:25, Günther

Re: test a table existence

2008-09-25 Thread majna
There's many ways to check if table ex. http://forums.mysql.com/read.php?101,33936,40320#msg-40320 If You want to *create* table, without any structure, you can play with CREATE TABLE IF NOT EXISTS in model's constructor. (there's model property $useTable too) //snipp public function

Re: How to validate this?

2008-09-25 Thread Günther Theilen
Hi Markus, actually I solved the problem already with some sort of workaround, but I'll have a look at the article nevertheless. Thanks! Regards Guenther Braindead schrieb: Hi Günther, just in case you haven't already solved this problem, the following link to the bakery should lead you

Re: Problem with form helper

2008-09-25 Thread Donkeybob
Why would you be using an array integer instead of the model name? Does this not use a model? Code you post you controller code that populates this form? On Sep 25, 8:54 am, Günther Theilen [EMAIL PROTECTED] wrote: Hi! I've got a weird problem with the form helper, maybe someone can help...

How prevent automatic insert User in Aros and Acos table?

2008-09-25 Thread avairet
Hi, I'm using ACL by groups, with User belongsTo Group and bindNode() method in my User model. So I don't want to insert new aro when I create a user because the group permission is sufficient. Is it possible to disconnect AclBehavior when I add a user? In fact my User model is both controlled

Re: asking about Vertical database on CakePHP

2008-09-25 Thread Mr. Meitar Moscovitz
On Sep 25, 2008, at 12:24 AM, mark_story wrote: Meitar, I've used drupal quite a bit in the past, and I don't think there is really anything that it does as far as content management that cannot be done with CakePHP. If you were to use EAV (expandable) and table inheritance you can easily

Re: problem in auth component, please help

2008-09-25 Thread [EMAIL PROTECTED]
Yes, when referring to them as urls they should be lowercase as shown here: http://book.cakephp.org/view/391/loginAction It may be confusing at first but it will soon become second nature. /Martin On Sep 25, 1:32 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: thanks martin. but when i

Re: question regarding swfupload component

2008-09-25 Thread introvert
Yes, I have seen this article. However, there isnt any information about filenames. On 22 sep., 21:28, Sam Sherlock [EMAIL PROTECTED] wrote: Have you seen this article http://blogs.bigfish.tv/adam/2008/04/01/cakephp-12-sessions-and-swfup... there is also some information about setting up

Re: Problem with form helper

2008-09-25 Thread Donkeybob
what happens when you do it the other way . . . in controller . . .. . . . $contacts = $this-Contact-find('all', array( 'conditions' = array( 'Contact.user_id' = $this-Session-read('Auth.User.id') )); $this-set('contacts', $contacts); in view . . . . foreach($contacts as $contact) {

Re: cakephp-specific web hosting?

2008-09-25 Thread teknoid
I agree, cake is pretty easy to setup... but I feel that whatever is out there could be made better and simpler. The aim is to help out the cakephp team with donations and alleviate some pain that people experience on shared hosts. Hanging out on IRC, I've seen quite a few problems experienced on

Re: Problem with form helper

2008-09-25 Thread Günther Theilen
Donkeybob schrieb: what happens when you do it the other way . . . That doesn't work at all. I think I'll just capitulate an do it the old fashioned way: index.ctp to list the records, edit.ctp to edit _one_ record Thanks anyway! Regards Guenther

Re: Problem with form helper

2008-09-25 Thread grigri
I've never seen it done that way before. I always do it like this: (simplified view) $n = empty($this-data['Contact']) ? 0 : count($this- data['Contact']); for ($i = 0; $i$n; $i++) { echo $form-input(Contact.$i.name); } This way the data is like this: $data = array( 'Contact' = array(

Re: Problem with form helper

2008-09-25 Thread Günther Theilen
Could you please post your controller code to populate the form? grigri schrieb: I've never seen it done that way before. I always do it like this: (simplified view) $n = empty($this-data['Contact']) ? 0 : count($this- data['Contact']); for ($i = 0; $i$n; $i++) { echo

Re: Problem with form helper

2008-09-25 Thread Günther Theilen
I want to edit multiple records in one view. Controller: $this-data = $this-Contact-find('all', array( 'conditions' = array( 'Contact.user_id' = $this-Session-read('Auth.User.id') )); View (simplified): for ($i = 0; $i count($this-data); $i++): e($form-input($i.Contact.name);

Re: Problem with form helper

2008-09-25 Thread grigri
Sorry, I misinterpreted the setting. I was using this on a hasMany edit page,so it's not exactly the same structure. (Page hasMany Section, this was for editing the Sections). I just tried on a direct multi-model edit page, and ran into problems just like you said. However, in these

Re: Problem with form helper

2008-09-25 Thread Günther Theilen
Yep, I read those tutorials too, and it looks like it should work. A bit strange... grigri schrieb: Sorry, I misinterpreted the setting. I was using this on a hasMany edit page,so it's not exactly the same structure. (Page hasMany Section, this was for editing the Sections). I just

running a forum from within webroot

2008-09-25 Thread Sebastian
Hi y'all, following Brit's article (http://britg.com/2008/08/23/integrating- cakephp-with-bbpress-part-1/) I'm trying to integrate bbPress (Forum) with CakePHP. Unfortunately, I'm having some trouble with the RewriteRules I installed the forum stuff to webroot/forum/. The whole thing even

class 'Routes' not found

2008-09-25 Thread mirfan
I have pasted my working copy on a new computer of cake but when i try to access it it give me the following error class 'Routes' not found any help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To

Problem with Session and Ajax

2008-09-25 Thread Daniel Loynaz
I has a problem with session in Cakephp. I am using cake's paginator with Ajax but when I paginate the variables of the session they get lost, however when I debuging everything works correctly. Could somebody tell me that it can be? --~--~-~--~~~---~--~~ You

searchable behavior

2008-09-25 Thread Matsinet
Has anyone got the searchable behavior working correctly with rebuildOnUpdate set to true? I am experiencing updates are creating new records in the search_index table instead of updating the existing index row. I am looking for a way to troubleshoot the behavior but every time I put a debug

Re: belongsTo and parent data.

2008-09-25 Thread James Pearson
The event table has eventtype_id as the FK. The SQL for $this-Event-find('first'); does a simple select from events with no joins or errors, which is the confusing part. It is like Cake isn't trying to get the parent information. On Sep 24, 7:15 pm, teknoid [EMAIL PROTECTED] wrote: Are your

Parameter passing in URL

2008-09-25 Thread Daniel Süpke
Hi, we are using CakePHP 1.2 and I was wondering how it could be achieved to pass a parameter along every URL. We have a parameter set to an ID and it needs to be included in every URL in the application. Now, the first solution was to create a LinkHelper which added the location via $_GET, but

Parameter passing in URL

2008-09-25 Thread Feanor's Curse
Hi, we are using CakePHP 1.2 and I was wondering how it could be achieved to pass a parameter along every URL. We have a parameter set to an ID and it needs to be included in every URL in the application. Now, the first solution was to create a LinkHelper which added the location via $_GET, but

Problem with Session and Ajax

2008-09-25 Thread Daniel Loynaz
I has a problem with session in Cakephp. I am using cake's paginator with Ajax but when I paginate the variables of the session they get lost, however when I debuging everything works correctly. Could somebody tell me that it can be? --~--~-~--~~~---~--~~ You

Error: Your database does not have any tables. when Baking

2008-09-25 Thread BenMatthew
I'm still learning CakePHP and when I try to bake a controller and anything it gives me the error below. I am using MAMP on OS X and MySQL is connected by localhost. Cake does connect to the database when I use the scaffold and displays the data entries. Also I enabled/uncommented

Re: test a table existence

2008-09-25 Thread Gotzon Astondoa
I´m also interested in this, but have no idea. I´m new to Cake. Nobody has a suggestion? 2008/9/25 forrestgump [EMAIL PROTECTED] nobody to give a suggestion ? On Sep 24, 2:47 pm, forrestgump [EMAIL PROTECTED] wrote: Hello, Iam trying to figure out a way for a model to :

Re: belongsTo and parent data.

2008-09-25 Thread James Pearson
I found the problem, I had saved the Event model as Events.php instead of Event.php D'oh! JP On Sep 24, 7:15 pm, teknoid [EMAIL PROTECTED] wrote: Are your foreign keys named correctly? What does your SQL debug tell you about the query? On Sep 24, 1:06 pm, James  Pearson [EMAIL PROTECTED]

Re: Error using CakePHP with SQL Server

2008-09-25 Thread seven
app works on localhost but on a server I have the same problem... On 22 sep, 10:27, excepcion [EMAIL PROTECTED] wrote: Hi,    I've installed Cake PHP last week and I'm trying to use it with SQL Server 2005. I have a newdatabasecalled test with the user sa as the only authorised user.

Help a Learner

2008-09-25 Thread Fernando Mendonça
Hello everybody, I've a problem... I'm starting to learn how to use CakePHP and I'm trying to write a new Action in one of my Controllers. I need to recuperate values sent by a View and validate them. The idea is: The user makes a reserve to one Official in one Date and Time. I've to verify if

Re: class 'Routes' not found

2008-09-25 Thread Rafael Bandeira aka rafaelbandeira3
class 'Routes' not found You are mispelling Router somewhere in your application, probably on app/config/routes.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email

Missing Join on HasMany query (Cake Version: 1.2.0.7296 RC2)

2008-09-25 Thread Sax
Cake Version: 1.2.0.7296 RC2 Thanks ahead of time for your help. I have a Model that BelongsTo three other models, it also has three HasMany relationships All models are used in my controller. I want to do a find where I limit the results by a field in one of the HasMany models and a couple

Re: saveAll() not inserting related id pt II

2008-09-25 Thread trustfundbaby
just took a look and the tables were already in innodb On Sep 23, 10:05 am, teknoid [EMAIL PROTECTED] wrote: It may work, but it may not work correctly. MyIsam tables do not support transactions, so there is not point in doing saveAll() for multiple models. On Sep 23, 5:59 am, trustfundbaby

Re: Missing Join on HasMany query (Cake Version: 1.2.0.7296 RC2)

2008-09-25 Thread teknoid
CakePHP does not build JOINs for hasMany You can use containable behavior to pass conditions to related models. p.s. There is a trick to force cake to build JOINs, but you should investigate containable first. On Sep 24, 2:48 pm, Sax [EMAIL PROTECTED] wrote: Cake Version: 1.2.0.7296 RC2

Re: Problem with form helper

2008-09-25 Thread teknoid
I believe there is a documented issue that when you attempt to start a form name with a '0' it is not treated correctly (rather as null). That being said it is always a good idea to name your fields as ModelName.fieldName and ModelName.{$index}.fieldName This is especially true when using

Re: Best way to validate dates to prevent future dating

2008-09-25 Thread Tony Thomas
The problem I had was that each new record that was being added, would then go to a step to add several related records in a different table. So even though I could check the datestamps against each other, the flash messages were getting lost because the application immediately redirects and

Re: Help a Learner

2008-09-25 Thread teknoid
If you are just starting out I recommend you start with cake 1.2 (generateList() is function of 1.1, so that's why I assume you are using 1.1). But more importantly I suggest you read the manual about data validation and proper way to retrieve model data, as of now you are doing a lot of things

Re: how to make Cakephp compare string in case sensitive

2008-09-25 Thread [EMAIL PROTECTED]
thanks On Sep 15, 1:22 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I  don't know of any CakePHP specific way to force this on MySQL. You can set your database, table or field to use a case sensitive collation or you could add a collate parameter to your query. Each collation has a cs and

send email using SMTP - From name got replaced

2008-09-25 Thread [EMAIL PROTECTED]
Hi there, I am using PHPMailer and gmail SMTP service to send email, and blocked by the issue - From name got replaced by gmail address. I specified From and FromName while sending the email. In debugging, the mail header includes the correct FromName and From address). gmail succeeded to

Send email to individual using SMTP

2008-09-25 Thread [EMAIL PROTECTED]
Hi there, Is there any way to achieve the following function (using SMTP) ? 1. There are two people A and B I want to send email. 2. When A receive the email, the email looks like From [Me], To A . There is nothing regarding B. 3. When B receive the email, the email looks like From [Me], To

Themes - Best practice?

2008-09-25 Thread [EMAIL PROTECTED]
Hi there, I want to give users the possibility to upload their own themes directly to the filesystem - similar to how wordpress does this. With the current theme-sctructure in Cake, I have a problem on how to deal files. CSS and JS could be handled somehow, I guess, but what about images? When

Re: Themes - Best practice?

2008-09-25 Thread teknoid
Take a look at the html helper's image() method. It should be relatively easy to override with AppHelper to suit your needs. On Sep 25, 6:09 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi there, I want to give users the possibility to upload their own themes directly to the filesystem -

Ajax returning encoded quotes for confirm message function

2008-09-25 Thread Yabran
Well, i found this problem and is driving me nuts. Before posting a ticket at the trac i thought there might be an answer here. Let me describe it for you: i use a simple ajax-link to hide my page and show a little div (something like a modal box, only home made) echo $ajax-link('Show list',

Re: Setup Troubles (OS X, 'requested address was not found on this server')

2008-09-25 Thread Drew H
Hmm, well, that didn't seem to help, but something else I did fixed it. Very curious — I'm not sure what's different now, but at least I have a working install. Thanks for the advice! Drew On Sep 25, 8:58 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Check premissions of the files (all

cake 1.1x favicon?

2008-09-25 Thread rocket
does anyone know how to get rid of the default cakephp favicon? --~--~-~--~~~---~--~~ 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

Re: send email using SMTP - From name got replaced

2008-09-25 Thread nachopitt
Thats correct. Gmail replaces the From field with the account address the SMTP mail server is using for authentication. On Sep 25, 4:23 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi there, I am using PHPMailer and gmail  SMTP service to send email, and blocked by the issue - From name

Re: cake 1.1x favicon?

2008-09-25 Thread Samuel DeVore
On Thu, Sep 25, 2008 at 7:42 PM, rocket [EMAIL PROTECTED] wrote: does anyone know how to get rid of the default cakephp favicon? yup delete the file in webroot or replace with yours, browsers cache this file like the devil child himself so it can take a while for you to see that you did the

Re: cake 1.1x favicon?

2008-09-25 Thread rocket
lol totally missed it in the webroot thanks On Sep 25, 11:40 pm, Samuel DeVore [EMAIL PROTECTED] wrote: On Thu, Sep 25, 2008 at 7:42 PM, rocket [EMAIL PROTECTED] wrote: does anyone know how to get rid of the default cakephp favicon? yup delete the file in webroot or replace with yours,

flood control?

2008-09-25 Thread rocket
hey guys i implemented a simple mail system in my site and was wondering what i ought to do for flood control. I dont' want people to keep hitting refresh after they hit send thus spamming... I was thinking of doing something like $this-Session-write('Timeout', 30); To simulate a 30 second

Re: flood control?

2008-09-25 Thread Marcelius
You can't make sessions count down. Instead of setting 30sec in your session,store mktime() for the current time. Next time a user hits the send button you check the current time with the time you allready had stored in your session. Note that if a user deletes the browsers cookie, session get

Re: flood control?

2008-09-25 Thread rocket
mktime.. good idea. thanks On Sep 26, 1:23 am, Marcelius [EMAIL PROTECTED] wrote: You can't make sessions count down. Instead of setting 30sec in your session,store mktime() for the current time. Next time a user hits the send button you check the current time with the time you allready had

Re: Problem with form helper

2008-09-25 Thread Günther Theilen
teknoid wrote: That being said it is always a good idea to name your fields as ModelName.fieldName and ModelName.{$index}.fieldName This is especially true when using saveAll(), and I do specify that in the tutorials. Yep, you're right. I usually do it that way when handling hasMany