Re: How to clear caches?

2006-06-01 Thread [EMAIL PROTECTED]
I found the cake 1.1's .htaccess file in app/webroot is diffrent from cake 0.10's. I think we'd better make method with the htm file's name in controller to test the htm,and change the htm's extesion to thtml before test. --~--~-~--~~~---~--~~ You received this me

select tag annoyance

2006-06-01 Thread monty
I want to generate a selection with Australian states so i used the following.. $html->selectTag('Customer/state',array('NSW','QLD','ACT','VIC','WA','SA','TAS','NT'). This generates the following NSW QLD etc I dont need values set to "0","1", etc. I need the display values to be the

Re: Cake Software Foundation Certification

2006-06-01 Thread Mika
I would be interested in what the response it. Actually I'm sure a lot of people on this group would be. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-ph

Re: Having trouble with session checking.

2006-06-01 Thread radioflyer
In the last couple paragraphs of my post I was using the term Models when I meant to say Controllers --~--~-~--~~~---~--~~ 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@go

Having trouble with session checking.

2006-06-01 Thread radioflyer
Following the simple authentication example in the Manual. I have: class AppController extends Controller { function checkSession() { if(!$this->Session->check('User')) { $this->redirect('/admin/login/'); }

Re: selection lists

2006-06-01 Thread monty
fantastic! thanks alot --~--~-~--~~~---~--~~ 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]

Re: selection lists

2006-06-01 Thread Olivier Percebois-Garve
yes generateList() ;) I use it that way in my code, it should put you on the way: controller: $this->set('categories', $this->Post->Category->generateList()); $this->set('selected_category', $this->params['data']['Category']['id']); view: selectTag('Post/category_id', $ca

Re: selection lists

2006-06-01 Thread Larry E. Masters aka PhpNut
Controller:$this->set('region_list', $this->Region->generateList());View:selectTag('Custome/region',$region_list) ?>By default the above code looks for id and name in the database table. To change this set var $dsiplayField = 'region'; in your Region model.API:http://api.cakephp.org/class_model.htm

selection lists

2006-06-01 Thread monty
i want to fill a selection list based on a table of data called Region. It has two columns, id and region (containing the actual name of the region). To do this i wrote code below. Is there a faster, less convoluted way? This seems like a common task and should be an easier way. Thanyou. controll

Re: How to clear caches?

2006-06-01 Thread [EMAIL PROTECTED]
Then why the htm file which I put in app/webroot can't browse in http://myserver/myhtm.htm?It shows Http 404 error! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email

How to clear caches?

2006-06-01 Thread [EMAIL PROTECTED]
How to clear caches? It's boring mt much! Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, se

Turning off default routing behaviour, multiple validation failure for a single input

2006-06-01 Thread Aaron Barnes
Hi all,Following along the same lines as Sven, I am creating a Cake application, and wish to seperate the admin by giving it it's own subdomain. I have setup the routes configuration file to set routes depending on the $_SESSION['SERVER_NAME'] variable, but the default setting of attempting to rout

Re: ajax autocomplete.

2006-06-01 Thread Jf
> > Hope it helps someone else. > > Yes me ! :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, sen

Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour
I got it finally working. It was the layout I think. I modifiend the method inside my controller. function autocomplete () { $this->layout = "ajax"; // This is probably wy it was not working. if(empty($this->params['data'])) {

Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour
I even hardcoded de list in my autocomplete.thtml to see if is my controller. PANTALON CASUAL DE VESTIR PANTALON JEANS ADOBE CAMISA DE BEBE PAYASITO CA

Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour
I know it susck! :( On 6/1/06, Jf <[EMAIL PROTECTED]> wrote: > > I have the same problem, > > nothing appear, no javascript error > the pr($this->data); return too nothing > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: ajax autocomplete.

2006-06-01 Thread Jf
I have the same problem, nothing appear, no javascript error the pr($this->data); return too nothing --~--~-~--~~~---~--~~ 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@g

Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour
Can some one post a working example somewere? I know I am doing something wrong but I just can't see what. The other problem is that my ajax experiance is close to 0. Well I guess I will have to develop a solution with out the autocomplete helper. On 6/1/06, nate <[EMAIL PROTECTED]> wrote: > > Tr

Re: ajax autocomplete.

2006-06-01 Thread nate
Try adding pr($this->data); to your autocomplete action, to see what data is being posted. --~--~-~--~~~---~--~~ 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

Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour
If I type this address on my browser : http://localhost/productos/autocomplete/BEBE I doesnot return any thinkg. The SQL in the debug mode 2 tells me this SELECT `Producto`.`id`, `Producto`.`linea_id`, `Producto`.`unidad_id`, `Producto`.`plu`, `Producto`.`descripcion`, `Producto`.`costo`, `Produ

Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour
My bad the ajax-autocomplete is working If I type something I can see the page doing a reloading but It is not returning any data. I wonder if my controller is set up correclty. Or I am calling the right view. On 6/1/06, nate <[EMAIL PROTECTED]> wrote: > > Well, if you added 'Javascript' to the

Re: ajax autocomplete.

2006-06-01 Thread nate
Well, if you added 'Javascript' to the list of helpers in your controller, but the $javascript helper variable is not set, that means Cake is throwing an error of some kind, usually related to it not being able to find something. --~--~-~--~~~---~--~~ You received

Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour
On 6/1/06, nate <[EMAIL PROTECTED]> wrote: > > First of all, I assume the second view is not also called > autocomplete.thtml. Actualy the second view is calles diferent. is called searchname.thtml Second, the first thing I would check is the > source code of the page, and see if the title sa

Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour
well what I did was set up like this in the layout default.thtml link('prototype'); } ?> link('scriptaculous.js?load=effects'); } ?> link('controls'); } ?> Now I think with this it loads them dinamicly only if I have setup the helper on my controller. But it still does return any data when I type

Re: Werid data fetching issue (suddenly changed)

2006-06-01 Thread Marcelo de Moraes Serpa
Well, my issue wasn´t related to the $recursive option. The data actually returned different for one model, and suddenly started returning with the old format. It seems my host were messing with mysql server, that´s the only logical reasin as I already said becouse I didn´t touch the scripts. - Mar

Re: ajax autocomplete.

2006-06-01 Thread nate
First of all, I assume the second view is not also called autocomplete.thtml. Second, the first thing I would check is the source code of the page, and see if the title says "Missing..." anything. It's possible that there is an error (missing model, missing view, etc.) that is preventing your pa

Re: ajax autocomplete.

2006-06-01 Thread John David Anderson (_psychic_)
Just do something like this in your layout: If that doesn't seem to help, you'll need to try to see if any JS errors are being generated. Firefox as a pretty nice JS console you can use to see the errors. If you're getting some, provide them here. -- John On Jun 1, 2006, at 10:53 AM, Ca

Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour
No this is what I am doing. First I create the autocomplete function inside my controller. < -- file app/controllers/productos_controller.php -> set('productos', $this->Producto->findAll( "descripcion LIKE '{this->data['Producto']['descripcion']}'") ); $this->layout

Re: Can I access a model from a helper ?

2006-06-01 Thread Copot
Great. Thanks a lot ! --~--~-~--~~~---~--~~ 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]

