Re: a couple of small things I can't figure out

2008-04-22 Thread damo
thanks b logica, it still doesn't seem to work. Let me just clarify what I am trying to do. From the view of the individual student, which uses the $student variable, I try to add a file. So the $student is passed to the function so that we know which student the file relates to. So in my

belongsTo relationship killing my app

2008-04-22 Thread Langdon Stevenson
I have a very strange problem appeared with a site that I have been working on for some time. This site is built with Cake version 1.1.19.6305 running on Apache/MySQL/Linux with PHP 5. The site has about 30 models, most have multiple hasMany relationships. Each of those relationships have a

Changing the controller in the $ajax-form helper.

2008-04-22 Thread dizz
Hey, I've been trying to figure this out for a few hours now. I am either missing something or you cannot change the controller in the helper and that it will always default to the controller of the parent page. For instance I am trying to add comments on a user profile, the parent profile is

Re: How to send email in cake php

2008-04-22 Thread k10
Try http://sourceforge.net/phpmailer .You could use this with the vendor function in cake. Hope it helps. -Ketan. http://www.innovatechnologies.in http://www.propertyjungle.in On Apr 22, 1:43 am, Rocky [EMAIL PROTECTED] wrote: Plz let me know how to send email through cake php Thanks Rocky

Force Error Header

2008-04-22 Thread Mr-Yellow
Need to return error headers for PayPal IPN. I've tried this in a view. However it still returns a 200ok header. ?php $this-error(500, 'Billing Error', ''); ? While if I use: header(HTTP/1.0 500 Script error); and/or: trigger_error(IPN verification failed: . $err,E_USER_ERROR); It seems

Re: Uniform Server Cakephp Forbidden error

2008-04-22 Thread rtanz
any help on this? thanks On Apr 21, 4:02 pm, rtanz [EMAIL PROTECTED] wrote: Hi Im trying to setup cakephp on my uniform server, however whenever I try to access my cake folder i get the following error: Forbidden You don't have permission to access /cake on this server. Apache/2.0.59

Re: Cause for l10n/i18n not working?

2008-04-22 Thread [EMAIL PROTECTED]
App::import('Core', 'i18n'); $i18n = I18n::getInstance(); $i18n-l10n-get($lang); I had not used this method myself, guess I should have mentioned that. But checking it now it does the same for me as resetting Configure in my beforeFilter... it works. However changing it later in the

1.2 Beta Manual

2008-04-22 Thread sike
Hi, I'm starting now to learn how to work with Cake by the Online Manual, but since i'm on a foreign country I only have internet connection for little time. I've searche for the manual offline do downlod but I only found the 1.1 version... There isn't the 1.2 Beta version like in the online

Re: How to send email in cake php

2008-04-22 Thread Rocky
Would you plz tell me the coding of controlle,views etc. I had already include phpmailer Thanks On Apr 22, 11:40 am, k10 [EMAIL PROTECTED] wrote: Tryhttp://sourceforge.net/phpmailer.You could use this with the vendor function incake. Hope it helps.

Re: Cause for l10n/i18n not working?

2008-04-22 Thread David Christopher Zentgraf
On 22 Apr 2008, at 16:28, [EMAIL PROTECTED] wrote: A few things that may cause a change in beforeFilter not to work is that you have to set it to eng, fra or swe... not en_us, se_sv or something similar (just checking). You should try this with all caching off for a start (see above). Also

Re: belongsTo relationship killing my app

2008-04-22 Thread Grant Cox
You're not using the Zend Optimizer are you? Sounds kind of like my issue ( https://trac.cakephp.org/ticket/2059 ), removing the Zend Optimizer PHP extension fixed it. On Apr 22, 4:18 pm, Langdon Stevenson [EMAIL PROTECTED] wrote: I have a very strange problem appeared with a site that I have

Re: Four sites using same database, but only their own records

