Re: Accessing other table/model from main controller

2009-03-19 Thread Miles J
Just do $uses = array('MainCategory', 'SubCategory') in the controller. Now you have access to both models within 1 controller. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group,

Accessing other table/model from main controller

2009-03-19 Thread Charles
I am VERY new to MVC and a novice to OOP. I have two tables I am currently working with. I am able to get the info I require from the table the controller is named after but I am now needing info from a seperate table that does not share the name of the controller. For example the files I have a

Re: how to send email

2009-03-19 Thread SPS
you can use the phpmailer component to send email to gmail or yahoo. once you have copied the phpmailer folder to your app\vendors folder, please edit the email.php file in the app\controllers\components folder. In email.php pls edit the send() function with the following, i have shown mail sendin

Using metods of other models.

2009-03-19 Thread juansaabvane...@gmail.com
Hello, I'm a new cooker. I've three days with cake php. For mi aplicaction firts I'm devel the users-group section. For that, I uses a component created for a developer (DarkAuth). Now, I'm creating a simple adduser view with a form. I want that when the user is in creation, a field shows the pos

Re: Validate multiple record without saving

2009-03-19 Thread Jimmy Bourassa
Wow, thanks a million. To answer your question, I'm using a wizard (Wizard Component to be specific) for an "add" action. Since the data is stored on every step but only "saved" in the last step of the wizard, I want to validate on every step for obvious reasons. Thanks again :) On 19 mar, 22:0

Re: Validate multiple record without saving

2009-03-19 Thread mscdex
saveAll has an $options array as one of its parameters, and one of the permitted options is "validate" which can be set to "only" to only validate and not save. Example: $this->Model->saveAll($this->data, array('validate' => 'only')); However, I'm curious as to why you're not wanting to save if t

Re: how to send email

2009-03-19 Thread nhathoang nhathoang
I used to send mail by cakephp but not to succeed, I don't know why, there is a way to send mail you should use which is phpmailer, you show write a component and attach phpmailer to it 2009/3/20 dr. Hannibal Lecter > > You send an email to yahoo and gmail the same way you send to any > other a

Re: Using functions from another model

2009-03-19 Thread mscdex
On Mar 19, 7:54 pm, jc_mich wrote: > I have the next problem when I try to call these functions: > > Warning (512): SQL Error: ERROR:  syntax error at or near "demoFunction" Post the relevant code. It sounds like you're trying to use SQL to call your model functions instead of making the calls i

Validate multiple record without saving

2009-03-19 Thread Jimmy Bourassa
Hello, I'm trying to validate multiple records from one single form (using $form->input('Model.X.Field'), but I don't want the records to be saved if the validation success. So far, I was using Model::validates to validate my fields, but this method only returns invalid fields for one record. I

Re: Release: 1.2.2.8120

2009-03-19 Thread Henrique Machado
Great! Good Job! 2009/3/19 joshua > Many thanks to CakePHP team's work! > > On Fri, Mar 20, 2009 at 6:25 AM, Gwoo wrote: > >> >> CakePHP still rising! >> >> We are excited to announce the release of CakePHP 1.2.2.8120[1]. The >> latest stable release fixes several bugs including a security iss

Using a page anchor with Pagination links

2009-03-19 Thread Waylon
Has anybody figured out how to make the PaginationHelper output a link that has a '#anchor_name' at the end of it. For example, by default you get something like: http://www.example.com/controller/action/page:3 What I'm looking for is: http://www.example.com/controller/action/page:3#anchor_name

Re: Release: 1.2.2.8120

2009-03-19 Thread joshua
Many thanks to CakePHP team's work! On Fri, Mar 20, 2009 at 6:25 AM, Gwoo wrote: > > CakePHP still rising! > > We are excited to announce the release of CakePHP 1.2.2.8120[1]. The > latest stable release fixes several bugs including a security issue > with paginator links. While this issue shoul

Using functions from another model

