Re: funções genéricas

2007-08-08 Thread Maurício Pena
Acho q nesse caso era melhor vc criar um helper pra fazer isso. On 8/8/07, Rodrigo Xavier [EMAIL PROTECTED] wrote: Nope. Eu estou chamando a função dentro do index.thtml ou seja no view. A função apenas converte a data no padrão -mm-dd hh:mm:ss vinda de um campo created para

Bug CAKEPHP

2007-08-08 Thread Michael Mafort
Olá Galera, blz? Estou rodando usando o cake pela primeira vez e esbarrei em um bug, que a princípio parece coisa simples, mas já tem 3 dias que estou agarrado com isso. É o seguinte, o code está funcionando direitinho, sem nenhum problema, so que na primeira linha do código gerado esta

Criptografar dados pessoais

2007-08-08 Thread [EMAIL PROTECTED]
Gostaria de criptografar os dados pessoais do usuário, como medida de segurança, sei que muita gente nem se preocupa com isso, porém, tenho interesse em faze-lo. No cakePHP eu não estou tendo muita produtividade devido estar aprendendo ainda, mas, utilizando o bake eu consigo render alguma

ARO/ACO caches

2007-08-08 Thread Feris Thia
Hi, I just look at the cache persistent folder and there's a aro/aco cache tables. How long does it persist there ? Can we cache per user/group data before it is being modified in database ? If so it will be great as it will decrease mysql connection overhead. Regards, Feris

Re: Session Variable Returning Favicon.ico Instead of the Value I Set

2007-08-08 Thread Grant Cox
Search the group, this has been answered before. It is because you have a relative link to an image file, and when your browser requests this it executes your action again. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: CakePHP+SMF (again?)

2007-08-08 Thread MrTufty
For the record, I think you've gone a very much more complicated way around this than was necessary - I may be wrong, depending on exactly what you're trying to achieve, but wouldn't it have been simpler to hook into the SMF login/logout scripts from within your Cake apps? That way you would

Re: CakePHP+SMF (again?)

2007-08-08 Thread [EMAIL PROTECTED]
Yes, that is exactly what I wanted to do (use the SMF hooks using the provided SSI.php) but since SMF relies on the session data for these to work and Cake created its own session to handle this, the SSI.php file was not looking at the correct data. In all, the steps I have taken were not that

Re: Append aggregate function data to the primary model

2007-08-08 Thread Geoff Ford
For your particlular example you could try count(Post.title) as `Post`.`count` In general this sort of thing is done in afterFind(). Just loop over the results and add the extra keys that you need. Geoff -- http://lemoncake.wordpress.com On Aug 8, 7:08 pm, mithesh [EMAIL PROTECTED] wrote: hi

Re: Browser redirection problem...!!! please help..!!!

2007-08-08 Thread Geoff Ford
If you have renamed the app folder you need to tell Cake where it is. Look in webroot/index.php. Same goes for the cake folder, if it is not in the standard location you need to change the define() in index.php. Geoff -- http://lemoncake.wordpress.com On Aug 8, 4:28 pm, Raul [EMAIL PROTECTED]

Re: CakePHP+SMF (again?)

2007-08-08 Thread Geoff Ford
You don't need to modify cake. All you have to do is modify config/core.php: define('CAKE_SESSION_SAVE http://api.cakephp.org/1.2/app_2config_2core_8php.html#ebaae21321d4c610deade48dcd1f26ef', 'database'); // sets cake to use database sessions define('CAKE_SESSION_TABLE

Cake Url Alias - anyone used it before?