2008-04-22 Thread ModByChris
Or you could use a beforeFind() to add the condition. I used that on a project that dealt with multiple finanical years. I changed the beforeFind() to alter the conditions to include the restriction of a specific year. in your case something like this in AppModel (having defined ARTIST_ID in

Re: Four sites using same database, but only their own records

2008-04-22 Thread Grant Cox
http://bin.cakephp.org/view/1178242700 This is the behaviour I use for this purpose. Basically it looks at every query, and if you haven't already set any conditions that look at the owner id (or artist_id in your case), then it automatically appends a condition to only retrieve those owned by

Re: Uniform Server Cakephp Forbidden error

2008-04-22 Thread strangy
In usr/local/apache2/conf/httpd.conf find Directory /www/, Inside it find Options Indexes Includes. On the end of that line add FollowSymLinks. rtanz wrote: any help on this? thanks On Apr 21, 4:02 pm, rtanz [EMAIL PROTECTED] wrote: Hi Im trying to setup cakephp on my uniform server,

Re: belongsTo relationship killing my app

2008-04-22 Thread Langdon Stevenson
Hi Grant Sadly, no Zend Optimizer. Just a vanilla PHP setup. Thanks for the suggestion though. Regards, Langdon Grant Cox wrote: You're not using the Zend Optimizer are you? Sounds kind of like my issue ( https://trac.cakephp.org/ticket/2059 ), removing the Zend Optimizer PHP extension

Re: difference between .thtml and .php file

2008-04-22 Thread Jignesh Thummar
Thanks Joel. This information is very useful to me :) - Jignesh On Mon, Apr 21, 2008 at 6:13 PM, Joel Perras [EMAIL PROTECTED] wrote: All the significant performance bottlenecks I've ever run into were I/ O related; either from the database, or from some horrendously huge- but-necessary

cake and JS question

2008-04-22 Thread .
in cake 1,2 How do you add a javascript function in just one of my views? I don't want to put it in the layout because i don't need the JS in all of the pages. There are 2 cases: 1. I want to add echo $javascript-link(array(js_file)); to one of my view ctp file 2. I want to add a body onload=JS

Re: belongsTo relationship killing my app

2008-04-22 Thread Flipflops
Hi Langdon My first though is that you need to look at the recursion for your model and unbind unnecessary model relationships - by default Cake will just pull in masses of related records. You can cut it down by first unbinding anything you don't strictly need and then further only select the

Re: cake and JS question

