Best practices on upgrading

2006-07-18 Thread roliver
What is the best way to upgrade cake? I'm working on an application and I want to upgrade to the latest stable release. But, I don't want to overwrite any of my layouts, configs etc. Could some one point me to a doc that details upgrade procedures? Thanks

Inheriting other models (again)

2006-07-18 Thread Gonçalo Marrafa
Hi. In a recent thread i started (sorry about the missing link) i discussed having a model inherit other model other than AppModel. The problem was i couldn't be sure the other model was loaded at the time. AD7six suggested (thanks) creating a model outside models path and explicitly including

Re: How i can access to method of Object class on AppController ?

2006-07-18 Thread AD7six
Hi reyman, What version (build number) of cake are you using have you made any modifications to the cake folder what is the code for your app_controller (all of it) what url are you testing with what is/are the exact error message(s) you are seeing - use the paste bin

help me out in ajax php framework

2006-07-18 Thread Umang
hi, can any one tell me which framework is best for developing ajax web application in php,mysql. which framework is best.. thanks in advance Umang --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group.

Re: Best practices on upgrading

2006-07-18 Thread Daniel Hofstetter
Just replace the cake folder with the new version. -- Daniel Hofstetter http://cakebaker.wordpress.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: help me out in ajax php framework

2006-07-18 Thread Felix Geisendörfer
Hi Umang, you are posting to the google group of cakephp, what do you expect? These days 'ajax' covers such a broad range of libraries, approaches and requirements, so that I wouldn't go so far to say one framework is the "best" for everything you might come across. CakePHP integrates really

Re: Best practices on upgrading

2006-07-18 Thread Felix Geisendörfer
Depending on the version you upgrade from it might also be good to replace app/webroot/index.php with the new one and to check whether new definitions have been added to app/config/core.php which you can do best by reading through the change logs. Best Regards, Felix Geisendörfer

Re: help me out in ajax php framework

2006-07-18 Thread AD7six
Felix Geisendörfer wrote: But please, don't expect that you can simply drop an email like this in 5-10 groups and get people to write up detailed comparisons for you. Especially by hijacking someone elses thread ;) AD7six --~--~-~--~~~---~--~~ You received

Re: Best practices on upgrading

2006-07-18 Thread AD7six
See gwoo's comment here: http://groups.google.com/group/cake-php/browse_thread/thread/a75537de22b36985/db971fa5d70e9ac5?q=ad7six+configlnk=gstrnum=14#db971fa5d70e9ac5 Starting from a clean install and applying changes is less of a headache than trying to fix the (potential) errors from missing

loading gif after ajax link

2006-07-18 Thread markiemark
Hi every one, I have got a short question. Is it possible to show a spinning gif when clicking on a $ajax-link in cakephp when al the data in the targetdiv is loading. this is very usefull with slow connections or a lot of images being loaded in the div. hope anyone knows the answer and can

Changing include_path conflicts with CakePHP

2006-07-18 Thread Matt
I'm in the process of porting a site to CakePHP, so far so good, however I've run into some problems with manually installed PEAR libraries used by a component. The PEAR libraries are installed in a sub-directory of components called MailSystem and used by the component with the statement:-

Re: cheeseCake Photoblog V1.0 Beta 1 released

2006-07-18 Thread naryga
I tried downloading the package, but all I get is an empty tar file. --~--~-~--~~~---~--~~ 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: overwrite save function of model

2006-07-18 Thread Sonic Baker
I'm also concerned about having to use an 'id' field as a primary key to every table. Now bare in mind that I am just a mere mortal and cower in the shadows of the real cakePHP masters but I have beef with that fact that I can't have a primary key which consists of more than one field. However,

Re: loading gif after ajax link

2006-07-18 Thread stefano
Mark, you can put in your view something like this: ?php e($html-imageTag('loading.gif','Loading...',array('id'='spinning_image','style'='display:none'))) ? Note the id set to spinning image end the style set to display:none so the image is not displayed as default Then your ajax link can be:

Re: How i can access to method of Object class on AppController ?

2006-07-18 Thread reyman
thx for help :) Apache/2.0.58 (Win32) PHP/4.4.2 Windows 98 No modification to cake folder http://www.cakephp.org/pastes/show/4843231acb4b5f19ddc0625c08310804 ! Error ! Parse error: parse error, unexpected T_VARIABLE in C:\TRAVAUX\SITE\aiec\app\app_controller.php on line 44 Thx all

