Email Component: I see html email as source code in Squirrel mail web client

2010-04-16 Thread Prof. No Time
When I send Email via the Email Component as Both i.e. html and text. It appears fine in my outlook and also yahoo and I think Gmail too but when I check it in Squirrel Mail webmail interface, it shows the text portion first, then the html source code underneath. This is pretty embarrassing as

Re: Validate CC field

2010-04-16 Thread John Andersen
Sorry, I thought you wanted to save the CC field :) You can instantiate the Validation class yourself and use the email validation method to validate each of your CC addresses. See http://api12.cakephp.org/class/validation#method-Validationemail for the Validation class source. Should someone

Auth Component: Allow action in a controller but disallow it in another

2010-04-16 Thread Prof. No Time
Hello, Please I have an action named referrals, I wish to allow this action in the guestscontroller without authentication but I have a similar action in the userscontroller and the staffscontroller. I DO NOT wish to change the action (vis-a-vis url format) name for LEGACY reasons. The Auth

Re: Using Session class and Ajax

2010-04-16 Thread Will Poillion
Please can anyone provide any advice at all? I'm searching through the core libs trying to figure out where the Config data is being written into the Session. When I do Session-error() I consistently get Config doesn't exist meaning I think it doesn't have the config variables telling it what

Re: News with Comments - how to sort by comments count?

2010-04-16 Thread mpeshev
This looks great, but unfortunately seems like not working here. I altered my Comment model: var $belongsTo = array( 'News' = array( 'className' = 'News', 'foreignKey' = 'news_id', 'conditions' = '',

refer one related models data in a view of second model?

2010-04-16 Thread mivogt-LU
Hi, I need a bit of help using $this or findfirst. I have a model 'requests' containig date,time, customer etc. requests $hasOne booking I have a model 'booking', $belongsTo requests I modded the add function of bookings to get some parameters i.e. request_id to pass it to my booking-form. Now

Re: XML Output

2010-04-16 Thread Jeremy Burns
Any takers please? Jeremy Burns jeremybu...@me.com On 15 Apr 2010, at 16:45, Jeremy Burns wrote: I have a controller function that calls a model function that generates a well formed array. I want to convert the array to XML and submit it to a web service. The array is in the same shape as

Re: refer one related models data in a view of second model?

2010-04-16 Thread mivogt-LU
I also tried adding var $uses = array('customer','request'); in the bookings controller. If I do so I get an error inside my find commands: if ($rid) { $customers = $this-Booking-Customer- find('list',array('conditions' = array('Customer.id' = $cid))); }

Re: refer one related models data in a view of second model?

2010-04-16 Thread Jeremy Burns
Have a read of this thread...might help. http://groups.google.com/group/cake-php/browse_thread/thread/e01fd12a9d986d4/9fe7a541c10fc919?lnk=gstq=Manipulating+Data+Based+on+Non+Related+Model+Data#9fe7a541c10fc919 Jeremy Burns jeremybu...@me.com (Skype) +44 208 123 3822 (jeremy_burns) (m) +44 7973

Re: refer one related models data in a view of second model?

2010-04-16 Thread mivogt-LU
HI Mr Burns (sorry could not resist, just like the simpson now and then..) ;) thanks I got it working. The lesson I learnd: 1) if any data of a related model is used/shown in a view it is accessable 2) there is no need to prepare this in the controller if it is only needed to be displays in a

Re: Internet Explorer error! (Want to show element in a table cell) :-(

2010-04-16 Thread sebb86
Another addition: When i only insert the image, without the $html-link, it works in internet explorer 8. [code works but without link] ?php echo $html-image(edit.png, array(alt = Editieren)); ? [\code] Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP

Re: Internet Explorer error! (Want to show element in a table cell) :-(

2010-04-16 Thread John Andersen
Do you have some specific styling for IE? Try also just to write a dummy link around your image, just to see if it makes a difference! [code] ?php echo 'a href=#'.$html-image(edit.png, array(alt = Editieren)).'/a'; ? [\code] Enjoy, John On Apr 16, 12:38 pm, sebb86 kahlc...@googlemail.com

Re: refer one related models data in a view of second model?

2010-04-16 Thread Jeremy Burns
Excellent, Smithers. Jeremy Burns jeremybu...@me.com On 16 Apr 2010, at 10:20, mivogt-LU wrote: HI Mr Burns (sorry could not resist, just like the simpson now and then..) ;) thanks I got it working. The lesson I learnd: 1) if any data of a related model is used/shown in a view it is

