Re: Fatal error: Allowed memory size of...

2008-03-06 Thread DJ Spark
It seems to be what it says: memory usage beyond PHP limits. In some test I ran , cakephp 1.2 uses around 4MB of memory with one controller instantiated. [but i'm not a benchmark freak, should something like this be on docs ?] So, it's certainly the data or associated data you are fetching

Re: Fatal error: Allowed memory size of...

2008-03-06 Thread DJ Spark
sometimes, bake used to create 'Parent' keys for associations. this name, when already existent, used to gives memory errors. I could work around by baking this model, changing do 'AnotherparentName' and continued baking happily ever after. spark On Thu, Mar 6, 2008 at 11:09 PM, Vangel [EMAIL

Re: problema com session

2008-02-14 Thread DJ Spark
seu favicon.ico está no lugar certo ? confere, aí. alguns problemas de sessão vêm daí. (é estranho, mas tem a ver com o primeiro request sempre ser duplo (página e icone), timeout do request do servidor, firefox agindo de maneira errada, etc). spark 2008/2/14 Formigao TTS [EMAIL PROTECTED]:

Re: Chamar o validacao no controller?

2008-02-14 Thread DJ Spark
lancaram ha menos de 1 semana: http://book.cakephp.org/ vai dar conta da parte pratica do cake. já é muito muito muito útil spark 2008/2/14 Rafael Barbosa [EMAIL PROTECTED]: O grande defeito do cake é a falta de documentação. Quando li a sua dúvida eu dei checkout no repositório svn

Re: Sugestão: Mais vida ao $this - flash()

2008-02-14 Thread DJ Spark
ei, manda esse patch num ticket, é ótimo ! spark 2008/2/14 etapombas [EMAIL PROTECTED]: Galera eu uso o $this - flash pra tudo: confirmar cadastros, negar acesso e notificar erros. Fiz algumas alterações no core do cake e gostaria de compartilhar com vocês. Primeiro vamos alterar o

Re: Calling a controller method from a view

2008-02-14 Thread DJ Spark
the usual way is $myvar = $this-requestAction('/your_controller/action/variables'); and that method returns your precious variable :) spakr On Fri, Feb 15, 2008 at 12:21 AM, Snadly [EMAIL PROTECTED] wrote: I don't know if this is possible but I need to call my controller from my view

Re: 500 errors with Dreamhost?

2008-02-13 Thread DJ Spark
is your domain pointing to /home/yoursusername/yourdomain.com/app/webroot/ ? spark On Feb 13, 2008 12:16 PM, Sam Sherlock [EMAIL PROTECTED] wrote: although this is not for dreamhost (this works for 1and1) without these .htaccess adjusments I get a 500 error AddType x-mapp-php5 .php

Re: Setting Variables in Foreach Loops...

2008-02-13 Thread DJ Spark
Brett, look: BEGIN LOOP1 - $user_online = true; LOOP2 - $user_online = true; LOOP3 - $user_online = false; END SET VARIABLE TO VIEW $view-user_online = $user_online; which value will be there in the view ? Now, the simplest way, is to use the user array itself: foreach

Re: Campos created e modified

2008-02-09 Thread DJ Spark
Se vc está falando de MSSQL , timestamp é ouuutra coisa, e nao deve ser usado para guardar datas/segundos/etc The SQL Server timestamp data type has nothing to do with times or dates. http://www.sqlteam.com/article/timestamps-vs-datetime-data-types Descobri isso há 2 semanas, depois de ter

Re: Differences between core debug 0 and 2

2008-02-04 Thread DJ Spark
level 1 or 2 are DEV modes, and SHOULD NOT be used in a production app, anyway. in level 0 , cake reads the cached model/database description, reducing the number of queries to only those made by your applicatiopn. spark On Feb 3, 2008 3:30 PM, cwsTrummer [EMAIL PROTECTED] wrote: hello

Re: Error updating an ACO in Cake1.2 beta using a postgres DB

2008-02-01 Thread DJ Spark
just filled a ticket for this problem. by now, changing the last line of the __sync() function, in TreeBehaviour, seems to work from $model-updateAll(array($model-escapeField($field) = $model-escapeField($field) . ' ' . $dir . ' ' . $shift), $conditions); TO $model-updateAll(array($field =

Re: Chave composta e atributo em tabela associativa

2008-01-23 Thread DJ Spark
oi Juan, Na verdade, o que o Fenix quer, é usar uma chave não única: aquela linha do BD seria unica não porque tem um ID numérico e único, mas, sim, porque tem DOIS atributos que, em conjunto, são únicos. Exemplo: - nome - email jose / [EMAIL PROTECTED] jose / [EMAIL PROTECTED] joao / [EMAIL

Re: Quando ER não resolve na validação

2008-01-17 Thread DJ Spark
provavelmente, além das regras 'prontas' , voce motnaria suas proprias regras... usando $this-Modelo-validate(); A API lista um método 'userdefined()' onde um dos argumentos é uma função que fará a validação especial... http://api.cakephp.org/1.2/class_validation.html Alguém já usou isso ?

Re: CakePHP 1.2 - Controller

2008-01-15 Thread DJ Spark
o nome do Controller (var $name = 'Login';) não é o nome de nenhum model do meu banco de dados. Paulo. On 14 jan, 14:13, DJ Spark [EMAIL PROTECTED] wrote: tente: $uses = null; ou $uses = array(); isso deve servir, para dizer que oControllernão vai usar nenhum Model

modified_by , created_by ...

2008-01-15 Thread DJ Spark
Hi, Every model in my project does have a 'created_by' and 'modified_by' field, storing some user ID. Currently, I'm using a controller beforeFilter to populate a temporary Model with the $this-Auth-user() , only if $this-data is full of something, and a beforeSave in the Model, to associate

Re: modified_by , created_by ...

2008-01-15 Thread DJ Spark
/TrackWhoMakesDBChanges On Jan 15, 12:21 pm, DJ Spark [EMAIL PROTECTED] wrote: Hi, Every model in my project does have a 'created_by' and 'modified_by' field, storing some user ID. Currently, I'm using a controller beforeFilter to populate a temporary Model with the $this-Auth-user

Re: Página de Gerenciamento - Vale a pena?

2008-01-14 Thread DJ Spark
Se bem que, usando o bake, é *tão* fácil fazer isso, que vale a pena para qualquer projeto... já que você não vai customizar o template gerado, vai demorar, uhm, 5 minutos, para um site médio... Spark 2008/1/14 Eber Freitas Dias [EMAIL PROTECTED]: Cara, se é só pra você usar, não vejo

Re: CakePHP 1.2 - Controller

2008-01-14 Thread DJ Spark
tente: $uses = null; ou $uses = array(); isso deve servir, para dizer que o Controller não vai usar nenhum Model Spark 2008/1/14 pamp_php [EMAIL PROTECTED]: Estou usando o CakePHP 1.2 e me surgiu uma dúvida: Define um controller cujo nome não está relacionado a

Re: Mudar extensão do view (template)

2008-01-12 Thread DJ Spark
http://groups.google.com/group/cake-php/browse_thread/thread/5e8d8f7cbea4de1a/4204ae3e6e3597a3?q=dreamweaverrnum=1#4204ae3e6e3597a3 2008/1/12 Rodrigo Maia [EMAIL PROTECTED]: Exatamente Spark, por causa do código colorido. Procurei no dreamweaver em edit preferences... mas não vi um lugar

Re: Mudar extensão do view (template)

2008-01-11 Thread DJ Spark
além disso, se vc quer mudar a extensao só por causa do dreamweaver (ou do codigo colorido em outra app), é bem facil configurar isso em qqr programa, inclusive eclipse/aptana/notepad++ spark 2008/1/11 wc [EMAIL PROTECTED]: Outra que eu sei responder. O atributo que indica a extensão do

Re: Multi Idiomas Cake1.2.

2008-01-10 Thread DJ Spark
pode dar mais algumas especificações ? vai ser *conteudo* (db) multi lingual, ou apenas as mensagens (e botoes, imagens, etc) serão multilinguais ? mas esse link aqui explica, em inglês, quase tudo de como o 1.2 funciona... sobre internacionalizaçao e localização

Re: findAll ñ reconhece campos

2008-01-10 Thread DJ Spark
aliás, isso é uma hábito necessário, que tive que me acostumar: sempre que mudar *qualquer* coisa na DB, limpar aquele folder de cache spark On Jan 10, 2008 5:10 PM, Rafael Bueno [EMAIL PROTECTED] wrote: Valeu amigo era isso mesmo, apaguei todo o conteúdo da pasta app\tmp \cache\models

Re: bake.php no cakephp 1.2

2008-01-09 Thread DJ Spark
configura o path do php no windows (ou no linux/macos) no windows tem que reiniciar (ou usar o prompt, mas aih ja complica) depois, entra pela linah de comando no path do /app e digita cake bake pronto :) tem uns outros atalhos novos, como cake bake all User (faz tudo relativo a tabela

Re: Render ho/ho

2008-01-04 Thread DJ Spark
$this-controller-set('email', $this-requestAction('/email/'.$id, array('return'))); and in the view for this controller, you may just ? echo $email; ? I started using this approach, and after some memory usage tests, i found out it's simpler to execute a local action, or use Model to get the

Re: projeto com 2 templates: site + blog

2007-12-21 Thread DJ Spark
renderizado. Veja um post do DJ Spark naquela thread entitulada *Layout ERA Re: othAuth...*. Num dos ?ltimos e-mails da thread o Spark estava me explicando sobre o requestAction, e l? ele dizia para setar as vari?veis $this-autoLayout = false; $this-autoRender = false; dentro

Re: Setting Up Problems using Server

2007-12-20 Thread DJ Spark
this checklist should be on the cake manual :) On Dec 19, 2007 2:24 PM, Samuel DeVore [EMAIL PROTECTED] wrote: Here's the common response 1. is mod_rewrite enabled on the server 2. are you sure 3. is AllowOverride All set on the server 4. are all the .htaccess files in place (a lot of ftp

Re: redirecionamento do othAuth para noaccess_page

2007-12-10 Thread DJ Spark
por favor, mande mais alguns dados, como seu codigo, as versoes que vc estah usando, etc On Dec 10, 2007 1:55 PM, igor_rj [EMAIL PROTECTED] wrote: Blz grupo?? Estou com o seguinte problema no componente othAuth: Após logar , caso o usuário tente acessar alguma funcionalidade a qual ele não

Re: Ajax + cakephp + FF

2007-12-05 Thread DJ Spark
adicionando: o firebug é um plugin para o firefox... mas depois de instalado , muda sua vida. MESMO. (se você faz html, css, javascript, ou programação web). Michael, se voce está num select multiline, os valores têm que estar selecionados. talvez seja este o problema.. em um site onde eu tinha

Re: Habtm recursivity

2007-11-30 Thread DJ Spark
since there is no code to evaluate, i may only guess: maybe, it's about plural form, maybe, it's about the related model StageStage (are you sure about this name ?) maybe, it's about you model associantions. please, show us some of the models, so we can help :) spark On Nov 28, 2007 10:28

Re: Strange recursion problem (i think) - hopefully someone can shed some light (code inc.)

2007-11-24 Thread DJ Spark
also, you don't need, usually, to use more than one model per controller ( uses('Model1', 'Model2') ), if they are associated somehow: this $this-Variations-findAll() could be $this-Product-Variation-findAll() I didn't run any tests, but I can see some points: class VariationOption

Re: solution to 500 errors running 1.2 on dreamhost and others

2007-11-21 Thread DJ Spark
It's because dreamhost's default php 5 doesn't include gettext. You must compile it yourself (they do have a nice script to do that for you, in their wiki), or switch back to php4 (the simpler way) whenever you use __(), you'll stumble into this. spark On Nov 21, 2007 1:42 PM, busytoby

Re: HABTM problem - Underscore in primary key name?

2007-11-21 Thread DJ Spark
if you did check the manual, in 'models' chapter, you find about model variables: http://manual.cakephp.org/chapter/models $primaryKey If this model relates to a database table, and the table's primary key is not named 'id', use this variable to tell Cake the name of the primary key.

Re: Behaviours - Session data

2007-11-21 Thread DJ Spark
Hi, I just thought of a problem I have, and maybe it's a case where model would need session data: a model behaviour to change table columns according to the choosen language. How that language could be stored ? How model could access it ? thanks spark On Nov 21, 2007 8:54 PM, Grant Cox

Re: Generate list com dados concatenados, como?

2007-11-13 Thread DJ Spark
relendo seu email, talvez eu que nao tenha entendido a questão mesmo. Mas, antes, confirma pra mim: você quer, na verdade, gerar um select que tenha dados de dois modelos diferentes, concatenados ? abraços spark On Nov 12, 2007 9:50 PM, hostdesigner [EMAIL PROTECTED] wrote: Ou eu sou

Re: othAuth...

2007-11-12 Thread DJ Spark
opas ! Sobre a documentação: A nova versão do manual está em construção, aqui: http://tempdocs.cakephp.org/ Ele está muito mais claro, mais detalhado (onde deve), e, obviamente, cobre os novos features do cake1.2 A versão antiga, você já deve saber, está no http://manual.cakephp.org/ , e a

Re: Layout ERA Re: othAuth...

2007-11-12 Thread DJ Spark
O requestAction chama uma action de qualquer controller, dentro de uma view/layout Ele pode retornar uma view renderizada pelo proprio controller (muito comum com ajax), ou retornar uma variavel Eu tenho um layout que é mais ou menos assim: html head css, js, etc /head body div id=wrapper

Re: Como capturo as informações geradas pelo findBySql

2007-11-08 Thread DJ Spark
soh para completar, http://cakebaker.wordpress.com/2006/02/21/new-syntax-for-conditions-ii/ http://cakebaker.42dh.com/2006/03/02/conditions-in-cakephp-rc6/ spark On Nov 8, 2007 10:52 AM, DJ Spark [EMAIL PROTECTED] wrote: use o $this-query() ao inves do $this-findBySql() , que já vai ser

Re: autenticação e autorização

2007-11-07 Thread DJ Spark
Ola, Trabalho com a versão 1.2 do cake, que está em 'pre-beta' desde a semana passada, e ela é *bem* estável. Não é muito complicado usar o componente de auth e ACL, desde que se respeite as suas convenções. Quanto mais você sai delas, mais coisas você tem que setar manualmente. O component

Re: Chamar métodos dentro do app_controller

2007-11-07 Thread DJ Spark
nov, 17:24, DJ Spark [EMAIL PROTECTED] wrote: acho que a maneira mais correta em MVC para isso é chamar o requestAction no seu layout, onde o banner vai aparecer. na sua view ou no layout mesmo voce coloca isso: ?php echo $this-renderElement('banner', array('data'=$this-requestAction

Re: 500 Error with a completely new, untouched installation on Dreamhost

2007-11-01 Thread DJ Spark
thank you matt, but it's quite an old thread here, and I found that same workaround :\ Anyway, if you compile your own PHP5 with gettext, you'll get the same results. It's not that complicated, and they have a script in their wiki to do it. http://wiki.dreamhost.com/Installing_PHP5

Re: Router::disconnect ?

2007-11-01 Thread DJ Spark
i'm not sure if it's exactly what you want, but if you do name your action with '_' , it's automagically private and not accessible from outside your controller. function _some_strange_function ($id = null) {} you cannot use it: /your_controlller/_some_strange_function/3 but you may call it

cakephp , fastcgi, APC

2007-10-26 Thread DJ Spark
Hi I managed to put fastcgi and APC to work on dreamhost, a shared host, but I'm not very experienced with those concepts... I'd like to know a little more from cake folks, how to use these benefits in a good way. is it any good to use APC as a view cache holder ? fastcgi on a shared

Re: Google Analytics Integration?

2007-10-16 Thread DJ Spark
it looks ok to me but you have to wait 'till next day to see the analysis. Would this be the problem ? :) spark On 10/16/07, chewie124 [EMAIL PROTECTED] wrote: https://www.serviceforlifeprinting.com On Oct 16, 3:54 pm, John David Anderson (_psychic_) [EMAIL PROTECTED] wrote: On

Re: What happens with 1.2?

2007-10-06 Thread DJ Spark
for the bleeding edge, http://cakephp.org/downloads/index/nightly/1.2.x.x latest updates in 1.1 http://cakephp.org/downloads/index/nightly/1.1.x.x these are nightly builds. test them before putting in a production site. Spark On 10/6/07, Chris Hartjes [EMAIL PROTECTED] wrote: On

user can edit only his own posts, editor editing all of them

2007-10-03 Thread DJ Spark
I've searched, but since I'm not sure what to search for, I'll ask here: Suppose I have a blog system, where a user can edit only his own posts, an editor may edit all posts, a visitor can only read them. Is this what ACL is made for ? ACL + some other thing ? ACL is not that ? Do I need to

Re: Admin Implementation.

2007-09-13 Thread DJ Spark
These steps will help: 1. uncomment the admin route in config.php: define('CAKE_ADMIN', 'admin'); 2. bake the admin stuff (Models, views, controllers) the admin views have a 'admin' prefix to the files: admin_index.ctp they will use the default layout. to change that, step 3 3. copy the

Re: renderElement vs nesting views

2007-07-02 Thread DJ Spark
you can send a variable to the element: renderElement('my_element', array('data' = $data)); it's really useful :) spark On 7/2/07, Ski [EMAIL PROTECTED] wrote: Hi, I am writing an application which enables editing of data for a parent model and a data for a list of child models in a

Re: Using standard methods to do more difficult queries

2007-07-02 Thread DJ Spark
hi, there's a manual here, where it's all quite well explained: http://manual.cakephp.org/ you will find interesting the part where they show all the Association stuff. The last topic in this chapter is about bindModel / unbindModel http://manual.cakephp.org/chapter/models related to the

Re: Safari 3 and Firefox do not understand the urls my cake app is generating...

2007-06-29 Thread DJ Spark
I had this problem a few times, when redirecting to the same URL with a different variable /movies/count_votes/ when it finished, i redirected to the same action, to update other rows /movies/count_votes/500 /movies/count_votes/1000 and so on. The problem is, if i didn't put an exit(); after

Re: CakePHP Manual rev 154 for CakePHP 1.1

2007-06-08 Thread DJ Spark
It happens to me when the .chm file is on a network drive. Don't ask me why MS decided for this 'security feature' :) spark On 6/8/07, Gustavo Carreno [EMAIL PROTECTED] wrote: On 6/6/07, Mandy [EMAIL PROTECTED] wrote: If on windows, right click on the manual, go to properties, find the

a good book about cake - in portuguese (pt-br)

2007-06-06 Thread DJ Spark
hi, Last week was released a nice book covering some PHP Frameworks, mainly CakePHP, Symphony and Zend and, in a lesser extent, CI and Prado. Well written, with good examples, it's intent doesn't seem to cover all aspects of each framework, but only to show advantages and problems with each

Re: noob: Sorting results from 15min blog tutorial

2007-05-29 Thread DJ Spark
by changing this: function index() { $this-set('posts', $this-Post-findAll()); } to this: function index() { $this-set('posts', $this-Post-findAll(null, null, 'Post.modified DESC')); } You'll find all these options in the manual, Models chapter

SQL unusual problem

2007-05-27 Thread DJ Spark
hi, When I upgraded from cake1.1.13 to 1.1.15 , the website started to mix the MySQL connection links, or something... There is another app, OpenAds managing banners. When a banner is called within the Cake code, cake's SQL queries are not executed anymore. Any Idea where the problem could

Re: how scalable is this framework

2007-05-22 Thread DJ Spark
I have an app with 150.000 pageviews monthly , with some good data on it (from 5KB to 500KB of text), without any caching, on a Shared server (dreamhost). Users, loads of HABTM, some simple ACL I made myself (not really a nice one :), a nice text search, some hand tailored ajax goodness. It

Re: building website (social network)

2007-05-21 Thread DJ Spark
i'm not sure what kind of funcionality you need, but i did for testing purposes a twitter-clone in 4h30m , with actions, friends, favorites, rss, but without the ajax methods (that would take 2 hours more, or something like that). if it's your first time with cake or a MVC framework, things

Re: Group By when using array conditions

2007-05-10 Thread DJ Spark
that would be a nice improvement, i think. maybe such query would return an array like this: $this-User-findAll($condtitions.' GROUP BY User.name') Array ( 'User.name' = array( 'John' = array( [0] = (the row here) [1] = (the row here) [2] = (the row here) ), 'Carl' =

Re: PDF-Download

2007-05-07 Thread DJ Spark
btw, i'm not sure if it's 'too' php-related, but if do link like that, and the user does have the acrobat plugin, it will just open the pdf in the same window. Is there a way to the browser *always* the user to save it ? thanks spark (thread adapter :) On 5/7/07, Arndtinho [EMAIL

Re: Problems with Cakephp

2007-04-28 Thread DJ Spark
and what was the solution ? that could help someone else later :) spark On 4/27/07, sean [EMAIL PROTECTED] wrote: sovled! thx On Apr 27, 11:04 am, sean [EMAIL PROTECTED] wrote: After I set up cakephp, I got the following error messages when visiting. - Strict

Re: PHP question

2007-04-25 Thread DJ Spark
you probably have already figured it out, but it works like this: - if you do not define a model (or an array of models) to your controller, cakePHP will automagically guess the model name by using the Singular UpperCamelCase form of your controller name. 'tests' - 'Test' . - if you use

Re: Random Error: 500 server error on scaffolded pages

2007-04-23 Thread DJ Spark
i think i got these errors when using a very big array, with recursion, using more than the allowed memory for PHP (8MB by default in the box i use). check it with $this-Model-recursive = -1; in some places where you have a lot of rows... spark On 4/23/07, Dave [EMAIL PROTECTED] wrote: I

Re: mysterious SQL query

2007-04-08 Thread DJ Spark
and most of them are cached when in debug is 0 :) spark On 4/8/07, Chris Hartjes [EMAIL PROTECTED] wrote: It's used by the database models themselves. On 4/8/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: thx for you info but the SELECT COUNT(*) AS count FROM `groups` AS `Group`

Re: Accessing join table attributes.

2007-03-29 Thread DJ Spark
Hi Alexandre, Usually, the best way is setting up an Intermediary model, like in your example, Membership, and change your associations to : User - hasMany - Membership and Group - hasMany - Membership and don' t forget Membership - belongsTo - User Membership - belongsTo - Group

Re: modularity and MVC

2007-03-27 Thread DJ Spark
On 3/26/07, Mariano Iglesias [EMAIL PROTECTED] wrote: Not at all, calling requestAction() from elements/view is perfectly acceptable. Though you could also call it from the controller and set a var for the view to get, but again, I see no issue on the way you are doing it now (as a matter of

modularity and MVC

2007-03-26 Thread DJ Spark
I'd like to know if using requestAction in the view breaks (too much) the MVC concept, or is it a good use? I've been doing due to the 'high' load of a website i'm working. An example: ?php echo $this-renderElement('listas/destaque-principal', array('listas' =

Re: cakephp plugin for eclipse?

2007-03-03 Thread DJ Spark
On 3/3/07, Mariano Iglesias [EMAIL PROTECTED] wrote: I'm wondering what are we expecting from a CakePHP eclipse plugin? Hi Mariano, I've been using BEA Weblogic 9.2 for a few weeks, and it's IDE is also based on eclipse. Man, it's impressive: you control absolutely everything from there.

Re: why use jQuery instead of Prototype

2007-02-08 Thread DJ Spark
Hi sam, AFAIK prototype require more code than jquery and is generally not unobtrusive, I may be wrong about this Prototype maybe or maybe not obstrusive. The same with jquery. Cake's implementation is a little obtrusive, but i heard something about 1.2 being totally different. and now

Re: A problem with findAll and fields

2007-02-04 Thread DJ Spark
I'm no sure if cake's findAll function accepts arrays in the fields variable: Try this, using the format Grant Cox suggested: $this-Gallery-findAll(id = {$id},Gallery.name, Gallery.description, Image.filename); At least in the API , they say 'fields' var must be a string : Spark On

Re: #sql_3e3a_0 for COUNT() queries

2007-02-01 Thread DJ Spark
it seems to happen only on windows machines, probably related to those silly db drivers we are destined to use forever. (see ms_sql 30 characters limitations :) spark On 2/1/07, nate [EMAIL PROTECTED] wrote: It happens when MySQL has to generate a temporary table in order to calculate a

Re: Fatal error: Failed opening required 'cake\bootstrap.php'

2007-01-30 Thread DJ Spark
btw, someone in this list suggested using Vertrigo dev pack, and i gave it a try, since i was stuck with easyphp for a while. Vertrigo is perfect and updated often: http://vertrigo.sourceforge.net/ The only minor downside is you have to copy php extensions from the php pack (download it

Re: ER Tools

2007-01-29 Thread DJ Spark
because that's how cake works. the table is in plural form the model name is in singular form (not much creative today :) spark On 1/28/07, Pje [EMAIL PROTECTED] wrote: Hi, There is a reason to use plural names in your tables? Because, in a logical model, entity names must be in

Re: Ready to upload cakePHp files to my Hostgator account.

2007-01-27 Thread DJ Spark
Let's suppose your host do have a setup like this, when you do an ftp: / your root, you cannot go to parent folder /public_html the docroot folder no you create a 'cakeapps' folder and a 'cake' folder / /public_html /cakeapps /cake now, you copy your whole app

Re: Dreamhost and CakePHP

2007-01-25 Thread DJ Spark
I have a few test websites running on dreamhost, and none had any problem. They worked with de default installation, and with the advanced , with app path outside the doc root... spark On 1/24/07, lance [EMAIL PROTECTED] wrote: On Jan 24, 5:51 pm, Mark [EMAIL PROTECTED] wrote: Anyone else

Re: var $scaffold works, baked methods not... why?

2007-01-17 Thread DJ Spark
Hi Norman, I cannot test it now, but it may be related to the plural form of 'cliente'. Cake has only english rules, and if you are writing in portuguese, you know there are no rules :] to avoid that, try to write it in the inflections.php , in the irregular plurals array. If the problem

Re: language subdomain

2007-01-11 Thread DJ Spark
btw, wikipedia uses different installs for each subdomain :) i *think* you could set different subdomains pointing to different cake 'webroot' folders, and setting some variable there. Or reading the current domain in bootstap, and setting that language variable... spark On 1/11/07,

limit() function for mssql

2007-01-09 Thread DJ Spark
Does somebody knows how to use that limit() function to MSSQL , or if it should already work in cake1.1.12 ? Any findAll() with Limit is not executed, because it includes the string LIMIT , not the TOP statement. I checked the adodb code, and it seems to be implemented (with that goofyLimit =

Re: I Just Installed Cake and then . . .

2007-01-06 Thread DJ Spark
It's pretty clear on the blog tutorial: the action for the controller. Like: In General ?php echo $html-formTag('/controller/action/' . $html-tagValue('Model/id')? In Blog Example: ?php echo $html-formTag('/posts/edit/' . $html-tagValue('Post/id')? And the action in the controller: function

Re: ER Tools

2007-01-06 Thread DJ Spark
For those tring DBDesigner, it took me a few hours to understand when the program creates FK in the table (as shown in Larry's images), and why it *deletes* that field when I delete the association :) It assumes the key is there only because of the association, even it was already there. Not

Re: File upload with AJAX

2007-01-03 Thread DJ Spark
Felix, show us you jNinja skills by doing that in an one-liner ;} happy with jQuery spark On 1/3/07, Felix Geisendörfer [EMAIL PROTECTED] wrote: Hey, I'm currently doing a little series on JavaScript programming on my blog and I think this would be an excellent tutorial for one of my

Re: $html-charset() fails on IE 7

2006-12-06 Thread DJ Spark
anyway, it seems a good thing opening a ticket *and* tell others developers to be careful on that matter, right ? not everyone will subscribe to cake trac's rss , i guess :) spark On 12/6/06, Mariano Iglesias [EMAIL PROTECTED] wrote: I guess if we could just edit the message submitting

Re: bake.php errors

2006-12-01 Thread DJ Spark
i got it working by setting the whole app path (on a standard install): D:\webroot\mf\_final\cake\scriptsphp bake.php -app D:\webroot\mf\_final\app spark On 12/1/06, gwoo [EMAIL PROTECTED] wrote: how about you try to debug the problem and submit a patch. Before you do that make sure you

Re: General condition to all my finds

2006-12-01 Thread DJ Spark
i think you could make it into the model (although it's done in every model), using 'conditions' in the association array... var $belongsTo = array('User' = array('className' = 'User', 'conditions' = '',

Re: Session problem

2006-12-01 Thread DJ Spark
Hi Felix, I always do some confusion when using php in windows: there are a lot of places where php.ini could be, and sometimes if you copied it to a place (c:\windows , for example), nothing you change in other places will work. to use the php in CLI, there must be a php.ini in php folder ,

Re: Reporting Bugs

2006-11-28 Thread DJ Spark
On 11/28/06, Larry E. Masters aka PhpNut [EMAIL PROTECTED] wrote: Version From VERSION.txt: There is a input area for supplying the version number of CakePHP, this is located in version.txt in the root directory, I update this version number on every merge to the trunk, and it is used as the

Re: count(*) in custom query

2006-10-10 Thread DJ Spark
i'll try changing that , and see if the problem disappears. thanks , nate (again :) spark On 10/10/06, nate [EMAIL PROTECTED] wrote: It has to do with your database configuration (possibly the encoding of the table?). Someone who knows more on the subject should weigh in here, but the

Re: count(*) in custom query

2006-10-08 Thread DJ Spark
I had the same problem here. how is your configuration ? mine is: - winXP - mysql 5 - php 5 - apache 1.3 spark On 10/8/06, Kevin Uni [EMAIL PROTECTED] wrote: Hi all, I am using cake to do a custom query just like select count(*) as num .. from tab1 left join tab2 on tab1.id = tab2.tid

Re: Layout Logic

2006-10-05 Thread DJ Spark
hi marcos, did you read the manual or something ? What you area asking is all answered there. I strongly suggest you follow these sections in the manual: http://manual.cakephp.org/chapter/models http://manual.cakephp.org/chapter/controllers http://manual.cakephp.org/chapter/views They

Re: ajax remoteFunction not calling javascript

2006-10-05 Thread DJ Spark
it is necessary to name the ids for the elements in this form , so prototype can use serialize() : ul li id=someid_1/li li id=someid_2/li li id=someid_3/li /ul http://wiki.script.aculo.us/scriptaculous/show/Sortable.serialize I'm not sure why, but onComplete only works with ids in that format

ordering in associations

2006-09-28 Thread DJ Spark
I have a Movie and a Director models, both with HABTM associations. The movie is ranked in my site and have a Movie.position field. I could not find a way to show , let's say, the 30 first directors (DISTINCT) ordered by the Movie.position. Any ideas ? custom SQL calls only ? thanks spark

Re: query and group by

2006-09-19 Thread DJ Spark
hya, Funny thing, i'm having the same problem now :) Which PHP/MYSQL/APACHE version are you using ? spark On 9/5/06, Ámon Tamás [EMAIL PROTECTED] wrote: Hello, I try the next query: SELECT workers.nev, worker_id, item_id, sum(pays.amount) as amount FROM pays, workers

Re: query and group by

2006-09-19 Thread DJ Spark
and if you are using windows/*nix spark On 9/19/06, DJ Spark [EMAIL PROTECTED] wrote: hya, Funny thing, i'm having the same problem now :) Which PHP/MYSQL/APACHE version are you using ? spark On 9/5/06, Ámon Tamás [EMAIL PROTECTED] wrote: Hello, I try the next query

Re: Login renders blank page!

2006-09-18 Thread DJ Spark
I had the same problem here, with BOM bytes added to some files. Just to keep people aware, it ate my doctype declaration, thus, changing the way browsers interpreted the page, changing font sizes and all, paddings, etc. really weird. I had to open every file, since I didn't knew wich ones

Re: Problem with HABTM tables

2006-08-29 Thread DJ Spark
yep, you have to, that's how cakephp sets relationships between models in the User model you say something like ?php class User extends AppModel { var $name = 'User'; var $belongsTo = 'Group'; } ? and in the Group model ?php class Group extends AppModel { var $name =

Re: Optimising cake

2006-08-29 Thread DJ Spark
Hi sonic, In debug mode 0 , cakephp caches models for a few seconds (20 sec) . In production mode, it's much longer (a day ? i'm not sure). Besides that, this thread goes deeper on optimization issues:

Re: View subdirectories names ... problem

2006-08-21 Thread DJ Spark
the problem seems to be you are using some helpers , and you didn't include the HTML helper, which contains the function $html-link() just add the html helper to your controller. tell us if it works :) spark! On 8/21/06, purepear [EMAIL PROTECTED] wrote: Hi, my problem: I have a

Re: Join Table in Conditions of a findAll

2006-08-21 Thread DJ Spark
from the cakephp manual, quoted below, you can see how adding a few parameters to the findAll function you can limit the number of rows retrieved: example: $this-User-findAll('',null, '', 20, 2); this gets the second page of results, containing 20 items each. If you use a variable $page, for

Re: need to use find() on complex relationship

2006-08-15 Thread DJ Spark
i *think* if you set the id of a MOdel, you can findAll the related Models $this-Client-id = 3; $this-Client-Project-findAll(); anyway, if you get the client using read() , find() or findAll() , you get an array with all the associated data. try this in your controller: $client =

Re: Problem witch model !

2006-08-15 Thread DJ Spark
is there a list of reserved words ? if not , i suggest making one to the 'naming conventions' area in the manual. going to add it in trac system spark On 8/14/06, nate [EMAIL PROTECTED] wrote: You can't have a model named File. It conflicts with Cake's internally File class. Bad idea,

Re: CakePHP layouts

2006-08-08 Thread DJ Spark
Just to keep more clear to those new to cake: requestAction() is rendered without the compelte layout, but the view is rendered properly. You might use it as an element that handles data. The example in the manual is quite nice: http://manual.cakephp.org/chapter/7 Spark On 8/8/06, John

Re: lot's of add lately

2006-08-02 Thread DJ Spark
must say to the newcommers it never happened with this frequency before. usually , it's only one or two per week :) spark On 8/2/06, francky06l [EMAIL PROTECTED] wrote: Thanks to the modos. Actually is also a good sign of the vitality of a group ;) Thanks -- [web]

Re: One model one controller? What about different URLS

2006-07-30 Thread DJ Spark
but you can pass parameters in request action: $somevar = $this-Modelname-requestAction('/listings/show/4', array('return')); or in the view ?php echo $this-controller-requestAction('/listings/show/4', array('return')); ? spark On 7/30/06, darx [EMAIL PROTECTED] wrote: Fine. I'll

  1   2   >