Re: Generate List of Full Names

2007-12-10 Thread aniston
Just an indicator that might help you, its an example on db column merging with concat http://groups.google.com/group/cake-php/msg/1a8b39d9062c21f3 (hth) aniston On Dec 11, 3:15 am, "Gould, Adrian" <[EMAIL PROTECTED]> wrote: > Problem: > > The table AUTHORS has the fields (id, given_name, last_n

Re: $this->Session->setFlash(' -- msg here -- '); not showing up on 1.2.x

2007-12-10 Thread Louie Miranda
Thanks a lot everyone! On Dec 11, 2007 12:13 AM, daphonz <[EMAIL PROTECTED]> wrote: > > Also make sure you have something in your view to display the message: > > if($session->check('Message.flash')): >$session->flash(); >endif; > ?> > > Or the like. > > -Casey > >

Re: set a date on default.ctp, on all pages?

2007-12-10 Thread Louie Miranda
Thanks a lot everyone! On Dec 10, 2007 5:45 PM, abstract <[EMAIL PROTECTED]> wrote: > > or, if You need to place in all views something more sophisticated, > You can add > $this->set(...) to beforeFilter in app_controller > > On Dec 10, 7:03 am, "Louie Miranda" <[EMAIL PROTECTED]> wrote: > > I ha

Re: PHP Fatal error: Class 'Shell' not found in .../cake/console/libs/bake.php on line 37

2007-12-10 Thread Louie Miranda
Got it... On 1.2.x use... /usr/local/php5/bin/php cake/console/cake.php cake.php, note bake.php On Dec 11, 2007 3:23 PM, Louie Miranda <[EMAIL PROTECTED]> wrote: > currently on /www/cake/... > > unix$ /usr/local/php5/bin/php cake/console/libs/bake.php > PHP Fatal error: Class 'Shell' not foun

Re: baking problem

2007-12-10 Thread Louie Miranda
Oh i think i got it!! /usr/local/php5/bin/php cake/console/cake.php Welcome to CakePHP v1.2.0.5875 pre-beta Console --- Current Paths: -working: /adminpage/app -root: .../adminpage -app: .../adminpage/app/ -core: ...

Re: baking problem

2007-12-10 Thread Louie Miranda
Also have the same problem. Hope someone knows the answer. On Dec 7, 4:22 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Here's one for all you Cake experts out there - I'm just trying to use > 'bake' for the first time having just setup 1.2 in my 'mysite' > directory. General cake index pa

PHP Fatal error: Class 'Shell' not found in .../cake/console/libs/bake.php on line 37

2007-12-10 Thread Louie Miranda
currently on /www/cake/... unix$ /usr/local/php5/bin/php cake/console/libs/bake.php PHP Fatal error: Class 'Shell' not found in .../cake/console/libs/bake.php on line 37 Any ideas? this is cake 1.2.x -- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com Security Is A Series Of Well

findAll, associations, HABTM

2007-12-10 Thread Mr-Yellow
https://trac.cakephp.org/ticket/633 https://trac.cakephp.org/ticket/1209 http://groups.google.pl/group/cake-php/browse_thread/thread/d9468ba788c5ac2c/fb23c6ada4ae8ccd?#fb23c6ada4ae8ccd So it's broken and has been for a year? This is really odd. to my thinking, without findAll working properl

Re: BuiltWith.com Detects CakePHP - But How?

2007-12-10 Thread Baz
Yep, session key was it. On Aug 15, 2007 9:45 AM, rtconner <[EMAIL PROTECTED]> wrote: > > Maybe it seems the date[Model][field] input format. That's a pretty > good giveaway. > > On Aug 15, 9:11 am, "Samuel DeVore" <[EMAIL PROTECTED]> wrote: > > wonder if there could be an adopted convention with

Re: Multiple N to Distinct N Model

2007-12-10 Thread Santa
I considered option 2 as I believe this is a fairly straight forward model and it should be handled quite easily by cake. I have completed the "baking" as per your "recipe" and here is what I have come up with. When I bake the controller and the views, it gives me an error in the controller. Let

Re: Function aliases will be deprecated?

2007-12-10 Thread Samuel DeVore
On Dec 10, 2007 9:52 AM, Samuel DeVore <[EMAIL PROTECTED]> wrote: > I don't think it does, but joel moss was pondering the fact that the > cake core code seems to be replacing some of those aliased functions > internally with the direct call. I just thought that it was for small > performance boo