Re: Auth Component: Allow action in a controller but disallow it in another

2010-04-16 Thread John Andersen
Take a look at the message: http://groups.google.com/group/cake-php/browse_thread/thread/e53fafc5c33dbe6a/543251f6349d373b?#543251f6349d373b which is not about the same topic, but Crickets example and explanation is certainly related to your issue. Enjoy, John On Apr 16, 10:28 am, Prof. No

Using Button to submit the form

2010-04-16 Thread Ambika Kulkarni
Hi all, I have Back and Next as two buttons in my view file. Which are used for the navigation between the pages. Now when i click on Next button It should do the page validation also. I have put the code below. Please help me. In campaign.php model page var $validate = array(

Re: Internet Explorer error! (Want to show element in a table cell) :-(

2010-04-16 Thread sebb86
Addition: I'm really sorry but i forgot my self defined css... :( So this works for Firefox: [code] ?php echo $html-link('Edit', array(controller = 'dns_names', action = edit, $dns_name['Dnsname']['id']), array('class' = 'edit', title = Editieren), null, false); ? [/code] And when i remove:

FormHelper: disable a field for input / set viewonly?

2010-04-16 Thread mivogt-LU
I am passing some data from controller to my view i.e. a timestamp as process-id-number (better readable using php wordwrap function..) I want the number to be displayed in a form-field but also would like to set this field to be disabled for changing. $options does not look to have a disanle

Re: AppController being cached?

2010-04-16 Thread Lucca Mordente
The file is in the correct location, beside the app_model.php, which has no problem. Besides, there are some logic inside the AppController like components initialization and some shared logic that work. And if I download the file from FTP or open it through SSH, I can see the changes I made.

Sending view parameters to javascript function

2010-04-16 Thread Ambika Kulkarni
Hi All, I want to send the post data to a javascript function. I have put the code below . Please help name view.ctp If I am just calling the js function it works. . function validate(){ window.alert(It's working); } ?php echo $form-create('User',

Re: Internet Explorer error! (Want to show element in a table cell) :-(

2010-04-16 Thread cricket
On Apr 16, 6:13 am, sebb86 kahlc...@googlemail.com wrote: Addition: I'm really sorry but i forgot my self defined css... :( So this works for Firefox: [code] ?php echo $html-link('Edit', array(controller = 'dns_names', action = edit, $dns_name['Dnsname']['id']), array('class' = 'edit',

Re: CakePHP Auth Component cannot remember url before authentication

2010-04-16 Thread cricket
On Apr 16, 1:40 am, Prof. No Time libertylivingst...@gmail.com wrote: In the cook book, we are told that the auth component uses the session component to remember the url the user intended to visit and hence when authenticated, automatically takes the user there. However, this DOES NOT WORK

Re: Sending view parameters to javascript function

2010-04-16 Thread Ed Propsner
If it's your Javascript that's not working I would use: function validate() { var username=Form.Element.getValue('UserUsername'); window.alert(username); } - Ed On Fri, Apr 16, 2010 at 6:46 AM, Ambika Kulkarni ambikakulkarn...@gmail.com wrote: Hi All,

Re: FormHelper: disable a field for input / set viewonly?

2010-04-16 Thread cricket
On Apr 16, 6:18 am, mivogt-LU c...@mivogt.net wrote: I am passing some data from controller to my view i.e. a timestamp as process-id-number (better readable using php wordwrap function..) I want the number to be displayed in a form-field but also would like to set this field to be disabled

Re: Using Session class and Ajax

2010-04-16 Thread cricket
On Apr 16, 3:37 am, Will Poillion lorew...@gmail.com wrote: Please can anyone provide any advice at all?  I'm searching through the core libs trying to figure out where the Config data is being written into the Session. When I do Session-error() I consistently get Config doesn't exist meaning

Re: FormHelper: disable a field for input / set viewonly?

2010-04-16 Thread mivogt-LU
::solved::solved::solved ok thank you cricket, so I understand there is only the noncake way to do it. using the usual html form syntax or, as you suggested - using the echo instead of a form field. might be I need to look to choos the right css class to keep the look/ fontsize in that case.

Re: Internet Explorer error! (Want to show element in a table cell) :-(

2010-04-16 Thread sebb86
cricket Also thanks to you. It dont works in both browsers. Dont know why. Anyway... i decided that i dont use CSS for this. I got it working so far but i still have one problem. [this code works (without the CSS class, but its okay] ?php echo $html-image(edit.png, array(alt = Editieren, 'url' =

Re: AppController being cached?

2010-04-16 Thread cricket
On Apr 16, 6:44 am, Lucca Mordente luccamorde...@gmail.com wrote: The file is in the correct location, beside the app_model.php, which has no problem. Besides, there are some logic inside the AppController like components initialization and some shared logic that work. And if I download the

avoiding add function with no parameters?

2010-04-16 Thread mivogt-LU
HI there, I did a mod to my add function in a model/controller. My model-1 view now has a button calling the add function of model-2 sending some parameters to be shown in the add view. Now I want the model-2 to disable any add function inside the conroller if no data was passed from model-1

Re: Internet Explorer error! (Want to show element in a table cell) :-(

2010-04-16 Thread cricket
On Apr 16, 7:20 am, sebb86 kahlc...@googlemail.com wrote: cricket Also thanks to you. It dont works in both browsers. Dont know why. Anyway... i decided that i dont use CSS for this. I got it working so far but i still have one problem. [this code works (without the CSS class, but its okay]

Re: view as downloadable text/plain

2010-04-16 Thread Melanie Sommer
Because the View class uses output buffering. Have a look at MediaView instead: Thank you; but I am afraid I did not figure out how this helps me MediaView Summary: Methods to display or download any type of file I do not want to display or download a file as there exists no file. The content

Re: Using Button to submit the form

2010-04-16 Thread cricket
On Apr 16, 5:57 am, Ambika Kulkarni ambikakulkarn...@gmail.com wrote: Hi all, I have Back and Next as two buttons in my view file. Which are used for the navigation between the pages. Now when i click on Next button It should do the page validation also. I have put the code below. Please

Re: avoiding add function with no parameters?

2010-04-16 Thread cricket
On Apr 16, 7:32 am, mivogt-LU c...@mivogt.net wrote: HI there, I did a mod to my add function in a model/controller. My model-1 view now has a button calling the add function of model-2 sending some parameters to be shown in the add view. Now I want the model-2 to disable any add function

Re: view as downloadable text/plain

2010-04-16 Thread cricket
On Apr 16, 7:37 am, Melanie Sommer melanie-som...@mailinator.com wrote: Because the View class uses output buffering. Have a look at MediaView instead: Thank you; but I am afraid I did not figure out how this helps me MediaView Summary: Methods to display or download any type of file I

Strange output of Session-flash() method

2010-04-16 Thread kjetiltuft
Hi, I am new to this fora. I have encounted a possible bug in the CakePHP framework or possible made a odd mistake myself. Any way, every time I send messages to the view through the Session-setFlash() method the Session-flash() method output a 1 after the div elements. Like the example below:

Re: Strange output of Session-flash() method

2010-04-16 Thread Jeremy Burns
Which version are you on? If it's 1.2.x, try: $session-flash(); // no echo If it's 1.3, you use echo. Jeremy Burns jeremybu...@me.com On 16 Apr 2010, at 00:36, kjetiltuft wrote: Hi, I am new to this fora. I have encounted a possible bug in the CakePHP framework or possible made a odd

Re: Internet Explorer error! (Want to show element in a table cell) :-(

2010-04-16 Thread sebb86
The solution was an empty array [dynamic code] ?php echo $html-link($html-image(delete.png, array(alt = Löschen)), array(controller = $contr, action = delete, $row[$class]['id']), array(), sprintf(__($deleteQuestion, true), $row[$class]['id']), null, false); ? [/code] Really thanks a lot to

Re: Sending view parameters to javascript function

2010-04-16 Thread Ambika Kulkarni
alert(I am in hello function+Form.Element.getValue('Campaign.Name')); Its giving error. element is null On Apr 16, 3:57 pm, Ed Propsner crotchf...@gmail.com wrote: If it's your Javascript that's not working I would use: function validate()        {             var

Re: Sending view parameters to javascript function

2010-04-16 Thread Ambika Kulkarni
alert(I am in hello function+Form.Element.getValue('Campaign.Name')); I am getting error. element null On Apr 16, 3:57 pm, Ed Propsner crotchf...@gmail.com wrote: If it's your Javascript that's not working I would use: function validate()        {             var

Re: AppController being cached?

2010-04-16 Thread Lucca Mordente
Every piece of code is being executed. But whatever I add to it, don't have effects. I tried die, debug and, as I said, neither invalidating the code nor deleting the file affects the app. Lucca Mordente On Fri, Apr 16, 2010 at 8:21 AM, cricket zijn.digi...@gmail.com wrote: On Apr 16, 6:44

Re: AppController being cached?

2010-04-16 Thread Miles J
Are you uploading it to the right directory? Correct naming, etc. On Apr 15, 5:47 pm, Lucca Mordente luccamorde...@gmail.com wrote: That's the point. No change is being reflected. And the website continues to work even when the app_controller.php file is deleted, as if it was there. Lucca

Get params unicode error

2010-04-16 Thread Cuong Vo Viet
My function function view($slug=null){ echo $slug; } enter url: - products/view/университетски or: - products/view/%d1%83%d0%bd %d0%b8%d0%b2%d0%b5%d1%80%d1%81%d0%b8%d1%82%d0%b5%d1%82%d1%81%d0%ba %d0%b8 pr(urlencode($slug)); - %D1 if true, it's: %d1%83%d0%bd

how to include one .ctp file

2010-04-16 Thread MANOJ DHAMAL
I want know how to include one .ctp file in another .ctp file 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

javascript validation

2010-04-16 Thread chandrasekhar reddy
hi frns can any one help me how to validate javascript from clint side and how to pass the variables through javascript. 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

Re: AppController being cached?

2010-04-16 Thread Jon Bennett
Every piece of code is being executed. But whatever I add to it, don't have effects. I tried die, debug and, as I said, neither invalidating the code nor deleting the file affects the app. Lucca Mordentre Are you _certain_ you are editing the right app files? It's sounds implausible to me

Re: Sending view parameters to javascript function

2010-04-16 Thread Narendra Padala
Hi ! I am using the same code, but i am not getting the out. please help me out On Apr 16, 3:57 pm, Ed Propsner crotchf...@gmail.com wrote: If it's your Javascript that's not working I would use: function validate()        {             var username=Form.Element.getValue('UserUsername');    

Re: Sending view parameters to javascript function

2010-04-16 Thread Narendra Padala
hi all var username=Form.Element.getValue('UserUsername'); i have a doubt UserUsername - field name or form name or model name and is there any specilalcharacte between User and Username. i am using this both form name and inputfiled name Form name : echo $form-create('User',

Re: how to include one .ctp file

2010-04-16 Thread Jeremy Burns
Save the inner one as an element, then: echo $this-element(**filename**); where **filename** is the name of the element file without the ctp extension. You can pass variables in: echo $this-element( **filename**, array('varibaleName' = $variable) ); Elements are stored in

Re: AppController being cached?

2010-04-16 Thread Lucca Mordente
Yes. When I delete the app_controller.php nothing happens. But when delete or invalidate the app_model.php file, in the same directory, the app stops to work, as expected. Lucca Mordente On Thu, Apr 15, 2010 at 11:30 PM, Miles J mileswjohn...@gmail.com wrote: Are you uploading it to the right

Re: Sending view parameters to javascript function

2010-04-16 Thread Hani Sana
Hey All You may making a mistake plz use it before it include ?php e($javascript-link('prototype-1.6.1', false)); ? ?php echo $form-input('username'); ? which out here input name=data[formname][username] type=text onchange=autoDisplay() value= id=FormnameUsername / function validate() {

Re: AppController being cached?

2010-04-16 Thread Jeremy Burns
Sounds drastic, but is it worth rebooting the box? Not sure if that would help of course. Jeremy Burns jeremybu...@me.com On 16 Apr 2010, at 14:27, Lucca Mordente wrote: Yes. When I delete the app_controller.php nothing happens. But when delete or invalidate the app_model.php file, in the

Re: AppController being cached?

2010-04-16 Thread AD7six
On Apr 16, 3:27 pm, Lucca Mordente luccamorde...@gmail.com wrote: Yes. When I delete the app_controller.php nothing happens. But when delete or invalidate the app_model.php file, in the same directory, the app stops to work, as expected. why don't you put debug(get_included_files());

Re: AppController being cached?

2010-04-16 Thread Lucca Mordente
Holy God... that's the answare I was needing... thanks AD! can't believe and can't convey why there was an app_controller.php inside the app/controllers folder. Probably I made any mess with my FTP client (File Zilla). Do you guys have any FTP client you like, or another deploy tool? Thank you

Re: view as downloadable text/plain

2010-04-16 Thread Melanie Sommer
I just wrote a quick PlaintextHelper (3 minutes!) based on the CsvHelper I'm already using. Check it out here: http://pastebin.com/u46cWX7T Well it does not work, header is still html. I also do not understand why it should work. The only thing you are doing is taking

Re: AppController being cached?

2010-04-16 Thread Lucca Mordente
Holy God... that's the answer I was needing... thanks AD! can't believe and can't convey why there was an app_controller.php inside the app/controllers folder. Probably I made any mess with my FTP client (File Zilla). Do you guys have any FTP client you like, or another deploy tool? Thank you

Re: AppController being cached?

2010-04-16 Thread Lucca Mordente
Holy God... that's the answer I was needing... thanks AD! can't believe and can't convey why there was an app_controller.php inside the app/controllers folder. Probably I made any mess with my FTP client (File Zilla). Do you guys have any FTP client you like, or another deploy tool? Thank you

Re: view as downloadable text/plain

2010-04-16 Thread Melanie Sommer
I now simply wrote header(Content-Type: text/plain); header('Content-Disposition: attachment; filename=text.txt'); into my controller - that seems rather dirty, but it works. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You

Tip: MongoDB-Datasource undocumented feature

2010-04-16 Thread Martin Westin
I did not know the datasource could do this and almost didn't try it as a result. Don't make the same mistake. Yasushi Ichikaway has developed a very nice datasource for MongoDB. http://github.com/ichikaway/mongoDB-Datasource/ Mars Story wrote a very nice intro post about it.

HABTM Relations in Plugin

2010-04-16 Thread birthdaycake
Imagine a plugin called Cms, with several models, two of them called Menu and Link. The Links have a HABTM relationship to the Menus. In order to set that up in the model I used the following relationship in the Link model: {{{ var $hasAndBelongsToMany = array( 'Cms.Menu' =

the plugins dont work at all

2010-04-16 Thread islam4hak
hi why i cant accses any plugin i create ? i make the manual tutorial to create the pizzOrder plugin but i cant access to it /pluginname/controllername/action so i bake another plugin but i cant access it to app/plugin/poll/ i try http://localhost/appname/poll/ it dont work Error:

Bookmarkable AJAX URLs

2010-04-16 Thread Dmitry Shevchenko
Hi! I use ajax link (by ajax helper) in my current app almost everywhere. I now, when user navigate throw the site, URLs in the browser address line didn't changed. That's why user can't create bookmarks. Does anyone knew, how to push browser change address line, or some other workaround. p.s. I

Re: Bookmarkable AJAX URLs

2010-04-16 Thread Bert Van den Brande
Afaik using # is the way to go. Changing any other aspect of the url besides what comes after the # will result in a load of the changed url by the browser. You don't need Cake to change the url's, just some javascript code that you execute every time the user navigates using your ajax links.

Re: Advice for personalized email (i.e. newsletter, mass email)

2010-04-16 Thread LunarDraco
tcornett, Swift Mailer handles persistent connections. It also handles throttling and secure connections to smtp. I've yet to find a component/plugin/behavior that wraps swift mailer or any other mailer in a way that takes advantage of persistent connections and throttling features. However the

Re: Multi-level Models in CakePHP

2010-04-16 Thread andy
Walther, Thanks for the comment... but that line of code also only produces a result of ATable and BTable. Still looking for a way... Sorry about the naming... I only figured that giving simplified model names would have made it easier to see that I'm just trying to make a multi-level model

Re: Email Component: I see html email as source code in Squirrel mail web client

2010-04-16 Thread John Andersen
Let your users define whether they wish to receive emails from you in html or plain text. Then it is up to them to change it to the right choice, should their email solution not be able to show the chosen format. If you don't want to do that, then maybe just send a plain text email, that also

Model and Controller aliases

2010-04-16 Thread Scott
Some of my model and controller classes have very long, and therefore descriptive, names. The problem is that it's a real pain to use these when coding, but I want the names to be as descriptive as possible when reviewing the files. It would be really nice if we could define an alias that could

Re: HABTM Relations in Plugin

2010-04-16 Thread John Andersen
As far as I understand from the CakePHP book on plugins, you are using the alternative syntax for naming the association, thus you should not use Cms.Menu but Menu as your association key. See http://book.cakephp.org/view/117/Plugin-Models Are your model for the menu named Menu or CmsMenu? The

Re: Get params unicode error

2010-04-16 Thread Dinh
Hi, You should post this question into a general PHP forum or mailing list. PHP's urlencode and urldecode have no problem with cp1251 encoding and decoding. Are you sure that your page encoding is correct? Regards, Dinh On Fri, Apr 16, 2010 at 11:21 AM, Cuong Vo Viet

Re: getting a 3rd-hand database value without recursive = 2

2010-04-16 Thread Joshua Taylor
Thank you. I have applied the Containable behavior to the specific query. Jury is still out on how I'll choose to implement it throughout the system. On Apr 15, 12:50 am, Jeremy Burns jeremybu...@me.com wrote: Two options... Use $this-Service-find(); instead Or... I would use the

Re: the plugins dont work at all

2010-04-16 Thread Martin Westin
Hi, Plugins do work. I have whole apps build with a limited core and numerous plugins (22 of them in one case). I can think of a few details to double-check. I don't think you should have plugins named in camelCase. Try naming the folder and the urls you try pizza_order instead. (The plugin in

avoid delte of a model if related models exist

2010-04-16 Thread mivogt-LU
hi there, cake stats to be a nice toy tool so far :) ... I am on the next step of developing my littl app and would like to get some hints how to do best this: I have 3 models linked with each other mod1, mod2, mod3 mod 1 hasOne mod2 mod2 hasMany mod3 So deleting some mod1 data with having a

Adding multiple form fields with autocomplete

2010-04-16 Thread Johnny Ferguson
Hi, I've noticed that CakePHP has an autoComplete helper, but I'm having trouble figuring out how to make it work for my application: http://book.cakephp.org/view/632/autoComplete I have 3 controllers: PracticeItems PracticeInstances PracticeSessions A PracticeSession will have 1 or more

Re: the plugins dont work at all

2010-04-16 Thread Miles J
You are doing it wrong, the URLs would be like so: domain.com/controller/action/ domain.com/plugin/controller/action/ You cant go to domain.com/plugin/ and have it work without setting up routes. On Apr 16, 11:18 am, Martin Westin martin.westin...@gmail.com wrote: Hi, Plugins do work. I have

Re: the plugins dont work at all

2010-04-16 Thread AD7six
On Apr 16, 9:39 pm, Miles J mileswjohn...@gmail.com wrote: You are doing it wrong, the URLs would be like so: domain.com/controller/action/ domain.com/plugin/controller/action/ You cant go to domain.com/plugin/ and have it work without setting up routes. Since when. I'd suggest checking

Re: Model and Controller aliases

2010-04-16 Thread AD7six
On Apr 16, 7:59 pm, Scott scott.bent...@gmail.com wrote: Some of my model and controller classes have very long, and therefore descriptive, names.  The problem is that it's a real pain to use these when coding, but I want the names to be as descriptive as possible when reviewing the files.

Re: Tip: MongoDB-Datasource undocumented feature

2010-04-16 Thread Celso
Amazing !!! Cake now supports noSQL !!! 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: Blank page when CakePHP is uploaded to the server

2010-04-16 Thread WhyNotSmile
I'm back to this again... have changed web hosts, and got everything uploaded. I'm no longer getting the blank page, but I'm getting errors. It looks like cake isn't picking up the css or javascript - if you go to www.softwaresolutionsni.co.uk you'll see what I mean. There are random bits of

Re: HABTM Relations in Plugin

2010-04-16 Thread birthdaycake
Thank you for your reply, John! I have tried what you and the book suggest: * I renamed all the models, controllers and folder names with the Cms* prefix * I changed the relations accordingly This is what happens: When I change the HABTM relation to: array('CmsMenu' = array('className' =

Re: Blank page when CakePHP is uploaded to the server

2010-04-16 Thread Andras Kende
try to change ? to ?php Andras On Apr 16, 2010, at 4:10 PM, WhyNotSmile wrote: I'm back to this again... have changed web hosts, and got everything uploaded. I'm no longer getting the blank page, but I'm getting errors. It looks like cake isn't picking up the css or javascript - if you

Re: HABTM Relations in Plugin

2010-04-16 Thread birthdaycake
YES!! Fixed it! It seems that renaming everything and going over all the code again worked. I set up the join table and used a 'with' = .. in the model's habtm relations. Thank you for reviewing my question, and thank you all for CAKE! :) On Apr 16, 10:27 pm, birthdaycake wrde...@gmail.com

Re: Sending view parameters to javascript function

2010-04-16 Thread Ed Propsner
Sorry about that, I should have specified I was using Prototype ... force of habit. $(UserUsername).getValue();and$F(UserUsername); will also both work with Prototype. - Ed On Fri, Apr 16, 2010 at 9:32 AM, Hani Sana sana8...@gmail.com wrote: Hey All You may making a mistake plz use

Re: Multi-level Models in CakePHP

2010-04-16 Thread andy
Using recursive seems to be a way to go about it: $this-set('a', $this-ATable-find('all', array('recursive' = '2'))); I found this via the following post: http://stackoverflow.com/questions/137314/three-table-related-model-in-cakephp Hope that helps someone. Andy Check out the new CakePHP

Re: Model and Controller aliases

2010-04-16 Thread Scott
I don't see anything about aliases in the documentation. Routes is not the same as what I'm looking for. A route would make it easy to redirect the user, but I'm talking about the controller and model names used within the code itself. For example, I would like to have the model

Re: Model and Controller aliases

2010-04-16 Thread AD7six
On Apr 17, 12:05 am, Scott scott.bent...@gmail.com wrote: I don't see anything about aliases in the documentation.  Routes is not the same as what I'm looking for.  A route would make it easy to redirect the user, but I'm talking about the controller and model names used within the code

Re: the plugins dont work at all

2010-04-16 Thread jacmoe
If you read the book, it is indeed root_url/plugin_name/plugin_action, so check your sources before you're telling people that they are telling the wrong thing. :) http://book.cakephp.org/view/1113/Plugin-Controllers On Apr 16, 9:47 pm, AD7six andydawso...@gmail.com wrote: On Apr 16, 9:39 pm,

Re: Adding multiple form fields with autocomplete

2010-04-16 Thread Johnny Ferguson
So I've looked further into this, and I tried the obvious solution It seems that the items in $this-data are assigned a number from the name field of the input element. name=data[PracticeInstance][0][tempostart] means the form will feed the data back as $this-

Re: Adding multiple form fields with autocomplete

2010-04-16 Thread Johnny Ferguson
So I've looked further into this, and I tried the obvious solution It seems that the items in $this-data are assigned a number from the name field of the input element. name=data[PracticeInstance][0][tempostart] means the form will feed the data back as $this-

Re: Adding multiple form fields with autocomplete

2010-04-16 Thread Johnny Ferguson
So I've looked further into this, and I tried the obvious solution It seems that the items in $this-data are assigned a number from the name field of the input element. name=data[PracticeInstance][0][tempostart] means the form will feed the data back as $this-

Re: Adding multiple form fields with autocomplete

2010-04-16 Thread Johnny Ferguson
practice_sessions_controller.php: http://pastebin.com/XHw37WS0 practice_sessions/add.ctp: http://pastebin.com/Z5fGgfxV practice_items_controller.php: (autoCompleteName) http://pastebin.com/SLN72D4T On 16 Apr, 19:38, Johnny Ferguson hyperfle...@gmail.com wrote: So I've looked further into

Re: Adding multiple form fields with autocomplete

2010-04-16 Thread Johnny Ferguson
digging through the DOM further, I notice that the autocomplete form element creates a div after itself with id=PracticeItemName_autoComplete. It has the same id for each autocomplete form (which would explain why only one works), so I guess my question comes down to: How can I specify the name

Re: Adding multiple form fields with autocomplete

2010-04-16 Thread Johnny Ferguson
I can edit the name of the helper div with the 'div_id' option, but it doesn't seem to let both fields use the autocomplete function. At this point, I'm not sure how to diagnose the issue any further. On 16 Apr, 19:48, Johnny Ferguson hyperfle...@gmail.com wrote: digging through the DOM further,

Re: the plugins dont work at all

2010-04-16 Thread Miles J
Neither of you are correct, or are referring to the wrong thing. @jacmoe - Its /root_url/plugin_name/plugin_controller/plugin_action/ not /root_url/plugin_name/plugin_action/. And I quote the book: Once a plugin has been installed in /app/ plugins, you can access it at the URL

Re: the plugins dont work at all

2010-04-16 Thread Graham Weldon
I think you'll find in CakePHP 1.2, a controller name that matches the plugin name will route fine as: /root/:plugin/:action as long as :controller is the same string as :plugin Cheers, Graham Weldon e. gra...@grahamweldon.com p. +61 407 017 293 w. http://grahamweldon.com On 17/04/2010, at

Re: the plugins dont work at all

2010-04-16 Thread islam4hak
thanks every one it's just work great for me at this way appName/pluginName/Controller/action i was get it wrong on the book thanks. 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

Error Massage in the tutorial

2010-04-16 Thread Cake-it
In the Tutorial of the Cookbook (the blog tutorial) I get following error message after the step 10.1.3 Cake Database Configuration: ## Warning (2): strtotime() [http://php.net/function.strtotime]: It is not safe to rely on the system's timezone settings. You are *required* to use the

composite keys to identify a record

2010-04-16 Thread Renan Augusto
Dear, Someone must have encountered a situation where a table had with composite key. what did you do? Since CakePHP recognizes only one field to primaryKey! In my opinion I see two possibilities: 1 - not create tables with composite keys. When you need to use composite keys to identify a

Logout users

2010-04-16 Thread bondo
Is it possible to get a list of users that are currently logged into the system? I'd like to be able to log them out if I'm performing maintenance on the system or even just the ability to log a single user out for any reason. Check out the new CakePHP Questions site http://cakeqs.org and help

Re: Model and Controller aliases

2010-04-16 Thread Hendry
I would rather put the descriptions in the comments, especially if you only use it when reviewing the files. # Hendry On Sat, Apr 17, 2010 at 1:59 AM, Scott scott.bent...@gmail.com wrote: Some of my model and controller classes have very long, and therefore descriptive, names.  The problem is

Re: composite keys to identify a record

2010-04-16 Thread Jeremy Burns
I absolutely endorse a single, incremental, non-intelligent primary key, enriched with multi-field unique indexes and the adoption of convention. Why make life any more difficult than it is already? Jeremy Burns jeremybu...@me.com On 16 Apr 2010, at 21:29, Renan Augusto wrote: Dear,