2009-03-19 Thread jc_mich
Hi all! I created a database in postgres it has four tables, I've made their respective models. Only a model has a controller that call some functions from other models. I have the next problem when I try to call these functions: Warning (512): SQL Error: ERROR: syntax error at or near "demoF

Re: Release: 1.2.2.8120

2009-03-19 Thread Miles J
Awesome, downloading it now. Your efforts and work are appreciated, thanks! --~--~-~--~~~---~--~~ 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 unsubscri

Re: how to send email

2009-03-19 Thread dr. Hannibal Lecter
You send an email to yahoo and gmail the same way you send to any other account, right? Also, why are you working on cakephp 1.1? On Mar 19, 2:40 pm, sandhya wrote: > send email to yahoo and gmail accounts using cakephp 1.1.19.6305 --~--~-~--~~~---~--~~ You recei

Re: How to get a unique session id.

2009-03-19 Thread dr. Hannibal Lecter
How about the session id? o_0 On Mar 19, 11:24 pm, asoft wrote: > Does any one know how to get the unique session id that is created. > It's like in CakePHP the closest thing to the session_id() is the > useragent. > I want to make an ecommce site where users don't create an account to > shop. >

How to get a unique session id.

2009-03-19 Thread asoft
Does any one know how to get the unique session id that is created. It's like in CakePHP the closest thing to the session_id() is the useragent. I want to make an ecommce site where users don't create an account to shop. Can i get any help. Thanks --~--~-~--~~~---~--~-

Release: 1.2.2.8120

2009-03-19 Thread Gwoo
CakePHP still rising! We are excited to announce the release of CakePHP 1.2.2.8120[1]. The latest stable release fixes several bugs including a security issue with paginator links. While this issue should only affect a small number of people, we highly recommend everyone upgrade to this stable ve

Re: making belongTo association to a third model

2009-03-19 Thread dave08
I think I finally understand. When the associations are properly done, one can use the contains behaviour or recursive option in the find() function. The thing I still have a problem with, is that I need to filter all the results with a condition on model3. I tried using condition in the find func

Re: Youtube API

2009-03-19 Thread blckspder
http://code.google.com/apis/youtube/2.0/developers_guide_protocol.html google has some great documentation at the above link. In cake though you are going to want to put the api file into the vendors folder in your app directory and then use App:import() to import the class. One thing I learned

Re: my date field is not blank, but cake thinks it is

2009-03-19 Thread iFeghali
I faced the same problem with the alphanumeric validation that seems to be buggy [1]. remove the line: > 'creationDate' => array('date') from your model and your form should submit ok. the problem is when you don't specify the error message cake just trows "this filed cannot be

Auth Component Custom Login

2009-03-19 Thread iFeghali
Hello There, I want to authenticate my users against a database table or a NIS domain, depending on a flag set in the user record. I have noticed that Auth already did the form processing in the time the login() method of users controller is called so i guess its not the right place to digg into.

understanding shoppping carts w/ MVC, new to cake

2009-03-19 Thread squall2...@gmail.com
I know this is a long post, i'm sorry. I'm just trying to get advice on how to structure this code the right way. Alright, I've been programming php off and on for a few years now, but i'm new to cakephp 1.2. I'm working on a project that involves a shopping cart for ordering food. After talking

Re: my date field is not blank, but cake thinks it is

2009-03-19 Thread Miles J
Add allowEmpty => 'true'? --~--~-~--~~~---~--~~ 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 cake-php+unsubsc

Re: my date field is not blank, but cake thinks it is

2009-03-19 Thread GrantB
Good to know; I'll have to try it out. Does anyone have insight to the problem I'm seeing, though? On Mar 19, 3:53 pm, Miles J wrote: > Cake has a built in system for created, modified. Cake automatically > inserts data for created when a new row is added, and inserts data for > modified when

Re: my date field is not blank, but cake thinks it is

2009-03-19 Thread Miles J
Cake has a built in system for created, modified. Cake automatically inserts data for created when a new row is added, and inserts data for modified when a row is updated. You wouldn't need to do it yourself. --~--~-~--~~~---~--~~ You received this message because y

Re: CakePHP in Google Summer of Code