Re: ajax autocomplete.

2006-06-01 Thread John David Anderson (_psychic_)
I'm using it, and it works great... Sure you have your scriptaculous and prototype libraries included in your layout? Does a JS console reveal any errors? -- John On Jun 1, 2006, at 9:56 AM, Carlos Mauricio Samour wrote: > > Has anyone got the $ajax->autocomplete working? > If so what did y

ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour
Has anyone got the $ajax->autocomplete working? If so what did you do? I followed the example on the manual but when I type anything on the input box it does not return anything. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

Re: Please help with Ajax controller method

2006-06-01 Thread nate
Um, I would guess that you can't see anything because it's all in the header... As far as RequestHandler goes, it just detects when a call was made via Ajax, and it switches from the 'default' layout to the 'ajax' layout (which is just a blank layout). If you're making the Ajax call via the Prot

Re: Werid data fetching issue (suddenly changed)

2006-06-01 Thread Carlos Mauricio Samour
Thanks! I guess the default value for $recursive changed or somenthing! I works with that. On 6/1/06, jeko <[EMAIL PROTECTED]> wrote: > > Set the recursivity in the model like this: var $recursive = '2'; > > > > > --~--~-~--~~~---~--~~ You received this message be

Re: Werid data fetching issue (suddenly changed)

2006-06-01 Thread jeko
Set the recursivity in the model like this: var $recursive = '2'; --~--~-~--~~~---~--~~ 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

Re: css rules

2006-06-01 Thread jeko
Here's a great article on printing and CSS. http://alistapart.com/articles/boom --~--~-~--~~~---~--~~ 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 uns

Re: Werid data fetching issue (suddenly changed)