Re: How i can access to method of Object class on AppController ?

2006-07-18 Thread Felix Geisendörfer
Just a guess, but are your requestAction calls recursive? Means the function you request by requestAction requests itself by requestAction again? This would make up for weird behavior I'm sure ; ). -- http://www.thinkingphp.org http://www.fg-webdesign.de reyman

Re: Best practices on upgrading

2006-07-18 Thread Jeroen Janssen
Hi, I'm using a local svk mirror setup and 'merge' back CakePHP changes into my own project. You all use a version control when developing your website(s)... right? --- Jeroen Janssen --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: PagesController switching layouts

2006-07-18 Thread saavedrajj
thanks for the replys, for static pages I used AD7six example --~--~-~--~~~---~--~~ 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

AJAX with' option

2006-07-18 Thread Matt
I am having trouble to get AJAX read the value a field by specifying the with option. Below is the code in question:- div id=preview /div form method=post action=?php echo $html-url('/forums/new_topic/?forum='.$forum_id); ? Topic Title input name=data[Topic][title] value=?php

Search engine

2006-07-18 Thread KorKi
I'm looking for a search engine for my cake i found this: http://groups.google.com/group/cake-php/browse_thread/thread/5a632568d39faae7/7d5d65a0f0202b1d?q=searchrnum=6 But i have no idea how to place it in my app. Can somebody help me? or you've got other ideas for the search engine? please

Re: creating helpers

2006-07-18 Thread joe
hehehe, i had accidentally used the same variable name twice...woops... --~--~-~--~~~---~--~~ 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: Search engine

2006-07-18 Thread Matt
You'd use it by creating a function in your model that makes a custom SQL call eg class Post extends AppModel { var $name = 'Post'; function posterFirstName() { $ret = $this-query(SELECT first_name FROM posters_table WHERE poster_id = 1);

Page in a page

2006-07-18 Thread aj2k8
Here's what my current view looks like: code HTML Table TR TD NOWRAP ?php echo $html-radio('Datas/dispWut',array(1='Search',2='Experiments',3='Protocols',4='Projects',5='Samples',6='Reagents'),'br /br /br /',array('value' = 2)); echo $this-controller-data['dispWut']; ? /TD TD ?php echo

Re: Search engine

