Re: Como adicionar um helper em todos os controller?

2007-08-13 Thread hostdesigner
Bom, na realidade o html helper não fica disponível sozinho, ele precisa ser chamado dentro do controller ao qual será trabalhado. Você pode criar o seu próprio helper e fazer como este exemplo Exemplo: class UsersController extends AppController { var $name = 'Users'; var $helpers = array(

Como adicionar um helper em todos os controller?

2007-08-13 Thread André Piantino
Olá! Alguém sabe como fazer p/ um helper ser acessível em todas as views? Como o HtmlHelper. Abraço -- André Porto Leal Piantino [EMAIL PROTECTED] SkypeId: andrepiantino --~--~-~--~~~---~--~~ Recebeu esta mensagem porque está inscrito em Grupo Cake PHP

Fazer a Home do site nada funciona

2007-08-13 Thread hostdesigner
Eu estou em uma batalha o cake está ganhando de 100 a 0, como é que eu faço pra criar a home do site? Tenho que fazer um helper para cada coisa que eu tiver na home page do site? Eu pensei que tinha que fazer um HomeController e já dava, mas, me enganei feio, mudei até o admin route para home e

Re: Fatal error: ConnectionManager::getDataSource - Non-existent data source in /var/www/cake/cake/libs/model/connection_manager.php on line 110

2007-08-13 Thread Samuel DeVore
As a heads up make sure you avoid reserved words in php as well as cake On 8/12/07, Muhammad Ishaq [EMAIL PROTECTED] wrote: Thanks a lot Geoff, It solved the problem... :) Everything works fine now... CakePHP is really MVC taken to the extreme... On 8/13/07, Geoff Ford [EMAIL PROTECTED]

how to check the form field change ---Cake-Php

2007-08-13 Thread sharath
Hii to all, I'm using cake php for editorial process page. In that page we have several field, in which user can edit those. After this he can click to next or prev button to move either way to edit another page. Suppose if he click on next , it will show a alert message Do you want to save the

wrong find usage, or a bug when binding a model to a model?

2007-08-13 Thread phpjoy
I call for a model with bindmodel. Then I bind another model to that model. $this-controller-$model-Section-Layout-bindModel Section binds Layout, and Layout binds TemplateLayout. With recursive is set to 2 on the model Section, I get all the results I need. The problem Is that I get extra

Re: how to check the form field change ---Cake-Php

2007-08-13 Thread Christophe C.
Hello, One solution is to use javascript. You'll have to use a listener on the field you want to check, like this (using prototype) : $('yourTextField').observe('blur', function(e) or $('yourform').observe('submit', function(e) { var textfield = Event.element(e) // perform an ajax request to

Re: how to check the form field change ---Cake-Php

2007-08-13 Thread Christophe C.
Hello, One solution is to use javascript. You'll have to use a listener on the field you want to check, like this (using prototype) : $('yourTextField').observe('blur', function(e) or $('yourform').observe('submit', function(e) { var textfield = Event.element(e) // perform an ajax request to

Re: help for select

2007-08-13 Thread [EMAIL PROTECTED]
in model (kode_kab.php) i have script like this : ... var $belongsTo = array ('KodeProv' = array( 'className' = 'KodeProv', 'conditions'='', 'order'='', 'foreignKey'='kode_kab_prov_id') ); ... and in model (kode_prov) ... var $hasMany = array ('KodeKab' =

Re: Form helper issue

2007-08-13 Thread [EMAIL PROTECTED]
In this case the URL with GET parameters is not readable at all :-). For examle this is might be a result of search or filter form. On Aug 13, 7:42 am, Grant Cox [EMAIL PROTECTED] wrote: It's intentional, for convenience. The simplest solution would be to use

class.paths.php

2007-08-13 Thread brammeleman
I just made an ajax app that has a couple of refreshing divs in it, using $ajax-remoteTimer. The elements usually update with the right content, but once and a while, this error message is served instead: Warning: Unexpected character in input: ' in

Security component and forms

2007-08-13 Thread [EMAIL PROTECTED]
A small request for developers of Security component. :-) Please make an ability to switch off form data validation and autocreation of hidden '__Token' fields when using Security and form/ajax helper in Cake 1.2. I know about Controller-disableFields. But automatically generated __Tokens are

