Re: cakephp 1.3 loading page is slow

2011-07-27 Thread WyriHaximus
Tbh it's worth the time to find out why a simple static page is
extremely slow rather then just wack the html_cache plugin in the
mix ;). A slow static page probably means the entire cake app is slow.

On Jul 28, 3:25 am, Eugenio  wrote:
> Try with the html cache 
> plugin;http://bakery.cakephp.org/articles/mattc/2009/03/20/html-cache-helper
>
> It will really speed it up, just be careful and remember to clean cache
> after updates.
>
> 2011/7/27 leafchild 
>
>
>
>
>
>
>
> > I notice loading page is extremely slow.
>
> > Those pages are not connected to DB. Just simple static page.
> > How can I make it faster to load these pages?
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


CakePHP 2.0 meioupload

2011-07-27 Thread Meroe Kush
Just an FYI for those of you using meioupload behavior and CakePHP 2.0

 

I found you need to modify this line in meio_upload.php.  So far all appears
to be working just fine after this change.

 

From:

 

App::import('Core', array('File', 'Folder'));

 

To:

 

App::import('Utility', array('File', 'Folder'));

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Error: The action home is not defined in controller PagesController

2011-07-27 Thread 8vius
I don't understand why I'm getting this message, this is my
controller:

redirect('/');
}
$page = $subpage = $title_for_layout = null;

if (!empty($path[0])) {
$page = $path[0];
}
if (!empty($path[1])) {
$subpage = $path[1];
}
if (!empty($path[$count - 1])) {
$title_for_layout = Inflector::humanize($path[$count -
1]);
}
$this->set(compact('page', 'subpage', 'title_for_layout'));
$this->render(implode('/', $path));
}

function home() {
$this->layout = 'main';
}

function news() {

}

function events() {

}
}
?>

and here's my routes file:


 'users', 'action'
=> 'login'));
Router::connect('/admin/logout', array('controller' => 'users',
'action' => 'logout'));
Router::connect('/', array('controller' => 'pages', 'action' =>
'home'));

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: cakephp 1.3 loading page is slow

2011-07-27 Thread Eugenio
Try with the html cache plugin;
http://bakery.cakephp.org/articles/mattc/2009/03/20/html-cache-helper

It will really speed it up, just be careful and remember to clean cache
after updates.

2011/7/27 leafchild 

> I notice loading page is extremely slow.
>
> Those pages are not connected to DB. Just simple static page.
> How can I make it faster to load these pages?
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


cakephp 1.3 loading page is slow

2011-07-27 Thread leafchild
I notice loading page is extremely slow.

Those pages are not connected to DB. Just simple static page.
How can I make it faster to load these pages?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: multi-language site

2011-07-27 Thread leafchild book
"Configure::write('Config.language', 'ja');"  is NOT working.

Yes I have "default.po"  at app/local/jpn/LC_MESSAGES/default.po



On Wed, Jul 27, 2011 at 5:28 PM, gloop  wrote:

> Correct is:
>
> Configure::write('Config.language', 'ja');
>
> You can take a look on cake/libs/l10n.php
>
> Did you create app/local/jpn/LC_MESSAGES/default.po ?
>
> On 28 Jul., 02:14, leafchild book  wrote:
> > .
> >
> > I set .po file for "en" and "jpn"
> >
> > I set default language to Japanese:
> > app/config/core.php:
> > Configure::write('Config.language', 'jpn');
> >
> > but when I access site
> >
> > Either
> > mydomain.com/en/something/ormydomain.com/something/
> >
> > show EN translation.
> >
> > then I put this line (Configure::write('Config.language', 'jpn');)
> directly
> > to controller file (I thought it will show Japanese ) then still local is
> in
> > EN
> >
> > I can't set default language which I want to! What is missing???
> >
> >
> >
> >
> >
> >
> >
> > On Wed, Jul 27, 2011 at 4:14 PM, gloop  wrote:
> > > When you have diffrent count pages you must set diffrent routes (for
> > > en / jp).
> >
> > > And set diffrent views for these pages.
> >
> > > On 27 Jul., 23:27, leafchild book  wrote:
> > > > Also I wander,,, how other people doing for this kind of site,,,
> >
> > > > #1)
> > > > So like I said 2nd language page has much less pages than dealt page.
> > > > ex)  site map page is not work for just translation. I have to show
> only
> > > > available page link to the page.
> >
> > > > #2)
> > > > Some image is different  at EN and JP page.
> > > > ex) submit button
> >
> > > > On Wed, Jul 27, 2011 at 2:23 PM, gloop  wrote:
> > > > > I use .po files
> >
> > > > > kind regards
> >
> > > > > On 27 Jul., 23:10, leafchild  wrote:
> > > > > > Thanks gloop for the response.
> >
> > > > > > Did you use .pot file or DB??
> >
> > > > > > lc
> >
> > > > > > On Jul 27, 1:32 pm, gloop  wrote:
> >
> > > > > > > Hello leafchild,
> >
> > > > > > > same problem for 1 day :-D
> >
> > > > > > > routes.php
> >
> > > > > > > Router::connect(
> > > > > > > '/:lang/:controller/:action/*',
> > > > > > > array(),
> > > > > > > array('lang' => '[a-z]{2}')
> > > > > > > );
> > > > > > > Router::connect(
> > > > > > > '/:lang/:controller',
> > > > > > > array('action' => 'index'),
> > > > > > > array('lang' => '[a-z]{2}')
> > > > > > > );
> >
> > > > > > > app/config/core.php
> >
> > > > > > > // Set default language
> > > > > > > Configure::write('Config.language', 'de');
> >
> > > > > > > cake/libs/controller
> >
> > > > > > >   var $components = array('Session', 'Cookie');
> >
> > > > > > >   function beforeFilter() {
> > > > > > >   $this->_setLanguage();
> > > > > > >   }
> >
> > > > > > >   function _setLanguage() {
> > > > > > >   if ($this->Cookie->read('lang') &&
> > > > > !$this->Session->check('Config.language')) {
> >
> > > > > > >   $this->Session->write('Config.language',
> > > > > $this->Cookie->read('lang'));
> >
> > > > > > >   }
> > > > > > >   else if (isset($this->params['lang']) &&
> > > ($this->params['lang']
> > > > > > >!=  $this->Session->read('Config.language'))) {
> >
> > > > > > >   $this->Session->write('Config.language',
> > > > > $this->params['lang']);
> >
> > > > > > >   $this->Cookie->write('lang', $this->params['lang'],
> > > false,
> > > > > > > '20 days');
> > > > > > >   }
> > > > > > >   }
> >
> > > > > > > Link musst looks like
> > > > > > > domain/en/controller
> > > > > > > domain/jp/controller
> >
> > > > > > > Have fun :)
> >
> > > > > > > On 27 Jul., 21:19, leafchild  wrote:
> >
> > > > > > > > I want to have 2 languages site (en/jp) and JP is default
> > > language.
> > > > > > > > I look at multi-language pages but still confusing,,,
> >
> > > > > > > > ex)
> > > > >
> http://book.cakephp.org/view/1228/Internationalization-Localizationht.
> > > ..
> >
> > > > > > > > and url will be:
> > > > > > > > JP : mydomain.com/whatever
> > > > > > > > EN: mydomain.com/en/whatever
> >
> > > > > > > > also EN pages has less page than JP pages which mean EN
> doesn't
> > > have
> > > > > > > > all pages for JP pages.
> > > > > > > > What should I do when there is no EN page?
> >
> > > > > > > > I don't thinkhttp://
> > > > > book.cakephp.org/view/1228/Internationalization-Localization
> > > > > > > > works for my site.
> > > > > > > > There are a lot of long sentence that need to be covered,
> plus
> > > this
> > > > > > > > one not changing URL but changing contents.
> >
> > > > > > > > Should I just use Configure::write('Routing.prefixes',
> > > > > array('en'));??
> > > > > > > > because structure of 2 sites are not exactly same but share
> some
> > > > > > > > section.
> >
> > > > > --
> > > > > Our newest site for the community: CakePHP Video Tutorials
> > > > >http://tv.cakephp.org
> > > > > Check out the new CakePHP Questions
> sitehttp://ask.cakephp.organ

