Re: Scaffolding and Model Relationships

2009-08-22 Thread gerhardsletten
Hi Jeff Have experienced the same too. Also I have found that the templates I get after I have baked the views differ from what I have when only using the shaffold function. Gerhard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: clearCache() unexpected behavior

2009-08-11 Thread gerhardsletten
Think it only deletes files under tmp/cache/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@googlegroups.com To unsubscribe from this group, send

Re: Is it possible to check to see if model exists?

2009-07-10 Thread gerhardsletten
Mayby you have to use the try.. catch also http://mark-story.com/posts/view/simplifying-controller-logic-with-exceptions --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send

Re: Call ClassRegistry::init in bootstrap.php

2009-07-06 Thread gerhardsletten
Put the code you had in bootstrap in your main app_controller.php in the beforeFilter() function --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: How to Save Configuration in Database

2009-07-02 Thread gerhardsletten
Have made a plugin for this named Settings: http://code.google.com/p/gerhardsletten/source/browse/trunk/cakephp/plugins/settings/docs/readme.textile --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group

Re: What's best way to create the Admin area?

2009-06-08 Thread gerhardsletten
Go with conversions. If your app allow full crud for regular users, you might not need to create a admin controller functions/views for that model. Also try to ignor the desire to mod everything. What you get baked will often do the job, even though it's not as sexy as the wordpress backend.

Settings plugin that controlls Configure

2009-06-07 Thread gerhardsletten
Hi, just made this plugin that imports your config/core.php settings into database and makes it possible to easy controll them in your backend. http://code.google.com/p/gerhardsletten/source/browse/#svn/trunk/cakephp/plugins/settings I override the default settings in app_controller.php

Re: Problem Uploading Flash

2009-05-31 Thread gerhardsletten
MeioUpload is made for images.. If you have modified it, to handle all kinds of files, check to see if you can upload other kind of files. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to

Bug? Plugin and controller with same name

2009-05-10 Thread gerhardsletten
Experience a bug with cake_1.2.3.8166 where I have a Posts plugin that has a controller with same name. When I try to redirect to the index function cake adds :controller in the end. I get this url: http://localhost/~gerhard/gersh.no/admin/posts/:controller Anybody who knows if thats a bug?

Re: Disable Cache Dynamically

2009-05-08 Thread gerhardsletten
I am planning a settingsplugin, which reads all default settings in setting/core.php and then gives admin a interface to override these setting, storing them in a table. Is it possible to use a App::import('Model', 'Settings'); in either core.php or bootstrap.php and itterate through the whole

Re: Offline version of the CakePHP manual.

2009-04-07 Thread gerhardsletten
Guess the same goes for the api.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to

Re: switching databases on dev and production