2009-03-19 Thread Diego Caro A.
On Thu, Mar 19, 2009 at 4:44 AM, Pierre MARTIN wrote: > > Arf too bad! > Next year maybe ... > > On 18 mar, 19:02, Gwoo wrote: >> Thank you for submitting "CakePHP" organization application toGoogle >> Summer of Code 2009. Unfortunately, we were unable to accept your >> organization's applicatio

Re: Ratings

2009-03-19 Thread Miles J
Well you need to send off an ajax request, and if you are unsure how to do that just have a radio list of rate options, and then post it to the page to save it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP

Re: Database Setup

2009-03-19 Thread Miles J
Looks good to me, just the profile table looks like extra bloat. --~--~-~--~~~---~--~~ 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

Re: Multiple language supports

2009-03-19 Thread Miles J
Because its got everything you need to build a website. No programming language can "translate" text unless some programmer builds an extensive library for it, which is unlikely. On Mar 19, 3:29 am, Sensible wrote: > Hi Miles, > > Than what is the use of "translate"? > > And according to your su

Re: Passing extra parameters to a behavior's beforeFind callback method from the controller

2009-03-19 Thread Miles J
Oops I meant to say "Your not able to pass controller data to the behavior". I was thinking something like this. In the controller: $this->Model->data['Thumbnail'] = array('image', 294, 200); Then in then behavior, grab that data. $Model->data['Thumbnail']; --~--~-~--~~

Re: my date field is not blank, but cake thinks it is

2009-03-19 Thread GrantB
Is "created"/"modified" a built-in thing for Cake? Anyway, what I'm using the field for is not important. This could be a birthday field or something and the issue would persist. My db schema for this field is: creationDate DATETIME NOT NULL The Cake-baked default scaffold should have a mo

Re: Keeping session alive when loading images from database

2009-03-19 Thread Daffy
I appreciate your response but people have debated the usage of BLOBs for a long time so I don't think we should here. Our development team looked at the possibilities for this project and decided on BLOBs. Most of the time we have used the file system. Thanks for your suggestions. On Mar 19, 5:3

Re: Passing extra parameters to a behavior's beforeFind callback method from the controller

2009-03-19 Thread mattalexx
Something like this? loadModel('IndustryLink'); $this->IndustryLink->actsAs['Thumbnail'] = array('image', 294, 200); $industry_links = $this->IndustryLink->find('all', array( 'conditions' => array('IndustryLink.active <>' => '0'), )); ?> This seems to work, but is there a better

Re: Cake App Website

2009-03-19 Thread Dardo Sordi Bogado
http://cakeapp.com/ On Thu, Mar 19, 2009 at 10:51 AM, Dave wrote: > > Can someone tell me the url of the site where you build your app > database online. It thought I had it saved but I guess not. It was all > AJAX build your database tables, the fields and relationships online, > then you could

Re: How can a controller and a view share code

2009-03-19 Thread brian
You could put the formatting code in a view and apply the view in order to create the PDF. That should work whether you're saving the file or pushing it out to the browser. For instance, using the (modified) CsvHelper[1] (formats and pushes out CSV files) I have the following: MembersController:

Re: Getting : Undefined index: error - Newbie Please help

2009-03-19 Thread brian
What does this show you in the view? debug($projects); On Thu, Mar 19, 2009 at 8:59 AM, cpeele wrote: > > Hello, thanks for replying. > > Sorry about that. > > What I want is to grab all the projects that pertain to a certain > user...by username. > > Here is what the DB tables look like: > > u

Re: about how to ask in cakephp

2009-03-19 Thread brian
Sure, posting the table schema, if relevant, is always a good idea. Cake (generally) requires that the table be created in a certain way, so this often leads to problems. On Wed, Mar 18, 2009 at 10:52 PM, computing1...@gmail.com wrote: > > dear everyone, I am victor, I love cakephp , although I

Re: my date field is not blank, but cake thinks it is