Re: multi-language site

2011-07-27 Thread gloop
Correct is:

Configure::write('Config.language', 'ja');

You can take a look on cake/libs/l10n.php

Did you create app/local/jpn/LC_MESSAGES/default.po ?

On 28 Jul., 02:14, leafchild book  wrote:
> .
>
> I set .po file for "en" and "jpn"
>
> I set default language to Japanese:
> app/config/core.php:
> Configure::write('Config.language', 'jpn');
>
> but when I access site
>
> Either
> mydomain.com/en/something/    or    mydomain.com/something/
>
> show EN translation.
>
> then I put this line (Configure::write('Config.language', 'jpn');) directly
> to controller file (I thought it will show Japanese ) then still local is in
> EN
>
> I can't set default language which I want to! What is missing???
>
>
>
>
>
>
>
> On Wed, Jul 27, 2011 at 4:14 PM, gloop  wrote:
> > When you have diffrent count pages you must set diffrent routes (for
> > en / jp).
>
> > And set diffrent views for these pages.
>
> > On 27 Jul., 23:27, leafchild book  wrote:
> > > Also I wander,,, how other people doing for this kind of site,,,
>
> > > #1)
> > > So like I said 2nd language page has much less pages than dealt page.
> > > ex)  site map page is not work for just translation. I have to show only
> > > available page link to the page.
>
> > > #2)
> > > Some image is different  at EN and JP page.
> > > ex) submit button
>
> > > On Wed, Jul 27, 2011 at 2:23 PM, gloop  wrote:
> > > > I use .po files
>
> > > > kind regards
>
> > > > On 27 Jul., 23:10, leafchild  wrote:
> > > > > Thanks gloop for the response.
>
> > > > > Did you use .pot file or DB??
>
> > > > > lc
>
> > > > > On Jul 27, 1:32 pm, gloop  wrote:
>
> > > > > > Hello leafchild,
>
> > > > > > same problem for 1 day :-D
>
> > > > > > routes.php
>
> > > > > >     Router::connect(
> > > > > >         '/:lang/:controller/:action/*',
> > > > > >         array(),
> > > > > >         array('lang' => '[a-z]{2}')
> > > > > >     );
> > > > > >     Router::connect(
> > > > > >         '/:lang/:controller',
> > > > > >         array('action' => 'index'),
> > > > > >         array('lang' => '[a-z]{2}')
> > > > > >     );
>
> > > > > > app/config/core.php
>
> > > > > > // Set default language
> > > > > > Configure::write('Config.language', 'de');
>
> > > > > > cake/libs/controller
>
> > > > > >   var $components = array('Session', 'Cookie');
>
> > > > > >   function beforeFilter() {
> > > > > >       $this->_setLanguage();
> > > > > >   }
>
> > > > > >   function _setLanguage() {
> > > > > >       if ($this->Cookie->read('lang') &&
> > > > !$this->Session->check('Config.language')) {
>
> > > > > >           $this->Session->write('Config.language',
> > > > $this->Cookie->read('lang'));
>
> > > > > >       }
> > > > > >       else if (isset($this->params['lang']) &&
> > ($this->params['lang']
> > > > > >                !=  $this->Session->read('Config.language'))) {
>
> > > > > >           $this->Session->write('Config.language',
> > > > $this->params['lang']);
>
> > > > > >           $this->Cookie->write('lang', $this->params['lang'],
> > false,
> > > > > > '20 days');
> > > > > >       }
> > > > > >   }
>
> > > > > > Link musst looks like
> > > > > > domain/en/controller
> > > > > > domain/jp/controller
>
> > > > > > Have fun :)
>
> > > > > > On 27 Jul., 21:19, leafchild  wrote:
>
> > > > > > > I want to have 2 languages site (en/jp) and JP is default
> > language.
> > > > > > > I look at multi-language pages but still confusing,,,
>
> > > > > > > ex)
> > > >http://book.cakephp.org/view/1228/Internationalization-Localizationht.
> > ..
>
> > > > > > > and url will be:
> > > > > > > JP : mydomain.com/whatever
> > > > > > > EN: mydomain.com/en/whatever
>
> > > > > > > also EN pages has less page than JP pages which mean EN doesn't
> > have
> > > > > > > all pages for JP pages.
> > > > > > > What should I do when there is no EN page?
>
> > > > > > > I don't thinkhttp://
> > > > book.cakephp.org/view/1228/Internationalization-Localization
> > > > > > > works for my site.
> > > > > > > There are a lot of long sentence that need to be covered, plus
> > this
> > > > > > > one not changing URL but changing contents.
>
> > > > > > > Should I just use Configure::write('Routing.prefixes',
> > > > array('en'));??
> > > > > > > because structure of 2 sites are not exactly same but share some
> > > > > > > section.
>
> > > > --
> > > > Our newest site for the community: CakePHP Video Tutorials
> > > >http://tv.cakephp.org
> > > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
> > > > others with their CakePHP related questions.
>
> > > > To unsubscribe from this group, send email to
> > > > cake-php+unsubscr...@googlegroups.com For more options, visit this
> > group
> > > > athttp://groups.google.com/group/cake-php
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, sen

Re: multi-language site

2011-07-27 Thread leafchild book
Just find out:

mydomain.com/jp/something/   make locale
JP

even I set
app/config/core.php:
Configure::write('Config.language', 'jpn');
for default language, default language becomes EN

How come I can't set default language??



On Wed, Jul 27, 2011 at 5:14 PM, leafchild book wrote:

> .
>
> I set .po file for "en" and "jpn"
>
> I set default language to Japanese:
> app/config/core.php:
> Configure::write('Config.language', 'jpn');
>
> but when I access site
>
> Either
> mydomain.com/en/something/ormydomain.com/something/
>
> show EN translation.
>
> then I put this line (Configure::write('Config.language', 'jpn');) directly
> to controller file (I thought it will show Japanese ) then still local is in
> EN
>
> I can't set default language which I want to! What is missing???
>
>
>
>
>
>
>
>
>
> On Wed, Jul 27, 2011 at 4:14 PM, gloop  wrote:
>
>> When you have diffrent count pages you must set diffrent routes (for
>> en / jp).
>>
>> And set diffrent views for these pages.
>>
>> On 27 Jul., 23:27, leafchild book  wrote:
>> > Also I wander,,, how other people doing for this kind of site,,,
>> >
>> > #1)
>> > So like I said 2nd language page has much less pages than dealt page.
>> > ex)  site map page is not work for just translation. I have to show only
>> > available page link to the page.
>> >
>> > #2)
>> > Some image is different  at EN and JP page.
>> > ex) submit button
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > On Wed, Jul 27, 2011 at 2:23 PM, gloop  wrote:
>> > > I use .po files
>> >
>> > > kind regards
>> >
>> > > On 27 Jul., 23:10, leafchild  wrote:
>> > > > Thanks gloop for the response.
>> >
>> > > > Did you use .pot file or DB??
>> >
>> > > > lc
>> >
>> > > > On Jul 27, 1:32 pm, gloop  wrote:
>> >
>> > > > > Hello leafchild,
>> >
>> > > > > same problem for 1 day :-D
>> >
>> > > > > routes.php
>> >
>> > > > > Router::connect(
>> > > > > '/:lang/:controller/:action/*',
>> > > > > array(),
>> > > > > array('lang' => '[a-z]{2}')
>> > > > > );
>> > > > > Router::connect(
>> > > > > '/:lang/:controller',
>> > > > > array('action' => 'index'),
>> > > > > array('lang' => '[a-z]{2}')
>> > > > > );
>> >
>> > > > > app/config/core.php
>> >
>> > > > > // Set default language
>> > > > > Configure::write('Config.language', 'de');
>> >
>> > > > > cake/libs/controller
>> >
>> > > > >   var $components = array('Session', 'Cookie');
>> >
>> > > > >   function beforeFilter() {
>> > > > >   $this->_setLanguage();
>> > > > >   }
>> >
>> > > > >   function _setLanguage() {
>> > > > >   if ($this->Cookie->read('lang') &&
>> > > !$this->Session->check('Config.language')) {
>> >
>> > > > >   $this->Session->write('Config.language',
>> > > $this->Cookie->read('lang'));
>> >
>> > > > >   }
>> > > > >   else if (isset($this->params['lang']) &&
>> ($this->params['lang']
>> > > > >!=  $this->Session->read('Config.language'))) {
>> >
>> > > > >   $this->Session->write('Config.language',
>> > > $this->params['lang']);
>> >
>> > > > >   $this->Cookie->write('lang', $this->params['lang'],
>> false,
>> > > > > '20 days');
>> > > > >   }
>> > > > >   }
>> >
>> > > > > Link musst looks like
>> > > > > domain/en/controller
>> > > > > domain/jp/controller
>> >
>> > > > > Have fun :)
>> >
>> > > > > On 27 Jul., 21:19, leafchild  wrote:
>> >
>> > > > > > I want to have 2 languages site (en/jp) and JP is default
>> language.
>> > > > > > I look at multi-language pages but still confusing,,,
>> >
>> > > > > > ex)
>> > >http://book.cakephp.org/view/1228/Internationalization-Localizationht.
>> ..
>> >
>> > > > > > and url will be:
>> > > > > > JP : mydomain.com/whatever
>> > > > > > EN: mydomain.com/en/whatever
>> >
>> > > > > > also EN pages has less page than JP pages which mean EN doesn't
>> have
>> > > > > > all pages for JP pages.
>> > > > > > What should I do when there is no EN page?
>> >
>> > > > > > I don't thinkhttp://
>> > > book.cakephp.org/view/1228/Internationalization-Localization
>> > > > > > works for my site.
>> > > > > > There are a lot of long sentence that need to be covered, plus
>> this
>> > > > > > one not changing URL but changing contents.
>> >
>> > > > > > Should I just use Configure::write('Routing.prefixes',
>> > > array('en'));??
>> > > > > > because structure of 2 sites are not exactly same but share some
>> > > > > > section.
>> >
>> > > --
>> > > Our newest site for the community: CakePHP Video Tutorials
>> > >http://tv.cakephp.org
>> > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
>> > > others with their CakePHP related questions.
>> >
>> > > To unsubscribe from this group, send email to
>> > > cake-php+unsubscr...@googlegroups.com For more options, visit this
>> group
>> > > athttp://groups.google.com/group/cake-php
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.o

Re: multi-language site

2011-07-27 Thread leafchild book
.

I set .po file for "en" and "jpn"

I set default language to Japanese:
app/config/core.php:
Configure::write('Config.language', 'jpn');

but when I access site

Either
mydomain.com/en/something/ormydomain.com/something/

show EN translation.

then I put this line (Configure::write('Config.language', 'jpn');) directly
to controller file (I thought it will show Japanese ) then still local is in
EN

I can't set default language which I want to! What is missing???









On Wed, Jul 27, 2011 at 4:14 PM, gloop  wrote:

> When you have diffrent count pages you must set diffrent routes (for
> en / jp).
>
> And set diffrent views for these pages.
>
> On 27 Jul., 23:27, leafchild book  wrote:
> > Also I wander,,, how other people doing for this kind of site,,,
> >
> > #1)
> > So like I said 2nd language page has much less pages than dealt page.
> > ex)  site map page is not work for just translation. I have to show only
> > available page link to the page.
> >
> > #2)
> > Some image is different  at EN and JP page.
> > ex) submit button
> >
> >
> >
> >
> >
> >
> >
> > On Wed, Jul 27, 2011 at 2:23 PM, gloop  wrote:
> > > I use .po files
> >
> > > kind regards
> >
> > > On 27 Jul., 23:10, leafchild  wrote:
> > > > Thanks gloop for the response.
> >
> > > > Did you use .pot file or DB??
> >
> > > > lc
> >
> > > > On Jul 27, 1:32 pm, gloop  wrote:
> >
> > > > > Hello leafchild,
> >
> > > > > same problem for 1 day :-D
> >
> > > > > routes.php
> >
> > > > > Router::connect(
> > > > > '/:lang/:controller/:action/*',
> > > > > array(),
> > > > > array('lang' => '[a-z]{2}')
> > > > > );
> > > > > Router::connect(
> > > > > '/:lang/:controller',
> > > > > array('action' => 'index'),
> > > > > array('lang' => '[a-z]{2}')
> > > > > );
> >
> > > > > app/config/core.php
> >
> > > > > // Set default language
> > > > > Configure::write('Config.language', 'de');
> >
> > > > > cake/libs/controller
> >
> > > > >   var $components = array('Session', 'Cookie');
> >
> > > > >   function beforeFilter() {
> > > > >   $this->_setLanguage();
> > > > >   }
> >
> > > > >   function _setLanguage() {
> > > > >   if ($this->Cookie->read('lang') &&
> > > !$this->Session->check('Config.language')) {
> >
> > > > >   $this->Session->write('Config.language',
> > > $this->Cookie->read('lang'));
> >
> > > > >   }
> > > > >   else if (isset($this->params['lang']) &&
> ($this->params['lang']
> > > > >!=  $this->Session->read('Config.language'))) {
> >
> > > > >   $this->Session->write('Config.language',
> > > $this->params['lang']);
> >
> > > > >   $this->Cookie->write('lang', $this->params['lang'],
> false,
> > > > > '20 days');
> > > > >   }
> > > > >   }
> >
> > > > > Link musst looks like
> > > > > domain/en/controller
> > > > > domain/jp/controller
> >
> > > > > Have fun :)
> >
> > > > > On 27 Jul., 21:19, leafchild  wrote:
> >
> > > > > > I want to have 2 languages site (en/jp) and JP is default
> language.
> > > > > > I look at multi-language pages but still confusing,,,
> >
> > > > > > ex)
> > >http://book.cakephp.org/view/1228/Internationalization-Localizationht.
> ..
> >
> > > > > > and url will be:
> > > > > > JP : mydomain.com/whatever
> > > > > > EN: mydomain.com/en/whatever
> >
> > > > > > also EN pages has less page than JP pages which mean EN doesn't
> have
> > > > > > all pages for JP pages.
> > > > > > What should I do when there is no EN page?
> >
> > > > > > I don't thinkhttp://
> > > book.cakephp.org/view/1228/Internationalization-Localization
> > > > > > works for my site.
> > > > > > There are a lot of long sentence that need to be covered, plus
> this
> > > > > > one not changing URL but changing contents.
> >
> > > > > > Should I just use Configure::write('Routing.prefixes',
> > > array('en'));??
> > > > > > because structure of 2 sites are not exactly same but share some
> > > > > > section.
> >
> > > --
> > > Our newest site for the community: CakePHP Video Tutorials
> > >http://tv.cakephp.org
> > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > > others with their CakePHP related questions.
> >
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this
> group
> > > athttp://groups.google.com/group/cake-php
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.

Re: multi-language site

2011-07-27 Thread gloop
When you have diffrent count pages you must set diffrent routes (for
en / jp).

And set diffrent views for these pages.

On 27 Jul., 23:27, leafchild book  wrote:
> Also I wander,,, how other people doing for this kind of site,,,
>
> #1)
> So like I said 2nd language page has much less pages than dealt page.
> ex)  site map page is not work for just translation. I have to show only
> available page link to the page.
>
> #2)
> Some image is different  at EN and JP page.
> ex) submit button
>
>
>
>
>
>
>
> On Wed, Jul 27, 2011 at 2:23 PM, gloop  wrote:
> > I use .po files
>
> > kind regards
>
> > On 27 Jul., 23:10, leafchild  wrote:
> > > Thanks gloop for the response.
>
> > > Did you use .pot file or DB??
>
> > > lc
>
> > > On Jul 27, 1:32 pm, gloop  wrote:
>
> > > > Hello leafchild,
>
> > > > same problem for 1 day :-D
>
> > > > routes.php
>
> > > >     Router::connect(
> > > >         '/:lang/:controller/:action/*',
> > > >         array(),
> > > >         array('lang' => '[a-z]{2}')
> > > >     );
> > > >     Router::connect(
> > > >         '/:lang/:controller',
> > > >         array('action' => 'index'),
> > > >         array('lang' => '[a-z]{2}')
> > > >     );
>
> > > > app/config/core.php
>
> > > > // Set default language
> > > > Configure::write('Config.language', 'de');
>
> > > > cake/libs/controller
>
> > > >   var $components = array('Session', 'Cookie');
>
> > > >   function beforeFilter() {
> > > >       $this->_setLanguage();
> > > >   }
>
> > > >   function _setLanguage() {
> > > >       if ($this->Cookie->read('lang') &&
> > !$this->Session->check('Config.language')) {
>
> > > >           $this->Session->write('Config.language',
> > $this->Cookie->read('lang'));
>
> > > >       }
> > > >       else if (isset($this->params['lang']) && ($this->params['lang']
> > > >                !=  $this->Session->read('Config.language'))) {
>
> > > >           $this->Session->write('Config.language',
> > $this->params['lang']);
>
> > > >           $this->Cookie->write('lang', $this->params['lang'], false,
> > > > '20 days');
> > > >       }
> > > >   }
>
> > > > Link musst looks like
> > > > domain/en/controller
> > > > domain/jp/controller
>
> > > > Have fun :)
>
> > > > On 27 Jul., 21:19, leafchild  wrote:
>
> > > > > I want to have 2 languages site (en/jp) and JP is default language.
> > > > > I look at multi-language pages but still confusing,,,
>
> > > > > ex)
> >http://book.cakephp.org/view/1228/Internationalization-Localizationht...
>
> > > > > and url will be:
> > > > > JP : mydomain.com/whatever
> > > > > EN: mydomain.com/en/whatever
>
> > > > > also EN pages has less page than JP pages which mean EN doesn't have
> > > > > all pages for JP pages.
> > > > > What should I do when there is no EN page?
>
> > > > > I don't thinkhttp://
> > book.cakephp.org/view/1228/Internationalization-Localization
> > > > > works for my site.
> > > > > There are a lot of long sentence that need to be covered, plus this
> > > > > one not changing URL but changing contents.
>
> > > > > Should I just use Configure::write('Routing.prefixes',
> > array('en'));??
> > > > > because structure of 2 sites are not exactly same but share some
> > > > > section.
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Cake 2.0 Auth

2011-07-27 Thread Meroe Kush
Hello folks,

 

I'm just starting to look at Cake 2.0 (been using 1.x for a while) and was
wondering if someone would take a look at the following pastebin to verify
I'm using the new 2.0 Auth correctly  Everything works as I expect so
just looking for validation I suppose

 

http://pastebin.com/kRvUKWV3

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: multi-language site

2011-07-27 Thread leafchild book
Also I wander,,, how other people doing for this kind of site,,,

#1)
So like I said 2nd language page has much less pages than dealt page.
ex)  site map page is not work for just translation. I have to show only
available page link to the page.

#2)
Some image is different  at EN and JP page.
ex) submit button




On Wed, Jul 27, 2011 at 2:23 PM, gloop  wrote:

> I use .po files
>
> kind regards
>
> On 27 Jul., 23:10, leafchild  wrote:
> > Thanks gloop for the response.
> >
> > Did you use .pot file or DB??
> >
> > lc
> >
> > On Jul 27, 1:32 pm, gloop  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Hello leafchild,
> >
> > > same problem for 1 day :-D
> >
> > > routes.php
> >
> > > Router::connect(
> > > '/:lang/:controller/:action/*',
> > > array(),
> > > array('lang' => '[a-z]{2}')
> > > );
> > > Router::connect(
> > > '/:lang/:controller',
> > > array('action' => 'index'),
> > > array('lang' => '[a-z]{2}')
> > > );
> >
> > > app/config/core.php
> >
> > > // Set default language
> > > Configure::write('Config.language', 'de');
> >
> > > cake/libs/controller
> >
> > >   var $components = array('Session', 'Cookie');
> >
> > >   function beforeFilter() {
> > >   $this->_setLanguage();
> > >   }
> >
> > >   function _setLanguage() {
> > >   if ($this->Cookie->read('lang') &&
> !$this->Session->check('Config.language')) {
> >
> > >   $this->Session->write('Config.language',
> $this->Cookie->read('lang'));
> >
> > >   }
> > >   else if (isset($this->params['lang']) && ($this->params['lang']
> > >!=  $this->Session->read('Config.language'))) {
> >
> > >   $this->Session->write('Config.language',
> $this->params['lang']);
> >
> > >   $this->Cookie->write('lang', $this->params['lang'], false,
> > > '20 days');
> > >   }
> > >   }
> >
> > > Link musst looks like
> > > domain/en/controller
> > > domain/jp/controller
> >
> > > Have fun :)
> >
> > > On 27 Jul., 21:19, leafchild  wrote:
> >
> > > > I want to have 2 languages site (en/jp) and JP is default language.
> > > > I look at multi-language pages but still confusing,,,
> >
> > > > ex)
> http://book.cakephp.org/view/1228/Internationalization-Localizationht...
> >
> > > > and url will be:
> > > > JP : mydomain.com/whatever
> > > > EN: mydomain.com/en/whatever
> >
> > > > also EN pages has less page than JP pages which mean EN doesn't have
> > > > all pages for JP pages.
> > > > What should I do when there is no EN page?
> >
> > > > I don't thinkhttp://
> book.cakephp.org/view/1228/Internationalization-Localization
> > > > works for my site.
> > > > There are a lot of long sentence that need to be covered, plus this
> > > > one not changing URL but changing contents.
> >
> > > > Should I just use Configure::write('Routing.prefixes',
> array('en'));??
> > > > because structure of 2 sites are not exactly same but share some
> > > > section.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: multi-language site

2011-07-27 Thread leafchild book
Also I wander,,, how other people doing for this kind of site,,,

#1)
So like I said 2nd language page has much less pages than dealt page.
ex)  site map page is not work for just translation. I have to show only
available page link to the page.

#2)
Some image is different  at EN and JP page.
ex) submit button




On Wed, Jul 27, 2011 at 2:10 PM, leafchild  wrote:

> Thanks gloop for the response.
>
> Did you use .pot file or DB??
>
> lc
>
> On Jul 27, 1:32 pm, gloop  wrote:
> > Hello leafchild,
> >
> > same problem for 1 day :-D
> >
> > routes.php
> >
> > Router::connect(
> > '/:lang/:controller/:action/*',
> > array(),
> > array('lang' => '[a-z]{2}')
> > );
> > Router::connect(
> > '/:lang/:controller',
> > array('action' => 'index'),
> > array('lang' => '[a-z]{2}')
> > );
> >
> > app/config/core.php
> >
> > // Set default language
> > Configure::write('Config.language', 'de');
> >
> > cake/libs/controller
> >
> >   var $components = array('Session', 'Cookie');
> >
> >   function beforeFilter() {
> >   $this->_setLanguage();
> >   }
> >
> >   function _setLanguage() {
> >   if ($this->Cookie->read('lang') &&
> !$this->Session->check('Config.language')) {
> >
> >   $this->Session->write('Config.language',
> $this->Cookie->read('lang'));
> >
> >   }
> >   else if (isset($this->params['lang']) && ($this->params['lang']
> >!=  $this->Session->read('Config.language'))) {
> >
> >   $this->Session->write('Config.language',
> $this->params['lang']);
> >
> >   $this->Cookie->write('lang', $this->params['lang'], false,
> > '20 days');
> >   }
> >   }
> >
> > Link musst looks like
> > domain/en/controller
> > domain/jp/controller
> >
> > Have fun :)
> >
> > On 27 Jul., 21:19, leafchild  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > I want to have 2 languages site (en/jp) and JP is default language.
> > > I look at multi-language pages but still confusing,,,
> >
> > > ex)
> http://book.cakephp.org/view/1228/Internationalization-Localizationht...
> >
> > > and url will be:
> > > JP : mydomain.com/whatever
> > > EN: mydomain.com/en/whatever
> >
> > > also EN pages has less page than JP pages which mean EN doesn't have
> > > all pages for JP pages.
> > > What should I do when there is no EN page?
> >
> > > I don't thinkhttp://
> book.cakephp.org/view/1228/Internationalization-Localization
> > > works for my site.
> > > There are a lot of long sentence that need to be covered, plus this
> > > one not changing URL but changing contents.
> >
> > > Should I just use Configure::write('Routing.prefixes', array('en'));??
> > > because structure of 2 sites are not exactly same but share some
> > > section.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: multi-language site

2011-07-27 Thread gloop
I use .po files

kind regards

On 27 Jul., 23:10, leafchild  wrote:
> Thanks gloop for the response.
>
> Did you use .pot file or DB??
>
> lc
>
> On Jul 27, 1:32 pm, gloop  wrote:
>
>
>
>
>
>
>
> > Hello leafchild,
>
> > same problem for 1 day :-D
>
> > routes.php
>
> >     Router::connect(
> >         '/:lang/:controller/:action/*',
> >         array(),
> >         array('lang' => '[a-z]{2}')
> >     );
> >     Router::connect(
> >         '/:lang/:controller',
> >         array('action' => 'index'),
> >         array('lang' => '[a-z]{2}')
> >     );
>
> > app/config/core.php
>
> > // Set default language
> > Configure::write('Config.language', 'de');
>
> > cake/libs/controller
>
> >   var $components = array('Session', 'Cookie');
>
> >   function beforeFilter() {
> >       $this->_setLanguage();
> >   }
>
> >   function _setLanguage() {
> >       if ($this->Cookie->read('lang') && 
> > !$this->Session->check('Config.language')) {
>
> >           $this->Session->write('Config.language', 
> > $this->Cookie->read('lang'));
>
> >       }
> >       else if (isset($this->params['lang']) && ($this->params['lang']
> >                !=  $this->Session->read('Config.language'))) {
>
> >           $this->Session->write('Config.language', $this->params['lang']);
>
> >           $this->Cookie->write('lang', $this->params['lang'], false,
> > '20 days');
> >       }
> >   }
>
> > Link musst looks like
> > domain/en/controller
> > domain/jp/controller
>
> > Have fun :)
>
> > On 27 Jul., 21:19, leafchild  wrote:
>
> > > I want to have 2 languages site (en/jp) and JP is default language.
> > > I look at multi-language pages but still confusing,,,
>
> > > ex)http://book.cakephp.org/view/1228/Internationalization-Localizationht...
>
> > > and url will be:
> > > JP : mydomain.com/whatever
> > > EN: mydomain.com/en/whatever
>
> > > also EN pages has less page than JP pages which mean EN doesn't have
> > > all pages for JP pages.
> > > What should I do when there is no EN page?
>
> > > I don't 
> > > thinkhttp://book.cakephp.org/view/1228/Internationalization-Localization
> > > works for my site.
> > > There are a lot of long sentence that need to be covered, plus this
> > > one not changing URL but changing contents.
>
> > > Should I just use Configure::write('Routing.prefixes', array('en'));??
> > > because structure of 2 sites are not exactly same but share some
> > > section.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


