Re: Limitations to plugins for app modularity - are there any left in cake 1.3?

2010-05-12 Thread Jamie
I wrote a CMS with CakePHP that uses much the same architecture. There's a common core that's used by about 30 sites. The classes all have a Cms prefix - CmsAppController, CmsAppModel, etc. The classes on the individual sites (AppModel, etc.) all extend the core CMS classes. They're all empty

Re: Limitations to plugins for app modularity - are there any left in cake 1.3?

2010-05-12 Thread Jamie
Oops, meant to say AppModel and Model at the end there. On May 11, 11:08 pm, Jamie jamie@gmail.com wrote: I wrote a CMS with CakePHP that uses much the same architecture. There's a common core that's used by about 30 sites. The classes all have a Cms prefix - CmsAppController, CmsAppModel,

Re: Using ajax observefield method to update text field

2010-05-12 Thread aveev
Thanks for your reply I use mozilla firebug to see whether things work as I expect or not. I could see that populate_document_select() function gets called and data['Document']['document_type_id'] gets posted. I can also get the expected return value (which is the most current unused travel

Re: Finding related articles

2010-05-12 Thread WebbedIT
It is going to be a little more difficult for you coming to this without any prior knowledge of databases. However, I wish I had worked within the constraints of this framework (OOP/MVC Design Pattern) before I had the chance to teach myself a lot of bad habits so you have that going for you.

Re: Limitations to plugins for app modularity - are there any left in cake 1.3?

2010-05-12 Thread AD7six
On May 12, 8:08 am, Jamie jamie@gmail.com wrote: I wrote a CMS with CakePHP that uses much the same architecture. There's a common core that's used by about 30 sites. The classes all have a Cms prefix - CmsAppController, CmsAppModel, etc. The classes on the individual sites (AppModel,

Re: how to add a relationship whit other key different to the PK

2010-05-12 Thread Martin Westin
Sorry for not noticing your reply until now. In that case you might get away with simply telling the relationship that the foreign key is software_id. On Apr 28, 4:02 pm, Manolet Gmail mano...@gmail.com wrote: the problem is that i need to user the value of software_id for the query. for

edit the table data.

2010-05-12 Thread Master Ram
HI.. All i ma new for cakephp my table fields are: promoter_id, agency_id, name, surname, ect.. i am fetching the existing data form the table. i am not able to edit the data. this edit code: in the controller: function edit($promoter_id=null) { if (!$promoter_id empty($this-data)) {

Re: edit the table data.

2010-05-12 Thread AD7six
On May 12, 11:27 am, Master Ram ramganga...@gmail.com wrote: HI.. All i ma new for cakephp my table fields are: promoter_id, agency_id, name, surname, ect.. i am fetching the existing data form the table. i am not able to edit the data. this edit code: in the controller: function

Re: edit the table data.

2010-05-12 Thread Master Ram
you have any sample code. for edit. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: edit the table data.

2010-05-12 Thread Jeremy Burns
Your mistake probably lies in your model. You have deviated away from Cake standards by naming your primary key 'promoter_id'. That's a bad move - change it if you can, otherwise accept a career full of unnecessary challenges (and some unsympathetic answers to your self inflicted woes). You

Re: edit the table data.

2010-05-12 Thread Master Ram
thank u sir its working... now On May 12, 2:43 pm, Jeremy Burns jeremybu...@me.com wrote: Your mistake probably lies in your model. You have deviated away from Cake standards by naming your primary key 'promoter_id'. That's a bad move - change it if you can, otherwise accept a career full of

Re: edit the table data.

2010-05-12 Thread Jeremy Burns
Pleased to help. Master Ram - I have seen several posts from you and the answer almost always lies in compliance with standards. If you are new to Cake, why are you not sticking to what works? You are swimming against the tide. Jeremy Burns jeremybu...@me.com On 12 May 2010, at 10:50, Master

Cake caching model associations?

2010-05-12 Thread WoJoCo
Hi, Quick question about Cake and model associations. I had an association that worked fine: User hasOne UserAccount fk: UserAccount.user_id UserAccount belongsTo Club fk: UserAccount.club_id I have now changed this, so that User hasOne UserAccount fk: UserAccount.user_id UserAccount

Re: Cake caching model associations?

2010-05-12 Thread WoJoCo
Oops, forgot that I also moved them into separate Plugins - fixed the problem now with a simple bit of common sense! Cheers! On May 12, 12:47 pm, WoJoCo j...@wojoco.com wrote: Hi, Quick question about Cake and model associations. I had an association that worked fine: User hasOne

Automatically select a subset of a model's fields

2010-05-12 Thread Michele Ferri
Hi. In my web app I am bridging with PHPBB for user authentication, so my main user database table is PHPBB's user table. I created a Cake model for it. The problem is, lots of tables in my app join with the user table, which has a lot of fields related to PHPBB stuff, but I only really need the

when i am trying to insert a data in to database the following error shows please help me out

2010-05-12 Thread Narendra Padala
Hi..!, I am new to cake php,usuing PostgreSql,When i am inserting a record its shows the follwoing error any one please help me out. Error: - Warning (2):pg_query() [function.pg-query]: Query failed: ERROR: relation tblcdlog_id_seq does not exist [CORE/cake/libs/model/

How i Give Css on link

2010-05-12 Thread Dilip Godhani
how i appply css on link tag in cakephp ?php echo $html-link('Search',array('controller'=$this-params['controller'],'action'='search')); ? Help me Thanks -- Dilip Godhani Jr Software Developer, Entourage Solutions e-mail: di...@entouragesolutions.com dilip.godh...@gmail.com Web.:

Re: How i Give Css on link

2010-05-12 Thread Jeremy Burns
This code will render a straightforward html link on your page, so if it is part of a div or other element, then the appropriate a CSS style will apply to it. If you want to specify the id, name or class of the link, then put it in the $htmlAttributes array: Syntax: link( string

Re: How i Give Css on link

2010-05-12 Thread Sam Sherlock
do you mean give a link a class or id attribute? pass your attribs to the options param of HtmlHelper link echo $html-link('Search',array('action'='search'), array('class' = 'supaSearch', 'id' = 'supaSearch')); also if your accessing an action of the current controller you dont need to pass

Re: How i Give Css on link

2010-05-12 Thread Jeremy Burns
Spooky... Jeremy Burns jeremybu...@me.com On 12 May 2010, at 14:24, Sam Sherlock wrote: do you mean give a link a class or id attribute? pass your attribs to the options param of HtmlHelper link echo $html-link('Search',array('action'='search'), array('class' = 'supaSearch', 'id' =

AjaxHelper::editor + ckeditor

2010-05-12 Thread mrnnn
Hi all. Well, I think the title says it all. If I could just call a javascript method after the div has been converted to a textarea, that would be enough! but i can't find any option that does this. could anybody give me some pointers on how to allow in-place editing with ckeditor or any

Re: sql error 1054 unknown column in 'on clause'

2010-05-12 Thread John Andersen
I'll rephrase my question, can you show me the SQL description of the store_types table, like this: [code] CREATE TABLE `store_types` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `name` VARCHAR(40) NOT NULL, PRIMARY KEY (`id`) ) [/code] I ask because I want to be sure

Re: when i am trying to insert a data in to database the following error shows please help me out

2010-05-12 Thread John Andersen
As the error message states, you have an error in the database, not in the CakePHP application. Go through the database and establish the missing part. Enjoy, John On May 12, 3:44 pm, Narendra Padala crazycake...@gmail.com wrote: Hi..!, I am new to cake php,usuing PostgreSql,When i am

i18n / l10n Problem with Cake 1.3

2010-05-12 Thread nils
Hi all, ok, I got: - Configure::write('Config.language', 'ger'); in bootstrap (tried core, too!) - C:\stuff\xampp\htdocs\caketest\app\locale\ger\LC_MESSAGES \default.po in place (pot created with cake i18n, renamed to .po) - ?php __('Title'); ? in my ctp ..and it still doesn't work! Drives me

Re: i18n / l10n Problem with Cake 1.3

2010-05-12 Thread John Andersen
Check that your directory names and file names are in the expected case (upper/lower)! Ensure that CakePHP have read access to the directories! Hope this helps you, John On May 12, 5:35 pm, nils nils.th...@gmail.com wrote: Hi all, ok, I got: - Configure::write('Config.language', 'ger');

Re: Multiple AJAX Forms on same page all submitting to first form.

2010-05-12 Thread Robert McWay
I took another look at the generated HTML, like you suggested Matt, and found something very strange. The multiple forms i have on this page are being generated by a loop. It appears that the first form generates the proper opening and closing form tags, along with the javascript for the AJAX. But

Re: CakePhp Shell Issue

2010-05-12 Thread aboxy
Figured it out. Here was the issue My shell script was under /myapp/vendor/shells which was wrong. It should have been under /myapp/app/vendor/shells. After I moved the file, it worked. Hope this helps someone. thanks On May 11, 6:27 pm, aboxy aboxfortheotherst...@gmail.com wrote: Hello, I am

Re: Multiple AJAX Forms on same page all submitting to first form.

2010-05-12 Thread John Andersen
As Nilz wrote, you have two keys with the name of id in your array! That can't work! So check you form create statement and correct it! Enjoy, John On May 12, 7:17 pm, Robert McWay mcway.web.developm...@gmail.com wrote: I took another look at the generated HTML, like you suggested Matt, and

Re: i18n / l10n Problem with Cake 1.3

2010-05-12 Thread Miles J
If you want German, its deu and not ger. I ran into this problem also. On May 12, 8:53 am, John Andersen j.andersen...@gmail.com wrote: Check that your directory names and file names are in the expected case (upper/lower)! Ensure that CakePHP have read access to the directories! Hope this

Re: Issue with find('list')

2010-05-12 Thread Robert McWay
First thing you might want to do is take the set function call out of the if(empty()) conditional you have. The reason is because you want this variable set every time, regardless of the state of $this-data, to keep the select options properly populated. The way you have it now, you will lose your

Display Blob from db

2010-05-12 Thread Ed Propsner
I've been toying with this one for a while now and I'm not really getting anywhere. I'm trying to display a photo stored in db as type blob. With conventional PHP I would normally store the photo with type binary and never had any issues ... Blob is not going so well. I figure the problem has

Gifts!

2010-05-12 Thread Mohamed Sathik
Dear friend, How are you recently? tell you a big surprise! Ktpshop company is electronic products trading company which has upper Asia ranked---(www.ktpshop.info) and it has cooperation with Nokia, SONY, HP, etc for many years,the product quality is very good. They have a good reputation , many

Re: Automatically select a subset of a model's fields

2010-05-12 Thread WoJoCo
Hi, In your associations you can name the fields that Cake retrieves in the model associations - something like: var $belongsTo = array( 'User' = array( 'className' = 'User', 'foreignKey' = 'user_id', 'fields' = array( 'User.id', 'User.email', 'etc', 'etc'), ) ); Is the basic structure that

Newbie Question about Upgrading

2010-05-12 Thread Ephs
Hello, About two years ago I had someone make a website for me, and he used CakePHP. Now, I'm slowly learning how cakephp works in order to make updates (I know PHP fairly well). I'm having some mysql problems server load problems, and believe that upgrading to the newest version might help solve

Containable Aggregate Fields Problem

2010-05-12 Thread emptywalls
I've got a Songs model, and each song HasMany Rating. I want to query for a list of songs, and get the average Rating. $this-Song-find('all', array( 'fields' = 'Song.title', 'contain' = array(Rating = array( 'fields' = array(AVG(Rating.value) as rating_average)

Dealing with forms!!!!!

2010-05-12 Thread sherzo
Hi all I have a registration form which is loaded inside a div and included in the page. I want to have some server-side validation on it and return the result inside the specific div any idea please? its really urgent! [Code] ?php echo $session-flash(); ? ?php echo

Getting .htpasswd protection to work

2010-05-12 Thread Jeff
Hi, I have the following in my /app/webroot/.htaccess file, as well as a matching .htpasswd file in the correct directory per multiple online how-to's, but my password protection is not working. Can someone tell me what I am doing wrong? /app/webroot/.htaccess AuthUserFile

Re: Display Blob from db

2010-05-12 Thread Ed Propsner
Besides the size there should be no diff between binary and blob, I was just thinking that perhaps Cake handled them differently. I played around with media view and it doesn't seem to be what I'm looking for. I have it narrowed down to the headers and I can get the photo to display but it has to

Authorizing problems with Auth compoment.

2010-05-12 Thread still
The problem confucing me is that when i using Auth, every action that i not allowed in the Auth-allow() will be access denied even after i loged in with a correct username and password. Am i missunderstanding the usage of Auth component? only the allowed actions can be accessed? /*

Re: Newbie Question about Upgrading

2010-05-12 Thread Jeremy Burns
This is perhaps not a direct answer to your question, but another suggestion. It is possible that some of the finds in your site's code are not built well. I'd encourage you debug out the results of the slow queries and see how much data is being returned. It could be that your query is

Re: Display Blob from db

2010-05-12 Thread Martin Radosta
An approach in the controller: function show_image($recordId) { $this-set('data', $this-Model-findById($recordId)); $this-layout = 'ajax' } the view show_image.ctp: Configure::write('debug', 0); header(Content-type: image/jpeg); //assume jpg image echo $data['Model']['blob_file'];

Re: Getting .htpasswd protection to work

2010-05-12 Thread Andy Dirnberger
You need to use /the/full/path/to/app/.htpasswd. On May 12, 11:17 pm, Jeff jhull...@gmail.com wrote: Hi, I have the following in my /app/webroot/.htaccess file, as well as a matching .htpasswd file in the correct directory per multiple online how-to's, but my password protection is not

Re: Display Blob from db

2010-05-12 Thread Ed Propsner
Thanks Martin, it worked just fine. It turns out that with all I have tried I was actually close. $this-layout = 'ajax' AND Router::url made all the difference in the world. I nearly fell out of my chair when the image displayed :) - Ed On Wed, May 12, 2010 at 11:54 PM, Martin Radosta