Re: Best way to manage tags

2008-10-09 Thread Joe
Well perhaps some more information on what exactly you're doing with "as", "bs" and "cs" would help. I'd venture a guess that if the functionality of these models are so similar that you probably want to find a way to combine them. Are they simply small changes to, essentially, the same data? If s

AW: Recursive Association in Model

2008-10-09 Thread Liebermann, Anja Carolin
Hit me, but I don't see the real difference / improvement between http://pastebin.com/m354d1d17 and http://pastebin.com/f31071d88 Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von SamuraiDio Gesendet: Donnerstag, 9. Oktober 2008 15:

AW: Access $this->Session from a model

2008-10-09 Thread Liebermann, Anja Carolin
Hi Gonzalo, thank you for your advice. You are right in both. Nevertheless I confess I am to lazy now to pipe my user session data through 3 models ( first controller -> calls model -> calls next model) so I will be naughty and do it with App::import('Model', 'CakeSession'); which works by the w

Auth -> User model association problem

2008-10-09 Thread Duncan
Hi, I have a User model, which belongsTo a Group model. When using the user model itself, I get the correct association data for the Group model, but when using the Auth component, then I only get the User model itself in the auth session array, e.g.: [Auth] => Array ( [User]

Re: Reorganizing the paths

2008-10-09 Thread Steve
Let me just update that bootstrap code. I got rid of the extra loop: if ($handle = opendir(ROOT.DS.APP_DIR.DS.'modules')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { if (is_dir(ROOT.DS.APP_DIR.DS.'modules'.DS.$file)

Reorganizing the paths

2008-10-09 Thread Steve
Hello, I'm thinking of grouping "modules" together for the purpose of keeping things separate not only by MVC but also by module. So I was thinking of having my directory structure look like the following: - /config - /modules - /post - /models - /controllers - /views - /

Re: Instance methods in Models

2008-10-09 Thread teknoid
in the Product model: function getTotal($id) { return Set::extract($this->find('all', array('conditions'=>array( 'Product.order_id'=>$id ), 'fields'=>array( 'SUM(id

Re: Instance methods in Models

2008-10-09 Thread David C. Zentgraf
Yeah you're right, Cakes models are DAOs. That is due to objects carrying a certain overhead in PHP (4), whereas they're virtually free in Ruby. There have been discussions about this before on the list. IIRC, Cake is slated to become OO by 2.0. I'd still say your question was aimed at (in

Re: Instance methods in Models

2008-10-09 Thread cbankier
Thanks for the reply. Actually "instance method" is exactly what I mean, as per http://en.wikipedia.org/wiki/Instance_method I think my confusion is with the fact that cake Models can only return arrays of data, not objects as I am used to from rails/Java. I guess the Model is really a DAO, not

Re: AppController being ignored

2008-10-09 Thread David C. Zentgraf
Paste your EventsController too... On 10 Oct 2008, at 00:06, Fibra wrote: > > Hello Everyone, how are you? > > I've read this issue in other posts but most of the solutions are > becouse they've updated to a newer version. > > Since I just downloaded the latest stable version on cake, > cake_1.

Re: Non alphanumeric chars breaks $validate error messages

2008-10-09 Thread R. Davila
Saving the file in UTF-8 did the trick. It seems that Eclipse on Windows defaults to cp1252 when saving files. I changed it to UTF-8. Now I have to see if Eclipse on my Limux laptop has the same behavior. Thanks!!! [EMAIL PROTECTED] wrote: > Actually it happens everywhere and I hadn't noticed i

HABTM, tablePrefix, joinTable issues

2008-10-09 Thread comb
I've seen variants of issues involving these topics posted, but not this particular one. I use a master "_users" table and "_groups" table in my projects. A given project will have tablePrefix set to "projectname_" and all the tables specific to that project are correctly named "projectname_table

Best way to manage tags

2008-10-09 Thread Lukas
Hi, lets say i have 4 models as, bs, cs and tags, as, bs, cs has HABTM relations to tags model. The problem is that all logic is almost the same in all 3 models except for linking model name. I'm wondering witch way is the best to do it? 1) have "same" methods in each model 2) put all logic i

Re: Getting route-URL for internal controller/action-URL

2008-10-09 Thread Turnquist, Jonah
This interests me. What if you have two routes set up though, like so: Router::connect('/gruppenAA', array('controller' => 'groups', 'action' => 'index')); Router::connect('/gruppenBB', array('controller' => 'groups', 'action' => 'index')); Now what would the below return? '/gruppenAA' or '/gru

Re: CakePHP Install Problem

2008-10-09 Thread 3lancer.eu
Hi, Can you supply us some configs and logs? Maybe it's a matter of a trailing slash somewhere, Cake can bring you pain with that sometimes... Regards, Piotr --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP

Re: Sql query response handling

2008-10-09 Thread Joe
Despite bypassing Cake's normal methods for retrieving information from the DB, it's still going to return it to you in a manner consistent with how data is usually returned from a model, one row or not. This actually makes sense as a lot of people generally use ->query() to perform commands that

Re: CakePHP Install Problem

2008-10-09 Thread darwin2kx
No file permission problem. It is a dev server that I have been using for years, running on my own system, where I am logged in as admin with all permissions. Server runs under same permissions, so there is no issue there. --~--~-~--~~~---~--~~ You received this mes

Re: How to update two divs with $ajax->link ??

2008-10-09 Thread qwanta
I am not an authority on this, but I had a similar problem that I had to solve. Basically, it helps to understand that an ajax call gets a simple text string back from the server. This text string is generated by the controller function specified in your ajax call. So really what you want to do i

Tree reorder method won't work if other model methods are called first

2008-10-09 Thread Corie
I'm having a strange issue with the Tree behavior method, reorder(). If I do this it works: function order() { $this->Page->reorder(array('field' => 'Page.order', 'order' => 'ASC')); } But if I do this, it won't reorder the tree: function order() { $this->data = array();

Re: 500 Internal Server Error - GoDaddy

2008-10-09 Thread 3lancer.eu
Hi, > I don't have access to the Apache logs, and I have spent a few days > looking for a solution to the this problem and have had no luck Personally, I'd suggest you spent 5 minutes on e-mailing GoDaddy instead. If you don't even have the Apache logs there are just too many possibilities... R

500 Internal Server Error - GoDaddy

2008-10-09 Thread djXternal
Ok I have ran cakePHP on my local server just fine, but when I upload to my GoDaddy shared hosting account I get some errors. mod_rewrite is supposed to be enabled, and I got the document root set to /cake/app/webroot I can load the default cake page with styling just fine by going to: http://ww

Re: Undefined index when saving HABTM with extra fields

2008-10-09 Thread red
Oh, I forgot, here is SQL dump: SELECT COUNT(*) AS `count` FROM `products` AS `Product` WHERE `Product`.`id` = 3 UPDATE `products` SET `id` = 3, `name` = 'ddd', `description` = '', `price` = 5.00, `special_price` = 6.00, `quantity` = 7, `weight` = 10.00, `active` = 1, `modified` = '2008-10-09 19:

Re: CakePHP Install Problem

2008-10-09 Thread hydra12
It really sounds like a permissions problem. I know you checked it already, but does the user that apache runs as have permissions to view the page? On Oct 9, 11:08 am, darwin2kx <[EMAIL PROTECTED]> wrote: > No file permission problems. > AllowOverride is set to All. --~--~-~--~~

Undefined index when saving HABTM with extra fields

2008-10-09 Thread red
Hello all, I'm getting something strange with HABTM relations. I follow instruction from here: http://teknoid.wordpress.com/2008/09/24/saving-extra-fields-in-the-join-table-for-habtm-models/ Now, two examples: When I'm creating new Product this works perfect: $this->Product->bindModel(array('ha

Re: newbie question

2008-10-09 Thread Janis Rough
Disregard this message, sorry, I ran the query again without the word "default" and it worked without any errors. - Original Message From: Janis Rough <[EMAIL PROTECTED]> To: cake-php@googlegroups.com Sent: Thursday, October 9, 2008 8:06:16 AM Subject: Re: newbie question I just insta

Re: How to call Thick box

2008-10-09 Thread BrendonKoz
I'm confused why you'd use a jQuery solution, and then try to use Cake to create a link directly to it? Why not point to the standard cake login for the link, and override the click action using jQuery itself, to force open the login box using Thickbox? That way you cover the issue of people wit

Re: Sub-Layouts, do they exist or how to implement them.

2008-10-09 Thread BrendonKoz
I was hesitant to reply yesterday as I haven't looked closely enough at the API or documentation to know if this would work, but... Thinking it through, in my head, I thought perhaps you could add some code in the application's AppController in one of the specialty methods (afterRender?) to modif

Re: Linking to non-admin action from admin-action

2008-10-09 Thread Kappa
In order to redirect to an admin action, just put the key 'admin'=>true into the array of redirection. On Oct 9, 6:15 pm, Fran Iglesias <[EMAIL PROTECTED]> wrote: > Hi, > > El 09/10/2008, a las 18:11, Sam Sherlock escribió: > > > I think you have to add prefix => false to the array 2nd param   >

Re: Linking to non-admin action from admin-action

2008-10-09 Thread Fran Iglesias
Hi, El 09/10/2008, a las 18:11, Sam Sherlock escribió: > I think you have to add prefix => false to the array 2nd param > passed to link - but it might be admin => false (I thnk its the > former allowing the admin.routing to be changed eg members or ewoks) A complete post by AD7six http:/

Re: Linking to non-admin action from admin-action

2008-10-09 Thread Sam Sherlock
I think you have to add prefix => false to the array 2nd param passed to link - but it might be admin => false (I thnk its the former allowing the admin.routing to be changed eg members or ewoks) 2008/10/9 MikeB <[EMAIL PROTECTED]> > > I have a users controller with 2 actions, view() and admin_ad

Re: CakePHP Install Problem

2008-10-09 Thread darwin2kx
No file permission problems. AllowOverride is set to All. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group,

timeAgoInWords() does not return plural words

2008-10-09 Thread momo
I'm using the timeAgoInWords() in the TimeHelper, the time it returns is good but the words are always in plural, like '6 hour, 23 minute ago'. As I understand it should also return the words in plural, but it doesn't. This is my code: echo $time->timeAgoInWords($user['User']['updated']); And

Re: newbie question

2008-10-09 Thread Janis Rough
I just installed it. Sorry I didn't research the list further. I do have another question on the tutorial. I tried running these sql create statements and they didn't work. I got 2 errors. I wonder why? 1 SQL query: CREATE TABLE posts( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY , title

Linking to non-admin action from admin-action

2008-10-09 Thread MikeB
I have a users controller with 2 actions, view() and admin_add(). I've tried to create a link in the admin_add view that points the user to view(), however it keeps /admin/ in the url it generates. I'm using the link method in the Html helper and I don't understand how to prevent this. Here is so

Re: newbie question

2008-10-09 Thread Janis Rough
WEll this is just a test I'll do it on a server later - Original Message From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> To: cake-php@googlegroups.com Sent: Wednesday, October 8, 2008 8:09:52 PM Subject: Re: newbie question I think it may be best if you use a real server! On 10/08/200

Recursive Association in Model

2008-10-09 Thread SamuraiDio
Hi... A friend of mine is developing an application with uses a recursive hasMany association in a Model. Everything is working fine, except that the obtained data array is ugly, and dificult to work on. This is the Model definition: class PlanoConta extends AppModel { var $name = 'PlanoConta

Re: newbie question

2008-10-09 Thread Janis Rough
thanks, - Original Message From: techiguy <[EMAIL PROTECTED]> To: CakePHP Sent: Wednesday, October 8, 2008 8:44:23 PM Subject: Re: newbie question yes ofcource u can use with XAMPP on windows. i am also working on that with out any problem. before u start make sure u have checked

AppController being ignored

2008-10-09 Thread Fibra
Hello Everyone, how are you? I've read this issue in other posts but most of the solutions are becouse they've updated to a newer version. Since I just downloaded the latest stable version on cake, cake_1.2.0.7692-rc3.tar.bz2 I must ask for help. Here's the thing: I have my routing.admin turne

Using requestAction() on a hidden method i.e. _navigation()

2008-10-09 Thread MikeB
I need to be able to create a navigation used across my site on many pages. This particular navigation is table-driven from the categories table. It seems like using requestAction() of the categories controller in an element, navigation.ctp, would be the perfect solution. I got all that to work f

Re: Avoid requestAction

2008-10-09 Thread mark_story
Wow I should really read the whole thead before responding... Glad you got it working though. As for performance, requestAction simulates another request to your server, minus most of the bootstrapping and class loading. -Mark ps. apologies for the double post. On Oct 9, 6:32 am, "Liebermann,

Re: Avoid requestAction

2008-10-09 Thread mark_story
Well you can access related models through associations. so $this- >HotelInfo->HotelInfoMaster->save() or any method on the HotelInfoMaster model. I would also take the code fetching the data from hotelInfoMastersController::getHotelInfoMaster() and move it into the model to make it more accessi

Re: Access $this->Session from a model

2008-10-09 Thread Gonzalo Servat
On Thu, Oct 9, 2008 at 10:41 AM, Liebermann, Anja Carolin < [EMAIL PROTECTED]> wrote: > > Hi all, > > Now that I have placed a function in my model rather than in my > controller to avoid requestAction I have a new problem: > > The function gets data from my session. > In the controller the follow

Sql query response handling

2008-10-09 Thread igor'OK
Hi guys I do sql query for example $this->query('SELECT now()'); and i get response like this Array ( [0] => Array ( [0] => Array ( [now()] => 2008-10-09 17:16:21 ) ) ) Why not just return response in a single

Re: How to call Thick box

2008-10-09 Thread grigri
This should work: echo $html->link( 'Login', '/ajaxLogin.htm?height=100&width=250', 'class' => 'thickbox' ); On Oct 9, 2:07 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Thanks to reply ! > > I follow up your solution but could not succeed. > I did not get how to pass .htm extension

Re: Date in another language

2008-10-09 Thread Simonas Juodelis
I don't know if this have changed in recent vesions (I use older one - 1663), but when I need to translate some application to another language I do this way ( for example for my (lithuanian) language): create directory cake/app/locale/lit/LC_MESSAGES/ put here file "default.po" contents of this

Re: How to update two divs with $ajax->link ??

2008-10-09 Thread Anna P
Hi again! I tried this way: link('Frame product', '/products/frameimage/'. $p['Product']['id'], array('update' => array('p-image','p-link')); ?> so as the second argument I gave link. But the problem is that I want to update two divs with two different things (so I want to call two functions (two

Access $this->Session from a model

2008-10-09 Thread Liebermann, Anja Carolin
Hi all, Now that I have placed a function in my model rather than in my controller to avoid requestAction I have a new problem: The function gets data from my session. In the controller the following works: $user = $this->Session->read('User'); When I place this code i

Re: anyone know why this session check does not work like it suppose to

2008-10-09 Thread Gabriel Kolbe
ha-ha, thanks, so obvious! On Thu, Oct 9, 2008 at 2:07 PM, 3lancer.eu <[EMAIL PROTECTED]> wrote: > > Hi, > > There is essential difference between read() and check() methods of > the Session class. > > However, you should rather use the following convention: > http://book.cakephp.org/view/247/Aut

Re: anyone know why this session check does not work like it suppose to

2008-10-09 Thread 3lancer.eu
Hi, There is essential difference between read() and check() methods of the Session class. However, you should rather use the following convention: http://book.cakephp.org/view/247/AuthComponent-Methods#user-387 Regards, Piotr --~--~-~--~~~---~--~~ You received t

Re: How to call Thick box

2008-10-09 Thread [EMAIL PROTECTED]
Thanks to reply ! I follow up your solution but could not succeed. I did not get how to pass .htm extension, hight and width. my login.ctp file contains create('User', array('controller' => 'login', 'action' => 'login')));?> Email text('email', array(

anyone know why this session check does not work like it suppose to

2008-10-09 Thread gabriel
I login, then want to check the session if a person has admin rights If I login as an 'admin' where the role = admin or if I login as a non- admin where the role=0, it displays in both situations the admin area link... the script: if ($session->check('Auth.User.role') == 'admin') { e

Re: Date in another language

2008-10-09 Thread Fernando Mendonça
Hi, I didn't define translation of months. How can I do that? I've just created the two directories: cake\myappdir\locale\pt_br I don't know what I have to write in this file (default.po). On 9 out, 09:41, Simonas Juodelis <[EMAIL PROTECTED]> wrote: > I see that months are defined in forms he

Re: CakePHP Install Problem

2008-10-09 Thread [EMAIL PROTECTED]
A few quick suggestions: File permissions. Allow Override All set in Apache? /Martin darwin2kx wrote: > I have grabbed the latest (rc3) release as my fresh install. This is > my first time with CakePHP, so I took a look at the instructions. > After unpacking and dumping the dir to my web server

Re: Date in another language

2008-10-09 Thread Simonas Juodelis
I see that months are defined in forms helper, on line 01658 (http://api.cakephp.org/1.2/form_8php-source.html#l01658) and it should be translated. Have you defined translation of months in your language translation (*.po) files? br, Simonas, Fernando Mendonça wrote: > Hello > > I'm using cake

Re: how to debug console execution?

2008-10-09 Thread Defranco
no one? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" 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,

Event handling without requestAction?

2008-10-09 Thread [EMAIL PROTECTED]
Hi, requestAction is always the black sheep in Cake and I keep reading statements that suggest that you would practically never ever need them. So for fun, see this as a challenge if you like. Try to get around requestAction here where I have failed: I need periodical updates and event-based not

Re: Site powered by CakePHP

2008-10-09 Thread dezpo
I'm using 1.2RC3. Everyday I update to the newest cake from svn :) On Oct 9, 12:25 pm, Deon Heunis <[EMAIL PROTECTED]> wrote: > One thing, don't make options available that displays empty data sets: > > http://www.autolive.org/by-make/Mercedes-Benz > > That's annoying from a user experience point

Re: Sub-Layouts, do they exist or how to implement them.

2008-10-09 Thread Marc Campeau
Thanks for your time Adam. You're right that I could switch layouts but that's not what I was looking for, I was trying to avoid putting switching logic in the default layout, controller or views. I guess what I wanted to know is if there's some kind of equivalency to ASP,Net Masterpages. The con

Re: Date in another language

2008-10-09 Thread Fernando Mendonça
Hello I'm using cakephp cake_1.2.0.7296-rc2 This version is not the newest? Thanks On 9 out, 08:27, Simonas Juodelis <[EMAIL PROTECTED]> wrote: > Hi, > > what version on CakePHP you are using? I'm asking, because months were > translated into other languages only in recent versions.  Probably

Re: Site powered by CakePHP

2008-10-09 Thread Deon Heunis
One thing, don't make options available that displays empty data sets: http://www.autolive.org/by-make/Mercedes-Benz That's annoying from a user experience point of view. Phang Mulianto wrote: > nice simple project . . . > > what version you are using ? > > > ---

Re: Date in another language

2008-10-09 Thread Simonas Juodelis
Hi, what version on CakePHP you are using? I'm asking, because months were translated into other languages only in recent versions. Probably you are using old version. Please try downloading newest version of CakePHP. br, Simonas. Fernando Mendonça wrote: > Hello everybody, > > I'm trying to c

CakePHP Install Problem

2008-10-09 Thread darwin2kx
I have grabbed the latest (rc3) release as my fresh install. This is my first time with CakePHP, so I took a look at the instructions. After unpacking and dumping the dir to my web server (WinXP, Apache 1.3, PHP 5.2.6), I try to access /cake/ and get Forbidden You don't have permission to access

Re: find('all') and recursive=-1 problem

2008-10-09 Thread nastya
Thank you grigri for your help!!! I'll submit a ticket. On Oct 9, 1:22 pm, grigri <[EMAIL PROTECTED]> wrote: > I see... looking through the translate behavior code, it seems that > the translate joins are added directly via the the joins[] query > parameter; which bypasses the normal joined model

Adding a translatable field results on incomplete query result.

2008-10-09 Thread ygneo
Hi everybody. I'm using the translate behavior in cake 1.2 like this, in a model called "Regalo": var $actsAs=array("Translate"=>array("titulo", "entradilla", "descripcion")); But I need a new field, so I've added: var $actsAs=array("Translate"=>array("titulo", "entradilla", "observaciones", "

Re: newbie question

2008-10-09 Thread xavierunited
Ok Great! On 10/09/2008, Gabriel Kolbe <[EMAIL PROTECTED]> wrote: > > I user Xampp, and it works like a dream !! > > On Thu, Oct 9, 2008 at 4:09 AM, <[EMAIL PROTECTED]> wrote: >> >> I think it may be best if you use a real server! >> >> On 10/08/2008, JRough <[EMAIL PROTECTED]> wrote: >>> >>> I

Re: find('all') and recursive=-1 problem

2008-10-09 Thread grigri
I see... looking through the translate behavior code, it seems that the translate joins are added directly via the the joins[] query parameter; which bypasses the normal joined models. As a temporary workaround, I'd suggest doing this: $this->User->find('all',array('recursive'=>-1, 'fields' => a

Re: How to call Thick box

2008-10-09 Thread Amit Badkas
2008/10/9 [EMAIL PROTECTED] <[EMAIL PROTECTED]> > > Hi, > > I am using a jquery thickbox plugin for login. I created users > controller and login action using Auth component. > I want to call this thickbox plugin in default.ctp and link should be > like here : > > link('Login Title', 'login.htm? >

Re: image links in pagination

2008-10-09 Thread Amit Badkas
2008/10/9 nitifixis <[EMAIL PROTECTED]> > > Just one question. Is it possible to make image links equivalent to > the text ones ($paginator->prev() and $paginator->next()) using the > PaginatorHelper? > - Yes, you can use image in pagination link like $paginator->prev($html->image('prev.gif', arr

Re: Site powered by CakePHP

2008-10-09 Thread Phang Mulianto
nice simple project . . . what version you are using ? - any spare time ? http://komikz.blogsite.org - On Thu, Oct 9, 2008 at 5:58 AM, Gabriel Kolbe <[EMAIL PROTECTED]> wrote: > > Looks good, how do

Date in another language

2008-10-09 Thread Fernando Mendonça
Hello everybody, I'm trying to change the values of my date´s SELECT but it's not working. I need the values like "January", "February" appears in Portuguese in to SELECT. I already put "setlocale(LC_ALL, "pt_BR.utf-8"); " in my "bootstrasp.php" in the application directory (myapplication/config/

How to call Thick box

2008-10-09 Thread [EMAIL PROTECTED]
Hi, I am using a jquery thickbox plugin for login. I created users controller and login action using Auth component. I want to call this thickbox plugin in default.ctp and link should be like here : link('Login Title', 'login.htm? height=100&width=250'); ?> I am confused that how can make a act

Re: Sub-Layouts, do they exist or how to implement them.

2008-10-09 Thread Adam Royle
Is it possible for you to create multiple layouts and set var $layout = "alternate" in your controller? You could share headers and footers etc between the layouts by using elements. It's also possible to change the layout dynamically in your view, or set variables for your layout from inside th

Avoid requestAction

2008-10-09 Thread Liebermann, Anja Carolin
Hi Siegfried, hi Martin, Now it works what I did: In my controller hotels_controller.php I have set (might not be necessary): var $uses = array('Hotel','Hotelinfo'); And used the syntax $this->data = $this->Hotelinfo->add($hotelmaster_id,$this->Hotel->id); Which calls now in my model hotelinfo

Re: Instance methods in Models

2008-10-09 Thread David C. Zentgraf
Not quite sure if "instance methods" is the right term for what you're asking for, but anyway. Look into Model::read() and Model::set(); A Model::find() will only return the data, it will not persist it in the model instance. set() is used to, well, set data inside the model, i.e. it will b

Form Helper

2008-10-09 Thread franova
Hi Guys... My knowledge about PHP is not very well. And cakePHP can help me to learn PHP. at this time, i have problem with my project. how to use form helper in the cakephp 1.1 thanks guys --~--~-~--~~~---~--~~ You received this message because you are subscr

Re: Avoid requestAction

2008-10-09 Thread Siegfried Hirsch
> $this->data = $this->Hotel->Hotelinfo->add($hotelmaster_id,$this->Hotel->id); calls the function add() in your model Hotelinfo - not in the controller. So as Martin has suggested, move the code for retriving or adding your information into the model and your should be done. On Thu, Oct 9, 2008

image links in pagination

2008-10-09 Thread nitifixis
Just one question. Is it possible to make image links equivalent to the text ones ($paginator->prev() and $paginator->next()) using the PaginatorHelper? Thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: find('all') and recursive=-1 problem

2008-10-09 Thread nastya
then it triggers everything with Group and Style which I don't need. If Translate behavior works with joins why does it put in the query: SELECT `User`.*, `Group`.*, `Style`.* when recursive = -1? this is not good, is it? especially that JOIN to I18n actually stays intact! it works fine with r

Re: Avoid requestAction

2008-10-09 Thread [EMAIL PROTECTED]
If Hotelinfo belongsTo Hotel I imagine you have (or could have) a hasOne (probably) association the other way. The point is that if you have an association between the models they have automatic access to each-other. In Hotel you could go: $this->Hotelinfo->doSomething(); or even $this- >Hotelin

Avoid requestAction

2008-10-09 Thread Liebermann, Anja Carolin
Hello Siegfried, Now I try it this way: In my controller hotels_controller.php I have set: var $uses = array('Hotel','Hotelinfo'); And replaced $this->data = $this->Hotelinfo->requestAction('hotelinfomasters/getHotelinfomaster/'.$hotelmaster_id); By $this->data = $this->Hotel->Hotelinfo->add

Re: find('all') and recursive=-1 problem

2008-10-09 Thread grigri
It's not a bug. The translate behavior works with joins; ergo if you disable all joins (recursive -1) it won't work. Try setting recursive to 0. On Oct 9, 10:24 am, nastya <[EMAIL PROTECTED]> wrote: > you are right. It's Translate behavior. As soon as I betach it the > query works... > > the ques

Re: Site powered by CakePHP

2008-10-09 Thread Gabriel Kolbe
Looks good, how do you join the project? By registering in the site? On Wed, Oct 8, 2008 at 8:58 PM, dezpo <[EMAIL PROTECTED]> wrote: > > Hello bakers, > Just wanted to show you what I have did in the past 2 months using > cakephp. This is my new site about car fans. If you have time please > try

Re: Form Helper

2008-10-09 Thread Siegfried Hirsch
FormHelper in 1.1 is very restricted. There was a great rewrite of HtmlHelper and FormHelper between 1.1 and 1.2. Maybe you should give 1.2 a try. On Thu, Oct 9, 2008 at 9:38 AM, franova <[EMAIL PROTECTED]> wrote: > how to use form helper in the cakephp 1.1 --~--~-~--~~

Re: newbie question

2008-10-09 Thread Gabriel Kolbe
I user Xampp, and it works like a dream !! On Thu, Oct 9, 2008 at 4:09 AM, <[EMAIL PROTECTED]> wrote: > > I think it may be best if you use a real server! > > On 10/08/2008, JRough <[EMAIL PROTECTED]> wrote: >> >> I want to try out Cakephp. Do you know if I can use it with XXAMP on >> Windows j

Integrating phpCAS with cakephp

2008-10-09 Thread Stef
Note : this message is also posted to: http://www.cakephpforum.net I want to implement the following scenario: 1) User request for information about his account --> http://localhost/users/view/stef 2) Because this is a protected page, my php code forwards to the http://localhost/users/login pag

Instance methods in Models

2008-10-09 Thread cbankier
Hi, I'm new to Cake, but have used rails quite a bit as well as Java frameworks etc. Is it possible for a model to have instance methods? eg have behaviour that depends on the objects state - the fundamental concept of objects. Here is an example of something I might do in rails/Java. The syntax

API documentation update for RC3

2008-10-09 Thread Siegfried Hirsch
Hello do not know who is in charge of it, but would it be possible to update the API documention to RC3. http://api.cakephp.org/ still shows RC2 API docs. If there is anything I could do to make it happen I am willing to help. Or am I missing something ? Thanks a lot Siegfried --~--~-

Re: newbie question

2008-10-09 Thread xavierunited
I think it may be best if you use a real server! On 10/08/2008, JRough <[EMAIL PROTECTED]> wrote: > > I want to try out Cakephp. Do you know if I can use it with XXAMP on > Windows just for testing or do I have to install it on a real server? > > thanks, > > > > -- Xavier A. Mathews Student/D

Re: Multiple HABTMs

2008-10-09 Thread Yodiaditya
You can use HasMany and BelongsTo : OS hasMany requirements (on model OS) browsers hasMany requirements (on model browsers ) requirements belongsTo OS, browsers (on model requirements) check on manual.cakephp.org about explanation using association hasMany and belongsTo On 10/9/08, Ralle <[EMA

Re: find('all') and recursive=-1 problem

2008-10-09 Thread nastya
you are right. It's Translate behavior. As soon as I betach it the query works... the questions are now the same: can someone help to change Translate behavior or find function to eliminate this error? is there a way to get it work? or I have to submit a bug? On Oct 8, 7:41 pm, teknoid <[EMAIL

Re: find('all') and recursive=-1 problem

2008-10-09 Thread nastya
thank you for your answer, teknoid. yes, tried: $this->User->recursive = -1; $this->User->contain = false; ...->find( 'all', array('recursive' => -1)); ...->find( 'all', array('contain' => false)); and combinations of those... is their anything else to try? if not, can someone help to change Tra

Re: Getting route-URL for internal controller/action-URL

2008-10-09 Thread Andreas Hofmann
Ah yeah, works!! Cool, thx! I tried Router::url() before, but with the URl as a string. with an array of controller/action it works like expected!! Thanks again!! On 9 Okt., 10:53, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote: > I believe what you're looking for is $html->url() or, more direct

Multiple HABTMs

2008-10-09 Thread Ralle
Here's the situation: table browsers: id name table operatingsystems: (OS) id name table requirements id name user_id etc. etc. I need to link requirements to a browser and OS combination. E.g. one requirement needs to be fulfilled in XP/Firefox, XP/IE7 and Ubuntu/Firefox How would my join tab

Re: Getting route-URL for internal controller/action-URL

2008-10-09 Thread David C. Zentgraf
I believe what you're looking for is $html->url() or, more direct, Router::url(). http://api.cakephp.org/class_router.html#a34cdc409ebe46302682fb8c242c4838 Also, you should lookup URLs with an array like array('controller' => 'groups', 'action' => 'something') instead of /groups/something. Seem

Re: Join instead of LEFT JOIN

2008-10-09 Thread Deon Heunis
Ok, so I got it working now with this in my controller $this->paginate['conditions'] = array( 'Job.name IS NOT NULL' ); Would be cool if you can setup your model like this: var $belongsTo = array( 'Job' => array('className' => 'Jo

Re: How to update two divs with $ajax->link ??

2008-10-09 Thread Siegfried Hirsch
you can just use it like this: $ajax->link("Delete this post", array("update" => array("div1", "div2"), "url" => "delete/{$postid->id}")); On Thu, Oct 9, 2008 at 10:31 AM, Anna P <[EMAIL PROTECTED]> wrote: > > Hi! > I have a problem with updating divs with ajax component. I use $ajax- >>link to

Re: Getting route-URL for internal controller/action-URL

2008-10-09 Thread Andreas Hofmann
Ah, I remember the word for this thing I'm looking for: A Lookup :P On 9 Okt., 10:23, Andreas Hofmann <[EMAIL PROTECTED]> wrote: > Hi all, > > i discovered the whole Router-class-definition, but I found no method, > that matches my needs :) > Is there any way to get the URL of a defined route for

How to update two divs with $ajax->link ??

2008-10-09 Thread Anna P
Hi! I have a problem with updating divs with ajax component. I use $ajax- >link to update one div which holds picture thumbnail and link to its original size and I have to update another div with just link to the picture. How can I update two divs with one $ajax->link ? Cheers! --~--~-~--~

Re: Avoid requestAction

2008-10-09 Thread Siegfried Hirsch
Hello Anja, if I ever call requestAction then I do it in the approach, that Gwoo has mentioned in the cakery with caching turned on for the individual element. But otherwise I would first look at your models. If hotelmasterinfo is somehow related to your current hotelinfo model, then you could ju

Getting route-URL for internal controller/action-URL

2008-10-09 Thread Andreas Hofmann
Hi all, i discovered the whole Router-class-definition, but I found no method, that matches my needs :) Is there any way to get the URL of a defined route for an internal cake-controller/action-URL. For example I have this route defined: Router::connect('/gruppen', array('controller' => 'groups

  1   2   >