RE: CakePHP 2.0 Auth not hashing password

2011-07-27 Thread Meroe Kush
I can't really think of a good reason to do that.  If you want to change you
can verify the hash matches prior to changing for (old password
verification).  I can't think of a situation where you would bring the
hashed value back in a field and display it to the browserunless I am
missing your statement I think this is a good design how it is now in 2.0.

 

From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of Jeremy Burns | Class Outfit
Sent: Wednesday, July 27, 2011 2:55 PM
To: cake-php@googlegroups.com
Subject: Re: CakePHP 2.0 Auth not hashing password

 

Yup, I get that. I was merely raising the possibility of an already hashed
password getting hashed again. What's the advice for telling whether or not
a password has already been hashed?


Jeremy Burns

Class Outfit

http://www.classoutfit.com 

 

On 27 Jul 2011, at 19:40, Ceeram wrote:





This is mentioned in the migration guide, Auth doesnt auto hash your
passwords anymore, you need to handle that manually in 2.0 . It was very
confusing for new users to have the passwords auto hashed.

 

-- 
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org   
Check out the new CakePHP Questions site http://ask.cakephp.org
  and help others with their CakePHP related
questions.
 
 
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

 

-- 
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.
 
 
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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: multi-language site

2011-07-27 Thread leafchild
Thanks gloop for the response.

Did you use .pot file or DB??

lc

On Jul 27, 1:32 pm, gloop  wrote:
> Hello leafchild,
>
> same problem for 1 day :-D
>
> routes.php
>
>     Router::connect(
>         '/:lang/:controller/:action/*',
>         array(),
>         array('lang' => '[a-z]{2}')
>     );
>     Router::connect(
>         '/:lang/:controller',
>         array('action' => 'index'),
>         array('lang' => '[a-z]{2}')
>     );
>
> app/config/core.php
>
> // Set default language
> Configure::write('Config.language', 'de');
>
> cake/libs/controller
>
>   var $components = array('Session', 'Cookie');
>
>   function beforeFilter() {
>       $this->_setLanguage();
>   }
>
>   function _setLanguage() {
>       if ($this->Cookie->read('lang') && 
> !$this->Session->check('Config.language')) {
>
>           $this->Session->write('Config.language', 
> $this->Cookie->read('lang'));
>
>       }
>       else if (isset($this->params['lang']) && ($this->params['lang']
>                !=  $this->Session->read('Config.language'))) {
>
>           $this->Session->write('Config.language', $this->params['lang']);
>
>           $this->Cookie->write('lang', $this->params['lang'], false,
> '20 days');
>       }
>   }
>
> Link musst looks like
> domain/en/controller
> domain/jp/controller
>
> Have fun :)
>
> On 27 Jul., 21:19, leafchild  wrote:
>
>
>
>
>
>
>
> > I want to have 2 languages site (en/jp) and JP is default language.
> > I look at multi-language pages but still confusing,,,
>
> > ex)http://book.cakephp.org/view/1228/Internationalization-Localizationht...
>
> > and url will be:
> > JP : mydomain.com/whatever
> > EN: mydomain.com/en/whatever
>
> > also EN pages has less page than JP pages which mean EN doesn't have
> > all pages for JP pages.
> > What should I do when there is no EN page?
>
> > I don't 
> > thinkhttp://book.cakephp.org/view/1228/Internationalization-Localization
> > works for my site.
> > There are a lot of long sentence that need to be covered, plus this
> > one not changing URL but changing contents.
>
> > Should I just use Configure::write('Routing.prefixes', array('en'));??
> > because structure of 2 sites are not exactly same but share some
> > section.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


ACL login -> forward to some kind of main-menue site?

2011-07-27 Thread mivogtGermanyLU
.. it's me again seeking some help and advice @ the group

I added a very basic ACL to my cake app using the login() inside my
users-controller

after logging in I would like to get some redirection to a main-menue-
site (i.e. ./rootdir/mainmenue.php)

how and where to set the code for redirection?

Thanks in advance

CU

Michael

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: CakePHP 2.0 Auth not hashing password

2011-07-27 Thread AD7six


On Jul 27, 2:55 pm, Jeremy Burns | Class Outfit
 wrote:
> Yup, I get that. I was merely raising the possibility of an already hashed 
> password getting hashed again. What's the advice for telling whether or not a 
> password has already been hashed?

dont include the password in any updates except registration and
change passeord processes.

AD
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 27 Jul 2011, at 19:40, Ceeram wrote:
>
>
>
> > This is mentioned in the migration guide, Auth doesnt auto hash your 
> > passwords anymore, you need to handle that manually in 2.0 . It was very 
> > confusing for new users to have the passwords auto hashed.
>
> > --
> > Our newest site for the community: CakePHP Video 
> > Tutorialshttp://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help 
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: multi-language site

2011-07-27 Thread gloop
Hello leafchild,

same problem for 1 day :-D

routes.php

Router::connect(
'/:lang/:controller/:action/*',
array(),
array('lang' => '[a-z]{2}')
);
Router::connect(
'/:lang/:controller',
array('action' => 'index'),
array('lang' => '[a-z]{2}')
);

app/config/core.php

// Set default language
Configure::write('Config.language', 'de');

cake/libs/controller

  var $components = array('Session', 'Cookie');

  function beforeFilter() {
  $this->_setLanguage();
  }

  function _setLanguage() {
  if ($this->Cookie->read('lang') && !$this->Session-
>check('Config.language')) {
  $this->Session->write('Config.language', $this->Cookie-
>read('lang'));
  }
  else if (isset($this->params['lang']) && ($this->params['lang']
   !=  $this->Session->read('Config.language'))) {

  $this->Session->write('Config.language', $this-
>params['lang']);
  $this->Cookie->write('lang', $this->params['lang'], false,
'20 days');
  }
  }

Link musst looks like
domain/en/controller
domain/jp/controller

Have fun :)

