Re: help::sending data from one controller to another controller

2009-09-07 Thread Martin Westin
You have had your first bump into the wall of strictly linking views, controller and model. I generally tend to link the views and controller more and keep my models more loose. That is, I don't have a problem with using ModelB in ControllerA. I read that you want one click to save both Contact a

Re: cake cant find model's method!!!

2009-09-07 Thread Dr. Loboto
Output get_class($this->EnrolleesOfferedSubject) in your controller. If it is AppModel cake cannot find your model file. On Sep 8, 10:32 am, learning_cake_php wrote: > i already check my model names and codes... > i have a controller named EnrollmentController and from there > i used the $uses pr

Re: Setting Up CakePHP on MAC with MAMP and Eclipse

2009-09-07 Thread Martin Westin
I have been developing in folders like "project_name" for years and I like it. I only need to keep and manage one Cake installation and it keeps my clutter of files to a minimum :) The way I host that locally is with one virtual host for each project. I point the Apache root folder for each one t

Re: Missing Database Table

2009-09-07 Thread Dr. Loboto
Do you have connection to your database? Do you have table named "posts" in that database? On Sep 8, 11:09 am, new2cakephp wrote: > Hi all, > > I am new to cakephp, started working on the blog tutorials, > > Missing Database Table > Error: Database table posts for model Post was not found. > > h

Re: Can I fully build a niche Classifieds site using CakePHP?

2009-09-07 Thread Jamie
Without trying to sound harsh: CakePHP is not for you. If you're new to PHP and you're not familiar with programming, you'll get nowhere with CakePHP, because CakePHP is really just PHP wrapped in some fancy libraries. In other words, you're not dealing with a front-end CMS like Wordpress or Drupa

Re: Upload Help

2009-09-07 Thread Jamie
Well, are you new to PHP programming in general, or just CakePHP? Because remember: CakePHP is still PHP. So don't be afraid to utilize the file uploading strategies you employ in 'vanilla' PHP code with CakePHP. - Jamie On Sep 7, 6:25 am, tricky wrote: > i cant seem to be able to grasp the upl

Re: Returning file for download

2009-09-07 Thread Braindead
You could also have a look at Cakes media views: http://book.cakephp.org/view/489/Media-Views --~--~-~--~~~---~--~~ 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

Re: Need a bit of help with the delete function

2009-09-07 Thread SciFi SciFi
What? Can you elaborate on this? On Mon, Sep 7, 2009 at 7:51 PM, Miles J wrote: > > Then put: > > var $primaryKey = 'name_id'; > > In your model. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" grou

Missing Database Table

2009-09-07 Thread new2cakephp
Hi everyone, I am new to cakephp, was trying to build a blog using the tutorials, did everything as it was said but i am getting this error. Missing Database Table Error: Database table posts for model Post was not found. Read the naming conventions, could not find the solution for this...!!!

Can I fully build a niche Classifieds site using CakePHP?

2009-09-07 Thread SciFi
Hi, I'm new to PHP and am not a web programmer and developer, but I would like to offer my community their own online classifieds site. Is CakePHP useful for this? If so, how can I get started? I would appreciate all helpful comments and direction. Thanks. Sci --~--~-~--~~---

trouble with getting blog tutorial working

2009-09-07 Thread macelderry
mac os x snow leopard cake 1.3 php 5.3 Seems like the index page is working, I see the results from find ('all') nicely formatted in my browser with the hyperlinks to the blog post. This is where i am having the problem. When I click on add or any of the table entries i get a 404 error not found

Missing Database Table

2009-09-07 Thread new2cakephp
Hi all, I am new to cakephp, started working on the blog tutorials, Missing Database Table Error: Database table posts for model Post was not found. have got this error, checked the naming conventions but still no solution help me on this thanks all --~--~-~--~~~--

Routing Question