Re: Security component and forms

2007-08-13 Thread Chris Hartjes
On 8/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: A small request for developers of Security component. :-) Please make an ability to switch off form data validation and autocreation of hidden '__Token' fields when using Security and form/ajax helper in Cake 1.2. I know about

Re: wrong find usage, or a bug when binding a model to a model?

2007-08-13 Thread Grant Cox
This is not a bug. Unless the query generated includes a join to the TemplateLayout model's table, then you cannot include those fields. What associations are there between the three models? Since Cake's JOINS will only join a single association, it may be possible for you to query the Layout

Re: class.paths.php

2007-08-13 Thread Grant Cox
I'm really not sure what could be causing the issue. However, when you run your site in production mode (DEBUG 0) then this file will not be written to - only read from. So as long as it's not corrupted when you first switch to DEBUG 0 it'll remain ok regardless of load. On Windows I get

Re: Error message wrong line...

2007-08-13 Thread RichardAtHome
The PHP back end has encountered a syntax error, but reporting the 'wrong' line. Actually, the line is correct. That's the point at which the PHP backend gave up processing the file. i.e. the syntax error only became apparent when the whole block of code (terminated by the } ) was processed.

Re: Auth1.2 component not showing methods.

2007-08-13 Thread Charlie
Hi, Maybe a bit off-topic but how can I use the requested action in the model I user for authorization? I use type 'model' as authorization: $this-Auth-authorize = array('model'='User'); and I have a function in my user model function isAuthorized($user = null) { //... } In that function I

Re: Auth1.2 component not showing methods.

2007-08-13 Thread Gwoo
You you want to check on based on the action then you should use the controller based auth. Model based auth gets the action based on how the action is mapped to the CRUD. So, in the model that is all you deal with, create, read, update, delete.

Re: Default Controller Action

2007-08-13 Thread RichardAtHome
I think this bakery article answers your question: http://bakery.cakephp.org/articles/view/taking-advantage-of-the-pages-controller I prefer to add a page-by-page route in routes.php: Router::connect('/contact', array('controller' = 'pages', 'action' = 'display', 'contact'));

Re: Link to a location on the same page

2007-08-13 Thread RichardAtHome
Better yet, (doesn't use an 'A' tag to mark up the destination:) div id='Verb'This is where I want to go/div a href='#Verb'Send me there/a On Aug 8, 11:42 pm, Geoff Ford [EMAIL PROTECTED] wrote: Links to the same page do not require the full url so why not use straight html? a name=Verb/

Re: Security component and forms

2007-08-13 Thread [EMAIL PROTECTED]
I use these forms to make a custom filters or searches. On Aug 13, 4:09 pm, Chris Hartjes [EMAIL PROTECTED] wrote: On 8/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: A small request for developers of Security component. :-) Please make an ability to switch off form data validation

Re: Advice on Complex Model setup

2007-08-13 Thread luke BAKING barker
yeah I am doing something with a quantity in a HABTM, it will work. check out felix's blog post - best description of the new 'with' parameter in 1.2 and how to use it - read the commetns too!!!: link -

Re: What's the view cache story in cake 1.2?

2007-08-13 Thread Gwoo
var $helpers = array('Cache'); --~--~-~--~~~---~--~~ 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

Re: Cache Elements for Different Users

2007-08-13 Thread alan
The following component (+example controller using it) might help... I use it a lot. === http://bakery.cakephp.org/articles/view/ecache-easy-per-user-or-per-anything-cache-of-html-or-arrays Caching is basically required for any data-heavy or interaction-heavy site... but you need to

Re: Cache Question

2007-08-13 Thread alan
Caching is basically required for any data-heavy or interaction-heavy site... but you need to be in control of who gets what cache; more specifically, you need to be sure people only get their own cached content. Cake 1.2 has caching... great caching if your contact is the same for everyone...

app absolute url

2007-08-13 Thread nitifixis
Hi! I'd like to set up a rss feed for my cake app and I need a way to get the absolute url of my app (http://www.domain.com/...) to fill the link/link and guid/guid tags of my feed. Can anyone help me, please? Thanks in advance --~--~-~--~~~---~--~~ You

bakery having problems?

2007-08-13 Thread Muhammad Ishaq
Hi, I was wondering if bakery.cakephp.org is really having some problems, or is it something wrong with my browser. for example: - I cannot create my profile there (it says action profile/add doesn't exist) - In the morning, I couldn't login through Fire Fox, when I tried IE, it let me

Re: Maths

2007-08-13 Thread haj
I'm having hard time imaging why the need for array layout like the latter -- implementation or algorithm where this array needed may have a rethinking. ...but, and I'm not math expert (well, this isn't a question of math anyway), you could just... 1) sort the 1st array 2) you can now take

Re: N/A option in select (dropdown) element

2007-08-13 Thread haj
I can also add the post-submission code to look out for the string 'NULL' instead of an ID, This is what I'd do ;p) I'm using 1.1, tho. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to

Re: Multiple field values in select box?

2007-08-13 Thread Beertigger
Back at this after a coupla days away - thanks much for all the input. Still having trouble with something entirely too basic. Based on Geoff's last input, here's my current code: In controller: function getListData($data){ $data = $this-Model-query(SELECT

Re: bakery having problems?

2007-08-13 Thread Mech7
Also search seems to work only from homepage ? not in other pages :s --~--~-~--~~~---~--~~ 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

Re: bakery having problems?

2007-08-13 Thread Mech7
Oh yeah and you can't post question marks and whatever in the title.. can be pretty annoying at times. On Aug 13, 9:00 pm, Mech7 [EMAIL PROTECTED] wrote: Also search seems to work only from homepage ? not in other pages :s --~--~-~--~~~---~--~~ You received

Re: integrate third party ajax library

2007-08-13 Thread nagarjuna
In another attempt at getting this up and running, I copied the relevant code from the php file that was being called, and added a method inside my app_controller and created a view of the same name. Here is my new function: function sc_select_ajax_handler( ) {

Re: app absolute url

2007-08-13 Thread Pablo Viojo
Use HtmlHelper::url [1] Regards, -- Pablo Viojo [EMAIL PROTECTED] http://pviojo.net [1] http://api.cakephp.org/class_html_helper.html#50485bc686b21a873c7e1d9972f84360 On 8/13/07, nitifixis [EMAIL PROTECTED] wrote: Hi! I'd like to set up a rss feed for my cake app and I need a way to

One Install, Multiple Apps

2007-08-13 Thread starkey
I'm trying to configure a setup with multiple apps that are accessible to each other. The sort of setup we need might be N number of apps running on one CakePHP installation with this sort of install: www.domain.edu/news/ www.domain.edu/polls/ www.domain.edu/catalog/ These apps would need to be

Re: html-link and router-url adding /bare/ to the url if action is index

2007-08-13 Thread Gwoo
svn update --~--~-~--~~~---~--~~ 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

html-link and router-url adding /bare/ to the url if action is index

2007-08-13 Thread LunarDraco
I'm using the latest (5501) from 1.2 branch of the repository. I baked my app with scaffolding and the associated actions at the bottom of the page are generating two different result urls. li?php echo $html-link(__('List', true).' '.__('Recipes', true), array('controller'= 'recipes',

ENUM population on dropdown

2007-08-13 Thread R. Rajesh Jeba Anbiah
IIRC, cake was populating ENUM fields in dropdown. But, when I tried the new 1.2 branch version (https://svn.cakephp.org/repo/branches/ 1.2.x.x ), I found that it isn't working. Is anything has been changed (for any reason)? -- ?php echo 'Just another PHP saint'; ? Email: rrjanbiah-at-Y!com

The Manual - ACL - Am i not dong this right?

2007-08-13 Thread [EMAIL PROTECTED]
I am trying to follow through the manual on ACL, through SSH i have initdb and then started to create aro as directed... however, for starters null is not accepted. It advises replacing this with '0' so i do... then trying to work out the set parent... this does not match manual to help notes in

Re: help for select

2007-08-13 Thread dardosordi
That has been answered in this list many times before. http://manual.cakephp.org/chapter/models Look there for genrateList, pay attention to $keyPath/$valuePath, study the examples. You can also search this list. Another way is to set $displayName in the model. On Aug 13, 3:27 am, [EMAIL

Re: Is it reasonably easy to do this sort of inline editing with CakePHP

2007-08-13 Thread walterbyrd
On Aug 8, 12:05 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Inline editing has more to do with the client-side scripting than the backend framework (of course they have to work together). I really like the editing capabilities of the ExtJS

Re: app absolute url

2007-08-13 Thread R. Rajesh Jeba Anbiah
On Aug 13, 8:50 pm, nitifixis [EMAIL PROTECTED] wrote: I'd like to set up a rss feed for my cake app and I need a way to get the absolute url of my app (http://www.domain.com/...) to fill the link/link and guid/guid tags of my feed. Can anyone help me, please? $rss-url('/', true); If

Re: html-link and router-url adding /bare/ to the url if action is index

2007-08-13 Thread R. Rajesh Jeba Anbiah
On Aug 14, 12:16 am, LunarDraco [EMAIL PROTECTED] wrote: I'm using the latest (5501) from 1.2 branch of the repository. I baked my app with scaffolding and the associated actions at the bottom of the page are generating two different result urls. snip https://trac.cakephp.org/ticket/3060

Re: Is it reasonably easy to do this sort of inline editing with CakePHP

2007-08-13 Thread [EMAIL PROTECTED]
It is pretty easy to get going with the extjs lib 1) unzip the whole thing including css files, images, etc. in you webroot/js directory. I tried putting it in the vendor directories but paths get screwed up. 2) In each of the cake templates you want to use it echo $html-css(array(

Re: html-link and router-url adding /bare/ to the url if action is index

2007-08-13 Thread LunarDraco
gwoo, I've tried the svn update and still have the same results. I'm now at revision 5516 The router.php file was last modified by you on 8/7, this does not seem to be the problem. As I reverted to revision 5474 of the file and still have the problem. I've updated my view to only have the two

exposing $var from bootstrap to default.ctp layout

2007-08-13 Thread Howard Glynn
I've been scratching my head over this straightforward problem. I have a relatively static but site-configurable front menu array structure that appears on all pages in my app instantiated via default.ctp (using the useful http://bakery.cakephp.org/articles/view/css-menu-helper ) I had assumed

Re: Multiple field values in select box?

2007-08-13 Thread cdomigan
http://php-coding-practices.com/cakephp-specific/how-to-put-combined-fields-into-cakephps-model-generatelist/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

json booleans

2007-08-13 Thread [EMAIL PROTECTED]
I want to get some JSON that treats true/false like booleans instead of strings -- this, they are unquoted. Cake's JavaScript helper ($javascript-object) handles booleans without quoting, but unless I specifically typecast the data as boolean, it looks like a string. $javascript-object has the

Does anybody used Yahoo Browser Based Authentication With Cake?

2007-08-13 Thread aerosmith
I just wanted to discuss about the ways we can integrate Yahoo Browser Based Authentciation. Is it the right solution to write the whole code required by yahoo in the AppController beforeFilter() Function? --~--~-~--~~~---~--~~ You received this message because

Has any body integrated Yahoo Browser Based Authentication with CakePHP?

2007-08-13 Thread aerosmith
I just wanted to discuss about the ways we can integrate Yahoo Browser Based Authentciation. Is it the right solution to write the whole code required by yahoo in the AppController beforeFilter() Function? --~--~-~--~~~---~--~~ You received this message because

[newbie] Defining a relationship using Cake's models

2007-08-13 Thread Andrea Spadaccini
Hello everybody, I'm a newbie to this wonderful framework, and I'm finding it more and more interesting. I've got a small problem modeling a relationship between my entities using Cake's relationships. Let's say that I have a table of Workers, people who work :), and a table of Sites, places

MySQL replication master / slave setup does not work

2007-08-13 Thread Masao
I've setup a simple Users table with scaffolding to test the master/ slave setup suggested in this thread: http://groups.google.com/group/cake-php/browse_thread/thread/58ea010f930fab6c/df64d493b24d5a67 But it does not work for me either (as I've read someone else is having the same problem)

Re: MySQL replication master / slave setup does not work

2007-08-13 Thread Samuel DeVore
make sure that you are using 'connect' = 'mysql_connect' not pconnect in your db config On 8/13/07, Masao [EMAIL PROTECTED] wrote: I've setup a simple Users table with scaffolding to test the master/ slave setup suggested in this thread:

Re: json booleans

2007-08-13 Thread Grant Cox
As you said, the Javascript helper object() function already correctly deals with booleans. So the problem is just with your data - so what is your data? Do you mean because the data from the database is actually a string based int (ie '0' or '1'), and you want this to be a boolean before going

Re: json booleans

2007-08-13 Thread [EMAIL PROTECTED]
The data is just a straight draw from the database such as a controller $data=$this-Contact-findAll( null, array('id','uid','fullName','email','admin','active'), $order,

Re: Multiple field values in select box?

2007-08-13 Thread Beertigger
Found this one earlier. What myGenerateList does, it does very well, much easier than using an afterFind to concat things. But, from what I can tell thus far, it has the same limitation, in that it can't combine data across two models and display it in a third. On Aug 13, 2:58 pm, cdomigan

Re: [newbie] Defining a relationship using Cake's models

2007-08-13 Thread Langdon Stevenson
Hi Andrea I've got a small problem modeling a relationship between my entities using Cake's relationships. Let's say that I have a table of Workers, people who work :), and a table of Sites, places where those people must go to work. I'd like to create a Presence relationship between

Image uploading via iframe, then updating div in parent via ajax

2007-08-13 Thread Dave
Aside from finding a few javascript examples about changing form information in a parent windows from a child window I've actually not found anything regarding the above subject line. What I'm trying to do is upload images in an iframe and then update the proper div with ajax. If at all possible.

Re: Multiple field values in select box?

2007-08-13 Thread Geoff Ford
You've got a error in the getListData function - remove the curly barce between the end of the query and $listdata = array(); Geoff On 8/14/07, Beertigger [EMAIL PROTECTED] wrote: Found this one earlier. What myGenerateList does, it does very well, much easier than using an afterFind to

Re: Multiple field values in select box?

2007-08-13 Thread Beertigger
Thanks, Geoff, I caught that one earlier, also found what I think was a missing ] to close the $listdata[$data['Team']['team'] = $data['Sport']['sport'] . '-' . $data['Team']['team']; now: $listdata[$data['Team']['team'] = $data['Sport']['sport'] . '-' . $data['Team']['team']]; Still no

Re: host free for cake

2007-08-13 Thread gianpaulo
Yeah, I agree with daschl, you don't need a specific host that runs CakePHP. It's not like Ruby on Rails. CakePHP is simply a set of PHP Scripts that can be executed by the PHP Interpreter. Any web host that have PHP4/PHP5 installed will do. daschl wrote: well, you dont need a host running

Re: Image uploading via iframe, then updating div in parent via ajax

2007-08-13 Thread francky06l
I have done this, but I have used a bit of perl script as well in order to handle the uploading file. make a search on caketimer with google, this is where I found most information for this. On Aug 14, 3:10 am, Dave [EMAIL PROTECTED] wrote: Aside from finding a few javascript examples about