Re: Media View / Download: How to count finished downloads?

2010-01-03 Thread biesbjerg
Hey, I modified the MediaView to be a Component, and added some stuff - you can find the component here: http://bin.cakephp.org/view/599576961 1. Add to components array in the controller. 2. Parameters are the same, only you should use $this->Download- >download($params); instead of $this->set($

Re: $this->passedArgs breaking my Routes

2009-03-08 Thread biesbjerg
Have you tried Router::connectNamed(array('images')); ? Each named parameter needs to be connected like this for url generation to function correctly. On 6 Mar., 08:53, geoff wrote: > Hey all. > > I have a fairly troublesome problem that has really been grating my > goat for the past little whil

Re: Warning (2): fopen(cakephp/app/tmp/cache/persistent/cake_core_dir_map) [function.fopen]: failed to open stream: Permission denied [CORE/cake/libs/file.php, line 146]

2008-11-04 Thread biesbjerg
Are you executing the cake app using cron? If so, try to put umask(002); in bootstrap and purge tmp files. On Nov 3, 10:50 am, Malcolm Krugger <[EMAIL PROTECTED]> wrote: > Sorry I should have mentioned earlier > > I set 777 perms for /app/tmp and all of its subdirectories too already > > Mal > >

Re: Custom Routes & Back Tracing with CakePHP 1.2

2008-08-25 Thread biesbjerg
TAke a look at http://groups.google.com/group/cake-php/browse_thread/thread/1a53136e5d9825de/5d8fb07be683c39e?lnk=gst&q=biesbjerg#5d8fb07be683c39e On 25 Aug., 15:17, Adrian <[EMAIL PROTECTED]> wrote: > I am working on a site that will need 3 themes, one each for the games >

Re: parameter 0 in requestAction do not work

2008-08-20 Thread biesbjerg
Hi Klaus, Try $this->requestAction(array('controller'=>'repairs', 'action'=>'getData'), array('pass' => array(0))); On 18 Aug., 11:11, Klaus Schwarzkopf <[EMAIL PROTECTED]> wrote: > Hi, > > i use the requestAction funktion with a parameter. The value of the > parameter is 0. > > My cake version

Re: how to handle multiple gaming categories?

2008-08-20 Thread biesbjerg
I would do it like this: Router::connect('/:cat/sells', array('controller' => 'sells', 'action' => 'index'), array('cat' => 'wow|uo')); Now you can access: domain.com/wow/sells domain.com/uo/sells in your controller's action you can check $this->params['cat'] which will contain either wow or uo

Re: Automatic propagation of named params?