2009-02-11 Thread gerhardsletten
Read this today: switch($_SERVER['SERVER_NAME']){ case ‘digbiz.localhost’: $this-default = $this-dev; break; case ‘digbiz.example.com’: $this-default = $this-prod; break; default: // we are likely baking, use our local db $this-default = $this-dev; } via

Re: svn or git?

2009-01-30 Thread gerhardsletten
I use the Textmate Bundle SVNMate (http://ciaranwal.sh/2007/11/29/ svnmate-update) its really wonderfull working with. And on office where we use svn+ssh protocol it even supports that to. Also have the svnX, but its a little more hazzle working with.

Re: nice new API layout

2009-01-29 Thread gerhardsletten
Kudos! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to

Re: Multiple Uploads with MeioUpload

2009-01-26 Thread gerhardsletten
Are using MeioUpload on my last project to as Article has many Uploads. When editing an article you can upload one and one image. Your will find source here: http://code.google.com/p/gerhardsletten/source/browse/trunk/cakephp/surdeig/models/upload.php?r=6 If you need your app to upload all

Re: twitter users?

2009-01-26 Thread gerhardsletten
http://www.twitter.com/gerhardsletten A salty mix of cake, ez publish, triathlon, food and live. Code stuff mostly in english, but some norwegian now and than On Jan 25, 5:33 pm, Marcelo Andrade mfandr...@gmail.com wrote: http://twitter.com/mfandrade Mainly in portuguese. -- MARCELO DE F

App::import fail to load Component for imported controller

2009-01-19 Thread gerhardsletten
Writing an app where I was planing to move all email delivering in one controller. When I try to load this Utility controller in a function from another controller. App::import fail to load Email component in this controller Controller 1: code function send_message() { ...

Re: renaming problem

2009-01-16 Thread gerhardsletten
And did u remember to delete the files in app/tmp/cache --~--~-~--~~~---~--~~ 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,

Re: Nested Associations / Multiple Joins

2009-01-16 Thread gerhardsletten
User is a subclass of model. Model::read api here: http://api.cakephp.org/class_model.html Think u need to set the model recursive attribute: $this-User-recursive = 2; $user = $this-User-read(null, $id); debug($user); http://book.cakephp.org/view/439/recursive

SmartMarkUp with CakePHP

2008-12-18 Thread gerhardsletten
Just added SmartMarkUp to my CakePHP blog. Its very lightweight and works well with Cakes naming convention. Info here: http://www.gersh.no/posts/view/smartmarkup_with_cakephp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: how to use self join in cake

2008-07-19 Thread gerhardsletten
Thanks, this what I was looking for. Works nice with code var $actsAs = array('Tree'); /code to --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: more fields in list function

2008-02-12 Thread gerhardsletten
Anyone who knows why your Favorites doesn't get stored in your Favorites-link at the top? Can't delicious everything.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email

Re: cakephp tree behavior + ext js (drag and drop)

2008-02-12 Thread gerhardsletten
Hi Adam Will have a look at it soon. Is working with a model with tree- behavior right now. Gerhard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: saveAll with multiple records, {$model}_id is missing

2008-02-09 Thread gerhardsletten
I work with a similar thing right now. The edit view: ?php echo $form-create('Contentclass');? fieldset legend?php __('Edit Contentclass');?/legend ?php echo $form-input('id'); echo $form-input('title'); echo

Re: Bug in $model-saveAll in 1.2

2008-02-07 Thread gerhardsletten
in the beta release. You can either grab any release after 6337 (beta was 6311) or go into cake's model.php and add the return at the end of  the saveAll function and it should work like a dream. On Feb 5, 5:07 pm, gerhardsletten [EMAIL PROTECTED] wrote: I am trying to save related models

Bug in $model-saveAll in 1.2

2008-02-05 Thread gerhardsletten
I am trying to save related models with saveAll, but it will not return true even if it succeed to save: if($this-Contentclass-ContentclassAttribute-saveAll($this- data['ContentclassAttribute'])) { $this-Session-setFlash(__('The Contentclass and all attributes has been saved', true));

Re: WYSIWYG + source code formatting

2008-02-01 Thread gerhardsletten
When you post some code this is what happens: 1. You write your text and paste code into tinymce editor 2. Tinymce encode and to lt; and gt; 3. You save your post, and lt; and gt; get stored in the db 4. Problem: when you re-edit your post, the textarea which tinymce reads the content from

Re: Installing CakePHP on MAMP

2008-01-25 Thread gerhardsletten
If you install in in your own homedirectory /Users/name/Sites check you httpd prefs for this folder, you find it in /private/etc/apache2/ users/your-username. If not present create it. In mine I have this: Directory /Users/gersh/Sites/ # # This may also be None, All, or any combination of

UPPERCASE and lowercase affect CakePHPs way of parse Mysql queries!

2007-11-10 Thread gerhardsletten
Hi bakes! Just upgraded to cake_1.1.18.5850 and some of my old distinct queries failed. Old query: $posts = $this-findAll('Post.tag NOT LIKE ', array('distinct `Post`.`tag`'), 'Post.tag DESC'); Result query from Cake was: Query: SELECT distinct `Post.`tag` FROM `cake_posts` AS `Post` LEFT JOIN

Re: Taking advantage of Cake to build personal book database

2007-11-10 Thread gerhardsletten
Do you mean that they should be allowed to I think that each book object should b Shouldn't the ISBN number be unique key. Books may have the same title, but the ISBN is always unique, i think.. Don't know what happens if the book is republished though.. Freebase do have a collection of book

Re: Multiple same fields in one view

2007-10-16 Thread gerhardsletten
Hi Lemon I used a method in a project of mine, where I was updating a slug field through ajax. Then I created a extra view for in the model, which was included inside the form with a ajax updater. Then the value of the field was an url-friendly verison of a title field. The value of the title

Re: Mac install using MAMP get MYSQL can't connect error

2007-07-22 Thread gerhardsletten
Hi Road runner! This is parts of my database.php: var $default = array('driver' = 'mysql', 'connect' = 'mysql_connect', 'host' = 'localhost',

Re: Elements vs requestAction

2007-05-10 Thread gerhardsletten
Hi Tane Is it possible to cache an spesific element in 1.1 or is it a new function in 1.2? Can you give us an example? On May 9, 4:00 am, Tane Piper [EMAIL PROTECTED] wrote: I actually like to mix the two. What I find best is to create an element, and put the rA() inside it. Then I can use

How to: subpages in pages (pages_controller)

2007-04-23 Thread gerhardsletten
Lets say I want to create a pages called Projects with Software 1 and Software 2 as subpages. How do I do that. Do I create an folder within Pages folder, where an index.thtml file will be the default access when http://www.example.com/pages/projects is requested? I want the 2 subpages at this

Re: How to: subpages in pages (pages_controller)

2007-04-23 Thread gerhardsletten
Thanks, looking forward to try it out.. Gerhard On Apr 23, 2:10 pm, jitka [EMAIL PROTECTED] wrote: yes, You can create subfolders in app/views/pages, so url example.com/pages/projects/software_1 will look for file app/views/pages/projects/software_1.thtml If You want