Re: Bug with findAllThreaded

2008-04-17 Thread Adam Royle
It was closed because there was no reproducable test case attached to the ticket. On Apr 18, 12:59 pm, "Renan Gonçalves" <[EMAIL PROTECTED]> wrote: > Hello, > > I was trying the method findAllThreaded and I have found a bug! > I have been tested this in Cake 1.2, but problaly the bug is on 1.1 to

Re: testing in cakephp 1.2-Bug-Class 'Usel' Not found

2008-04-17 Thread Amit Badkas
On Fri, Apr 18, 2008 at 10:54 AM, bhushan A <[EMAIL PROTECTED]> wrote: > > I have followed the steps given in "http://bakery.cakephp.org/ > articles/view/testing-models-with-cakephp-1-2-test-suite" > link. But > s

Re: Question about Model::save() and its beforeSave and afterSave callbacks

2008-04-17 Thread Joshua McFarren
Hi Aran, Thanks for the advice. Unfortunately I tried that and it doesn't make a difference. The syntax i tried is: $this->ProjectTasks->create(); $this->ProjectTasks->save($task); In either case the save method does update the row in the DB but the callbacks don't happen. Any other ideas? -

testing in cakephp 1.2-Bug-Class 'Usel' Not found

2008-04-17 Thread bhushan A
I have followed the steps given in "http://bakery.cakephp.org/ articles/view/testing-models-with-cakephp-1-2-test-suite" link. But still I am gettng 'Fatal error: Class 'User' not found in /tests/cases/ models/user.test.php' I am putting my user.test.php's code here. Please let me know what i am

Re: need advice => try to develop alternative flex client

2008-04-17 Thread kiang
We are using amfphp directly with CakePHP application (1.2). Only share some settings and the database. My experiences: CakeSWXPHP works well if I disable PECL/APC settings. http://blog.aboutme.be/cakeswxphp/ CakeAMFPHP need some modification to work under CakePHP 1.2. But the project is a lega

Re: OT: What code editors do you all use?

2008-04-17 Thread [EMAIL PROTECTED]
I've been using jEdit (linux and OSX) for a few years now. It works very well for me. Incidentally, to enable proper syntax highlighting for .ctp files, copy the php.xml file in the modes subdirectory of the jEdit install dir to a new file named ctp.xml. You can change: wrote: > Aptana rocks! B

Bug with findAllThreaded

2008-04-17 Thread Renan Gonçalves
Hello, I was trying the method findAllThreaded and I have found a bug! I have been tested this in Cake 1.2, but problaly the bug is on 1.1 too. There is a table called sections (model Section) with id, parent_id, created, modified and name. When I try to sort this data with $sections = $this->Sec

[SOLVED] Does Acl->deny() work in Cake 1.1.19.6305?

2008-04-17 Thread Langdon Stevenson
In case anyone else has this problem in the future I thought it worth mentioning my solution. The answer to this question is: yes it does work. However, the database ACL tables were created with the script provided with Cake in an older version of Cake. That version set the field types for _

Re: Leadership issues....

2008-04-17 Thread b logica
On Thu, Apr 17, 2008 at 1:03 PM, R. Rajesh Jeba Anbiah <[EMAIL PROTECTED]> wrote: > > On Apr 16, 10:21 pm, "b logica" <[EMAIL PROTECTED]> wrote: > > Gonzalo: I'm not suggesting that anyone *wants* CakePHP to collapse. > > This public argument amongst the core devs doesn't bode well for the > >

Re: Can I limit access to the "captcha" action in my controller?

2008-04-17 Thread ReiToei
Thanks Aran and Ketan, I ended up going for Ketan's solution, using the referer method. Works exactly how I wanted it to. You guys rock :) -Rei On Apr 17, 5:13 am, k10 <[EMAIL PROTECTED]> wrote: > You can check the HTTP_REFERER from the _SERVER array against the url > of your view as provided i

Re: Using HtmlHelper in custom helper?