2008-07-08 Thread biesbjerg
Overwrite url method in your app_helper.php. Here's what I've done for keeping language in my urls: class AppHelper extends Helper { function url($url = null, $full = false) { if (is_array($url)) { $default = Configure::read('Config.defaultLanguage'

Besøg denne side "CakePHP In The Wild"

2008-07-02 Thread biesbjerg
Added Hotel Domir Odense, CAKEPHP app to the list. http://groups.google.com/group/cake-php/web/cakephp-in-the-wild --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to

Re: cake extract in different files problem

2008-06-26 Thread biesbjerg
What rev. are you using? https://trac.cakephp.org/ticket/3519 - Fixed 8 months ago On Jun 23, 9:41 pm, Alberto <[EMAIL PROTECTED]> wrote: > Hi, I was using cake extract and I realized a possible bug in the > script. > > I used the function __d(domain, text) to set the text in different > files.

Re: Cakephp 1.2 l10n and i18n - how to switch current language?!

2008-06-26 Thread biesbjerg
I don't think it's possible to change language mid-page, as you just said, i18n is a singleton and the po/mo file is parsed and loaded once per request. On Jun 25, 6:47 pm, Pento <[EMAIL PROTECTED]> wrote: > Thanks, but it not work correctly when for example auth component is > used. > Problem be

Re: Cakephp 1.2 l10n and i18n - how to switch current language?!

2008-06-25 Thread biesbjerg
Like this: $this->Session->write('Config.language', 'dan'); On 25 Jun., 11:32, Pento <[EMAIL PROTECTED]> wrote: > Hello, everybody! > > How can I control current langauge for l10n and i18n in my controller? --~--~-~--~~~---~--~~ You received this message because yo

Re: TreeBehavior and callbacks

2008-06-11 Thread biesbjerg
viors->enable('Tree'); return $return; } On 11 Jun., 11:52, biesbjerg <[EMAIL PROTECTED]> wrote: > Hi again, > > I put the following in my Asset model : > > function deleteAll($conditions, $cascade = true, $callbacks = true) { > $th

Re: TreeBehavior and callbacks

2008-06-11 Thread biesbjerg
Delete gets called for every cascaded row delete. That's strange. Any ideas? On 7 Jun., 19:21, biesbjerg <[EMAIL PROTECTED]> wrote: > Hi grigri, > > thanks for your feedback. > > I get what you're saying, but is it just me or does it seem "wrong" to > corru

Re: TreeBehavior and callbacks

2008-06-07 Thread biesbjerg
Hi grigri, thanks for your feedback. I get what you're saying, but is it just me or does it seem "wrong" to corrupt the tree, even though we fix it again (re-sync it)? On Jun 5, 5:09 pm, grigri <[EMAIL PROTECTED]> wrote: > > Then the children will not get deleted and I'll end up with orphans..

Re: TreeBehavior and callbacks

2008-06-05 Thread biesbjerg
Then the children will not get deleted and I'll end up with orphans.. I'm attaching a proposed patch to the ticket (Not fully implemented - Only for beforeDelete/afterDelete callbacks) On 5 Jun., 16:13, grigri <[EMAIL PROTECTED]> wrote: > > Unfortunately, enabling callbacks in deleteAll corrupts

Re: TreeBehavior and callbacks

2008-06-05 Thread biesbjerg
... > > function deleteAll($conditions, $cascade=true, $callbacks=true) { > // Note the default parameter change : $callbacks is now true if > unspecified > return parent::deleteAll($conditions, $cascade, $callbacks); > } > > } > > On Jun 5, 10:56 am, bi

TreeBehavior and callbacks

2008-06-05 Thread biesbjerg
Hi guys, I could use some ideas here. Here's the deal: I have this model, Assets, which holds references to uploaded files in my app. My UploadBehavior has some callbacks, one of them is beforeDelete which makes sure the file gets deleted from the filesystem before deleting the row in the databa

Re: Plugin Model Association Problem

2008-05-25 Thread biesbjerg
Add var $name = 'User'; & var $name = 'UserProfile'; as properties in your models and I think you're golden :-) On May 24, 10:19 am, francky06l <[EMAIL PROTECTED]> wrote: > Can you pass your model definition code ? > I have the same kind of plugin and not much problems, maybe I declare > the asso

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 Artic

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

TreeBehavior belongsTo scope

2008-04-20 Thread biesbjerg
Hi guys, I'm trying to store multiple MPTTs in a single table using these model associations: Menu hasMany MenuItem MenuItem belongsTo Menu 'ASC'); var $actsAs = array('Tree' => array('scope' => 'Menu')); var $belongsTo = array( 'Menu' => array(

Re: Email Component Minor Fix in 1.2

2007-10-31 Thread biesbjerg
Hi MikeK, Register yourself on the trac site. https://trac.cakephp.org/register You'll then be able to submit tickets. On Oct 31, 2:13 am, MikeK <[EMAIL PROTECTED]> wrote: > I use the email component and it was driving me nuts inserting a > newline in the front of every email (any 1.2 version

Re: I can no longer directly access the index method?

2007-09-16 Thread biesbjerg
Where is your index method defined? in app_controller or in a normal controller? On Sep 14, 12:37 am, Aaron Shafovaloff <[EMAIL PROTECTED]> wrote: > "You are seeing this error because the private class method index > should not be accessed directly." > > Apparently this is part of the latest SVN

Re: Strange routes/Router::url() behavior

2007-09-10 Thread biesbjerg
Hi, Correct way to implement above route would be: Router::connectNamed(array('community_id')); Router::connect('/:community_id/bulletins/:action/*', array('controller' => 'bulletins'), array('community_id' => '[0-9]+')); On Sep 10, 10:40 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I h

Re: Customizing HTML Tags

2007-06-16 Thread biesbjerg
You can either extend the core HtmlHelper and overload the tags property, or you could copy the html helper from cake core into you app folder and edit the tags in there. On Jun 15, 9:42 pm, rtconner <[EMAIL PROTECTED]> wrote: > Maybe some of you old school cakers might know this one. I was just

Re: poEdit and translations messes up!

2007-06-05 Thread biesbjerg
. On Jun 5, 3:01 pm, biesbjerg <[EMAIL PROTECTED]> wrote: > Hi, > > When opening po files in poEdit (created with poEdit) for updating I > get an alert saying 'We don't support state callbacks yet!' and I can > chose to ignore further warnings. > >

poEdit and translations messes up!

2007-06-05 Thread biesbjerg
Hi, When opening po files in poEdit (created with poEdit) for updating I get an alert saying 'We don't support state callbacks yet!' and I can chose to ignore further warnings. If I do that it loads the in file with translations, but some translations have shifted a place down no longer matching

Re: CakePHP 1.2 validation - userDefined function

2007-03-20 Thread biesbjerg
->invalidate('name'); return false; } return true; } This code prevents Model::save() when appropiate, but I can't get it to show an error message in the view? Have tried : input('name', array('error&#

CakePHP 1.2 validation - userDefined function

2007-03-19 Thread biesbjerg
Hi guys, I'm trying to check if a record already exists (based on a filename), if it does it should fail validation. I'm using CakePHP 1.2 and had a look at 'userDefined' which looks like it should call a custom function. This function I'm talking about: http://api.cakephp.org/1.2/validation_8p

Re: Bake fatal error

2007-02-11 Thread biesbjerg
Get the nightly build at http://cakephp.org/downloads/index/nightly/ 1.2.x.x The bug has been fixed there. On Feb 11, 4:33 am, "Jeffrey" <[EMAIL PROTECTED]> wrote: > What would cause this error when trying to use bake to create a new > model? > > Fatal error: Class 'Model' not found in /Users/je

Re: CAKEPHP, SWFupload

2007-02-04 Thread biesbjerg
I use SWFUpload. But you have to hack the core though. In app/config/bootstrap.php add this: if (isset($_GET[CAKE_SESSION_COOKIE])) { session_name(CAKE_SESSION_COOKIE); session_id($_GET[CAKE_SESSION_COOKIE]); } Now in cake/libs/session.php find this line: if ($this->_userAgent == $this->r

Re: bake.php script writes models, but not controller or views

2007-01-25 Thread biesbjerg
Hi miggs, I recently had this problem. Turns out I had made a copy of a model (backed up app/models/media_folder.php as app/models/media_folder - Copy.php) I deleted this file and everything worked fine again. Guess app/models is only for models, eh? ;-) On Jan 17, 11:09 pm, "miggs" <[EMAIL P

Layout specific helpers

2007-01-13 Thread biesbjerg
I have certain helpers needed in some layouts - not views - Currently I'm including them in app_controller.php but that seems like a waste of ressources when layouts not using these helpers are rendered. An example could be a menu helper. A menu belongs to the layout - Not the view being rendere