2007-08-08 Thread Matt
Has anyone had much experience on using CakeUrlAlias (http:// www.thinkingphp.org/2006/05/17/url-aliases-for-cakephp/) on a site? It's the perfect solution for my needs as I need something that catches URLs that don't match up with a controller, passes those URLs onto another controller, which

Re: CakePHP+SMF (again?)

2007-08-08 Thread [EMAIL PROTECTED]
Yes, that is pretty much what I have ended up doing (albeit through a long-winded process). I did actually have to modify Cake's session functions because the SMF sessions table uses different column headings and stores some more data. Also, SMF sessions stores session id in a field session_id

Re: Cake Url Alias - anyone used it before?

2007-08-08 Thread Felix Geisendörfer
I'm the one who wrote that post. By now there are better solutions available to handle this problem. I'd suggest to check out the AppError class and how you can use it to catch the missingController error. You will however need to take care of recursion yourself. -- Felix

Re: How to build form with multiple records?

2007-08-08 Thread luke BAKING barker
Hi Geoff did you have any luck with getting this feature to work? Can I also thank you for your posts in this group on multiple saves as they've been very helpful. Coincidentally I am trying to get many RoomsTasks submitted from a form at once, and I have managed to loop through POSTed data and

Re: Cake Url Alias - anyone used it before?

2007-08-08 Thread Matt
Thanks for the pointer Felix. Based on what you are saying the best solution would be something along these lines: http://cakebaker.wordpress.com/2006/06/15/writing-a-custom-error-handler/ --~--~-~--~~~---~--~~ You received this message because you are subscribed

Between Join producing invalid SQL

2007-08-08 Thread dmorris
Hi All. I'm fairly new to coding in Cake and can't find any resource to help me solve this problem. I appear to be doing the same as all the code snippets I have seen, but I must be missing something. The following code $conditions['AND']['Target.month'] = BETWEEN $startMonth and $endMonth;

Undefined index: Language in filtr_lang.thtml

2007-08-08 Thread [EMAIL PROTECTED]
Hello I want to filter my view by passing a language_id in the view. ( Subcategory can have many categories , category can have many languages ) Does anyone know why i getting this error? --- ERROR: Notice: Undefined index: Language in C:\wamp\www\inz_cake\app\views

Re: How to build form with multiple records?

2007-08-08 Thread luke BAKING barker
sorry I was calling invalidFields wrong way there - think I have fixed it! On Aug 8, 12:45 pm, luke BAKING barker [EMAIL PROTECTED] wrote: Hi Geoff did you have any luck with getting this feature to work? Can I also thank you for your posts in this group on multiple saves as they've been

Re: RequestHandler-isAjax not returning expected data

2007-08-08 Thread doubleswizz
Jim, thanks for the tip. Although that is not a concern in this scenario, that is definitely good to know. Samuel, I'm just using a little self-written ajax...no libraries. That's probably my issue. Thanks to you both for the help! --~--~-~--~~~---~--~~ You

Re: Bug Found?

2007-08-08 Thread supercake
This is a problem with the overridding function in dbdesigner2cake.php. I just found the uses function in the core and it does use strtolower so no bug with cake. Thanks Grant Brian On Aug 8, 2:21 am, Grant Cox [EMAIL PROTECTED] wrote: If it's still happens in the latest 1.1.x SVN then it is

Re: Undefined index: Language in filtr_lang.thtml

2007-08-08 Thread Rahul
Try using var recursive=3 in your model.. On 8/8/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello I want to filter my view by passing a language_id in the view. ( Subcategory can have many categories , category can have many languages ) Does anyone know why i getting this error?

Re: Undefined index: Language in filtr_lang.thtml

2007-08-08 Thread Stachu alernikow
Thank you for your answer. Try using var $recursive=3 in your model.. Categories Model ? or in each Model ? Regards Stanley --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group,

cookies ajax

2007-08-08 Thread Michael Augustyniak
to login I use ajax form and I am trying to setcookie on action and it just does not set the cookie in this action . When I redirect the page to different controller , action and set cookies there its working. Why cookie does not work on action with ajax form ? did that setcookie(remember_me,

Re: cookies ajax

2007-08-08 Thread John David Anderson (_psychic_)
On Aug 8, 2007, at 9:51 AM, Michael Augustyniak wrote: to login I use ajax form and I am trying to setcookie on action and it just does not set the cookie in this action . When I redirect the page to different controller , action and set cookies there its working. Why cookie does not

Re: How to build form with multiple records?

2007-08-08 Thread Travis Cline
On Jul 25, 6:27 pm, Geoff Ford [EMAIL PROTECTED] wrote: Hmm.. Very interesting. I had not seen that before. I might have a play later on and see if I can get it to work. I'll let you know how I go. Geoff --http://lemoncake.wordpress.com I've also been interested in seeing what it would

Re: Failure to JOIN and query correctly beyond $recursive = 1 - workarounds or fixes welcome, maybe a bug?

2007-08-08 Thread [EMAIL PROTECTED]
Hi! I've come across the same problem, using hasOne associations, but with an extra problem. in ModelA: $hasOne = array('ModelB' = array('foreign_key' = 'model_b', 'conditions' = array('ModelA.some_field' = 'some_value'))); With this association, if recursive

Re: Link to a location on the same page

2007-08-08 Thread mussond
I changed the name to be #Verbs but when I click it I get redirected to the URL: /top_tiers/index#Verbs. This page displays exactly like / top_tiers/index would. I don't know how I'd implement $html-link() because it asks for a URL and an array but I want the same array. Has anyone got any

How to use recursive option in Model or in controller?

2007-08-08 Thread [EMAIL PROTECTED]
I want filter my subcategories by language_id ( this is a foreign key in categories table and primary key in languages table). I use recursive option ( $this-Subcategory-recursive = 3; ) in my controller but i'm still getting this error. Which value should i use ? 3 or 2 ? Error in my view:

Re: cookies ajax

2007-08-08 Thread Michael Augustyniak
John David Anderson (_psychic_) wrote: On Aug 8, 2007, at 9:51 AM, Michael Augustyniak wrote: to login I use ajax form and I am trying to setcookie on action and it just does not set the cookie in this action . When I redirect the page to different controller , action and set cookies

Cannot instantiate non-existent class

2007-08-08 Thread starkey
Hello all! I'm stumped, can anyone take a moment and help me figure out why I'm getting these errors? Warning: overload() was unable to locate class 'sarossarg' in \cake \cake\basics.php on line 233 Fatal error: Cannot instantiate non-existent class: sarossarg in \cake

Session empty in Ajax call

2007-08-08 Thread simon
Hi, I'm making an Ajax call from the index page of my application to a simple controller called attachments, to a function named add(). I have a session variable called User which I can print on the index page, but which is empty in the attachments controller. If I do a pr($_SESSION) in

custom pagination url

2007-08-08 Thread hausburger
hello. i defined for some parts of my new project some custom-made urls in the routes definition, they look like this: Router::connect('/groups/:group_url/:action/*',array('controller' = 'groups', 'action' = 'show')); Example: http://mywebsite.com/groups/the-name-of-a-group/topic/10/

Re: Session empty in Ajax call

2007-08-08 Thread John David Anderson (_psychic_)
On Aug 8, 2007, at 10:26 AM, simon wrote: Hi, I'm making an Ajax call from the index page of my application to a simple controller called attachments, to a function named add(). I have a session variable called User which I can print on the index page, but which is empty in the

Re: Cannot instantiate non-existent class

2007-08-08 Thread Samuel DeVore
class SarosSarg extends AppModel On 8/8/07, starkey [EMAIL PROTECTED] wrote: Hello all! I'm stumped, can anyone take a moment and help me figure out why I'm getting these errors? Warning: overload() was unable to locate class 'sarossarg' in \cake \cake\basics.php on line 233 Fatal

Re: Cannot instantiate non-existent class

2007-08-08 Thread starkey
Thank you for looking after this noobie. Shawn On Aug 8, 12:58 pm, Samuel DeVore [EMAIL PROTECTED] wrote: class SarosSarg extends AppModel On 8/8/07, starkey [EMAIL PROTECTED] wrote: Hello all! I'm stumped, can anyone take a moment and help me figure out why I'm getting these

Re: Cannot instantiate non-existent class

2007-08-08 Thread Samuel DeVore
So did it work, if so you might spend some time learning to love and live the conventions. http://manual.cakephp.org/appendix/conventions in many ways it is the MOST important part of the manual, if you can live the conventions your life will be so much better (well your life with cakephp)

Re: Session empty in Ajax call

2007-08-08 Thread simon
Not sure... where is the session id located? S On Aug 8, 5:56 pm, John David Anderson (_psychic_) [EMAIL PROTECTED] wrote: On Aug 8, 2007, at 10:26 AM, simon wrote: Hi, I'm making an Ajax call from the index page of my application to a simple controller called attachments, to a

Re: Session empty in Ajax call

2007-08-08 Thread John David Anderson (_psychic_)
On Aug 8, 2007, at 11:19 AM, simon wrote: Not sure... where is the session id located? In your cookies - you can also get it by calling session_id(). -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake

Re: Session empty in Ajax call

2007-08-08 Thread John David Anderson (_psychic_)
On Aug 8, 2007, at 11:25 AM, John David Anderson (_psychic_) wrote: On Aug 8, 2007, at 11:19 AM, simon wrote: Not sure... where is the session id located? In your cookies - you can also get it by calling session_id(). I should mention that if CAKE_SECURITY is set to 'high' the ID will

saving HABTM problems

2007-08-08 Thread [EMAIL PROTECTED]
Hi all, as a nwbie to CakePHP, I experience problems understanding how the whole HABTM mechanism work. So here is the point, I got 2 tables publishers and places related by a HABTM condition. First, I save the publisher data and then the place data and then I try to add the record to the HABTM

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

2007-08-08 Thread [EMAIL PROTECTED]
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 library http://extjs.com/deploy/ext/examples/grid/edit-grid.html I have had little difficulty integrating it into

Re: Cannot instantiate non-existent class

2007-08-08 Thread starkey
Yes, your suggestion did correct the problem. I just had a total brain dump and didn't see the problem. Thank a lot, again! Shawn On Aug 8, 1:12 pm, Samuel DeVore [EMAIL PROTECTED] wrote: So did it work, if so you might spend some time learning to love and live the conventions.

Re: custom pagination url

2007-08-08 Thread hausburger
a hint from felix fixed my problem: in the view: ?php $paginator-options['url']['action'] = '-whatever'; ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group,

Re: Multiple field values in select box?

2007-08-08 Thread Beertigger
Form::select is 1.2 only, no? I'm using 1.1 On Aug 8, 3:05 am, Geoff Ford [EMAIL PROTECTED] wrote: Forget generateList(). Create the array yourself to pass to Form::select() using a custom query if necessary. Sometimes when you are doing something that is a little bit out of the ordinary it

Re: Multiple field values in select box?

2007-08-08 Thread Beertigger
Isn't form::select for 1.2? I'm using 1.1 on this project... On Aug 8, 3:05 am, Geoff Ford [EMAIL PROTECTED] wrote: Forget generateList(). Create the array yourself to pass to Form::select() using a custom query if necessary. Sometimes when you are doing something that is a little bit out

Create a form in 1.1.16.5421

2007-08-08 Thread starkey
I must be totally confused... I'm trying to create a form using Cake's view helpers. So I go to the HtmlHelper::formTag function and it says to use FormHelper::create() instead. Problem is I can't find FormHelper::create() as it is not in Form.php or helper.php.

Re: Create a form in 1.1.16.5421

2007-08-08 Thread starkey
Before I get jumped on... I see stuff like this: form action=?php echo $html-url('/blog/add')? method=post I'm just looking for the create() method. Thanks! Shawn On Aug 8, 4:31 pm, starkey [EMAIL PROTECTED] wrote: I must be totally confused... I'm trying to create a form using Cake's view

generatelist and Formhelper::Select

2007-08-08 Thread libfree
Hi all, I'm new to cake but have been playing with php for a while. I am using Ajax to create a set of select boxes that will create a simple search. When you select the value in one it will decrease the number of options to select from in the following boxes until it finally displays the narrow

Cake validation not working

2007-08-08 Thread marcz908
I am new to cake. I have two tables, customers, and balances. balances belongsTo customers, and customers hasMany balances. customer_id is a foreign key in the balances table. I baked the models, and then the controller with scaffolding. Everything worked as expected so far. Next I baked the

Re: edit skipping to add if no id is sent.

2007-08-08 Thread Pablo Viojo
uhmm, ok On 8/7/07, phpjoy [EMAIL PROTECTED] wrote: it's just one row in a table, i don't need an increase.. it's always id=1. the problem i had was that cakephp wanted an id, and wouldn't send to edit. if no id is found, it sends to the add method automatically, so i bypassed it by

Re: CakePHP+SMF (again?)

2007-08-08 Thread Geoff Ford
Ok - didn't think about the different column names. Maybe you could extend the SessionComponent as SmfSessionComponent to make it a bit cleaner and more portable and put that in Cake snippets or the bakery or somewhere for other people who want to integrate SMF and Cake. SMF seems to be gaining a

Re: How to build form with multiple records?

2007-08-08 Thread Geoff Ford
Luke, I did find what you described but could not get it to work for the input name, only the input value. I recently posted a blog entry on multi-record forms, including redisplaying the errors, although it sounds like you got it sorted, using a similar approach to what I have used in my blog

Re: Link to a location on the same page

2007-08-08 Thread Geoff Ford
Links to the same page do not require the full url so why not use straight html? a name=Verb/ This is where I want to go a href=#VerbSend me there/a Plain and simple. Geoff On 8/9/07, mussond [EMAIL PROTECTED] wrote: I changed the name to be #Verbs but when I click it I get redirected to

Re: Building Facebook app on CakePHP

2007-08-08 Thread Sav
Yeah, I'm struggling with the same issue. It isn't clear as to the best method for integrating CakePHP and the Facebook API. This is as far as I've gotten, and I don't think it is the best way because it gives you access to the $facebook variable in the view and not the other controller

Re: Multiple field values in select box?

2007-08-08 Thread Geoff Ford
OK so use HtmlHelper::select() or selectTag() - I can't remember of the top of my head which one it is. My solutions is still the same - creat the array that you want to display in the listbox manually. Again not sure of the exact array format but something like $data =

Re: Ridiculous User Management Head Melt

2007-08-08 Thread Geoff Ford
Hi Sonic, Glad I could help - see my comments below. Geoff On 8/9/07, Sonic Baker [EMAIL PROTECTED] wrote: Hey Geoff, Thanks for second the reply dude, and thanks even more for your level of detail with your thoughts. The profile stuff is clear to me now and I'll be adapting my current

View this page Cake Apps/Sites In The Wild

2007-08-08 Thread Ryan
Added tierranatal.com --~--~-~--~~~---~--~~ 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: How to use recursive option in Model or in controller?

2007-08-08 Thread Grant Cox
You should use recursive = 2 (0 = just the subcategory, 1 = the category associaton, 2 = the category's language association). You will want to access the language in your view through: echo $filtr_lang['Subcategory']['link']; echo $filtr_lang['Category']['kategoria'];

View question

2007-08-08 Thread pbland
I'm using 1.2 and I'm wondering how to fix a minor issue I have. I have a form with a date field and after the input box I'm displaying a calendar image that when clicked displays a date picker. This all works, but if I leave the field blank and hit submit I get the This field cannot be left

Help With $ajax-link. Can I Slide instead of Hide?

2007-08-08 Thread Baz
I have a few questions involving ajax. This is what I have so far: ?php echo $ajax-link('Ajax', '/contact/', array('update' = 'changediv', 'indicator' = 'loaddiv')); ? My problem is that it uses Element.show. I've seen a slide used on a CakePHP site before. The output was something like this:

Re: Multiple field values in select box?

2007-08-08 Thread Beertigger
Somehow, this seems on the right track, but I couldn't get things to work. Played around with a lot of different variations, but *something* is not quite kosher, yet. Thanks much for the guidance thus far. Should the entire $data = $this-Model-getListData(); // a function in your model that

Re: Multiple field values in select box?

2007-08-08 Thread Geoff Ford
All the code I outlined would be in the controller. You could put the loop in the getListData() function in the model if you like to keep the controller cleaner. The controller would then just be $this-set('listdata', $this-Model-getListData()); Geoff On 8/9/07, Beertigger [EMAIL PROTECTED]

Connect to multiple databases

2007-08-08 Thread Steve Finkelstein
Hi all, How difficult would it be to connect to two databases? They're both on the same server/instance of MySQL, however due to the nature of the application I'd like to deploy using Cake, I need to be able to query two different databases. Oldschool way would be to just write queries with:

RequestHandler not found?

2007-08-08 Thread libfree
I am getting the following error You are seeing this error because the component class RequestHandlerComponent you have set in SalesController can't be found or doesn't exist. I feel like I have to be making a huge mistake somewhere because I can't find anyone else that has this problem. This

Loop with select and insert not working as expected

2007-08-08 Thread phalvrson
I am running CakePHP v 0.2.9, Revision: 4409 and PHP 5 I have a function in a controller whose intent is to read a CSV file and put the fields from each record into the appropriate database. Several of the records can have the same Household information, so I want to only create a new record if

Re: Help With $ajax-link. Can I Slide instead of Hide?

2007-08-08 Thread housebolt
?php echo $ajax-link('Ajax', '/contact/', array('update'='changediv', 'indicator'='loaddiv', 'loading'=showById('loading'); hideById('changediv');, 'complete'=slidedown I believe that's how you do it. I can't remember if you need to add the function() { to it, but I don't have enough time

Simple interaction with my Model class using ajax with jQuery library

2007-08-08 Thread ayampanggang
I want to send data with ajax with jQuery. this data is to be stored inside my ratings table. how should i send the data to my Rating model? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post

ajax redirect

2007-08-08 Thread blange
how do I redirect inside of an ajax request? --~--~-~--~~~---~--~~ 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

Error Handling for big sites.

2007-08-08 Thread phpjoy
Let's say I have a big site application, should I do these kind of error checking after component/model loading: loadComponent('AdminSiteTree'); if(!class_exists('AdminSiteTreeComponent')) $this-cakeError('internalError', null); What do you say? What do you do in your projects?

Re: Connect to multiple databases

2007-08-08 Thread francky06l
See $useDbConfig (model) in documentation. On Aug 9, 3:42 am, Steve Finkelstein [EMAIL PROTECTED] wrote: Hi all, How difficult would it be to connect to two databases? They're both on the same server/instance of MySQL, however due to the nature of the application I'd like to deploy using

Re: Simple interaction with my Model class using ajax with jQuery library

2007-08-08 Thread francky06l
You need a serious look to the manual (cakeForge.org). The Controller should handled your posted form (View) and passed to the Model that is in charge of the storage. It's an MVC framework, please check the manual for the basics. Using jQuery or not does not change the way the controller / model

constants issue

2007-08-08 Thread CakeMan
Hello Friends, do anyone has list of Contants in Cakephp. i have seen in the manul but they will not do me good in my task. What i need is :- Suppose we have a URL such as http://mysite.com/insidecake/events/view/28/12/2016 i want to extract URL upto http://mysite.com/insidecake/events; how