2006-06-01 Thread Carlos Mauricio Samour
I upgraded from vesion 1.0.0.2378 to version 1.1.3.2967 and suddendly a record I fetched with $this->set('data', $this->Bodega->read()) Used to return: Array ( [Bodega] => Array ( [id] => 4 [nombre] => SUCURSAL MERLIOT [activo] => 1 ) [E

requestAction() from another plugin

2006-06-01 Thread Gonçalo Marrafa
Hi. Is there a way of using requestACtion() on a controller from another plugin? If i'm at plugin foo and do a $this->requestAction('/bar/grok') i want it to call action index of controller grok in plugin bar rather that action grok of controller bar. Thanks in advance. -- Gonçalo Marrafa <[EM

Re: Werid data fetching issue (suddenly changed)

2006-06-01 Thread Marcelo de Moraes Serpa
Well, replying again to my own post. I just confirmed that my host were indeed messing with MySQL server this morning (updating it to the last version) and this was what I thought and the only logical reason why the application stopped working for some time and then started working again sudenlly.

css rules

2006-06-01 Thread Fernando
hey, I'm trying to use a css rule to set a footer.. div.footer   {  font-size: 13px;  font-family: Arial;  text-align: center;  position: absolute;  bottom: 0px;  left: 0px;  width: 100%;  height: 18px } note, I'm breaking the page with style="page-break-after:always;" So, my foote

FREE sing up now .THE BEST

2006-06-01 Thread [EMAIL PROTECTED]
Dear member Looking for games,hardware,software, PCs, LAPTOPs, priders, Xbox, PS 2, 3, DS http://www.clubshop.com/cgi/appx.cgi/3440162 Sign up now for free and find the best prices and spesial offers. http://www.clubshop.com/cgi/appx.cgi/3440162 >1000 companies. DELL APPLE store HP SONY A

Re: redirecting

2006-06-01 Thread nate
If you're going within the same controller, just use setAction( ) : function action1( ) { $this->setAction('action2'); return; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to

Re: Model extending other model

2006-06-01 Thread nate
if (!class_exists('foo')) { loadModel('foo'); } --~--~-~--~~~---~--~~ 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, se

Re: Can I access a model from a helper ?

2006-06-01 Thread nate
You can read/set it in the beforeFilter or beforeRender method of AppController, so it will be loaded for all controllers. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, sen

Re: Cake Software Foundation Certification

2006-06-01 Thread MJ Ray
Marcelo de Moraes Serpa <[EMAIL PROTECTED]> wrote: > What does that actually mean? It means "I am not a lawyer, so I'll point you at one who has explained things to me, who has a web site at http://www.iusmentis.com/"; -- MJ Ray <[EMAIL PROTECTED]> www.ttllp.co.uk +44 870 4321 9 10 Web, lo

Re: Werid data fetching issue (suddenly changed)

2006-06-01 Thread FFighter
Well, I´m either crazy or my hosting provider was messing with something this morning becouse now, sudenlly everything started working as before. Has anyone ever had an issue similar to that? I guess it´something related to MySQL server...? --~--~-~--~~~---~--~~ Y

Re: Cake Software Foundation Certification

2006-06-01 Thread Marcelo de Moraes Serpa
What does that actually mean?On 6/1/06, MJ Ray <[EMAIL PROTECTED]> wrote: On 2006-06-01 09:50:44 +0100 RichardAtHome <[EMAIL PROTECTED]>wrote:> Does this mean non-certified developer wont be able to use the CakePHP> trademark? I strongly suggest that you check your local trademark law for detailsof

Re: Cake Software Foundation Certification

2006-06-01 Thread MJ Ray
On 2006-06-01 09:50:44 +0100 RichardAtHome <[EMAIL PROTECTED]> wrote: > Does this mean non-certified developer wont be able to use the CakePHP > trademark? I strongly suggest that you check your local trademark law for details of what you can and cannot do without a licence. Don't blindly beli

Werid data fetching issue (suddenly changed)

2006-06-01 Thread Marcelo de Moraes Serpa
After a massive controllers update, I´ve started to have problems with data fetching in my cake application. Even though Cake permorms all the SQL queries correctly, the data is returned in a different format. What was, $data['pictures']['filename'] suddenly became $data['filename']['filename']. Al

Re: Error after installing oceancms

2006-06-01 Thread Sven Homrighausen
Stop thinking...I just found it :-) There was http://www.oceancms-test.oceancms.co.uk/"; /> defined in "OceanCMS/views/elements/page_top.thtml". Now it's working. But let's see was coming next... --~--~-~--~~~---~--~~ You received this message because you are su

Re: Error after installing oceancms

2006-06-01 Thread Sven Homrighausen
>>That would be app/config/bootstrap.php non core.php. Thanks for your help, but unfortunately it doesn't work. I can't find the string "http://www.oceancms-test.oceancms.co.uk/"; definded anywhere in my application. Maybe it's in one of the imported database-tables from OceanCMS? I tried searchi

Model extending other model

2006-06-01 Thread Gonçalo Marrafa
Hi. How can i create a "bar" model that extends an existing "foo" model? If i declare it as "extends foo" i need to get lucky and have "foo" loaded before "bar" by loadModels(). If i explicitly call loadModel('foo') before declaring "bar" and "foo" is already loaded i get a "Cannot redeclare cl

Re: Cake Software Foundation Certification

2006-06-01 Thread Larry E. Masters aka PhpNut
The proper thing to do here is send an email to the foundation, which is in place to protect the copyright, trademarks, and other legalities related to this project.I am sure our legal department could answer that question better. Please send all questions to [EMAIL PROTECTED]-- /*** @author Larry

Re: public Model::order ?

2006-06-01 Thread [EMAIL PROTECTED]
done --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options,

Cake Software Foundation Certification

2006-06-01 Thread RichardAtHome
>From the Cake Software Foundation Certification page ( http://www.cakefoundation.org/pages/certification ) : "and will be able to use the CakePHP trademark when promoting their services" Does this mean non-certified developer wont be able to use the CakePHP trademark? If this is true what abou

Re: redirecting

2006-06-01 Thread monty
there's no reason i suppose not to include the controller name, it's just that i would have expected this behaviour similuar to $html-link('methodname'). -its all good. Thanks for the solutions. --~--~-~--~~~---~--~~ You received this message because you are subsc

Re: Can I access a model from a helper ?

2006-06-01 Thread Copot
So if I want to, let's say declare a variable called for example $page_keywords so I can use it in the layout (and extract this information from the database) I should read it on every controller ? --~--~-~--~~~---~--~~ You received this message because you are

Re: Can I access a model from a helper ?

2006-06-01 Thread Larry E. Masters aka PhpNut
No-- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut* @access  public*/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this grou

Can I access a model from a helper ?

2006-06-01 Thread Copot
Can I do that ? --~--~-~--~~~---~--~~ 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 mo

Re: redirecting

2006-06-01 Thread AD7six
Hi Monty/John, I see 2 easy options: 1) Change the call $this->redirect ($this->name."/"."methodName"); 2) override the redirect method in your app_controller to (something like): function redirect($url, $status = null) { if (!strpos($url, '/')) { $url = $this->name.'/' . $url; } par

Re: More than 1 model in the controller

2006-06-01 Thread Copot
Great... Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For m

Re: More than 1 model in the controller

2006-06-01 Thread John Zimmerman [gmail]
http://manual.cakephp.org/chapter/7If you scroll down to section 2 it will explain the $uses variable in the controller.This will allow you to load more than one model. On 6/1/06, Copot <[EMAIL PROTECTED]> wrote: How can I access more models from a controller ?class ShopController extends AppContro

Re: redirecting

2006-06-01 Thread John Zimmerman [gmail]
I think the closes you are going to get is something like the following...$this->redirect('/'.$this->params['controller'].'/action'); On 5/31/06, monty <[EMAIL PROTECTED]> wrote: after playing around with the redirect functioni figured out that to redirect to a method within the samecontroller you

Re: Quickly Translate IP to Geo Coordinates...

2006-06-01 Thread [EMAIL PROTECTED]
Whoops, "I just *made* a snippet..." --~--~-~--~~~---~--~~ 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 [EM

Quickly Translate IP to Geo Coordinates...

2006-06-01 Thread [EMAIL PROTECTED]
I just make a snippet to convert an IP address to geo coordinates using MaxMind's free GeoLite database. It's pretty simple, so beginners should be able to follow it. Link: http://cakeforge.org/snippet/detail.php?type=snippet&id=69 Description: Using a free geo coordinate database and sample php

Re: Important topic ::derived fields in model ?

2006-06-01 Thread Larry E. Masters aka PhpNut
Let me go into a little further explanation.A model can represent anything, but a lot of the time it represents a database table. Think of the model as a way to create, read, update, delete.Now go a little further, with those 4 methods in mind. A model could represent a file system, with methods to

More than 1 model in the controller

2006-06-01 Thread Copot
How can I access more models from a controller ? CmsArticle->findbyid(1); $this->set('test_var',$test_var); } } ?> What if I want to access another model called Config ? How do I achieve that ? --~--~-~--~~~---~--~~ You received this mess