2009-03-19 Thread brian
I'm not sure what the problem might be but, normally, you'd have a column called "created" and no form element(s). Cake will set the value itself. To do that your your table schema should have the following: created DATETIME DEFAULT NULL, modified DATETIME DEFAULT NULL I guess for someth

Re: Sharing CAKEPHP Session with external app on a different virtual host

2009-03-19 Thread byqsri
Thanks These articles are very interesting. I try to get the cake session and I noted that only inside webroot i can to do it If I am in a up folder i can't to do it I try to set in bootstrap.php ini_set("session.cookie_domain",'http://localhost'); But I get then in my cake application th

Re: Multiple language supports

2009-03-19 Thread Martin Westin
Cake is helpful in that: - you don't have to modify your database tables to support a new language - you don't have to do any of the logic that store and find translated texts. - when a user visits your site and chooses french that data is automagically loaded from the database. = you don't have t

Youtube API

2009-03-19 Thread roycakephp
Hello, Can someone please tell me how you can use the youtube API in combination with CakePhp? I can't find anything about it on the internet. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post

.htaccess and blog

2009-03-19 Thread thankyou
Hello, I'm trying to enable a blog on my cakephp website. I have the following htaccess code in my /blog folder: RewriteEngine on RewriteBase /blog/ This code enables the blog but subfolders on the blog page give 404 errors. For example, the following links give 404 errors: http://www.

Re: With debug = 0, Cache::write isn't writing

2009-03-19 Thread majna
View cache is hard-coded and saved to tmp/cache/views. Cache object is not implemented for view cache. (wait for 1.3 or 2.0 :) ) On Mar 18, 10:22 pm, fr3nch13 wrote: > On further review, it seems that the Cache::write() works within the > libraries, for the internal configs, but not for the

my date field is not blank, but cake thinks it is

2009-03-19 Thread GrantB
I just created my first CakePHP app and I'm running into a snag. I have a table "logins" with a datetime field. I've baked the MVCs with no outward signs of trouble. In the scaffolded add view, my date is a series of dropdowns with the current date/time preselected. When I submit, Cake always

RE: Dividing Users

2009-03-19 Thread Dave Maharaj :: WidePixels.com
Thanks for your info. Just wondering because instead of ROLE I have group_id in the USER table so each user is either a 1 2 or 3 (MANAGER, BUYER or SELLER) is that not the same thing? -Original Message- From: John Andersen [mailto:j.andersen...@gmail.com] Sent: March-19-09 8:54 AM To:

Re: CakePHP in Google Summer of Code

2009-03-19 Thread Pierre MARTIN
Arf too bad! Next year maybe ... On 18 mar, 19:02, Gwoo wrote: > Thank you for submitting "CakePHP" organization application toGoogle > Summer of Code 2009. Unfortunately, we were unable to accept your > organization's application at this time. We received many more > applications for the progra

Need help regarding Apache settings

2009-03-19 Thread Saqib Saud
Im trying to configure apache for cakephp. the page im getting is without CSS. I havent made changes to cake except for adding salt and setting database. There is some problem with apache I guess. my httpd.conf Options FollowSymLinks > > AllowOverride All un-commented > LoadModule rew

How can a controller and a view share code

2009-03-19 Thread Thomas Bensler
Hi there, I have some code formatting an user object as a human readable string. It was put into an UserHelper class as it is used in different views. Now I need that functionality in my UserController to put that string into an PDF file (using fpdf) . Trying to utilize my helper class for that I

Party Pattern/Contact Management

2009-03-19 Thread Amit
Has anyone implemented the Party Pattern design before? I'm creating a Contact Management app that is the equivalent of Highrise (www.highrisehq.com) and wanted to see if something already was available before possibly re-inventing the wheel. --~--~-~--~~~---~--~~

making belongTo association to a third model