2008-04-17 Thread Joshua McFarren
Hm... this is what worked for me. Maybe its a bad, brute force, way to do it though: App::import('Helper', 'Time'); class DateHelper extends TimeHelper { ... } Best, Joshua On Apr 17, 4:38 pm, smacks <[EMAIL PROTECTED]> wrote: > LOL thanks for your comment Fred! > > But actually I did tha

Re: Twitter Component

2008-04-17 Thread DragonI
Unfortunately upgrading to 6679 didn't work for me. I get the same error ;( BUT Siegfried's suggestion did work uses('xml'); App::import('Core', array('HttpSocket')); On Apr 17, 2:16 pm, strangy <[EMAIL PROTECTED]> wrote: > I'm glad you manage to get it working. > I've updated my cake

Question about Model::save() and its beforeSave and afterSave callbacks

2008-04-17 Thread Joshua McFarren
Hi, Is there a case where Model::save() doesn't initiate the beforeSave and afterSave callbacks for that Model? Maybe this doesn't work from another afterSave callback? Are these callbacks only initiated when Model::save() is accessed from a Controller not another Model? I have a Schedule Model

Re: weird file upload issue (swfupload + cake 1.2)

2008-04-17 Thread johnny1am
Finally got it to work, like in your tutorial, i still dont understand why it was crashing my browser first time though, but now it works allright, the crashing must have been some issue with my pc i think. --~--~-~--~~~---~--~~ You received this message because y

PUT and DELETE methods in a RESTful context, after IRC chat with Nate Abele

2008-04-17 Thread Gustavo Carreno
Hey Nate, Recently I've been trying to do a Win32 Delphi integration with a CakePHP site that I'm building. I thought that REST would be the best way to go so I began to code some XML responses on SchemaController. But I only got so far as the GET method for retrieving Info. I now need to impleme

need advice => try to develop alternative flex client

2008-04-17 Thread bingo
hi all, I have an existing website (http://findnwrite.com/memento) running on CakePHP. Now, I am planning to develop a Flex client, but I don't want to disturb my existing website. I have gone through some of the tutorials on CakePHP + AMPHP + Flex, but not really understanding on how to get fle

Re: can i use a component under a helper?

2008-04-17 Thread Joel Perras
> if you do > > $this->set('component', $this->Component); you should be able to > access the component functions via $component-> in your views. > > I think. There are so many bad habits rolled into that one line of code, I don't know where to begin. --~--~-~--~~~--

Re: Using HtmlHelper in custom helper?

2008-04-17 Thread smacks
LOL thanks for your comment Fred! But actually I did that. This is from my app_controller: var $helpers = array('Html', 'Javascript', 'Form', 'Menu', 'Footer'); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake P

Re: Custom SQL call problem

2008-04-17 Thread [EMAIL PROTECTED]
is it returning something that cake should be able to understand? try debugging out the data in your *sql_dbo file before it gets put into an array like i said, i've never touched stored procedures, so i could be way off On Apr 17, 4:11 pm, "Erico Franco" <[EMAIL PROTECTED]> wrote: > 2008/4/17,

Re: CakePHP IDE

2008-04-17 Thread [EMAIL PROTECTED]
NuSphere (PhpED) just published this: http://www.nusphere.com/php/cakephp.htm This is a How To for using NuSphere PHP IDE (http://www.nusphere.com/ products/phped.htm) with Cake On Apr 14, 10:06 am, BrendonKoz <[EMAIL PROTECTED]> wrote: > There are two competitors that I am aware of: e-TextEditor

Re: Custom SQL call problem

2008-04-17 Thread Erico Franco
2008/4/17, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > > i know zilch about stored procedures, but this doesn't really seem to > be a cake problem I think that it is a cake problem. what happens if you run that query outside of cake - on a regular php > page or in an sql manager > > It works on b

Re: 3 table HABTM OR don't use a primary key

2008-04-17 Thread [EMAIL PROTECTED]
I'd prefer to not have to write any of the sql by hand (the main point of using cake for this was to be able to respond quickly to database structure changes without too much code updating), but yeah I may have to. I might end up extending the app model into another model type and overriding the

Re: Custom SQL call problem

2008-04-17 Thread [EMAIL PROTECTED]
i know zilch about stored procedures, but this doesn't really seem to be a cake problem what happens if you run that query outside of cake - on a regular php page or in an sql manager On Apr 17, 2:08 pm, Defranco <[EMAIL PROTECTED]> wrote: > no ideas? --~--~-~--~~~---

Re: Using HtmlHelper in custom helper?

2008-04-17 Thread Fred Hirsch
I have an several helpers that do what you're doing below (one is for pagination). However, I am also using 1.1. The manual does it the same way (I think this also covers 1.2). One thing to note, while you do need to use the $helpers array in the subclass to utilize the helper internally, you

Re: 3 table HABTM OR don't use a primary key

2008-04-17 Thread Fred Hirsch
Hello, In my experience, I would personally want to manage those relationships myself. This would include both extraction and saving data. There are two reasons for this: 1) The queries you'll want to use will likely need to be tuned to specific use. 2) While Cake might handle the extraction