2006-07-18 Thread gwoo
Matt, you dont have to write so much SQL. class Post extends AppModel { var $name = 'Post'; function posterFirstName($poster_id) { $ret = $this-Post-findByPoster_id($poster_id, 'first_name'); $firstName = $ret[0]['first_name']; return $firstName;

Re: Search engine

2006-07-18 Thread Matt
I just copied the example in the manual. --~--~-~--~~~---~--~~ 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

Re: Page in a page

2006-07-18 Thread gwoo
I suggest using elements. --~--~-~--~~~---~--~~ 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: Search engine

2006-07-18 Thread KorKi
ok, it works... partly i know where is pace of ths and the rest but it doesn't search and doesn't show me the result. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send

Access to Classes

2006-07-18 Thread [EMAIL PROTECTED]
I'm new to Cake, and am wondering how I access the pre-defined classes in the cake structure. I understand how to implement components, and helpers. Is there a special way at including certain classes such as the File, NeatString, or NeatArray classes. I was trying to create a 'new' object

Re: Access to Classes

2006-07-18 Thread John David Anderson (_psychic_)
On Jul 18, 2006, at 9:31 AM, [EMAIL PROTECTED] wrote: I'm new to Cake, and am wondering how I access the pre-defined classes in the cake structure. I understand how to implement components, and helpers. Is there a special way at including certain classes such as the File, NeatString, or

Re: How i can access to method of Object class on AppController ?

2006-07-18 Thread reyman
uh .. i think no recursive ... but ? My appController have a function beforefilter() which call requestAction : $this-array = $this-requestAction('/ssites/getSites',Array(return=true)); And in my controller SsitesController i have : function getSites(){

Re: Access to Classes

2006-07-18 Thread [EMAIL PROTECTED]
Sweet! Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For

more than one kind of relationship between the same two tables?

2006-07-18 Thread calzone
Can someone direct me to documentation about how to set up multiple different relationships between the same two models? For instance, Fred is a Sales Rep for ACME Parts, his clients include ABC Auto, Repair 123, and many other companies. Fred belongsTo ACME but hasMany clients, all of which

Re: Page in a page

2006-07-18 Thread aj2k8
OMG thank you that made my life sooo much easier i'm new to cake and wel didn' really know about that. Cool! Now can someone plz help me make active radio buttons that change the element displayed on clicking them preferably without using javascript? ty

Re: more than one kind of relationship between the same two tables?

2006-07-18 Thread John David Anderson (_psychic_)
On Jul 18, 2006, at 10:21 AM, calzone wrote: Can someone direct me to documentation about how to set up multiple different relationships between the same two models? If they are the same type of relationship, just add another assocation to the array. If I have two belongsTo relationships,

Re: more than one kind of relationship between the same two tables?

2006-07-18 Thread calzone
Hi John, I tried your second approach but got a very large number of notices. I could turn these off of course, but I'd rather not them be generated in the first place if I can avoid it. In my case, I have a member model and a character model. The member model has a primary_chracter_id while

Re: Page in a page

2006-07-18 Thread ShepherdWeb
Please start a new thread when beginning a new topic. --~--~-~--~~~---~--~~ 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,

Wiki: Image_gallery_2

2006-07-18 Thread saavedrajj
I tried to do this example http://wiki.cakephp.org/tutorials:image_gallery_2 but doens't work... anyway, there's another example for making an image gallery on CakePHP? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Automatically Select Option in Edit Function

2006-07-18 Thread BlenderStyle
I have an edit function (method) in my UsersController and a view to go with it. In my edit view I have a form to edit the user with a drop-down menu ($html-selectTag) for one of the fields. All the boxes ($html-inputTag) have the data inserted but I can't figure out how to automatically select

Re: Automatically Select Option in Edit Function

2006-07-18 Thread ShepherdWeb
$html-selectTag('Person/ismarried', array('y'='Yes', 'n'='No'), 'n', null, null, false); from: http://wiki.cakephp.org/docs:helpers:html I hope this helps! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP

Re: loading gif after ajax link

2006-07-18 Thread markiemark
stefano, i should have checked the wiki better before, but thanks for the answer, it works! Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

requestAction() causing infinite loop in AppController-beforeFilter()

2006-07-18 Thread Devo
After seeing some excellent posts here on the group, I've attempted to implement some basic authentication into my CakePHP instance by overriding the AppController class. (I don't have any roles, but I do need basic authentication.) My beforeFilter() method works just fine until I add the

Time Zone ?

2006-07-18 Thread seefai
Hi brother, I am Andy from Malaysia and just a begineer to cakePHP. I having a problem that when i try to save a Created/Modified date (By Cake's Default) in to the database, i will get 8 hours delay of the time, can i know how to solve it Thanks Best wishes, Andy

Re: Time Zone ?

2006-07-18 Thread John Zimmerman [gmail]
Do you know if your server's time is UTC?One way you can do it is log all times as UTC and then only convert them to local time upon display based on either a user's timezone or a timzone variable set in your cake app. I have some basics going for timezones like this, but maybe somebody has a more

Re: Time Zone ?

2006-07-18 Thread Chris Lamb
Andy, Cake's 'created' and 'modified' magic uses the PHP date() function. The Best Practice for dates is to store all dates interally in UTC/GMT, and apply an offset on viewing. If you would prefer not to do this, check out: http://uk2.php.net/manual/en/function.date-default-timezone-set.php

File Access: Closing Resources

2006-07-18 Thread [EMAIL PROTECTED]
When I'm finished using the File Class, do I need to close the file I'm working with, or does cake do that for me? Reason, I ask, is because I don't see a function to close. This question also applies to other classes that access resources that I need to close.

Re: Time Zone ?

2006-07-18 Thread Chris Lamb
Oh dear, crossed posts.. I have some basics going for timezones like this, but maybe somebody has a more robust solution? Pear::Date? [1] Chris [1] http://pear.php.net/package/Date -- Chris Lamb, Cambridgeshire, UK [EMAIL PROTECTED] WWW: www.chris-lamb.co.uk

Re: Automatically Select Option in Edit Function

2006-07-18 Thread BlenderStyle
I understand how to use $html-selectTag pretty well. I was wondering if there was an effective way of setting the selected option in selectTag based on the item you're editing. So a user can have two options for status, for example, active or locked. If the user is locked I want my

Re: overwrite save function of model

2006-07-18 Thread Larry E. Masters aka PhpNut
Sonic, Why on earth would you have composite keys in your database tables? There is absolutely no reason from them.And Tony Marston is the last person I would be reading for advice on how to do anything related to application development, aside from the point he has been developing 1st 2nd 3rd 4th

Delete, hasOne and dependent

2006-07-18 Thread Gonçalo Marrafa
Hi. The hasOne association has 'dependent' flag that, if set to true, deletes the associated model when the current one is deleted. The problem is that, normally, the associated model/table will have a foreign key constraint to the model/table being deleted. Since the current model is deleted

Best approach for MCV

2006-07-18 Thread Mini Mouse
Greetings and salutations. I'm trying to find the best approach for this. I've got the following models: User (defines what a user is) Has a Group.id Group Account Department DepartmentMember has a User.id (user_id) has a Department.id (department_id) To add a user (I used bake for

Re: requestAction() causing infinite loop in AppController-beforeFilter()

2006-07-18 Thread AD7six
Hi Devo, The reqestAction will be run for all controllers, including the login controller within the requestAction call, hence the loop. You need only introduce some logic to break the chain e.g. define the beforeFilter in your login controller and DON'T call the parent. HTH, AD7six

Re: How i can access to method of Object class on AppController ?

2006-07-18 Thread AD7six
Looks quite recursive to me ;) http://groups.google.com/group/cake-php/browse_frm/thread/017b0e9ed9574bc5/9b8bc6e5005bf57d#9b8bc6e5005bf57d cheers, AD7six --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP

search functionality for whole website

2006-07-18 Thread bingo
hi, I am new to CakePHP and wondering where the function such as search should be implemented. I have 5 tables and want to use single search box. On submit it should call the search function which basically call appropriate search function for 5 tables and display the results in a view. Regards

Re: search functionality for whole website

2006-07-18 Thread gwoo
class SearchController extends AppController { var $name = 'Search'; var $uses = array('Model1','Model2','Model3'); function results() { $results = array(); $conditions = $this-params['url']['searchfieldname'];

Re: Automatically Select Option in Edit Function

2006-07-18 Thread BlenderStyle
Ah, I found my problem. I was doing this: $html-selectTag('/User/locked', $locked_options, null, null, null, false); I should have done this: $html-selectTag('User/locked', $locked_options, null, null, null, false); The forward slash in the field name was messing me up. Thanks for your help.

Re: Time Zone ?

2006-07-18 Thread ryanb006
I've used this before (example is US Central Time) in my own applications, not in Cake PHP. ?php putenv(TZ=America/Chicago); ? Ryan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this

Re: search functionality for whole website

2006-07-18 Thread bingo
Thanks Got working with the above approach. Regards, --~--~-~--~~~---~--~~ 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,

Hosting (i.e. Dreamhost)

2006-07-18 Thread John Zimmerman [gmail]
I have recently consolidated a bunch of the websites I have been working on to Dreamhost, mainly because I originally planned to port some of them to Rails before I came across CakePHP.Dreamhost has been giving me headaches reguarding phpMyAdmin crapping out, their own control panel being

Re: Hosting (i.e. Dreamhost)

2006-07-18 Thread Jason Lee
On 7/18/06, John Zimmerman [gmail] [EMAIL PROTECTED] wrote: Is anyone else here using Dreamhost to host CakePHP projects? I currently host three applications on Dreamhost and will probably add at least 2 or 3 more by the end of the year if development goes as planned. Recent hardware debacle

passing values when constructing a new object from a model

2006-07-18 Thread Langdon Stevenson
Hi I have a model called Commitment with a method called Commitment that performs some basic set-up for the new Commitment object. class Commitment extends AppModel { var $name = 'Commitment'; //for php4 var $belongsTo = 'Actionplan'; var $actionplan_id; var $action_area; var

Adding new model

2006-07-18 Thread D Smith
I am new to cake php and do not know how to add a new model/controller that is not particularly related with some table.For example a search module which can pick its data from multiple tables. Could anyone help me on this topic. Thanks in advance

Re: Adding new model

2006-07-18 Thread John David Anderson (_psychic_)
On Jul 18, 2006, at 9:38 PM, D Smith wrote: I am new to cake php and do not know how to add a new model/controller that is not particularly related with some table.For example a search module which can pick its data from multiple tables. For models with no tables, stick in: var $useTable

Re: passing values when constructing a new object from a model

2006-07-18 Thread AD7six
Hi Langdon, A Model represents a table, or type of object, not an instance of an object. Most likely: The arguments are not being passed because when the models for your controller are created - that's before your Feedback controller method has run, and it is created with no arguments.