On 27 Jul., 21:19, leafchild  wrote:
> I want to have 2 languages site (en/jp) and JP is default language.
> I look at multi-language pages but still confusing,,,
>
> ex)http://book.cakephp.org/view/1228/Internationalization-Localizationhttp://book.cakephp.org/view/1328/Translate
>
> and url will be:
> JP : mydomain.com/whatever
> EN: mydomain.com/en/whatever
>
> also EN pages has less page than JP pages which mean EN doesn't have
> all pages for JP pages.
> What should I do when there is no EN page?
>
> I don't 
> thinkhttp://book.cakephp.org/view/1228/Internationalization-Localization
> works for my site.
> There are a lot of long sentence that need to be covered, plus this
> one not changing URL but changing contents.
>
> Should I just use Configure::write('Routing.prefixes', array('en'));??
> because structure of 2 sites are not exactly same but share some
> section.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


chaning stylesheet/design (upper bar with the cakephp link)

2011-07-27 Thread mivogtGermanyLU
hi there,

I would like to remove the upper dark blue banner-like area above my
app's screens and set there some quick-links for better access to some
areas of my cake-projekt.

May someone please tell me where I find the config-file / lines to be
changed?

Thanks in advace

Michael

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


multi-language site

2011-07-27 Thread leafchild

I want to have 2 languages site (en/jp) and JP is default language.
I look at multi-language pages but still confusing,,,


ex)
http://book.cakephp.org/view/1228/Internationalization-Localization
http://book.cakephp.org/view/1328/Translate

and url will be:
JP : mydomain.com/whatever
EN: mydomain.com/en/whatever


also EN pages has less page than JP pages which mean EN doesn't have
all pages for JP pages.
What should I do when there is no EN page?

I don't think 
http://book.cakephp.org/view/1228/Internationalization-Localization
works for my site.
There are a lot of long sentence that need to be covered, plus this
one not changing URL but changing contents.

Should I just use Configure::write('Routing.prefixes', array('en'));??
because structure of 2 sites are not exactly same but share some
section.



-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: CakePHP 2.0 Auth not hashing password

2011-07-27 Thread Jeremy Burns | Class Outfit
Yup, I get that. I was merely raising the possibility of an already hashed 
password getting hashed again. What's the advice for telling whether or not a 
password has already been hashed?

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 27 Jul 2011, at 19:40, Ceeram wrote:

> This is mentioned in the migration guide, Auth doesnt auto hash your 
> passwords anymore, you need to handle that manually in 2.0 . It was very 
> confusing for new users to have the passwords auto hashed.
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: CakePHP 2.0 Auth not hashing password

2011-07-27 Thread Ceeram
This is mentioned in the migration guide, Auth doesnt auto hash your 
passwords anymore, you need to handle that manually in 2.0 . It was very 
confusing for new users to have the passwords auto hashed.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: SQL Error: ORA-02289: sequence does not exist.

2011-07-27 Thread John Hardy
Access rights error. Make sure your user/domain have sufficient privileges to 
perform the query


On Jul 27, 2011, at 8:43 AM, Hanif wrote:

> Dear all,
> I am facing this error while insert data into oracle database form
> cakephp application.
> 
> Full error message
> 
> Warning (512): SQL Error: ORA-02289: sequence does not exist [CORE\cake
> \libs\model\datasources\dbo_source.php, line 684]
> 
> Query: SELECT aca_cal_activities_seq.currval FROM dual
> 
> 
> Could you please tell me how I can solve this.
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


SQL Error: ORA-02289: sequence does not exist.

2011-07-27 Thread Hanif
Dear all,
I am facing this error while insert data into oracle database form
cakephp application.

Full error message

Warning (512): SQL Error: ORA-02289: sequence does not exist [CORE\cake
\libs\model\datasources\dbo_source.php, line 684]

Query: SELECT aca_cal_activities_seq.currval FROM dual


Could you please tell me how I can solve this.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Conditions + Containable

2011-07-27 Thread tassio.batista
Hi Jens, thanks again.

Unfortunately, I can't test now, because I'm away. But I'd like to
clarify something.
 The example in the book is that:
$this->Post->find('all',
  array('contain' => array('Comment'=>
 array(conditions' => array('Comment.author ='=> "Daniel")
  ,'order' => 'Comment.created DESC';

But I remember when I've test yestederday the system listed all
records, but it hides the Comments that weren't belongs to Daniel. In
my case, I have a search witch I have to pass a parameter and the
system returns all records depending on the parameter without hides
anything. I'm going to try this more later, then I'll keep in touch.

Thanks guy.


On Jul 27, 10:43 am, Jens Dittrich  wrote:
> besides, there is an example like that in the book!
> see here:http://book.cakephp.org/view/1323/Containable

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Checkbox múltiples + HABTM

2011-07-27 Thread eraonline
it's working the problem about save with HABTM!!! My problem was:
 
$pharmacy = new Pharmacy();
$this->set('pharmacies', $pharmacy->find('all'));

The value of the parameter 'all' wasn't working.

The next works!!! 

$pharmacy = new Pharmacy();
$this->set('pharmacies', $pharmacy->find('all'));

or 

$pharmacies = $this->Turn->Pharmacy->find('list'); 

regards
era

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Multiples Checkbox and hasAndBelongsToMany (HABTM)

2011-07-27 Thread eraonline
Ben it's working the problem about save with HABTM!!! My problem was:
 
$pharmacy = new Pharmacy();
$this->set('pharmacies', $pharmacy->find('all'));

The value of the parameter 'all' wasn't working.

The next works!!! 

$pharmacy = new Pharmacy();
$this->set('pharmacies', $pharmacy->find('all'));

or 

$pharmacies = $this->Turn->Pharmacy->find('list'); 


Thank you for your help!
era

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Multiples Checkbox and hasAndBelongsToMany (HABTM)

2011-07-27 Thread eraonline
Thank you very much!!! It's working and it's magic like some things in 
Cake...

I have problems with save with HABTM, I published other post about it called 
"Checkbox múltiples + HABTM". Can you help with it?

Thanks!
era 

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Conditions + Containable

2011-07-27 Thread Jens Dittrich
besides, there is an example like that in the book!
see here: 
http://book.cakephp.org/view/1323/Containable

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Conditions + Containable

2011-07-27 Thread Jens Dittrich
To you query looks wrong. Seems like you do not stick to the syntax of the 
containable behaviour.
Try this:
$this->paginate = array(
   'contain' => array(
  'City' => array(
 'fields' => array('field1', 'field2', ),
 'District' => array(
'fields' => array('field1', 'field2', ),
'conditions' => array('District.name LIKE' => 
'%'.$this->params['form']['search'].'%'),
 )
  )
   )
);

Something like this would do

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Conditions + Containable

2011-07-27 Thread tassio.batista
My table structure is:

$this->State->City
$this->State->City->Disctrict, then the query that I want to do is:
(In State Controller)

$this->paginate=array(
'contain'=>array(
'City'=> array(
 
'District'=>array('fields'=>array('id','name')),'fields'=>array('id','name')),
'conditions'=>array('District.name LIKE '=>'%'. $this-
>params['form']['search'].'%'));

The system warns this Error: Unknown column District.nome
this happens because District.nome is not an atributte of the State
Model.

Thanks for your reply. Then, sorry for my basic english.



On Jul 27, 9:56 am, Jens Dittrich  wrote:
> what is your table structure and what do you want to query?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Multiples Checkbox and hasAndBelongsToMany (HABTM)

2011-07-27 Thread BenJsno
oups, I forgive a "Categorie" replacement.
You must read "PharmaciesTurn" instead of "CategoriesTurn"


On 27 juil, 09:50, BenJsno  wrote:
> Hello,
>
> -- in your controller function (add or edit):
> ...
> $pharmacies = $this->Turn->Pharmacy->find('list');
> // FOR SELECTED CHECKBOX : (only in edit)
> $options['joins'] = array(
>         array('table' => 'pharmacies_turns',
>                 'alias' => 'PharmaciesTurn',
>                 'type' => 'inner',
>                 'conditions' => array('CategoriesTurn.turn_id = Turn.id')
>         ),
>         array('table' => 'pharmacies',
>                 'alias' => 'Pharmacy',
>                 'type' => 'inner',
>                 'conditions' => array('PharmaciesTurn.pharmacy_id = 
> Pharmacy.id')
>         )
> );
> $options['fields'] = array('DISTINCT Turn.id');
> $options['conditions'] = array('Turn.id' => $id);
>
> $tmpSelected = $this->Turn->find('all', $options);
> $selected = array();
>
> if (!empty($tmpSelected)){
>         foreach ($tmpSelected[0]['Pharmacy'] as $pharmacy){
>                 array_push($selected, $pharmacy['id']);
>         }
>
> }
>
> $this->set(compact('pharmacies','selected'));
> ...
>
> -- in your view :
> ...
> echo $this->Form->input('Pharmacy',
> array('label'=>false,'type'=>'select','multiple'=>'checkbox','selected'=>
> $selected));
> ...
>
> BenJsno
>
> On 25 juil, 20:10, eraonline  wrote:
>
>
>
>
>
>
>
> > Hello! I want to show in the view a list of checkbox of Pharmacies to
> > assign to a Turn.
>
> > Example:
>
> > Turn: INPUT TEXT
>
> > Pharmacies:
>
> > CHKBOX1
> > CHKBOX2
> > CHKBOX3
>
> > Can help me with this?
> > Thanks!
>
> > eraonline

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Conditions + Containable

2011-07-27 Thread Jens Dittrich
what is your table structure and what do you want to query?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Conditions + Containable

2011-07-27 Thread tassio.batista
Hi guys,

Anyone knows to solve this problem?
http://cakephp.1045679.n5.nabble.com/Containable-HABTM-conditions-PROBLEM-urgent-td1324299.html

I have the same problem.
Thanks.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: problem with Save belongsTo

2011-07-27 Thread Jens Dittrich
read the book about that, it is all documented:
http://book.cakephp.org/view/1032/Saving-Related-Model-Data-hasOne-hasMany-belongsTo

/beginHint
There is a function called saveAll
/endHint

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: CakePHP 2.0 Auth

2011-07-27 Thread Jeremy Burns | Class Outfit
Just a thought. If you have dragged the whole user record back that includes 
the hashed password and is then included in an array as part of a save function 
even if it hasn't been changed, will this beforeSave function not rehash the 
already hashed password?

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 27 Jul 2011, at 03:18, Meroe Kush wrote:

> Disregard my last post please.
>  
> As soon as I hit send I found this:
>  
> Hashing passwords
> AuthComponent no longer automatically hashes every password it can find. This 
> was removed because it made a number of common tasks like validation 
> difficult. You should never store plain text passwords, and before saving a 
> user record you should always hash the password. You can use the static 
> AuthComponent::password() to hash passwords before saving them. This will use 
> the configured hashing strategy for your application.
> After validating the password, you can hash a password in the beforeSave 
> callback of your model:
>  class User extends AppModel {
> function beforeSave($options = array()) {
> $this->data['User']['password'] = 
> AuthComponent::password($this->data['User']['password']);
> return true;
> }
> }
>  
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: CakePHP 2.0 Auth

2011-07-27 Thread euromark
or simply use a behavior:
https://github.com/dereuromark/tools/blob/master/models/behaviors/change_password.php

this is still cake1.3 though :)


On 27 Jul., 04:18, "Meroe Kush"  wrote:
> Disregard my last post please.
>
> As soon as I hit send I found this:
>
> Hashing passwords
>
> AuthComponent no longer automatically hashes every password it can find.
> This was removed because it made a number of common tasks like validation
> difficult. You should never store plain text passwords, and before saving a
> user record you should always hash the password. You can use the static
> AuthComponent::password() to hash passwords before saving them. This will
> use the configured hashing strategy for your application.
>
> After validating the password, you can hash a password in the beforeSave
> callback of your model:
>
> 
> class User extends AppModel {
>
>     function beforeSave($options = array()) {
>
>         $this->data['User']['password'] =
> AuthComponent::password($this->data['User']['password']);
>
>         return true;
>
>     }
>
>
>
>
>
>
>
> }

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: CakePHP 1.3.11 and 2.0.0-beta released

2011-07-27 Thread Jens Dittrich
Great Job!

I would like to know if this beta release of 2.0 is also feature freeze or 
are there still things to come?

regards,
Jens

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Multiples Checkbox and hasAndBelongsToMany (HABTM)

2011-07-27 Thread BenJsno
Hello,

-- in your controller function (add or edit):
...
$pharmacies = $this->Turn->Pharmacy->find('list');
// FOR SELECTED CHECKBOX : (only in edit)
$options['joins'] = array(
array('table' => 'pharmacies_turns',
'alias' => 'PharmaciesTurn',
'type' => 'inner',
'conditions' => array('CategoriesTurn.turn_id = Turn.id')
),
array('table' => 'pharmacies',
'alias' => 'Pharmacy',
'type' => 'inner',
'conditions' => array('PharmaciesTurn.pharmacy_id = 
Pharmacy.id')
)
);
$options['fields'] = array('DISTINCT Turn.id');
$options['conditions'] = array('Turn.id' => $id);

$tmpSelected = $this->Turn->find('all', $options);
$selected = array();

if (!empty($tmpSelected)){
foreach ($tmpSelected[0]['Pharmacy'] as $pharmacy){
array_push($selected, $pharmacy['id']);
}
}

$this->set(compact('pharmacies','selected'));
...

-- in your view :
...
echo $this->Form->input('Pharmacy',
array('label'=>false,'type'=>'select','multiple'=>'checkbox','selected'=>
$selected));
...

BenJsno


On 25 juil, 20:10, eraonline  wrote:
> Hello! I want to show in the view a list of checkbox of Pharmacies to
> assign to a Turn.
>
> Example:
>
> Turn: INPUT TEXT
>
> Pharmacies:
>
> CHKBOX1
> CHKBOX2
> CHKBOX3
>
> Can help me with this?
> Thanks!
>
> eraonline

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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