Re: nocache tags

2009-03-08 Thread Krommenaas

and if it is, what would be the common method to cache pages that show
the login status? i.e. how to access the session data from the nocache-
code?
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Can't use the formHelper with in

2009-03-08 Thread Krommenaas

got the exact same problem in 1.2.1.8004

what I'm gonna do: copy/paste the html from the uncached version
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: does Cache prefix work?

2008-04-23 Thread Krommenaas

I'm setting it where I'm using it. Since it's based on the domain name
I can set it anywhere. I suppose if you store the user language in a
cookie you could also read it anywhere.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



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 . '.php';
with
$cache = $prefixxx . $cache . '.php';

where $prefixxx is your prefix (I fill mine based on the domain name
which is different for my different languages).


2) in \cake\dispatcher.php, in function cached($url):

replace
  $filename = CACHE . 'views' . DS . Inflector::slug($this-
>here) . '.php';
with
  $filename = CACHE . 'views' . DS . $prefixxx .
Inflector::slug($this->here) . '.php';

and replace
$filename = CACHE . 'views' . DS . Inflector::slug($this-
>here) . '_index.php';
with
$filename = CACHE . 'views' . DS . $prefixxx .
Inflector::slug($this->here) . '_index.php';

where $prefixxx is again your prefix

That's it, caching works fine now for my multilingual site
(antwerps.be / aentwaerps/be)

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Introduction

2008-04-21 Thread Krommenaas

Hi,

Where can I find this Upload and Image behaviour from ad7six? Might
interest me but can't find it, not even on his blog :)


On Apr 21, 6:02 am, "Federico Rinaldi" <[EMAIL PROTECTED]>
wrote:
> Hi everyone, my name is Federico Rinaldi, my nick is eyesonly and I've been
> a silent reader of the group posts for quite a while by now. I don't want to
> bother with a long introduction so I'll tell a few words about me.
>
> I have a small start up in Argentina where me and my team work, recommend to
> our clients for almost every new project CakePHP. There are a few times
> where they want us to use an speciffic architecture like .Net or Java. I've
> been using CakePHP since the last year from the version 1.1, before that we
> used to work with Prado but I love the MVC so Cake cought my attention
> really fast as we were investigating rails to move to that framework.
>
> I can't show much of my work as it is for private companies but I'll try to
> give my experience of future projects through this great channel. For now a
> can show you this web  that is my first
> CakePHP app, it was made with 1.1 with some small ajax things and this other
> web  that has been made with 1.2 and has more
> complicated stuff (some Extjs and it uses the Upload and Image behaviour
> from ad7six, btw man u rock, I've read lot of stuff from you that save me
> tons of time).
>
> That's all for now, Thanks for all the hard work behind this great
> Framework, I will try from now on to contribute with code and stuff that
> take me a while to figure out and can save you guys some time.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



does Cache prefix work?

2008-04-19 Thread Krommenaas

Has anyone managed to get Cake to put a prefix before cached views? If
so, can you please post your core config and what you've had to do to
get it to work?

There are several threads here where people say they can't get it to
work, so I wonder if it's working for anyone at all. It's a crucial
feature for any multilingual site.

I'd be happy with any hack to get prefixes to work. I've spent hours
trying to understand the code and found that in /cake/libs/view/
helpers/cache.php, function __writeFile, $cached contains the filename
of the cached view before it is to be written and I can add my prefix
there. However I haven't been able to find the spot where the cached
view is read, if anyone knows that then I'm set.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Controllers without Views

2008-04-19 Thread Krommenaas

On Apr 19, 6:53 pm, Wizardry <[EMAIL PROTECTED]> wrote:
> @ Krommenaas:
> I tried using echo directly, but it pops up an error saying missing
> index view.
> could you pls post a code snippet on how your controller would look if
> you were to simply echo 'Hello'?


hello";
exit;
  }
}

browsing to /posts/test  will just show "hello".



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Controllers without Views

2008-04-19 Thread Krommenaas

Hi,

Yes you can simply use "echo" inside your controller action, and end
it with "exit". I do this for example in data maintenance actions (for
site admins only).

This is actually one of the reasons why I abandoned Ruby on Rails for
Cake; I once asked on a Rails forum why the Ruby equivalent of "echo"
wasn't working inside a controller action, and was told that they had
deliberately disabled it to force you to follow the Rails method.

(to the other repliers) Imo a framework is a toolbox and you should
just use the tools you want and not be forced to use the whole
package. For example, I recently got frustrated with making select
queries with CakePHP's find methods - for complex queries they're just
a hindrance imo - and decided to make all my select queries with SQL
statements again. I also use my own authing and pagination. Still, I
love many of CakePHP's other features and the fact that it doesn't
force me to use everything is imo its best feature.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: cache ignores prefix (after #6323 fix)

2008-04-10 Thread Krommenaas

To reply to my own question below, the $settings array is probably set
by the extract command which I missed earlier.

I'll try get to the bottom of the prefix problem and report back.


On Apr 9, 11:10 pm, Krommenaas <[EMAIL PROTECTED]> wrote:
> Looking at the code in that changeset I wonder whether the $settings
> array isn't empty in the functions write, read and delete of
> cache.php ? That would explain why the cache prefix doesn't work at
> all.
>
> Thanx for any help, I really need to be able to set this prefix to
> cache different languages.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: cache ignores prefix (after #6323 fix)

2008-04-09 Thread Krommenaas

Same prob here, cache prefix is completely ignored (I'm using File
engine on 1.2) even when I set it with Cache::config() in core.php and
even after applying that fix in changeset #6323.

Looking at the code in that changeset I wonder whether the $settings
array isn't empty in the functions write, read and delete of
cache.php ? That would explain why the cache prefix doesn't work at
all.

Thanx for any help, I really need to be able to set this prefix to
cache different languages.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---