Re: Dynamically Create a Model and Bind it to a Table?

2007-05-31 Thread MrTufty
>From everything I've picked up and learned over the years I've been developing, the sort of solution you're suggesting is a definite OMG what the hell are you doing? situation. If you're having to deal with items that may have different information specified, why not do something a little differ

Re: how to use parseExtensions

2007-05-31 Thread R. Rajesh Jeba Anbiah
On May 31, 9:45 pm, nate <[EMAIL PROTECTED]> wrote: > Well I'm really sorry that you're so intent on breaking the model that > HTTP was designed for. Go read up on REST, learn about the > significance of URLs, custom HTTP headers, client implementations, and > the relative importance of your opin

Is active state main navigation inside sub-sections possible with renderElement and requestAction?

2007-05-31 Thread Joshua McFarren
I've created an element for my site masthead that includes the main navigation as an unordered list following gwoo's advice in this thread: http://groups.google.com/group/cake-php/browse_thread/thread/fd6a65dc007f33ec This works great but I am stumped at how to show active state when browsing a

Re: ajax tutorial problems

2007-05-31 Thread Geoff Ford
Actually that should have been $helpers = array('Javascript') not $components On Jun 1, 1:22 pm, rtanz <[EMAIL PROTECTED]> wrote: > Hi i am trying to complete the ajax todo list tutorial > athttp://grahambird.co.uk/cake/tutorials/ajax.php > > However i am getting this error after editing the def

Re: ajax tutorial problems