2008-04-22 Thread grigri
1. Make sure in your layout, in the head you have this: ?php echo $scripts_for_layout; ? Then, in whatever view you need to add the script, just do: ?php $javascript-link('js_file', false); ? (the `false` parameter means it isn't processed directly [hence no need for `echo()`] but added

One serialized field not reaching the database?

2008-04-22 Thread [EMAIL PROTECTED]
Hi, I have a bit of a strange one. It has been bugging me for hours now and I am at the end of my rope. I have a model that is used to log soap calls. Fields consist of an id, a few strings and two serialized arrays stored in text fields. One of the serialized fields reach the database as it

Re: belongsTo relationship killing my app

2008-04-22 Thread Langdon Stevenson
Hi John Thanks for the input. I am using the expects() function for unbinding and have tried unbinding all related models. Have also tried setting recursion to 0 for all models, but no go. I have a feeling that you are on the right track though, as I did (once) get a php error saying that

Re: How to send email in cake php

2008-04-22 Thread dr. Hannibal Lecter
Are you using the 1.2 branch? http://api.cakephp.org/1.2/class_email_component.html http://book.cakephp.org/view/176/email On Apr 22, 9:49 am, Rocky [EMAIL PROTECTED] wrote: Would you plz tell me the coding of controlle,views etc. I had already include phpmailer Thanks On Apr 22, 11:40

A custom test reporter

2008-04-22 Thread Marcelius
Will there be an option in the future or CakePHP to somehow attach an additional custom test reporter to the testmanager? Searching through the code I didn't find anything usefull so I ended up hacking the test_manager to add my reporter in the CakeTestsGetReporter method. :)

Re: 1.2 Beta Manual

2008-04-22 Thread [EMAIL PROTECTED]
The complete 1.2 docs in one page is available here: http://book.cakephp.org/complete/3/the-manual I have saved this as a pdf when I have been offline for a while. You could also save it as a Web Archive or whatever your browser calls it. I prefer pdf since I have pretty good

Re: problem with related models and recursion

2008-04-22 Thread senser
I don't think problem is with models, because if I comment the variable $hasMany=UnitI18n in Unit model (i.e. Unit and UnitI18n are NOT related) and Cake doesn't run queries on unit_18ns table but only on unts. Adding the variable $hasMany in Unit model causes Cake to run query on unit_i18ns

Ajax request loads my default layout !

2008-04-22 Thread Neveldo
Hi all, I've an issue with Ajax requests. I'm trying to add Ajax pagination for some data by following this tutorial : http://bakery.cakephp.org/articles/view/advanced-pagination-1-2. The pagination works fine but cake loads my entire default layout everytime I request a new page ! To resolve

Re: Cause for l10n/i18n not working?

2008-04-22 Thread [EMAIL PROTECTED]
I'm setting it to jpn, the default was eng. What's the correct one to use anyway? I've seen different codes used   throughout the i18n/l10n modules. Sometimes it seems to use 'ja',   sometimes 'jpn'. It's pretty confusing/inconsistent. I know, I think that it is the docs that are a bit fuzzy

Re: Ajax request loads my default layout !

2008-04-22 Thread Axel Ariel Arroyo Braconi
Try adding the follow code in your controller var $components = array('RequestHandler'); function beforeFilter(){ if($this-RequestHandler-isAjax()){ Configure::write('debug', 0);// and forget debug messages $this-layout = 'ajax'; //or try with $this-layout = ''; } } with this code you

Re: Ajax request loads my default layout !

2008-04-22 Thread Neveldo
Thank for your response. However, the default layout is always loaded despite your beforeFilter :( $this-render('admin_index', 'ajax'); works fine to set the ajax layout but I don't understand why $this-layout don't works ! --~--~-~--~~~---~--~~ You received

HABTM and conditions ?

2008-04-22 Thread Neveldo
Hi all, I've a table which contain some Posts, a table which contain some Tags, and a HABTM relation betwen them ! My willing : find the best way to select all posts that are related to a specific tag. Right now, I select the specific tag in the tag controller, and I get also the related posts

form helper MAX_FILE_SIZE

2008-04-22 Thread leo
Anybody out there know haow to get the form helper to write the hidden field for MAX_FILE_SIZE? Maybe I have to do it manually? Leo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this

Re: How to send email in cake php

2008-04-22 Thread dr. Hannibal Lecter
Please reply to the whole group, for future reference. You wrote: Well, I am using cake php version 1.1.19.6305 Did you read these articles on the bakery? http://bakery.cakephp.org/tags/view/phpmailer On Apr 22, 11:55 am, dr. Hannibal Lecter [EMAIL PROTECTED] wrote: Are you using the 1.2

Re: Changing the controller in the $ajax-form helper.

2008-04-22 Thread Axel Ariel Arroyo Braconi
try with this ?php echo $ajax-form('Name_of_controller', array('action' = 'name_of_action')); ? On Tue, Apr 22, 2008 at 3:26 AM, dizz [EMAIL PROTECTED] wrote: Hey, I've been trying to figure this out for a few hours now. I am either missing something or you cannot change the controller in

Re: One serialized field not reaching the database?

2008-04-22 Thread [EMAIL PROTECTED]
A lunch break and some much needed italian coffee and I was ready for some really boring debugging... Short answer is that utf8 characters are tricky inside serialized strings. The string was utf8_decoded for SOAP but that caused the problems when trying to save that string to the log-table.

Re: Introduction

2008-04-22 Thread inma
Good job Federico! Gracias por compartirlo. Un saludo! On 22 abr, 04:32, Federico Rinaldi [EMAIL PROTECTED] wrote: http://www.ad7six.com/MiBlog/Blogs/view/GenericFileUploadBehavior Regards, eyesonly. On Mon, Apr 21, 2008 at 10:15 AM, Krommenaas [EMAIL PROTECTED] wrote: Hi, Where

Validation Problem

2008-04-22 Thread plinto
Hello, I am making a table that is a form where every item added has a checkbox and the form has 2 submit buttons, 1 is to edit e 1 to delete. _ __|__ | Italy X | Us X | Canada __ | Edit | Delete | The

Posting code

2008-04-22 Thread Sliv
Just wanted to remind/inform everyone that you can post code here: http://bin.cakephp.org/ and reference the generated link in your posts. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to

Re: How to send email in cake php

2008-04-22 Thread k10
I would recommend you to check out the cake bakery and the manual first. bakery == bakery.cakephp.org. Anyhow I searched on the bakery and found this http://bakery.cakephp.org/articles/view/sending-email-with-phpmailer Hope it helps. -Ketan. http://www.innovatechnologies.in

Re: How to send email in cake php

2008-04-22 Thread Szilárd Orbán
Do you need simple or HTML email? Do you use local email sending server or a remote one? Do you intend sending to specific email addresses (mostly internal) or to any host (including yahoo, hotmail that could cause headaches by emails going to junk) Szilard On Tue, Apr 22, 2008 at 10:49 AM,

Re: Ajax request loads my default layout !

2008-04-22 Thread Jose Selesan
Hi, try this: if($this-RequestHandler-isAjax()) { $this-render('admin_index', 'ajax'); *$this-layout = '';* } On Tue, Apr 22, 2008 at 8:16 AM, Neveldo [EMAIL PROTECTED] wrote: Hi all, I've an issue with Ajax requests.

How to use not in in new find() ?

2008-04-22 Thread rob30
Hi, How to use not in in new find() syntax? in is working fine $this-Model-find('list', array('fields' = array('id', 'name'), 'conditions' = array('id' = $model_ids))); generates: SELECT `Model`.`id`, Model`.`name` FROM `models` AS `Model` WHERE `id` IN (2, 5) but how to generate WHERE `id`

Re: 1.2 Beta Manual

2008-04-22 Thread sike
Thank you. Btw how do you saved in pdf ? I ask this because I the css of the page is missing, i could make one but save it just like the online would be perfect. /John On Apr 22, 1:55 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: The complete 1.2 docs in one page is available

Re: How to send email in cake php

2008-04-22 Thread Rocky
I am using php cake version 1.1.19.6305 On Apr 22, 2:55 pm, dr. Hannibal Lecter [EMAIL PROTECTED] wrote: Are you using the 1.2 branch? http://api.cakephp.org/1.2/class_email_component.htmlhttp://book.cakephp.org/view/176/email On Apr 22, 9:49 am, Rocky [EMAIL PROTECTED] wrote: Would you

Re: Email Component uses SMTP not sending...

2008-04-22 Thread JaMoyFriends
i dont think that's the issue, maybe it is but i dont see how that could help. i can properly send it with PHPMailer, with the same credentials i gave cake. the only problem is, it isnt sending. i have no idea if cake got authenticated or anything, but PHPmailer did. i dont want to use

Keepin both MVC architecture and the old style ..

2008-04-22 Thread Abhishek
Hi .. Is it poss to use both CakePHP and the usual coding which we used earlier at the same time .. the problem is what do i do about my previous codes .. if i move to CakePHP now .. Regards Abhsihek Jain --~--~-~--~~~---~--~~ You received this message because

Re: belongsTo relationship killing my app

2008-04-22 Thread Flipflops
Hi I assume you mean the expects() from the bakery article - but I haven't used this myself, I've just been using basic unbinds in the controller e.g. $this-ProductType-unbindModel( array('hasAndBelongsToMany' = array('Adviser'),'hasMany' = array('Product'))

View this page CakePHP Official Resources

2008-04-22 Thread Sliv
Added a link to CakeBin http://bin.cakephp.org Click on http://groups.google.com/group/cake-php/web/cakephp-official-resources - or copy paste it into your browser's address bar if that doesn't work. --~--~-~--~~~---~--~~ You received this message because you are

Re: Keepin both MVC architecture and the old style ..

2008-04-22 Thread Chris Hartjes
On Tue, Apr 22, 2008 at 9:17 AM, Abhishek [EMAIL PROTECTED] wrote: Hi .. Is it poss to use both CakePHP and the usual coding which we used earlier at the same time .. the problem is what do i do about my previous codes .. if i move to CakePHP now .. Well, you might be able to salvage

Re: Keepin both MVC architecture and the old style ..

2008-04-22 Thread Flipflops
Hi I would have thought it is usually better to just start from scratch and just use Cake - certainly for a new project - of course you can still bring over classes and functions from your own code to use in helpers / components etc. It is fairly easy to run CakePHP in a sub directory within

View this page FAQ

2008-04-22 Thread Sliv
Fixed missing HABTM link Click on http://groups.google.com/group/cake-php/web/faq - or copy paste it into your browser's address bar if that doesn't work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP

Re: @Sliv: One link is missing in FAQ page?

2008-04-22 Thread Sliv
Fixed - missing link was '3 secrets to handling HABTM situations' http://groups.google.com/group/cake-php/msg/12598076103b0130 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group,

Re: how can access the Auth info form view

2008-04-22 Thread Sliv
You will probably want to do that in the controller action and set a variable for the view http://manual.cakephp.org/view/172/authentication --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to

Re: Trying to use Component polymorphism, How do I load a component on the fly?

2008-04-22 Thread Anthony
I'm trying to solve the same exact problem, so far unsuccessfully... Any suggestions out there? On Apr 20, 5:44 am, mixersoft [EMAIL PROTECTED] wrote: I have a parent component that I want to use to implement an interface (java style) and multple child components that extend the interface. I

Re: How to use not in in new find() ?

2008-04-22 Thread grigri
Try: $this-Model-find('list', array('fields' = array('id', 'name'), 'conditions' = array('not' = array('id' = $model_ids; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group,

anyone knows how use i18n in cakephp 1.2 for database modelling

2008-04-22 Thread robert123
Hi, I am trying to implement i18n in cakephp for database modelling There is a good solutions at http://www.palivoda.eu/2008/04/i18n-in-cakephp-12-database-content-translation-part-2/ but I have tried to use it without any success, anyone can give an example of how to implement it. Thank you

Re: how can access the Auth info form view

2008-04-22 Thread francky06l
in the view : if($session-check('Auth.User.id')) echo $html-link() .. hth On Apr 22, 4:00 pm, Sliv [EMAIL PROTECTED] wrote: You will probably want to do that in the controller action and set a variable for the view http://manual.cakephp.org/view/172/authentication

Re: model relationship for optional details

2008-04-22 Thread Ariel Arjona
Thanks for the replies. Aaron, could you please elaborate about the conditions in the validation? Regards, Ariel w.r.t the hasMany relation, as long as you omit conditions from your validation and your SQL schema is set properly, you will not run into any problems. /a On Apr 21, 1:31

problem using sampler program

2008-04-22 Thread rtanz
hi i am trying to setup http://cakeforge.org/projects/sampler/ sampler system on my server and i get the following error: Warning: require(cake/bootstrap.php) [function.require]: failed to open stream: No such file or directory in /home/jpgalea/public_html/ cake/sampler/webroot/index.php on

Re: Trying to use Component polymorphism, How do I load a component on the fly?

2008-04-22 Thread Joel Perras
App::import('Component', 'MyComponent') will load the component. In the Component::startup() you should have: public function startup($controller){ $this-MyComponent = $controller-MyComponent; } so that you can then create a component instance when you need it: $this-MyComponentInstance =

Re: 1.2 Beta Manual

2008-04-22 Thread [EMAIL PROTECTED]
In Mac OS X pdf-support is built into the printing dialog. If you are using Windows you have to install Adobes pdf printing plugin found on their website: http://www.adobe.com/products/acrobat/readstep2.html They also have some online service to convert documents and urls to pdf but after the

Re: problem using sampler program

2008-04-22 Thread [EMAIL PROTECTED]
The zip on sourceforge containing sampler is 60KB. The core of CakePHP is 1MB. The zip most likely contains only the projects application folder. You need to download and install CakePHP along with the files for sampler. You are looking for version 1.1 of Cake from what I can tell of the errors

Re: how to clear error.log?

2008-04-22 Thread b logica
Well, there are plenty of filesystem functions available to PHP, but putting anything in bootstrap.php to do that would pretty much negate any benefits to logging. You'd never keep anything around long enough to read it. I suggest you look up how to configure logrotate to take care of the logs

Re: a couple of small things I can't figure out

2008-04-22 Thread b logica
I'm not sure id $student is an integer ID or an entire array. You seem to be treating it as both. You really only need to pass the ID. In your form (the one with the file upload) include something like this: $form-hidden('Student.id', array('value' = $student['Student']['id'])) That variable

Re: Validation Problem

2008-04-22 Thread b logica
You might find it simpler to, instead creating a form, to put links around the country names pointing to an edit method. In the edit view, create one form to edit the table fields and one form to delete. So you have something like: h1Edit Canada/h1 echo $form-create('Country', array('action' =

Session ID

2008-04-22 Thread MonkeyGirl
Hi again! I'm using the session component, as documented at http://manual.cakephp.org/view/173/sessions , and it's storing and retrieving all the session variables I set just fine. However, I'm trying to find the session ID - or anything else that's unique to each visitor, but doesn't change

Re: Email Component uses SMTP not sending...

2008-04-22 Thread b logica
You said that switching to SMTP caused it to stop working. What transfer method did you use with PHPMailer? There are a number of reasons why this might not work, from no MTA being available, to a missing relayhost (or SMART_HOST for sendmail). On Tue, Apr 22, 2008 at 8:23 AM, JaMoyFriends

Bake error

2008-04-22 Thread kovudalion
I am getting the following error when I try to institute bake from a command line Fatal error: Cannot redeclare class overloadable in c:\xampp\htdocs \todo\cake\libs\overloadable_php4.php on line 39 The particulars in and arround line 39 for the error is --Code Snippet class Overloadable

Re: Session ID

2008-04-22 Thread Grant Cox
Can you explain why you want to do this? For what circumstance do they need a persistent unique value? The only thing I can think of is to store data on a persistent medium - ie database or file. And in both of these cases you can easily generate a unique one (file / row), and just store the

Re: Session ID

2008-04-22 Thread b logica
You're going to wince when you see this ... $session-id() http://api.cakephp.org/1.2/class_session_component.html#e1692bdb30d589bc95f3173d20ba6295 Yeah, it's odd that debug($session) shows an empty 'id' field and that you need to use the method. I'm sure it's much safer that way but then why

Re: Why custom model functions inside plugin models are not called?

2008-04-22 Thread biesbjerg
I'll bet echo get_class($this-Review) will output 'AppModel'. The reason is you need to define $uses like this when accessing plugin models: var $uses = array('User', 'Reviews.Review'); You should do the same when creating associations within the plugin's models: PluginName.ModelName. Good

cake 1.2 r6709 - scaffolding and german umlauts

2008-04-22 Thread Matthias
Hi, when I create an entry in the database with the scaffolding interface, it's possible to save german umlauts. The scaffolding webpages display the entered characters correct, except in input fields (if try to edit such an entry) or drop down boxes. The content is not corrupt, it's empty. It

Combine and compress js / css..

2008-04-22 Thread Mech7
Does anybody know a way to get this script working with Cake.. http://rakaz.nl/item/make_your_pages_load_faster_by_combining_and_compressing_javascript_and_css_files I think because the cake url rewrite it does not work by default :( --~--~-~--~~~---~--~~ You

Re: Why custom model functions inside plugin models are not called?

2008-04-22 Thread aranworld
Here is what I had to do: in pluginname/models/article.php App::import('Model', 'Pluginname.Comment'); class Article extends PluginnameModel { $belongsTo = array('Comment'); } Now in pluginname/controllers/articles_controller.php I do $uses = array('Pluginname.Article'); On Apr

Re: Email Component uses SMTP not sending...

2008-04-22 Thread aranworld
Are you using the latest nightly build? There is a bug in the beta release from January that prevents the Mail component from sending a mail unless you actually use a template file. The bug has been fixed in the SVN releases. https://trac.cakephp.org/ticket/3820 On Apr 22, 10:04 am, b

Re: does Cache prefix work?

2008-04-22 Thread Krommenaas
I managed to get prefixes before the filenames of my cached views, here is how in case someone else needs them. This is with the most recent Cake build (1.2.0.6311 beta). 1) in \cake\libs\view\helpers\cache.php, in function __writeFile($content, $timestamp): replace $cache = $cache .

Re: does Cache prefix work?

2008-04-22 Thread b logica
So where are you setting $prefixxx? It must be resolvable by dispatcher, so AppController would be out of the question. On Tue, Apr 22, 2008 at 3:31 PM, Krommenaas [EMAIL PROTECTED] wrote: I managed to get prefixes before the filenames of my cached views, here is how in case someone else

Re: Session ID

2008-04-22 Thread Sebastian Veggiani
The methodology to work with sessions is: // for reading $myVar = $this-Session-read('varName'); // for writing $this-Session-write('varName', $varValue) // for debugging the session array $mySessionVars = $this-Session-read(); debug( $mySessionVars ); I hope this helps. On 22 abr, 14:15, b

Re: Four sites using same database, but only their own records

2008-04-22 Thread tgies
On Apr 22, 3:20 am, ModByChris [EMAIL PROTECTED] wrote: Or you could use a beforeFind() to add the condition. I used that on a project that dealt with multiple finanical years. I changed the beforeFind() to alter the conditions to include the restriction of a specific year. in your case

Cake 1.2 Session Write

2008-04-22 Thread Stefan
I developed a rather large amount of code on Cake 1.1. At the end of the View, I wrote some data back to Session-write. I can't seem to find the proper object to get to the Session from the View in Version 1.2. Any clues would be greatly appreciated.

Tag Cloud Helper

2008-04-22 Thread Websta*
Hey folks, Creating Tag Clouds: So i came across this yesterday as i set out to create a tag cloud: http://bakery.cakephp.org/articles/view/tagcloud-helper Thanks to the original author as it got me on a roll, so i spent a little time extending it to get it actually outputting an html

Re: Cake 1.2 Session Write

2008-04-22 Thread Andreas
Hi Stefan, I think it's not a good idea to write Session-data in the viewsanyway: In the SessionHelper write() overrides CakeSession:write() and disables it, so copy the SessionHelper from /cake/libs/view/helpers/ session.php to app/view/helpers. Now edit the file and delete the write()

Re: Why custom model functions inside plugin models are not called?

2008-04-22 Thread biesbjerg
Hi Aranworld, You should use var $belongsTo = array('Comment' = array('className' = 'PluginName.Comment')) On Apr 22, 9:02 pm, aranworld [EMAIL PROTECTED] wrote: Here is what I had to do: in pluginname/models/article.php App::import('Model', 'Pluginname.Comment'); class Article extends

Re: belongsTo relationship killing my app

2008-04-22 Thread Langdon Stevenson
Hi John Yes, you are correct, the expects() from the Bakery. What I have discovered is that unbinding (whether using expects() or unbindModel() doesn't help, as it never appears to be executed. It seems that PHP is running out of memory, or whatever its doing, prior to executing the Action

Re: Email Component 1.2 -- Problems with HTML and SMTP

2008-04-22 Thread Schuchert
You sir, are a savior. It wasn't on line 750 for the version I had but it did work beautifully. Now, I have to get my messages to pass the SPAM filters of my ISP. Thanks again Jonathan. --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Email Component 1.2 -- Problems with HTML and SMTP

2008-04-22 Thread Schuchert
I spoke too soon. The SMTP issue is fixed but my html formatted messages still come through as text. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Possible Bug Identified - Re: belongsTo relationship killing my app

2008-04-22 Thread Langdon Stevenson
I have finally nailed down the issue and am pleased to find that I am not going mad after all. It appears that when a model with a two word name (like FooBar1) is loaded by a hasMany relationship and has a belongsTo relationship to the parent that loaded it then PHP will fail and return a

Re: Force Error Header

2008-04-22 Thread Mr-Yellow
bump. Does CakePHP intecept all headers and always send 200ok with a HTML error page? -Ben On Apr 22, 5:15 pm, Mr-Yellow [EMAIL PROTECTED] wrote: Need to return error headers for PayPal IPN. I've tried this in a view. However it still returns a 200ok header. ?php $this-error(500,

Re: Force Error Header

2008-04-22 Thread Mr-Yellow
No it does seem to work... Problem is when you try to render another view it overrides, redirects or something. -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send

Re: anyone knows how use i18n in cakephp 1.2 for database modelling

2008-04-22 Thread robert123
Just spoke to the author of the solutions, he have just uploaded the latest code, works like a charm, but a few things thoug 1. There is fixed needed in the cakephp 1.2 2. Need php 5.24 and above 3. Some settings like locale may have to change to Configure::read('Config.language')

I18n, is this correct way? Configure::write('Config.language', en);

2008-04-22 Thread robert123
In the cakephp 1.2 cookbook http://book.cakephp.org/view/161/localization-internationalizat There is a section $this-L10n = new L10n(); $this-L10n-get(en); Configure::write('Config.language', en); I read that configure will change the whole application settings. Is this correct way to

Re: Session ID

2008-04-22 Thread b logica
Yes, i know that. I was referring to the fact that it appears there's an id field that i never used. On Tue, Apr 22, 2008 at 4:02 PM, Sebastian Veggiani [EMAIL PROTECTED] wrote: The methodology to work with sessions is: // for reading $myVar = $this-Session-read('varName'); // for

Paginate Custom URL

2008-04-22 Thread Kyle Decot
I am using the pagination but when I use the ?php echo $paginator- next(Next); ? the link goes to example.com/browse/index/page:2/ when what I would like is example.com/browse/page:2/ Is this possible? Thanks. --~--~-~--~~~---~--~~ You received this message because

Re: Email Component 1.2 -- Problems with HTML and SMTP

2008-04-22 Thread Schuchert
Should MIME-Version: 1.0 be included when using both but without attachments? I looked at the source for most of the html emails I have gotten lately and they all had MIME-Version: 1.0 in their header area. Could this be the reason that my html messages only come in as text?

Re: I18n, is this correct way? Configure::write('Config.language', en);

2008-04-22 Thread David Christopher Zentgraf
I just had that same issue the other day, see thread: http://groups.google.com/group/cake-php/browse_thread/thread/3ada672bf5a86b6b/cf386c0d99eca0bf Basically, all you do is this in your core.php config file: Configure::write('Config.language', eng); This establishes the default language for

Re: I18n, is this correct way? Configure::write('Config.language', en);

2008-04-22 Thread Femi Taiwo
Additional Info: Also add this to your beforeFilter. Configure::write('Cache.disable', Configure::read('debug')); ... Your default.po file is by default cached, so any changes you make to it while developing does not show up for a while. With this, if you're in debug

Integrating CakePHP app into another app

2008-04-22 Thread David Christopher Zentgraf
Hi, I wrote a user/login/permission management app in Cake 1.2. I'm now looking for ways to integrate that into other (non-Cake) apps, so their permissions and users can be centrally managed. My idea is to have a small .php file which could be included() from apps, providing them with an

Re: Paginate Custom URL

2008-04-22 Thread Sam Sherlock
try $paginator-options( array( 'url'=array('controller'='Browse', 'action'=''), )); or $paginator-options( array( 'url'='/browse/', )); On 23/04/2008, Kyle Decot [EMAIL PROTECTED]

Re: A custom test reporter

2008-04-22 Thread Marcelius
Guess not Anyway, I think it would be nice to see such feature in the cake test app. It doesn't have to be complecated at all, I was thinking of a superclass which forms the basic reporter structure, and cake searches for custom extended reporters in a 'reporters' folder for example. The way it