Re: Conditions and recursion

2007-12-10 Thread Baz
1. recursive only goes up to 3. 2. I've never seen a condition with a "group by". What are you trying to accomplish? 3 .Maybe you should just unbind the Item and rebind it with a custom query by filling in finderQuery. Using the bindable behavior makes this a painless tast. -- Baz L Web Development

Re: i18n and belongsTo

2007-12-10 Thread mouth
Right now, all behavior callbacks are executed only on 'primary' models, so there are only 2 possible solutions: #1 extra query - don't fetch associated group data by User->find() but call Group->find() with condition on known group ID (from previous User->find() query) #2 bind association Group

Generate List of Full Names

2007-12-10 Thread Gould, Adrian
Problem: The table AUTHORS has the fields (id, given_name, last_name, created, modified) but no title field. I wish to fill a select box with the id and FULL NAME that is created by merging last_name and first_name. in SQL you'd do soemthing like: SELECT id, CONCAT( last_name, ', ', first_nam

Re: Conditions and recursion

2007-12-10 Thread [EMAIL PROTECTED]
I forgot to add, before I do the findBy I do $this->Users->recursive = 5; so it isn't limiting it because of that On Dec 10, 7:36 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > So I have: > (This is semi pseudo code as I am renaming things for convince so if > there are syntax errors ignor

Conditions and recursion