2007-05-31 Thread Joshua McFarren
Make sure you define the helpers you need in the controllers that use that layout. ie: class FoobarsController extends AppController { var $name = 'Foobars'; var $helpers = array('Html', 'Form' , 'Ajax', 'Javascript'); --~--~-~--~~~---~--~~ You

Re: ajax tutorial problems

2007-05-31 Thread Geoff Ford
Try adding $components = array('Javascript'); To your controller. Also you should not bediting the default layout in the cake folder. Copy it to the app/views/layout folder and edit from there On Jun 1, 1:22 pm, rtanz <[EMAIL PROTECTED]> wrote: > Hi i am trying to complete the ajax todo list t

Re: i18n translation in db tables - how to do this like Symfony?

2007-05-31 Thread jcsiegrist
The new translation behavior of cake 1.2 will handle the translation in the db. To use init the I18n db tables from the sql at /app/config/sql/ i18n.sql (should be there in a freshly baked 1.2 app). In your model do something like: var $actsAs = array('Translate' => array( 'title'=>

Re: Table comumn widths

2007-05-31 Thread sean
No way, I am afraid. On 5月26日, 下午11时17分, merlin <[EMAIL PROTECTED]> wrote: > Hi all > > If I build a table using HtmlHelper::tableHeadersand > HtmlHelper::tableCells - how do I control the width of each column? --~--~-~--~~~---~--~~ You received this message beca

Re: Strange DB problem - savefield fails when field name changes

2007-05-31 Thread C. Ashcraft
Thanks! Fixed it. On May 31, 2:57 am, Grant Cox <[EMAIL PROTECTED]> wrote: > Are you running with DEBUG 0 in your app/config/core.php? If so, then > once a table structure is cached it is not re-read for a long time. > So, either delete the files in app/tmp/cache, or just set your DEBUG > to 1 o

ajax tutorial problems

2007-05-31 Thread rtanz
Hi i am trying to complete the ajax todo list tutorial at http://grahambird.co.uk/cake/tutorials/ajax.php However i am getting this error after editing the default.thtml file in layouts folder: Notice: Undefined variable: javascript in W:\www\cake\cake\libs\view \templates\layouts\default.thtml

Re: redirection problem - ibm tutorial

2007-05-31 Thread rtanz
yeah i have that cant understand why this is happenning, i have the following : data)) { if ($this->User->validates($this->data)) { $this->User->save($this-data); $this-

Re: selectTag

2007-05-31 Thread metasan
hi, 1. i think this error is due to this line : selectTag('status_id', $status, null, array(), null, false, false); ?> try to replace fieldname with "Modelname/fieldname". 2. do you want to select delivered as a default value ? On Jun 1, 10:32 am, pete <[EMAIL PROTECTED]> wrote: > hi, > im t

Re: selectTag

2007-05-31 Thread metasan
hi, for this line : selectTag('status_id', $status, null, array(), null, false, false); ?> try to use 'Modelname/fieldname' the notice should be removed. ^^ metasan On Jun 1, 10:32 am, pete <[EMAIL PROTECTED]> wrote: > hi, > im trying to add the selectTag. the select field shows up but i ge

selectTag

2007-05-31 Thread pete
hi, im trying to add the selectTag. the select field shows up but i get the following warning: Notice: Undefined offset: 1 in C:\Apache\xampp\htdocs\cake\cake\libs \view\helpers\html.php on line 950 selectTag('status_id', $status, null, array(), null, false, false); ?> Declined Deleted Delive

Re: 404 while working on IBM tutorial...

2007-05-31 Thread J Wynia
There is an assumption in the IBM tutorial that I don't see explicitly stated anywhere in the document, but is made nonetheless. The tutorial assumes that the application you're building with the tutorial sits at the root of your site. That's unfortunate, because, as it's a demo app, it's unlikely

Re: two foreign key in a table

2007-05-31 Thread franciscodg
thank you very much... the problem is solved :) On 31 mayo, 14:36, "Samuel DeVore" <[EMAIL PROTECTED]> wrote: > I think you need to name the two Lanca models differently like > > http://bin.cakephp.org/view/501804416 > > see if that helps > > On 5/31/07, franciscodg <[EMAIL PROTECTED]> wrote: >

Re: i18n translation in db tables - how to do this like Symfony?

2007-05-31 Thread oleonav
Thanks [EMAIL PROTECTED], Your response handles the translation of static 'interface' elements of the application. For example translations of static menu items in multiple languages based on the language setting made the user. I mean something different. What I mean is for example a database wi

Re: Suppressing the label in form->select

2007-05-31 Thread Mirko
FormHelper::select() doesn't issue a label tag, just the select tag. Yes, and not even surrounding , but why??? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to

$form-> create with $useTable (CakePHP 1.2)

2007-05-31 Thread Mirko
In my model i have: var $useTable = 'proizvodi'; // The model can't be pluralized with english But when I do: $form->create('Proizvod', array('action' => 'dodaj')); // Proizvod = Product, dodaj = add The output is: And I want my action to be "/admin/proizvodi/dodaj" Setting $form-

Re: hasMany findAll alternatives

2007-05-31 Thread uolax
Okayhere's what I did. Used AD7six's advise and did a quick unbind from a hasMany and bind a hasOne and did a findAll. This gives me all of the ID's that have the course that was searched for. I then put these ID's in an array and set them as part of the conditions for the next findAll and br

Re: Pretty URL's

2007-05-31 Thread Arndtinho
I ask the server admin at the hosting company - mod_rewrite is enabled. Normaly it should be working without any changes or not? Regards, Arndtinho On 31 Mai, 10:41, "Nicolas Rimbeau" <[EMAIL PROTECTED]> wrote: > I have the same result and it's working. What you want is urls without > any inter

Re: adding extra fields when reading a model

2007-05-31 Thread Hellbot
Hello, quote from http://manual.cakephp.org/chapter/models "afterFind Use this callback to modify results that have been returned from a find operation, or perform any other post-find logic. The parameter for this function is the returned results from the model's find operation, and the return v

Re: Dynamically Create a Model and Bind it to a Table?

2007-05-31 Thread [EMAIL PROTECTED]
That would be an awful lot of tables in your database and it seems like it might lead to some potentially hairy code. Have you considered saving the event information as arrays and then saving the serialized arrays into a single table? I would think it would be a lot easier to extract varying pr

Re: Pagination works, but not well with admin routing

2007-05-31 Thread AD7six
On May 31, 10:50 pm, "John David Anderson (_psychic_)" <[EMAIL PROTECTED]> wrote: > On May 31, 2007, at 2:47 PM, Paolo Gabrielli wrote: > > > > > Seems to me, after several hours, that I've solved adding > > > if ($this->RequestHandler->isAjax()) > >$this->render('admin_index', 'ajax'); > >

Re: $displayField with two items

2007-05-31 Thread Falagar
It doesn't work right away, but something like this does work: In my player model: function afterFind($results) { foreach ($results as $key => $val) { if( isset( $val['Player'] ) ) { $results[$key]['Player']['full_name'] = $val['Player']['first_name']

Re: Pagination works, but not well with admin routing

2007-05-31 Thread John David Anderson (_psychic_)
On May 31, 2007, at 2:47 PM, Paolo Gabrielli wrote: > > Seems to me, after several hours, that I've solved adding > > if ($this->RequestHandler->isAjax()) > $this->render('admin_index', 'ajax'); Wont $this->RequestHandler->setAjax($this) do that? -- John --~--~-~--~~

Re: Pagination works, but not well with admin routing

2007-05-31 Thread Paolo Gabrielli
Seems to me, after several hours, that I've solved adding if ($this->RequestHandler->isAjax()) $this->render('admin_index', 'ajax'); at the end of the admin_index() function in the controller. But it sounds very strange, because it should be RequestHandler's duty to do that. Am I wrong?

Re: Google Gears

2007-05-31 Thread jitka
Supporting Google Gears? Well, there is a lot of interesting JS libraries out there, but my personal opinion is: if something is easy to do with cake, doesn't belong to CakePHP core code. Are you trying to say that - you can not use cake as server-side part of application which uses Google Gears

One Model for Multiple Dynamically Created Tables?

2007-05-31 Thread Wole
I am developing an application that dynamically creates database tables. I know CakePHP is setup in such a way that one model is used for one table, but I am wondering if there is a way around this. Because the tables are created dynamically I will not be able to generate the code for the model ah

Re: Google Gears

2007-05-31 Thread nate
Sounds like a plan. Proofs of concept are always welcome at https://trac.cakephp.org/ On May 31, 4:50 am, Makea <[EMAIL PROTECTED]> wrote: > Okay, had to ask: Any ideas on supporting Google Gears? It would > appear to be simple for Active Record to support the Google Gears > extension of sqllite

Re: session question

2007-05-31 Thread nate
In theory, yes, that should work fine. Fortunately for you, if you already have an existing application in place, you should be pretty easily able to make that determination independently. On May 31, 1:51 pm, christianandradet <[EMAIL PROTECTED]> wrote: > hi, > I have an aplication that depends

EmailComponent inline attachments

2007-05-31 Thread Greg
I am using CakePHP version: 1.2.0.5137alpha When sending emails with EmailComponent, I would like to refer to the background images in my css with "background-image: url(cid:...);", rather than some web-based url. Does anyone know how to do that with EmailComponent? Thanks, Greg --~--~---

Re: two foreign key in a table

2007-05-31 Thread Samuel DeVore
I think you need to name the two Lanca models differently like http://bin.cakephp.org/view/501804416 see if that helps On 5/31/07, franciscodg <[EMAIL PROTECTED]> wrote: > > > hi, my problem is: > > I have in sql: > -- > -- Estructura de tabla para la tabla `historialcuotas` > -- > > CREATE TABL

Re: $displayField with two items

2007-05-31 Thread Samuel DeVore
no On 5/31/07, gentleJuggernaut <[EMAIL PROTECTED]> wrote: > > > When using the Scaffolding and declaring a $displayField in a foreign > model, is there a way to specify two fields (i.e. var $displayField = > 'first_name' . 'last_name';)? > > > > > -- (the old fart) the advice is free, the lack

$displayField with two items

2007-05-31 Thread gentleJuggernaut
When using the Scaffolding and declaring a $displayField in a foreign model, is there a way to specify two fields (i.e. var $displayField = 'first_name' . 'last_name';)? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: Does cake cache plugins

2007-05-31 Thread MattC
Davide, I wrote the RSS Plugin. I didn't give much thought to caching at the time. Another route you could take: The RSS Class that is used has caching built in. You could put something in the controller to use check that cache before doing all the SQL to regenerate the feed. If you figure out

session question

2007-05-31 Thread christianandradet
hi, I have an aplication that depends on a session variable defined in another application, both applications were developed with cakephp. Is there any way to read a session variable that was defined in another application?? --~--~-~--~~~---~--~~ You received this

Re: Using a Component in controller->beforeFilter in 1.2

2007-05-31 Thread Sarek
Ok, thanks On May 30, 11:23 pm, gwoo <[EMAIL PROTECTED]> wrote: > Components help out controllers with common business logic, so first > intialize, then modify in beforeFilter, then startup some automagic. --~--~-~--~~~---~--~~ You received this message because y

Re: hasMany findAll alternatives

2007-05-31 Thread uolax
Oh and I meant bind IN a controllernot to. --~--~-~--~~~---~--~~ 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 em

Dynamically Create a Model and Bind it to a Table?

2007-05-31 Thread Wole
I am developing an events registration Web application that collects event specific information from registrants and stores the information in a database table. The application works by assigning an id to each new event then using this id as the name of the table that will hold registrants' inform

Re: hasMany findAll alternatives

2007-05-31 Thread uolax
Oh and I meant bind IN a controllernot to. --~--~-~--~~~---~--~~ 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 em

Re: how to use parseExtensions

2007-05-31 Thread nate
Try /controller/action.js instead. On May 31, 11:17 am, macfurax <[EMAIL PROTECTED]> wrote: > I try calling model/controler.ajax ( I'm using CakePHP 1.2.x.x) and it > return the same page as without the .ajax ? > Do I have to provide ajax view and layouts ? I see some in the libs/ > view/template

Re: how to use parseExtensions

2007-05-31 Thread nate
Well I'm really sorry that you're so intent on breaking the model that HTTP was designed for. Go read up on REST, learn about the significance of URLs, custom HTTP headers, client implementations, and the relative importance of your opinion (that last one is unrelated to REST). Then come back an

Re: noob: Sorting results from 15min blog tutorial

2007-05-31 Thread loopymonkey
This is fantastic. Thanks! On multiple web hosting environments Cakephp has been the quickest, most compatible install I've found for frameworks. It just plain works. Now it's time to just learn it. ;) On May 29, 4:29 pm, "DJ Spark" <[EMAIL PROTECTED]> wrote: > by changing this: > > fun

Re: hasMany findAll alternatives

2007-05-31 Thread uolax
Oh and I meant bind IN a controllernot to. --~--~-~--~~~---~--~~ 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 em

Re: Issue with Sitepoint Article

2007-05-31 Thread [EMAIL PROTECTED]
This is a shot in the dark, but if you work on a Mac, it may be your problem. I downloaded the Cake folder, unzipped it and uploaded it, but in that process of uploading did not upload all the "." files to the server. It's a pretty easy problem to fix but it escaped me for a while. Check and ma

Re: hasMany findAll alternatives

2007-05-31 Thread uolax
Oh and I meant bind IN a controllernot to. --~--~-~--~~~---~--~~ 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 em

Re: hasMany findAll alternatives

2007-05-31 Thread uolax
Thank you both for your response. I know these aren't the real class names and whatnotjust trying to put my code in the best hypothetical situation. It's not really forest and treesit's courses (forest) and subjects these courses include (trees). A course can have multiple subjects. i.e.

Re: i18n translation in db tables - how to do this like Symfony?

2007-05-31 Thread [EMAIL PROTECTED]
Here are the notes I have collected so far on using i18n in 1.2... Internationalization (i18n) * at top of controller: uses('L10n'); * create /app/locale/eng/LC_MESSAGES/default.po (French is fre/ fra) o http://www.loc.gov/standards/iso639-2/php/code_list.php * create entr

acl behavior

2007-05-31 Thread jan.ptacek
hi, i have this threaded table - branches and i would like to cover the usage of individual branches with 1.2 ACL behavior class Branch extends AppModel { var $actsAs = array('Acl'=>'controlled'); function parentNode() { return $this->findById($this->data['Branch'

del() causing findcount() SQL error

2007-05-31 Thread bilh
I am building an app to track my reading list. I have a Book table (id, title, author) and a Queue table (book_id, position), with a model set up for each table. When I try to remove a book from the queue, using this code in my controller: $this->Queue->del($book_id) the delete fails because th

Re: redirection problem - ibm tutorial

2007-05-31 Thread [EMAIL PROTECTED]
I'm not familiar with the tutorial, however, somewhere in your user_controller.php file should be the action for register. Give the success of the save() function there, you should be able to redirect or even post up a message like this: function register() { //If the data stream from the f

Re: using simplepie as a helper

2007-05-31 Thread sixlaneve
as anyone wrote a helper yet? I have to ask because I am not any good with php On 29 Mag, 21:12, "Tane Piper" <[EMAIL PROTECTED]> wrote: > Ifsimplepieis a Class, you could include it in your vendor > directory, and then write a helper for it: > > Function myfunc() > { > vendor('simplepie

Re: how to use parseExtensions

2007-05-31 Thread macfurax
I try calling model/controler.ajax ( I'm using CakePHP 1.2.x.x) and it return the same page as without the .ajax ? Do I have to provide ajax view and layouts ? I see some in the libs/ view/templates I thougth they will be used ... On 31 mai, 15:50, nate <[EMAIL PROTECTED]> wrote: > Bare/ajax ro

Re: Does cake cache plugins

2007-05-31 Thread Davide
Davide wrote: > ... > Which would be the best way to solve this? However I'm still > investigating. A quick solution to be tested. I've tested a bit but need to be tested more: in cake/libs/views/helpers/cache.php 260 ?>' ;//. $content; 261 $content = preg_replace("/((<\\?)|(\\?>))/",

redirection problem - ibm tutorial

2007-05-31 Thread rtanz
hi i am a new cakephp user trying to follow the ibm tutorial but i have a problem when i try to register a new user at http://localhost/cake/ibm/users/register when i press register i am redirected to http://localhost/users/register and this returns a 404 not found error. it seems to me that tha

Re: Issue with Sitepoint Article

2007-05-31 Thread Merc
I have tried a few more thing and no luck. Has anyone put together a test file for checking configuration issues? On May 25, 2:12 pm, Merc <[EMAIL PROTECTED]> wrote: > Currently, I am running from /b13ed.com/app/webroot/. I used your > suggested .htaccess and no improvement. Any other ideas? > >

Re: Upload a File with CakePHP 1.2.0.5137alpha

2007-05-31 Thread Andrea
I do the following steps: - I create the Behaviuor and I call it upload.php - I insert into the model of the table in the DB the var actsAS - I create a table in the DB with this SQL: CREATE TABLE `images` ( `id` int(11) NOT NULL auto_increment, `building_id` int(11) NOT NULL, `file` varchar

Re: URL conventions - controller name consists of two words

2007-05-31 Thread Joshua Benner
I've always used lowercase-underscore. class ActivityTypesController is accessed at /activity_types Preloader wrote: > Ohh, sorry ... > > 'link' should be plural > > LinksCategoriesController > links_categories_controller.php > > :-), Christoph > > > > > --~--~-~--~~

Re: how to use parseExtensions

2007-05-31 Thread R. Rajesh Jeba Anbiah
On May 31, 6:50 pm, nate <[EMAIL PROTECTED]> wrote: > Bare/ajax routes are deprecated. Not to mention crappy-looking. Use > parseExtensions(). I do not see that is mentioned in source; only the webservice deprecation is mentioned. BTW, it doesn't look crappy; for me the crappy part is ch

Re: Does cake cache plugins

2007-05-31 Thread Davide
I got it! The problems was in the plugin. It force to use no layout and this make no cache. I've added /app/plugins/rss/views/layouts/rss.thtml with this simple code and then in /app/plugins/rss/controllers/rss_controller.php I've substituted line 86 from $this->layout = ''; to $th

Re: Upload a File with CakePHP 1.2.0.5137alpha

2007-05-31 Thread Andrea
In the next time I try what you suggest me :D On 31 Mag, 14:48, dardosordi <[EMAIL PROTECTED]> wrote: > > Can you give some instructions? > > savehttp://bin.cakephp.org/saved/17539as app/models/behaviors/ > upload.php Very good news! I have to upload images and if it's possible to create a thumb

Re: Select list behaviour

2007-05-31 Thread g5Maniac
No, you are not misunderstanding the problem, and thankyou for your response! $this->set('conds',$this->Diagnosis->Condition->generateList(null, null, '{n}.Condition.id','{n}.Condition.condition')); entering that in my controller results in a sql syntax error Query: SELECT `Condition`.`id`, `C

Re: Help: Ajax ( Iframe ) Upload

2007-05-31 Thread 浪漫様
Ok, I already solved the problem (^-^) It was easier that I though... just i couldn't see well the concept before. Thanks anyway, Rohman --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to

Using the session component inside a behaviour

2007-05-31 Thread Guadonpost
Hi, I'm trying to use the session component of cakephp inside a behaviour but this is not loaded by default. That means that I can't do: $this->session->isValid() I was searching for a solution but I didn't found. I suppose that I can pass the session component to the behaviour like a param

Re: Config CORE_PATH error?

2007-05-31 Thread joe
Thanks, I think it may now have something to do with the php.ini and include_path configured in the app/webroot/index.php Other Templates are being included correctly. dump.thtml seems a unique-ish case, referenced in the cake/libs/view/view.php and is referenced via the LIBS define. Anyone?

Re: Understanding validator regex

2007-05-31 Thread Floyd
Thx Davide, I don't think the double slash escapes \ character, so wouldn't be a valid email. The second part, I don't understand the relationship preg_match function with these symbols. I used this function correctly without these some times. --~--~-~--~~~---~--~--

Re: URL conventions - controller name consists of two words

2007-05-31 Thread Preloader
Ohh, sorry ... 'link' should be plural LinksCategoriesController links_categories_controller.php :-), Christoph --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send e

URL conventions - controller name consists of two words

2007-05-31 Thread Preloader
Helly bakers, I hope this is not a strange/stupid question, but (i think) i didn't find the answer in the cake manual ("conventions"). I have a controller for link categories. Classname: LinkCategoriesController Filename: link_categories_controller.php But what's the controller name? linkCateg

Re: how to use parseExtensions

2007-05-31 Thread nate
Bare/ajax routes are deprecated. Not to mention crappy-looking. Use parseExtensions(). On May 31, 6:42 am, "R. Rajesh Jeba Anbiah" <[EMAIL PROTECTED]> wrote: > On May 31, 2:19 pm, macfurax <[EMAIL PROTECTED]> wrote:> I try it, works fine > for XML and RSS ! > > > I would like to add a json ext

Routes and Paginator

2007-05-31 Thread BenjaminB
Hi, its YARQ, so i try to keep it short. the paginator gives me links like this: /articles/index/page:8 i have a route for the articles like this: $Route->connect( 'Artikel/', array( 'controller' => 'articles', 'action' => 'index' ) ); this route works if someone requests "/Artikel/", but not

Re: Paginator and custom routes problem (latest 1.2 alpha)

2007-05-31 Thread BenjaminB
same here, nothing helped so far On May 31, 1:09 am, Mirko <[EMAIL PROTECTED]> wrote: > I have exactly the same problem. > All I get is a link with nothing but controller name in it: > > Greets, Mirko --~--~-~--~~~---~--~~ You received this message because you a

Pagination works, but not well with admin routing

2007-05-31 Thread Paolo Gabrielli
Hi all, I've setup up a pagination following Andy's great tutorial and it works perfectly. But when I change the function name from index() to admin_index(), I rename the layout from index.thtml to admin_index.thtml and I activate the CAKE_ADMIN routing, AJAX load a new entire page (with the right

two foreign key in a table

2007-05-31 Thread franciscodg
hi, my problem is: I have in sql: -- -- Estructura de tabla para la tabla `historialcuotas` -- CREATE TABLE `historialcuotas` ( `id` int(11) NOT NULL auto_increment, `lancha_id_resta` int(11) NOT NULL, (foreign key table lanchas) `lancha_id_suma` int(11) NOT NULL, (foreign key table lanc

Re: data from model in a layout via pagescontroller

2007-05-31 Thread dardosordi
I strongly recommend you to read: http://bakery.cakephp.org/articles/view/creating-reusable-elements-with-requestaction It's on frequent discussions. On May 30, 5:17 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > oops > > On 30 mei, 21:51, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote

Re: Select list behaviour

2007-05-31 Thread francky06l
You explanation is not so clear, but I think you mean that the generateList returns only the id and not the 'Condition' field ? If so, generateList is by default making the array of the fields named 'id' and 'name'. As you might not have a 'name' field, you can set it into the model or pass parame

Re: Out of memory with FindAll

2007-05-31 Thread francky06l
Just to bring my contribution, the solution you found can be an "endless" solution. If in few weeks your number of record increases by 300%, you would have to increase the memory limit again (which is not unlimited). Maybe you could keep your export by looping (using page and limit as AD7six menti

Re: Upload a File with CakePHP 1.2.0.5137alpha

2007-05-31 Thread Tane Piper
Hey, Luckly I saw this post at the time I was refactoring my image upload facility, but at the moment I can't get it to work, it keeps failing on saving the image. Here is how I have it set up: Model: class Image extends AppModel { var $name = 'Image'; var $actsAs = ar

Re: Does cake cache plugins

2007-05-31 Thread Davide
Davide wrote: > It comes in my mind: "Luke, use the source"... But if someone else has > an answer that can avoid me the source :) I was looking in the source and I found that at line 117 of cake/libs/view/helpers/cache.php[1] there's an If statement If I comment the testing (leaving the code ins

Re: Upload a File with CakePHP 1.2.0.5137alpha

2007-05-31 Thread dardosordi
> Can you give some instructions? > save http://bin.cakephp.org/saved/17539 as app/models/behaviors/ upload.php then in your model, ex post: array( 'image' => array('dir' => 'img/posts', 'allowed_mime' => array('image/png', 'image/j

Re: how to use parseExtensions

2007-05-31 Thread macfurax
Ok I'll give it a try. I thougth that with ajax cake return the HTML generated by the view bypassing the layouts ? By the way what bare it's use for ? On 31 mai, 12:42, "R. Rajesh Jeba Anbiah" <[EMAIL PROTECTED]> wrote: > On May 31, 2:19 pm,macfurax<[EMAIL PROTECTED]> wrote:> I try it, works f

Re: Out of memory with FindAll

2007-05-31 Thread Gonzalo Servat
On 5/31/07, StinkyTofu <[EMAIL PROTECTED]> wrote: > > > I am calling $this->Member->findAll(null, 'Member.id') on a database > of 8000 records and am receiving the following error: > > Allowed memory size of 16777216 bytes exhausted (tried to allocate 782 > bytes) in /home/web88/html/cake/libs/mode

Re: Understanding validator regex

2007-05-31 Thread Davide
Floyd wrote: > I don't understand: > - Why is used a double escape \\ bar instead of a single bar \ I think bacause with a single slash in a string you mean that you want to escape the following character. So \\ stands for escape \ character. > - What is the meaning of "A(?:" at start of regex >

Re: cakephp mssql_dbo.php not working properly

2007-05-31 Thread Joshua Benner
In the code I pasted above, I'm using the Cake DBO mssql driver. In your description of your tables, you're describing a lot of relationships, but some of them seem like they should be HAMBT -- are you using HAMBT relations, or are you specifying hasMany and belongsTo in the samel model separately

Re: Out of memory with FindAll

2007-05-31 Thread AD7six
On 31 mayo, 13:25, StinkyTofu <[EMAIL PROTECTED]> wrote: > I am calling $this->Member->findAll(null, 'Member.id') on a database > of 8000 records and am receiving the following error: > > Allowed memory size of 16777216 bytes exhausted (tried to allocate 782 > bytes) in /home/web88/html/cake/lib

Re: Out of memory with FindAll

2007-05-31 Thread [EMAIL PROTECTED]
Make use of the parameters listed here: http://api.cakephp.org/class_model.html#63ade7d3c6d03c83ab53a224e23ad9dd (conditions,fields,recursive) so you only request the stuff you need On May 31, 1:25 pm, StinkyTofu <[EMAIL PROTECTED]> wrote: > I am calling $this->Member->findAll(null, 'Member.id'

Out of memory with FindAll

2007-05-31 Thread StinkyTofu
I am calling $this->Member->findAll(null, 'Member.id') on a database of 8000 records and am receiving the following error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 782 bytes) in /home/web88/html/cake/libs/model/datasources/dbo_source.php on line 312 I assume this error

cakephp 1.2 pagination with parameters

2007-05-31 Thread Copot
controller: categories function view($id = null) { $this->set('category', $this->Category->read(null, $id)); $conditions = "Product.category_id = ".$id; $paginationParameters = array(); $paginationParameters['controller'] = 'categor

Select list behaviour

2007-05-31 Thread g5Maniac
Hi All, I am tyring to generate a select list in an edit view - all very basic stuff. I am however getting the wierdes result to my query. diagnosis_controller (edit) $this->Diagnosis->id = $id; $this->data = $this->Diagnosis->read(); $this->set('conds',$this->Diagnosis->Condition->generateLi

Understanding validator regex

2007-05-31 Thread Floyd
Hi, I'm defining new regex validators in cake/validator.php file. I have worked with regex in other projects but indeed I don't understand some issues of the regex that was defined in cake by default. Example: define('VALID_EMAIL', '/\\A(?:^([a-z0-9][a-z0-9_\\-\\.\\+]*)@([a-z0-9] [a-z0-9\\.\\-]

Re: how to use parseExtensions

2007-05-31 Thread R. Rajesh Jeba Anbiah
On May 31, 2:19 pm, macfurax <[EMAIL PROTECTED]> wrote: > I try it, works fine for XML and RSS ! > > I would like to add a json extention ... > I add a json folder in my views/[model] and a default.ctp layouts in > layouts/json folder. > I even make an empty JsonHelper class. > > Bu when I callhtt

compressing page output

2007-05-31 Thread keymaster
I tried to reply to one of the earlier threads on this topic, but for some reason, Google did not present me with a 'reply' link. So, I've referenced them here, and am starting a new thread. http://groups.google.com/group/cake-php/browse_thread/thread/8f76155c2195430/e8d5092ebee61d79?lnk=gst&q=gz

Re: hasMany findAll alternatives

2007-05-31 Thread AD7six
On 30 mayo, 20:35, uolax <[EMAIL PROTECTED]> wrote: > Thanks so much for any time with this: > > Forest->hasMany->Trees > trees->belongsTo->Forest Do you really have 2 models named forest and tree? I hope not. Try this approach: bind a hasOne association for tree to your forest model, give it

Re: R: validation

2007-05-31 Thread cake_learner
I changed the code. Its working (Showing validation error message for password and confirm_password.) code: controller: function index() { if(!empty($this->data['Client'])) { if($this->Client->isConfirm('password', $this->data['Client'] ['password'],$this->data['Clie

Re: Strange DB problem - savefield fails when field name changes

2007-05-31 Thread Grant Cox
Are you running with DEBUG 0 in your app/config/core.php? If so, then once a table structure is cached it is not re-read for a long time. So, either delete the files in app/tmp/cache, or just set your DEBUG to 1 or higher for at least one page request - in either case this will rebuild all the ta

Re: hasMany findAll alternatives

2007-05-31 Thread yolabingo
On May 30, 12:35 pm, uolax <[EMAIL PROTECTED]> wrote: > Thanks so much for any time with this: > > Forest->hasMany->Trees > trees->belongsTo->Forest > > I want to: > find the forests that only have trees that are brown, (each tree can > only belong to one forest) > list the other trees in those re

Re: cake not running on production server

2007-05-31 Thread [EMAIL PROTECTED]
Thanx for the tip, my problem is solved. In our httpd.conf file contained the following option: Options - FollowSymLinks After removing that option it worked. Now I've got a tip "back": The first thing you have to do is reading your apache log file It gave very clear the solution to my probl

R: validation

2007-05-31 Thread m.sbragi
What do you mean with doesn't work. For All: "Be more exhausting when you place a question" It could be this. if(($this->data['Client']['password'])!=($this->data['Client']['confirm_pass word'])) { $this->Client->invalidate('confirm_password'); return; } > -Messaggio or

Re: how to use parseExtensions

2007-05-31 Thread macfurax
Hi, I try it, works fine for XML and RSS ! I would like to add a json extention ... I add a json folder in my views/[model] and a default.ctp layouts in layouts/json folder. I even make an empty JsonHelper class. Bu when I call http://localhost/cake_1_2/portfolios.json it return me the same HTM

How to model the DB with HABTM

2007-05-31 Thread Ita
I posted a problem I had yesterday and now thats its solved I began to question my DB structure. What I have: Users, Comments, Votes A user can enter a comment to the system and other users can vote if the like or dislike the comment. Initially I created 3 tables, 3 views, 3 models and 3 controll

  1   2   >