2009-03-19 Thread dave08
Hello! I have one model that I declared with a hasOne association to model2, and in model2, I need a belongTo association to a third model (a lookup table). This whole association should be accessible with a find () from the first model - is this possible in cakePHP, or do I have to make two (or

Re: Dividing Users

2009-03-19 Thread John Andersen
On Mar 19, 7:05 am, Dave wrote: > Can someone tell me if this would be the correct structure for > database table names? > > Everyone is a USER :which has (ID, name, password, email, group_id) > > USERS are broken up into 3 GROUPS (ID, name) > > So the USER then fits into one of the GROUPS belo

Re: Keeping session alive when loading images from database

2009-03-19 Thread Syed Shikeb ur Rahman
IMHO a best of both worlds approach would be to store the images as blobs and use caching for the images later on to speed up the request handling. But depending on the complexities and overheads involved in devising such a solution, it might be better to simply use the FS if it's a simple app. Pe

how to send email

2009-03-19 Thread sandhya
send email to yahoo and gmail accounts using cakephp 1.1.19.6305 --~--~-~--~~~---~--~~ 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 thi

Re: Sharing CAKEPHP Session with external app on a different virtual host

2009-03-19 Thread Alfredo Quiroga-Villamil
There seems to be a couple of links and stuff online that should hopefully guide you in the right direction. Take a look at these and see if they help. http://mikekrisher.com/?p=499 http://teknoid.wordpress.com/2008/10/05/sharing-cakephp-session-with-another-app/ http://www.scribd.com/doc/5542/C

Re: Form Helper and SEO

2009-03-19 Thread rgreenphotodesign
After doing more research (with better keywords) I found this. http://groups.google.com/group/cake-php/browse_thread/thread/76970975b47c5dec/9f7823963887ef9b?lnk=gst&q=FormHelper+Fieldset#9f7823963887ef9b I'll add my extends to the formhelper copied via the core into app. On Mar 18, 3:10 pm, rg

Database Setup

2009-03-19 Thread Dave
Can someone take a look at my SQL to see if it is correct? Or if there is a better way to set it up? http://cakeapp.com/sqldesigners/sql/leiabeans Everyone is a user, users are divided into investors and agents then agents have posts which have options, investors have bookmarks which belong to

Re: Sharing CAKEPHP Session with external app on a different virtual host

2009-03-19 Thread byqsri
Ok thanks. I save on DB my session but then how can I do decide which is the right session in the external app? On Mar 19, 3:27 pm, Alfredo Quiroga-Villamil wrote: > One way that might help you accomplish this is by storing them in a DB. > > See:http://book.cakephp.org/view/173/Sessions > > Rega

Re: Using javascritp variables in cakephp

2009-03-19 Thread lucas
Brian, you were right! I thought that when you call a php code inside a javascript code, it will create a data stream to the server and execute that part of the php code there... wrong! i wrote inside the append function the html code that i wanted as you tell me and that worked fine!!! thanks f

Re: Sharing CAKEPHP Session with external app on a different virtual host

2009-03-19 Thread Alfredo Quiroga-Villamil
One way that might help you accomplish this is by storing them in a DB. See: http://book.cakephp.org/view/173/Sessions Regards, Alfredo On Thu, Mar 19, 2009 at 8:07 AM, marco.rizze...@gmail.com wrote: > > My question is this? > How can I sharing CAKEPHP Session with external app on a differen

Re: Performance different between cakephp 1.1 and 1.2

2009-03-19 Thread LunarDraco
Add a log statement to your AppController.beforeFilter() function beforeFilter(){ FireCake::log($this->name,$this->action); } I've had several occasions while integrating Auth and other components where I've created a situation where a single controller was being called in a loop fashion beca

Cake App Website

2009-03-19 Thread Dave
Can someone tell me the url of the site where you build your app database online. It thought I had it saved but I guess not. It was all AJAX build your database tables, the fields and relationships online, then you could download the sql file. If anyone could let me know that would be great. Tha

Ratings

2009-03-19 Thread Maulik
hello to all, i m working on star Rating functionality using ajax from the helpful site http://www.nofunc.com/AJAX_Star_Rating/ my problem is that how can i store the rating in to my database. i hv add this code to my view.ctp but i m confuse

Re: Getting : Undefined index: error - Newbie Please help

2009-03-19 Thread cpeele
Hello, thanks for replying. Sorry about that. What I want is to grab all the projects that pertain to a certain user...by username. Here is what the DB tables look like: users -- id firstName lastName username password projects - id name description user_id Here i

Strange behaviour of notEmpty validate rule

2009-03-19 Thread WebbedIT
Anyone else experienced this where you are obviously sending a form field through with a value, but the notEmpty validate rule still returns false? echo debug($this->data): Array ( [Scheme] => Array ( [id] => 46 ) [Referral] => Array ( [dat

Sharing CAKEPHP Session with external app on a different virtual host

2009-03-19 Thread marco.rizze...@gmail.com
My question is this? How can I sharing CAKEPHP Session with external app on a different virtual host? Many Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to c

Re: Little performance trick on cake 1.1.x

2009-03-19 Thread jitka (poLK)
In short, you are looking for places where PHP5 constant and functions get_class(), get_class_vars() and get_class_methods() are used (php5 is case sensitive in their result, php4 not). --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

Re: Performance different between cakephp 1.1 and 1.2

2009-03-19 Thread namsouth
I face this problem both in Production server and local testing environment On Mar 19, 4:22 pm, WyriHaximus wrote: > Hehe that shouldn't be a problem at all :). Those errors your getting, > are you getting them on the production server 2? > > On Mar 19, 5:36 am, namsouth wrote: > > > Indeed my

Re: Little performance trick on cake 1.1.x

2009-03-19 Thread Grzegorz Pawlik
jitka, is there any possibility that You could provide some information about other php4 workarounds? I could really use this info. Not sure if I could track them down with xdebug profiling :) On 18 Mar, 13:09, Grzegorz Pawlik wrote: > Ok, that's gr8 :D I don't need that to be changed "globably"

Re: Multiple language supports

2009-03-19 Thread Sensible
Hi Miles, Than what is the use of "translate"? And according to your suggestion i have to enter all language texts. So i have to enter product name in english as well as in arabic. right..? if it is right than how cake php is helpfull to me? Thanks. --~--~-~--~~~---

Re: Keeping session alive when loading images from database

2009-03-19 Thread burzum
I don't see any real "advantage" in any of the listed so called advantages. >Referential integrity (ACID Consistency) Doesnt matter, the file is there or not in the FS. >Ease of backup Also just one command to pack the files with your favorit compression programm. >Saving of Inodes A FS does th

Re: Passing extra parameters to a behavior's beforeFind callback method from the controller

2009-03-19 Thread Miles J
Your not able to pass controller data to the model. You should store the data into the Model object and then use that. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email

Re: Multiple language supports

2009-03-19 Thread Miles J
You have to enter all the languages im pretty sure. It doesnt "translate" the text like you are thinking. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@

Re: Performance different between cakephp 1.1 and 1.2

2009-03-19 Thread WyriHaximus
Hehe that shouldn't be a problem at all :). Those errors your getting, are you getting them on the production server 2? On Mar 19, 5:36 am, namsouth wrote: > Indeed my table relationship is quite simple just a list of products > belong to different product cat ( product_cats table has many > pro

Re: Multiple language supports

2009-03-19 Thread Sensible
Thanks for your reply.. I am entering only english text. and i want site also with arabic text. My Product Model: class Product extends AppModel{ var $name = 'Product'; //var $actsAs = array('Tree'); var $actsAs = array( 'T

Re: Multiple language supports

2009-03-19 Thread Martin Westin
Hi again, I think it would help to see your code. Just a double-check: You are inserting French and Arabic text when you insert your product, right? On Mar 19, 6:01 am, Sensible wrote: > Hi, > > Any one to help me...! --~--~-~--~~~---~--~~ You received this mess

Re: Reject Hidden field

2009-03-19 Thread Martin Westin
I can't be sure which hidden field you mean, but turning off SecurityComponent should get rid of the hidden security-hash (who needs security) which looks something like this when rendered onto the page: /Martin On Mar 19, 5:47 am, "computing1...@gmail.com" wrote: > When I write $form->inptu