Re: Model without table

2009-03-11 Thread kaushik
As per your direction, i have used this code in model: class contact extends AppModel { var $name = 'Contact'; var $table = false; } and this code in controller: class ContactsController extends AppController { var $name = 'Contacts'; var $components = array('RequestHandler'); var $helpers =

Auth component problem - Cannot login

2009-03-11 Thread Waylon
I have the Auth component working correctly on my development site (localhost). I have a problem when I try to use it on my production server. If I try to access /users/login, I am sent to a 404 page (my web hosts, not a CakePHP page). I have a very simple Auth configuration; I'm using all defau

Combining Zend_lucene, Vendors, Component does not my cake make

2009-03-11 Thread DoughBasher
I have been, for days, trying to add Zend_lucene search to my cake site. It works perfectly when I use it in my controller (i.e. without the component) but I am not having much luck turning it into a component so that it will be available to all of my controllers. This is a site-wide search and th

MVC Design Question

2009-03-11 Thread Alex Jeffery
Hi, I am building a small cake application to learn MVC and cakePHP. I have a question about where to put business logic, I have read that controls should be skinny and models should be fat. Eg the business rules should live in the models. In my application I have the following models User, Port

Re: Like search

2009-03-11 Thread Miles J
$this->Model->find('all', array( 'conditions' => array('Model.column LIKE' => '%keyword%') )); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroup

File Uploading

2009-03-11 Thread manisha
Hello, I am a new user for cakePHP and I am using $form->file ('UserInfo.company_logo', array('size' => 40)); for uploading an image, but after post, I am getting array like Array ( [data] => Array ( [name] => Array ( [UserInfo] => Arra

Re: Multiple language supports

2009-03-11 Thread Sensible
Thanks for your reply. I want to translate dynamic content. so, i think second option is preferable. I try to do that by going through http://book.cakephp.org/view/92/Translate Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Model without table

2009-03-11 Thread Walther
Bugger, I always get that one wrong, I obviously don't use it enough... On Mar 11, 8:05 pm, mscdex wrote: > On Mar 10, 7:32 am, Walther wrote: > > > Just add in your model: > > > var $table = false; > > Close, it's actually $useTable. --~--~-~--~~~---~--~~ You r

Like search

2009-03-11 Thread kaushik
I want to do like search in multiple columns, for a few column it is "%test" and for others it is "%test%". How to do you that? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group,

Re: Update CakePHP core

2009-03-11 Thread mscdex
On Mar 11, 11:56 pm, Kal wrote: > How can we upgrade our CMS based on CakePHP 1.1.19 to latest version > 1.2.1.8004? One place to start would be at the following place in the Cake manual: http://book.cakephp.org/view/411/Migrating-from-CakePHP-1-1-to-1-2 --~--~-~--~~~

Re: CakePHP in Google Summer of Code

2009-03-11 Thread Dr. Tarique Sani
FWIW Having mentored 2 consecutive GSoC I would say this is a good idea - though we have had problems with students vanishing once the summer is over Cheers Tarique On Thu, Mar 12, 2009 at 4:37 AM, Gwoo wrote: > > Hi Diego, > > I have been thinking a lot about GSOC. > > Here is a (short) l

RE: Custom Query

2009-03-11 Thread Dave Maharaj :: WidePixels.com
Thanks again, That works perfectly the way I want. I really appreciate your help and advice. Dave -Original Message- From: brian [mailto:bally.z...@gmail.com] Sent: March-12-09 1:20 AM To: cake-php@googlegroups.com Subject: Re: Custom Query On Wed, Mar 11, 2009 at 10:59 PM, Dave Mah

Update CakePHP core

2009-03-11 Thread Kal
Hi CakePHP group members, I think there are few security holes in version of CakePHP 1.1.19, our website have been hacked partially twice in the last 2 days. How can we upgrade our CMS based on CakePHP 1.1.19 to latest version 1.2.1.8004? Kind regards Kal --~--~-~--~~~--

Re: Custom Query

2009-03-11 Thread brian
On Wed, Mar 11, 2009 at 10:59 PM, Dave Maharaj :: WidePixels.com wrote: > I been at this for hours and still no luck. What I am trying to do is run a > simple query to find a user_id based on the Auth->id and pass the result to > the view. > > This is being run in the students_controller which is

Re: Custom Query

2009-03-11 Thread Miles J
Its find('first') and your query result will always be an array. Try echo $wantsAccess['Teacher']['id']. You need to debug ($wantsAccess) to see its array values. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake

Custom Query

2009-03-11 Thread Dave Maharaj :: WidePixels.com
I been at this for hours and still no luck. What I am trying to do is run a simple query to find a user_id based on the Auth->id and pass the result to the view. This is being run in the students_controller which is checking the TEACHERS table. In the view where I have wantsAccess all that gets d

Re: Model1 hasMany Model2 with count(), how to get SQL like this?

2009-03-11 Thread Svel
Thank You =) Little fix to your reply: $this->find('all', array('fields' => array('COUNT(BaseImage.id) as cnt', 'Base.id'), 'group' => array('BaseImage.id'), 'joins' => array( array( 'type' => null, // or INNER or LEFT - uppered, couse no a

Using invalidate() in a behavior

2009-03-11 Thread Miles J
So I have an uploader behavior that I built, but im trying to add validation for correct filetypes, etc. How do I trigger the validation for the corresponding parent model? I tried doing invalidate() but that doesn't work. Is this even possible? --~--~-~--~~~---~--~---

Re: Articles both hasOne and hasAndBelongsToMany Photos ... What's the syntax?

2009-03-11 Thread mattalexx
It works! You guys rock. Thanks. On Mar 11, 7:28 am, ohcibi wrote: > if you have two different types of photos for your news, which should > use the same photo-model you can define other model-aliases. like > this: > > app/models/article.php: > var $hasAndBelongsToMany = array( >     'Photo'

Re: CakePHP in Google Summer of Code

2009-03-11 Thread Gwoo
Hi Diego, I have been thinking a lot about GSOC. Here is a (short) list of ideas http://bin.cakephp.org/saved/43627 Please expand on it. I will submit an application and hopefully we will be accepted. --~--~-~--~~~---~--~~ You received this message because you a

Re: Articles both hasOne and hasAndBelongsToMany Photos ... What's the syntax?

2009-03-11 Thread mattalexx
Thank you both for your responses.I will try these out and post back. On Mar 11, 7:28 am, ohcibi wrote: > if you have two different types of photos for your news, which should > use the same photo-model you can define other model-aliases. like > this: > > app/models/article.php: > var $hasAn

How is build CakeBook

2009-03-11 Thread kicaj
Hi, How is build book.cakephp.org? When I write Polish version (e.g. http://book.cakephp.org/pl/complete/14/Struktura-CakePHP), ...and when I click for http://book.cakephp.org/pl/view/19/CakePHP-File-Structure i see english (default language) text because there is no translated to Polish. My q

xml parser removing html entities

2009-03-11 Thread Antoni
Hello, I am using the provided xml class to parse my rss feed from my blog. But when I parse the xml and spit out the array all of the html entities have been removed. here is what a link looks like: a href="http://picasaweb.google.com/lh/ photo/05ihu8FUhDHgVl9LmOx3kw? authkey=Gv1sRgCLr4g4iGjZCv

Re: recursive in parents

2009-03-11 Thread fain182
sorry.. there was a my fault... thank you and excuse me ;-) On Wed, Mar 11, 2009 at 10:51 PM, dr. Hannibal Lecter wrote: > > Yes, it seems ok. How do you get your data with find()? > > On Mar 11, 10:26 pm, fain182 wrote: >> mhmm.. i think that's all right with relations... I baked them.. >> >>

Re: recursive in parents

2009-03-11 Thread dr. Hannibal Lecter
Yes, it seems ok. How do you get your data with find()? On Mar 11, 10:26 pm, fain182 wrote: > mhmm.. i think that's all right with relations... I baked them.. > > http://bin.cakephp.org/saved/43619 > > On Wed, Mar 11, 2009 at 9:40 PM, dr. Hannibal Lecter > > wrote: > > > A silly guess would be

Auth Error message

2009-03-11 Thread Dave Maharaj :: WidePixels.com
I am trying to get a custom error message for a user logging in who has not clicked the email confirmation link So it will say please confirm your email blah blah blah.. I was trying to use http://bakery.cakephp.org/articles/view/authed-adds-rule-based-userscope-to- auth but all it ended up d

Re: recursive in parents

2009-03-11 Thread fain182
mhmm.. i think that's all right with relations... I baked them.. http://bin.cakephp.org/saved/43619 On Wed, Mar 11, 2009 at 9:40 PM, dr. Hannibal Lecter wrote: > > A silly guess would be that you didn't set up your B=>A relation > properly. > > Could you please show us your relations? > > Hin

Redirect Loop

2009-03-11 Thread Tony Thomas
I've been working on a local copy of my CakePHP app that runs on a my computer. Today I've only been working on a layout and the style sheet. I took a break and went back to it which prompted a new login. Suddenly I'm getting a redirect loop. Firefox gives me this following message: Redirect Loop

Re: MooTools Ajax with Cake

2009-03-11 Thread Arak Tai'Roth
very cool, thanks for your help. On Mar 11, 11:31 am, mark_story wrote: > No worries,  glad to hear you got it all sorted.  MooTools can have a > pretty steep learning curve, as it doesn't have as many one liners as > other libraries, but if you stick with it, there is a lot of power and > featu

Re: recursive in parents

2009-03-11 Thread dr. Hannibal Lecter
A silly guess would be that you didn't set up your B=>A relation properly. Could you please show us your relations? Hint: http://bin.cakephp.org/ On Mar 11, 6:39 pm, fain182 wrote: > my situation is this: > A has many B > B has many C > > in the view of C i see only the data of B  and C, i wan

Caking for FUN+Profit

2009-03-11 Thread mariuz
Here is my next presentation prepared for php meetup in boston http://mapopa.blogspot.com/2009/03/caking-for-funprofit-here-is-my-next.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to

Re: Unlimited Slugs for an Action

2009-03-11 Thread jabocs
Ok, I kept digging, and found my own answer again across a couple different posts so in case it can help anybody else in the future: I added this to the very end of my routes.php: Router::connect('/*', array('controller' => 'slug_pages', 'action' => 'view')); to catch all wild card created

Re: find() question

2009-03-11 Thread TeckniX
Fields should be an array I believe. So your entire query should be: $this->User->find('list', array('conditions' =>array ('Teachers.user_id' => $this->Auth->user('id')), 'fields'=>array ('Teachers.user_id') On Mar 11, 2:36 pm, "Dave Maharaj :: WidePixels.com" wrote: > Not sure what I am doing

Form helper bug?

2009-03-11 Thread TeckniX
Setup: Say your cake app isn't the root of your HTML folder - So instead of being at the root of your document_root (/home/html/) it's actually located in (/home/html/cake/) you have normal files in the html folder, and a mod_rewrite rule so that when you go to domain.com/bake it loads cake your u

Unlimited Slugs for an Action

2009-03-11 Thread jabocs
Looking for a way to have a unlimited number of slugs for sub- sections. For Example: http://www.mysite.com/about/page1 http://www.mysite.com/about/sub1/page1 http://www.mysite.com/about/sub1/sub2/page1 http://www.mysite.com/about/sub1/sub2/sub3/page1 Would this be in the Routing or Bootstr

find() question

2009-03-11 Thread Dave Maharaj :: WidePixels.com
Not sure what I am doing here. Been trying to no avail. What I am trying to do is find the id of the logged in user from TEACHERS table WHERE the user_id is $this->Auth->user('id'); $conditions = array('Teachers.user_id'=>$userId); $fields = 'Teachers.user_id'; $teacherID = $this->User->Teach

Automagic date field without the day

2009-03-11 Thread FranktheTank
I'm looking to create an automagic date field, but I only want to show the month and year selects. The user doesn't need to see or pick a day. I have used the date and year type inputs for other things, but they are kind of inconvenient and it would be nice to treat the date info like all the re

Re: Model without table

2009-03-11 Thread mscdex
On Mar 10, 7:32 am, Walther wrote: > Just add in your model: > > var $table = false; > Close, it's actually $useTable. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send ema

recursive in parents

2009-03-11 Thread fain182
my situation is this: A has many B B has many C in the view of C i see only the data of B and C, i want to see the data of A too.. i tried to set the recursive to 2 or 3 but it makes something like: array A array B that has A array A that belongs to B did you have any suggestion? th

dompdf problem

2009-03-11 Thread Diego Villar
Hi guys, I am using dompdf for export to pdf files, in my Pc (windows) function ok, but on the server (linux) I have this error: Strict Standards: Non-static method App::import() should not be called statically, assuming $this from incompatible context and more similar errors I change my php.ini

Re: CakePHP in Google Summer of Code

2009-03-11 Thread Diego Caro A.
On Wed, Mar 11, 2009 at 2:17 PM, BeroFX wrote: > > Why not a project that integrates a bunch of services into a single > one? :) For example..?? -- Diego Caro A. Estudiante Ing. Civil Informática diegocaro | http://diego.bloog.cl "No tengo talentos especiales, pero sí soy profundamente cu

Re: MooTools Ajax with Cake

2009-03-11 Thread mark_story
No worries, glad to hear you got it all sorted. MooTools can have a pretty steep learning curve, as it doesn't have as many one liners as other libraries, but if you stick with it, there is a lot of power and features under the hood. As for neat shortcuts, look at Element.implement() you can ad

Re: CakePHP in Google Summer of Code

2009-03-11 Thread BeroFX
Why not a project that integrates a bunch of services into a single 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 unsubscrib

Re: default value in forms from datatable

2009-03-11 Thread Diego Caro A.
On Wed, Mar 11, 2009 at 12:55 PM, Paco Gomez wrote: > ... > > I don't know if it's possible to fill inputs fields of form in the > view automaticly from the dataTable Users Yes, is possible, editing $this->data variable in the controller of the view. For example, you want fill the input User.us

Re: default value in forms from datatable

2009-03-11 Thread brian
On Wed, Mar 11, 2009 at 11:55 AM, Paco Gomez wrote: > > Hi, > > I'm newbie in cakephp, I have the typical form for Users with their > profile information: > Username > SureName > Email > ... > > I don't know if it's possible to fill inputs fields of form in the > view automaticly from the dataTab

default value in forms from datatable

2009-03-11 Thread Paco Gomez
Hi, I'm newbie in cakephp, I have the typical form for Users with their profile information: Username SureName Email ... I don't know if it's possible to fill inputs fields of form in the view automaticly from the dataTable Users Thank you very much in advantage. --~--~-~--~~--

Re: Validate rule: multiple (CookBook -> 4.1.4.17 Multiple)

2009-03-11 Thread WebbedIT
You will need to apply the validation rules in the Category and Scene models or in the beforeFilter of the model in which you are running the add/edit actions you can add $this->ModelName->Category->validate = array( 'Category' => array( 'rule' => array('multiple', array('min'=>

CakePHP in Google Summer of Code

2009-03-11 Thread Diego Caro A.
Hello everyone, today I went to a talk by Google Summer of Code[1], a google program for open source projects. This program offers student developers stipends to write code. Well, I want CakePHP in Google SoC. For this, we need a send a proposal with ideas to Google with a mentor (dedi

Re: String 'NULL' inserted instead of value NULL with ACL, MSSQL. Help?

2009-03-11 Thread George
I found what so far seems like a temporary fix for this issue. It's probably not ideal, but the only drawback I think would be if you wanted to actually insert the string 'NULL', you can't after this fix. On line 278 in cake/libs/model/datasources/dbo/dbo_mssql.php, change: if (in_array($column,

Best Way to Nest Lists w/ nestedList()

2009-03-11 Thread Tony Thomas
I'm trying to create navigation in CakePHP that uses this method with CSS drop-downs: http://www.webmonkey.com/tutorial/Add_CSS_Drop-Down_Menus So, of course I want to leverage nestedList(), but since I have two "levels" of nested lists, I'm getting unexpected results. Here's what I want: Main

Re: Multiple upload field in a model with AD7six Upload Behaviour

2009-03-11 Thread AD7six
On Mar 11, 12:59 pm, "marco.rizze...@gmail.com" wrote: > My question is: > If in a model I have many image fields and many upload field how can I > set the model to permit the use of  AD7six Upload Behaviour  with all > these fields? > Many Thanks Hi Marco, The overall upload logic I use expe

Re: Error with use Upload Behaviour of MI-BASE

2009-03-11 Thread AD7six
On Mar 11, 11:43 am, "marco.rizze...@gmail.com" wrote: > Hi > I try to use the upload and image_upload behaviour of MI-BASE project > for add field photo to user model > My code is: I've been updating the behaviors recently, that looks like an incorrect variable name (should be $fieldName). Y

Re: Model1 hasMany Model2 with count(), how to get SQL like this?

2009-03-11 Thread Martin Westin
You probably want a little, slightly obscure, gem called joins. In use it looks something like: $this->find('all', array( 'conditions' => $conditions, 'joins' => array( array( 'table' => 'model2', 'alias' => 'Model2', 'type' => 'inner',

Re: Suspected bug in controller method routing

2009-03-11 Thread Martin Westin
I don't understand the problem at all. If you have done no redirects you would get: The action fu renders the view fu. The view fu contains a form pointing to the action save. The action save processes the form and renders the view save. To have the action save "returning control" to edit of f

Model1 hasMany Model2 with count(), how to get SQL like this?

2009-03-11 Thread Svel
Searching for 2 days and found nothing =( How i can build this SQL code: SELECT `m1`.`id`, COUNT(`m2`.`id`) as cnt FROM `m1` LEFT JOIN `m2` ON (`m1`.`id` = `m2`.`m1_id`) WHERE 1=1 GROUP BY `m2`.`m1_id` ORDER BY `m1`.`id` is it real without custom Model->query() ? --~--~-~--~~---

Re: Paginator localhost vs. remote server URL generates differently.

2009-03-11 Thread bee
THAT WORKED Thank you very much. (it does still work odd in localhost, where it keeps adding /1/1/ ) but at least it works on the actual server. Have a good day. On Mar 11, 12:36 am, Martin Westin wrote: > I'd say that your server is doing things correctly and your local > setup is acting s

String 'NULL' inserted instead of value NULL with ACL, MSSQL. Help?

2009-03-11 Thread George
I've been grinding away with ACL on a project, and I'm running into what appears to be a bug with the ACL code and dbo_mssql.php. Basically inserting new aco records fail due to cake generating incorrect SQL code (it puts single quotes around a NULL, thus inserting the string "NULL", not NULL itse

Re: the blog post problem

2009-03-11 Thread Jon Bennett
Hi bilal, > You are right, all three files are different, the server had > mod_rewrite off, i turned it on and tried again but it didnt help. :( > > what else could we look at ... hmm - is the html helper outputting links with index.php in them, or are you doing this manually? Does the site work

Re: Can't use the formHelper with in

2009-03-11 Thread 丁宇(Felix Ding)
Same here, any solutions? BTW, HtmlHelper works between and , it seems that only FormHelper doesn't work. On Jan 21, 10:46 am, maeto-lay wrote: > I try to change all of my pages to use the view caching feature of > cakephp. > The problem occurred when I try to useing the cache in the page that

Re: Articles both hasOne and hasAndBelongsToMany Photos ... What's the syntax?

2009-03-11 Thread ohcibi
if you have two different types of photos for your news, which should use the same photo-model you can define other model-aliases. like this: app/models/article.php: var $hasAndBelongsToMany = array( 'Photo' => array( 'className' => 'Photo', // should be the name of the Photo- Mod

Re: Suspected bug in controller method routing

2009-03-11 Thread Danny Lieberman
Doh. Not exactly a bug but not exactly intuitive behavior either. I think that the correct behavior in the MVC model is for a controller function X to map to view X - both in invocation and on return. I would not have assumed that the view needs to explicitly specify return of control to the c

Re: Model without table

2009-03-11 Thread villas
Check out Jonathan Snook's article: http://snook.ca/archives/cakephp/contact_form_cakephp/ On Mar 10, 8:10 am, kaushik wrote: > I am going to develop a section in a site, where there is no database > operation. Only there will a form and a mail will fire on submit of > the very form. How to desi

Multiple upload field in a model with AD7six Upload Behaviour

2009-03-11 Thread marco.rizze...@gmail.com
My question is: If in a model I have many image fields and many upload field how can I set the model to permit the use of AD7six Upload Behaviour with all these fields? Many Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Re: How to create models for complex database designs like this?

2009-03-11 Thread villas
> But celebrity_id is showing id instead of name how > can i get celebrity name instead of id. Only fields named 'title' or 'name' are displayed automatically in lists etc. I appreciate that this answer doesn't directly solve your problem with the 'celebrities' table, but it may be helpful w

Re: Suspected bug in controller method routing

2009-03-11 Thread majna
yes, set controller and action params in form helper. On Mar 11, 12:05 pm, Danny Lieberman wrote: > I have a controller with  the usual CRUD functions and I added an > additional function called fu (followup) > > The fu function has it's own fu.ctp view and after the user enters > data in the fo

Suspected bug in controller method routing

2009-03-11 Thread Danny Lieberman
I have a controller with the usual CRUD functions and I added an additional function called fu (followup) The fu function has it's own fu.ctp view and after the user enters data in the form, it saves the data to the database using a save method The only problem is that cake always returns contr

Re: Redirect after an edit operation in a paginated view

2009-03-11 Thread AD7six
On Mar 11, 11:52 am, Danny Lieberman wrote: > This doesn't work > I have an edit method and a fu method - both do database saves.  BUT > the cake automagic stuff always sends the user back to the edit method > after fu save operation - this looks like a bug Assumptions + monologues are ace, yo

Re: Articles both hasOne and hasAndBelongsToMany Photos ... What's the syntax?

2009-03-11 Thread Xoubaman
Just model it like a normal HABTM relationship, no special syntaxis, and add the field in the database. When saving, try this: http://teknoid.wordpress.com/2008/09/24/saving-extra-fields-in-the-join-table-for-habtm-models/ I haven't done it before, so i can't secure his fiability, but looks goo

Re: Redirect after an edit operation in a paginated view

2009-03-11 Thread Danny Lieberman
This doesn't work I have an edit method and a fu method - both do database saves. BUT the cake automagic stuff always sends the user back to the edit method after fu save operation - this looks like a bug Danny On Mar 9, 2:52 pm, grigri wrote: > I did just this a while ago; it worked fine for

Re: Redirect after an edit operation in a paginated view

2009-03-11 Thread Danny Lieberman
Doesn't work - I have diagnosed the problem There are two methods in the controller that perform an update - edit and fu (followup) the fu controller has its own fu.ctp view and edit has edit.ctp BUT whenever the user submits the fu.ctp form - the control is passed to the EDIT method not to the

Error with use Upload Behaviour of MI-BASE

2009-03-11 Thread marco.rizze...@gmail.com
Hi I try to use the upload and image_upload behaviour of MI-BASE project for add field photo to user model My code is: In model var $actsAs= array( 'ImageUpload' => array( 'fileField' => 'photo', 'allowedMime' => array('image

Re: Multiple language supports

2009-03-11 Thread Martin Westin
> Or is their any facility in cakephp like, i enter only English > information and it is saved in both language. The developers working on the Cake core are smart, but don't hold your breath :) What you are aiming for is two different things. 1. Translations of your application's "static" texts

Multiple language supports

2009-03-11 Thread Sensible
Hi, I want to support multiple languages on my site. I read through docs for that, but i am confused how to do that. First my requirements. I have shopping cart application. I want multiple language support for my site with following features. 1. I am uploading products and its related info

Re: 'cake bake' having mysql connection problem with MAMP

2009-03-11 Thread bearlee
I found out the problem. MAMP comes with its own PHP (reside in /Applications/MAMP/bin/...) Mac OS X has its own PHP (reside in /usr/var/bin/..) So, when I run the 'cake bake', it is using the Mac OS X default PHP with its php.ini instead of the one that came with MAMP (this one is all configure

Re: Question on MI-Base project

2009-03-11 Thread AD7six
On Mar 11, 10:28 am, "marco.rizze...@gmail.com" wrote: > Hi > I would useMI-Basefor my application. > I have a question about it > 1)I have different databases (one for my application (for example a > blog ) and one where there is saved the user's data (legacy > application) ). How can I manage

Re: the blog post problem

2009-03-11 Thread bilal
Hi Jon, You are right, all three files are different, the server had mod_rewrite off, i turned it on and tried again but it didnt help. :( what else could we look at ... On Mar 11, 4:58 am, Jon Bennett wrote: > Hi bilal, > > >  all three htaccess files are there, but i still have to type index

Re: Articles both hasOne and hasAndBelongsToMany Photos ... What's the syntax?

2009-03-11 Thread mattalexx
What's the syntax for adding an "extra field" to the $hasAndBelongsToMany var? Thank you for you response. On Mar 11, 2:43 am, Xoubaman wrote: > You can model it like a normal HABTM relationship with an extra field > named main_photo. > > On Mar 11, 8:30 am, mattalexx wrote: > > > My articles

Re: controler problem

2009-03-11 Thread ibanez_nuke
you should write $this->redirect(array('controller' => 'age2controller', 'action' => 'actionpage2')); instead of $this->redirect('page2controller/actionpage2',null, true); On Wed, Mar 11, 2009 at 5:14 PM, Trandaburu Tiberiu Andrei < birli...@gmail.com> wrote: > > hi , i need some informations a

Re: Redirect after an edit operation in a paginated view

2009-03-11 Thread Danny Lieberman
That didn't work - even though it seems like it should - I still suspect CakePHP magic/debug level is breaking behavior of the controller.Danny On Mar 9, 2:52 pm, grigri wrote: > I did just this a while ago; it worked fine for my purposes: > > $this->redirect($this->referer()); > > However, ther

Question on MI-Base project

2009-03-11 Thread marco.rizze...@gmail.com
Hi I would use MI-Base for my application. I have a question about it 1)I have different databases (one for my application (for example a blog ) and one where there is saved the user's data (legacy application) ). How can I manage a situation like this? --~--~-~--~~~--

controler problem

2009-03-11 Thread Trandaburu Tiberiu Andrei
hi , i need some informations about how cake works, i have 2 models ,2 controls and 2 view pages with a form on both pages , when submit on first page i will go on the second page, i wrote in the controller : $this->redirect('page2controller/actionpage2',null, true); , but it still asks me if i cr

Re: Form Helper, default value

2009-03-11 Thread mscdex
On Mar 11, 12:49 am, Matthieu wrote: > Hi! > > Id like to choose a default value for this form element et I dont know > how? (exemple: defautl value: 01-01-1980 of Day-Month-YearÉ > > echo $form->input('birthdate', array('dateFormat' => 'DMY', > 'timeFormat' => 'none', 'minYear' => date('Y') - 10

Re: Use Controller in Helper

2009-03-11 Thread mscdex
On Mar 10, 9:09 pm, wolf net wrote: > Controller: $this->set('controller', $this); > view: $controller->action(); IMHO that's a bad idea on many levels. What I meant was something like: $this->set('testResults', $this- >CustomComponent->getTest()); Then in the view you use $testResults. --~--~-

Re: the blog post problem

2009-03-11 Thread Jon Bennett
Hi bilal, > all three htaccess files are there, but i still have to type index.php > to access, this is how my .htaccess files looks like > > >RewriteEngine on >RewriteRule^$ app/webroot/[L] >RewriteRule(.*) app/webroot/$1 [L] > Hmm, you should have 3 different htac

Re: when I have set the Configure::write('debug', 0), how can I let a new model can be use.

2009-03-11 Thread Rimoe
Thanks for your answer.because I has no the encourage to delete tmp/cache/models/* data. [?][?] when I delete all of that data. my site is can use the comment the (Configure::write('Cache.disable', true);) Thanks sincerely rimoe 2009/3/10 Mauricio Morales > > You can manually delete the tmp/

Re: Articles both hasOne and hasAndBelongsToMany Photos ... What's the syntax?

2009-03-11 Thread Xoubaman
You can model it like a normal HABTM relationship with an extra field named main_photo. On Mar 11, 8:30 am, mattalexx wrote: > My articles have and belong to many photos. This is so when the photo > is seen somewhere else on the site, I can have a "see related > articles". Each article also has

'cake bake' having mysql connection problem with MAMP

2009-03-11 Thread bearlee
Hi all, On my Mac OS X, I've installed MAMP and followed the blog tutorial provided on CakePHP. Blog tutorial went fine without any errors (no configuration error). However, when I tried to follow the 'Simple Acl controlled Application' tutorial, I could not run 'cake bake'. Before I rant about

Re: Turning $_GET/$_POST into named params

2009-03-11 Thread AD7six
On Mar 11, 1:58 am, Casey Stark wrote: > I've been searching for the best way to do this for a while and I > agree with Martin now. I really wish cake had a more elegant solution, > but this one is definitely the cleanest and fastest. What is hard about doing: function index() { if ($this->da

Articles both hasOne and hasAndBelongsToMany Photos ... What's the syntax?

2009-03-11 Thread mattalexx
My articles have and belong to many photos. This is so when the photo is seen somewhere else on the site, I can have a "see related articles". Each article also has one main photo. I can't seem to figure out the syntax for this in APP/models/article.php file and in APP/models/photo.php. --~--~---

Re: How to create models for complex database designs like this?

2009-03-11 Thread jason m
assuming your relations are setup correctly in the models, you probably just need to use the recursive in the movies controller. $movies = $this->Movie->find('all', array('recursive'=>2)); that should give you a list of celebs data for each cast. then just use a pr($movies) to see what is in the

Webservice problem

2009-03-11 Thread lakers fan
Hello, I followed the following tutorial and it worked fine. http://www.littlehart.net/atthekeyboard/2007/03/13/how-easy-are-web-services-in-cakephp-12-really-easy/ Then I created a function validate() (which is same as index()) and created validate.ctp which is same as index.ctp.

Re: Paginator localhost vs. remote server URL generates differently.

2009-03-11 Thread Martin Westin
I'd say that your server is doing things correctly and your local setup is acting strange. To get any arguments to persist when paginator creates it's links you need to do this in your view: $paginator->options(array('url' => $this->passedArgs)); Since you mention nothing about it my guess is t