2007-12-10 Thread [EMAIL PROTECTED]
So I have: (This is semi pseudo code as I am renaming things for convince so if there are syntax errors ignore them) class User extends AppModel { var $name = 'User'; var $hasAndBelongsToMany = array('Cart' => array('className'=> 'Item', 'join

Cake Site Deployed - THANKS To All Cakers On the Board!

2007-12-10 Thread MikeK
I just wanted to take a breath and say MAJOR THANKS to all who have answered questions, posted great answers, and generally helped to make CakePHP such a great technology. We have finally deployed our site after months of development, alphas, and betas. We are extremely pleased with the productivi

cleanUpFields, $form->input, type date and nightly SVN version 1.2

2007-12-10 Thread Baz
I recenlty (12/07/07) downloaded a nightly build of CakePHP 1.2 and noticed that some things have changed in the way this works: $form->input('date',array('type'=>' date')); (for model Post when date is NOT in the database schema) No longer do we have $this->data containing: ['Post']['date_year'

using generateList() to select correct entry

2007-12-10 Thread Adam D.
I have a properties controller and an images controller. Properties hasMany Images. Images belongsTo Properties. I need to get the id property id so the properties list dropdown selects the correct property. So if the user, clicks the url 'images/add/6' the properties dropdown will select the

Re: Controller theory question

2007-12-10 Thread Mech7
You can also load an object, in app_controller so the first is really the only reason.. its available always, so you dont have to load it :) On Dec 10, 10:49 pm, Deane <[EMAIL PROTECTED]> wrote: > Say I need to make some functionality globally available to all my > controllers. > > What's the fun

Controller theory question

2007-12-10 Thread Deane
Say I need to make some functionality globally available to all my controllers. What's the functional difference between (1) putting the method on the app_controller, or (2) creating a component and importing it where needed? I can think of two differences, but are there are things I'm not consi

Inner Join on hasMany

2007-12-10 Thread Baz
Hey guys...this is what I'm trying to accomplish: I got a model (Request). Each request hasMany Dates. I'm doing a simple find on the Request, but I ONLY want to return those requests that have a certain date range. I'm been able to using the excellent Bindable behavior to set the condition on t

Re: views without controllers

2007-12-10 Thread AD7six
On Dec 10, 4:34 pm, boris <[EMAIL PROTECTED]> wrote: > Hi. I am new to CakePHP and would be thankful for help: > > I'm creating a social networking website. Suppose I want to create a > profile page, which displays a user's data. The view would be app/ > views/users/profile.php and there would b

Strategy for minimizing time in https/SSL

2007-12-10 Thread keymaster
In my appController I plan to check if a secure controller/action is being referred to, and if so, redirect to https (assuming we are not already https). Similiarly, if a nonsecure controller/action is being referred to (excluding webroot), I plan to redirect to http (assuming we are not already

Re: Cake and JSON.

2007-12-10 Thread hydra12
:-) I'm glad it worked! On Dec 10, 11:35 am, Marcos Hernández <[EMAIL PROTECTED]> wrote: > Oh, man, you're my savior!!! It works great without touching anything!! > Thanks a lot!! > hydra12 escribió:Try this (works in 1.2): First, put all of your data into a > variable, for instance if your mo

observeField and app_controller

2007-12-10 Thread Steveston
In my application, whenever users input, I need to check if some fields are duplicate frequently (for example, user name, email, course title, etc). I am using AJAX to do this. The problem is, I find I am repeating a method again and again in various controllers. Basically, in my view, I have so

Pagination my post category in cakephp1.1

2007-12-10 Thread Budi yanto
Some one help me. I have problem with my blog application. I can't paginate my post category in cakephp 1.1. I use Andy Dawson pagination commponent. post id category_id title content category id title Thank's. --~--~-~--~~~---~--~~ You rec

Re: Why my observeField does not work properly?

2007-12-10 Thread Steveston
That's it! Thanks :) On Dec 10, 2:50 am, francky06l <[EMAIL PROTECTED]> wrote: > if (!empty($a)); //I also tried isset, isset & !empty > > Is the semi column here a typo ? If not this explains the origin of > your problem > > On Dec 10, 10:29 am, Steveston <[EMAIL PROTECTED]> wrote:

Re: Cake and JSON.

2007-12-10 Thread Marcos Hernández
Oh, man, you're my savior!!! It works great without touching anything!! Thanks a lot!! hydra12 escribió: Try this (works in 1.2): First, put all of your data into a variable, for instance if your model is called items: $items = $this->Item->findAll(); $timestamp = 1193692111; // put your

Re: i18n and belongsTo

2007-12-10 Thread snowdog
I posted a ticket (#3680) for this issue. It looks we have to wait for this 'enhancement' --~--~-~--~~~---~--~~ 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.co

Re: saving multiple foreign keys in one field

2007-12-10 Thread Indian Baker
Hi, Thanks for your reply, actually this is what I'm doing in my view I'm calling it as echo $form->input('jobposition_id',array('options'=> $jobpositions,'multiple'=>'true','size'=>'5')); But when I submt I get an SQL error and in the post data only the word Array is passed like below (part of

Re: views without controllers

2007-12-10 Thread djiize
default page (see routes.php) is /app/views/home.ctp you can cusomize this page like you want, and import data from DB in it with elements/requestAction: http://bakery.cakephp.org/articles/view/creating-reusable-elements-with-requestaction On 10 déc, 17:17, "Mike Green" <[EMAIL PROTECTED]> wrote:

Re: othAuth component + CakePHP 1.2.0.5875 prebeta = broken ==> saveField not working

2007-12-10 Thread bingo
hi daphonz, luke, I did check Red Frogs blog and made the suggested changes, but still the problem exist. :( I will again check othAuth component to make sure I didn't miss any changes suggested in Red Frogs blog Regards, bingo On Dec 10, 11:40 am, luke BAKING barker <[EMAIL PROTECTED]> wrote:

Re: Function aliases will be deprecated?

2007-12-10 Thread Samuel DeVore
I don't think it does, but joel moss was pondering the fact that the cake core code seems to be replacing some of those aliased functions internally with the direct call. I just thought that it was for small performance boosts given the amount of times those things are probably called internally.

Re: Problem sessions

2007-12-10 Thread inver
solvent, problem in cake installation, cake directory out of virtualhost. I change my index.php in webroot directory. Thanks. On 10 dic, 16:31, powtac <[EMAIL PROTECTED]> wrote: > What does it mean exactly "but my data session lost"? > Example code? --~--~-~--~~~---~-

Re: Function aliases will be deprecated?

2007-12-10 Thread Gwoo
where does it say 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]

Re: othAuth component + CakePHP 1.2.0.5875 prebeta = broken ==> saveField not working

2007-12-10 Thread luke BAKING barker
check red frogs blog on this too and other posts in the group..othAuth 1.2 pre-beta On Dec 10, 4:19 pm, daphonz <[EMAIL PROTECTED]> wrote: > I had some issues getting the othAuth component to work with Cake pre- > beta as well. I think had the same problem you did. You can read my > blog post a

Re: Obtain all elements of multiple select

2007-12-10 Thread dandreta
Thanks for your response. I have proved it but it does not work. Anyone has made something similar what I want to do? On 10 dic, 10:21, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote: > On Dec 9, 4:45 pm, dandreta <[EMAIL PROTECTED]> wrote: > > > Thanks for your response. > > But I dont understa

Re: othAuth component + CakePHP 1.2.0.5875 prebeta = broken ==> saveField not working

2007-12-10 Thread daphonz
I had some issues getting the othAuth component to work with Cake pre- beta as well. I think had the same problem you did. You can read my blog post about it: http://www.ancientwisdom.cc/news/archives/111 Hope that helps. Casey On Dec 8, 11:09 am, bingo <[EMAIL PROTECTED]> wrote: > hi, > > I

Re: views without controllers

2007-12-10 Thread Mike Green
A view without a controller.. is just a php page. you could achieve the same effect by other means but it would be pointless. On 10/12/2007, Chris Hartjes <[EMAIL PROTECTED]> wrote: > > On Dec 10, 2007 10:34 AM, boris <[EMAIL PROTECTED]> wrote: > > > > Is this possible in CakePHP or am I constrai

Re: $this->Session->setFlash(' -- msg here -- '); not showing up on 1.2.x

2007-12-10 Thread daphonz
Also make sure you have something in your view to display the message: check('Message.flash')): $session->flash(); endif; ?> Or the like. -Casey On Dec 9, 10:44 pm, "Louie Miranda" <[EMAIL PROTECTED]> wrote: > Got this working.. > > Just add.. > > $this-

i18n and belongsTo

2007-12-10 Thread Klokan
Hi there, I have problem with i18n. I have model "user" which is belongsTo "group". I have model "group" where fields are localized: var $actsAs = array('Translate' => array('name','description')); When I load data from "user", I have any fields from "group" but not localized fields . CakePhp rea

Where write "setlocale" to custom date in all the application?

2007-12-10 Thread avairet
Hi, I'm using $form->input() to create a date field in a form. Cake create fine 3 selects (one for Days, one for Month and one for Year) and with "cleanUpFields" method it save my date very well. But I would translate the names of month in French. It's work fine if I use "setlocale" directly in

Re: Selective Recursive Find

2007-12-10 Thread Baz
I came across the bindable stuffHere's my issue though: With these bindables, you need and SVN version of CakePHP. - I'm still not sure how to download ONE SPECIFIC version of this (All I can get is the latest nightly). - Last time I tried the nightly, it screwed up some stuff for me due to so

Re: views without controllers

2007-12-10 Thread Chris Hartjes
On Dec 10, 2007 10:34 AM, boris <[EMAIL PROTECTED]> wrote: > > Is this possible in CakePHP or am I constrained to associate every > view with a database table, model, and controller? > Well, you can certainly create models that don't use databases, and controllers that don't need a model, but giv

views without controllers

2007-12-10 Thread boris
Hi. I am new to CakePHP and would be thankful for help: I'm creating a social networking website. Suppose I want to create a profile page, which displays a user's data. The view would be app/ views/users/profile.php and there would be a controller app/ controllers/users_controller.php with a prof

Re: Problem sessions

2007-12-10 Thread powtac
What does it mean exactly "but my data session lost"? Example code? --~--~-~--~~~---~--~~ 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: Login box

2007-12-10 Thread dr. Hannibal Lecter
Elements are the way to go, just create the loginbox element and optionbox element and switch them depending on user presence. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group,

Re: saving multiple foreign keys in one field

2007-12-10 Thread dr. Hannibal Lecter
> I know the right approach for something like this is the HABTM, but I > really need to just store the selected options in a single database > field. Well, it is true that that you should have a proper many-to-many DB implementation, but if you REALLY want to hack it like that... All you need t

Problem sessions

2007-12-10 Thread inver
Hello, before a write in this group I read all literature about sessions problem in 1.1.18.5850 version. Well, I change in config.php the CAKE_SECURITY to medium, but my data session lost, this happen in 'database', 'cake' and 'php' mode for session. checkout my cakephp version in CVS but it does

Re: Obtain all elements of multiple select

2007-12-10 Thread dr. Hannibal Lecter
On Dec 9, 4:45 pm, dandreta <[EMAIL PROTECTED]> wrote: > Thanks for your response. > But I dont understand how I can do this. > Can you explain me, please? > Regards I'm assuming you're using javascript for item switching, so setting select.options[index].selected to true would do the trick. Ther

Re: set a date on default.ctp, on all pages?

2007-12-10 Thread abstract
or, if You need to place in all views something more sophisticated, You can add $this->set(...) to beforeFilter in app_controller On Dec 10, 7:03 am, "Louie Miranda" <[EMAIL PROTECTED]> wrote: > I have added this on one of my controller for function index() > > > $this->set('date', date("r")); >

Extends a core helper?

2007-12-10 Thread avairet
Hi everybody, In the "Cake Philosophy", is it correct to extend an existent Helper to overwrite some methods? For example to write a file like this: Thanks by advance for your opinions about that! BR Avairet --~--~-~--~~~---~--~~ You received this message bec

Re: Selective Recursive Find

2007-12-10 Thread Serge Rodovnichenko
For Cake 1.2 take a look at Containable behaviour http://www.thinkingphp.org/2007/06/14/containable-20-beta/ or Bindable behaviour (I prefer it! :-) : http://cake-syrup.sourceforge.net/ For cake 1.1 search this group for keyword 'expects' :-) On Dec 10, 4:24 pm, Baz <[EMAIL PROTECTED]> wrote: >

Selective Recursive Find

2007-12-10 Thread Baz
I have a simple question (I think). I have a model (Requests), which has a lot of relationships including 3 belongsTo (Equipment, Classroom, Department). The Classroom model has a belongsTo (Building). I'm doing a findAll/paginate in the Request controller with $this->Request->recursive = 1 and g

Re: Cake and JSON.

2007-12-10 Thread hydra12
Try this (works in 1.2): First, put all of your data into a variable, for instance if your model is called items: $items = $this->Item->findAll(); $timestamp = 1193692111; // put your timestamp here $itemArray = Set::extract($items, '{n}.Item'); $this->set('items','{"timestamp":'. $timestamp.',"

Re: CURRENT_TIMESTAMP in findall

2007-12-10 Thread Adam Royle
This is something that I've also wondered about in the past so if anyone has better ideas please let me know. The way I do it is just use a string condition (or combination of array and string conditions). $continent = $this->mymodel->findAll("mymodel.start_time > = NOW() AND mymodel.end_time <

Re: Obtain all elements of multiple select

2007-12-10 Thread dandreta
On 6 dic, 19:19, dandreta <[EMAIL PROTECTED]> wrote: > I have an HABTM relation between ModelA and ModelB. > In the add view of A, I have created two lists, one with all B > elements of the database and other one empty . I pass elements of the > first list to the second one with javascript and

Re: Why my observeField does not work properly?

2007-12-10 Thread francky06l
if (!empty($a)); //I also tried isset, isset & !empty Is the semi column here a typo ? If not this explains the origin of your problem On Dec 10, 10:29 am, Steveston <[EMAIL PROTECTED]> wrote: > In view: > > echo $html->input('User/username', array('id'=>'username'

Re: set a date on default.ctp, on all pages?

2007-12-10 Thread grigri
Try putting your $this->set(...) inside AppController::beforeFilter() or AppController::beforeRender() On Dec 10, 6:18 am, "Louie Miranda" <[EMAIL PROTECTED]> wrote: > Simply replace > > > > > To (on view -- default.ctp) 1.2.x > > > > > Solved! > > On Dec 10, 2007 2:03 PM, Louie Miranda <[EMAIL

Cake and JSON.

2007-12-10 Thread kchopein
Hi!! First of all, thanks for the work! I'm trying to use the JSON component with the Dojo Toolkit but I'm having a problem: the generated json code includes the model level, and I only need the data. I mean, I'm getting this: {"timestamp":1193692111, "items":[ {"Post":{"id":"1","title":"The t

RE: One form with two submit buttons

2007-12-10 Thread websta*
No worries, you can of course give your submits a cake like name data[Model][submit] or some such, and it'll come through in your data array. >From there logic could be shifted to your model or some such even. Options are endless. -Original Message- From: cake-php@googlegroups.com [mailto

Why my observeField does not work properly?

2007-12-10 Thread Steveston
In view: input('User/username', array('id'=>'username', 'size'=>'50')); echo $html->tagErrorMsg('User/username', 'User name must unique and contain at least 5 and no more than 8 chars'); ?> observeField('username', array('update'=>'err', 'url'=>"/users/c

Re: versions of CakePHP - How to locate

2007-12-10 Thread Howard Glynn
I doubt you will be able to see that URL via the browser as the trailing @5875 is special to SVN when accessing particular versions via command line etc I think Try https://svn.cakephp.org/repo/trunk/cake/1.2.x.x/ This will almost certainly show you the bleeding edge code (~6139?) Alternati