Re: Session problem

2008-04-17 Thread Ramiro Araujo
I still have not succeded in this... The strange thing is that im using the Auth component, and im pretty sure It uses sessions. What I dont know if it uses them with $_SESSION or with the session component, but I would bet for the second. Quite strange.. I'll try in other cake instalations aroun

link

2008-04-17 Thread smacks
just noticed that my stripped down link-function doesn't have a target. but that's not the problem. at least not for the problem, that i just can't include the html-helper. help?!? :( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Using HtmlHelper in custom helper?

2008-04-17 Thread smacks
Hi guys, I've got a weird problem with including the HtmlHelper in a custom helper. Well, maybe I just can't see what I did wrong, but ... This is my custom helper: class MenuHelper extends Helper { var $helpers = array('Html'); function createMenuList($data,$check) {

Re: Twitter Component

2008-04-17 Thread strangy
I'm glad you manage to get it working. I've updated my cake installation to the latest revision (6679). I use this repository https://svn.cakephp.org/repo/branches/1.2.x.x. Then I tried my twitter component and it worked without any code modifications. I really don't know why it is not working fo

Re: Custom SQL call problem

2008-04-17 Thread Defranco
no 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 optio

3 table HABTM OR don't use a primary key

2008-04-17 Thread [EMAIL PROTECTED]
I have a couple tables in a database I'm building a management tool for that are essentially HABTM (hasAndBelongsToMany) relationships, but with 3 foreign keys, and a couple of these tables carry extra data along as well. A quick note before hand - I did not create the database structure, and I c

Re: can i use a component under a helper?

2008-04-17 Thread [EMAIL PROTECTED]
if you do $this->set('component', $this->Component); you should be able to access the component functions via $component-> in your views. I think. On Apr 16, 2:05 pm, miuuzn <[EMAIL PROTECTED]> wrote: > Hi, i've been trying to make some reusable stuff to deal with dates > > i've developed a com

Re: can i use a component under a helper?

2008-04-17 Thread R. Rajesh Jeba Anbiah
On Apr 17, 5:41 pm, grigri <[EMAIL PROTECTED]> wrote: > It might seem like overkill, but one way of handling this might be: > > //- > > /app/vendors/something.php > > class Something extends Object { > function doSomethingCool($input) { > return $output; > } > > } >

Re: Exporting the index.thtml view to csv

2008-04-17 Thread R. Rajesh Jeba Anbiah
On Apr 17, 10:25 am, Adam Royle <[EMAIL PROTECTED]> wrote: > Excel does read tabular html (including basic styles). You just need > to set the correct content type. > > header("Content-disposition:attachment;filename=myexport.xls"); > header("Content-type:application/vnd.ms-excel"); > > Alternativ

Re: CakeAMF on a shared host?

2008-04-17 Thread R. Rajesh Jeba Anbiah
On Apr 17, 8:03 pm, Ramiro Araujo <[EMAIL PROTECTED]> wrote: > Im using CakeSWXPHP for my flash projects (I would use CakeAMF, but my > clients all have shared hostings :( and dont have de amf php > extension). > > BUT, im using cakeswxphp with the amf connection; its like using > amfphp. You have

Re: Leadership issues....

2008-04-17 Thread R. Rajesh Jeba Anbiah
On Apr 16, 10:21 pm, "b logica" <[EMAIL PROTECTED]> wrote: > Gonzalo: I'm not suggesting that anyone *wants* CakePHP to collapse. > This public argument amongst the core devs doesn't bode well for the > health of the project, regardless of what anyone--including > them--wants. FWIW, public dis

Re: Twitter Component

2008-04-17 Thread Siegfried Hirsch
2008/4/17, Siegfried Hirsch <[EMAIL PROTECTED]>: > I have tried the new version and I still get also the > error: Class 'AppHelper' not found I was able to get around the errors by doing the following at the start of the file uses('xml'); App::import('Core', array('HttpSocket')); works

Re: Need tips on keeping Test, Dev, Production In Sync

2008-04-17 Thread mmayes
Funny! I just got done watching that - I'll post any ?'s on the entry comment form. Cheers. On Apr 17, 9:41 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Thu, Apr 17, 2008 at 10:35 AM, mmayes <[EMAIL PROTECTED]> wrote: > > > Any tips/best practices for working with this type of configurat

Re: (n00b) Issue setting layout

2008-04-17 Thread Reggie Mason
Or without modifying pages_controller.php In /app/views/pages/one.ctp (for CakePHP1.2) layout='eggs'; ?> This page uses the eggs layout And, in /app/view/pages/about.ctp layout='bacon'; ?> This page uses the bacon layout On Apr 17, 7:59 am, grigri <[EMAIL PROTECTED]> wrote: > If you really n

Re: OT?: How to use Poedit with the "__d()" translation function?

2008-04-17 Thread snowdog
Use "cake i18n" command (similar to "cake bake") to extract all terms and create .pot file, then you can use it in normal way (update your .po from .pot) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" grou

Re: cakePHP or not?

2008-04-17 Thread aranworld
These are typical CakePHP urls: http://www.domain.com/articles/view/354 http://www.domain.com/staff_bios/ http://www.domain.com/pages/about_us/ http://www.domain.com/news/index Look for the pattern of a plural word followed by either "index" or "view". At least if they are clean URLs like this,

Re: cakePHP or not?

2008-04-17 Thread jonknee
On Apr 17, 10:25 am, foongoos <[EMAIL PROTECTED]> wrote: > I have a free lance developer that wants to do a job for me and he > sounds very promising. The project is based on cake but I am afraid > that I will not be able to tell the difference if he used another > frameowork, maybe CMS or even bo

Re: Problem on serializing Ajax data with Cake

2008-04-17 Thread Pierre MARCOURT
I have the answer of my question thanks to : http://www.zenofshen.com/2008/01/08/scriptaculous-ajax-sortable-lists-tutorial/ The id of the elements have to be in the form /string_identifier/, where /identifier/ is a unique number, for Sortable.serialize to work. By calling the id of my list like

Re: (n00b) Issue setting layout

2008-04-17 Thread aranworld
"I think(?) that the solution you are describing would require me to make both a model and a controller for each static page." This controller doesn't require any Models: class BoilerplatesController extends AppController { var $uses = array(); // setting it as a blank array means no models

Re: cakePHP or not?

2008-04-17 Thread Dr. Tarique Sani
If you really don't know the difference then why bother? Focus on getting a solution... Or hire a project manager who you can trust! Wait a min!! Is it that you are the project manager :o) Yes looking at the source code of the rendered page can give enough clues Cheers Tarique On Thu, Apr 17,

RE: cakePHP or not?

2008-04-17 Thread Mariano Iglesias
Well you could look at the generated HTML source of some page that includes a form and look for the data[Model][field] format in the input names. -MI --- CakeFest: December, 2008 - Buenos Aires, Argentina - http://es.cakefe

cakePHP or not?

2008-04-17 Thread foongoos
I have a free lance developer that wants to do a job for me and he sounds very promising. The project is based on cake but I am afraid that I will not be able to tell the difference if he used another frameowork, maybe CMS or even bought a script. What are the sure signs that indicate that asite w

Re: CakeAMF on a shared host?

2008-04-17 Thread Ramiro Araujo
Im using CakeSWXPHP for my flash projects (I would use CakeAMF, but my clients all have shared hostings :( and dont have de amf php extension). BUT, im using cakeswxphp with the amf connection; its like using amfphp. You have the option of using swx, amf o json. Take a look, Im sure it'll fit you

Problem on serializing Ajax data with Cake

2008-04-17 Thread Pierre MARCOURT
Hi, I am using the $ajax->sortable function to change the order of a list (3 items). Then I want to save the order in a database but I have a problem. When I use Sortable.serialize to send the data to my controller, my array is empty... Here is the code I use in my view : sortable("sort

Re: Unexpected behavior of Model::getLastInsertId(); Bug or misunderstanding?

2008-04-17 Thread Joshua McFarren
Hi Tarique, So if I understand correctly, Model::getLastInsertID should do the same thing as SELECT LAST_INSERT_ID(); which only returns an ID if you inserted a row into a table that has auto_increment? http://dev.mysql.com/doc/refman/5.0/en/getting-unique-id.html Best, Joshua > P.S. looks lik

Re: Test Suite v1.2: $useDbConfig problem in model association.

2008-04-17 Thread Defranco
Should I report the fact that $model->setDataSource($dbConfig) do not affect related models as a bug or as an enhancement? Actually, if I set $model->setDataSource('test_suite'); Related model like $model->Model2 will still have $dbConfig='default' not $dbConfig='test_suite' as the main model

Re: Twitter Component

2008-04-17 Thread Siegfried Hirsch
I have tried the new version and I still get also the error: Class 'AppHelper' not found The problem is, that cake tries to load the xml.php in the view/helper but should instead load the xml.php from the /cake/libs directory. I am not sure, how I can tell cake to load this specific file. BTW,

Re: newbie how to update a row with 2 primary keys

2008-04-17 Thread Baz
But wait... isn't food_categories with only 2 columns a HABTM table? Am I missing something here? --~--~-~--~~~---~--~~ 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@goog

Re: Need tips on keeping Test, Dev, Production In Sync

2008-04-17 Thread Chris Hartjes
On Thu, Apr 17, 2008 at 10:35 AM, mmayes <[EMAIL PROTECTED]> wrote: > > Any tips/best practices for working with this type of configuration > would be great, or if there's a better way to do it. For example, when > rolling out/developing new features, do you use svn, cvs, git, plain > old ftp,

Need tips on keeping Test, Dev, Production In Sync

2008-04-17 Thread mmayes
Hi all, I was wondering if anybody could provide tips on keeping various environments in sync? For example: I plan on having a local development environment on my computer, say www.domain.dev Then I plan on having a testing domain on the live server, like test.domain.com Then the production doma

Re: Twitter Component

2008-04-17 Thread DragonI
Thanks strangy, I'll try the new version On Apr 17, 4:00 am, strangy <[EMAIL PROTECTED]> wrote: > Well, I'm using the 1.2.x.x branch not the nightly. > And maybe I written it wrongly, because English is not my primary > language, but for the basic/Basic stuff I meant to say that I changed > from

Re: Unexpected behavior of Model::getLastInsertId(); Bug or misunderstanding?

2008-04-17 Thread Chris Hartjes
On Thu, Apr 17, 2008 at 9:41 AM, Joshua McFarren <[EMAIL PROTECTED]> wrote: > > Is this the expected behavior of the method? The API says, "Returns > the ID of the last record this Model inserted." Am I reading this > wrong? Its it only supposed to return the Id of a CREATE not an > UPDATE? I

Re: Unexpected behavior of Model::getLastInsertId(); Bug or misunderstanding?

2008-04-17 Thread Dr. Tarique Sani
On Thu, Apr 17, 2008 at 7:11 PM, Joshua McFarren <[EMAIL PROTECTED]> wrote: > Is this the expected behavior of the method? The API says, "Returns > the ID of the last record this Model inserted." Am I reading this > wrong? Its it only supposed to return the Id of a CREATE not an > UPDATE? It is

OT?: How to use Poedit with the "__d()" translation function?

2008-04-17 Thread Sebastian Veggiani
I'm having problems to use Poedit with the "__d()" function. I've to split the translations in two files. One for the Administration of my project and another for the public pages. The public file will be sent to the client for translation in 2 additional languages. The problem is: As default Po

Unexpected behavior of Model::getLastInsertId(); Bug or misunderstanding?

2008-04-17 Thread Joshua McFarren
Hi Adam, Thanks so much, $this->id definitely gives me the right piece of information. I'm still curious though if I'm using Model::getLastInsertId() wrong, or I've stumbled on a bug in the core. Model::getLastInsertId() returns $this->__insertID correctly but it only has a value if a new record

Re: name the locale directory

2008-04-17 Thread Sebastian Veggiani
Johnson, If you look here: http://api.cakephp.org/1.2/l10n_8php-source.html#l00180 You'll find that the code you are trying to use is set with "-" instead of "_". I think the codes must be used as defined in this array. Here you have some additional info: http://bakery.cakephp.org/articles/view/

speeding up autocomplete

2008-04-17 Thread michaelmcandrew
Hi there, I have a simple autocomplete that i would like to speed up. I could be wrong but i think the delay is intentionally added to the ajax for cosmetic / keeping load off the database reasons. The query only takes 1 millisecond to execulte but i have a .4(?) second delay before the search

Re: delete or update habtm

2008-04-17 Thread [EMAIL PROTECTED]
I never do that directly. What I do is that I update either of the models involved with the association either added or removed. This si an example straight out of a project I am working on. It is for Cake1.2. A quick disclaimer though: It may not at all be the best way and it may not at all be

Re: (n00b) Issue setting layout

2008-04-17 Thread grigri
If you really need to change the layout per-page, then extending the page_controller is the way to go. There's a bakery article on this subject [http://bakery.cakephp.org/articles/view/taking-advantage-of- the-pages-controller] Basically, if you have a page called 'faq' then the pages controller

Re: can i use a component under a helper?

2008-04-17 Thread grigri
It might seem like overkill, but one way of handling this might be: //- /app/vendors/something.php class Something extends Object { function doSomethingCool($input) { return $output; } } /app/controllers/components/something.php App::import('Vendor', 'Something

Re: Problem with autocomplete in IE

2008-04-17 Thread grigri
I don't know if it's relevant, but try adding this javascript to the relevant page: try { document.execCommand("BackgroundImageCache", false, true); } catch(err) {} [put it in an ie cc - nothing else needs it] On Apr 17, 11:12 am, lekshmi <[EMAIL PROTECTED]> wrote: > Hi, > > I'm using cak

name the locale directory

2008-04-17 Thread Johnson
i want to support eng and zh_tw in my website.the locale's directories are app\locale\eng\LC_MESSAGES\default.po app\locale\zh_tw\LC_MESSAGES\default.po then, i use $this->Session->write('Config.language', $language); to control current language. if i want to display english , i set $language='

What code editors do you use?

2008-04-17 Thread Sliv
http://groups.google.com/group/cake-php/search?group=cake-php&q=what+code+editors&qt_g=Search+this+group --~--~-~--~~~---~--~~ 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

Re: can i use a component under a helper?

2008-04-17 Thread dbruensicke
I have seen a lot of components which use serialized data in sessions to interchange data between components and helpers. But that would obviously not work with source-code. I remember a case, where we had a reference to the corresponding view in a helper and i can imagine that you could have a re

Problem with autocomplete in IE

2008-04-17 Thread lekshmi
Hi, I'm using cakephp version 1.1.17.5612. There is a problem with auto complete.I'm using autocomplete helper without using auto complete component. autocomplete is working fine in firefox. But has some problems in IE. While entering something in textbox for autocomplete or while mouse over

Re: zend studio and cakephp - jump to function source

2008-04-17 Thread meixnerit
i did a search but didnt find anything. what IDE do you use? dont you use the jump to function feature in your IDE? for me that feature is very nice specially if i want to learn how this framework works. thx, markus On Apr 17, 1:23 am, Sliv <[EMAIL PROTECTED]> wrote: > Do a search on the group

Re: (n00b) Issue setting layout

2008-04-17 Thread kaffe
Thank you for your time, but is there no easier way? I think(?) that the solution you are describing would require me to make both a model and a controller for each static page. I tried what you describe, but then for each static page I would need an *empty* controller and a an *empty* model (po

Re: (n00b) Issue setting layout

2008-04-17 Thread kaffe
But I think my issue is as follows: Do I really need to make an *empty* model, an *empty* database table and an *empty* controller - just to set the layout of a static page? I have tried to take the cake page_controller and moving it to my app/ controllers/... but still I have this issue that I

Re: Find statement not updating in foreach loop

2008-04-17 Thread calle_swe
thank you, this was causing me problems as well. On Apr 10, 4:35 am, skoggins <[EMAIL PROTECTED]> wrote: > Finally found the answer. Cake caches your queries unless you tell it > not to. > > $this->Account->Note->Document->cacheQueries = false; > > Hope this saves someone else a headache. --~--

Json format

2008-04-17 Thread inma
Into a "Uer" model, I have a field named "cod_serial" defined as varchar(6) into database. I use json to render the view. But when I parse the data to json format (with utf8_encode($javascript->Object($users))) The result is: {"User":{"user_id":1, "name": "", "cod_serial":08}} It seems

Re: single view for multiple controllers

2008-04-17 Thread Sourabh Sharma
Render is very useful if you are using a same view with different controller Thanks & Regards Sourabh Sharma On Apr 17, 11:34 am, damo <[EMAIL PROTECTED]> wrote: > thanks for your replies. I will probably just go with the simple > render option as this seems ridiculously easy to do! What would

Re: Can I limit access to the "captcha" action in my controller?

2008-04-17 Thread k10
You can check the HTTP_REFERER from the _SERVER array against the url of your view as provided in the snippet below or you can strip out the server name from the HTTP_REFERER and compare it against. Feeding direct url of the captcha action will redirect the user to ur main page. $base = 'http://

Re: SIte Homepage loading very slowly

2008-04-17 Thread MonkeyGirl
One other thing to try is doing a pr() on any findAlls you're using, and see if they're recursing further than they need to. I've had pages in projects before that were practically pulling out the whole database before I realised I should specify recursion levels to be the smallest amount absolute

Re: SIte Homepage loading very slowly

2008-04-17 Thread Dan Bair
Another couple things you could do to speed up your site: 1) Minify or pack your javascript files and then combine then into a single file (you could use prototaculous) 2) gzip your CSS and javascript 3) Load your javascript and css files from a subdomain (example: static.tveed.com) I've noticed

Re: Model: how to avoid call of afterFind() in some cases?

2008-04-17 Thread Dardo Sordi Bogado
I wolud go with making a behavior, and enabling/disabling it, but if a simple variable fits your needs the go for it. On Thu, Apr 17, 2008 at 7:41 AM, avairet <[EMAIL PROTECTED]> wrote: > > Hello, > > Some solutions... > > - test a special field (or value) into $results in afterFind(), a > fi

Re: Curious model related bug - server stops responding

2008-04-17 Thread MonkeyGirl
After a *lot* of trial and error, I've finally fixed this! What was happening was this: > App::import('Model', 'Person'); Was, through a long winded bunch of entity-relationship type associations, making CakePHP read in my Categories model. > $this->PersonTemp = new Person(); # This conflicts

Re: zend studio and cakephp - jump to function source

2008-04-17 Thread Dardo Sordi Bogado
Yes, also there is an article in the bakery from Mariano showing how to set up Eclipse. Following it, plus some threads in this group I've made eclipse to autocomplete controllers, helpers, components and models methods. But as Silv says, this has been discussed many times in this group. On Wed,

Re: single view for multiple controllers

2008-04-17 Thread Femi Taiwo
Um. I practically rolled on the floor when  I saw the one-liner that did what you wanted. The method I gave was a case of using shot-gun to kill a fly.(w.r.t the case in view) That method allows you to create reusable elements in cake. Consider for example that you want to have

Re: newbie how to update a row with 2 primary keys

2008-04-17 Thread grigri
CakePHP does not support composite primary keys. This has been discussed at length. Just add an auto-incrementing column to your table and make that the primary key [ change your primary key index to a unique index first ]. > How do I delete a row? I cannot seem to do $this->FoodCategory->del($id

Re: Model: how to avoid call of afterFind() in some cases?

2008-04-17 Thread avairet
Hello, Some solutions... - test a special field (or value) into $results in afterFind(), a field (or value) that is only fetch by your special action's find() - create a custom find() method in your model and call it from your controller's special action (for example: $this->MyModel- >customFind

Re: newbie how to update a row with 2 primary keys

2008-04-17 Thread Adam Royle
Cake requires a single primary key "id". On Apr 17, 6:07 pm, . <[EMAIL PROTECTED]> wrote: > Ok. My table food_categories has 2 columns only: food_id and category_id > > The primary key is food_id and category_id together > > How do I delete a row? I cannot seem to do $this->FoodCategory->del($id)

Re: Starbox with CakePHP.

2008-04-17 Thread orbdex
That was me! what I've done: Linked the JS of the Starbox to the view Then I wrote a own little JavaScript function to open the AJAX request to call the rating function within my Controller-Class. like that: var video_id = info.identity; ajax = new Ajax.Request(main_uri+'/channel/rateVideo/'+v

Re: newbie how to update a row with 2 primary keys

2008-04-17 Thread .
Ok. My table food_categories has 2 columns only: food_id and category_id The primary key is food_id and category_id together How do I delete a row? I cannot seem to do $this->FoodCategory->del($id) On Wed, Apr 16, 2008 at 2:33 PM, Baz <[EMAIL PROTECTED]> wrote: > I don't follow. > > This table

Re: Twitter Component

2008-04-17 Thread strangy
Well, I'm using the 1.2.x.x branch not the nightly. And maybe I written it wrongly, because English is not my primary language, but for the basic/Basic stuff I meant to say that I changed from basic to Basic. If you don't have git you can just copy it from here http://gitorious.org/projects/cakep

Re: Model: how to avoid call of afterFind() in some cases?

2008-04-17 Thread orbdex
again: forgot the version: cake 1.2 latest beta --~--~-~--~~~---~--~~ 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 ema

Model: how to avoid call of afterFind() in some cases?

2008-04-17 Thread orbdex
Hey there, we're using the afterFind()-Method in one of our models. Works fine. But there is one admin action where we do not want to call this method. Which would be the best practise to do that? Setting a variable of the model within the controller's action? Thanx for all replies --~--~---

Does Acl->deny() work in Cake 1.1.19.6305?

2008-04-17 Thread Langdon Stevenson
I have been trying to use the Acl->deny() function (with database stored ACL) to remove a user's access to certain actions in my application. However deny() appears to "allow" rather than "deny" access. After about an hour of fiddling and reviewing log output I manually changed all permissions