2009-09-07 Thread Dave Maharaj :: WidePixels.com
Can you use routing for image directories? I have a link to an image that goes to site.com/img/entries/gal/c990042505a.jpg but I would like the URL to be site/gallery/c990042505a.jpg and route that to site.com/img/entries/gal/c990042505a.jpg I have Router::connect('/gallery/:filename/',array('u

Re: cake cant find model's method!!!

2009-09-07 Thread learning_cake_php
i already check my model names and codes... i have a controller named EnrollmentController and from there i used the $uses property for me to user the EnrolleesOfferedSubject model.. why is it that save,create and delete method works just fine..saves and delete to/from correct table(enrollees_offe

Re: How to use a helper in Controller or Model?

2009-09-07 Thread euromark (munich)
@fahad you should point out that you would need to create the object prior to using it for all those who are not so familiar with that App::import('Helper', 'Html'); $this->Common = new CommonHelper(); $foo = $this->Common->do(); sometimes this is not neccessary if the helper function does somet

Re: Need a bit of help with the delete function

2009-09-07 Thread Miles J
Then put: var $primaryKey = 'name_id'; In your model. --~--~-~--~~~---~--~~ 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, s

Re: Need a bit of help with the delete function

2009-09-07 Thread Darren Whittington
Does not work, both reply respond with: *SQL Error:* 1054: Unknown column 'FullName.id' in 'where clause it should be 'Fullname.name_id' Darren M:07946353261 T:0117 9550392 2009/9/6 Miles J > > No you dont need to the name the index in the array, you only do that >

Re: View HTML caching

2009-09-07 Thread Ma'moon
Hi again, i just found it here http://bakery.cakephp.org/articles/view/html-cache-helper thanks again On Mon, Sep 7, 2009 at 3:48 PM, Ma'moon wrote: > Hello Folks, > is there any way to cache the output of the rendered view in HTML format, > the scenario suggest to cache the whole page in HTML a

Re: Returning file for download

2009-09-07 Thread Benedikt R.
Solved: http://www.weberdev.com/get_example-4182.html On 7 Sep., 21:35, "Benedikt R." wrote: > Hi! > > Is it possible, to return the content of a file instead of any html? > > for example i have the > url:http://localhost/documents/download/download/433/file.pdf > > This is just a routing thing

View HTML caching

2009-09-07 Thread Ma'moon
Hello Folks, is there any way to cache the output of the rendered view in HTML format, the scenario suggest to cache the whole page in HTML and then check if the HTML version of the requested action has been already cached in HTML format, if not then simply perform the usual action operations and t

Re: Upload Help

2009-09-07 Thread Miles J
This is a pretty vague post, would be more helpful with more information. Or you can try: http://www.milesj.me/resources/script/uploader-plugin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post

Re: How to use a helper in Controller or Model?

2009-09-07 Thread Fahad
I wouldn't suggest you use a helper in your controller. but you can do it by importing your desired library. in your controller: App::import('Helper', 'Html'); On Sep 7, 5:14 pm, cogitovn wrote: > Hi all, > I'm a newbie in cakePHP. > As I know, helper is a part of View. So, how to use a helper

Returning file for download

2009-09-07 Thread Benedikt R.
Hi! Is it possible, to return the content of a file instead of any html? for example i have the url: http://localhost/documents/download/download/433/file.pdf This is just a routing thing. Read it as: http://localhost/documents/download/download/>>record_id<>fileName<< This page normally rend

Re: How to use a helper in Controller or Model?

2009-09-07 Thread Miles J
Use Router::url() to convert an array of controller/action pairs to a URL string. As for the XML, you can use the XML utility library, not the XML helper. On Sep 7, 9:01 am, Ketan Shah wrote: > Using a cakephp helper in the controller isnt permitted in the > controller and model and rightly so.

Re: help::sending data from one controller to another controller

2009-09-07 Thread Fahad
try adding url to your form: $form->create('Contact', array('url' => array('controller' => 'contacts', 'action' => 'add'))); On Sep 8, 1:28 am, BrAt wrote: > Hi , i am new to cakePHP , in order to learn php i am just making my > first test application which is > a simple telephone directory. > i

Re: Just baked: Guerra Creativa | Web Design and Logo Contest

2009-09-07 Thread Enrique
Absolutely right, we'll implement that... We have so many plans on how to improve things that's hard to say what to tackle first ;-) Cheers, Enrique On 31 Aug., 04:57, Aivaras wrote: > Well, > > you could change links to make them more SEO friendly, for example > /portfolio_projects/520/topper-

help::sending data from one controller to another controller

2009-09-07 Thread BrAt
Hi , i am new to cakePHP , in order to learn php i am just making my first test application which is a simple telephone directory. in my database there are two entities named contacts and phone_numbers which has One-to-Many relationship. Now i have a form in contacts view "add.ctp" , i want that

Re: Validate UK postcode without a space in it

2009-09-07 Thread channel5
Thanks for the custom rule, I've used it and it seems to work well. Thanks again. c5 --~--~-~--~~~---~--~~ 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

Upload Help

2009-09-07 Thread tricky
i cant seem to be able to grasp the upload... controller: lbonlines_controller.php view: upload.ctp model: item.php it just doesnt seem to be working ... please help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Upload Help

2009-09-07 Thread brian
What is not working? What does your code look like? Error messages? Debug output? On Mon, Sep 7, 2009 at 9:25 AM, tricky wrote: > > i cant seem to be able to grasp the upload... > > controller: > lbonlines_controller.php > > view: > upload.ctp > > model: > item.php > > it just doesnt seem to be w

international SEO routing

2009-09-07 Thread cakeFreak
Hey guys, does anybody has any good suggestion for converting the application routing to international SEO friendly uri? like: http://mydomain.com/en/home http://mydomain.com/it/home etc? To change $this->base mybe? Dan --~--~-~--~~~---~--~~ You received this

Re: fatal error : Class not found cake\libs\model\model_php5.php

2009-09-07 Thread brian
Is the Country model's file name "country.php"? On Mon, Sep 7, 2009 at 1:32 AM, sup wrote: > > Hello there, > > I am very new in cake, have tried to join tables through cake. > I have many cities under countries table.I have country_id column in > cities table. > I write in  the country model: >

Re: 500 Internal Server Error

2009-09-07 Thread keyser_soze83
Hi logislack, thanks for your advice on this one. I have my account on one.com and I asked them to create such an alias (as you mentioned in step 1), but they replied me it was impossible to add such an alias. So I'm afraid this doesn't work :-( So I hope there might be another solution for thi

Re: Custom behavior issue

2009-09-07 Thread brian
Have you tried putting debugging/logging statements in there to make sure the 'contain' key is set in that behavior's beforeFind()? Also, try putting Contain before Restricted in your $actsAs array. On Mon, Sep 7, 2009 at 9:38 AM, Adam wrote: > > http://bin.cakephp.org/view/745851752 > > This is

Re: How to use a helper in Controller or Model?

2009-09-07 Thread Ketan Shah
Using a cakephp helper in the controller isnt permitted in the controller and model and rightly so. As you said helpers are associated with views and thats where it should be used. On Sep 7, 3:14 pm, cogitovn wrote: > Hi all, > I'm a newbie in cakePHP. > As I know, helper is a part of View. So,

Re: Setting Up CakePHP on MAC with MAMP and Eclipse

2009-09-07 Thread Frederick D.
That's where ModelBaker comes in to be handy. You can make separate project files and have separate project folders each using separate databases. You may want to pick up a copy of VirtualHost in order to be able to test multiple sites (aka multiple projects) at the same time. You can lea

Re: Setting Up CakePHP on MAC with MAMP and Eclipse

2009-09-07 Thread Kludge
Thanks, that's really helpful. I now have CakePHP using MAMP MySQL and PHP5. Another question... what is the usual workflow. Do I create a copy of the Cake/app folder for my project (project_name)? Do I bake in another directory or directly into my Cake/project_name folder? I notice in the tutoria

Re: Should id be hidden value?

2009-09-07 Thread Aivaras
Well, in this case if you want you can store your ID in a session, but form is fine also, it's how we used to do it ;) Faifas On Mon, Sep 7, 2009 at 07:47, Jamie wrote: > > Well, are you just new to CakePHP, or PHP in general? Because remember > that CakePHP is really just PHP. And just like wi

CakeSMS : SMS server Gnokii & CakeSMS

2009-09-07 Thread Azril Nazli
URL : http://cakesms.blogspot.com An application where you can send and receive SMS using GSM Modem / Phone Tools used - VMWARE 1.6 Server - Linux Fedora - LAMP configured to run cakephp - CakePHP 1.2 RC3 - Gnokii SMSD I did this application using CakePHP 1.2 and it is free to try. Comes with V

RE: Query Help

2009-09-07 Thread Dave Maharaj :: WidePixels.com
Perfect. Works exactly as it should. Thanks. Dave -Original Message- From: Dr. Loboto [mailto:drlob...@gmail.com] Sent: September-07-09 12:07 AM To: CakePHP Subject: Re: Query Help Looks like you just forgot enclose your custom sql into brackets. array( 'Post.status' => 0,

Custom behavior issue

2009-09-07 Thread Adam
http://bin.cakephp.org/view/745851752 This is giving me an error "SQL Error: 1054: Unknown column 'Permission.group_id' in 'where clause'", so it seems to be ignoring the contain. Does anyone have any ideas? --~--~-~--~~~---~--~~ You received this message because

regarding using phpmailer for sending emails

2009-09-07 Thread ruchika batra
i am getting the following error while using phpmailer Call to undefined function _errormsg() in *phpmailer\class.phpmailer.php.**Can anyone suggest what the prob cud be?* --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: Send mail smtp

2009-09-07 Thread ruchika
i tried using smtp with port 465 and host ssl://smtp.gmail.com its not giving any error but not sending the email.what cud be the problem ?can anyone suggest? On Sep 5, 9:35 pm, "euromark (munich)" wrote: > i had another problem withsmtpand the email component > is this a bug? or a problem on f

Relationship Problem(urgent)

2009-09-07 Thread tricky
- i have 3 tables : Categories, Subs , Items - when i do a findAll() on the Category model, am having a problem - let's say i have these data entered into the tables: - example: Category: computer , Sub: Software , Sub:Hardware , Item: Mouse , Item : 3dstudioMax am trying to achieve this but with

Checkboxes in index view

2009-09-07 Thread Jas
This must be a simple thing, I've looked for most of the day. I've got a column/field in the table called 'deleted' which is bool. Using edit view of this row, cake changes this to a checkbox (which is awesome!), but in index view its just 0 or 1. How can I also make this a checkbox? So the user c

Re: Security salt

2009-09-07 Thread Biaggi
Cache classes will be regenerated, it should work with any salt value. On Sep 5, 10:07 am, WebbedIT wrote: > Yes, why would you change your salt value? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" gro

Parametric model?

2009-09-07 Thread emmexx
The object is probably wrong but I couldn't find anything better. I want to bake an application that let's some users select which fields should be shown (for some selected table). I have a model, say Master, and each main record has an associated Detail model (hasMany - BelongsTo relationship).

How to use a helper in Controller or Model?

2009-09-07 Thread cogitovn
Hi all, I'm a newbie in cakePHP. As I know, helper is a part of View. So, how to use a helper in Controller or Model? For example, I want to Html helper, Xml Helper in a controller, in order to call some methods such as, html->url(), xml->serialize() Please help me on detail. Thank you! --~--~

Select forms returning an array?

2009-09-07 Thread Michael Gaiser
I am trying to get a select form that has been passed an array, to return an array. This is the array I am sending: Array ( [clan] => Array ( [1] => Daeva [2] => Gangrel [3] => Mekhet [4] => Nosferatu [5] => Ventrue )

Re: Query Help

2009-09-07 Thread Dr. Loboto
Cake 1.2 do not work with PHP 5.3. Downgrade PHP or take cake 1.3-dev or wait for cake 1.3 stable. On Sep 7, 1:12 pm, king wrote: > Yestoday,i  installed cakephp . > > Then,i visitedhttp://127.0.0.1。 > > it displayed : > > Deprecated: Assigning the return value of new by reference is > deprecate

Re: PHP 5.3.0 deprecated warnings

2009-09-07 Thread king
Are you sure? On 8月14日, 下午11时15分, anders als wrote: > ### Solution > ## > Use the 1.3 dev release of cakephp, there is no other way to use > PHP5.3 and CakePHP than this one. > ### Solution >

Query Help

2009-09-07 Thread king
Yestoday,i installed cakephp . Then,i visited http://127.0.0.1。 it displayed : Deprecated: Assigning the return value of new by reference is deprecated in E:\Program Files\Apache Software Foundation \Apache2.2\htdocs\cake-1.2\cake\libs\i18n.php on line 109 Deprecated: Assigning the return valu

fatal error : Class not found cake\libs\model\model_php5.php

2009-09-07 Thread sup
Hello there, I am very new in cake, have tried to join tables through cake. I have many cities under countries table.I have country_id column in cities table. I write in the country model: class Country extends AppModel { var $name = 'Country'; var $hasMany = array('City');

Help with authentication

2009-09-07 Thread Shashidhar
Hi All, I am facing a problem with cakePHP Authentication code. I have a users table as CREATE TABLE IF NOT EXISTS `users` ( `id` int(11) NOT NULL auto_increment, `email` varchar(50) NOT NULL, `password` varchar(50) NOT NULL, `user_type` enum('A','N') NOT NULL COMMENT 'A:Admin, N:Normal

Re: Menus best practice

2009-09-07 Thread Ernesto
Hi Martin. thx for the responses i'll try the second one :) On 4 Set, 17:24, Martin Westin wrote: > You can create an empty element in all the other apps and just include > the element in the layout. > > You can also let the current app use another layout, one which > "inherits" the global lay

Question about on merge two different Model paginate

2009-09-07 Thread marco.rizze...@gmail.com
Hi I have this situation: I have a model Event and a model News , Both models have the field 'created' . Now in my view I would create a single list where there is there are both each others order by created. Example Event 107/09/09 News 107/09/09 News 206/07/09 .. .. .